diff --git a/.buildkite/ftr_platform_stateful_configs.yml b/.buildkite/ftr_platform_stateful_configs.yml index bc323bfb6c5bf..af04aef1e0911 100644 --- a/.buildkite/ftr_platform_stateful_configs.yml +++ b/.buildkite/ftr_platform_stateful_configs.yml @@ -42,6 +42,9 @@ disabled: # Default http2 config to use for performance journeys - x-pack/performance/configs/http2_config.ts + # Gen AI suites, running with their own pipeline + - x-pack/test/functional_gen_ai/inference/config.ts + defaultQueue: 'n2-4-spot' enabled: - test/accessibility/config.ts @@ -64,7 +67,6 @@ enabled: - test/functional/apps/dashboard/group5/config.ts - test/functional/apps/dashboard/group6/config.ts - test/functional/apps/discover/ccs_compatibility/config.ts - - test/functional/apps/discover/classic/config.ts - test/functional/apps/discover/embeddable/config.ts - test/functional/apps/discover/esql/config.ts - test/functional/apps/discover/group1/config.ts @@ -289,7 +291,6 @@ enabled: - x-pack/test/plugin_functional/config.ts - x-pack/test/reporting_api_integration/reporting_and_security.config.ts - x-pack/test/reporting_api_integration/reporting_without_security.config.ts - - x-pack/test/reporting_functional/reporting_and_deprecated_security.config.ts - x-pack/test/reporting_functional/reporting_and_security.config.ts - x-pack/test/reporting_functional/reporting_without_security.config.ts - x-pack/test/rule_registry/security_and_spaces/config_basic.ts diff --git a/.buildkite/ftr_security_serverless_configs.yml b/.buildkite/ftr_security_serverless_configs.yml index 69d4801292cf7..74d82d40c8bce 100644 --- a/.buildkite/ftr_security_serverless_configs.yml +++ b/.buildkite/ftr_security_serverless_configs.yml @@ -19,6 +19,9 @@ disabled: - x-pack/test_serverless/functional/config.base.ts - x-pack/test_serverless/shared/config.base.ts + # MKI only configs files + - x-pack/test_serverless/functional/test_suites/security/config.mki_only.ts + defaultQueue: 'n2-4-spot' enabled: - x-pack/test_serverless/api_integration/test_suites/security/config.ts @@ -32,7 +35,6 @@ enabled: - x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.basic.ts - x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.essentials.ts - x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.agentless.ts - - x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.agentless_api.ts - x-pack/test_serverless/functional/test_suites/security/config.saved_objects_management.ts - x-pack/test_serverless/functional/test_suites/security/config.context_awareness.ts - x-pack/test_serverless/functional/test_suites/security/common_configs/config.group1.ts @@ -74,7 +76,8 @@ enabled: - x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/large_prebuilt_rules_package/trial_license_complete_tier/configs/serverless.config.ts - x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/management/trial_license_complete_tier/configs/serverless.config.ts - x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/update_prebuilt_rules_package/trial_license_complete_tier/configs/serverless.config.ts - - x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/trial_license_complete_tier/configs/serverless.config.ts + - x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_enabled/configs/serverless.config.ts + - x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_disabled/configs/serverless.config.ts - x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_bulk_actions/trial_license_complete_tier/configs/serverless.config.ts - x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_delete/trial_license_complete_tier/configs/serverless.config.ts - x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_delete/basic_license_essentials_tier/configs/serverless.config.ts diff --git a/.buildkite/ftr_security_stateful_configs.yml b/.buildkite/ftr_security_stateful_configs.yml index f7caacba05e1b..bd8bc9e922f0d 100644 --- a/.buildkite/ftr_security_stateful_configs.yml +++ b/.buildkite/ftr_security_stateful_configs.yml @@ -58,7 +58,8 @@ enabled: - x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/large_prebuilt_rules_package/trial_license_complete_tier/configs/ess.config.ts - x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/management/trial_license_complete_tier/configs/ess.config.ts - x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/update_prebuilt_rules_package/trial_license_complete_tier/configs/ess.config.ts - - x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/trial_license_complete_tier/configs/ess.config.ts + - x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_enabled/configs/ess.config.ts + - x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_disabled/configs/ess.config.ts - x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_bulk_actions/trial_license_complete_tier/configs/ess.config.ts - x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_delete/trial_license_complete_tier/configs/ess.config.ts - x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_delete/basic_license_essentials_tier/configs/ess.config.ts @@ -100,3 +101,4 @@ enabled: - x-pack/test/cloud_security_posture_functional/config.ts - x-pack/test/cloud_security_posture_functional/config.agentless.ts - x-pack/test/cloud_security_posture_functional/data_views/config.ts + - x-pack/test/automatic_import_api_integration/security/config_basic.ts diff --git a/.buildkite/pipeline-resource-definitions/kibana-fips-daily.yml b/.buildkite/pipeline-resource-definitions/kibana-fips-daily.yml index bedb81cccc5a4..f651a8c9e4f96 100644 --- a/.buildkite/pipeline-resource-definitions/kibana-fips-daily.yml +++ b/.buildkite/pipeline-resource-definitions/kibana-fips-daily.yml @@ -3,7 +3,7 @@ apiVersion: backstage.io/v1alpha1 kind: Resource metadata: name: bk-kibana-fips-daily - description: Run Kibana FIPS smoke tests + description: Run Kibana test suite with FIPS agents links: - title: Pipeline link url: https://buildkite.com/elastic/kibana-fips @@ -16,10 +16,10 @@ spec: kind: Pipeline metadata: name: kibana / fips - description: Run Kibana FIPS smoke tests + description: Run Kibana test suite with FIPS agents spec: env: - SLACK_NOTIFICATIONS_CHANNEL: '#kibana-operations-alerts' + SLACK_NOTIFICATIONS_CHANNEL: '#kibana-fips' ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true' repository: elastic/kibana branch_configuration: main diff --git a/.buildkite/pipelines/flaky_tests/groups.json b/.buildkite/pipelines/flaky_tests/groups.json index 77c3d23714d6f..2e92f82a4d958 100644 --- a/.buildkite/pipelines/flaky_tests/groups.json +++ b/.buildkite/pipelines/flaky_tests/groups.json @@ -88,6 +88,10 @@ "key": "cypress/apm_cypress", "name": "APM - Cypress" }, + { + "key": "cypress/profiling_cypress", + "name": "Profiling - Cypress" + }, { "key": "cypress/inventory_cypress", "name": "Inventory - Cypress" diff --git a/.buildkite/pipelines/on_merge.yml b/.buildkite/pipelines/on_merge.yml index 66cc3f9f33042..2f1562ef1d741 100644 --- a/.buildkite/pipelines/on_merge.yml +++ b/.buildkite/pipelines/on_merge.yml @@ -169,6 +169,28 @@ steps: - exit_status: '*' limit: 1 + - command: .buildkite/scripts/steps/test/ftr_configs.sh + env: + FTR_CONFIG: "x-pack/test/functional_gen_ai/inference/config.ts" + FTR_CONFIG_GROUP_KEY: 'ftr-ai-infra-gen-ai-inference-api' + FTR_GEN_AI: "1" + label: AppEx AI-Infra Inference APIs FTR tests + key: ai-infra-gen-ai-inference-api + timeout_in_minutes: 50 + parallelism: 1 + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + retry: + automatic: + - exit_status: '-1' + limit: 3 + - exit_status: '*' + limit: 1 + - command: .buildkite/scripts/steps/functional/security_serverless_entity_analytics.sh label: 'Serverless Entity Analytics - Security Cypress Tests' agents: diff --git a/.buildkite/pipelines/pull_request/ai_infra_gen_ai.yml b/.buildkite/pipelines/pull_request/ai_infra_gen_ai.yml new file mode 100644 index 0000000000000..650039b278d52 --- /dev/null +++ b/.buildkite/pipelines/pull_request/ai_infra_gen_ai.yml @@ -0,0 +1,30 @@ +steps: + - group: AppEx AI-Infra genAI tests + key: ai-infra-gen-ai + depends_on: + - build + - quick_checks + - checks + - linting + - linting_with_types + - check_types + - check_oas_snapshot + steps: + - command: .buildkite/scripts/steps/test/ftr_configs.sh + env: + FTR_CONFIG: "x-pack/test/functional_gen_ai/inference/config.ts" + FTR_CONFIG_GROUP_KEY: 'ftr-ai-infra-gen-ai-inference-api' + FTR_GEN_AI: "1" + label: AppEx AI-Infra Inference APIs FTR tests + key: ai-infra-gen-ai-inference-api + timeout_in_minutes: 50 + parallelism: 1 + agents: + machineType: n2-standard-4 + preemptible: true + retry: + automatic: + - exit_status: '-1' + limit: 3 + - exit_status: '*' + limit: 1 diff --git a/.buildkite/scripts/common/setup_job_env.sh b/.buildkite/scripts/common/setup_job_env.sh index b2e3bfdd024d3..d05719cbbbb32 100644 --- a/.buildkite/scripts/common/setup_job_env.sh +++ b/.buildkite/scripts/common/setup_job_env.sh @@ -132,6 +132,14 @@ EOF export ELASTIC_APM_API_KEY } +# Set up GenAI keys +{ + if [[ "${FTR_GEN_AI:-}" =~ ^(1|true)$ ]]; then + echo "FTR_GEN_AI was set - exposing LLM connectors" + export KIBANA_TESTING_AI_CONNECTORS="$(vault_get ai-infra-ci-connectors connectors-config)" + fi +} + # Set up GCS Service Account for CDN { GCS_SA_CDN_KEY="$(vault_get gcs-sa-cdn-prod key)" diff --git a/.buildkite/scripts/pipelines/pull_request/pipeline.ts b/.buildkite/scripts/pipelines/pull_request/pipeline.ts index 6b805d540c254..ad71f70258a23 100644 --- a/.buildkite/scripts/pipelines/pull_request/pipeline.ts +++ b/.buildkite/scripts/pipelines/pull_request/pipeline.ts @@ -113,33 +113,59 @@ const getPipeline = (filename: string, removeSteps = true) => { pipeline.push(getPipeline('.buildkite/pipelines/pull_request/fleet_cypress.yml')); } - if (await doAnyChangesMatch([/^x-pack\/plugins\/observability_solution\/exploratory_view/])) { + if ( + (await doAnyChangesMatch([/^x-pack\/plugins\/observability_solution\/exploratory_view/])) || + GITHUB_PR_LABELS.includes('ci:synthetics-runner-suites') + ) { pipeline.push(getPipeline('.buildkite/pipelines/pull_request/exploratory_view_plugin.yml')); } if ( - await doAnyChangesMatch([ + (await doAnyChangesMatch([ /^x-pack\/plugins\/observability_solution\/synthetics/, /^x-pack\/plugins\/observability_solution\/exploratory_view/, - ]) + ])) || + GITHUB_PR_LABELS.includes('ci:synthetics-runner-suites') ) { pipeline.push(getPipeline('.buildkite/pipelines/pull_request/synthetics_plugin.yml')); pipeline.push(getPipeline('.buildkite/pipelines/pull_request/uptime_plugin.yml')); } if ( - await doAnyChangesMatch([ + (await doAnyChangesMatch([ /^x-pack\/plugins\/observability_solution\/ux/, /^x-pack\/plugins\/observability_solution\/exploratory_view/, - ]) + ])) || + GITHUB_PR_LABELS.includes('ci:synthetics-runner-suites') ) { pipeline.push(getPipeline('.buildkite/pipelines/pull_request/ux_plugin_e2e.yml')); } - if (await doAnyChangesMatch([/^x-pack\/plugins\/observability_solution/])) { + if ( + (await doAnyChangesMatch([ + /^x-pack\/plugins\/observability_solution/, + /^package.json/, + /^yarn.lock/, + ])) || + GITHUB_PR_LABELS.includes('ci:synthetics-runner-suites') + ) { pipeline.push(getPipeline('.buildkite/pipelines/pull_request/slo_plugin_e2e.yml')); } + if ( + (await doAnyChangesMatch([ + /^x-pack\/packages\/ai-infra/, + /^x-pack\/plugins\/ai_infra/, + /^x-pack\/plugins\/inference/, + /^x-pack\/plugins\/stack_connectors\/server\/connector_types\/bedrock/, + /^x-pack\/plugins\/stack_connectors\/server\/connector_types\/gemini/, + /^x-pack\/plugins\/stack_connectors\/server\/connector_types\/openai/, + ])) || + GITHUB_PR_LABELS.includes('ci:all-gen-ai-suites') + ) { + pipeline.push(getPipeline('.buildkite/pipelines/pull_request/ai_infra_gen_ai.yml')); + } + if ( GITHUB_PR_LABELS.includes('ci:deploy-cloud') || GITHUB_PR_LABELS.includes('ci:cloud-deploy') || diff --git a/.buildkite/scripts/steps/checks/capture_oas_snapshot.sh b/.buildkite/scripts/steps/checks/capture_oas_snapshot.sh index e9f42d67008ea..66051c8fd5e29 100755 --- a/.buildkite/scripts/steps/checks/capture_oas_snapshot.sh +++ b/.buildkite/scripts/steps/checks/capture_oas_snapshot.sh @@ -8,7 +8,7 @@ source .buildkite/scripts/common/util.sh .buildkite/scripts/copy_es_snapshot_cache.sh echo --- Capture OAS snapshot -cmd="node scripts/capture_oas_snapshot --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet" +cmd="node scripts/capture_oas_snapshot --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --include-path /api/dashboards" if is_pr && ! is_auto_commit_disabled; then cmd="$cmd --update" fi diff --git a/.buildkite/scripts/steps/checks/telemetry.sh b/.buildkite/scripts/steps/checks/telemetry.sh index 073f1fbaaff02..a767ba2a003cb 100755 --- a/.buildkite/scripts/steps/checks/telemetry.sh +++ b/.buildkite/scripts/steps/checks/telemetry.sh @@ -5,4 +5,10 @@ set -euo pipefail source .buildkite/scripts/common/util.sh echo --- Check Telemetry Schema -node scripts/telemetry_check + +if is_pr && ! is_auto_commit_disabled; then + node scripts/telemetry_check --fix + check_for_changed_files "node scripts/telemetry_check" true +else + node scripts/telemetry_check +fi diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 8662c30e29f89..1bf4354a52401 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -337,7 +337,6 @@ packages/kbn-dev-proc-runner @elastic/kibana-operations packages/kbn-dev-utils @elastic/kibana-operations packages/kbn-discover-contextual-components @elastic/obs-ux-logs-team @elastic/kibana-data-discovery packages/kbn-discover-utils @elastic/kibana-data-discovery -packages/kbn-doc-links @elastic/docs packages/kbn-docs-utils @elastic/kibana-operations packages/kbn-dom-drag-drop @elastic/kibana-visualizations @elastic/kibana-data-discovery packages/kbn-ebt-tools @elastic/kibana-core @@ -370,6 +369,7 @@ packages/kbn-formatters @elastic/obs-ux-logs-team packages/kbn-ftr-common-functional-services @elastic/kibana-operations @elastic/appex-qa packages/kbn-ftr-common-functional-ui-services @elastic/appex-qa packages/kbn-ftr-screenshot-filename @elastic/kibana-operations @elastic/appex-qa +packages/kbn-gen-ai-functional-testing @elastic/appex-ai-infra packages/kbn-generate @elastic/kibana-operations packages/kbn-generate-console-definitions @elastic/kibana-management packages/kbn-generate-csv @elastic/appex-sharedux @@ -561,6 +561,7 @@ packages/react/kibana_context/styled @elastic/appex-sharedux packages/react/kibana_context/theme @elastic/appex-sharedux packages/react/kibana_mount @elastic/appex-sharedux packages/response-ops/feature_flag_service @elastic/response-ops +packages/response-ops/rule_form @elastic/response-ops packages/response-ops/rule_params @elastic/response-ops packages/serverless/project_switcher @elastic/appex-sharedux packages/serverless/settings/common @elastic/appex-sharedux @elastic/kibana-management @@ -621,6 +622,7 @@ packages/shared-ux/storybook/config @elastic/appex-sharedux packages/shared-ux/storybook/mock @elastic/appex-sharedux packages/shared-ux/table_persist @elastic/appex-sharedux src/core @elastic/kibana-core +src/platform/packages/shared/kbn-doc-links @elastic/docs src/plugins/advanced_settings @elastic/appex-sharedux @elastic/kibana-management src/plugins/ai_assistant_management/selection @elastic/obs-ai-assistant src/plugins/bfetch @elastic/appex-sharedux @@ -867,6 +869,7 @@ x-pack/plugins/ai_infra/llm_tasks @elastic/appex-ai-infra x-pack/plugins/ai_infra/product_doc_base @elastic/appex-ai-infra x-pack/plugins/aiops @elastic/ml-ui x-pack/plugins/alerting @elastic/response-ops +x-pack/plugins/asset_inventory @elastic/kibana-cloud-security-posture x-pack/plugins/banners @elastic/appex-sharedux x-pack/plugins/canvas @elastic/kibana-presentation x-pack/plugins/cases @elastic/response-ops @@ -980,8 +983,8 @@ x-pack/plugins/snapshot_restore @elastic/kibana-management x-pack/plugins/spaces @elastic/kibana-security x-pack/plugins/stack_alerts @elastic/response-ops x-pack/plugins/stack_connectors @elastic/response-ops -x-pack/plugins/streams @simianhacker @flash1293 @dgieselaar -x-pack/plugins/streams_app @simianhacker @flash1293 @dgieselaar +x-pack/plugins/streams @elastic/streams-program-team +x-pack/plugins/streams_app @elastic/streams-program-team x-pack/plugins/task_manager @elastic/response-ops x-pack/plugins/telemetry_collection_xpack @elastic/kibana-core x-pack/plugins/threat_intelligence @elastic/security-threat-hunting-investigations @@ -1817,6 +1820,7 @@ packages/kbn-monaco/src/esql @elastic/kibana-esql # AppEx AI Infra /x-pack/plugins/inference @elastic/appex-ai-infra @elastic/obs-ai-assistant @elastic/security-generative-ai +/x-pack/test/functional_gen_ai/inference @elastic/appex-ai-infra # AppEx Platform Services Security //x-pack/test_serverless/api_integration/test_suites/common/security_response_headers.ts @elastic/kibana-security @@ -2102,7 +2106,9 @@ x-pack/test/api_integration/apis/management/index_management/inference_endpoints /x-pack/test/api_integration/services/security_solution_*.gen.ts @elastic/security-solution /x-pack/test/accessibility/apps/group3/security_solution.ts @elastic/security-solution /x-pack/test_serverless/functional/test_suites/security/config.ts @elastic/security-solution @elastic/appex-qa -/x-pack/test_serverless/functional/test_suites/security/config.feature_flags.ts @elastic/security-solution +x-pack/test_serverless/functional/test_suites/security/config.mki_only.ts @elastic/security-solution @elastic/appex-qa +x-pack/test_serverless/functional/test_suites/security/index.mki_only.ts @elastic/security-solution @elastic/appex-qa @elastic/kibana-cloud-security-posture +/x-pack/test_serverless/functional/test_suites/security/config.feature_flags.ts @elastic/security-solution @elastic/kibana-cloud-security-posture /x-pack/test_serverless/api_integration/test_suites/observability/config.feature_flags.ts @elastic/security-solution /x-pack/test_serverless/functional/test_suites/common/spaces/multiple_spaces_enabled.ts @elastic/security-solution /x-pack/test/functional/es_archives/endpoint/ @elastic/security-solution @@ -2133,11 +2139,15 @@ x-pack/test/api_integration/apis/management/index_management/inference_endpoints # TODO: assign sub directories to sub teams /x-pack/plugins/security_solution_ess/ @elastic/security-solution /x-pack/plugins/security_solution_serverless/ @elastic/security-solution +/x-pack/plugins/security_solution/public/app/404.tsx @elastic/security-solution +/x-pack/plugins/security_solution/public/app/app.tsx @elastic/security-solution +/x-pack/plugins/security_solution/public/app/home @elastic/security-solution # GenAI in Security Solution /x-pack/plugins/security_solution/public/assistant @elastic/security-generative-ai /x-pack/plugins/security_solution/public/attack_discovery @elastic/security-generative-ai /x-pack/test/security_solution_cypress/cypress/e2e/ai_assistant @elastic/security-generative-ai +/x-pack/plugins/security_solution_ess/public/upselling/pages/attack_discovery @elastic/security-generative-ai # Security Solution cross teams ownership /x-pack/test/security_solution_cypress/cypress/fixtures @elastic/security-detections-response @elastic/security-threat-hunting @@ -2153,6 +2163,8 @@ x-pack/test/api_integration/apis/management/index_management/inference_endpoints /x-pack/plugins/security_solution/public/common/components/callouts @elastic/security-detections-response /x-pack/plugins/security_solution/public/common/components/hover_actions @elastic/security-threat-hunting-explore @elastic/security-threat-hunting-investigations +/x-pack/plugins/security_solution/public/common/components/formatted_date/index.tsx @elastic/security-threat-hunting-explore @elastic/security-threat-hunting-investigations +/x-pack/plugins/security_solution/public/common/components/formatted_number/index.tsx @elastic/security-threat-hunting-explore @elastic/security-threat-hunting-investigations /x-pack/plugins/security_solution/server/routes @elastic/security-detections-response @elastic/security-threat-hunting /x-pack/plugins/security_solution/server/utils @elastic/security-detections-response @elastic/security-threat-hunting @@ -2183,6 +2195,7 @@ x-pack/test/security_solution_api_integration/test_suites/sources @elastic/secur /x-pack/plugins/security_solution/server/lib/siem_migrations @elastic/security-threat-hunting /x-pack/plugins/security_solution/common/siem_migrations @elastic/security-threat-hunting /x-pack/plugins/security_solution/public/siem_migrations @elastic/security-threat-hunting +/x-pack/plugins/security_solution/public/common/components/control_columns @elastic/security-threat-hunting ## Security Solution Threat Hunting areas - Threat Hunting Investigations @@ -2211,6 +2224,21 @@ x-pack/test/security_solution_cypress/cypress/tasks/expandable_flyout @elastic/ /x-pack/plugins/security_solution/public/resolver @elastic/security-threat-hunting-investigations /x-pack/plugins/security_solution/public/threat_intelligence @elastic/security-threat-hunting-investigations /x-pack/plugins/security_solution/public/timelines @elastic/security-threat-hunting-investigations +/x-pack/plugins/security_solution/public/common/components/header_actions @elastic/security-threat-hunting-investigations +/x-pack/plugins/security_solution/common/types/header_actions @elastic/security-threat-hunting-investigations +/x-pack/plugins/security_solution/public/flyout/network_details @elastic/security-threat-hunting-investigations +/x-pack/plugins/security_solution/public/flyout/rule_details @elastic/security-threat-hunting-investigations +/x-pack/plugins/security_solution/public/investigations @elastic/security-threat-hunting-investigations +/x-pack/plugins/security_solution/public/detections/configurations/security_solution_detections @elastic/security-threat-hunting-investigations +/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.tsx @elastic/security-threat-hunting-investigations +/x-pack/plugins/security_solution/public/common/hooks/use_resolve_conflict.tsx @elastic/security-threat-hunting-investigations +/x-pack/plugins/security_solution/public/common/components/drag_and_drop @elastic/security-threat-hunting-investigations +/x-pack/plugins/security_solution/public/common/components/draggables @elastic/security-threat-hunting-investigations +/x-pack/plugins/security_solution/public/common/components/events_tab @elastic/security-threat-hunting-investigations +/x-pack/plugins/security_solution_serverless/public/upselling/pages/threat_intelligence_paywall.tsx @elastic/security-threat-hunting-investigations +/x-pack/plugins/security_solution/public/common/mock/mock_timeline_control_columns.tsx @elastic/security-threat-hunting-investigations +/x-pack/plugins/security_solution/public/common/components/exit_full_screen @elastic/security-threat-hunting-investigations +/x-pack/plugins/security_solution/public/app/home/template_wrapper/timeline @elastic/security-threat-hunting-investigations /x-pack/plugins/security_solution/server/lib/timeline @elastic/security-threat-hunting-investigations @@ -2228,6 +2256,13 @@ x-pack/test/security_solution_cypress/cypress/tasks/expandable_flyout @elastic/ /x-pack/test/security_solution_cypress/cypress/tasks/network @elastic/security-threat-hunting-explore /x-pack/plugins/security_solution/public/app/actions @elastic/security-threat-hunting-explore +/x-pack/plugins/security_solution/public/assets @elastic/security-threat-hunting-explore +/x-pack/plugins/security_solution/public/app/solution_navigation/links @elastic/security-threat-hunting-explore +/x-pack/plugins/security_solution/public/common/lib/clipboard @elastic/security-threat-hunting-explore +/x-pack/plugins/security_solution/public/common/components/visualization_actions @elastic/security-threat-hunting-explore +/x-pack/plugins/security_solution/public/common/components/accessibility @elastic/security-threat-hunting-explore +/x-pack/plugins/security_solution/public/common/components/first_last_seen/first_last_seen.tsx @elastic/security-threat-hunting-explore +/x-pack/plugins/security_solution/public/common/components/alert_count_by_status @elastic/security-threat-hunting-explore /x-pack/plugins/security_solution/public/common/components/guided_onboarding_tour @elastic/security-threat-hunting-explore /x-pack/plugins/security_solution/public/common/components/charts @elastic/security-threat-hunting-explore /x-pack/plugins/security_solution/public/detections/components/alerts_table/grouping_settings @elastic/security-threat-hunting-explore @@ -2251,7 +2286,10 @@ x-pack/test/security_solution_cypress/cypress/tasks/expandable_flyout @elastic/ /x-pack/plugins/security_solution/public/explore @elastic/security-threat-hunting-explore /x-pack/plugins/security_solution/public/overview @elastic/security-threat-hunting-explore /x-pack/plugins/security_solution/public/dashboards @elastic/security-threat-hunting-explore - +/x-pack/plugins/security_solution/public/onboarding @elastic/security-threat-hunting-explore +/x-pack/plugins/security_solution/public/common/components/empty_page @elastic/security-threat-hunting-explore +/x-pack/plugins/security_solution/public/common/components/empty_prompt @elastic/security-threat-hunting-explore +/x-pack/plugins/security_solution_serverless/public/components/dashboards_landing_callout @elastic/security-threat-hunting-explore /x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts @elastic/security-threat-hunting-explore /x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram @elastic/security-threat-hunting-explore /x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network @elastic/security-threat-hunting-explore @@ -2323,6 +2361,7 @@ x-pack/test/security_solution_cypress/cypress/tasks/expandable_flyout @elastic/ /x-pack/plugins/security_solution/public/detections/mitre @elastic/security-detection-rule-management /x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules @elastic/security-detection-rule-management /x-pack/plugins/security_solution/public/rules @elastic/security-detection-rule-management +/x-pack/plugins/security_solution/public/common/components/toolbar/bulk_actions @elastic/security-detection-rule-management /x-pack/plugins/security_solution/server/lib/detection_engine/fleet_integrations @elastic/security-detection-rule-management /x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules @elastic/security-detection-rule-management @@ -2345,6 +2384,8 @@ x-pack/test/security_solution_cypress/cypress/tasks/expandable_flyout @elastic/ /x-pack/test/functional/es_archives/entity/risks @elastic/security-detection-engine /x-pack/test/functional/es_archives/entity/host_risk @elastic/security-detection-engine /x-pack/test/api_integration/apis/lists @elastic/security-detection-engine +/x-pack/plugins/security_solution/public/value_list @elastic/security-detection-engine +/x-pack/plugins/security_solution/public/detections/components/value_lists_management_flyout @elastic/security-detection-engine /x-pack/plugins/security_solution/public/sourcerer @elastic/security-threat-hunting-investigations /x-pack/plugins/security_solution/public/detection_engine/rule_creation @elastic/security-detection-engine @@ -2400,6 +2441,8 @@ x-pack/packages/kbn-elastic-assistant-common/impl/schemas/defend_insights @elast x-pack/plugins/elastic_assistant/server/__mocks__/defend_insights_schema.mock.ts @elastic/security-defend-workflows x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/defend_insights @elastic/security-defend-workflows x-pack/plugins/elastic_assistant/server/routes/defend_insights @elastic/security-defend-workflows +/x-pack/plugins/security_solution/public/common/components/response_actions @elastic/security-defend-workflows +/x-pack/plugins/security_solution_serverless/public/upselling/pages/osquery_automated_response_actions.tsx @elastic/security-defend-workflows ## Security Solution sub teams - security-telemetry (Data Engineering) x-pack/plugins/security_solution/server/usage/ @elastic/security-data-analytics @@ -2419,6 +2462,9 @@ x-pack/plugins/security_solution/common/api/entity_analytics @elastic/security-e ## Security Solution sub teams - GenAI x-pack/test/security_solution_api_integration/test_suites/genai @elastic/security-generative-ai +## Security Solution sub teams - Automatic Import +x-pack/test/automatic_import_api_integration @elastic/security-scalability + # Security Defend Workflows - OSQuery Ownership /x-pack/test/osquery_cypress @elastic/security-defend-workflows /x-pack/plugins/osquery @elastic/security-defend-workflows diff --git a/.i18nrc.json b/.i18nrc.json index 5c7642e6283eb..38629974722f3 100644 --- a/.i18nrc.json +++ b/.i18nrc.json @@ -117,7 +117,7 @@ "searchTypes": "packages/kbn-search-types", "securitySolutionPackages": "x-pack/packages/security-solution", "serverlessPackages": "packages/serverless", - "sse": [ "packages/kbn-sse-utils" ], + "sse": ["packages/kbn-sse-utils"], "coloring": "packages/kbn-coloring/src", "languageDocumentation": "packages/kbn-language-documentation/src", "esql": "src/plugins/esql", @@ -154,7 +154,8 @@ "unifiedDataTable": "packages/kbn-unified-data-table", "unsavedChangesBadge": "packages/kbn-unsaved-changes-badge", "unsavedChangesPrompt": "packages/kbn-unsaved-changes-prompt", - "managedContentBadge": "packages/kbn-managed-content-badge" + "managedContentBadge": "packages/kbn-managed-content-badge", + "responseOpsRuleForm": "packages/response-ops/rule_form" }, "translations": [] } diff --git a/api_docs/actions.devdocs.json b/api_docs/actions.devdocs.json index d93ecea54b849..551623f07d054 100644 --- a/api_docs/actions.devdocs.json +++ b/api_docs/actions.devdocs.json @@ -3270,20 +3270,6 @@ "deprecated": false, "trackAdoption": false }, - { - "parentPluginId": "actions", - "id": "def-server.ActionTypeExecutorOptions.isEphemeral", - "type": "CompoundType", - "tags": [], - "label": "isEphemeral", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "x-pack/plugins/actions/server/types.ts", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "actions", "id": "def-server.ActionTypeExecutorOptions.taskInfo", @@ -3838,16 +3824,6 @@ "ExecuteOptions", "[]) => Promise<", "ExecutionResponse", - ">; ephemeralEnqueuedExecution: (options: ", - "ExecuteOptions", - ") => Promise<", - { - "pluginId": "taskManager", - "scope": "server", - "docId": "kibTaskManagerPluginApi", - "section": "def-server.RunNowResult", - "text": "RunNowResult" - }, ">; listTypes: ({ featureId, includeSystemActionTypes, }?: ", "ListTypesParams", ") => Promise<", diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index bfeda340dca15..44e6df0051c00 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions'] --- import actionsObj from './actions.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 | |-------------------|-----------|------------------------|-----------------| -| 322 | 0 | 316 | 37 | +| 321 | 0 | 315 | 37 | ## Client diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx index 3f6643551f4a4..d9b7684a21014 100644 --- a/api_docs/advanced_settings.mdx +++ b/api_docs/advanced_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings title: "advancedSettings" image: https://source.unsplash.com/400x175/?github description: API docs for the advancedSettings plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; diff --git a/api_docs/ai_assistant_management_selection.mdx b/api_docs/ai_assistant_management_selection.mdx index 31a5c7e8aacac..16b3d049774c3 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-12-02 +date: 2024-12-05 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 ccb88971fbc64..f08953a636c2f 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; diff --git a/api_docs/alerting.devdocs.json b/api_docs/alerting.devdocs.json index 1e5ae28cecb8d..3cf6f3f057d70 100644 --- a/api_docs/alerting.devdocs.json +++ b/api_docs/alerting.devdocs.json @@ -362,9 +362,9 @@ { "parentPluginId": "alerting", "id": "def-server.AlertingAuthorization.Unnamed.$1", - "type": "Object", + "type": "CompoundType", "tags": [], - "label": "{\n ruleTypeRegistry,\n request,\n authorization,\n features,\n getSpace,\n getSpaceId,\n }", + "label": "{\n ruleTypeRegistry,\n request,\n authorization,\n getSpaceId,\n allRegisteredConsumers,\n ruleTypesConsumersMap,\n }", "description": [], "signature": [ "ConstructorOptions" @@ -377,6 +377,50 @@ ], "returnComment": [] }, + { + "parentPluginId": "alerting", + "id": "def-server.AlertingAuthorization.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [ + "\nCreates an AlertingAuthorization object." + ], + "signature": [ + "({ request, features, getSpace, getSpaceId, authorization, ruleTypeRegistry, }: ", + "CreateOptions", + ") => Promise<", + { + "pluginId": "alerting", + "scope": "server", + "docId": "kibAlertingPluginApi", + "section": "def-server.AlertingAuthorization", + "text": "AlertingAuthorization" + }, + ">" + ], + "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "alerting", + "id": "def-server.AlertingAuthorization.create.$1", + "type": "Object", + "tags": [], + "label": "{\n request,\n features,\n getSpace,\n getSpaceId,\n authorization,\n ruleTypeRegistry,\n }", + "description": [], + "signature": [ + "CreateOptions" + ], + "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "alerting", "id": "def-server.AlertingAuthorization.getSpaceId", @@ -395,39 +439,15 @@ }, { "parentPluginId": "alerting", - "id": "def-server.AlertingAuthorization.getAugmentedRuleTypesWithAuthorization", + "id": "def-server.AlertingAuthorization.getAllAuthorizedRuleTypes", "type": "Function", "tags": [], - "label": "getAugmentedRuleTypesWithAuthorization", + "label": "getAllAuthorizedRuleTypes", "description": [], "signature": [ - "(featureIds: readonly string[], operations: (", - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.ReadOperations", - "text": "ReadOperations" - }, - " | ", - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.WriteOperations", - "text": "WriteOperations" - }, - ")[], authorizationEntity: ", - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.AlertingAuthorizationEntity", - "text": "AlertingAuthorizationEntity" - }, - ") => Promise<{ username?: string | undefined; hasAllRequested: boolean; authorizedRuleTypes: Set<", - "RegistryAlertTypeWithAuth", - ">; }>" + "(params: GetAllAuthorizedRuleTypes) => Promise<{ username?: string | undefined; hasAllRequested: boolean; authorizedRuleTypes: ", + "AuthorizedRuleTypes", + "; }>" ], "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", "deprecated": false, @@ -435,65 +455,13 @@ "children": [ { "parentPluginId": "alerting", - "id": "def-server.AlertingAuthorization.getAugmentedRuleTypesWithAuthorization.$1", + "id": "def-server.AlertingAuthorization.getAllAuthorizedRuleTypes.$1", "type": "Object", "tags": [], - "label": "featureIds", - "description": [], - "signature": [ - "readonly string[]" - ], - "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "alerting", - "id": "def-server.AlertingAuthorization.getAugmentedRuleTypesWithAuthorization.$2", - "type": "Array", - "tags": [], - "label": "operations", - "description": [], - "signature": [ - "(", - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.ReadOperations", - "text": "ReadOperations" - }, - " | ", - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.WriteOperations", - "text": "WriteOperations" - }, - ")[]" - ], - "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "alerting", - "id": "def-server.AlertingAuthorization.getAugmentedRuleTypesWithAuthorization.$3", - "type": "Enum", - "tags": [], - "label": "authorizationEntity", + "label": "params", "description": [], "signature": [ - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.AlertingAuthorizationEntity", - "text": "AlertingAuthorizationEntity" - } + "GetAllAuthorizedRuleTypes" ], "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", "deprecated": false, @@ -511,7 +479,7 @@ "label": "ensureAuthorized", "description": [], "signature": [ - "({ ruleTypeId, consumer: legacyConsumer, operation, entity, additionalPrivileges, }: ", + "({ ruleTypeId, consumer, operation, entity, additionalPrivileges, }: ", "EnsureAuthorizedOpts", ") => Promise" ], @@ -524,7 +492,7 @@ "id": "def-server.AlertingAuthorization.ensureAuthorized.$1", "type": "Object", "tags": [], - "label": "{\n ruleTypeId,\n consumer: legacyConsumer,\n operation,\n entity,\n additionalPrivileges = [],\n }", + "label": "{\n ruleTypeId,\n consumer,\n operation,\n entity,\n additionalPrivileges = [],\n }", "description": [], "signature": [ "EnsureAuthorizedOpts" @@ -545,17 +513,7 @@ "label": "getFindAuthorizationFilter", "description": [], "signature": [ - "(authorizationEntity: ", - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.AlertingAuthorizationEntity", - "text": "AlertingAuthorizationEntity" - }, - ", filterOpts: ", - "AlertingAuthorizationFilterOpts", - ", featuresIds?: Set | undefined) => Promise<{ filter?: ", + "(params: GetFindAuthorizationFilterParams) => Promise<{ filter?: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -580,76 +538,32 @@ { "parentPluginId": "alerting", "id": "def-server.AlertingAuthorization.getFindAuthorizationFilter.$1", - "type": "Enum", - "tags": [], - "label": "authorizationEntity", - "description": [], - "signature": [ - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.AlertingAuthorizationEntity", - "text": "AlertingAuthorizationEntity" - } - ], - "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "alerting", - "id": "def-server.AlertingAuthorization.getFindAuthorizationFilter.$2", "type": "Object", "tags": [], - "label": "filterOpts", + "label": "params", "description": [], "signature": [ - "AlertingAuthorizationFilterOpts" + "GetFindAuthorizationFilterParams" ], "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", "deprecated": false, "trackAdoption": false, "isRequired": true - }, - { - "parentPluginId": "alerting", - "id": "def-server.AlertingAuthorization.getFindAuthorizationFilter.$3", - "type": "Object", - "tags": [], - "label": "featuresIds", - "description": [], - "signature": [ - "Set | undefined" - ], - "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false } ], "returnComment": [] }, { "parentPluginId": "alerting", - "id": "def-server.AlertingAuthorization.getAuthorizedRuleTypes", + "id": "def-server.AlertingAuthorization.getAllAuthorizedRuleTypesFindOperation", "type": "Function", "tags": [], - "label": "getAuthorizedRuleTypes", + "label": "getAllAuthorizedRuleTypesFindOperation", "description": [], "signature": [ - "(authorizationEntity: ", - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.AlertingAuthorizationEntity", - "text": "AlertingAuthorizationEntity" - }, - ", featuresIds?: Set | undefined) => Promise<", - "RegistryAlertTypeWithAuth", - "[]>" + "(params: GetAllAuthorizedRuleTypesFindOperationParams) => Promise<", + "AuthorizedRuleTypes", + ">" ], "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", "deprecated": false, @@ -657,39 +571,18 @@ "children": [ { "parentPluginId": "alerting", - "id": "def-server.AlertingAuthorization.getAuthorizedRuleTypes.$1", - "type": "Enum", - "tags": [], - "label": "authorizationEntity", - "description": [], - "signature": [ - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.AlertingAuthorizationEntity", - "text": "AlertingAuthorizationEntity" - } - ], - "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "alerting", - "id": "def-server.AlertingAuthorization.getAuthorizedRuleTypes.$2", + "id": "def-server.AlertingAuthorization.getAllAuthorizedRuleTypesFindOperation.$1", "type": "Object", "tags": [], - "label": "featuresIds", + "label": "params", "description": [], "signature": [ - "Set | undefined" + "GetAllAuthorizedRuleTypesFindOperationParams" ], "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", "deprecated": false, "trackAdoption": false, - "isRequired": false + "isRequired": true } ], "returnComment": [] @@ -702,33 +595,7 @@ "label": "getAuthorizationFilter", "description": [], "signature": [ - "(authorizationEntity: ", - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.AlertingAuthorizationEntity", - "text": "AlertingAuthorizationEntity" - }, - ", filterOpts: ", - "AlertingAuthorizationFilterOpts", - ", operation: ", - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.ReadOperations", - "text": "ReadOperations" - }, - " | ", - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.WriteOperations", - "text": "WriteOperations" - }, - ", featuresIds?: Set | undefined) => Promise<{ filter?: ", + "(params: GetAuthorizationFilterParams) => Promise<{ filter?: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -753,123 +620,32 @@ { "parentPluginId": "alerting", "id": "def-server.AlertingAuthorization.getAuthorizationFilter.$1", - "type": "Enum", - "tags": [], - "label": "authorizationEntity", - "description": [], - "signature": [ - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.AlertingAuthorizationEntity", - "text": "AlertingAuthorizationEntity" - } - ], - "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "alerting", - "id": "def-server.AlertingAuthorization.getAuthorizationFilter.$2", "type": "Object", "tags": [], - "label": "filterOpts", - "description": [], - "signature": [ - "AlertingAuthorizationFilterOpts" - ], - "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "alerting", - "id": "def-server.AlertingAuthorization.getAuthorizationFilter.$3", - "type": "CompoundType", - "tags": [], - "label": "operation", + "label": "params", "description": [], "signature": [ - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.ReadOperations", - "text": "ReadOperations" - }, - " | ", - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.WriteOperations", - "text": "WriteOperations" - } + "GetAuthorizationFilterParams" ], "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", "deprecated": false, "trackAdoption": false, "isRequired": true - }, - { - "parentPluginId": "alerting", - "id": "def-server.AlertingAuthorization.getAuthorizationFilter.$4", - "type": "Object", - "tags": [], - "label": "featuresIds", - "description": [], - "signature": [ - "Set | undefined" - ], - "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false } ], "returnComment": [] }, { "parentPluginId": "alerting", - "id": "def-server.AlertingAuthorization.filterByRuleTypeAuthorization", + "id": "def-server.AlertingAuthorization.getAuthorizedRuleTypes", "type": "Function", "tags": [], - "label": "filterByRuleTypeAuthorization", + "label": "getAuthorizedRuleTypes", "description": [], "signature": [ - "(ruleTypes: Set<", - "RegistryRuleType", - ">, operations: (", - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.ReadOperations", - "text": "ReadOperations" - }, - " | ", - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.WriteOperations", - "text": "WriteOperations" - }, - ")[], authorizationEntity: ", - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.AlertingAuthorizationEntity", - "text": "AlertingAuthorizationEntity" - }, - ") => Promise>" + "(params: GetAuthorizedRuleTypesParams) => Promise<", + "AuthorizedRuleTypes", + ">" ], "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", "deprecated": false, @@ -877,67 +653,13 @@ "children": [ { "parentPluginId": "alerting", - "id": "def-server.AlertingAuthorization.filterByRuleTypeAuthorization.$1", + "id": "def-server.AlertingAuthorization.getAuthorizedRuleTypes.$1", "type": "Object", "tags": [], - "label": "ruleTypes", + "label": "params", "description": [], "signature": [ - "Set<", - "RegistryRuleType", - ">" - ], - "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "alerting", - "id": "def-server.AlertingAuthorization.filterByRuleTypeAuthorization.$2", - "type": "Array", - "tags": [], - "label": "operations", - "description": [], - "signature": [ - "(", - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.ReadOperations", - "text": "ReadOperations" - }, - " | ", - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.WriteOperations", - "text": "WriteOperations" - }, - ")[]" - ], - "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "alerting", - "id": "def-server.AlertingAuthorization.filterByRuleTypeAuthorization.$3", - "type": "Enum", - "tags": [], - "label": "authorizationEntity", - "description": [], - "signature": [ - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.AlertingAuthorizationEntity", - "text": "AlertingAuthorizationEntity" - } + "GetAuthorizedRuleTypesParams" ], "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", "deprecated": false, @@ -1590,14 +1312,15 @@ "label": "getRulesClient", "description": [], "signature": [ - "() => ", + "() => Promise<", { "pluginId": "alerting", "scope": "server", "docId": "kibAlertingPluginApi", "section": "def-server.RulesClient", "text": "RulesClient" - } + }, + ">" ], "path": "x-pack/plugins/alerting/server/types.ts", "deprecated": false, @@ -1663,7 +1386,7 @@ "label": "listTypes", "description": [], "signature": [ - "() => Set<", + "() => Map" ], @@ -1739,8 +1462,8 @@ "pluginId": "alerting", "scope": "server", "docId": "kibAlertingPluginApi", - "section": "def-server.PluginSetupContract", - "text": "PluginSetupContract" + "section": "def-server.AlertingServerSetup", + "text": "AlertingServerSetup" } ], "path": "x-pack/plugins/alerting/server/types.ts", @@ -1759,8 +1482,8 @@ "pluginId": "alerting", "scope": "server", "docId": "kibAlertingPluginApi", - "section": "def-server.PluginStartContract", - "text": "PluginStartContract" + "section": "def-server.AlertingServerStart", + "text": "AlertingServerStart" } ], "path": "x-pack/plugins/alerting/server/types.ts", @@ -1772,137 +1495,63 @@ }, { "parentPluginId": "alerting", - "id": "def-server.BulkOperationError", - "type": "Interface", - "tags": [], - "label": "BulkOperationError", - "description": [], - "path": "x-pack/plugins/alerting/server/rules_client/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "alerting", - "id": "def-server.BulkOperationError.message", - "type": "string", - "tags": [], - "label": "message", - "description": [], - "path": "x-pack/plugins/alerting/server/rules_client/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "alerting", - "id": "def-server.BulkOperationError.status", - "type": "number", - "tags": [], - "label": "status", - "description": [], - "signature": [ - "number | undefined" - ], - "path": "x-pack/plugins/alerting/server/rules_client/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "alerting", - "id": "def-server.BulkOperationError.rule", - "type": "Object", - "tags": [], - "label": "rule", - "description": [], - "signature": [ - "{ id: string; name: string; }" - ], - "path": "x-pack/plugins/alerting/server/rules_client/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "alerting", - "id": "def-server.ConnectorAdapter", + "id": "def-server.AlertingServerSetup", "type": "Interface", "tags": [], - "label": "ConnectorAdapter", + "label": "AlertingServerSetup", "description": [], - "signature": [ - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.ConnectorAdapter", - "text": "ConnectorAdapter" - }, - "" - ], - "path": "x-pack/plugins/alerting/server/connector_adapters/types.ts", + "path": "x-pack/plugins/alerting/server/plugin.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "alerting", - "id": "def-server.ConnectorAdapter.connectorTypeId", - "type": "string", + "id": "def-server.AlertingServerSetup.registerConnectorAdapter", + "type": "Function", "tags": [], - "label": "connectorTypeId", + "label": "registerConnectorAdapter", "description": [], - "path": "x-pack/plugins/alerting/server/connector_adapters/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "alerting", - "id": "def-server.ConnectorAdapter.ruleActionParamsSchema", - "type": "Object", - "tags": [], - "label": "ruleActionParamsSchema", - "description": [ - "\nThe schema of the action persisted\nin the rule. The schema will be validated\nwhen a rule is created or updated.\nThe schema should be backwards compatible\nand should never introduce any breaking\nchanges." - ], "signature": [ + "(adapter: ", { - "pluginId": "@kbn/config-schema", - "scope": "common", - "docId": "kibKbnConfigSchemaPluginApi", - "section": "def-common.ObjectType", - "text": "ObjectType" + "pluginId": "alerting", + "scope": "server", + "docId": "kibAlertingPluginApi", + "section": "def-server.ConnectorAdapter", + "text": "ConnectorAdapter" }, - "" - ], - "path": "x-pack/plugins/alerting/server/connector_adapters/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "alerting", - "id": "def-server.ConnectorAdapter.buildActionParams", - "type": "Function", - "tags": [], - "label": "buildActionParams", - "description": [], - "signature": [ - "(args: BuildActionParamsArgs) => ConnectorParams" + ") => void" ], - "path": "x-pack/plugins/alerting/server/connector_adapters/types.ts", + "path": "x-pack/plugins/alerting/server/plugin.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "alerting", - "id": "def-server.ConnectorAdapter.buildActionParams.$1", + "id": "def-server.AlertingServerSetup.registerConnectorAdapter.$1", "type": "Object", "tags": [], - "label": "args", + "label": "adapter", "description": [], "signature": [ - "BuildActionParamsArgs" + { + "pluginId": "alerting", + "scope": "server", + "docId": "kibAlertingPluginApi", + "section": "def-server.ConnectorAdapter", + "text": "ConnectorAdapter" + }, + "" ], - "path": "x-pack/plugins/alerting/server/connector_adapters/types.ts", + "path": "x-pack/plugins/alerting/server/plugin.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1912,81 +1561,120 @@ }, { "parentPluginId": "alerting", - "id": "def-server.ConnectorAdapter.getKibanaPrivileges", + "id": "def-server.AlertingServerSetup.registerType", "type": "Function", "tags": [], - "label": "getKibanaPrivileges", + "label": "registerType", "description": [], "signature": [ - "((args: { consumer: string; producer: string; }) => string[]) | undefined" + " = Record, InstanceContext extends { [x: string]: unknown; } = { [x: string]: unknown; }, ActionGroupIds extends string = never, RecoveryActionGroupId extends string = never, AlertData extends ", + { + "pluginId": "alerting", + "scope": "common", + "docId": "kibAlertingPluginApi", + "section": "def-common.RuleAlertData", + "text": "RuleAlertData" + }, + " = never>(ruleType: ", + { + "pluginId": "alerting", + "scope": "server", + "docId": "kibAlertingPluginApi", + "section": "def-server.RuleType", + "text": "RuleType" + }, + ") => void" ], - "path": "x-pack/plugins/alerting/server/connector_adapters/types.ts", + "path": "x-pack/plugins/alerting/server/plugin.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "alerting", - "id": "def-server.ConnectorAdapter.getKibanaPrivileges.$1", + "id": "def-server.AlertingServerSetup.registerType.$1", "type": "Object", "tags": [], - "label": "args", + "label": "ruleType", "description": [], - "path": "x-pack/plugins/alerting/server/connector_adapters/types.ts", + "signature": [ + { + "pluginId": "alerting", + "scope": "server", + "docId": "kibAlertingPluginApi", + "section": "def-server.RuleType", + "text": "RuleType" + }, + "" + ], + "path": "x-pack/plugins/alerting/server/plugin.ts", "deprecated": false, "trackAdoption": false, - "children": [ - { - "parentPluginId": "alerting", - "id": "def-server.ConnectorAdapter.getKibanaPrivileges.$1.consumer", - "type": "string", - "tags": [], - "label": "consumer", - "description": [], - "path": "x-pack/plugins/alerting/server/connector_adapters/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "alerting", - "id": "def-server.ConnectorAdapter.getKibanaPrivileges.$1.producer", - "type": "string", - "tags": [], - "label": "producer", - "description": [], - "path": "x-pack/plugins/alerting/server/connector_adapters/types.ts", - "deprecated": false, - "trackAdoption": false - } - ] + "isRequired": true } ], "returnComment": [] - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "alerting", - "id": "def-server.DataStreamAdapter", - "type": "Interface", - "tags": [], - "label": "DataStreamAdapter", - "description": [], - "path": "x-pack/plugins/alerting/server/alerts_service/lib/data_stream_adapter.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + }, { "parentPluginId": "alerting", - "id": "def-server.DataStreamAdapter.isUsingDataStreams", + "id": "def-server.AlertingServerSetup.getSecurityHealth", "type": "Function", "tags": [], - "label": "isUsingDataStreams", + "label": "getSecurityHealth", "description": [], "signature": [ - "() => boolean" + "() => Promise<", + "SecurityHealth", + ">" ], - "path": "x-pack/plugins/alerting/server/alerts_service/lib/data_stream_adapter.ts", + "path": "x-pack/plugins/alerting/server/plugin.ts", "deprecated": false, "trackAdoption": false, "children": [], @@ -1994,84 +1682,63 @@ }, { "parentPluginId": "alerting", - "id": "def-server.DataStreamAdapter.getIndexTemplateFields", + "id": "def-server.AlertingServerSetup.getConfig", "type": "Function", "tags": [], - "label": "getIndexTemplateFields", + "label": "getConfig", "description": [], "signature": [ - "(alias: string, pattern: string) => ", - "IndexTemplateFields" - ], - "path": "x-pack/plugins/alerting/server/alerts_service/lib/data_stream_adapter.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "alerting", - "id": "def-server.DataStreamAdapter.getIndexTemplateFields.$1", - "type": "string", - "tags": [], - "label": "alias", - "description": [], - "signature": [ - "string" - ], - "path": "x-pack/plugins/alerting/server/alerts_service/lib/data_stream_adapter.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, + "() => ", { - "parentPluginId": "alerting", - "id": "def-server.DataStreamAdapter.getIndexTemplateFields.$2", - "type": "string", - "tags": [], - "label": "pattern", - "description": [], - "signature": [ - "string" - ], - "path": "x-pack/plugins/alerting/server/alerts_service/lib/data_stream_adapter.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "pluginId": "alerting", + "scope": "server", + "docId": "kibAlertingPluginApi", + "section": "def-server.AlertingRulesConfig", + "text": "AlertingRulesConfig" } ], + "path": "x-pack/plugins/alerting/server/plugin.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], "returnComment": [] }, { "parentPluginId": "alerting", - "id": "def-server.DataStreamAdapter.createStream", - "type": "Function", + "id": "def-server.AlertingServerSetup.frameworkAlerts", + "type": "CompoundType", "tags": [], - "label": "createStream", + "label": "frameworkAlerts", "description": [], "signature": [ - "(opts: ", - "CreateConcreteWriteIndexOpts", - ") => Promise" + "PublicAlertsService", + " & { enabled: () => boolean; }" ], - "path": "x-pack/plugins/alerting/server/alerts_service/lib/data_stream_adapter.ts", + "path": "x-pack/plugins/alerting/server/plugin.ts", "deprecated": false, - "trackAdoption": false, - "children": [ + "trackAdoption": false + }, + { + "parentPluginId": "alerting", + "id": "def-server.AlertingServerSetup.getDataStreamAdapter", + "type": "Function", + "tags": [], + "label": "getDataStreamAdapter", + "description": [], + "signature": [ + "() => ", { - "parentPluginId": "alerting", - "id": "def-server.DataStreamAdapter.createStream.$1", - "type": "Object", - "tags": [], - "label": "opts", - "description": [], - "signature": [ - "CreateConcreteWriteIndexOpts" - ], - "path": "x-pack/plugins/alerting/server/alerts_service/lib/data_stream_adapter.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true + "pluginId": "alerting", + "scope": "server", + "docId": "kibAlertingPluginApi", + "section": "def-server.DataStreamAdapter", + "text": "DataStreamAdapter" } ], + "path": "x-pack/plugins/alerting/server/plugin.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], "returnComment": [] } ], @@ -2079,373 +1746,590 @@ }, { "parentPluginId": "alerting", - "id": "def-server.FindResult", + "id": "def-server.AlertingServerStart", "type": "Interface", "tags": [], - "label": "FindResult", + "label": "AlertingServerStart", "description": [], - "signature": [ - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.FindResult", - "text": "FindResult" - }, - "" - ], - "path": "x-pack/plugins/alerting/server/application/rule/methods/find/find_rules.ts", + "path": "x-pack/plugins/alerting/server/plugin.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "alerting", - "id": "def-server.FindResult.page", - "type": "number", - "tags": [], - "label": "page", - "description": [], - "path": "x-pack/plugins/alerting/server/application/rule/methods/find/find_rules.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "alerting", - "id": "def-server.FindResult.perPage", - "type": "number", + "id": "def-server.AlertingServerStart.listTypes", + "type": "Function", "tags": [], - "label": "perPage", + "label": "listTypes", "description": [], - "path": "x-pack/plugins/alerting/server/application/rule/methods/find/find_rules.ts", + "signature": [ + "() => Map" + ], + "path": "x-pack/plugins/alerting/server/plugin.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "returnComment": [], + "children": [] }, { "parentPluginId": "alerting", - "id": "def-server.FindResult.total", - "type": "number", + "id": "def-server.AlertingServerStart.getAllTypes", + "type": "Function", "tags": [], - "label": "total", + "label": "getAllTypes", "description": [], - "path": "x-pack/plugins/alerting/server/application/rule/methods/find/find_rules.ts", + "signature": [ + "() => string[]" + ], + "path": "x-pack/plugins/alerting/server/plugin.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "returnComment": [], + "children": [] }, { "parentPluginId": "alerting", - "id": "def-server.FindResult.data", - "type": "Array", + "id": "def-server.AlertingServerStart.getType", + "type": "Function", "tags": [], - "label": "data", + "label": "getType", "description": [], "signature": [ + "[]" - ], - "path": "x-pack/plugins/alerting/server/application/rule/methods/find/find_rules.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "alerting", - "id": "def-server.GetViewInAppRelativeUrlFnOpts", - "type": "Interface", - "tags": [], - "label": "GetViewInAppRelativeUrlFnOpts", - "description": [], - "signature": [ - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.GetViewInAppRelativeUrlFnOpts", - "text": "GetViewInAppRelativeUrlFnOpts" - }, - "" - ], - "path": "x-pack/plugins/alerting/server/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "alerting", - "id": "def-server.GetViewInAppRelativeUrlFnOpts.rule", - "type": "CompoundType", - "tags": [], - "label": "rule", - "description": [], - "signature": [ - "Pick<", + " = ", { "pluginId": "@kbn/alerting-types", "scope": "common", "docId": "kibKbnAlertingTypesPluginApi", - "section": "def-common.SanitizedRule", - "text": "SanitizedRule" + "section": "def-common.RuleTypeParams", + "text": "RuleTypeParams" }, - ", \"id\"> & Omit>, \"viewInAppRelativeUrl\">" + " = ", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.RuleTypeParams", + "text": "RuleTypeParams" + }, + ", State extends ", + { + "pluginId": "alerting", + "scope": "common", + "docId": "kibAlertingPluginApi", + "section": "def-common.RuleTypeState", + "text": "RuleTypeState" + }, + " = ", + { + "pluginId": "alerting", + "scope": "common", + "docId": "kibAlertingPluginApi", + "section": "def-common.RuleTypeState", + "text": "RuleTypeState" + }, + ", InstanceState extends Record = Record, InstanceContext extends { [x: string]: unknown; } = { [x: string]: unknown; }, ActionGroupIds extends string = string, RecoveryActionGroupId extends string = string, AlertData extends ", + { + "pluginId": "alerting", + "scope": "common", + "docId": "kibAlertingPluginApi", + "section": "def-common.RuleAlertData", + "text": "RuleAlertData" + }, + " = ", + { + "pluginId": "alerting", + "scope": "common", + "docId": "kibAlertingPluginApi", + "section": "def-common.RuleAlertData", + "text": "RuleAlertData" + }, + ">(id: string) => ", + "NormalizedRuleType", + "" ], - "path": "x-pack/plugins/alerting/server/types.ts", + "path": "x-pack/plugins/alerting/server/plugin.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "alerting", + "id": "def-server.AlertingServerStart.getType.$1", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "x-pack/plugins/alerting/server/rule_type_registry.ts", + "deprecated": false, + "trackAdoption": false + } + ] }, { "parentPluginId": "alerting", - "id": "def-server.GetViewInAppRelativeUrlFnOpts.start", - "type": "number", + "id": "def-server.AlertingServerStart.getAlertIndicesAlias", + "type": "Function", "tags": [], - "label": "start", + "label": "getAlertIndicesAlias", "description": [], "signature": [ - "number | undefined" + "(rulesTypes: string[], spaceId?: string | undefined) => string[]" ], - "path": "x-pack/plugins/alerting/server/types.ts", + "path": "x-pack/plugins/alerting/server/plugin.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "alerting", + "id": "def-server.AlertingServerStart.getAlertIndicesAlias.$1", + "type": "Array", + "tags": [], + "label": "rulesTypes", + "description": [], + "signature": [ + "string[]" + ], + "path": "x-pack/plugins/alerting/server/lib/create_get_alert_indices_alias.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "alerting", + "id": "def-server.AlertingServerStart.getAlertIndicesAlias.$2", + "type": "string", + "tags": [], + "label": "spaceId", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/alerting/server/lib/create_get_alert_indices_alias.ts", + "deprecated": false, + "trackAdoption": false + } + ] }, { "parentPluginId": "alerting", - "id": "def-server.GetViewInAppRelativeUrlFnOpts.end", - "type": "number", + "id": "def-server.AlertingServerStart.getRulesClientWithRequest", + "type": "Function", "tags": [], - "label": "end", + "label": "getRulesClientWithRequest", "description": [], "signature": [ - "number | undefined" + "(request: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + ") => Promise<", + "RulesClientApi", + ">" ], - "path": "x-pack/plugins/alerting/server/types.ts", + "path": "x-pack/plugins/alerting/server/plugin.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "children": [ + { + "parentPluginId": "alerting", + "id": "def-server.AlertingServerStart.getRulesClientWithRequest.$1", + "type": "Object", + "tags": [], + "label": "request", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "path": "x-pack/plugins/alerting/server/plugin.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "alerting", + "id": "def-server.AlertingServerStart.getAlertingAuthorizationWithRequest", + "type": "Function", + "tags": [], + "label": "getAlertingAuthorizationWithRequest", + "description": [], + "signature": [ + "(request: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + ") => Promise<", + { + "pluginId": "@kbn/utility-types", + "scope": "common", + "docId": "kibKbnUtilityTypesPluginApi", + "section": "def-common.PublicMethodsOf", + "text": "PublicMethodsOf" + }, + "<", + { + "pluginId": "alerting", + "scope": "server", + "docId": "kibAlertingPluginApi", + "section": "def-server.AlertingAuthorization", + "text": "AlertingAuthorization" + }, + ">>" + ], + "path": "x-pack/plugins/alerting/server/plugin.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "alerting", + "id": "def-server.AlertingServerStart.getAlertingAuthorizationWithRequest.$1", + "type": "Object", + "tags": [], + "label": "request", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "path": "x-pack/plugins/alerting/server/plugin.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "alerting", + "id": "def-server.AlertingServerStart.getFrameworkHealth", + "type": "Function", + "tags": [], + "label": "getFrameworkHealth", + "description": [], + "signature": [ + "() => Promise<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.AlertsHealth", + "text": "AlertsHealth" + }, + ">" + ], + "path": "x-pack/plugins/alerting/server/plugin.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] } ], "initialIsOpen": false }, { "parentPluginId": "alerting", - "id": "def-server.IRuleTypeAlerts", + "id": "def-server.BulkOperationError", "type": "Interface", "tags": [], - "label": "IRuleTypeAlerts", + "label": "BulkOperationError", "description": [], - "signature": [ - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.IRuleTypeAlerts", - "text": "IRuleTypeAlerts" - }, - "" - ], - "path": "x-pack/plugins/alerting/server/types.ts", + "path": "x-pack/plugins/alerting/server/rules_client/types.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "alerting", - "id": "def-server.IRuleTypeAlerts.context", + "id": "def-server.BulkOperationError.message", "type": "string", "tags": [], - "label": "context", - "description": [ - "\nSpecifies the target alerts-as-data resource\nfor this rule type. All alerts created with the same\ncontext are written to the same alerts-as-data index.\n\nAll custom mappings defined for a context must be the same!" - ], - "path": "x-pack/plugins/alerting/server/types.ts", + "label": "message", + "description": [], + "path": "x-pack/plugins/alerting/server/rules_client/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "alerting", - "id": "def-server.IRuleTypeAlerts.mappings", - "type": "Object", + "id": "def-server.BulkOperationError.status", + "type": "number", "tags": [], - "label": "mappings", - "description": [ - "\nSpecifies custom mappings for the target alerts-as-data\nindex. These mappings will be translated into a component template\nand used in the index template for the index." - ], + "label": "status", + "description": [], "signature": [ - "ComponentTemplateSpec" + "number | undefined" ], - "path": "x-pack/plugins/alerting/server/types.ts", + "path": "x-pack/plugins/alerting/server/rules_client/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "alerting", - "id": "def-server.IRuleTypeAlerts.shouldWrite", - "type": "CompoundType", + "id": "def-server.BulkOperationError.rule", + "type": "Object", "tags": [], - "label": "shouldWrite", - "description": [ - "\nOptional flag to opt into writing alerts as data. When not specified\ndefaults to false. We need this because we needed all previous rule\nregistry rules to register with the framework in order to install\nElasticsearch assets but we don't want to migrate them to using\nthe framework for writing alerts as data until all the pieces are ready" - ], + "label": "rule", + "description": [], "signature": [ - "boolean | undefined" + "{ id: string; name: string; }" ], - "path": "x-pack/plugins/alerting/server/types.ts", + "path": "x-pack/plugins/alerting/server/rules_client/types.ts", "deprecated": false, "trackAdoption": false - }, + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "alerting", + "id": "def-server.ConnectorAdapter", + "type": "Interface", + "tags": [], + "label": "ConnectorAdapter", + "description": [], + "signature": [ { - "parentPluginId": "alerting", - "id": "def-server.IRuleTypeAlerts.useEcs", - "type": "CompoundType", - "tags": [], - "label": "useEcs", - "description": [ - "\nOptional flag to include a reference to the ECS component template." - ], - "signature": [ - "boolean | undefined" - ], - "path": "x-pack/plugins/alerting/server/types.ts", - "deprecated": false, - "trackAdoption": false + "pluginId": "alerting", + "scope": "server", + "docId": "kibAlertingPluginApi", + "section": "def-server.ConnectorAdapter", + "text": "ConnectorAdapter" }, + "" + ], + "path": "x-pack/plugins/alerting/server/connector_adapters/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "alerting", - "id": "def-server.IRuleTypeAlerts.useLegacyAlerts", - "type": "CompoundType", + "id": "def-server.ConnectorAdapter.connectorTypeId", + "type": "string", "tags": [], - "label": "useLegacyAlerts", - "description": [ - "\nOptional flag to include a reference to the legacy alert component template.\nAny rule type that is migrating from the rule registry should set this\nflag to true to ensure their alerts-as-data indices are backwards compatible." - ], - "signature": [ - "boolean | undefined" - ], - "path": "x-pack/plugins/alerting/server/types.ts", + "label": "connectorTypeId", + "description": [], + "path": "x-pack/plugins/alerting/server/connector_adapters/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "alerting", - "id": "def-server.IRuleTypeAlerts.isSpaceAware", - "type": "CompoundType", + "id": "def-server.ConnectorAdapter.ruleActionParamsSchema", + "type": "Object", "tags": [], - "label": "isSpaceAware", + "label": "ruleActionParamsSchema", "description": [ - "\nOptional flag to indicate that resources should be space-aware. When set to\ntrue, alerts-as-data resources will be created for every space where a rule\nof this type runs." + "\nThe schema of the action persisted\nin the rule. The schema will be validated\nwhen a rule is created or updated.\nThe schema should be backwards compatible\nand should never introduce any breaking\nchanges." ], "signature": [ - "boolean | undefined" + { + "pluginId": "@kbn/config-schema", + "scope": "common", + "docId": "kibKbnConfigSchemaPluginApi", + "section": "def-common.ObjectType", + "text": "ObjectType" + }, + "" ], - "path": "x-pack/plugins/alerting/server/types.ts", + "path": "x-pack/plugins/alerting/server/connector_adapters/types.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "alerting", - "id": "def-server.IRuleTypeAlerts.secondaryAlias", - "type": "string", + "id": "def-server.ConnectorAdapter.buildActionParams", + "type": "Function", "tags": [], - "label": "secondaryAlias", - "description": [ - "\nOptional secondary alias to use. This alias should not include the namespace." - ], + "label": "buildActionParams", + "description": [], "signature": [ - "string | undefined" + "(args: BuildActionParamsArgs) => ConnectorParams" ], - "path": "x-pack/plugins/alerting/server/types.ts", + "path": "x-pack/plugins/alerting/server/connector_adapters/types.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "children": [ + { + "parentPluginId": "alerting", + "id": "def-server.ConnectorAdapter.buildActionParams.$1", + "type": "Object", + "tags": [], + "label": "args", + "description": [], + "signature": [ + "BuildActionParamsArgs" + ], + "path": "x-pack/plugins/alerting/server/connector_adapters/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] }, { "parentPluginId": "alerting", - "id": "def-server.IRuleTypeAlerts.formatAlert", + "id": "def-server.ConnectorAdapter.getKibanaPrivileges", "type": "Function", "tags": [], - "label": "formatAlert", - "description": [ - "\nOptional function to format each alert in summarizedAlerts right after fetching them." - ], + "label": "getKibanaPrivileges", + "description": [], "signature": [ - "FormatAlert", - " | undefined" + "((args: { consumer: string; producer: string; }) => string[]) | undefined" ], - "path": "x-pack/plugins/alerting/server/types.ts", + "path": "x-pack/plugins/alerting/server/connector_adapters/types.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "children": [ + { + "parentPluginId": "alerting", + "id": "def-server.ConnectorAdapter.getKibanaPrivileges.$1", + "type": "Object", + "tags": [], + "label": "args", + "description": [], + "path": "x-pack/plugins/alerting/server/connector_adapters/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "alerting", + "id": "def-server.ConnectorAdapter.getKibanaPrivileges.$1.consumer", + "type": "string", + "tags": [], + "label": "consumer", + "description": [], + "path": "x-pack/plugins/alerting/server/connector_adapters/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "alerting", + "id": "def-server.ConnectorAdapter.getKibanaPrivileges.$1.producer", + "type": "string", + "tags": [], + "label": "producer", + "description": [], + "path": "x-pack/plugins/alerting/server/connector_adapters/types.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [] } ], "initialIsOpen": false }, { "parentPluginId": "alerting", - "id": "def-server.PluginSetupContract", + "id": "def-server.DataStreamAdapter", "type": "Interface", "tags": [], - "label": "PluginSetupContract", + "label": "DataStreamAdapter", "description": [], - "path": "x-pack/plugins/alerting/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/alerts_service/lib/data_stream_adapter.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "alerting", - "id": "def-server.PluginSetupContract.registerConnectorAdapter", + "id": "def-server.DataStreamAdapter.isUsingDataStreams", "type": "Function", "tags": [], - "label": "registerConnectorAdapter", + "label": "isUsingDataStreams", "description": [], "signature": [ - "(adapter: ", - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.ConnectorAdapter", - "text": "ConnectorAdapter" - }, - ") => void" + "() => boolean" ], - "path": "x-pack/plugins/alerting/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/alerts_service/lib/data_stream_adapter.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "alerting", + "id": "def-server.DataStreamAdapter.getIndexTemplateFields", + "type": "Function", + "tags": [], + "label": "getIndexTemplateFields", + "description": [], + "signature": [ + "(alias: string, pattern: string) => ", + "IndexTemplateFields" + ], + "path": "x-pack/plugins/alerting/server/alerts_service/lib/data_stream_adapter.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "alerting", - "id": "def-server.PluginSetupContract.registerConnectorAdapter.$1", - "type": "Object", + "id": "def-server.DataStreamAdapter.getIndexTemplateFields.$1", + "type": "string", "tags": [], - "label": "adapter", + "label": "alias", "description": [], "signature": [ - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.ConnectorAdapter", - "text": "ConnectorAdapter" - }, - "" + "string" ], - "path": "x-pack/plugins/alerting/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/alerts_service/lib/data_stream_adapter.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "alerting", + "id": "def-server.DataStreamAdapter.getIndexTemplateFields.$2", + "type": "string", + "tags": [], + "label": "pattern", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/plugins/alerting/server/alerts_service/lib/data_stream_adapter.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2455,507 +2339,347 @@ }, { "parentPluginId": "alerting", - "id": "def-server.PluginSetupContract.registerType", + "id": "def-server.DataStreamAdapter.createStream", "type": "Function", "tags": [], - "label": "registerType", + "label": "createStream", "description": [], "signature": [ - " = Record, InstanceContext extends { [x: string]: unknown; } = { [x: string]: unknown; }, ActionGroupIds extends string = never, RecoveryActionGroupId extends string = never, AlertData extends ", - { - "pluginId": "alerting", - "scope": "common", - "docId": "kibAlertingPluginApi", - "section": "def-common.RuleAlertData", - "text": "RuleAlertData" - }, - " = never>(ruleType: ", - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.RuleType", - "text": "RuleType" - }, - ") => void" + "(opts: ", + "CreateConcreteWriteIndexOpts", + ") => Promise" ], - "path": "x-pack/plugins/alerting/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/alerts_service/lib/data_stream_adapter.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "alerting", - "id": "def-server.PluginSetupContract.registerType.$1", + "id": "def-server.DataStreamAdapter.createStream.$1", "type": "Object", "tags": [], - "label": "ruleType", + "label": "opts", "description": [], "signature": [ - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.RuleType", - "text": "RuleType" - }, - "" + "CreateConcreteWriteIndexOpts" ], - "path": "x-pack/plugins/alerting/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/alerts_service/lib/data_stream_adapter.ts", "deprecated": false, "trackAdoption": false, "isRequired": true } ], "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "alerting", + "id": "def-server.FindResult", + "type": "Interface", + "tags": [], + "label": "FindResult", + "description": [], + "signature": [ + { + "pluginId": "alerting", + "scope": "server", + "docId": "kibAlertingPluginApi", + "section": "def-server.FindResult", + "text": "FindResult" }, + "" + ], + "path": "x-pack/plugins/alerting/server/application/rule/methods/find/find_rules.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "alerting", - "id": "def-server.PluginSetupContract.getSecurityHealth", - "type": "Function", + "id": "def-server.FindResult.page", + "type": "number", "tags": [], - "label": "getSecurityHealth", + "label": "page", "description": [], - "signature": [ - "() => Promise<", - "SecurityHealth", - ">" - ], - "path": "x-pack/plugins/alerting/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/application/rule/methods/find/find_rules.ts", "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] + "trackAdoption": false }, { "parentPluginId": "alerting", - "id": "def-server.PluginSetupContract.getConfig", - "type": "Function", + "id": "def-server.FindResult.perPage", + "type": "number", "tags": [], - "label": "getConfig", + "label": "perPage", "description": [], - "signature": [ - "() => ", - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.AlertingRulesConfig", - "text": "AlertingRulesConfig" - } - ], - "path": "x-pack/plugins/alerting/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/application/rule/methods/find/find_rules.ts", "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] + "trackAdoption": false }, { "parentPluginId": "alerting", - "id": "def-server.PluginSetupContract.frameworkAlerts", - "type": "CompoundType", + "id": "def-server.FindResult.total", + "type": "number", "tags": [], - "label": "frameworkAlerts", + "label": "total", "description": [], - "signature": [ - "PublicAlertsService", - " & { enabled: () => boolean; }" - ], - "path": "x-pack/plugins/alerting/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/application/rule/methods/find/find_rules.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "alerting", - "id": "def-server.PluginSetupContract.getDataStreamAdapter", - "type": "Function", + "id": "def-server.FindResult.data", + "type": "Array", "tags": [], - "label": "getDataStreamAdapter", + "label": "data", "description": [], "signature": [ - "() => ", { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.DataStreamAdapter", - "text": "DataStreamAdapter" - } + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.SanitizedRule", + "text": "SanitizedRule" + }, + "[]" ], - "path": "x-pack/plugins/alerting/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/application/rule/methods/find/find_rules.ts", "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] + "trackAdoption": false } ], "initialIsOpen": false }, { "parentPluginId": "alerting", - "id": "def-server.PluginStartContract", + "id": "def-server.GetViewInAppRelativeUrlFnOpts", "type": "Interface", "tags": [], - "label": "PluginStartContract", + "label": "GetViewInAppRelativeUrlFnOpts", "description": [], - "path": "x-pack/plugins/alerting/server/plugin.ts", + "signature": [ + { + "pluginId": "alerting", + "scope": "server", + "docId": "kibAlertingPluginApi", + "section": "def-server.GetViewInAppRelativeUrlFnOpts", + "text": "GetViewInAppRelativeUrlFnOpts" + }, + "" + ], + "path": "x-pack/plugins/alerting/server/types.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "alerting", - "id": "def-server.PluginStartContract.listTypes", - "type": "Function", + "id": "def-server.GetViewInAppRelativeUrlFnOpts.rule", + "type": "CompoundType", "tags": [], - "label": "listTypes", + "label": "rule", "description": [], "signature": [ - "() => Set<", - "RegistryRuleType", - ">" + "Pick<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.SanitizedRule", + "text": "SanitizedRule" + }, + ", \"id\"> & Omit>, \"viewInAppRelativeUrl\">" ], - "path": "x-pack/plugins/alerting/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [] + "trackAdoption": false }, { "parentPluginId": "alerting", - "id": "def-server.PluginStartContract.getAllTypes", - "type": "Function", + "id": "def-server.GetViewInAppRelativeUrlFnOpts.start", + "type": "number", "tags": [], - "label": "getAllTypes", + "label": "start", "description": [], "signature": [ - "() => string[]" + "number | undefined" ], - "path": "x-pack/plugins/alerting/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [] + "trackAdoption": false }, { "parentPluginId": "alerting", - "id": "def-server.PluginStartContract.getType", - "type": "Function", + "id": "def-server.GetViewInAppRelativeUrlFnOpts.end", + "type": "number", "tags": [], - "label": "getType", + "label": "end", "description": [], "signature": [ - " = Record, InstanceContext extends { [x: string]: unknown; } = { [x: string]: unknown; }, ActionGroupIds extends string = string, RecoveryActionGroupId extends string = string, AlertData extends ", - { - "pluginId": "alerting", - "scope": "common", - "docId": "kibAlertingPluginApi", - "section": "def-common.RuleAlertData", - "text": "RuleAlertData" - }, - " = ", - { - "pluginId": "alerting", - "scope": "common", - "docId": "kibAlertingPluginApi", - "section": "def-common.RuleAlertData", - "text": "RuleAlertData" - }, - ">(id: string) => ", - "NormalizedRuleType", - "" + "number | undefined" + ], + "path": "x-pack/plugins/alerting/server/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "alerting", + "id": "def-server.IRuleTypeAlerts", + "type": "Interface", + "tags": [], + "label": "IRuleTypeAlerts", + "description": [], + "signature": [ + { + "pluginId": "alerting", + "scope": "server", + "docId": "kibAlertingPluginApi", + "section": "def-server.IRuleTypeAlerts", + "text": "IRuleTypeAlerts" + }, + "" + ], + "path": "x-pack/plugins/alerting/server/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "alerting", + "id": "def-server.IRuleTypeAlerts.context", + "type": "string", + "tags": [], + "label": "context", + "description": [ + "\nSpecifies the target alerts-as-data resource\nfor this rule type. All alerts created with the same\ncontext are written to the same alerts-as-data index.\n\nAll custom mappings defined for a context must be the same!" ], - "path": "x-pack/plugins/alerting/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "alerting", - "id": "def-server.PluginStartContract.getType.$1", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "path": "x-pack/plugins/alerting/server/rule_type_registry.ts", - "deprecated": false, - "trackAdoption": false - } - ] + "trackAdoption": false }, { "parentPluginId": "alerting", - "id": "def-server.PluginStartContract.getAlertIndicesAlias", - "type": "Function", + "id": "def-server.IRuleTypeAlerts.mappings", + "type": "Object", "tags": [], - "label": "getAlertIndicesAlias", - "description": [], + "label": "mappings", + "description": [ + "\nSpecifies custom mappings for the target alerts-as-data\nindex. These mappings will be translated into a component template\nand used in the index template for the index." + ], "signature": [ - "(rulesTypes: string[], spaceId?: string | undefined) => string[]" + "ComponentTemplateSpec" ], - "path": "x-pack/plugins/alerting/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "alerting", - "id": "def-server.PluginStartContract.getAlertIndicesAlias.$1", - "type": "Array", - "tags": [], - "label": "rulesTypes", - "description": [], - "signature": [ - "string[]" - ], - "path": "x-pack/plugins/alerting/server/lib/create_get_alert_indices_alias.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "alerting", - "id": "def-server.PluginStartContract.getAlertIndicesAlias.$2", - "type": "string", - "tags": [], - "label": "spaceId", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "x-pack/plugins/alerting/server/lib/create_get_alert_indices_alias.ts", - "deprecated": false, - "trackAdoption": false - } - ] + "trackAdoption": false }, { "parentPluginId": "alerting", - "id": "def-server.PluginStartContract.getRulesClientWithRequest", - "type": "Function", + "id": "def-server.IRuleTypeAlerts.shouldWrite", + "type": "CompoundType", "tags": [], - "label": "getRulesClientWithRequest", - "description": [], + "label": "shouldWrite", + "description": [ + "\nOptional flag to opt into writing alerts as data. When not specified\ndefaults to false. We need this because we needed all previous rule\nregistry rules to register with the framework in order to install\nElasticsearch assets but we don't want to migrate them to using\nthe framework for writing alerts as data until all the pieces are ready" + ], "signature": [ - "(request: ", - { - "pluginId": "@kbn/core-http-server", - "scope": "server", - "docId": "kibKbnCoreHttpServerPluginApi", - "section": "def-server.KibanaRequest", - "text": "KibanaRequest" - }, - ") => ", - "RulesClientApi" + "boolean | undefined" ], - "path": "x-pack/plugins/alerting/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "alerting", - "id": "def-server.PluginStartContract.getRulesClientWithRequest.$1", - "type": "Object", - "tags": [], - "label": "request", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-server", - "scope": "server", - "docId": "kibKbnCoreHttpServerPluginApi", - "section": "def-server.KibanaRequest", - "text": "KibanaRequest" - }, - "" - ], - "path": "x-pack/plugins/alerting/server/plugin.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } + "trackAdoption": false + }, + { + "parentPluginId": "alerting", + "id": "def-server.IRuleTypeAlerts.useEcs", + "type": "CompoundType", + "tags": [], + "label": "useEcs", + "description": [ + "\nOptional flag to include a reference to the ECS component template." ], - "returnComment": [] + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/alerting/server/types.ts", + "deprecated": false, + "trackAdoption": false }, { "parentPluginId": "alerting", - "id": "def-server.PluginStartContract.getAlertingAuthorizationWithRequest", - "type": "Function", + "id": "def-server.IRuleTypeAlerts.useLegacyAlerts", + "type": "CompoundType", "tags": [], - "label": "getAlertingAuthorizationWithRequest", - "description": [], + "label": "useLegacyAlerts", + "description": [ + "\nOptional flag to include a reference to the legacy alert component template.\nAny rule type that is migrating from the rule registry should set this\nflag to true to ensure their alerts-as-data indices are backwards compatible." + ], "signature": [ - "(request: ", - { - "pluginId": "@kbn/core-http-server", - "scope": "server", - "docId": "kibKbnCoreHttpServerPluginApi", - "section": "def-server.KibanaRequest", - "text": "KibanaRequest" - }, - ") => ", - { - "pluginId": "@kbn/utility-types", - "scope": "common", - "docId": "kibKbnUtilityTypesPluginApi", - "section": "def-common.PublicMethodsOf", - "text": "PublicMethodsOf" - }, - "<", - { - "pluginId": "alerting", - "scope": "server", - "docId": "kibAlertingPluginApi", - "section": "def-server.AlertingAuthorization", - "text": "AlertingAuthorization" - }, - ">" + "boolean | undefined" ], - "path": "x-pack/plugins/alerting/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "alerting", - "id": "def-server.PluginStartContract.getAlertingAuthorizationWithRequest.$1", - "type": "Object", - "tags": [], - "label": "request", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-server", - "scope": "server", - "docId": "kibKbnCoreHttpServerPluginApi", - "section": "def-server.KibanaRequest", - "text": "KibanaRequest" - }, - "" - ], - "path": "x-pack/plugins/alerting/server/plugin.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } + "trackAdoption": false + }, + { + "parentPluginId": "alerting", + "id": "def-server.IRuleTypeAlerts.isSpaceAware", + "type": "CompoundType", + "tags": [], + "label": "isSpaceAware", + "description": [ + "\nOptional flag to indicate that resources should be space-aware. When set to\ntrue, alerts-as-data resources will be created for every space where a rule\nof this type runs." ], - "returnComment": [] + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/alerting/server/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "alerting", + "id": "def-server.IRuleTypeAlerts.secondaryAlias", + "type": "string", + "tags": [], + "label": "secondaryAlias", + "description": [ + "\nOptional secondary alias to use. This alias should not include the namespace." + ], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/alerting/server/types.ts", + "deprecated": false, + "trackAdoption": false }, { "parentPluginId": "alerting", - "id": "def-server.PluginStartContract.getFrameworkHealth", + "id": "def-server.IRuleTypeAlerts.formatAlert", "type": "Function", "tags": [], - "label": "getFrameworkHealth", - "description": [], + "label": "formatAlert", + "description": [ + "\nOptional function to format each alert in summarizedAlerts right after fetching them." + ], "signature": [ - "() => Promise<", - { - "pluginId": "@kbn/alerting-types", - "scope": "common", - "docId": "kibKbnAlertingTypesPluginApi", - "section": "def-common.AlertsHealth", - "text": "AlertsHealth" - }, - ">" + "FormatAlert", + " | undefined" ], - "path": "x-pack/plugins/alerting/server/plugin.ts", + "path": "x-pack/plugins/alerting/server/types.ts", "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] + "trackAdoption": false } ], "initialIsOpen": false @@ -4544,7 +4268,7 @@ "tags": [], "label": "AlertingAuthorizationEntity", "description": [], - "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", + "path": "x-pack/plugins/alerting/server/authorization/types.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -4568,7 +4292,7 @@ "tags": [], "label": "ReadOperations", "description": [], - "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", + "path": "x-pack/plugins/alerting/server/authorization/types.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -4592,7 +4316,7 @@ "tags": [], "label": "WriteOperations", "description": [], - "path": "x-pack/plugins/alerting/server/authorization/alerting_authorization.ts", + "path": "x-pack/plugins/alerting/server/authorization/types.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -4715,21 +4439,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "alerting", - "id": "def-server.DEFAULT_MAX_EPHEMERAL_ACTIONS_PER_ALERT", - "type": "number", - "tags": [], - "label": "DEFAULT_MAX_EPHEMERAL_ACTIONS_PER_ALERT", - "description": [], - "signature": [ - "10" - ], - "path": "x-pack/plugins/alerting/server/config.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "alerting", "id": "def-server.ECS_COMPONENT_TEMPLATE_NAME", @@ -5029,7 +4738,7 @@ "section": "def-common.RuleTypeParams", "text": "RuleTypeParams" }, - " = never>(params?: Readonly<{ options?: Readonly<{ page?: number | undefined; filter?: string | Record | undefined; search?: string | undefined; perPage?: number | undefined; defaultSearchOperator?: \"AND\" | \"OR\" | undefined; searchFields?: string[] | undefined; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; hasReference?: Readonly<{} & { id: string; type: string; }> | undefined; fields?: string[] | undefined; filterConsumers?: string[] | undefined; } & {}> | undefined; includeSnoozeData?: boolean | undefined; excludeFromPublicApi?: boolean | undefined; featureIds?: string[] | undefined; } & {}> | undefined) => Promise<", + " = never>(params?: Readonly<{ options?: Readonly<{ page?: number | undefined; filter?: string | Record | undefined; search?: string | undefined; perPage?: number | undefined; defaultSearchOperator?: \"AND\" | \"OR\" | undefined; searchFields?: string[] | undefined; sortField?: string | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; hasReference?: Readonly<{} & { id: string; type: string; }> | undefined; fields?: string[] | undefined; ruleTypeIds?: string[] | undefined; consumers?: string[] | undefined; } & {}> | undefined; includeSnoozeData?: boolean | undefined; excludeFromPublicApi?: boolean | undefined; } & {}> | undefined) => Promise<", { "pluginId": "alerting", "scope": "server", @@ -5141,9 +4850,9 @@ "SnoozeRuleOptions", ") => Promise; unsnooze: (options: ", "UnsnoozeParams", - ") => Promise; unmuteAll: (options: { id: string; }) => Promise; muteInstance: (options: Readonly<{} & { alertId: string; alertInstanceId: string; }>) => Promise; unmuteInstance: (options: Readonly<{} & { alertId: string; alertInstanceId: string; }>) => Promise; bulkUntrackAlerts: (options: Readonly<{ indices?: string[] | undefined; featureIds?: string[] | undefined; alertUuids?: string[] | undefined; query?: any[] | undefined; } & { isUsingQuery: boolean; }>) => Promise; runSoon: (options: { id: string; }) => Promise; listRuleTypes: () => Promise Promise; unmuteAll: (options: { id: string; }) => Promise; muteInstance: (options: Readonly<{} & { alertId: string; alertInstanceId: string; }>) => Promise; unmuteInstance: (options: Readonly<{} & { alertId: string; alertInstanceId: string; }>) => Promise; bulkUntrackAlerts: (options: Readonly<{ indices?: string[] | undefined; ruleTypeIds?: string[] | undefined; alertUuids?: string[] | undefined; query?: any[] | undefined; } & { isUsingQuery: boolean; }>) => Promise; runSoon: (options: { id: string; }) => Promise; listRuleTypes: () => Promise<", "RegistryAlertTypeWithAuth", - ">>; scheduleBackfill: (params: Readonly<{ end?: string | undefined; } & { start: string; ruleId: string; }>[]) => Promise<(Readonly<{ end?: string | undefined; } & { id: string; spaceId: string; start: string; rule: Readonly<{ apiKeyCreatedByUser?: boolean | null | undefined; } & { params: Record; id: string; consumer: string; name: string; tags: string[]; enabled: boolean; alertTypeId: string; schedule: Readonly<{} & { interval: string; }>; createdBy: string | null; updatedBy: string | null; createdAt: string; updatedAt: string; apiKeyOwner: string | null; revision: number; }>; enabled: boolean; schedule: Readonly<{} & { interval: string; status: \"error\" | \"running\" | \"complete\" | \"pending\" | \"timeout\"; runAt: string; }>[]; createdAt: string; duration: string; status: \"error\" | \"running\" | \"complete\" | \"pending\" | \"timeout\"; }> | Readonly<{} & { error: Readonly<{ status?: number | undefined; } & { message: string; rule: Readonly<{ name?: string | undefined; } & { id: string; }>; }>; }>)[]>; getBackfill: (id: string) => Promise; id: string; consumer: string; name: string; tags: string[]; enabled: boolean; alertTypeId: string; schedule: Readonly<{} & { interval: string; }>; createdBy: string | null; updatedBy: string | null; createdAt: string; updatedAt: string; apiKeyOwner: string | null; revision: number; }>; enabled: boolean; schedule: Readonly<{} & { interval: string; status: \"error\" | \"running\" | \"complete\" | \"pending\" | \"timeout\"; runAt: string; }>[]; createdAt: string; duration: string; status: \"error\" | \"running\" | \"complete\" | \"pending\" | \"timeout\"; }>>; findBackfill: (params: Readonly<{ start?: string | undefined; end?: string | undefined; sortField?: \"start\" | \"createdAt\" | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; ruleIds?: string | undefined; } & { page: number; perPage: number; }>) => Promise; id: string; consumer: string; name: string; tags: string[]; enabled: boolean; alertTypeId: string; schedule: Readonly<{} & { interval: string; }>; createdBy: string | null; updatedBy: string | null; createdAt: string; updatedAt: string; apiKeyOwner: string | null; revision: number; }>; enabled: boolean; schedule: Readonly<{} & { interval: string; status: \"error\" | \"running\" | \"complete\" | \"pending\" | \"timeout\"; runAt: string; }>[]; createdAt: string; duration: string; status: \"error\" | \"running\" | \"complete\" | \"pending\" | \"timeout\"; }>[]; perPage: number; total: number; }>>; deleteBackfill: (id: string) => Promise<{}>; getSpaceId: () => string | undefined; getAuthorization: () => ", + "[]>; scheduleBackfill: (params: Readonly<{ end?: string | undefined; } & { start: string; ruleId: string; }>[]) => Promise<(Readonly<{ end?: string | undefined; } & { id: string; spaceId: string; start: string; rule: Readonly<{ apiKeyCreatedByUser?: boolean | null | undefined; } & { params: Record; id: string; consumer: string; name: string; tags: string[]; enabled: boolean; alertTypeId: string; schedule: Readonly<{} & { interval: string; }>; createdBy: string | null; updatedBy: string | null; createdAt: string; updatedAt: string; apiKeyOwner: string | null; revision: number; }>; enabled: boolean; schedule: Readonly<{} & { interval: string; status: \"error\" | \"running\" | \"complete\" | \"pending\" | \"timeout\"; runAt: string; }>[]; createdAt: string; duration: string; status: \"error\" | \"running\" | \"complete\" | \"pending\" | \"timeout\"; }> | Readonly<{} & { error: Readonly<{ status?: number | undefined; } & { message: string; rule: Readonly<{ name?: string | undefined; } & { id: string; }>; }>; }>)[]>; getBackfill: (id: string) => Promise; id: string; consumer: string; name: string; tags: string[]; enabled: boolean; alertTypeId: string; schedule: Readonly<{} & { interval: string; }>; createdBy: string | null; updatedBy: string | null; createdAt: string; updatedAt: string; apiKeyOwner: string | null; revision: number; }>; enabled: boolean; schedule: Readonly<{} & { interval: string; status: \"error\" | \"running\" | \"complete\" | \"pending\" | \"timeout\"; runAt: string; }>[]; createdAt: string; duration: string; status: \"error\" | \"running\" | \"complete\" | \"pending\" | \"timeout\"; }>>; findBackfill: (params: Readonly<{ start?: string | undefined; end?: string | undefined; sortField?: \"start\" | \"createdAt\" | undefined; sortOrder?: \"asc\" | \"desc\" | undefined; ruleIds?: string | undefined; } & { page: number; perPage: number; }>) => Promise; id: string; consumer: string; name: string; tags: string[]; enabled: boolean; alertTypeId: string; schedule: Readonly<{} & { interval: string; }>; createdBy: string | null; updatedBy: string | null; createdAt: string; updatedAt: string; apiKeyOwner: string | null; revision: number; }>; enabled: boolean; schedule: Readonly<{} & { interval: string; status: \"error\" | \"running\" | \"complete\" | \"pending\" | \"timeout\"; runAt: string; }>[]; createdAt: string; duration: string; status: \"error\" | \"running\" | \"complete\" | \"pending\" | \"timeout\"; }>[]; perPage: number; total: number; }>>; deleteBackfill: (id: string) => Promise<{}>; getSpaceId: () => string | undefined; getAuthorization: () => ", { "pluginId": "alerting", "scope": "server", diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index 0d4aaca5e00ee..e7364c539c72a 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.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 | |-------------------|-----------|------------------------|-----------------| -| 881 | 1 | 849 | 50 | +| 872 | 1 | 839 | 50 | ## Client diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index 355153019f8b2..af73a15c4d23d 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] --- import apmObj from './apm.devdocs.json'; diff --git a/api_docs/apm_data_access.devdocs.json b/api_docs/apm_data_access.devdocs.json index 6d0f3b4532dc4..be97ce96ca40e 100644 --- a/api_docs/apm_data_access.devdocs.json +++ b/api_docs/apm_data_access.devdocs.json @@ -441,6 +441,78 @@ ], "functions": [], "interfaces": [ + { + "parentPluginId": "apmDataAccess", + "id": "def-server.ApmDataAccessPrivilegesCheck", + "type": "Interface", + "tags": [], + "label": "ApmDataAccessPrivilegesCheck", + "description": [], + "path": "x-pack/plugins/observability_solution/apm_data_access/server/lib/check_privileges.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "apmDataAccess", + "id": "def-server.ApmDataAccessPrivilegesCheck.request", + "type": "Object", + "tags": [], + "label": "request", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "path": "x-pack/plugins/observability_solution/apm_data_access/server/lib/check_privileges.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "apmDataAccess", + "id": "def-server.ApmDataAccessPrivilegesCheck.security", + "type": "Object", + "tags": [], + "label": "security", + "description": [], + "signature": [ + { + "pluginId": "@kbn/security-plugin-types-server", + "scope": "server", + "docId": "kibKbnSecurityPluginTypesServerPluginApi", + "section": "def-server.SecurityPluginStart", + "text": "SecurityPluginStart" + }, + " | undefined" + ], + "path": "x-pack/plugins/observability_solution/apm_data_access/server/lib/check_privileges.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "apmDataAccess", + "id": "def-server.ApmDataAccessPrivilegesCheck.getApmIndices", + "type": "Function", + "tags": [], + "label": "getApmIndices", + "description": [], + "signature": [ + "() => Promise>" + ], + "path": "x-pack/plugins/observability_solution/apm_data_access/server/lib/check_privileges.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "apmDataAccess", "id": "def-server.ApmDataAccessServicesParams", @@ -2293,12 +2365,42 @@ "label": "getApmIndices", "description": [], "signature": [ - "() => Promise>" + "(soClient: ", + { + "pluginId": "@kbn/core-saved-objects-api-server", + "scope": "server", + "docId": "kibKbnCoreSavedObjectsApiServerPluginApi", + "section": "def-server.SavedObjectsClientContract", + "text": "SavedObjectsClientContract" + }, + ") => Promise>" ], "path": "x-pack/plugins/observability_solution/apm_data_access/server/types.ts", "deprecated": false, "trackAdoption": false, - "children": [], + "children": [ + { + "parentPluginId": "apmDataAccess", + "id": "def-server.ApmDataAccessPluginSetup.getApmIndices.$1", + "type": "Object", + "tags": [], + "label": "soClient", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-saved-objects-api-server", + "scope": "server", + "docId": "kibKbnCoreSavedObjectsApiServerPluginApi", + "section": "def-server.SavedObjectsClientContract", + "text": "SavedObjectsClientContract" + } + ], + "path": "x-pack/plugins/observability_solution/apm_data_access/server/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], "returnComment": [] }, { @@ -2402,7 +2504,56 @@ "path": "x-pack/plugins/observability_solution/apm_data_access/server/types.ts", "deprecated": false, "trackAdoption": false, - "children": [], + "children": [ + { + "parentPluginId": "apmDataAccess", + "id": "def-server.ApmDataAccessPluginStart.hasPrivileges", + "type": "Function", + "tags": [], + "label": "hasPrivileges", + "description": [], + "signature": [ + "(params: Pick<", + { + "pluginId": "apmDataAccess", + "scope": "server", + "docId": "kibApmDataAccessPluginApi", + "section": "def-server.ApmDataAccessPrivilegesCheck", + "text": "ApmDataAccessPrivilegesCheck" + }, + ", \"request\">) => Promise" + ], + "path": "x-pack/plugins/observability_solution/apm_data_access/server/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "apmDataAccess", + "id": "def-server.ApmDataAccessPluginStart.hasPrivileges.$1", + "type": "Object", + "tags": [], + "label": "params", + "description": [], + "signature": [ + "Pick<", + { + "pluginId": "apmDataAccess", + "scope": "server", + "docId": "kibApmDataAccessPluginApi", + "section": "def-server.ApmDataAccessPrivilegesCheck", + "text": "ApmDataAccessPrivilegesCheck" + }, + ", \"request\">" + ], + "path": "x-pack/plugins/observability_solution/apm_data_access/server/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], "lifecycle": "start", "initialIsOpen": true } diff --git a/api_docs/apm_data_access.mdx b/api_docs/apm_data_access.mdx index 6c9171b2b50d4..375bdd80ea47c 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apmDataAccess'] --- import apmDataAccessObj from './apm_data_access.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/te | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 86 | 0 | 86 | 3 | +| 93 | 0 | 93 | 3 | ## Server diff --git a/api_docs/asset_inventory.devdocs.json b/api_docs/asset_inventory.devdocs.json new file mode 100644 index 0000000000000..6fdfe95fc2c1e --- /dev/null +++ b/api_docs/asset_inventory.devdocs.json @@ -0,0 +1,114 @@ +{ + "id": "assetInventory", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [], + "setup": { + "parentPluginId": "assetInventory", + "id": "def-public.AssetInventoryPluginSetup", + "type": "Interface", + "tags": [], + "label": "AssetInventoryPluginSetup", + "description": [], + "path": "x-pack/plugins/asset_inventory/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "lifecycle": "setup", + "initialIsOpen": true + }, + "start": { + "parentPluginId": "assetInventory", + "id": "def-public.AssetInventoryPluginStart", + "type": "Interface", + "tags": [], + "label": "AssetInventoryPluginStart", + "description": [], + "path": "x-pack/plugins/asset_inventory/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "lifecycle": "start", + "initialIsOpen": true + } + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [], + "setup": { + "parentPluginId": "assetInventory", + "id": "def-server.AssetInventoryPluginSetup", + "type": "Interface", + "tags": [], + "label": "AssetInventoryPluginSetup", + "description": [], + "path": "x-pack/plugins/asset_inventory/server/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "lifecycle": "setup", + "initialIsOpen": true + }, + "start": { + "parentPluginId": "assetInventory", + "id": "def-server.AssetInventoryPluginStart", + "type": "Interface", + "tags": [], + "label": "AssetInventoryPluginStart", + "description": [], + "path": "x-pack/plugins/asset_inventory/server/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "lifecycle": "start", + "initialIsOpen": true + } + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "assetInventory", + "id": "def-common.PLUGIN_ID", + "type": "string", + "tags": [], + "label": "PLUGIN_ID", + "description": [], + "signature": [ + "\"assetInventory\"" + ], + "path": "x-pack/plugins/asset_inventory/common/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "assetInventory", + "id": "def-common.PLUGIN_NAME", + "type": "string", + "tags": [], + "label": "PLUGIN_NAME", + "description": [], + "signature": [ + "\"assetInventory\"" + ], + "path": "x-pack/plugins/asset_inventory/common/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/asset_inventory.mdx b/api_docs/asset_inventory.mdx new file mode 100644 index 0000000000000..926e855163d18 --- /dev/null +++ b/api_docs/asset_inventory.mdx @@ -0,0 +1,46 @@ +--- +#### +#### 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: kibAssetInventoryPluginApi +slug: /kibana-dev-docs/api/assetInventory +title: "assetInventory" +image: https://source.unsplash.com/400x175/?github +description: API docs for the assetInventory plugin +date: 2024-12-05 +tags: ['contributor', 'dev', 'apidocs', 'kibana', 'assetInventory'] +--- +import assetInventoryObj from './asset_inventory.devdocs.json'; + +Centralized asset inventory experience within the Elastic Security solution. A central place for users to view and manage all their assets from different environments + +Contact [@elastic/kibana-cloud-security-posture](https://github.com/orgs/elastic/teams/kibana-cloud-security-posture) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 6 | 0 | 6 | 0 | + +## Client + +### Setup + + +### Start + + +## Server + +### Setup + + +### Start + + +## Common + +### Consts, variables and types + + diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index 6e2eb08211b4d..dfe1f20c84c5c 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-12-02 +date: 2024-12-05 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 bad8d694d742b..10315cb41d758 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-12-02 +date: 2024-12-05 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 31deaf735ab78..440492b1035b2 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-12-02 +date: 2024-12-05 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 5e53ac49d5b7a..1c0bf62c8e510 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-12-02 +date: 2024-12-05 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 67fccca8cc82d..1d810a9559a4b 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts'] --- import chartsObj from './charts.devdocs.json'; diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx index fe1e429aa1180..ef8cf26d2ecc0 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] --- import cloudObj from './cloud.devdocs.json'; diff --git a/api_docs/cloud_data_migration.mdx b/api_docs/cloud_data_migration.mdx index 5ed3c7a5ee97a..246d5634136f9 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-12-02 +date: 2024-12-05 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 b5106d14cac13..9b6cc4b640853 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDefend'] --- import cloudDefendObj from './cloud_defend.devdocs.json'; diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx index 908791ea83cda..f233f88b833e1 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-12-02 +date: 2024-12-05 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 8c06b3bb3a268..1d5b02638c26b 100644 --- a/api_docs/console.mdx +++ b/api_docs/console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/console title: "console" image: https://source.unsplash.com/400x175/?github description: API docs for the console plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] --- import consoleObj from './console.devdocs.json'; diff --git a/api_docs/content_management.mdx b/api_docs/content_management.mdx index e5594fc8b4053..15dbdf080af4d 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-12-02 +date: 2024-12-05 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 374b6f21713a1..e7b895fab2fe1 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-12-02 +date: 2024-12-05 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 f1481866eeae5..bd3bcc2e10e98 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-12-02 +date: 2024-12-05 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 d77e83955513b..79542dae85297 100644 --- a/api_docs/dashboard.devdocs.json +++ b/api_docs/dashboard.devdocs.json @@ -178,7 +178,7 @@ "section": "def-public.PublishesFilters", "text": "PublishesFilters" }, - " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; query$: ", + " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; canEditUnifiedSearch?: (() => boolean) | undefined; query$: ", { "pluginId": "@kbn/presentation-publishing", "scope": "public", @@ -264,7 +264,7 @@ "section": "def-public.PublishesFilters", "text": "PublishesFilters" }, - " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; query$: ", + " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; canEditUnifiedSearch?: (() => boolean) | undefined; query$: ", { "pluginId": "@kbn/presentation-publishing", "scope": "public", @@ -936,7 +936,7 @@ "section": "def-public.PublishesFilters", "text": "PublishesFilters" }, - " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; query$: ", + " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; canEditUnifiedSearch?: (() => boolean) | undefined; query$: ", { "pluginId": "@kbn/presentation-publishing", "scope": "public", @@ -1285,7 +1285,9 @@ "section": "def-common.DashboardContainerInput", "text": "DashboardContainerInput" }, - ", \"executionContext\" | \"panels\" | \"controlGroupInput\">> & { dashboardId?: string | undefined; useHash?: boolean | undefined; preserveSavedFilters?: boolean | undefined; searchSessionId?: string | undefined; panels?: (Omit | undefined; savedObjectId?: string | undefined; } & {}>; gridData: Readonly<{} & { i: string; y: number; w: number; h: number; x: number; }>; panelIndex: string; }>, \"panelConfig\"> & { panelConfig: Readonly<{ version?: string | undefined; title?: string | undefined; description?: string | undefined; hidePanelTitles?: boolean | undefined; enhancements?: Record | undefined; savedObjectId?: string | undefined; } & {}> & { [key: string]: any; }; } & ", + ", \"executionContext\" | \"panels\" | \"controlGroupInput\">> & { dashboardId?: string | undefined; useHash?: boolean | undefined; preserveSavedFilters?: boolean | undefined; searchSessionId?: string | undefined; panels?: (Omit | undefined; savedObjectId?: string | undefined; } & {}>; gridData: Readonly<{ i?: string | undefined; } & { y: number; w: number; h: number; x: number; }>; }>, \"panelConfig\"> & { panelConfig: Readonly<{ version?: string | undefined; title?: string | undefined; description?: string | undefined; hidePanelTitles?: boolean | undefined; enhancements?: Record | undefined; savedObjectId?: string | undefined; } & {}> & { [key: string]: any; }; gridData: ", + "GridData", + "; } & ", { "pluginId": "@kbn/utility-types", "scope": "common", @@ -1532,7 +1534,7 @@ "section": "def-common.ControlLabelPosition", "text": "ControlLabelPosition" }, - "; autoApplySelections: boolean; ignoreParentSettings: Readonly<{} & { ignoreFilters: boolean; ignoreQuery: boolean; ignoreTimerange: boolean; ignoreValidations: boolean; }>; controls: Readonly<{ controlConfig?: Record | undefined; } & { id: string; type: string; order: number; grow: boolean; width: ", + "; autoApplySelections: boolean; ignoreParentSettings: Readonly<{} & { ignoreFilters: boolean; ignoreQuery: boolean; ignoreTimerange: boolean; ignoreValidations: boolean; }>; controls: Readonly<{ id?: string | undefined; controlConfig?: Record | undefined; } & { type: string; order: number; grow: boolean; width: ", { "pluginId": "controls", "scope": "common", @@ -1572,7 +1574,7 @@ "section": "def-common.FilterStateStore", "text": "FilterStateStore" }, - "; }> | undefined; } & { meta: Readonly<{ params?: any; key?: string | undefined; value?: string | undefined; type?: string | undefined; alias?: string | null | undefined; index?: string | undefined; disabled?: boolean | undefined; field?: string | undefined; group?: string | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; isMultiIndex?: boolean | undefined; } & {}>; }>[] | undefined; query?: Readonly<{} & { query: string | Record; language: string; }> | undefined; } & {}> | undefined; } & {}>; timeRestore: boolean; panels: Readonly<{ id?: string | undefined; version?: string | undefined; title?: string | undefined; panelRefName?: string | undefined; } & { type: string; panelConfig: Readonly<{ version?: string | undefined; title?: string | undefined; description?: string | undefined; hidePanelTitles?: boolean | undefined; enhancements?: Record | undefined; savedObjectId?: string | undefined; } & {}>; gridData: Readonly<{} & { i: string; y: number; w: number; h: number; x: number; }>; panelIndex: string; }>[]; }>, \"panels\"> & { panels: ", + "; }> | undefined; } & { meta: Readonly<{ params?: any; key?: string | undefined; value?: string | undefined; type?: string | undefined; alias?: string | null | undefined; index?: string | undefined; disabled?: boolean | undefined; field?: string | undefined; group?: string | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; isMultiIndex?: boolean | undefined; } & {}>; }>[] | undefined; query?: Readonly<{} & { query: string | Record; language: string; }> | undefined; } & {}> | undefined; } & {}>; timeRestore: boolean; panels: Readonly<{ id?: string | undefined; version?: string | undefined; title?: string | undefined; panelRefName?: string | undefined; panelIndex?: string | undefined; } & { type: string; panelConfig: Readonly<{ version?: string | undefined; title?: string | undefined; description?: string | undefined; hidePanelTitles?: boolean | undefined; enhancements?: Record | undefined; savedObjectId?: string | undefined; } & {}>; gridData: Readonly<{ i?: string | undefined; } & { y: number; w: number; h: number; x: number; }>; }>[]; }>, \"panels\"> & { panels: ", "DashboardPanel", "[]; }" ], @@ -1661,7 +1663,9 @@ "section": "def-common.DashboardPanelMap", "text": "DashboardPanelMap" }, - ", removeLegacyVersion?: boolean | undefined) => { panelRefName?: string | undefined; id?: string | undefined; title?: string | undefined; type: string; gridData: Readonly<{} & { i: string; y: number; w: number; h: number; x: number; }>; panelIndex: string; panelConfig: _.Omit { panelRefName?: string | undefined; id?: string | undefined; title?: string | undefined; type: string; gridData: ", + "GridData", + "; panelIndex: string; panelConfig: _.Omit, \"i\"> & { readonly i: string; }" ], "path": "src/plugins/dashboard/common/dashboard_container/types.ts", "deprecated": false, diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index d05c60f9cc1c9..48928e26afd80 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard'] --- import dashboardObj from './dashboard.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kib | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 114 | 0 | 111 | 13 | +| 114 | 0 | 111 | 14 | ## Client diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx index 62c9d1d6d4f41..15f3a035e41db 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-12-02 +date: 2024-12-05 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 2e724770f8ecc..0e44f5b6ae59d 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; diff --git a/api_docs/data_quality.mdx b/api_docs/data_quality.mdx index 030894bc9cfa6..30e7b68e6c5b9 100644 --- a/api_docs/data_quality.mdx +++ b/api_docs/data_quality.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataQuality title: "dataQuality" image: https://source.unsplash.com/400x175/?github description: API docs for the dataQuality plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataQuality'] --- import dataQualityObj from './data_quality.devdocs.json'; diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index 5a0028a16b55e..8322dc65837cf 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] --- import dataQueryObj from './data_query.devdocs.json'; diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index 71596a1847602..c1168207a4e7d 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] --- import dataSearchObj from './data_search.devdocs.json'; diff --git a/api_docs/data_usage.mdx b/api_docs/data_usage.mdx index 1d8f78d1fb1a5..66f926fb30ded 100644 --- a/api_docs/data_usage.mdx +++ b/api_docs/data_usage.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataUsage title: "dataUsage" image: https://source.unsplash.com/400x175/?github description: API docs for the dataUsage plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataUsage'] --- import dataUsageObj from './data_usage.devdocs.json'; diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index 88ca7783b766e..a2f7a703413bf 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-12-02 +date: 2024-12-05 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 cbc9b07fd8d3b..f9dc815b24f43 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-12-02 +date: 2024-12-05 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 2a9d143487b9c..e8169220add69 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-12-02 +date: 2024-12-05 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 bdd4dcce50bfe..9f0b52d55f51b 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-12-02 +date: 2024-12-05 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 5f17178e51dda..4a9723ee0237f 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] --- import dataVisualizerObj from './data_visualizer.devdocs.json'; diff --git a/api_docs/dataset_quality.devdocs.json b/api_docs/dataset_quality.devdocs.json index f6d641e428113..d160859f49a93 100644 --- a/api_docs/dataset_quality.devdocs.json +++ b/api_docs/dataset_quality.devdocs.json @@ -311,6 +311,24 @@ "DatasetQualityRouteHandlerResources", ", { isFieldLimitIssue: boolean; fieldCount: number; totalFieldLimit: number; } & { ignoreMalformed?: boolean | undefined; nestedFieldLimit?: number | undefined; fieldMapping?: { type?: string | undefined; ignore_above?: number | undefined; } | undefined; defaultPipeline?: string | undefined; }, ", "DatasetQualityRouteCreateOptions", + ">; \"GET /internal/dataset_quality/data_streams/{dataStream}/integration/check\": ", + { + "pluginId": "@kbn/server-route-repository-utils", + "scope": "common", + "docId": "kibKbnServerRouteRepositoryUtilsPluginApi", + "section": "def-common.ServerRoute", + "text": "ServerRoute" + }, + "<\"GET /internal/dataset_quality/data_streams/{dataStream}/integration/check\", ", + "TypeC", + "<{ path: ", + "TypeC", + "<{ dataStream: ", + "StringC", + "; }>; }>, ", + "DatasetQualityRouteHandlerResources", + ", { isIntegration: false; areAssetsAvailable: boolean; } | { isIntegration: true; areAssetsAvailable: true; integration: { name: string; } & { title?: string | undefined; version?: string | undefined; icons?: ({ src: string; } & { path?: string | undefined; size?: string | undefined; title?: string | undefined; type?: string | undefined; })[] | undefined; datasets?: { [x: string]: string; } | undefined; }; }, ", + "DatasetQualityRouteCreateOptions", ">; \"GET /internal/dataset_quality/data_streams/{dataStream}/settings\": ", { "pluginId": "@kbn/server-route-repository-utils", @@ -678,6 +696,24 @@ "DatasetQualityRouteHandlerResources", ", { isFieldLimitIssue: boolean; fieldCount: number; totalFieldLimit: number; } & { ignoreMalformed?: boolean | undefined; nestedFieldLimit?: number | undefined; fieldMapping?: { type?: string | undefined; ignore_above?: number | undefined; } | undefined; defaultPipeline?: string | undefined; }, ", "DatasetQualityRouteCreateOptions", + ">; \"GET /internal/dataset_quality/data_streams/{dataStream}/integration/check\": ", + { + "pluginId": "@kbn/server-route-repository-utils", + "scope": "common", + "docId": "kibKbnServerRouteRepositoryUtilsPluginApi", + "section": "def-common.ServerRoute", + "text": "ServerRoute" + }, + "<\"GET /internal/dataset_quality/data_streams/{dataStream}/integration/check\", ", + "TypeC", + "<{ path: ", + "TypeC", + "<{ dataStream: ", + "StringC", + "; }>; }>, ", + "DatasetQualityRouteHandlerResources", + ", { isIntegration: false; areAssetsAvailable: boolean; } | { isIntegration: true; areAssetsAvailable: true; integration: { name: string; } & { title?: string | undefined; version?: string | undefined; icons?: ({ src: string; } & { path?: string | undefined; size?: string | undefined; title?: string | undefined; type?: string | undefined; })[] | undefined; datasets?: { [x: string]: string; } | undefined; }; }, ", + "DatasetQualityRouteCreateOptions", ">; \"GET /internal/dataset_quality/data_streams/{dataStream}/settings\": ", { "pluginId": "@kbn/server-route-repository-utils", diff --git a/api_docs/dataset_quality.mdx b/api_docs/dataset_quality.mdx index b81290ea1a2ee..66a06d208d474 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-12-02 +date: 2024-12-05 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 01787370328ea..a99a28bec938e 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -29,7 +29,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | stackAlerts, alerting, securitySolution, inputControlVis | - | | | triggersActionsUi | - | | | triggersActionsUi | - | -| | @kbn/core, visualizations, triggersActionsUi, @kbn/alerts-ui-shared | - | +| | @kbn/core, visualizations, triggersActionsUi, @kbn/response-ops-rule-form | - | | | ruleRegistry, securitySolution, slo | - | | | security, actions, alerting, ruleRegistry, files, cases, fleet, securitySolution | - | | | alerting, securitySolution | - | @@ -105,7 +105,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | @kbn/core-root-browser-internal, @kbn/core-saved-objects-browser-mocks | - | | | fleet, exploratoryView, osquery, synthetics | - | | | @kbn/security-plugin-types-server, telemetry, fleet, profiling, @kbn/security-authorization-core, security | - | -| | @kbn/core-application-browser-internal, management, @kbn/core-application-browser-mocks, fleet, security, kibanaOverview, @kbn/core | - | +| | @kbn/core-application-browser-internal, management, @kbn/core-application-browser-mocks, assetInventory, fleet, security, kibanaOverview, @kbn/core | - | | | graph, visTypeTimeseries, dataViewManagement, dataViews | - | | | graph, visTypeTimeseries, dataViewManagement, dataViews | - | | | graph, visTypeTimeseries, dataViewManagement | - | diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 4d7e8d829a974..eb52c777ee8a3 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -20,14 +20,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] -## @kbn/alerts-ui-shared - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [rule_actions_item.tsx](https://github.com/elastic/kibana/tree/main/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_item.tsx#:~:text=SavedObjectAttribute), [rule_actions_item.tsx](https://github.com/elastic/kibana/tree/main/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_item.tsx#:~:text=SavedObjectAttribute), [rule_actions_item.tsx](https://github.com/elastic/kibana/tree/main/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_item.tsx#:~:text=SavedObjectAttribute), [rule_actions_item.tsx](https://github.com/elastic/kibana/tree/main/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_item.tsx#:~:text=SavedObjectAttribute), [rule_actions_system_actions_item.tsx](https://github.com/elastic/kibana/tree/main/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_system_actions_item.tsx#:~:text=SavedObjectAttribute), [rule_actions_system_actions_item.tsx](https://github.com/elastic/kibana/tree/main/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_system_actions_item.tsx#:~:text=SavedObjectAttribute), [rule_actions_system_actions_item.tsx](https://github.com/elastic/kibana/tree/main/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_system_actions_item.tsx#:~:text=SavedObjectAttribute), [rule_actions_system_actions_item.tsx](https://github.com/elastic/kibana/tree/main/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_system_actions_item.tsx#:~:text=SavedObjectAttribute) | - | - - - ## @kbn/content-management-table-list-view | Deprecated API | Reference location(s) | Remove By | @@ -418,6 +410,14 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] +## @kbn/response-ops-rule-form + +| Deprecated API | Reference location(s) | Remove By | +| ---------------|-----------|-----------| +| | [rule_actions_item.tsx](https://github.com/elastic/kibana/tree/main/packages/response-ops/rule_form/src/rule_actions/rule_actions_item.tsx#:~:text=SavedObjectAttribute), [rule_actions_item.tsx](https://github.com/elastic/kibana/tree/main/packages/response-ops/rule_form/src/rule_actions/rule_actions_item.tsx#:~:text=SavedObjectAttribute), [rule_actions_item.tsx](https://github.com/elastic/kibana/tree/main/packages/response-ops/rule_form/src/rule_actions/rule_actions_item.tsx#:~:text=SavedObjectAttribute), [rule_actions_item.tsx](https://github.com/elastic/kibana/tree/main/packages/response-ops/rule_form/src/rule_actions/rule_actions_item.tsx#:~:text=SavedObjectAttribute), [rule_actions_system_actions_item.tsx](https://github.com/elastic/kibana/tree/main/packages/response-ops/rule_form/src/rule_actions/rule_actions_system_actions_item.tsx#:~:text=SavedObjectAttribute), [rule_actions_system_actions_item.tsx](https://github.com/elastic/kibana/tree/main/packages/response-ops/rule_form/src/rule_actions/rule_actions_system_actions_item.tsx#:~:text=SavedObjectAttribute), [rule_actions_system_actions_item.tsx](https://github.com/elastic/kibana/tree/main/packages/response-ops/rule_form/src/rule_actions/rule_actions_system_actions_item.tsx#:~:text=SavedObjectAttribute), [rule_actions_system_actions_item.tsx](https://github.com/elastic/kibana/tree/main/packages/response-ops/rule_form/src/rule_actions/rule_actions_system_actions_item.tsx#:~:text=SavedObjectAttribute) | - | + + + ## @kbn/search-errors | Deprecated API | Reference location(s) | Remove By | @@ -545,6 +545,14 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] +## assetInventory + +| Deprecated API | Reference location(s) | Remove By | +| ---------------|-----------|-----------| +| | [application.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/asset_inventory/public/application.tsx#:~:text=appBasePath) | - | + + + ## canvas | Deprecated API | Reference location(s) | Remove By | @@ -737,7 +745,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [plugin.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/plugin.tsx#:~:text=executeTriggerActions) | - | | | [discover_state.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/state_management/discover_state.test.ts#:~:text=savedObjects) | - | | | [discover_state.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/public/application/main/state_management/discover_state.test.ts#:~:text=resolve) | - | -| | [ui_settings.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/server/ui_settings.ts#:~:text=metric), [ui_settings.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/server/ui_settings.ts#:~:text=metric), [ui_settings.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/server/ui_settings.ts#:~:text=metric) | - | +| | [ui_settings.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/server/ui_settings.ts#:~:text=metric), [ui_settings.ts](https://github.com/elastic/kibana/tree/main/src/plugins/discover/server/ui_settings.ts#:~:text=metric) | - | diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index c5bdb5a2fefb8..7d98513dfb169 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index cf429c9f3bfb2..e8a85571768a3 100644 --- a/api_docs/dev_tools.mdx +++ b/api_docs/dev_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/devTools title: "devTools" image: https://source.unsplash.com/400x175/?github description: API docs for the devTools plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] --- import devToolsObj from './dev_tools.devdocs.json'; diff --git a/api_docs/discover.devdocs.json b/api_docs/discover.devdocs.json index 51ca924813168..770007141ebb5 100644 --- a/api_docs/discover.devdocs.json +++ b/api_docs/discover.devdocs.json @@ -3576,7 +3576,7 @@ "section": "def-public.PublishesFilters", "text": "PublishesFilters" }, - " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; query$: ", + " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; canEditUnifiedSearch?: (() => boolean) | undefined; query$: ", { "pluginId": "@kbn/presentation-publishing", "scope": "public", diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index 59d3131706861..bf1f872ed5d90 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-12-02 +date: 2024-12-05 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 c506d21ae94ed..443ae331e1b31 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] --- import discoverEnhancedObj from './discover_enhanced.devdocs.json'; diff --git a/api_docs/discover_shared.mdx b/api_docs/discover_shared.mdx index 5d40a4fd51bf3..885628f638a5e 100644 --- a/api_docs/discover_shared.mdx +++ b/api_docs/discover_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverShared title: "discoverShared" image: https://source.unsplash.com/400x175/?github description: API docs for the discoverShared plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverShared'] --- import discoverSharedObj from './discover_shared.devdocs.json'; diff --git a/api_docs/ecs_data_quality_dashboard.mdx b/api_docs/ecs_data_quality_dashboard.mdx index 0f2bbe24f7fa0..47c1847ae25f3 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ecsDataQualityDashboard'] --- import ecsDataQualityDashboardObj from './ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/elastic_assistant.devdocs.json b/api_docs/elastic_assistant.devdocs.json index 60d0345bc415b..6292df433806a 100644 --- a/api_docs/elastic_assistant.devdocs.json +++ b/api_docs/elastic_assistant.devdocs.json @@ -1569,6 +1569,27 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "elasticAssistant", + "id": "def-server.AssistantToolParams.llmTasks", + "type": "Object", + "tags": [], + "label": "llmTasks", + "description": [], + "signature": [ + { + "pluginId": "llmTasks", + "scope": "server", + "docId": "kibLlmTasksPluginApi", + "section": "def-server.LlmTasksPluginStart", + "text": "LlmTasksPluginStart" + }, + " | undefined" + ], + "path": "x-pack/plugins/elastic_assistant/server/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "elasticAssistant", "id": "def-server.AssistantToolParams.isOssModel", @@ -1862,6 +1883,26 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "elasticAssistant", + "id": "def-server.ElasticAssistantPluginStartDependencies.llmTasks", + "type": "Object", + "tags": [], + "label": "llmTasks", + "description": [], + "signature": [ + { + "pluginId": "llmTasks", + "scope": "server", + "docId": "kibLlmTasksPluginApi", + "section": "def-server.LlmTasksPluginStart", + "text": "LlmTasksPluginStart" + } + ], + "path": "x-pack/plugins/elastic_assistant/server/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "elasticAssistant", "id": "def-server.ElasticAssistantPluginStartDependencies.inference", @@ -1942,6 +1983,26 @@ "path": "x-pack/plugins/elastic_assistant/server/types.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "elasticAssistant", + "id": "def-server.ElasticAssistantPluginStartDependencies.productDocBase", + "type": "Object", + "tags": [], + "label": "productDocBase", + "description": [], + "signature": [ + { + "pluginId": "productDocBase", + "scope": "server", + "docId": "kibProductDocBasePluginApi", + "section": "def-server.ProductDocBaseStartContract", + "text": "ProductDocBaseStartContract" + } + ], + "path": "x-pack/plugins/elastic_assistant/server/types.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/elastic_assistant.mdx b/api_docs/elastic_assistant.mdx index 6fadbe2d70dfd..f42de26ee4fd2 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'elasticAssistant'] --- import elasticAssistantObj from './elastic_assistant.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/ | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 53 | 0 | 38 | 2 | +| 56 | 0 | 41 | 2 | ## Server diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index 008c9eba71803..bcf9a3e04d446 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable'] --- import embeddableObj from './embeddable.devdocs.json'; diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index 0b431855cdbcd..a17079616ba63 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-12-02 +date: 2024-12-05 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 5efd467cce4ea..9f5599e782000 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-12-02 +date: 2024-12-05 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 8e51b365ae71d..318c9cb6aae4e 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] --- import enterpriseSearchObj from './enterprise_search.devdocs.json'; diff --git a/api_docs/entities_data_access.mdx b/api_docs/entities_data_access.mdx index af88d94f6bdd4..00e0e88820aca 100644 --- a/api_docs/entities_data_access.mdx +++ b/api_docs/entities_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/entitiesDataAccess title: "entitiesDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the entitiesDataAccess plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'entitiesDataAccess'] --- import entitiesDataAccessObj from './entities_data_access.devdocs.json'; diff --git a/api_docs/entity_manager.devdocs.json b/api_docs/entity_manager.devdocs.json index 618f1a4d59319..e08d74b938581 100644 --- a/api_docs/entity_manager.devdocs.json +++ b/api_docs/entity_manager.devdocs.json @@ -21,7 +21,7 @@ "label": "repositoryClient", "description": [], "signature": [ - "(endpoint: TEndpoint, ...args: MaybeOptionalArgs<", + "(endpoint: TEndpoint, ...args: MaybeOptionalArgs<", { "pluginId": "@kbn/server-route-repository-utils", "scope": "common", @@ -29,7 +29,79 @@ "section": "def-common.ClientRequestParamsOf", "text": "ClientRequestParamsOf" }, - "<{ \"POST /internal/entities/v2/_search/preview\": ", + "<{ \"GET /internal/entities/v2/definitions/sources\": { endpoint: \"GET /internal/entities/v2/definitions/sources\"; handler: ServerRouteHandler<", + "EntityManagerRouteHandlerResources", + ", undefined, ", + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.IKibanaResponse", + "text": "IKibanaResponse" + }, + "<{ sources: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }[]; }>>; security?: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.RouteSecurity", + "text": "RouteSecurity" + }, + " | undefined; }; \"POST /internal/entities/v2/definitions/sources\": ", + { + "pluginId": "@kbn/server-route-repository-utils", + "scope": "common", + "docId": "kibKbnServerRouteRepositoryUtilsPluginApi", + "section": "def-common.ServerRoute", + "text": "ServerRoute" + }, + "<\"POST /internal/entities/v2/definitions/sources\", Zod.ZodObject<{ body: Zod.ZodObject<{ source: Zod.ZodObject<{ id: Zod.ZodString; type_id: Zod.ZodString; index_patterns: Zod.ZodArray; identity_fields: Zod.ZodArray; metadata_fields: Zod.ZodArray; filters: Zod.ZodArray; timestamp_field: Zod.ZodOptional; display_name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }, { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }>; }, \"strip\", Zod.ZodTypeAny, { source: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }; }, { source: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }; }>; }, \"strip\", Zod.ZodTypeAny, { body: { source: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }; }; }, { body: { source: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }; }; }>, ", + "EntityManagerRouteHandlerResources", + ", ", + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.IKibanaResponse", + "text": "IKibanaResponse" + }, + "<{ source: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }; }>, undefined>; \"GET /internal/entities/v2/definitions/types\": { endpoint: \"GET /internal/entities/v2/definitions/types\"; handler: ServerRouteHandler<", + "EntityManagerRouteHandlerResources", + ", undefined, ", + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.IKibanaResponse", + "text": "IKibanaResponse" + }, + "<{ types: { id: string; }[]; }>>; security?: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.RouteSecurity", + "text": "RouteSecurity" + }, + " | undefined; }; \"POST /internal/entities/v2/definitions/types\": ", + { + "pluginId": "@kbn/server-route-repository-utils", + "scope": "common", + "docId": "kibKbnServerRouteRepositoryUtilsPluginApi", + "section": "def-common.ServerRoute", + "text": "ServerRoute" + }, + "<\"POST /internal/entities/v2/definitions/types\", Zod.ZodObject<{ body: Zod.ZodObject<{ type: Zod.ZodObject<{ id: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; }, { id: string; }>; }, \"strip\", Zod.ZodTypeAny, { type: { id: string; }; }, { type: { id: string; }; }>; }, \"strip\", Zod.ZodTypeAny, { body: { type: { id: string; }; }; }, { body: { type: { id: string; }; }; }>, ", + "EntityManagerRouteHandlerResources", + ", ", + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.IKibanaResponse", + "text": "IKibanaResponse" + }, + ", undefined>; \"POST /internal/entities/v2/_search/preview\": ", { "pluginId": "@kbn/server-route-repository-utils", "scope": "common", @@ -37,7 +109,7 @@ "section": "def-common.ServerRoute", "text": "ServerRoute" }, - "<\"POST /internal/entities/v2/_search/preview\", Zod.ZodObject<{ body: Zod.ZodObject<{ sources: Zod.ZodArray>; index_patterns: Zod.ZodArray; identity_fields: Zod.ZodArray; metadata_fields: Zod.ZodArray; filters: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { type: string; filters: string[]; timestamp_field: string; metadata_fields: string[]; index_patterns: string[]; identity_fields: string[]; }, { type: string; filters: string[]; metadata_fields: string[]; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; }>, \"many\">; start: Zod.ZodEffects>, string, string | undefined>; end: Zod.ZodEffects>, string, string | undefined>; limit: Zod.ZodDefault>; }, \"strip\", Zod.ZodTypeAny, { start: string; end: string; sources: { type: string; filters: string[]; timestamp_field: string; metadata_fields: string[]; index_patterns: string[]; identity_fields: string[]; }[]; limit: number; }, { sources: { type: string; filters: string[]; metadata_fields: string[]; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; }[]; start?: string | undefined; end?: string | undefined; limit?: number | undefined; }>; }, \"strip\", Zod.ZodTypeAny, { body: { start: string; end: string; sources: { type: string; filters: string[]; timestamp_field: string; metadata_fields: string[]; index_patterns: string[]; identity_fields: string[]; }[]; limit: number; }; }, { body: { sources: { type: string; filters: string[]; metadata_fields: string[]; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; }[]; start?: string | undefined; end?: string | undefined; limit?: number | undefined; }; }>, ", + "<\"POST /internal/entities/v2/_search/preview\", Zod.ZodObject<{ body: Zod.ZodIntersection>, string, string | undefined>; end: Zod.ZodEffects>, string, string | undefined>; sort: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { field: string; direction: \"ASC\" | \"DESC\"; }, { field: string; direction: \"ASC\" | \"DESC\"; }>>; limit: Zod.ZodDefault>; metadata_fields: Zod.ZodDefault>>; filters: Zod.ZodDefault>>; }, \"strip\", Zod.ZodTypeAny, { start: string; end: string; filters: string[]; limit: number; metadata_fields: string[]; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; }, { start?: string | undefined; end?: string | undefined; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; filters?: string[] | undefined; limit?: number | undefined; metadata_fields?: string[] | undefined; }>, Zod.ZodObject<{ sources: Zod.ZodArray; identity_fields: Zod.ZodArray; metadata_fields: Zod.ZodArray; filters: Zod.ZodArray; timestamp_field: Zod.ZodOptional; display_name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }, { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { sources: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }[]; }, { sources: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }[]; }>>; }, \"strip\", Zod.ZodTypeAny, { body: { start: string; end: string; filters: string[]; limit: number; metadata_fields: string[]; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; } & { sources: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }[]; }; }, { body: { start?: string | undefined; end?: string | undefined; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; filters?: string[] | undefined; limit?: number | undefined; metadata_fields?: string[] | undefined; } & { sources: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }[]; }; }>, ", "EntityManagerRouteHandlerResources", ", ", { @@ -63,7 +135,7 @@ "section": "def-common.ServerRoute", "text": "ServerRoute" }, - "<\"POST /internal/entities/v2/_search\", Zod.ZodObject<{ body: Zod.ZodObject<{ type: Zod.ZodString; metadata_fields: Zod.ZodDefault>>; filters: Zod.ZodDefault>>; start: Zod.ZodEffects>, string, string | undefined>; end: Zod.ZodEffects>, string, string | undefined>; limit: Zod.ZodDefault>; }, \"strip\", Zod.ZodTypeAny, { type: string; start: string; end: string; filters: string[]; limit: number; metadata_fields: string[]; }, { type: string; start?: string | undefined; end?: string | undefined; filters?: string[] | undefined; limit?: number | undefined; metadata_fields?: string[] | undefined; }>; }, \"strip\", Zod.ZodTypeAny, { body: { type: string; start: string; end: string; filters: string[]; limit: number; metadata_fields: string[]; }; }, { body: { type: string; start?: string | undefined; end?: string | undefined; filters?: string[] | undefined; limit?: number | undefined; metadata_fields?: string[] | undefined; }; }>, ", + "<\"POST /internal/entities/v2/_search\", Zod.ZodObject<{ body: Zod.ZodIntersection>, string, string | undefined>; end: Zod.ZodEffects>, string, string | undefined>; sort: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { field: string; direction: \"ASC\" | \"DESC\"; }, { field: string; direction: \"ASC\" | \"DESC\"; }>>; limit: Zod.ZodDefault>; metadata_fields: Zod.ZodDefault>>; filters: Zod.ZodDefault>>; }, \"strip\", Zod.ZodTypeAny, { start: string; end: string; filters: string[]; limit: number; metadata_fields: string[]; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; }, { start?: string | undefined; end?: string | undefined; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; filters?: string[] | undefined; limit?: number | undefined; metadata_fields?: string[] | undefined; }>, Zod.ZodObject<{ type: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { type: string; }, { type: string; }>>; }, \"strip\", Zod.ZodTypeAny, { body: { start: string; end: string; filters: string[]; limit: number; metadata_fields: string[]; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; } & { type: string; }; }, { body: { start?: string | undefined; end?: string | undefined; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; filters?: string[] | undefined; limit?: number | undefined; metadata_fields?: string[] | undefined; } & { type: string; }; }>, ", "EntityManagerRouteHandlerResources", ", ", { @@ -377,7 +449,61 @@ "section": "def-common.ReturnOf", "text": "ReturnOf" }, - "<{ \"POST /internal/entities/v2/_search/preview\": ", + "<{ \"GET /internal/entities/v2/definitions/sources\": { endpoint: \"GET /internal/entities/v2/definitions/sources\"; handler: ServerRouteHandler<", + "EntityManagerRouteHandlerResources", + ", undefined, ", + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.IKibanaResponse", + "text": "IKibanaResponse" + }, + "<{ sources: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }[]; }>>; security?: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.RouteSecurity", + "text": "RouteSecurity" + }, + " | undefined; }; \"POST /internal/entities/v2/definitions/sources\": ", + { + "pluginId": "@kbn/server-route-repository-utils", + "scope": "common", + "docId": "kibKbnServerRouteRepositoryUtilsPluginApi", + "section": "def-common.ServerRoute", + "text": "ServerRoute" + }, + "<\"POST /internal/entities/v2/definitions/sources\", Zod.ZodObject<{ body: Zod.ZodObject<{ source: Zod.ZodObject<{ id: Zod.ZodString; type_id: Zod.ZodString; index_patterns: Zod.ZodArray; identity_fields: Zod.ZodArray; metadata_fields: Zod.ZodArray; filters: Zod.ZodArray; timestamp_field: Zod.ZodOptional; display_name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }, { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }>; }, \"strip\", Zod.ZodTypeAny, { source: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }; }, { source: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }; }>; }, \"strip\", Zod.ZodTypeAny, { body: { source: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }; }; }, { body: { source: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }; }; }>, ", + "EntityManagerRouteHandlerResources", + ", ", + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.IKibanaResponse", + "text": "IKibanaResponse" + }, + "<{ source: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }; }>, undefined>; \"GET /internal/entities/v2/definitions/types\": { endpoint: \"GET /internal/entities/v2/definitions/types\"; handler: ServerRouteHandler<", + "EntityManagerRouteHandlerResources", + ", undefined, ", + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.IKibanaResponse", + "text": "IKibanaResponse" + }, + "<{ types: { id: string; }[]; }>>; security?: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.RouteSecurity", + "text": "RouteSecurity" + }, + " | undefined; }; \"POST /internal/entities/v2/definitions/types\": ", { "pluginId": "@kbn/server-route-repository-utils", "scope": "common", @@ -385,7 +511,25 @@ "section": "def-common.ServerRoute", "text": "ServerRoute" }, - "<\"POST /internal/entities/v2/_search/preview\", Zod.ZodObject<{ body: Zod.ZodObject<{ sources: Zod.ZodArray>; index_patterns: Zod.ZodArray; identity_fields: Zod.ZodArray; metadata_fields: Zod.ZodArray; filters: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { type: string; filters: string[]; timestamp_field: string; metadata_fields: string[]; index_patterns: string[]; identity_fields: string[]; }, { type: string; filters: string[]; metadata_fields: string[]; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; }>, \"many\">; start: Zod.ZodEffects>, string, string | undefined>; end: Zod.ZodEffects>, string, string | undefined>; limit: Zod.ZodDefault>; }, \"strip\", Zod.ZodTypeAny, { start: string; end: string; sources: { type: string; filters: string[]; timestamp_field: string; metadata_fields: string[]; index_patterns: string[]; identity_fields: string[]; }[]; limit: number; }, { sources: { type: string; filters: string[]; metadata_fields: string[]; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; }[]; start?: string | undefined; end?: string | undefined; limit?: number | undefined; }>; }, \"strip\", Zod.ZodTypeAny, { body: { start: string; end: string; sources: { type: string; filters: string[]; timestamp_field: string; metadata_fields: string[]; index_patterns: string[]; identity_fields: string[]; }[]; limit: number; }; }, { body: { sources: { type: string; filters: string[]; metadata_fields: string[]; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; }[]; start?: string | undefined; end?: string | undefined; limit?: number | undefined; }; }>, ", + "<\"POST /internal/entities/v2/definitions/types\", Zod.ZodObject<{ body: Zod.ZodObject<{ type: Zod.ZodObject<{ id: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; }, { id: string; }>; }, \"strip\", Zod.ZodTypeAny, { type: { id: string; }; }, { type: { id: string; }; }>; }, \"strip\", Zod.ZodTypeAny, { body: { type: { id: string; }; }; }, { body: { type: { id: string; }; }; }>, ", + "EntityManagerRouteHandlerResources", + ", ", + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.IKibanaResponse", + "text": "IKibanaResponse" + }, + ", undefined>; \"POST /internal/entities/v2/_search/preview\": ", + { + "pluginId": "@kbn/server-route-repository-utils", + "scope": "common", + "docId": "kibKbnServerRouteRepositoryUtilsPluginApi", + "section": "def-common.ServerRoute", + "text": "ServerRoute" + }, + "<\"POST /internal/entities/v2/_search/preview\", Zod.ZodObject<{ body: Zod.ZodIntersection>, string, string | undefined>; end: Zod.ZodEffects>, string, string | undefined>; sort: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { field: string; direction: \"ASC\" | \"DESC\"; }, { field: string; direction: \"ASC\" | \"DESC\"; }>>; limit: Zod.ZodDefault>; metadata_fields: Zod.ZodDefault>>; filters: Zod.ZodDefault>>; }, \"strip\", Zod.ZodTypeAny, { start: string; end: string; filters: string[]; limit: number; metadata_fields: string[]; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; }, { start?: string | undefined; end?: string | undefined; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; filters?: string[] | undefined; limit?: number | undefined; metadata_fields?: string[] | undefined; }>, Zod.ZodObject<{ sources: Zod.ZodArray; identity_fields: Zod.ZodArray; metadata_fields: Zod.ZodArray; filters: Zod.ZodArray; timestamp_field: Zod.ZodOptional; display_name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }, { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { sources: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }[]; }, { sources: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }[]; }>>; }, \"strip\", Zod.ZodTypeAny, { body: { start: string; end: string; filters: string[]; limit: number; metadata_fields: string[]; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; } & { sources: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }[]; }; }, { body: { start?: string | undefined; end?: string | undefined; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; filters?: string[] | undefined; limit?: number | undefined; metadata_fields?: string[] | undefined; } & { sources: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }[]; }; }>, ", "EntityManagerRouteHandlerResources", ", ", { @@ -411,7 +555,7 @@ "section": "def-common.ServerRoute", "text": "ServerRoute" }, - "<\"POST /internal/entities/v2/_search\", Zod.ZodObject<{ body: Zod.ZodObject<{ type: Zod.ZodString; metadata_fields: Zod.ZodDefault>>; filters: Zod.ZodDefault>>; start: Zod.ZodEffects>, string, string | undefined>; end: Zod.ZodEffects>, string, string | undefined>; limit: Zod.ZodDefault>; }, \"strip\", Zod.ZodTypeAny, { type: string; start: string; end: string; filters: string[]; limit: number; metadata_fields: string[]; }, { type: string; start?: string | undefined; end?: string | undefined; filters?: string[] | undefined; limit?: number | undefined; metadata_fields?: string[] | undefined; }>; }, \"strip\", Zod.ZodTypeAny, { body: { type: string; start: string; end: string; filters: string[]; limit: number; metadata_fields: string[]; }; }, { body: { type: string; start?: string | undefined; end?: string | undefined; filters?: string[] | undefined; limit?: number | undefined; metadata_fields?: string[] | undefined; }; }>, ", + "<\"POST /internal/entities/v2/_search\", Zod.ZodObject<{ body: Zod.ZodIntersection>, string, string | undefined>; end: Zod.ZodEffects>, string, string | undefined>; sort: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { field: string; direction: \"ASC\" | \"DESC\"; }, { field: string; direction: \"ASC\" | \"DESC\"; }>>; limit: Zod.ZodDefault>; metadata_fields: Zod.ZodDefault>>; filters: Zod.ZodDefault>>; }, \"strip\", Zod.ZodTypeAny, { start: string; end: string; filters: string[]; limit: number; metadata_fields: string[]; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; }, { start?: string | undefined; end?: string | undefined; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; filters?: string[] | undefined; limit?: number | undefined; metadata_fields?: string[] | undefined; }>, Zod.ZodObject<{ type: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { type: string; }, { type: string; }>>; }, \"strip\", Zod.ZodTypeAny, { body: { start: string; end: string; filters: string[]; limit: number; metadata_fields: string[]; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; } & { type: string; }; }, { body: { start?: string | undefined; end?: string | undefined; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; filters?: string[] | undefined; limit?: number | undefined; metadata_fields?: string[] | undefined; } & { type: string; }; }>, ", "EntityManagerRouteHandlerResources", ", ", { @@ -1261,6 +1405,36 @@ "interfaces": [], "enums": [], "misc": [ + { + "parentPluginId": "entityManager", + "id": "def-server.CREATE_ENTITY_SOURCE_DEFINITION_PRIVILEGE", + "type": "string", + "tags": [], + "label": "CREATE_ENTITY_SOURCE_DEFINITION_PRIVILEGE", + "description": [], + "signature": [ + "\"create_entity_source_definition\"" + ], + "path": "x-pack/plugins/entity_manager/server/lib/v2/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "entityManager", + "id": "def-server.CREATE_ENTITY_TYPE_DEFINITION_PRIVILEGE", + "type": "string", + "tags": [], + "label": "CREATE_ENTITY_TYPE_DEFINITION_PRIVILEGE", + "description": [], + "signature": [ + "\"create_entity_type_definition\"" + ], + "path": "x-pack/plugins/entity_manager/server/lib/v2/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "entityManager", "id": "def-server.EntityManagerConfig", @@ -1284,7 +1458,25 @@ "label": "EntityManagerRouteRepository", "description": [], "signature": [ - "{ \"POST /internal/entities/v2/_search/preview\": ", + "{ \"GET /internal/entities/v2/definitions/sources\": { endpoint: \"GET /internal/entities/v2/definitions/sources\"; handler: ServerRouteHandler<", + "EntityManagerRouteHandlerResources", + ", undefined, ", + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.IKibanaResponse", + "text": "IKibanaResponse" + }, + "<{ sources: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }[]; }>>; security?: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.RouteSecurity", + "text": "RouteSecurity" + }, + " | undefined; }; \"POST /internal/entities/v2/definitions/sources\": ", { "pluginId": "@kbn/server-route-repository-utils", "scope": "common", @@ -1292,7 +1484,61 @@ "section": "def-common.ServerRoute", "text": "ServerRoute" }, - "<\"POST /internal/entities/v2/_search/preview\", Zod.ZodObject<{ body: Zod.ZodObject<{ sources: Zod.ZodArray>; index_patterns: Zod.ZodArray; identity_fields: Zod.ZodArray; metadata_fields: Zod.ZodArray; filters: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { type: string; filters: string[]; timestamp_field: string; metadata_fields: string[]; index_patterns: string[]; identity_fields: string[]; }, { type: string; filters: string[]; metadata_fields: string[]; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; }>, \"many\">; start: Zod.ZodEffects>, string, string | undefined>; end: Zod.ZodEffects>, string, string | undefined>; limit: Zod.ZodDefault>; }, \"strip\", Zod.ZodTypeAny, { start: string; end: string; sources: { type: string; filters: string[]; timestamp_field: string; metadata_fields: string[]; index_patterns: string[]; identity_fields: string[]; }[]; limit: number; }, { sources: { type: string; filters: string[]; metadata_fields: string[]; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; }[]; start?: string | undefined; end?: string | undefined; limit?: number | undefined; }>; }, \"strip\", Zod.ZodTypeAny, { body: { start: string; end: string; sources: { type: string; filters: string[]; timestamp_field: string; metadata_fields: string[]; index_patterns: string[]; identity_fields: string[]; }[]; limit: number; }; }, { body: { sources: { type: string; filters: string[]; metadata_fields: string[]; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; }[]; start?: string | undefined; end?: string | undefined; limit?: number | undefined; }; }>, ", + "<\"POST /internal/entities/v2/definitions/sources\", Zod.ZodObject<{ body: Zod.ZodObject<{ source: Zod.ZodObject<{ id: Zod.ZodString; type_id: Zod.ZodString; index_patterns: Zod.ZodArray; identity_fields: Zod.ZodArray; metadata_fields: Zod.ZodArray; filters: Zod.ZodArray; timestamp_field: Zod.ZodOptional; display_name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }, { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }>; }, \"strip\", Zod.ZodTypeAny, { source: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }; }, { source: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }; }>; }, \"strip\", Zod.ZodTypeAny, { body: { source: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }; }; }, { body: { source: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }; }; }>, ", + "EntityManagerRouteHandlerResources", + ", ", + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.IKibanaResponse", + "text": "IKibanaResponse" + }, + "<{ source: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }; }>, undefined>; \"GET /internal/entities/v2/definitions/types\": { endpoint: \"GET /internal/entities/v2/definitions/types\"; handler: ServerRouteHandler<", + "EntityManagerRouteHandlerResources", + ", undefined, ", + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.IKibanaResponse", + "text": "IKibanaResponse" + }, + "<{ types: { id: string; }[]; }>>; security?: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.RouteSecurity", + "text": "RouteSecurity" + }, + " | undefined; }; \"POST /internal/entities/v2/definitions/types\": ", + { + "pluginId": "@kbn/server-route-repository-utils", + "scope": "common", + "docId": "kibKbnServerRouteRepositoryUtilsPluginApi", + "section": "def-common.ServerRoute", + "text": "ServerRoute" + }, + "<\"POST /internal/entities/v2/definitions/types\", Zod.ZodObject<{ body: Zod.ZodObject<{ type: Zod.ZodObject<{ id: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; }, { id: string; }>; }, \"strip\", Zod.ZodTypeAny, { type: { id: string; }; }, { type: { id: string; }; }>; }, \"strip\", Zod.ZodTypeAny, { body: { type: { id: string; }; }; }, { body: { type: { id: string; }; }; }>, ", + "EntityManagerRouteHandlerResources", + ", ", + { + "pluginId": "@kbn/core-http-server", + "scope": "server", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-server.IKibanaResponse", + "text": "IKibanaResponse" + }, + ", undefined>; \"POST /internal/entities/v2/_search/preview\": ", + { + "pluginId": "@kbn/server-route-repository-utils", + "scope": "common", + "docId": "kibKbnServerRouteRepositoryUtilsPluginApi", + "section": "def-common.ServerRoute", + "text": "ServerRoute" + }, + "<\"POST /internal/entities/v2/_search/preview\", Zod.ZodObject<{ body: Zod.ZodIntersection>, string, string | undefined>; end: Zod.ZodEffects>, string, string | undefined>; sort: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { field: string; direction: \"ASC\" | \"DESC\"; }, { field: string; direction: \"ASC\" | \"DESC\"; }>>; limit: Zod.ZodDefault>; metadata_fields: Zod.ZodDefault>>; filters: Zod.ZodDefault>>; }, \"strip\", Zod.ZodTypeAny, { start: string; end: string; filters: string[]; limit: number; metadata_fields: string[]; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; }, { start?: string | undefined; end?: string | undefined; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; filters?: string[] | undefined; limit?: number | undefined; metadata_fields?: string[] | undefined; }>, Zod.ZodObject<{ sources: Zod.ZodArray; identity_fields: Zod.ZodArray; metadata_fields: Zod.ZodArray; filters: Zod.ZodArray; timestamp_field: Zod.ZodOptional; display_name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }, { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { sources: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }[]; }, { sources: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }[]; }>>; }, \"strip\", Zod.ZodTypeAny, { body: { start: string; end: string; filters: string[]; limit: number; metadata_fields: string[]; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; } & { sources: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }[]; }; }, { body: { start?: string | undefined; end?: string | undefined; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; filters?: string[] | undefined; limit?: number | undefined; metadata_fields?: string[] | undefined; } & { sources: { id: string; filters: string[]; metadata_fields: string[]; type_id: string; index_patterns: string[]; identity_fields: string[]; timestamp_field?: string | undefined; display_name?: string | undefined; }[]; }; }>, ", "EntityManagerRouteHandlerResources", ", ", { @@ -1318,7 +1564,7 @@ "section": "def-common.ServerRoute", "text": "ServerRoute" }, - "<\"POST /internal/entities/v2/_search\", Zod.ZodObject<{ body: Zod.ZodObject<{ type: Zod.ZodString; metadata_fields: Zod.ZodDefault>>; filters: Zod.ZodDefault>>; start: Zod.ZodEffects>, string, string | undefined>; end: Zod.ZodEffects>, string, string | undefined>; limit: Zod.ZodDefault>; }, \"strip\", Zod.ZodTypeAny, { type: string; start: string; end: string; filters: string[]; limit: number; metadata_fields: string[]; }, { type: string; start?: string | undefined; end?: string | undefined; filters?: string[] | undefined; limit?: number | undefined; metadata_fields?: string[] | undefined; }>; }, \"strip\", Zod.ZodTypeAny, { body: { type: string; start: string; end: string; filters: string[]; limit: number; metadata_fields: string[]; }; }, { body: { type: string; start?: string | undefined; end?: string | undefined; filters?: string[] | undefined; limit?: number | undefined; metadata_fields?: string[] | undefined; }; }>, ", + "<\"POST /internal/entities/v2/_search\", Zod.ZodObject<{ body: Zod.ZodIntersection>, string, string | undefined>; end: Zod.ZodEffects>, string, string | undefined>; sort: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { field: string; direction: \"ASC\" | \"DESC\"; }, { field: string; direction: \"ASC\" | \"DESC\"; }>>; limit: Zod.ZodDefault>; metadata_fields: Zod.ZodDefault>>; filters: Zod.ZodDefault>>; }, \"strip\", Zod.ZodTypeAny, { start: string; end: string; filters: string[]; limit: number; metadata_fields: string[]; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; }, { start?: string | undefined; end?: string | undefined; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; filters?: string[] | undefined; limit?: number | undefined; metadata_fields?: string[] | undefined; }>, Zod.ZodObject<{ type: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { type: string; }, { type: string; }>>; }, \"strip\", Zod.ZodTypeAny, { body: { start: string; end: string; filters: string[]; limit: number; metadata_fields: string[]; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; } & { type: string; }; }, { body: { start?: string | undefined; end?: string | undefined; sort?: { field: string; direction: \"ASC\" | \"DESC\"; } | undefined; filters?: string[] | undefined; limit?: number | undefined; metadata_fields?: string[] | undefined; } & { type: string; }; }>, ", "EntityManagerRouteHandlerResources", ", ", { @@ -1622,6 +1868,51 @@ "deprecated": false, "trackAdoption": false, "initialIsOpen": false + }, + { + "parentPluginId": "entityManager", + "id": "def-server.READ_ENTITIES_PRIVILEGE", + "type": "string", + "tags": [], + "label": "READ_ENTITIES_PRIVILEGE", + "description": [], + "signature": [ + "\"read_entities\"" + ], + "path": "x-pack/plugins/entity_manager/server/lib/v2/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "entityManager", + "id": "def-server.READ_ENTITY_SOURCE_DEFINITION_PRIVILEGE", + "type": "string", + "tags": [], + "label": "READ_ENTITY_SOURCE_DEFINITION_PRIVILEGE", + "description": [], + "signature": [ + "\"read_entity_source_definition\"" + ], + "path": "x-pack/plugins/entity_manager/server/lib/v2/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "entityManager", + "id": "def-server.READ_ENTITY_TYPE_DEFINITION_PRIVILEGE", + "type": "string", + "tags": [], + "label": "READ_ENTITY_TYPE_DEFINITION_PRIVILEGE", + "description": [], + "signature": [ + "\"read_entity_type_definition\"" + ], + "path": "x-pack/plugins/entity_manager/server/lib/v2/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false } ], "objects": [], diff --git a/api_docs/entity_manager.mdx b/api_docs/entity_manager.mdx index 7efd7d6e9b64f..f50584f7f362a 100644 --- a/api_docs/entity_manager.mdx +++ b/api_docs/entity_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/entityManager title: "entityManager" image: https://source.unsplash.com/400x175/?github description: API docs for the entityManager plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'entityManager'] --- import entityManagerObj from './entity_manager.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-entities](https://github.com/orgs/elastic/teams/obs-entiti | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 37 | 0 | 37 | 3 | +| 42 | 0 | 42 | 3 | ## Client diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx index fcf5afade6eff..f309d4fb9419c 100644 --- a/api_docs/es_ui_shared.mdx +++ b/api_docs/es_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esUiShared title: "esUiShared" image: https://source.unsplash.com/400x175/?github description: API docs for the esUiShared plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] --- import esUiSharedObj from './es_ui_shared.devdocs.json'; diff --git a/api_docs/esql.mdx b/api_docs/esql.mdx index 669fa475bce9d..b6df8b06085f1 100644 --- a/api_docs/esql.mdx +++ b/api_docs/esql.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esql title: "esql" image: https://source.unsplash.com/400x175/?github description: API docs for the esql plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esql'] --- import esqlObj from './esql.devdocs.json'; diff --git a/api_docs/esql_data_grid.mdx b/api_docs/esql_data_grid.mdx index 22a045a38154c..11f50f8c71474 100644 --- a/api_docs/esql_data_grid.mdx +++ b/api_docs/esql_data_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esqlDataGrid title: "esqlDataGrid" image: https://source.unsplash.com/400x175/?github description: API docs for the esqlDataGrid plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esqlDataGrid'] --- import esqlDataGridObj from './esql_data_grid.devdocs.json'; diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index 8bba4cee8a710..f496e8286b0fe 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-12-02 +date: 2024-12-05 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 ccd30f6d4f367..292a5f672cbab 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-12-02 +date: 2024-12-05 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 38cb6edc47b4d..109159af2d1bf 100644 --- a/api_docs/event_log.devdocs.json +++ b/api_docs/event_log.devdocs.json @@ -1514,7 +1514,7 @@ "label": "data", "description": [], "signature": [ - "(Readonly<{ log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; error?: Readonly<{ id?: string | undefined; type?: 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; version?: string | undefined; name?: string | undefined; license?: string | undefined; description?: string | undefined; uuid?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; 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; usage?: Readonly<{ request_body_bytes?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; type_id?: string | undefined; } & {}> | undefined; version?: string | undefined; alerting?: Readonly<{ outcome?: string | undefined; status?: 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; 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; backfill?: Readonly<{ id?: string | undefined; start?: string | undefined; interval?: string | undefined; } & {}> | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; flapping?: boolean | undefined; uuid?: string | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; space_ids?: string[] | undefined; server_uuid?: string | undefined; saved_objects?: Readonly<{ id?: string | undefined; type?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; } & {}> | undefined; event?: Readonly<{ id?: string | undefined; type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; duration?: string | number | undefined; code?: string | undefined; severity?: string | number | undefined; category?: string[] | undefined; timezone?: string | undefined; risk_score?: number | undefined; url?: string | undefined; created?: string | undefined; provider?: string | undefined; dataset?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: 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<{ id?: string | undefined; type?: 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; version?: string | undefined; name?: string | undefined; license?: string | undefined; description?: string | undefined; uuid?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; action?: Readonly<{ id?: string | undefined; name?: string | undefined; type_id?: 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; usage?: Readonly<{ request_body_bytes?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; version?: string | undefined; alerting?: Readonly<{ outcome?: string | undefined; status?: 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; 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; backfill?: Readonly<{ id?: string | undefined; start?: string | undefined; interval?: string | undefined; } & {}> | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; flapping?: boolean | undefined; uuid?: string | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; space_ids?: string[] | undefined; server_uuid?: string | undefined; saved_objects?: Readonly<{ id?: string | undefined; type?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; } & {}> | undefined; event?: Readonly<{ id?: string | undefined; type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; duration?: string | number | undefined; code?: string | undefined; severity?: string | number | undefined; category?: string[] | undefined; timezone?: string | undefined; risk_score?: number | undefined; url?: string | undefined; created?: string | undefined; provider?: string | undefined; dataset?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: 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, @@ -1534,7 +1534,7 @@ "label": "IEvent", "description": [], "signature": [ - "DeepPartial | undefined; error?: Readonly<{ id?: string | undefined; type?: 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; version?: string | undefined; name?: string | undefined; license?: string | undefined; description?: string | undefined; uuid?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; 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; usage?: Readonly<{ request_body_bytes?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; type_id?: string | undefined; } & {}> | undefined; version?: string | undefined; alerting?: Readonly<{ outcome?: string | undefined; status?: 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; 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; backfill?: Readonly<{ id?: string | undefined; start?: string | undefined; interval?: string | undefined; } & {}> | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; flapping?: boolean | undefined; uuid?: string | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; space_ids?: string[] | undefined; server_uuid?: string | undefined; saved_objects?: Readonly<{ id?: string | undefined; type?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; } & {}> | undefined; event?: Readonly<{ id?: string | undefined; type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; duration?: string | number | undefined; code?: string | undefined; severity?: string | number | undefined; category?: string[] | undefined; timezone?: string | undefined; risk_score?: number | undefined; url?: string | undefined; created?: string | undefined; provider?: string | undefined; dataset?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: 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<{ id?: string | undefined; type?: 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; version?: string | undefined; name?: string | undefined; license?: string | undefined; description?: string | undefined; uuid?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; action?: Readonly<{ id?: string | undefined; name?: string | undefined; type_id?: 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; usage?: Readonly<{ request_body_bytes?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; version?: string | undefined; alerting?: Readonly<{ outcome?: string | undefined; status?: 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; 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; backfill?: Readonly<{ id?: string | undefined; start?: string | undefined; interval?: string | undefined; } & {}> | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; flapping?: boolean | undefined; uuid?: string | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; space_ids?: string[] | undefined; server_uuid?: string | undefined; saved_objects?: Readonly<{ id?: string | undefined; type?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; } & {}> | undefined; event?: Readonly<{ id?: string | undefined; type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; duration?: string | number | undefined; code?: string | undefined; severity?: string | number | undefined; category?: string[] | undefined; timezone?: string | undefined; risk_score?: number | undefined; url?: string | undefined; created?: string | undefined; provider?: string | undefined; dataset?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: 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, @@ -1549,7 +1549,7 @@ "label": "IValidatedEvent", "description": [], "signature": [ - "Readonly<{ log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; error?: Readonly<{ id?: string | undefined; type?: 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; version?: string | undefined; name?: string | undefined; license?: string | undefined; description?: string | undefined; uuid?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; 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; usage?: Readonly<{ request_body_bytes?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; type_id?: string | undefined; } & {}> | undefined; version?: string | undefined; alerting?: Readonly<{ outcome?: string | undefined; status?: 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; 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; backfill?: Readonly<{ id?: string | undefined; start?: string | undefined; interval?: string | undefined; } & {}> | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; flapping?: boolean | undefined; uuid?: string | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; space_ids?: string[] | undefined; server_uuid?: string | undefined; saved_objects?: Readonly<{ id?: string | undefined; type?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; } & {}> | undefined; event?: Readonly<{ id?: string | undefined; type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; duration?: string | number | undefined; code?: string | undefined; severity?: string | number | undefined; category?: string[] | undefined; timezone?: string | undefined; risk_score?: number | undefined; url?: string | undefined; created?: string | undefined; provider?: string | undefined; dataset?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: 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<{ id?: string | undefined; type?: 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; version?: string | undefined; name?: string | undefined; license?: string | undefined; description?: string | undefined; uuid?: string | undefined; category?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; action?: Readonly<{ id?: string | undefined; name?: string | undefined; type_id?: 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; usage?: Readonly<{ request_body_bytes?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; version?: string | undefined; alerting?: Readonly<{ outcome?: string | undefined; status?: 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; 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; backfill?: Readonly<{ id?: string | undefined; start?: string | undefined; interval?: string | undefined; } & {}> | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; flapping?: boolean | undefined; uuid?: string | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; space_ids?: string[] | undefined; server_uuid?: string | undefined; saved_objects?: Readonly<{ id?: string | undefined; type?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; } & {}> | undefined; event?: Readonly<{ id?: string | undefined; type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; duration?: string | number | undefined; code?: string | undefined; severity?: string | number | undefined; category?: string[] | undefined; timezone?: string | undefined; risk_score?: number | undefined; url?: string | undefined; created?: string | undefined; provider?: string | undefined; dataset?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: 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 00560a4efb53f..6a0a0e1f57232 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-12-02 +date: 2024-12-05 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 e87786e3f4aea..dfe16304652cc 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-12-02 +date: 2024-12-05 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 335719304151a..fc2c49ea0a549 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-12-02 +date: 2024-12-05 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 77841c7c7814e..fe8cf1d70e8da 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-12-02 +date: 2024-12-05 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 90d384ea6ae08..c5b47ba0533fa 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-12-02 +date: 2024-12-05 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 9620716b108c4..6e8caf2c8470a 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-12-02 +date: 2024-12-05 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 8a3faa63eeb8c..bf7bc8c457d54 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-12-02 +date: 2024-12-05 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 0e68dc69e2add..77fa8c8f1bfe7 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-12-02 +date: 2024-12-05 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 23fcd5a29613a..f42788be47536 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-12-02 +date: 2024-12-05 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 08ec0e26950da..9217f8db6d058 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-12-02 +date: 2024-12-05 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 605f277c7dfd3..d61b5f529b8b6 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-12-02 +date: 2024-12-05 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 36adfa9edf262..8e4f6107b4e87 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-12-02 +date: 2024-12-05 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 96ea62727e01a..ae20f22e10cf7 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-12-02 +date: 2024-12-05 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 d6320ffaece86..cd5e581996cd1 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-12-02 +date: 2024-12-05 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 bc75206f6398b..8e1ce15251e29 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-12-02 +date: 2024-12-05 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 30eab3415c0aa..4dae3493adbbc 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions'] --- import expressionsObj from './expressions.devdocs.json'; diff --git a/api_docs/features.devdocs.json b/api_docs/features.devdocs.json index b2c5e5c97a10b..afc982a1c2d43 100644 --- a/api_docs/features.devdocs.json +++ b/api_docs/features.devdocs.json @@ -56,7 +56,7 @@ "label": "config", "description": [], "signature": [ - "Readonly<{ id: string; name: string; description?: string | undefined; category: Readonly<{ id: string; label: string; ariaLabel?: string | undefined; order?: number | undefined; euiIconType?: string | undefined; }>; order?: number | undefined; excludeFromBasePrivileges?: boolean | undefined; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; app: readonly string[]; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: readonly string[] | undefined; cases?: readonly string[] | undefined; privileges: Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }> | null; subFeatures?: readonly Readonly<{ name: string; requireAllSpaces?: boolean | undefined; privilegesTooltip?: string | undefined; privilegeGroups: readonly Readonly<{ groupType: ", + "Readonly<{ id: string; name: string; description?: string | undefined; category: Readonly<{ id: string; label: string; ariaLabel?: string | undefined; order?: number | undefined; euiIconType?: string | undefined; }>; order?: number | undefined; excludeFromBasePrivileges?: boolean | undefined; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; app: readonly string[]; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; cases?: readonly string[] | undefined; privileges: Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }> | null; subFeatures?: readonly Readonly<{ name: string; requireAllSpaces?: boolean | undefined; privilegesTooltip?: string | undefined; privilegeGroups: readonly Readonly<{ groupType: ", { "pluginId": "features", "scope": "common", @@ -64,7 +64,7 @@ "section": "def-common.SubFeaturePrivilegeGroupType", "text": "SubFeaturePrivilegeGroupType" }, - "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"read\" | \"all\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; app?: readonly string[] | undefined; ui: readonly string[]; catalogue?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; description?: string | undefined; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }>[]; }> | undefined; hidden?: boolean | undefined; scope?: readonly ", + "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"read\" | \"all\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; app?: readonly string[] | undefined; ui: readonly string[]; catalogue?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; description?: string | undefined; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }>[]; }> | undefined; hidden?: boolean | undefined; scope?: readonly ", { "pluginId": "features", "scope": "common", @@ -238,7 +238,7 @@ "label": "privileges", "description": [], "signature": [ - "Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }> | null" + "Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }> | null" ], "path": "x-pack/plugins/features/common/kibana_feature.ts", "deprecated": false, @@ -252,7 +252,7 @@ "label": "alerting", "description": [], "signature": [ - "readonly string[] | undefined" + "readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined" ], "path": "x-pack/plugins/features/common/kibana_feature.ts", "deprecated": false, @@ -291,7 +291,7 @@ "label": "reserved", "description": [], "signature": [ - "Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }>[]; }> | undefined" + "Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }>[]; }> | undefined" ], "path": "x-pack/plugins/features/common/kibana_feature.ts", "deprecated": false, @@ -483,7 +483,15 @@ "\nIf your feature requires access to specific Alert Types, then specify your access needs here.\nInclude both Alert Types registered by the feature and external Alert Types such as built-in\nAlert Types and Alert Types provided by other features to which you wish to grant access." ], "signature": [ - "{ rule?: { all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined; alert?: { all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined; } | undefined" + "{ rule?: { all?: ", + "AlertingKibanaPrivilege", + " | undefined; read?: ", + "AlertingKibanaPrivilege", + " | undefined; } | undefined; alert?: { all?: ", + "AlertingKibanaPrivilege", + " | undefined; read?: ", + "AlertingKibanaPrivilege", + " | undefined; } | undefined; } | undefined" ], "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", "deprecated": false, @@ -788,10 +796,11 @@ "tags": [], "label": "alerting", "description": [ - "\nIf your feature grants access to specific Alert Types, you can specify them here to control visibility based on the current space.\nInclude both Alert Types registered by the feature and external Alert Types such as built-in\nAlert Types and Alert Types provided by other features to which you wish to grant access." + "\nIf your feature grants access to specific rule types, you can specify them here to control visibility based on the current space.\nInclude both rule types registered by the feature and external rule types such as built-in\nrule types and rule types provided by other features to which you wish to grant access. For each rule type\nyou can specify the consumers the feature has access to." ], "signature": [ - "readonly string[] | undefined" + "AlertingKibanaPrivilege", + " | undefined" ], "path": "x-pack/plugins/features/common/kibana_feature.ts", "deprecated": false, @@ -1481,7 +1490,7 @@ "label": "config", "description": [], "signature": [ - "Readonly<{ id: string; name: string; description?: string | undefined; category: Readonly<{ id: string; label: string; ariaLabel?: string | undefined; order?: number | undefined; euiIconType?: string | undefined; }>; order?: number | undefined; excludeFromBasePrivileges?: boolean | undefined; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; app: readonly string[]; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: readonly string[] | undefined; cases?: readonly string[] | undefined; privileges: Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }> | null; subFeatures?: readonly Readonly<{ name: string; requireAllSpaces?: boolean | undefined; privilegesTooltip?: string | undefined; privilegeGroups: readonly Readonly<{ groupType: ", + "Readonly<{ id: string; name: string; description?: string | undefined; category: Readonly<{ id: string; label: string; ariaLabel?: string | undefined; order?: number | undefined; euiIconType?: string | undefined; }>; order?: number | undefined; excludeFromBasePrivileges?: boolean | undefined; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; app: readonly string[]; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; cases?: readonly string[] | undefined; privileges: Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }> | null; subFeatures?: readonly Readonly<{ name: string; requireAllSpaces?: boolean | undefined; privilegesTooltip?: string | undefined; privilegeGroups: readonly Readonly<{ groupType: ", { "pluginId": "features", "scope": "common", @@ -1489,7 +1498,7 @@ "section": "def-common.SubFeaturePrivilegeGroupType", "text": "SubFeaturePrivilegeGroupType" }, - "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"read\" | \"all\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; app?: readonly string[] | undefined; ui: readonly string[]; catalogue?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; description?: string | undefined; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }>[]; }> | undefined; hidden?: boolean | undefined; scope?: readonly ", + "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"read\" | \"all\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; app?: readonly string[] | undefined; ui: readonly string[]; catalogue?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; description?: string | undefined; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }>[]; }> | undefined; hidden?: boolean | undefined; scope?: readonly ", { "pluginId": "features", "scope": "common", @@ -1663,7 +1672,7 @@ "label": "privileges", "description": [], "signature": [ - "Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }> | null" + "Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }> | null" ], "path": "x-pack/plugins/features/common/kibana_feature.ts", "deprecated": false, @@ -1677,7 +1686,7 @@ "label": "alerting", "description": [], "signature": [ - "readonly string[] | undefined" + "readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined" ], "path": "x-pack/plugins/features/common/kibana_feature.ts", "deprecated": false, @@ -1716,7 +1725,7 @@ "label": "reserved", "description": [], "signature": [ - "Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }>[]; }> | undefined" + "Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }>[]; }> | undefined" ], "path": "x-pack/plugins/features/common/kibana_feature.ts", "deprecated": false, @@ -2087,7 +2096,15 @@ "\nIf your feature requires access to specific Alert Types, then specify your access needs here.\nInclude both Alert Types registered by the feature and external Alert Types such as built-in\nAlert Types and Alert Types provided by other features to which you wish to grant access." ], "signature": [ - "{ rule?: { all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined; alert?: { all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined; } | undefined" + "{ rule?: { all?: ", + "AlertingKibanaPrivilege", + " | undefined; read?: ", + "AlertingKibanaPrivilege", + " | undefined; } | undefined; alert?: { all?: ", + "AlertingKibanaPrivilege", + " | undefined; read?: ", + "AlertingKibanaPrivilege", + " | undefined; } | undefined; } | undefined" ], "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", "deprecated": false, @@ -2975,10 +2992,11 @@ "tags": [], "label": "alerting", "description": [ - "\nIf your feature grants access to specific Alert Types, you can specify them here to control visibility based on the current space.\nInclude both Alert Types registered by the feature and external Alert Types such as built-in\nAlert Types and Alert Types provided by other features to which you wish to grant access." + "\nIf your feature grants access to specific rule types, you can specify them here to control visibility based on the current space.\nInclude both rule types registered by the feature and external rule types such as built-in\nrule types and rule types provided by other features to which you wish to grant access. For each rule type\nyou can specify the consumers the feature has access to." ], "signature": [ - "readonly string[] | undefined" + "AlertingKibanaPrivilege", + " | undefined" ], "path": "x-pack/plugins/features/common/kibana_feature.ts", "deprecated": false, @@ -3502,7 +3520,7 @@ "label": "config", "description": [], "signature": [ - "Readonly<{ id: string; name: string; description?: string | undefined; category: Readonly<{ id: string; label: string; ariaLabel?: string | undefined; order?: number | undefined; euiIconType?: string | undefined; }>; order?: number | undefined; excludeFromBasePrivileges?: boolean | undefined; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; app: readonly string[]; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: readonly string[] | undefined; cases?: readonly string[] | undefined; privileges: Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }> | null; subFeatures?: readonly Readonly<{ name: string; requireAllSpaces?: boolean | undefined; privilegesTooltip?: string | undefined; privilegeGroups: readonly Readonly<{ groupType: ", + "Readonly<{ id: string; name: string; description?: string | undefined; category: Readonly<{ id: string; label: string; ariaLabel?: string | undefined; order?: number | undefined; euiIconType?: string | undefined; }>; order?: number | undefined; excludeFromBasePrivileges?: boolean | undefined; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; app: readonly string[]; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; alerting?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; cases?: readonly string[] | undefined; privileges: Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }> | null; subFeatures?: readonly Readonly<{ name: string; requireAllSpaces?: boolean | undefined; privilegesTooltip?: string | undefined; privilegeGroups: readonly Readonly<{ groupType: ", { "pluginId": "features", "scope": "common", @@ -3510,7 +3528,7 @@ "section": "def-common.SubFeaturePrivilegeGroupType", "text": "SubFeaturePrivilegeGroupType" }, - "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"read\" | \"all\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; app?: readonly string[] | undefined; ui: readonly string[]; catalogue?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; description?: string | undefined; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }>[]; }> | undefined; hidden?: boolean | undefined; scope?: readonly ", + "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"read\" | \"all\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; app?: readonly string[] | undefined; ui: readonly string[]; catalogue?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; description?: string | undefined; }>[] | undefined; privilegesTooltip?: string | undefined; reserved?: Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }>[]; }> | undefined; hidden?: boolean | undefined; scope?: readonly ", { "pluginId": "features", "scope": "common", @@ -3684,7 +3702,7 @@ "label": "privileges", "description": [], "signature": [ - "Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }> | null" + "Readonly<{ all: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; read: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }> | null" ], "path": "x-pack/plugins/features/common/kibana_feature.ts", "deprecated": false, @@ -3698,7 +3716,7 @@ "label": "alerting", "description": [], "signature": [ - "readonly string[] | undefined" + "readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined" ], "path": "x-pack/plugins/features/common/kibana_feature.ts", "deprecated": false, @@ -3737,7 +3755,7 @@ "label": "reserved", "description": [], "signature": [ - "Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }>[]; }> | undefined" + "Readonly<{ description: string; privileges: readonly Readonly<{ id: string; privilege: Readonly<{ excludeFromBasePrivileges?: boolean | undefined; requireAllSpaces?: boolean | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; catalogue?: readonly string[] | undefined; api?: readonly string[] | undefined; app?: readonly string[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; ui: readonly string[]; composedOf?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | Readonly<{ default: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; minimal: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[]; }> | undefined; }>; }>[]; }> | undefined" ], "path": "x-pack/plugins/features/common/kibana_feature.ts", "deprecated": false, @@ -3832,7 +3850,7 @@ "section": "def-common.SubFeaturePrivilegeGroupType", "text": "SubFeaturePrivilegeGroupType" }, - "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"read\" | \"all\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; app?: readonly string[] | undefined; ui: readonly string[]; catalogue?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; description?: string | undefined; }>" + "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"read\" | \"all\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; app?: readonly string[] | undefined; ui: readonly string[]; catalogue?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; description?: string | undefined; }>" ], "path": "x-pack/plugins/features/common/sub_feature.ts", "deprecated": false, @@ -3869,7 +3887,7 @@ "section": "def-common.SubFeaturePrivilegeGroupType", "text": "SubFeaturePrivilegeGroupType" }, - "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"read\" | \"all\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; app?: readonly string[] | undefined; ui: readonly string[]; catalogue?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]" + "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"read\" | \"all\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; app?: readonly string[] | undefined; ui: readonly string[]; catalogue?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]" ], "path": "x-pack/plugins/features/common/sub_feature.ts", "deprecated": false, @@ -3913,7 +3931,7 @@ "section": "def-common.SubFeaturePrivilegeGroupType", "text": "SubFeaturePrivilegeGroupType" }, - "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"read\" | \"all\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly string[] | undefined; read?: readonly string[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; app?: readonly string[] | undefined; ui: readonly string[]; catalogue?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; description?: string | undefined; }" + "; privileges: readonly Readonly<{ id: string; name: string; includeIn: \"none\" | \"read\" | \"all\"; minimumLicense?: \"basic\" | \"standard\" | \"gold\" | \"platinum\" | \"enterprise\" | \"trial\" | undefined; replacedBy?: readonly Readonly<{ feature: string; privileges: readonly string[]; }>[] | undefined; alerting?: Readonly<{ rule?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; alert?: Readonly<{ all?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; read?: readonly Readonly<{ ruleTypeId: string; consumers: readonly string[]; }>[] | undefined; }> | undefined; }> | undefined; cases?: Readonly<{ all?: readonly string[] | undefined; push?: readonly string[] | undefined; create?: readonly string[] | undefined; read?: readonly string[] | undefined; update?: readonly string[] | undefined; delete?: readonly string[] | undefined; settings?: readonly string[] | undefined; createComment?: readonly string[] | undefined; reopenCase?: readonly string[] | undefined; }> | undefined; disabled?: boolean | undefined; management?: Readonly<{ [x: string]: readonly string[]; }> | undefined; app?: readonly string[] | undefined; ui: readonly string[]; catalogue?: readonly string[] | undefined; requireAllSpaces?: boolean | undefined; api?: readonly string[] | undefined; savedObject: Readonly<{ all: readonly string[]; read: readonly string[]; }>; }>[]; }>[]; description?: string | undefined; }" ], "path": "x-pack/plugins/features/common/sub_feature.ts", "deprecated": false, @@ -4241,7 +4259,15 @@ "\nIf your feature requires access to specific Alert Types, then specify your access needs here.\nInclude both Alert Types registered by the feature and external Alert Types such as built-in\nAlert Types and Alert Types provided by other features to which you wish to grant access." ], "signature": [ - "{ rule?: { all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined; alert?: { all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined; } | undefined" + "{ rule?: { all?: ", + "AlertingKibanaPrivilege", + " | undefined; read?: ", + "AlertingKibanaPrivilege", + " | undefined; } | undefined; alert?: { all?: ", + "AlertingKibanaPrivilege", + " | undefined; read?: ", + "AlertingKibanaPrivilege", + " | undefined; } | undefined; } | undefined" ], "path": "x-pack/plugins/features/common/feature_kibana_privileges.ts", "deprecated": false, @@ -4591,10 +4617,11 @@ "tags": [], "label": "alerting", "description": [ - "\nIf your feature grants access to specific Alert Types, you can specify them here to control visibility based on the current space.\nInclude both Alert Types registered by the feature and external Alert Types such as built-in\nAlert Types and Alert Types provided by other features to which you wish to grant access." + "\nIf your feature grants access to specific rule types, you can specify them here to control visibility based on the current space.\nInclude both rule types registered by the feature and external rule types such as built-in\nrule types and rule types provided by other features to which you wish to grant access. For each rule type\nyou can specify the consumers the feature has access to." ], "signature": [ - "readonly string[] | undefined" + "AlertingKibanaPrivilege", + " | undefined" ], "path": "x-pack/plugins/features/common/kibana_feature.ts", "deprecated": false, diff --git a/api_docs/features.mdx b/api_docs/features.mdx index 9ed816468542c..8519484bec428 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features'] --- import featuresObj from './features.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 | |-------------------|-----------|------------------------|-----------------| -| 270 | 0 | 110 | 2 | +| 270 | 0 | 110 | 3 | ## Client diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx index e16f0773d4cb7..8f9409bcf4e65 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] --- import fieldFormatsObj from './field_formats.devdocs.json'; diff --git a/api_docs/fields_metadata.mdx b/api_docs/fields_metadata.mdx index 9685d9e70ef01..b520762cb0979 100644 --- a/api_docs/fields_metadata.mdx +++ b/api_docs/fields_metadata.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldsMetadata title: "fieldsMetadata" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldsMetadata plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldsMetadata'] --- import fieldsMetadataObj from './fields_metadata.devdocs.json'; diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index 4c1986d81fe04..c7008a3d269fa 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-12-02 +date: 2024-12-05 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 1fc9889e94e09..af0071c018d86 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-12-02 +date: 2024-12-05 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 420fb198d042e..faae03200d380 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-12-02 +date: 2024-12-05 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 670bd13f2f0c9..fdd4aea83eeb4 100644 --- a/api_docs/fleet.devdocs.json +++ b/api_docs/fleet.devdocs.json @@ -9243,6 +9243,61 @@ ], "returnComment": [] }, + { + "parentPluginId": "fleet", + "id": "def-server.PackageClient.getLatestPackageInfo", + "type": "Function", + "tags": [], + "label": "getLatestPackageInfo", + "description": [], + "signature": [ + "(packageName: string, prerelease?: boolean | undefined) => Promise<", + { + "pluginId": "fleet", + "scope": "common", + "docId": "kibFleetPluginApi", + "section": "def-common.PackageInfo", + "text": "PackageInfo" + }, + ">" + ], + "path": "x-pack/plugins/fleet/server/services/epm/package_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-server.PackageClient.getLatestPackageInfo.$1", + "type": "string", + "tags": [], + "label": "packageName", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/plugins/fleet/server/services/epm/package_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "fleet", + "id": "def-server.PackageClient.getLatestPackageInfo.$2", + "type": "CompoundType", + "tags": [], + "label": "prerelease", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/fleet/server/services/epm/package_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + }, { "parentPluginId": "fleet", "id": "def-server.PackageClient.getPackages", @@ -24389,7 +24444,7 @@ "label": "monitoring_http", "description": [], "signature": [ - "{ enabled: boolean; host?: string | undefined; port?: number | undefined; buffer?: { enabled: boolean; } | undefined; } | undefined" + "{ enabled?: boolean | undefined; host?: string | undefined; port?: number | undefined; buffer?: { enabled: boolean; } | undefined; } | undefined" ], "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", "deprecated": false, diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index 84b1bb5988c3b..fecbc7e88e1c9 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-12-02 +date: 2024-12-05 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 | |-------------------|-----------|------------------------|-----------------| -| 1432 | 5 | 1306 | 82 | +| 1435 | 5 | 1309 | 82 | ## Client diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index b7b901b2dcf17..c8c37b5fd2b64 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-12-02 +date: 2024-12-05 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 5b17c772452da..eeea8aed87340 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-12-02 +date: 2024-12-05 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 a7a90000ac2ed..353208af2fcfe 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-12-02 +date: 2024-12-05 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 a0169068032bb..8c6493d6cb739 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-12-02 +date: 2024-12-05 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 0a07356d9dbc5..676529442492a 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexLifecycleManagement plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] --- import indexLifecycleManagementObj from './index_lifecycle_management.devdocs.json'; diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index dfc0413bfb207..246349bd87696 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexManagement plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] --- import indexManagementObj from './index_management.devdocs.json'; diff --git a/api_docs/inference.devdocs.json b/api_docs/inference.devdocs.json index 340b5e87d7f0d..4cf16dcfec9bf 100644 --- a/api_docs/inference.devdocs.json +++ b/api_docs/inference.devdocs.json @@ -738,11 +738,13 @@ "type": "Function", "tags": [], "label": "correctCommonEsqlMistakes", - "description": [], + "description": [ + "\nCorrect some common ES|QL syntax and grammar mistakes that LLM can potentially do.\n\nCorrecting the query is done in two steps:\n1. we try to correct the *syntax*, without AST (given it requires a valid syntax)\n2. we try to correct the *grammar*, using AST this time." + ], "signature": [ - "(query: string) => { isCorrection: boolean; input: string; output: string; }" + "(query: string) => { input: string; output: string; isCorrection: boolean; }" ], - "path": "x-pack/plugins/inference/common/tasks/nl_to_esql/correct_common_esql_mistakes.ts", + "path": "x-pack/plugins/inference/common/tasks/nl_to_esql/correct_esql_query.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -756,7 +758,7 @@ "signature": [ "string" ], - "path": "x-pack/plugins/inference/common/tasks/nl_to_esql/correct_common_esql_mistakes.ts", + "path": "x-pack/plugins/inference/common/tasks/nl_to_esql/correct_esql_query.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -929,7 +931,7 @@ "signature": [ "(query: string) => { name: string | undefined; command: string; }[]" ], - "path": "x-pack/plugins/inference/common/tasks/nl_to_esql/correct_common_esql_mistakes.ts", + "path": "x-pack/plugins/inference/common/tasks/nl_to_esql/non_ast/correct_common_esql_mistakes.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -943,7 +945,7 @@ "signature": [ "string" ], - "path": "x-pack/plugins/inference/common/tasks/nl_to_esql/correct_common_esql_mistakes.ts", + "path": "x-pack/plugins/inference/common/tasks/nl_to_esql/non_ast/correct_common_esql_mistakes.ts", "deprecated": false, "trackAdoption": false, "isRequired": true diff --git a/api_docs/inference.mdx b/api_docs/inference.mdx index 0fcafbc50562e..bd88e1d2395c0 100644 --- a/api_docs/inference.mdx +++ b/api_docs/inference.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/inference title: "inference" image: https://source.unsplash.com/400x175/?github description: API docs for the inference plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inference'] --- import inferenceObj from './inference.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/appex-ai-infra](https://github.com/orgs/elastic/teams/appex-ai | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 40 | 0 | 29 | 6 | +| 40 | 0 | 28 | 6 | ## Client diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index b195e8b88dd9d..c7bdce7d50ea3 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-12-02 +date: 2024-12-05 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 ec2934655b168..8caea386dffa0 100644 --- a/api_docs/ingest_pipelines.mdx +++ b/api_docs/ingest_pipelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ingestPipelines title: "ingestPipelines" image: https://source.unsplash.com/400x175/?github description: API docs for the ingestPipelines plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ingestPipelines'] --- import ingestPipelinesObj from './ingest_pipelines.devdocs.json'; diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index 9c2207a3c348a..db766c7df9012 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] --- import inspectorObj from './inspector.devdocs.json'; diff --git a/api_docs/integration_assistant.devdocs.json b/api_docs/integration_assistant.devdocs.json index 37870e95e8e94..3c6f41d4c4c03 100644 --- a/api_docs/integration_assistant.devdocs.json +++ b/api_docs/integration_assistant.devdocs.json @@ -318,7 +318,7 @@ "label": "AnalyzeLogsResponse", "description": [], "signature": [ - "{ results: { samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; parsedSamples: string[]; }; additionalProcessors?: ", + "{ results: { samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; parsedSamples: string[]; }; additionalProcessors?: ", { "pluginId": "integrationAssistant", "scope": "common", @@ -357,7 +357,7 @@ "section": "def-common.ESProcessorItem", "text": "ESProcessorItem" }, - "[] | undefined; }; docs: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }[]; logo?: string | undefined; }; }" + "[] | undefined; }; docs: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }[]; logo?: string | undefined; }; }" ], "path": "x-pack/plugins/integration_assistant/common/api/build_integration/build_integration.gen.ts", "deprecated": false, @@ -384,7 +384,7 @@ "label": "CategorizationRequestBody", "description": [], "signature": [ - "{ connectorId: string; packageName: string; rawSamples: string[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; dataStreamName: string; currentPipeline: { processors: ", + "{ connectorId: string; packageName: string; rawSamples: string[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; dataStreamName: string; currentPipeline: { processors: ", { "pluginId": "integrationAssistant", "scope": "common", @@ -581,7 +581,7 @@ "section": "def-common.ESProcessorItem", "text": "ESProcessorItem" }, - "[] | undefined; }; docs: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }" + "[] | undefined; }; docs: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }" ], "path": "x-pack/plugins/integration_assistant/common/api/model/common_attributes.gen.ts", "deprecated": false, @@ -625,7 +625,7 @@ "label": "EcsMappingRequestBody", "description": [], "signature": [ - "{ connectorId: string; packageName: string; rawSamples: string[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; dataStreamName: string; langSmithOptions?: { apiKey: string; projectName: string; } | undefined; mapping?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; additionalProcessors?: ", + "{ connectorId: string; packageName: string; rawSamples: string[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; dataStreamName: string; langSmithOptions?: { apiKey: string; projectName: string; } | undefined; mapping?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; additionalProcessors?: ", { "pluginId": "integrationAssistant", "scope": "common", @@ -714,7 +714,7 @@ "section": "def-common.ESProcessorItem", "text": "ESProcessorItem" }, - "[] | undefined; }; docs: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }[]; logo?: string | undefined; }" + "[] | undefined; }; docs: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }[]; logo?: string | undefined; }" ], "path": "x-pack/plugins/integration_assistant/common/api/model/common_attributes.gen.ts", "deprecated": false, @@ -848,7 +848,7 @@ "label": "RelatedRequestBody", "description": [], "signature": [ - "{ connectorId: string; packageName: string; rawSamples: string[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; dataStreamName: string; currentPipeline: { processors: ", + "{ connectorId: string; packageName: string; rawSamples: string[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; dataStreamName: string; currentPipeline: { processors: ", { "pluginId": "integrationAssistant", "scope": "common", @@ -912,7 +912,7 @@ "\nFormat of the provided log samples." ], "signature": [ - "{ name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }" + "{ name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }" ], "path": "x-pack/plugins/integration_assistant/common/api/model/common_attributes.gen.ts", "deprecated": false, @@ -929,7 +929,7 @@ "\nThe name of the log samples format." ], "signature": [ - "\"ndjson\" | \"json\" | \"csv\" | \"structured\" | \"unstructured\" | \"unsupported\"" + "\"ndjson\" | \"json\" | \"csv\" | \"structured\" | \"unstructured\" | \"unsupported\" | \"cef\"" ], "path": "x-pack/plugins/integration_assistant/common/api/model/common_attributes.gen.ts", "deprecated": false, @@ -971,7 +971,7 @@ }, ", Zod.ZodTypeDef, ", "ESProcessorItemInput", - ">, \"many\">>; results: Zod.ZodObject<{ samplesFormat: Zod.ZodObject<{ name: Zod.ZodEnum<[\"ndjson\", \"json\", \"csv\", \"structured\", \"unstructured\", \"unsupported\"]>; multiline: Zod.ZodOptional; header: Zod.ZodOptional; columns: Zod.ZodOptional>; json_path: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }>; parsedSamples: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; parsedSamples: string[]; }, { samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; parsedSamples: string[]; }>; }, \"strip\", Zod.ZodTypeAny, { results: { samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; parsedSamples: string[]; }; additionalProcessors?: ", + ">, \"many\">>; results: Zod.ZodObject<{ samplesFormat: Zod.ZodObject<{ name: Zod.ZodEnum<[\"ndjson\", \"json\", \"csv\", \"structured\", \"unstructured\", \"unsupported\", \"cef\"]>; multiline: Zod.ZodOptional; header: Zod.ZodOptional; columns: Zod.ZodOptional>; json_path: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }>; parsedSamples: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; parsedSamples: string[]; }, { samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; parsedSamples: string[]; }>; }, \"strip\", Zod.ZodTypeAny, { results: { samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; parsedSamples: string[]; }; additionalProcessors?: ", { "pluginId": "integrationAssistant", "scope": "common", @@ -979,7 +979,7 @@ "section": "def-common.ESProcessorItem", "text": "ESProcessorItem" }, - "[] | undefined; }, { results: { samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; parsedSamples: string[]; }; additionalProcessors?: ", + "[] | undefined; }, { results: { samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; parsedSamples: string[]; }; additionalProcessors?: ", "ESProcessorItemInput", "[] | undefined; }>" ], @@ -1036,7 +1036,7 @@ "ESProcessorItemInput", "[]; version?: number | undefined; name?: string | undefined; description?: string | undefined; on_failure?: ", "ESProcessorItemInput", - "[] | undefined; }>; docs: Zod.ZodArray, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>, \"many\">; samplesFormat: Zod.ZodObject<{ name: Zod.ZodEnum<[\"ndjson\", \"json\", \"csv\", \"structured\", \"unstructured\", \"unsupported\"]>; multiline: Zod.ZodOptional; header: Zod.ZodOptional; columns: Zod.ZodOptional>; json_path: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }>; celInput: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>; redactVars: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; }, { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; }>>; }, \"strip\", Zod.ZodTypeAny, { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", + "[] | undefined; }>; docs: Zod.ZodArray, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>, \"many\">; samplesFormat: Zod.ZodObject<{ name: Zod.ZodEnum<[\"ndjson\", \"json\", \"csv\", \"structured\", \"unstructured\", \"unsupported\", \"cef\"]>; multiline: Zod.ZodOptional; header: Zod.ZodOptional; columns: Zod.ZodOptional>; json_path: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }>; celInput: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>; redactVars: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; }, { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; }>>; }, \"strip\", Zod.ZodTypeAny, { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", { "pluginId": "integrationAssistant", "scope": "common", @@ -1052,11 +1052,11 @@ "section": "def-common.ESProcessorItem", "text": "ESProcessorItem" }, - "[] | undefined; }; docs: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }, { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", + "[] | undefined; }; docs: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }, { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", "ESProcessorItemInput", "[]; version?: number | undefined; name?: string | undefined; description?: string | undefined; on_failure?: ", "ESProcessorItemInput", - "[] | undefined; }; docs: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }>, \"many\">; logo: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { name: string; title: string; description: string; dataStreams: { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", + "[] | undefined; }; docs: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }>, \"many\">; logo: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { name: string; title: string; description: string; dataStreams: { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", { "pluginId": "integrationAssistant", "scope": "common", @@ -1072,11 +1072,11 @@ "section": "def-common.ESProcessorItem", "text": "ESProcessorItem" }, - "[] | undefined; }; docs: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }[]; logo?: string | undefined; }, { name: string; title: string; description: string; dataStreams: { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", + "[] | undefined; }; docs: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }[]; logo?: string | undefined; }, { name: string; title: string; description: string; dataStreams: { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", "ESProcessorItemInput", "[]; version?: number | undefined; name?: string | undefined; description?: string | undefined; on_failure?: ", "ESProcessorItemInput", - "[] | undefined; }; docs: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }[]; logo?: string | undefined; }>; }, \"strip\", Zod.ZodTypeAny, { integration: { name: string; title: string; description: string; dataStreams: { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", + "[] | undefined; }; docs: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }[]; logo?: string | undefined; }>; }, \"strip\", Zod.ZodTypeAny, { integration: { name: string; title: string; description: string; dataStreams: { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", { "pluginId": "integrationAssistant", "scope": "common", @@ -1092,11 +1092,11 @@ "section": "def-common.ESProcessorItem", "text": "ESProcessorItem" }, - "[] | undefined; }; docs: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }[]; logo?: string | undefined; }; }, { integration: { name: string; title: string; description: string; dataStreams: { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", + "[] | undefined; }; docs: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }[]; logo?: string | undefined; }; }, { integration: { name: string; title: string; description: string; dataStreams: { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", "ESProcessorItemInput", "[]; version?: number | undefined; name?: string | undefined; description?: string | undefined; on_failure?: ", "ESProcessorItemInput", - "[] | undefined; }; docs: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }[]; logo?: string | undefined; }; }>" + "[] | undefined; }; docs: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }[]; logo?: string | undefined; }; }>" ], "path": "x-pack/plugins/integration_assistant/common/api/build_integration/build_integration.gen.ts", "deprecated": false, @@ -1151,7 +1151,7 @@ "ESProcessorItemInput", "[]; version?: number | undefined; name?: string | undefined; description?: string | undefined; on_failure?: ", "ESProcessorItemInput", - "[] | undefined; }>; connectorId: Zod.ZodString; samplesFormat: Zod.ZodObject<{ name: Zod.ZodEnum<[\"ndjson\", \"json\", \"csv\", \"structured\", \"unstructured\", \"unsupported\"]>; multiline: Zod.ZodOptional; header: Zod.ZodOptional; columns: Zod.ZodOptional>; json_path: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }>; langSmithOptions: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; packageName: string; rawSamples: string[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; dataStreamName: string; currentPipeline: { processors: ", + "[] | undefined; }>; connectorId: Zod.ZodString; samplesFormat: Zod.ZodObject<{ name: Zod.ZodEnum<[\"ndjson\", \"json\", \"csv\", \"structured\", \"unstructured\", \"unsupported\", \"cef\"]>; multiline: Zod.ZodOptional; header: Zod.ZodOptional; columns: Zod.ZodOptional>; json_path: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }>; langSmithOptions: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; packageName: string; rawSamples: string[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; dataStreamName: string; currentPipeline: { processors: ", { "pluginId": "integrationAssistant", "scope": "common", @@ -1167,7 +1167,7 @@ "section": "def-common.ESProcessorItem", "text": "ESProcessorItem" }, - "[] | undefined; }; langSmithOptions?: { apiKey: string; projectName: string; } | undefined; }, { connectorId: string; packageName: string; rawSamples: string[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; dataStreamName: string; currentPipeline: { processors: ", + "[] | undefined; }; langSmithOptions?: { apiKey: string; projectName: string; } | undefined; }, { connectorId: string; packageName: string; rawSamples: string[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; dataStreamName: string; currentPipeline: { processors: ", "ESProcessorItemInput", "[]; version?: number | undefined; name?: string | undefined; description?: string | undefined; on_failure?: ", "ESProcessorItemInput", @@ -1456,7 +1456,7 @@ "ESProcessorItemInput", "[]; version?: number | undefined; name?: string | undefined; description?: string | undefined; on_failure?: ", "ESProcessorItemInput", - "[] | undefined; }>; docs: Zod.ZodArray, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>, \"many\">; samplesFormat: Zod.ZodObject<{ name: Zod.ZodEnum<[\"ndjson\", \"json\", \"csv\", \"structured\", \"unstructured\", \"unsupported\"]>; multiline: Zod.ZodOptional; header: Zod.ZodOptional; columns: Zod.ZodOptional>; json_path: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }>; celInput: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>; redactVars: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; }, { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; }>>; }, \"strip\", Zod.ZodTypeAny, { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", + "[] | undefined; }>; docs: Zod.ZodArray, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>, \"many\">; samplesFormat: Zod.ZodObject<{ name: Zod.ZodEnum<[\"ndjson\", \"json\", \"csv\", \"structured\", \"unstructured\", \"unsupported\", \"cef\"]>; multiline: Zod.ZodOptional; header: Zod.ZodOptional; columns: Zod.ZodOptional>; json_path: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }>; celInput: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>; redactVars: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; }, { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; }>>; }, \"strip\", Zod.ZodTypeAny, { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", { "pluginId": "integrationAssistant", "scope": "common", @@ -1472,11 +1472,11 @@ "section": "def-common.ESProcessorItem", "text": "ESProcessorItem" }, - "[] | undefined; }; docs: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }, { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", + "[] | undefined; }; docs: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }, { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", "ESProcessorItemInput", "[]; version?: number | undefined; name?: string | undefined; description?: string | undefined; on_failure?: ", "ESProcessorItemInput", - "[] | undefined; }; docs: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }>" + "[] | undefined; }; docs: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }>" ], "path": "x-pack/plugins/integration_assistant/common/api/model/common_attributes.gen.ts", "deprecated": false, @@ -1506,7 +1506,7 @@ "label": "EcsMappingRequestBody", "description": [], "signature": [ - "Zod.ZodObject<{ packageName: Zod.ZodString; dataStreamName: Zod.ZodString; rawSamples: Zod.ZodArray; samplesFormat: Zod.ZodObject<{ name: Zod.ZodEnum<[\"ndjson\", \"json\", \"csv\", \"structured\", \"unstructured\", \"unsupported\"]>; multiline: Zod.ZodOptional; header: Zod.ZodOptional; columns: Zod.ZodOptional>; json_path: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }>; mapping: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; additionalProcessors: Zod.ZodOptional; samplesFormat: Zod.ZodObject<{ name: Zod.ZodEnum<[\"ndjson\", \"json\", \"csv\", \"structured\", \"unstructured\", \"unsupported\", \"cef\"]>; multiline: Zod.ZodOptional; header: Zod.ZodOptional; columns: Zod.ZodOptional>; json_path: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }>; mapping: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>>; additionalProcessors: Zod.ZodOptional, \"many\">>; connectorId: Zod.ZodString; langSmithOptions: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; packageName: string; rawSamples: string[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; dataStreamName: string; langSmithOptions?: { apiKey: string; projectName: string; } | undefined; mapping?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; additionalProcessors?: ", + ">, \"many\">>; connectorId: Zod.ZodString; langSmithOptions: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; packageName: string; rawSamples: string[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; dataStreamName: string; langSmithOptions?: { apiKey: string; projectName: string; } | undefined; mapping?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; additionalProcessors?: ", { "pluginId": "integrationAssistant", "scope": "common", @@ -1524,7 +1524,7 @@ "section": "def-common.ESProcessorItem", "text": "ESProcessorItem" }, - "[] | undefined; }, { connectorId: string; packageName: string; rawSamples: string[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; dataStreamName: string; langSmithOptions?: { apiKey: string; projectName: string; } | undefined; mapping?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; additionalProcessors?: ", + "[] | undefined; }, { connectorId: string; packageName: string; rawSamples: string[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; dataStreamName: string; langSmithOptions?: { apiKey: string; projectName: string; } | undefined; mapping?: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; additionalProcessors?: ", "ESProcessorItemInput", "[] | undefined; }>" ], @@ -1716,7 +1716,7 @@ "ESProcessorItemInput", "[]; version?: number | undefined; name?: string | undefined; description?: string | undefined; on_failure?: ", "ESProcessorItemInput", - "[] | undefined; }>; docs: Zod.ZodArray, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>, \"many\">; samplesFormat: Zod.ZodObject<{ name: Zod.ZodEnum<[\"ndjson\", \"json\", \"csv\", \"structured\", \"unstructured\", \"unsupported\"]>; multiline: Zod.ZodOptional; header: Zod.ZodOptional; columns: Zod.ZodOptional>; json_path: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }>; celInput: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>; redactVars: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; }, { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; }>>; }, \"strip\", Zod.ZodTypeAny, { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", + "[] | undefined; }>; docs: Zod.ZodArray, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>, \"many\">; samplesFormat: Zod.ZodObject<{ name: Zod.ZodEnum<[\"ndjson\", \"json\", \"csv\", \"structured\", \"unstructured\", \"unsupported\", \"cef\"]>; multiline: Zod.ZodOptional; header: Zod.ZodOptional; columns: Zod.ZodOptional>; json_path: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }>; celInput: Zod.ZodOptional, Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">>; redactVars: Zod.ZodArray; }, \"strip\", Zod.ZodTypeAny, { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; }, { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; }>>; }, \"strip\", Zod.ZodTypeAny, { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", { "pluginId": "integrationAssistant", "scope": "common", @@ -1732,11 +1732,11 @@ "section": "def-common.ESProcessorItem", "text": "ESProcessorItem" }, - "[] | undefined; }; docs: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }, { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", + "[] | undefined; }; docs: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }, { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", "ESProcessorItemInput", "[]; version?: number | undefined; name?: string | undefined; description?: string | undefined; on_failure?: ", "ESProcessorItemInput", - "[] | undefined; }; docs: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }>, \"many\">; logo: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { name: string; title: string; description: string; dataStreams: { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", + "[] | undefined; }; docs: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }>, \"many\">; logo: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { name: string; title: string; description: string; dataStreams: { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", { "pluginId": "integrationAssistant", "scope": "common", @@ -1752,11 +1752,11 @@ "section": "def-common.ESProcessorItem", "text": "ESProcessorItem" }, - "[] | undefined; }; docs: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }[]; logo?: string | undefined; }, { name: string; title: string; description: string; dataStreams: { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", + "[] | undefined; }; docs: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }[]; logo?: string | undefined; }, { name: string; title: string; description: string; dataStreams: { name: string; title: string; description: string; inputTypes: (\"kafka\" | \"aws-cloudwatch\" | \"aws-s3\" | \"azure-blob-storage\" | \"azure-eventhub\" | \"cel\" | \"cloudfoundry\" | \"filestream\" | \"gcp-pubsub\" | \"gcs\" | \"http_endpoint\" | \"journald\" | \"tcp\" | \"udp\")[]; rawSamples: string[]; pipeline: { processors: ", "ESProcessorItemInput", "[]; version?: number | undefined; name?: string | undefined; description?: string | undefined; on_failure?: ", "ESProcessorItemInput", - "[] | undefined; }; docs: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }[]; logo?: string | undefined; }>" + "[] | undefined; }; docs: Zod.objectInputType<{}, Zod.ZodUnknown, \"strip\">[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; celInput?: { program: string; stateSettings: {} & { [k: string]: unknown; }; redactVars: string[]; } | undefined; }[]; logo?: string | undefined; }>" ], "path": "x-pack/plugins/integration_assistant/common/api/model/common_attributes.gen.ts", "deprecated": false, @@ -1881,7 +1881,7 @@ "ESProcessorItemInput", "[]; version?: number | undefined; name?: string | undefined; description?: string | undefined; on_failure?: ", "ESProcessorItemInput", - "[] | undefined; }>; connectorId: Zod.ZodString; samplesFormat: Zod.ZodObject<{ name: Zod.ZodEnum<[\"ndjson\", \"json\", \"csv\", \"structured\", \"unstructured\", \"unsupported\"]>; multiline: Zod.ZodOptional; header: Zod.ZodOptional; columns: Zod.ZodOptional>; json_path: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }>; langSmithOptions: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; packageName: string; rawSamples: string[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; dataStreamName: string; currentPipeline: { processors: ", + "[] | undefined; }>; connectorId: Zod.ZodString; samplesFormat: Zod.ZodObject<{ name: Zod.ZodEnum<[\"ndjson\", \"json\", \"csv\", \"structured\", \"unstructured\", \"unsupported\", \"cef\"]>; multiline: Zod.ZodOptional; header: Zod.ZodOptional; columns: Zod.ZodOptional>; json_path: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }>; langSmithOptions: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { connectorId: string; packageName: string; rawSamples: string[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; dataStreamName: string; currentPipeline: { processors: ", { "pluginId": "integrationAssistant", "scope": "common", @@ -1897,7 +1897,7 @@ "section": "def-common.ESProcessorItem", "text": "ESProcessorItem" }, - "[] | undefined; }; langSmithOptions?: { apiKey: string; projectName: string; } | undefined; }, { connectorId: string; packageName: string; rawSamples: string[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; dataStreamName: string; currentPipeline: { processors: ", + "[] | undefined; }; langSmithOptions?: { apiKey: string; projectName: string; } | undefined; }, { connectorId: string; packageName: string; rawSamples: string[]; samplesFormat: { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }; dataStreamName: string; currentPipeline: { processors: ", "ESProcessorItemInput", "[]; version?: number | undefined; name?: string | undefined; description?: string | undefined; on_failure?: ", "ESProcessorItemInput", @@ -2011,7 +2011,7 @@ "label": "SamplesFormat", "description": [], "signature": [ - "Zod.ZodObject<{ name: Zod.ZodEnum<[\"ndjson\", \"json\", \"csv\", \"structured\", \"unstructured\", \"unsupported\"]>; multiline: Zod.ZodOptional; header: Zod.ZodOptional; columns: Zod.ZodOptional>; json_path: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }>" + "Zod.ZodObject<{ name: Zod.ZodEnum<[\"ndjson\", \"json\", \"csv\", \"structured\", \"unstructured\", \"unsupported\", \"cef\"]>; multiline: Zod.ZodOptional; header: Zod.ZodOptional; columns: Zod.ZodOptional>; json_path: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }, { name: \"unsupported\" | \"json\" | \"ndjson\" | \"csv\" | \"structured\" | \"unstructured\" | \"cef\"; columns?: string[] | undefined; header?: boolean | undefined; multiline?: boolean | undefined; json_path?: string[] | undefined; }>" ], "path": "x-pack/plugins/integration_assistant/common/api/model/common_attributes.gen.ts", "deprecated": false, @@ -2026,7 +2026,7 @@ "label": "SamplesFormatName", "description": [], "signature": [ - "Zod.ZodEnum<[\"ndjson\", \"json\", \"csv\", \"structured\", \"unstructured\", \"unsupported\"]>" + "Zod.ZodEnum<[\"ndjson\", \"json\", \"csv\", \"structured\", \"unstructured\", \"unsupported\", \"cef\"]>" ], "path": "x-pack/plugins/integration_assistant/common/api/model/common_attributes.gen.ts", "deprecated": false, diff --git a/api_docs/integration_assistant.mdx b/api_docs/integration_assistant.mdx index f91f1b36fc70a..bbbf11ed39d71 100644 --- a/api_docs/integration_assistant.mdx +++ b/api_docs/integration_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/integrationAssistant title: "integrationAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the integrationAssistant plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'integrationAssistant'] --- import integrationAssistantObj from './integration_assistant.devdocs.json'; diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index 4a9e747c5ed82..e3f71b62a81b1 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] --- import interactiveSetupObj from './interactive_setup.devdocs.json'; diff --git a/api_docs/inventory.devdocs.json b/api_docs/inventory.devdocs.json index 00f3e7b5b9b81..39c0d7b7c7b69 100644 --- a/api_docs/inventory.devdocs.json +++ b/api_docs/inventory.devdocs.json @@ -82,9 +82,13 @@ "PartialC", "<{ query: ", "PartialC", - "<{ esQuery: ", + "<{ includeEntityTypes: ", "Type", - "<{ [key: string]: unknown; }, string, unknown>; }>; }>]>, ", + "; excludeEntityTypes: ", + "Type", + "; kuery: ", + "StringC", + "; }>; }>]>, ", "InventoryRouteHandlerResources", ", { groupBy: \"entity.type\"; groups: ", "EntityGroup", @@ -136,9 +140,9 @@ "LiteralC", "<\"desc\">]>; }>, ", "PartialC", - "<{ esQuery: ", - "Type", - "<{ [key: string]: unknown; }, string, unknown>; entityTypes: ", + "<{ kuery: ", + "StringC", + "; entityTypes: ", "Type", "; }>]>; }>, ", "InventoryRouteHandlerResources", diff --git a/api_docs/inventory.mdx b/api_docs/inventory.mdx index 79a5ca7668973..358e44bec724e 100644 --- a/api_docs/inventory.mdx +++ b/api_docs/inventory.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/inventory title: "inventory" image: https://source.unsplash.com/400x175/?github description: API docs for the inventory plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inventory'] --- import inventoryObj from './inventory.devdocs.json'; diff --git a/api_docs/investigate.mdx b/api_docs/investigate.mdx index 9cf32c217f1fe..c75d1d6b30873 100644 --- a/api_docs/investigate.mdx +++ b/api_docs/investigate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/investigate title: "investigate" image: https://source.unsplash.com/400x175/?github description: API docs for the investigate plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'investigate'] --- import investigateObj from './investigate.devdocs.json'; diff --git a/api_docs/investigate_app.mdx b/api_docs/investigate_app.mdx index d375548cb41cc..80041fff6f649 100644 --- a/api_docs/investigate_app.mdx +++ b/api_docs/investigate_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/investigateApp title: "investigateApp" image: https://source.unsplash.com/400x175/?github description: API docs for the investigateApp plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'investigateApp'] --- import investigateAppObj from './investigate_app.devdocs.json'; diff --git a/api_docs/kbn_actions_types.mdx b/api_docs/kbn_actions_types.mdx index 3941f873c5507..7bd5ce2e24be0 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/actions-types'] --- import kbnActionsTypesObj from './kbn_actions_types.devdocs.json'; diff --git a/api_docs/kbn_ai_assistant.mdx b/api_docs/kbn_ai_assistant.mdx index 4492a2933dc82..2127ba43fe97f 100644 --- a/api_docs/kbn_ai_assistant.mdx +++ b/api_docs/kbn_ai_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ai-assistant title: "@kbn/ai-assistant" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ai-assistant plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ai-assistant'] --- import kbnAiAssistantObj from './kbn_ai_assistant.devdocs.json'; diff --git a/api_docs/kbn_ai_assistant_common.mdx b/api_docs/kbn_ai_assistant_common.mdx index a675185ee12a4..6dae3837f8265 100644 --- a/api_docs/kbn_ai_assistant_common.mdx +++ b/api_docs/kbn_ai_assistant_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ai-assistant-common title: "@kbn/ai-assistant-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ai-assistant-common plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ai-assistant-common'] --- import kbnAiAssistantCommonObj from './kbn_ai_assistant_common.devdocs.json'; diff --git a/api_docs/kbn_aiops_components.devdocs.json b/api_docs/kbn_aiops_components.devdocs.json index 90b929e81e677..fc526124b270a 100644 --- a/api_docs/kbn_aiops_components.devdocs.json +++ b/api_docs/kbn_aiops_components.devdocs.json @@ -703,6 +703,22 @@ "path": "x-pack/packages/ml/aiops_components/src/document_count_chart/document_count_chart.tsx", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/aiops-components", + "id": "def-common.DocumentCountChartProps.nonInteractive", + "type": "CompoundType", + "tags": [], + "label": "nonInteractive", + "description": [ + "Whether the brush should be non-interactive" + ], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/packages/ml/aiops_components/src/document_count_chart/document_count_chart.tsx", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx index 4822562d109c8..b7c6fb7e6dab4 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] --- import kbnAiopsComponentsObj from './kbn_aiops_components.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) for questi | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 36 | 0 | 0 | 0 | +| 37 | 0 | 0 | 0 | ## Common diff --git a/api_docs/kbn_aiops_log_pattern_analysis.mdx b/api_docs/kbn_aiops_log_pattern_analysis.mdx index 0049883634e3d..10b46b612c11b 100644 --- a/api_docs/kbn_aiops_log_pattern_analysis.mdx +++ b/api_docs/kbn_aiops_log_pattern_analysis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-log-pattern-analysis title: "@kbn/aiops-log-pattern-analysis" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-log-pattern-analysis plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-log-pattern-analysis'] --- import kbnAiopsLogPatternAnalysisObj from './kbn_aiops_log_pattern_analysis.devdocs.json'; diff --git a/api_docs/kbn_aiops_log_rate_analysis.mdx b/api_docs/kbn_aiops_log_rate_analysis.mdx index cdcb947fb0e7e..b3a6437a88c2c 100644 --- a/api_docs/kbn_aiops_log_rate_analysis.mdx +++ b/api_docs/kbn_aiops_log_rate_analysis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-log-rate-analysis title: "@kbn/aiops-log-rate-analysis" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-log-rate-analysis plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-log-rate-analysis'] --- import kbnAiopsLogRateAnalysisObj from './kbn_aiops_log_rate_analysis.devdocs.json'; diff --git a/api_docs/kbn_alerting_api_integration_helpers.mdx b/api_docs/kbn_alerting_api_integration_helpers.mdx index 77957025e484f..7b03075b89e7a 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-12-02 +date: 2024-12-05 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_comparators.mdx b/api_docs/kbn_alerting_comparators.mdx index 1b0a7a22af8b2..f363044ec29bb 100644 --- a/api_docs/kbn_alerting_comparators.mdx +++ b/api_docs/kbn_alerting_comparators.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-comparators title: "@kbn/alerting-comparators" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-comparators plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-comparators'] --- import kbnAlertingComparatorsObj from './kbn_alerting_comparators.devdocs.json'; diff --git a/api_docs/kbn_alerting_state_types.mdx b/api_docs/kbn_alerting_state_types.mdx index 5b08f9dfdef23..436cdfa5ac8b8 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-12-02 +date: 2024-12-05 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.devdocs.json b/api_docs/kbn_alerting_types.devdocs.json index 830a829583ab9..035291b979d31 100644 --- a/api_docs/kbn_alerting_types.devdocs.json +++ b/api_docs/kbn_alerting_types.devdocs.json @@ -3793,15 +3793,7 @@ "section": "def-common.ISearchRequestParams", "text": "ISearchRequestParams" }, - "> & { featureIds: ", - { - "pluginId": "@kbn/rule-data-utils", - "scope": "common", - "docId": "kibKbnRuleDataUtilsPluginApi", - "section": "def-common.AlertConsumers", - "text": "AlertConsumers" - }, - "[]; fields?: ", + "> & { ruleTypeIds: string[]; consumers?: string[] | undefined; fields?: ", "QueryDslFieldAndFormat", "[] | undefined; query?: Pick<", "QueryDslQueryContainer", diff --git a/api_docs/kbn_alerting_types.mdx b/api_docs/kbn_alerting_types.mdx index 45856298f7348..b4e927000fdad 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-12-02 +date: 2024-12-05 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 cf3f888a27f07..32a2c5620280c 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-12-02 +date: 2024-12-05 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_grouping.devdocs.json b/api_docs/kbn_alerts_grouping.devdocs.json index e1841971236c8..b4a3dd624dff0 100644 --- a/api_docs/kbn_alerts_grouping.devdocs.json +++ b/api_docs/kbn_alerts_grouping.devdocs.json @@ -362,22 +362,31 @@ }, { "parentPluginId": "@kbn/alerts-grouping", - "id": "def-public.AlertsGroupingProps.featureIds", + "id": "def-public.AlertsGroupingProps.ruleTypeIds", "type": "Array", "tags": [], - "label": "featureIds", + "label": "ruleTypeIds", "description": [ - "\nThe alerting feature ids this grouping covers" + "\nThe alerting rule type ids this grouping covers" ], "signature": [ - { - "pluginId": "@kbn/rule-data-utils", - "scope": "common", - "docId": "kibKbnRuleDataUtilsPluginApi", - "section": "def-common.AlertConsumers", - "text": "AlertConsumers" - }, - "[]" + "string[]" + ], + "path": "packages/kbn-alerts-grouping/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-grouping", + "id": "def-public.AlertsGroupingProps.consumers", + "type": "Array", + "tags": [], + "label": "consumers", + "description": [ + "\nThe alerting consumers this grouping covers" + ], + "signature": [ + "string[] | undefined" ], "path": "packages/kbn-alerts-grouping/src/types.ts", "deprecated": false, diff --git a/api_docs/kbn_alerts_grouping.mdx b/api_docs/kbn_alerts_grouping.mdx index 9eb4a54c93c85..705268d6772eb 100644 --- a/api_docs/kbn_alerts_grouping.mdx +++ b/api_docs/kbn_alerts_grouping.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-grouping title: "@kbn/alerts-grouping" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-grouping plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-grouping'] --- import kbnAlertsGroupingObj from './kbn_alerts_grouping.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 | |-------------------|-----------|------------------------|-----------------| -| 31 | 0 | 15 | 1 | +| 32 | 0 | 15 | 1 | ## Client diff --git a/api_docs/kbn_alerts_ui_shared.devdocs.json b/api_docs/kbn_alerts_ui_shared.devdocs.json index b186a273e1dd4..50b0cf5a6edd9 100644 --- a/api_docs/kbn_alerts_ui_shared.devdocs.json +++ b/api_docs/kbn_alerts_ui_shared.devdocs.json @@ -142,7 +142,7 @@ "label": "AlertsSearchBar", "description": [], "signature": [ - "({ appName, disableQueryLanguageSwitcher, featureIds, ruleTypeId, query, filters, onQueryChange, onQuerySubmit, onFiltersUpdated, rangeFrom, rangeTo, showFilterBar, showDatePicker, showSubmitButton, placeholder, submitOnBlur, http, toasts, unifiedSearchBar, dataService, }: ", + "({ appName, disableQueryLanguageSwitcher, ruleTypeIds, query, filters, onQueryChange, onQuerySubmit, onFiltersUpdated, rangeFrom, rangeTo, showFilterBar, showDatePicker, showSubmitButton, placeholder, submitOnBlur, http, toasts, unifiedSearchBar, dataService, }: ", { "pluginId": "@kbn/alerts-ui-shared", "scope": "public", @@ -161,7 +161,7 @@ "id": "def-public.AlertsSearchBar.$1", "type": "Object", "tags": [], - "label": "{\n appName,\n disableQueryLanguageSwitcher = false,\n featureIds = EMPTY_FEATURE_IDS,\n ruleTypeId,\n query,\n filters,\n onQueryChange,\n onQuerySubmit,\n onFiltersUpdated,\n rangeFrom,\n rangeTo,\n showFilterBar = false,\n showDatePicker = true,\n showSubmitButton = true,\n placeholder = SEARCH_BAR_PLACEHOLDER,\n submitOnBlur = false,\n http,\n toasts,\n unifiedSearchBar,\n dataService,\n}", + "label": "{\n appName,\n disableQueryLanguageSwitcher = false,\n ruleTypeIds = [],\n query,\n filters,\n onQueryChange,\n onQuerySubmit,\n onFiltersUpdated,\n rangeFrom,\n rangeTo,\n showFilterBar = false,\n showDatePicker = true,\n showSubmitButton = true,\n placeholder = SEARCH_BAR_PLACEHOLDER,\n submitOnBlur = false,\n http,\n toasts,\n unifiedSearchBar,\n dataService,\n}", "description": [], "signature": [ { @@ -183,92 +183,88 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.MaintenanceWindowCallout", + "id": "def-public.checkActionFormActionTypeEnabled", "type": "Function", "tags": [], - "label": "MaintenanceWindowCallout", + "label": "checkActionFormActionTypeEnabled", "description": [], "signature": [ - "({\n kibanaServices,\n categories,\n}: { kibanaServices: ", - "KibanaServices", - "; categories?: string[] | undefined; }) => JSX.Element | null" + "(actionType: ", + { + "pluginId": "@kbn/actions-types", + "scope": "common", + "docId": "kibKbnActionsTypesPluginApi", + "section": "def-common.ActionType", + "text": "ActionType" + }, + ", preconfiguredConnectors: ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.ActionConnector", + "text": "ActionConnector" + }, + ", Record>[]) => ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.IsEnabledResult", + "text": "IsEnabledResult" + }, + " | ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.IsDisabledResult", + "text": "IsDisabledResult" + } ], - "path": "packages/kbn-alerts-ui-shared/src/maintenance_window_callout/index.tsx", + "path": "packages/kbn-alerts-ui-shared/src/check_action_type_enabled/check_action_type_enabled.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.MaintenanceWindowCallout.$1", + "id": "def-public.checkActionFormActionTypeEnabled.$1", "type": "Object", "tags": [], - "label": "{\n kibanaServices,\n categories,\n}", + "label": "actionType", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/maintenance_window_callout/index.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.MaintenanceWindowCallout.$1.kibanaServices", - "type": "Object", - "tags": [], - "label": "kibanaServices", - "description": [], - "signature": [ - "KibanaServices" - ], - "path": "packages/kbn-alerts-ui-shared/src/maintenance_window_callout/index.tsx", - "deprecated": false, - "trackAdoption": false - }, + "signature": [ { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.MaintenanceWindowCallout.$1.categories", - "type": "Array", - "tags": [], - "label": "categories", - "description": [], - "signature": [ - "string[] | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/maintenance_window_callout/index.tsx", - "deprecated": false, - "trackAdoption": false + "pluginId": "@kbn/actions-types", + "scope": "common", + "docId": "kibKbnActionsTypesPluginApi", + "section": "def-common.ActionType", + "text": "ActionType" } - ] - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.ScrollableFlyoutTabbedContent", - "type": "Function", - "tags": [], - "label": "ScrollableFlyoutTabbedContent", - "description": [], - "signature": [ - "(props: ", - "EuiTabbedContentProps", - ") => React.JSX.Element" - ], - "path": "packages/kbn-alerts-ui-shared/src/alert_fields_table/index.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ + ], + "path": "packages/kbn-alerts-ui-shared/src/check_action_type_enabled/check_action_type_enabled.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.ScrollableFlyoutTabbedContent.$1", - "type": "CompoundType", + "id": "def-public.checkActionFormActionTypeEnabled.$2", + "type": "Array", "tags": [], - "label": "props", + "label": "preconfiguredConnectors", "description": [], "signature": [ - "EuiTabbedContentProps" + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.ActionConnector", + "text": "ActionConnector" + }, + ", Record>[]" ], - "path": "packages/kbn-alerts-ui-shared/src/alert_fields_table/index.tsx", + "path": "packages/kbn-alerts-ui-shared/src/check_action_type_enabled/check_action_type_enabled.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -279,140 +275,232 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useAlertsDataView", + "id": "def-public.checkActionTypeEnabled", "type": "Function", "tags": [], - "label": "useAlertsDataView", - "description": [ - "\nComputes a {@link DataViewBase} object for alerts indices based on the provided feature ids\n" - ], + "label": "checkActionTypeEnabled", + "description": [], "signature": [ - "({ http, dataViewsService, toasts, featureIds, }: ", + "(actionType?: ", + { + "pluginId": "@kbn/actions-types", + "scope": "common", + "docId": "kibKbnActionsTypesPluginApi", + "section": "def-common.ActionType", + "text": "ActionType" + }, + " | undefined, isPreconfiguredConnector?: boolean) => ", { "pluginId": "@kbn/alerts-ui-shared", "scope": "public", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseAlertsDataViewParams", - "text": "UseAlertsDataViewParams" + "section": "def-public.IsEnabledResult", + "text": "IsEnabledResult" }, - ") => ", + " | ", { "pluginId": "@kbn/alerts-ui-shared", "scope": "public", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseAlertsDataViewResult", - "text": "UseAlertsDataViewResult" + "section": "def-public.IsDisabledResult", + "text": "IsDisabledResult" } ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_alerts_data_view.ts", + "path": "packages/kbn-alerts-ui-shared/src/check_action_type_enabled/check_action_type_enabled.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useAlertsDataView.$1", + "id": "def-public.checkActionTypeEnabled.$1", "type": "Object", "tags": [], - "label": "{\n http,\n dataViewsService,\n toasts,\n featureIds,\n}", + "label": "actionType", "description": [], "signature": [ { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseAlertsDataViewParams", - "text": "UseAlertsDataViewParams" - } + "pluginId": "@kbn/actions-types", + "scope": "common", + "docId": "kibKbnActionsTypesPluginApi", + "section": "def-common.ActionType", + "text": "ActionType" + }, + " | undefined" ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_alerts_data_view.ts", + "path": "packages/kbn-alerts-ui-shared/src/check_action_type_enabled/check_action_type_enabled.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.checkActionTypeEnabled.$2", + "type": "boolean", + "tags": [], + "label": "isPreconfiguredConnector", + "description": [], + "signature": [ + "boolean" + ], + "path": "packages/kbn-alerts-ui-shared/src/check_action_type_enabled/check_action_type_enabled.ts", "deprecated": false, "trackAdoption": false, "isRequired": true } ], - "returnComment": [ - "A {@link DataViewBase } object, intentionally not typed as a complete {@link DataView } object\nsince only Security Solution uses an actual in-memory data view (when `featureIds = ['siem']).\nIn all other cases the data view is computed from the index names and fields fetched from the\nalerting APIs." - ], + "returnComment": [], "initialIsOpen": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useCreateRule", + "id": "def-public.getAlwaysProvidedActionVariables", "type": "Function", "tags": [], - "label": "useCreateRule", + "label": "getAlwaysProvidedActionVariables", "description": [], "signature": [ - "(props: ", + "() => ", { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseCreateRuleProps", - "text": "UseCreateRuleProps" + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" }, - ") => ", - "UseMutationResult", - "<", + "[]" + ], + "path": "packages/kbn-alerts-ui-shared/src/action_variables/transforms.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.getAvailableActionVariables", + "type": "Function", + "tags": [], + "label": "getAvailableActionVariables", + "description": [], + "signature": [ + "(actionVariables: ", { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.Rule", - "text": "Rule" + "pluginId": "@kbn/triggers-actions-ui-types", + "scope": "common", + "docId": "kibKbnTriggersActionsUiTypesPluginApi", + "section": "def-common.ActionVariables", + "text": "ActionVariables" }, - "<", + ", summaryActionVariables?: ", { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.RuleTypeParams", - "text": "RuleTypeParams" + "pluginId": "@kbn/triggers-actions-ui-types", + "scope": "common", + "docId": "kibKbnTriggersActionsUiTypesPluginApi", + "section": "def-common.ActionVariables", + "text": "ActionVariables" }, - ">, ", + " | undefined, actionGroup?: ", { - "pluginId": "@kbn/core-http-browser", - "scope": "public", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-public.IHttpFetchError", - "text": "IHttpFetchError" + "pluginId": "@kbn/triggers-actions-ui-types", + "scope": "common", + "docId": "kibKbnTriggersActionsUiTypesPluginApi", + "section": "def-common.ActionGroupWithMessageVariables", + "text": "ActionGroupWithMessageVariables" }, - "<{ message: string; }>, { formData: ", - "CreateRuleBody", - "<", + " | undefined, isSummaryAction?: boolean | undefined) => ", { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.RuleTypeParams", - "text": "RuleTypeParams" + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" }, - ">; }, unknown>" + "[]" ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_create_rule.ts", + "path": "packages/kbn-alerts-ui-shared/src/action_variables/get_available_action_variables.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useCreateRule.$1", - "type": "Object", + "id": "def-public.getAvailableActionVariables.$1", + "type": "CompoundType", "tags": [], - "label": "props", + "label": "actionVariables", "description": [], "signature": [ { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseCreateRuleProps", - "text": "UseCreateRuleProps" + "pluginId": "@kbn/triggers-actions-ui-types", + "scope": "common", + "docId": "kibKbnTriggersActionsUiTypesPluginApi", + "section": "def-common.ActionVariables", + "text": "ActionVariables" } ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_create_rule.ts", + "path": "packages/kbn-alerts-ui-shared/src/action_variables/get_available_action_variables.ts", "deprecated": false, "trackAdoption": false, "isRequired": true + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.getAvailableActionVariables.$2", + "type": "CompoundType", + "tags": [], + "label": "summaryActionVariables", + "description": [], + "signature": [ + { + "pluginId": "@kbn/triggers-actions-ui-types", + "scope": "common", + "docId": "kibKbnTriggersActionsUiTypesPluginApi", + "section": "def-common.ActionVariables", + "text": "ActionVariables" + }, + " | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/action_variables/get_available_action_variables.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.getAvailableActionVariables.$3", + "type": "Object", + "tags": [], + "label": "actionGroup", + "description": [], + "signature": [ + { + "pluginId": "@kbn/triggers-actions-ui-types", + "scope": "common", + "docId": "kibKbnTriggersActionsUiTypesPluginApi", + "section": "def-common.ActionGroupWithMessageVariables", + "text": "ActionGroupWithMessageVariables" + }, + " | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/action_variables/get_available_action_variables.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.getAvailableActionVariables.$4", + "type": "CompoundType", + "tags": [], + "label": "isSummaryAction", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/action_variables/get_available_action_variables.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false } ], "returnComment": [], @@ -420,52 +508,85 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useGetAlertsGroupAggregationsQuery", + "id": "def-public.getSummaryAlertActionVariables", "type": "Function", "tags": [], - "label": "useGetAlertsGroupAggregationsQuery", - "description": [ - "\nFetches alerts aggregations for a given groupByField.\n\nSome default aggregations are applied:\n- `groupByFields`, to get the buckets based on the provided grouping field,\n - `unitsCount`, to count the number of alerts in each bucket,\n- `unitsCount`, to count the total number of alerts targeted by the query,\n- `groupsCount`, to count the total number of groups.\n\nThe provided `aggregations` are applied within `groupByFields`. Here the `groupByField` runtime\nfield can be used to perform grouping-based aggregations.\n`groupByField` buckets computed over a field with a null/absent value are marked with the\n`isNullGroup` flag set to true and their key is set to the `--` string.\n\nApplies alerting RBAC through featureIds." - ], + "label": "getSummaryAlertActionVariables", + "description": [], "signature": [ - "({ http, toasts, enabled, params, }: ", + "() => ", { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseGetAlertsGroupAggregationsQueryProps", - "text": "UseGetAlertsGroupAggregationsQueryProps" + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" }, - ") => ", - "UseQueryResult", - "<", - "SearchResponseBody", - "<{}, T>, Error>" + "[]" ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts", + "path": "packages/kbn-alerts-ui-shared/src/action_variables/transforms.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.MaintenanceWindowCallout", + "type": "Function", + "tags": [], + "label": "MaintenanceWindowCallout", + "description": [], + "signature": [ + "({\n kibanaServices,\n categories,\n}: { kibanaServices: ", + "KibanaServices", + "; categories?: string[] | undefined; }) => JSX.Element | null" + ], + "path": "packages/kbn-alerts-ui-shared/src/maintenance_window_callout/index.tsx", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useGetAlertsGroupAggregationsQuery.$1", + "id": "def-public.MaintenanceWindowCallout.$1", "type": "Object", "tags": [], - "label": "{\n http,\n toasts,\n enabled = true,\n params,\n}", + "label": "{\n kibanaServices,\n categories,\n}", "description": [], - "signature": [ - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseGetAlertsGroupAggregationsQueryProps", - "text": "UseGetAlertsGroupAggregationsQueryProps" - } - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts", + "path": "packages/kbn-alerts-ui-shared/src/maintenance_window_callout/index.tsx", "deprecated": false, "trackAdoption": false, - "isRequired": true + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.MaintenanceWindowCallout.$1.kibanaServices", + "type": "Object", + "tags": [], + "label": "kibanaServices", + "description": [], + "signature": [ + "KibanaServices" + ], + "path": "packages/kbn-alerts-ui-shared/src/maintenance_window_callout/index.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.MaintenanceWindowCallout.$1.categories", + "type": "Array", + "tags": [], + "label": "categories", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/maintenance_window_callout/index.tsx", + "deprecated": false, + "trackAdoption": false + } + ] } ], "returnComment": [], @@ -473,43 +594,31 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useHealthCheck", + "id": "def-public.ScrollableFlyoutTabbedContent", "type": "Function", "tags": [], - "label": "useHealthCheck", + "label": "ScrollableFlyoutTabbedContent", "description": [], "signature": [ "(props: ", - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseHealthCheckProps", - "text": "UseHealthCheckProps" - }, - ") => { isLoading: boolean; isInitialLoading: boolean; error: \"alertsError\" | \"encryptionError\" | \"apiKeysDisabledError\" | \"apiKeysAndEncryptionError\" | null; }" + "EuiTabbedContentProps", + ") => React.JSX.Element" ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", + "path": "packages/kbn-alerts-ui-shared/src/alert_fields_table/index.tsx", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useHealthCheck.$1", - "type": "Object", + "id": "def-public.ScrollableFlyoutTabbedContent.$1", + "type": "CompoundType", "tags": [], "label": "props", "description": [], "signature": [ - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseHealthCheckProps", - "text": "UseHealthCheckProps" - } + "EuiTabbedContentProps" ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", + "path": "packages/kbn-alerts-ui-shared/src/alert_fields_table/index.tsx", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -520,54 +629,129 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useLoadAlertingFrameworkHealth", + "id": "def-public.transformActionVariables", "type": "Function", "tags": [], - "label": "useLoadAlertingFrameworkHealth", + "label": "transformActionVariables", "description": [], "signature": [ - "(props: ", + "(actionVariables: ", { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseLoadAlertingFrameworkHealthProps", - "text": "UseLoadAlertingFrameworkHealthProps" + "pluginId": "@kbn/triggers-actions-ui-types", + "scope": "common", + "docId": "kibKbnTriggersActionsUiTypesPluginApi", + "section": "def-common.ActionVariables", + "text": "ActionVariables" }, - ") => { data: ", + ", summaryActionVariables?: ", + { + "pluginId": "@kbn/triggers-actions-ui-types", + "scope": "common", + "docId": "kibKbnTriggersActionsUiTypesPluginApi", + "section": "def-common.ActionVariables", + "text": "ActionVariables" + }, + " | undefined, omitMessageVariables?: ", + { + "pluginId": "@kbn/triggers-actions-ui-types", + "scope": "common", + "docId": "kibKbnTriggersActionsUiTypesPluginApi", + "section": "def-common.OmitMessageVariablesType", + "text": "OmitMessageVariablesType" + }, + " | undefined, isSummaryAction?: boolean | undefined) => ", { "pluginId": "@kbn/alerting-types", "scope": "common", "docId": "kibKbnAlertingTypesPluginApi", - "section": "def-common.AlertingFrameworkHealth", - "text": "AlertingFrameworkHealth" + "section": "def-common.ActionVariable", + "text": "ActionVariable" }, - " | undefined; isLoading: boolean; isInitialLoading: boolean; isSuccess: boolean; isError: boolean; error: unknown; }" + "[]" ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_alerting_framework_health.ts", + "path": "packages/kbn-alerts-ui-shared/src/action_variables/transforms.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useLoadAlertingFrameworkHealth.$1", - "type": "Object", + "id": "def-public.transformActionVariables.$1", + "type": "CompoundType", "tags": [], - "label": "props", + "label": "actionVariables", "description": [], "signature": [ { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseLoadAlertingFrameworkHealthProps", - "text": "UseLoadAlertingFrameworkHealthProps" + "pluginId": "@kbn/triggers-actions-ui-types", + "scope": "common", + "docId": "kibKbnTriggersActionsUiTypesPluginApi", + "section": "def-common.ActionVariables", + "text": "ActionVariables" } ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_alerting_framework_health.ts", + "path": "packages/kbn-alerts-ui-shared/src/action_variables/transforms.ts", "deprecated": false, "trackAdoption": false, "isRequired": true + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.transformActionVariables.$2", + "type": "CompoundType", + "tags": [], + "label": "summaryActionVariables", + "description": [], + "signature": [ + { + "pluginId": "@kbn/triggers-actions-ui-types", + "scope": "common", + "docId": "kibKbnTriggersActionsUiTypesPluginApi", + "section": "def-common.ActionVariables", + "text": "ActionVariables" + }, + " | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/action_variables/transforms.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.transformActionVariables.$3", + "type": "CompoundType", + "tags": [], + "label": "omitMessageVariables", + "description": [], + "signature": [ + { + "pluginId": "@kbn/triggers-actions-ui-types", + "scope": "common", + "docId": "kibKbnTriggersActionsUiTypesPluginApi", + "section": "def-common.OmitMessageVariablesType", + "text": "OmitMessageVariablesType" + }, + " | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/action_variables/transforms.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.transformActionVariables.$4", + "type": "CompoundType", + "tags": [], + "label": "isSummaryAction", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/action_variables/transforms.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false } ], "returnComment": [], @@ -575,106 +759,95 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useLoadConnectors", + "id": "def-public.useAlertsDataView", "type": "Function", "tags": [], - "label": "useLoadConnectors", - "description": [], + "label": "useAlertsDataView", + "description": [ + "\nComputes a {@link DataViewBase} object for alerts indices based on the provided feature ids\n" + ], "signature": [ - "(props: ", + "({ http, dataViewsService, toasts, ruleTypeIds, }: ", { "pluginId": "@kbn/alerts-ui-shared", "scope": "public", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseLoadConnectorsProps", - "text": "UseLoadConnectorsProps" + "section": "def-public.UseAlertsDataViewParams", + "text": "UseAlertsDataViewParams" }, - ") => { data: ", + ") => ", { "pluginId": "@kbn/alerts-ui-shared", "scope": "public", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.ActionConnector", - "text": "ActionConnector" - }, - ", Record>[] | undefined; isInitialLoading: boolean; isLoading: boolean; }" + "section": "def-public.UseAlertsDataViewResult", + "text": "UseAlertsDataViewResult" + } ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connectors.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_alerts_data_view.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useLoadConnectors.$1", + "id": "def-public.useAlertsDataView.$1", "type": "Object", "tags": [], - "label": "props", + "label": "{\n http,\n dataViewsService,\n toasts,\n ruleTypeIds,\n}", "description": [], "signature": [ { "pluginId": "@kbn/alerts-ui-shared", "scope": "public", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseLoadConnectorsProps", - "text": "UseLoadConnectorsProps" + "section": "def-public.UseAlertsDataViewParams", + "text": "UseAlertsDataViewParams" } ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connectors.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_alerts_data_view.ts", "deprecated": false, "trackAdoption": false, "isRequired": true } ], - "returnComment": [], + "returnComment": [ + "A {@link DataViewBase } object, intentionally not typed as a complete {@link DataView } object\nsince only Security Solution uses an actual in-memory data view (when `featureIds = ['siem']).\nIn all other cases the data view is computed from the index names and fields fetched from the\nalerting APIs." + ], "initialIsOpen": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useLoadConnectorTypes", + "id": "def-public.useFetchFlappingSettings", "type": "Function", "tags": [], - "label": "useLoadConnectorTypes", + "label": "useFetchFlappingSettings", "description": [], "signature": [ - "(props: ", - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseLoadConnectorTypesProps", - "text": "UseLoadConnectorTypesProps" - }, - ") => { data: ", + "(props: UseFetchFlappingSettingsProps) => { isInitialLoading: boolean; isLoading: boolean; isError: boolean; data: ", { - "pluginId": "@kbn/actions-types", + "pluginId": "@kbn/alerting-types", "scope": "common", - "docId": "kibKbnActionsTypesPluginApi", - "section": "def-common.ActionType", - "text": "ActionType" + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.RulesSettingsFlapping", + "text": "RulesSettingsFlapping" }, - "[] | undefined; isInitialLoading: boolean; isLoading: boolean; }" + " | undefined; }" ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connector_types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_fetch_flapping_settings.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useLoadConnectorTypes.$1", + "id": "def-public.useFetchFlappingSettings.$1", "type": "Object", "tags": [], "label": "props", "description": [], "signature": [ - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseLoadConnectorTypesProps", - "text": "UseLoadConnectorTypesProps" - } + "UseFetchFlappingSettingsProps" ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connector_types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_fetch_flapping_settings.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -685,59 +858,49 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useLoadRuleTypesQuery", + "id": "def-public.useGetAlertsGroupAggregationsQuery", "type": "Function", "tags": [], - "label": "useLoadRuleTypesQuery", - "description": [], + "label": "useGetAlertsGroupAggregationsQuery", + "description": [ + "\nFetches alerts aggregations for a given groupByField.\n\nSome default aggregations are applied:\n- `groupByFields`, to get the buckets based on the provided grouping field,\n - `unitsCount`, to count the number of alerts in each bucket,\n- `unitsCount`, to count the total number of alerts targeted by the query,\n- `groupsCount`, to count the total number of groups.\n\nThe provided `aggregations` are applied within `groupByFields`. Here the `groupByField` runtime\nfield can be used to perform grouping-based aggregations.\n`groupByField` buckets computed over a field with a null/absent value are marked with the\n`isNullGroup` flag set to true and their key is set to the `--` string.\n\nApplies alerting RBAC through ruleTypeIds." + ], "signature": [ - "({ http, toasts, filteredRuleTypes, registeredRuleTypes, enabled, }: ", + "({ http, toasts, enabled, params, }: ", { "pluginId": "@kbn/alerts-ui-shared", "scope": "public", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseRuleTypesProps", - "text": "UseRuleTypesProps" + "section": "def-public.UseGetAlertsGroupAggregationsQueryProps", + "text": "UseGetAlertsGroupAggregationsQueryProps" }, - ") => { ruleTypesState: { isInitialLoad: boolean; isLoading: boolean; data: ", - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.RuleTypeIndexWithDescriptions", - "text": "RuleTypeIndexWithDescriptions" - }, - "; error: Error | null; }; hasAnyAuthorizedRuleType: boolean; authorizedRuleTypes: ", - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.RuleTypeWithDescription", - "text": "RuleTypeWithDescription" - }, - "[]; authorizedToReadAnyRules: boolean; authorizedToCreateAnyRules: boolean; isSuccess: boolean; }" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + ") => ", + "UseQueryResult", + "<", + "SearchResponseBody", + "<{}, T>, Error>" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useLoadRuleTypesQuery.$1", + "id": "def-public.useGetAlertsGroupAggregationsQuery.$1", "type": "Object", "tags": [], - "label": "{\n http,\n toasts,\n filteredRuleTypes,\n registeredRuleTypes,\n enabled = true,\n}", + "label": "{\n http,\n toasts,\n enabled = true,\n params,\n}", "description": [], "signature": [ { "pluginId": "@kbn/alerts-ui-shared", "scope": "public", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseRuleTypesProps", - "text": "UseRuleTypesProps" + "section": "def-public.UseGetAlertsGroupAggregationsQueryProps", + "text": "UseGetAlertsGroupAggregationsQueryProps" } ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -748,10 +911,10 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useLoadUiConfig", + "id": "def-public.useHealthCheck", "type": "Function", "tags": [], - "label": "useLoadUiConfig", + "label": "useHealthCheck", "description": [], "signature": [ "(props: ", @@ -759,20 +922,18 @@ "pluginId": "@kbn/alerts-ui-shared", "scope": "public", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseLoadUiConfigProps", - "text": "UseLoadUiConfigProps" + "section": "def-public.UseHealthCheckProps", + "text": "UseHealthCheckProps" }, - ") => { data: ", - "UiConfig", - " | undefined; isLoading: boolean; isInitialLoading: boolean; isSuccess: boolean; isError: boolean; error: unknown; }" + ") => { isLoading: boolean; isInitialLoading: boolean; error: \"alertsError\" | \"encryptionError\" | \"apiKeysDisabledError\" | \"apiKeysAndEncryptionError\" | null; }" ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_ui_config.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useLoadUiConfig.$1", + "id": "def-public.useHealthCheck.$1", "type": "Object", "tags": [], "label": "props", @@ -782,11 +943,11 @@ "pluginId": "@kbn/alerts-ui-shared", "scope": "public", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseLoadUiConfigProps", - "text": "UseLoadUiConfigProps" + "section": "def-public.UseHealthCheckProps", + "text": "UseHealthCheckProps" } ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_ui_config.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -797,10 +958,10 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useLoadUiHealth", + "id": "def-public.useLoadAlertingFrameworkHealth", "type": "Function", "tags": [], - "label": "useLoadUiHealth", + "label": "useLoadAlertingFrameworkHealth", "description": [], "signature": [ "(props: ", @@ -808,20 +969,26 @@ "pluginId": "@kbn/alerts-ui-shared", "scope": "public", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseLoadUiHealthProps", - "text": "UseLoadUiHealthProps" + "section": "def-public.UseLoadAlertingFrameworkHealthProps", + "text": "UseLoadAlertingFrameworkHealthProps" }, ") => { data: ", - "UiHealthCheck", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.AlertingFrameworkHealth", + "text": "AlertingFrameworkHealth" + }, " | undefined; isLoading: boolean; isInitialLoading: boolean; isSuccess: boolean; isError: boolean; error: unknown; }" ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_ui_health.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_alerting_framework_health.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useLoadUiHealth.$1", + "id": "def-public.useLoadAlertingFrameworkHealth.$1", "type": "Object", "tags": [], "label": "props", @@ -831,11 +998,11 @@ "pluginId": "@kbn/alerts-ui-shared", "scope": "public", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseLoadUiHealthProps", - "text": "UseLoadUiHealthProps" + "section": "def-public.UseLoadAlertingFrameworkHealthProps", + "text": "UseLoadAlertingFrameworkHealthProps" } ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_ui_health.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_alerting_framework_health.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -846,107 +1013,59 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useResolveRule", + "id": "def-public.useLoadRuleTypesQuery", "type": "Function", "tags": [], - "label": "useResolveRule", + "label": "useLoadRuleTypesQuery", "description": [], "signature": [ - "(props: ", + "({ http, toasts, filteredRuleTypes, registeredRuleTypes, enabled, }: ", { "pluginId": "@kbn/alerts-ui-shared", "scope": "public", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseResolveProps", - "text": "UseResolveProps" + "section": "def-public.UseRuleTypesProps", + "text": "UseRuleTypesProps" }, - ") => { data: ", - "RuleFormData", - "<", + ") => { ruleTypesState: { isInitialLoad: boolean; isLoading: boolean; data: ", { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.RuleTypeParams", - "text": "RuleTypeParams" + "pluginId": "@kbn/triggers-actions-ui-types", + "scope": "common", + "docId": "kibKbnTriggersActionsUiTypesPluginApi", + "section": "def-common.RuleTypeIndexWithDescriptions", + "text": "RuleTypeIndexWithDescriptions" }, - "> | null | undefined; isLoading: boolean; isInitialLoading: boolean; isSuccess: boolean; isError: boolean; error: unknown; }" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_resolve_rule.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useResolveRule.$1", - "type": "Object", - "tags": [], - "label": "props", - "description": [], - "signature": [ - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseResolveProps", - "text": "UseResolveProps" - } - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_resolve_rule.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useRuleAADFields", - "type": "Function", - "tags": [], - "label": "useRuleAADFields", - "description": [], - "signature": [ - "(props: ", + "; error: Error | null; }; hasAnyAuthorizedRuleType: boolean; authorizedRuleTypes: ", { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseRuleAADFieldsProps", - "text": "UseRuleAADFieldsProps" + "pluginId": "@kbn/triggers-actions-ui-types", + "scope": "common", + "docId": "kibKbnTriggersActionsUiTypesPluginApi", + "section": "def-common.RuleTypeWithDescription", + "text": "RuleTypeWithDescription" }, - ") => ", - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseRuleAADFieldsResult", - "text": "UseRuleAADFieldsResult" - } + "[]; authorizedToReadAnyRules: boolean; authorizedToCreateAnyRules: boolean; isSuccess: boolean; }" ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_rule_aad_fields.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useRuleAADFields.$1", + "id": "def-public.useLoadRuleTypesQuery.$1", "type": "Object", "tags": [], - "label": "props", + "label": "{\n http,\n toasts,\n filteredRuleTypes,\n registeredRuleTypes,\n enabled = true,\n}", "description": [], "signature": [ { "pluginId": "@kbn/alerts-ui-shared", "scope": "public", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseRuleAADFieldsProps", - "text": "UseRuleAADFieldsProps" + "section": "def-public.UseRuleTypesProps", + "text": "UseRuleTypesProps" } ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_rule_aad_fields.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -957,10 +1076,10 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useUpdateRule", + "id": "def-public.useLoadUiHealth", "type": "Function", "tags": [], - "label": "useUpdateRule", + "label": "useLoadUiHealth", "description": [], "signature": [ "(props: ", @@ -968,54 +1087,20 @@ "pluginId": "@kbn/alerts-ui-shared", "scope": "public", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseUpdateRuleProps", - "text": "UseUpdateRuleProps" - }, - ") => ", - "UseMutationResult", - "<", - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.Rule", - "text": "Rule" - }, - "<", - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.RuleTypeParams", - "text": "RuleTypeParams" - }, - ">, ", - { - "pluginId": "@kbn/core-http-browser", - "scope": "public", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-public.IHttpFetchError", - "text": "IHttpFetchError" - }, - "<{ message: string; }>, { id: string; formData: ", - "UpdateRuleBody", - "<", - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.RuleTypeParams", - "text": "RuleTypeParams" + "section": "def-public.UseLoadUiHealthProps", + "text": "UseLoadUiHealthProps" }, - ">; }, unknown>" + ") => { data: ", + "UiHealthCheck", + " | undefined; isLoading: boolean; isInitialLoading: boolean; isSuccess: boolean; isError: boolean; error: unknown; }" ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_update_rule.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_ui_health.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.useUpdateRule.$1", + "id": "def-public.useLoadUiHealth.$1", "type": "Object", "tags": [], "label": "props", @@ -1025,11 +1110,11 @@ "pluginId": "@kbn/alerts-ui-shared", "scope": "public", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.UseUpdateRuleProps", - "text": "UseUpdateRuleProps" + "section": "def-public.UseLoadUiHealthProps", + "text": "UseLoadUiHealthProps" } ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_update_rule.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_ui_health.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -2151,27 +2236,6 @@ "deprecated": false, "trackAdoption": false }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.AlertsSearchBarProps.featureIds", - "type": "Array", - "tags": [], - "label": "featureIds", - "description": [], - "signature": [ - { - "pluginId": "@kbn/rule-data-utils", - "scope": "common", - "docId": "kibKbnRuleDataUtilsPluginApi", - "section": "def-common.AlertConsumers", - "text": "AlertConsumers" - }, - "[]" - ], - "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "@kbn/alerts-ui-shared", "id": "def-public.AlertsSearchBarProps.rangeFrom", @@ -2307,13 +2371,13 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.AlertsSearchBarProps.ruleTypeId", - "type": "string", + "id": "def-public.AlertsSearchBarProps.ruleTypeIds", + "type": "Array", "tags": [], - "label": "ruleTypeId", + "label": "ruleTypeIds", "description": [], "signature": [ - "string | undefined" + "string[] | undefined" ], "path": "packages/kbn-alerts-ui-shared/src/alerts_search_bar/types.ts", "deprecated": false, @@ -3009,20 +3073,13 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.FilterGroupProps.featureIds", + "id": "def-public.FilterGroupProps.ruleTypeIds", "type": "Array", "tags": [], - "label": "featureIds", + "label": "ruleTypeIds", "description": [], "signature": [ - { - "pluginId": "@kbn/rule-data-utils", - "scope": "common", - "docId": "kibKbnRuleDataUtilsPluginApi", - "section": "def-common.AlertConsumers", - "text": "AlertConsumers" - }, - "[]" + "string[]" ], "path": "packages/kbn-alerts-ui-shared/src/alert_filter_controls/types.ts", "deprecated": false, @@ -3407,37 +3464,51 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.LegacyField", + "id": "def-public.IsDisabledResult", "type": "Interface", "tags": [], - "label": "LegacyField", + "label": "IsDisabledResult", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/types/alerts_types.ts", + "path": "packages/kbn-alerts-ui-shared/src/check_action_type_enabled/check_action_type_enabled.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.LegacyField.field", + "id": "def-public.IsDisabledResult.isEnabled", + "type": "boolean", + "tags": [], + "label": "isEnabled", + "description": [], + "signature": [ + "false" + ], + "path": "packages/kbn-alerts-ui-shared/src/check_action_type_enabled/check_action_type_enabled.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.IsDisabledResult.message", "type": "string", "tags": [], - "label": "field", + "label": "message", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/types/alerts_types.ts", + "path": "packages/kbn-alerts-ui-shared/src/check_action_type_enabled/check_action_type_enabled.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.LegacyField.value", - "type": "Array", + "id": "def-public.IsDisabledResult.messageCard", + "type": "Object", "tags": [], - "label": "value", + "label": "messageCard", "description": [], "signature": [ - "string[]" + "JSX.Element" ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/alerts_types.ts", + "path": "packages/kbn-alerts-ui-shared/src/check_action_type_enabled/check_action_type_enabled.ts", "deprecated": false, "trackAdoption": false } @@ -3446,34 +3517,26 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.MinimumScheduleInterval", + "id": "def-public.IsEnabledResult", "type": "Interface", "tags": [], - "label": "MinimumScheduleInterval", + "label": "IsEnabledResult", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "path": "packages/kbn-alerts-ui-shared/src/check_action_type_enabled/check_action_type_enabled.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.MinimumScheduleInterval.value", - "type": "string", - "tags": [], - "label": "value", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.MinimumScheduleInterval.enforce", + "id": "def-public.IsEnabledResult.isEnabled", "type": "boolean", "tags": [], - "label": "enforce", + "label": "isEnabled", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "signature": [ + "true" + ], + "path": "packages/kbn-alerts-ui-shared/src/check_action_type_enabled/check_action_type_enabled.ts", "deprecated": false, "trackAdoption": false } @@ -3482,26 +3545,101 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.RuleFormActionsErrors", + "id": "def-public.LegacyField", "type": "Interface", "tags": [], - "label": "RuleFormActionsErrors", + "label": "LegacyField", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/types/alerts_types.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.RuleFormActionsErrors.filterQuery", - "type": "Array", + "id": "def-public.LegacyField.field", + "type": "string", "tags": [], - "label": "filterQuery", + "label": "field", "description": [], - "signature": [ - "string[] | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/types/alerts_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.LegacyField.value", + "type": "Array", + "tags": [], + "label": "value", + "description": [], + "signature": [ + "string[]" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/alerts_types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.MinimumScheduleInterval", + "type": "Interface", + "tags": [], + "label": "MinimumScheduleInterval", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.MinimumScheduleInterval.value", + "type": "string", + "tags": [], + "label": "value", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.MinimumScheduleInterval.enforce", + "type": "boolean", + "tags": [], + "label": "enforce", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.RuleFormActionsErrors", + "type": "Interface", + "tags": [], + "label": "RuleFormActionsErrors", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.RuleFormActionsErrors.filterQuery", + "type": "Array", + "tags": [], + "label": "filterQuery", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", "deprecated": false, "trackAdoption": false } @@ -4642,22 +4780,15 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseAlertsDataViewParams.featureIds", + "id": "def-public.UseAlertsDataViewParams.ruleTypeIds", "type": "Array", "tags": [], - "label": "featureIds", + "label": "ruleTypeIds", "description": [ - "\nArray of feature ids used for authorization and area-based filtering\n\nSecurity data views must be requested in isolation (i.e. `['siem']`). If mixed with\nother feature ids, the resulting data view will be empty." + "\nArray of rule type ids used for authorization and area-based filtering\n\nSecurity data views must be requested in isolation (i.e. `['siem']`). If mixed with\nother rule type ids, the resulting data view will be empty." ], "signature": [ - { - "pluginId": "@kbn/rule-data-utils", - "scope": "common", - "docId": "kibKbnRuleDataUtilsPluginApi", - "section": "def-common.AlertConsumers", - "text": "AlertConsumers" - }, - "[]" + "string[]" ], "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_alerts_data_view.ts", "deprecated": false, @@ -4714,541 +4845,7 @@ }, "[]; }) | undefined" ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_alerts_data_view.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseCreateRuleProps", - "type": "Interface", - "tags": [], - "label": "UseCreateRuleProps", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_create_rule.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseCreateRuleProps.http", - "type": "Object", - "tags": [], - "label": "http", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-browser", - "scope": "public", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-public.HttpSetup", - "text": "HttpSetup" - } - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_create_rule.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseCreateRuleProps.onSuccess", - "type": "Function", - "tags": [], - "label": "onSuccess", - "description": [], - "signature": [ - "((rule: ", - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.Rule", - "text": "Rule" - }, - "<", - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.RuleTypeParams", - "text": "RuleTypeParams" - }, - ">) => void) | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_create_rule.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseCreateRuleProps.onSuccess.$1", - "type": "CompoundType", - "tags": [], - "label": "rule", - "description": [], - "signature": [ - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.Rule", - "text": "Rule" - }, - "<", - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.RuleTypeParams", - "text": "RuleTypeParams" - }, - ">" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_create_rule.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseCreateRuleProps.onError", - "type": "Function", - "tags": [], - "label": "onError", - "description": [], - "signature": [ - "((error: ", - { - "pluginId": "@kbn/core-http-browser", - "scope": "public", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-public.IHttpFetchError", - "text": "IHttpFetchError" - }, - "<{ message: string; }>) => void) | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_create_rule.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseCreateRuleProps.onError.$1", - "type": "Object", - "tags": [], - "label": "error", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-browser", - "scope": "public", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-public.IHttpFetchError", - "text": "IHttpFetchError" - }, - "<{ message: string; }>" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_create_rule.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseGetAlertsGroupAggregationsQueryProps", - "type": "Interface", - "tags": [], - "label": "UseGetAlertsGroupAggregationsQueryProps", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseGetAlertsGroupAggregationsQueryProps.http", - "type": "Object", - "tags": [], - "label": "http", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-browser", - "scope": "public", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-public.HttpSetup", - "text": "HttpSetup" - } - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseGetAlertsGroupAggregationsQueryProps.toasts", - "type": "Object", - "tags": [], - "label": "toasts", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-notifications-browser", - "scope": "public", - "docId": "kibKbnCoreNotificationsBrowserPluginApi", - "section": "def-public.IToasts", - "text": "IToasts" - } - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseGetAlertsGroupAggregationsQueryProps.enabled", - "type": "CompoundType", - "tags": [], - "label": "enabled", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseGetAlertsGroupAggregationsQueryProps.params", - "type": "Object", - "tags": [], - "label": "params", - "description": [], - "signature": [ - "{ featureIds: ", - { - "pluginId": "@kbn/rule-data-utils", - "scope": "common", - "docId": "kibKbnRuleDataUtilsPluginApi", - "section": "def-common.AlertConsumers", - "text": "AlertConsumers" - }, - "[]; groupByField: string; aggregations?: Record | undefined; filters?: ", - "QueryDslQueryContainer", - "[] | undefined; sort?: ", - "SortCombinations", - "[] | undefined; pageIndex?: number | undefined; pageSize?: number | undefined; }" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseHealthCheckProps", - "type": "Interface", - "tags": [], - "label": "UseHealthCheckProps", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseHealthCheckProps.http", - "type": "Object", - "tags": [], - "label": "http", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-browser", - "scope": "public", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-public.HttpSetup", - "text": "HttpSetup" - } - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseHealthCheckResult", - "type": "Interface", - "tags": [], - "label": "UseHealthCheckResult", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseHealthCheckResult.isLoading", - "type": "boolean", - "tags": [], - "label": "isLoading", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseHealthCheckResult.healthCheckError", - "type": "CompoundType", - "tags": [], - "label": "healthCheckError", - "description": [], - "signature": [ - "HealthCheckErrors", - " | null" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseLoadAlertingFrameworkHealthProps", - "type": "Interface", - "tags": [], - "label": "UseLoadAlertingFrameworkHealthProps", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_alerting_framework_health.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseLoadAlertingFrameworkHealthProps.http", - "type": "Object", - "tags": [], - "label": "http", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-browser", - "scope": "public", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-public.HttpSetup", - "text": "HttpSetup" - } - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_alerting_framework_health.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseLoadConnectorsProps", - "type": "Interface", - "tags": [], - "label": "UseLoadConnectorsProps", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connectors.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseLoadConnectorsProps.http", - "type": "Object", - "tags": [], - "label": "http", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-browser", - "scope": "public", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-public.HttpSetup", - "text": "HttpSetup" - } - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connectors.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseLoadConnectorsProps.includeSystemActions", - "type": "CompoundType", - "tags": [], - "label": "includeSystemActions", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connectors.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseLoadConnectorsProps.enabled", - "type": "CompoundType", - "tags": [], - "label": "enabled", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connectors.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseLoadConnectorsProps.cacheTime", - "type": "number", - "tags": [], - "label": "cacheTime", - "description": [], - "signature": [ - "number | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connectors.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseLoadConnectorTypesProps", - "type": "Interface", - "tags": [], - "label": "UseLoadConnectorTypesProps", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connector_types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseLoadConnectorTypesProps.http", - "type": "Object", - "tags": [], - "label": "http", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-browser", - "scope": "public", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-public.HttpSetup", - "text": "HttpSetup" - } - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connector_types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseLoadConnectorTypesProps.includeSystemActions", - "type": "CompoundType", - "tags": [], - "label": "includeSystemActions", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connector_types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseLoadConnectorTypesProps.enabled", - "type": "CompoundType", - "tags": [], - "label": "enabled", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connector_types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseLoadConnectorTypesProps.featureId", - "type": "string", - "tags": [], - "label": "featureId", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connector_types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseLoadUiConfigProps", - "type": "Interface", - "tags": [], - "label": "UseLoadUiConfigProps", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_ui_config.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseLoadUiConfigProps.http", - "type": "Object", - "tags": [], - "label": "http", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-browser", - "scope": "public", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-public.HttpSetup", - "text": "HttpSetup" - } - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_ui_config.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_alerts_data_view.ts", "deprecated": false, "trackAdoption": false } @@ -5257,18 +4854,18 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseLoadUiHealthProps", + "id": "def-public.UseGetAlertsGroupAggregationsQueryProps", "type": "Interface", "tags": [], - "label": "UseLoadUiHealthProps", + "label": "UseGetAlertsGroupAggregationsQueryProps", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_ui_health.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseLoadUiHealthProps.http", + "id": "def-public.UseGetAlertsGroupAggregationsQueryProps.http", "type": "Object", "tags": [], "label": "http", @@ -5282,69 +4879,61 @@ "text": "HttpSetup" } ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_ui_health.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts", "deprecated": false, "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseResolveProps", - "type": "Interface", - "tags": [], - "label": "UseResolveProps", - "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_resolve_rule.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseResolveProps.http", + "id": "def-public.UseGetAlertsGroupAggregationsQueryProps.toasts", "type": "Object", "tags": [], - "label": "http", + "label": "toasts", "description": [], "signature": [ { - "pluginId": "@kbn/core-http-browser", + "pluginId": "@kbn/core-notifications-browser", "scope": "public", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-public.HttpSetup", - "text": "HttpSetup" + "docId": "kibKbnCoreNotificationsBrowserPluginApi", + "section": "def-public.IToasts", + "text": "IToasts" } ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_resolve_rule.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseResolveProps.id", - "type": "string", + "id": "def-public.UseGetAlertsGroupAggregationsQueryProps.enabled", + "type": "CompoundType", "tags": [], - "label": "id", + "label": "enabled", "description": [], "signature": [ - "string | undefined" + "boolean | undefined" ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_resolve_rule.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseResolveProps.cacheTime", - "type": "number", + "id": "def-public.UseGetAlertsGroupAggregationsQueryProps.params", + "type": "Object", "tags": [], - "label": "cacheTime", + "label": "params", "description": [], "signature": [ - "number | undefined" + "{ ruleTypeIds: string[]; consumers?: string[] | undefined; groupByField: string; aggregations?: Record | undefined; filters?: ", + "QueryDslQueryContainer", + "[] | undefined; sort?: ", + "SortCombinations", + "[] | undefined; pageIndex?: number | undefined; pageSize?: number | undefined; }" ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_resolve_rule.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts", "deprecated": false, "trackAdoption": false } @@ -5353,32 +4942,18 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseRuleAADFieldsProps", + "id": "def-public.UseHealthCheckProps", "type": "Interface", "tags": [], - "label": "UseRuleAADFieldsProps", + "label": "UseHealthCheckProps", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_rule_aad_fields.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseRuleAADFieldsProps.ruleTypeId", - "type": "string", - "tags": [], - "label": "ruleTypeId", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_rule_aad_fields.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseRuleAADFieldsProps.http", + "id": "def-public.UseHealthCheckProps.http", "type": "Object", "tags": [], "label": "http", @@ -5392,27 +4967,7 @@ "text": "HttpSetup" } ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_rule_aad_fields.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseRuleAADFieldsProps.toasts", - "type": "Object", - "tags": [], - "label": "toasts", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-notifications-browser", - "scope": "public", - "docId": "kibKbnCoreNotificationsBrowserPluginApi", - "section": "def-public.IToasts", - "text": "IToasts" - } - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_rule_aad_fields.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", "deprecated": false, "trackAdoption": false } @@ -5421,44 +4976,38 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseRuleAADFieldsResult", + "id": "def-public.UseHealthCheckResult", "type": "Interface", "tags": [], - "label": "UseRuleAADFieldsResult", + "label": "UseHealthCheckResult", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_rule_aad_fields.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseRuleAADFieldsResult.aadFields", - "type": "Array", + "id": "def-public.UseHealthCheckResult.isLoading", + "type": "boolean", "tags": [], - "label": "aadFields", + "label": "isLoading", "description": [], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewField", - "text": "DataViewField" - }, - "[]" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_rule_aad_fields.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseRuleAADFieldsResult.loading", - "type": "boolean", + "id": "def-public.UseHealthCheckResult.healthCheckError", + "type": "CompoundType", "tags": [], - "label": "loading", + "label": "healthCheckError", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_rule_aad_fields.ts", + "signature": [ + "HealthCheckErrors", + " | null" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx", "deprecated": false, "trackAdoption": false } @@ -5467,18 +5016,18 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseRuleTypesProps", + "id": "def-public.UseLoadAlertingFrameworkHealthProps", "type": "Interface", "tags": [], - "label": "UseRuleTypesProps", + "label": "UseLoadAlertingFrameworkHealthProps", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_alerting_framework_health.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseRuleTypesProps.http", + "id": "def-public.UseLoadAlertingFrameworkHealthProps.http", "type": "Object", "tags": [], "label": "http", @@ -5492,69 +5041,41 @@ "text": "HttpSetup" } ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_alerting_framework_health.ts", "deprecated": false, "trackAdoption": false - }, + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.UseLoadUiHealthProps", + "type": "Interface", + "tags": [], + "label": "UseLoadUiHealthProps", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_ui_health.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseRuleTypesProps.toasts", + "id": "def-public.UseLoadUiHealthProps.http", "type": "Object", "tags": [], - "label": "toasts", + "label": "http", "description": [], "signature": [ { - "pluginId": "@kbn/core-notifications-browser", + "pluginId": "@kbn/core-http-browser", "scope": "public", - "docId": "kibKbnCoreNotificationsBrowserPluginApi", - "section": "def-public.IToasts", - "text": "IToasts" + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-public.HttpSetup", + "text": "HttpSetup" } ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseRuleTypesProps.filteredRuleTypes", - "type": "Array", - "tags": [], - "label": "filteredRuleTypes", - "description": [], - "signature": [ - "string[] | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseRuleTypesProps.registeredRuleTypes", - "type": "Array", - "tags": [], - "label": "registeredRuleTypes", - "description": [], - "signature": [ - "{ id: string; description: string; }[] | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseRuleTypesProps.enabled", - "type": "CompoundType", - "tags": [], - "label": "enabled", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_ui_health.ts", "deprecated": false, "trackAdoption": false } @@ -5563,18 +5084,18 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseUpdateRuleProps", + "id": "def-public.UseRuleTypesProps", "type": "Interface", "tags": [], - "label": "UseUpdateRuleProps", + "label": "UseRuleTypesProps", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_update_rule.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseUpdateRuleProps.http", + "id": "def-public.UseRuleTypesProps.http", "type": "Object", "tags": [], "label": "http", @@ -5588,119 +5109,71 @@ "text": "HttpSetup" } ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_update_rule.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseUpdateRuleProps.onSuccess", - "type": "Function", + "id": "def-public.UseRuleTypesProps.toasts", + "type": "Object", "tags": [], - "label": "onSuccess", + "label": "toasts", "description": [], "signature": [ - "((rule: ", - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.Rule", - "text": "Rule" - }, - "<", { - "pluginId": "@kbn/alerts-ui-shared", + "pluginId": "@kbn/core-notifications-browser", "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.RuleTypeParams", - "text": "RuleTypeParams" - }, - ">) => void) | undefined" + "docId": "kibKbnCoreNotificationsBrowserPluginApi", + "section": "def-public.IToasts", + "text": "IToasts" + } ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_update_rule.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseUpdateRuleProps.onSuccess.$1", - "type": "CompoundType", - "tags": [], - "label": "rule", - "description": [], - "signature": [ - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.Rule", - "text": "Rule" - }, - "<", - { - "pluginId": "@kbn/alerts-ui-shared", - "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-public.RuleTypeParams", - "text": "RuleTypeParams" - }, - ">" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_update_rule.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.UseRuleTypesProps.filteredRuleTypes", + "type": "Array", + "tags": [], + "label": "filteredRuleTypes", + "description": [], + "signature": [ + "string[] | undefined" ], - "returnComment": [] + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", + "deprecated": false, + "trackAdoption": false }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseUpdateRuleProps.onError", - "type": "Function", + "id": "def-public.UseRuleTypesProps.registeredRuleTypes", + "type": "Array", "tags": [], - "label": "onError", + "label": "registeredRuleTypes", "description": [], "signature": [ - "((error: ", - { - "pluginId": "@kbn/core-http-browser", - "scope": "public", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-public.IHttpFetchError", - "text": "IHttpFetchError" - }, - "<{ message: string; }>) => void) | undefined" + "{ id: string; description: string; }[] | undefined" ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_update_rule.ts", + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-public.UseUpdateRuleProps.onError.$1", - "type": "Object", - "tags": [], - "label": "error", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-browser", - "scope": "public", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-public.IHttpFetchError", - "text": "IHttpFetchError" - }, - "<{ message: string; }>" - ], - "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_update_rule.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.UseRuleTypesProps.enabled", + "type": "CompoundType", + "tags": [], + "label": "enabled", + "description": [], + "signature": [ + "boolean | undefined" ], - "returnComment": [] + "path": "packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -5746,6 +5219,42 @@ "deprecated": false, "trackAdoption": false, "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.AlertProvidedActionVariables", + "type": "Enum", + "tags": [], + "label": "AlertProvidedActionVariables", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/action_variables/action_variables.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.LegacyAlertProvidedActionVariables", + "type": "Enum", + "tags": [], + "label": "LegacyAlertProvidedActionVariables", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/action_variables/action_variables.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.SummaryAlertProvidedActionVariables", + "type": "Enum", + "tags": [], + "label": "SummaryAlertProvidedActionVariables", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/action_variables/action_variables.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false } ], "misc": [ @@ -6525,6 +6034,21 @@ } ], "objects": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.AlertProvidedActionVariableDescriptions", + "type": "Object", + "tags": [], + "label": "AlertProvidedActionVariableDescriptions", + "description": [], + "signature": [ + "{ [x: `rule.params.${string}`]: ActionVariablesWithoutName; params: ActionVariablesWithoutName; spaceId: ActionVariablesWithoutName; date: ActionVariablesWithoutName; tags: ActionVariablesWithoutName; alertId: ActionVariablesWithoutName; alertInstanceId: ActionVariablesWithoutName; \"rule.id\": ActionVariablesWithoutName; \"rule.name\": ActionVariablesWithoutName; \"alert.uuid\": ActionVariablesWithoutName; \"alert.flapping\": ActionVariablesWithoutName; \"rule.tags\": ActionVariablesWithoutName; \"rule.type\": ActionVariablesWithoutName; alertName: ActionVariablesWithoutName; alertActionGroup: ActionVariablesWithoutName; alertActionGroupName: ActionVariablesWithoutName; kibanaBaseUrl: ActionVariablesWithoutName; \"rule.spaceId\": ActionVariablesWithoutName; \"rule.url\": ActionVariablesWithoutName; \"alert.id\": ActionVariablesWithoutName; \"alert.actionGroup\": ActionVariablesWithoutName; \"alert.actionGroupName\": ActionVariablesWithoutName; \"alert.consecutiveMatches\": ActionVariablesWithoutName; \"rule.params\": ActionVariablesWithoutName; }" + ], + "path": "packages/kbn-alerts-ui-shared/src/action_variables/action_variables.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/alerts-ui-shared", "id": "def-public.search", @@ -6584,6 +6108,277 @@ } ], "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-public.SummarizedAlertProvidedActionVariableDescriptions", + "type": "Object", + "tags": [], + "label": "SummarizedAlertProvidedActionVariableDescriptions", + "description": [], + "signature": [ + "{ [x: `rule.params.${string}`]: Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; params: Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; spaceId: Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; date: Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; tags: Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; alertId: Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; alertInstanceId: Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; \"rule.id\": Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; \"rule.name\": Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; \"alert.uuid\": Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; \"alert.flapping\": Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; \"rule.tags\": Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; \"rule.type\": Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; alertName: Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; alertActionGroup: Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; alertActionGroupName: Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; kibanaBaseUrl: Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; \"rule.spaceId\": Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; \"rule.url\": Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; \"alert.id\": Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; \"alert.actionGroup\": Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; \"alert.actionGroupName\": Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; \"alert.consecutiveMatches\": Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; \"rule.params\": Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; \"alerts.recovered.count\": Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; \"alerts.recovered.data\": Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; \"alerts.new.count\": Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; \"alerts.new.data\": Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; \"alerts.all.count\": Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; \"alerts.all.data\": Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; \"alerts.ongoing.count\": Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; \"alerts.ongoing.data\": Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + ", \"name\">; }" + ], + "path": "packages/kbn-alerts-ui-shared/src/action_variables/action_variables.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false } ] }, diff --git a/api_docs/kbn_alerts_ui_shared.mdx b/api_docs/kbn_alerts_ui_shared.mdx index a7782cbaa4f9d..03a37f44fe7c4 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-ui-shared'] --- import kbnAlertsUiSharedObj from './kbn_alerts_ui_shared.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 | |-------------------|-----------|------------------------|-----------------| -| 321 | 0 | 305 | 8 | +| 302 | 0 | 286 | 4 | ## Client diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index ae60c10576c2a..2a0ed19749522 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] --- import kbnAnalyticsObj from './kbn_analytics.devdocs.json'; diff --git a/api_docs/kbn_analytics_collection_utils.mdx b/api_docs/kbn_analytics_collection_utils.mdx index 97a3136817a85..2bc6282fc5ce3 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-collection-utils'] --- import kbnAnalyticsCollectionUtilsObj from './kbn_analytics_collection_utils.devdocs.json'; diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index 7d55856b96a49..5789a45a790bf 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] --- import kbnApmConfigLoaderObj from './kbn_apm_config_loader.devdocs.json'; diff --git a/api_docs/kbn_apm_data_view.mdx b/api_docs/kbn_apm_data_view.mdx index 30054ed6564bb..56a6621ea877a 100644 --- a/api_docs/kbn_apm_data_view.mdx +++ b/api_docs/kbn_apm_data_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-data-view title: "@kbn/apm-data-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-data-view plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-data-view'] --- import kbnApmDataViewObj from './kbn_apm_data_view.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index d4b7c0441ba4b..599aa2fb083dc 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-12-02 +date: 2024-12-05 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 9bc8c6ec59d34..ffcac4379cef7 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-12-02 +date: 2024-12-05 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_types.mdx b/api_docs/kbn_apm_types.mdx index 082127f58e13d..fb96df17d1788 100644 --- a/api_docs/kbn_apm_types.mdx +++ b/api_docs/kbn_apm_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-types title: "@kbn/apm-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-types plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-types'] --- import kbnApmTypesObj from './kbn_apm_types.devdocs.json'; diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index 47472783f8458..f1a9e5e8c8fd3 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils'] --- import kbnApmUtilsObj from './kbn_apm_utils.devdocs.json'; diff --git a/api_docs/kbn_avc_banner.mdx b/api_docs/kbn_avc_banner.mdx index 422749814b8ee..0a520cce01d44 100644 --- a/api_docs/kbn_avc_banner.mdx +++ b/api_docs/kbn_avc_banner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-avc-banner title: "@kbn/avc-banner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/avc-banner plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/avc-banner'] --- import kbnAvcBannerObj from './kbn_avc_banner.devdocs.json'; diff --git a/api_docs/kbn_axe_config.mdx b/api_docs/kbn_axe_config.mdx index 32965b8a1e688..7d18395a49575 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-12-02 +date: 2024-12-05 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 a112070aaadde..e97ce07efcea2 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-12-02 +date: 2024-12-05 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 6cafea8b0d33c..1ee103258509d 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-12-02 +date: 2024-12-05 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 cf21c3283e7d0..7a2a97b5e03e9 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-12-02 +date: 2024-12-05 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 ff9a37172a8c5..7f23851f916f3 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cases-components'] --- import kbnCasesComponentsObj from './kbn_cases_components.devdocs.json'; diff --git a/api_docs/kbn_cbor.mdx b/api_docs/kbn_cbor.mdx index 7102ceb736fce..823e8c539063e 100644 --- a/api_docs/kbn_cbor.mdx +++ b/api_docs/kbn_cbor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cbor title: "@kbn/cbor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cbor plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cbor'] --- import kbnCborObj from './kbn_cbor.devdocs.json'; diff --git a/api_docs/kbn_cell_actions.mdx b/api_docs/kbn_cell_actions.mdx index aafbdf6bd8d2e..8d761c6213a28 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-12-02 +date: 2024-12-05 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 239fd69cfaf2a..eceff927c7476 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-12-02 +date: 2024-12-05 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 8d228de6e21d6..5182a6bc65785 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-12-02 +date: 2024-12-05 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 e9833aa79b503..37384a9fb79fe 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-12-02 +date: 2024-12-05 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 e5d8aed69cb81..eec85e6d1ec36 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-12-02 +date: 2024-12-05 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 c7203680ff60e..e6ae95bf722a1 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-12-02 +date: 2024-12-05 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 bc9a7b814c3f5..eef9901d343f6 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; diff --git a/api_docs/kbn_cloud_security_posture.devdocs.json b/api_docs/kbn_cloud_security_posture.devdocs.json index 37cc79e0d28b8..62f5fce1db937 100644 --- a/api_docs/kbn_cloud_security_posture.devdocs.json +++ b/api_docs/kbn_cloud_security_posture.devdocs.json @@ -270,7 +270,7 @@ "label": "getVulnerabilityStats", "description": [], "signature": [ - "(counts: VulnerabilityCounts) => VulnerabilitiesDistributionBarProps[]" + "(counts: VulnerabilityCounts, filterFunction?: ((filter: string) => void) | undefined, currentFilter?: string | undefined) => VulnerabilitiesDistributionBarProps[]" ], "path": "x-pack/packages/kbn-cloud-security-posture/public/src/utils/vulnerability_helpers.ts", "deprecated": false, @@ -290,6 +290,36 @@ "deprecated": false, "trackAdoption": false, "isRequired": true + }, + { + "parentPluginId": "@kbn/cloud-security-posture", + "id": "def-public.getVulnerabilityStats.$2", + "type": "Function", + "tags": [], + "label": "filterFunction", + "description": [], + "signature": [ + "((filter: string) => void) | undefined" + ], + "path": "x-pack/packages/kbn-cloud-security-posture/public/src/utils/vulnerability_helpers.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + }, + { + "parentPluginId": "@kbn/cloud-security-posture", + "id": "def-public.getVulnerabilityStats.$3", + "type": "string", + "tags": [], + "label": "currentFilter", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/packages/kbn-cloud-security-posture/public/src/utils/vulnerability_helpers.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false } ], "returnComment": [], @@ -444,9 +474,9 @@ "label": "query", "description": [], "signature": [ - "{ bool: { filter: ", + "{ bool: { filter: (", "QueryDslQueryContainer", - "[]; }; } | undefined" + " | undefined)[] | undefined; }; } | undefined" ], "path": "x-pack/packages/kbn-cloud-security-posture/public/src/types.ts", "deprecated": false, @@ -1042,6 +1072,21 @@ ], "enums": [], "misc": [ + { + "parentPluginId": "@kbn/cloud-security-posture", + "id": "def-public.HOST_NAME", + "type": "string", + "tags": [], + "label": "HOST_NAME", + "description": [], + "signature": [ + "\"host.name\"" + ], + "path": "x-pack/packages/kbn-cloud-security-posture/public/src/constants/component_constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/cloud-security-posture", "id": "def-public.LatestFindingsRequest", @@ -1120,6 +1165,21 @@ "deprecated": false, "trackAdoption": false, "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/cloud-security-posture", + "id": "def-public.USER_NAME", + "type": "string", + "tags": [], + "label": "USER_NAME", + "description": [], + "signature": [ + "\"user.name\"" + ], + "path": "x-pack/packages/kbn-cloud-security-posture/public/src/constants/component_constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false } ], "objects": [ diff --git a/api_docs/kbn_cloud_security_posture.mdx b/api_docs/kbn_cloud_security_posture.mdx index 2a4b9cf5cecf4..7f538e041d2c3 100644 --- a/api_docs/kbn_cloud_security_posture.mdx +++ b/api_docs/kbn_cloud_security_posture.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cloud-security-posture title: "@kbn/cloud-security-posture" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cloud-security-posture plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cloud-security-posture'] --- import kbnCloudSecurityPostureObj from './kbn_cloud_security_posture.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-cloud-security-posture](https://github.com/orgs/elastic | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 89 | 1 | 89 | 0 | +| 93 | 1 | 93 | 0 | ## Client diff --git a/api_docs/kbn_cloud_security_posture_common.devdocs.json b/api_docs/kbn_cloud_security_posture_common.devdocs.json index 6c0ae2a2db8aa..5e993b4e3c1f3 100644 --- a/api_docs/kbn_cloud_security_posture_common.devdocs.json +++ b/api_docs/kbn_cloud_security_posture_common.devdocs.json @@ -129,13 +129,13 @@ "functions": [ { "parentPluginId": "@kbn/cloud-security-posture-common", - "id": "def-common.buildEntityFlyoutPreviewQuery", + "id": "def-common.buildGenericEntityFlyoutPreviewQuery", "type": "Function", "tags": [], - "label": "buildEntityFlyoutPreviewQuery", + "label": "buildGenericEntityFlyoutPreviewQuery", "description": [], "signature": [ - "(field: string, queryValue?: string | undefined) => { bool: { filter: { bool: { should: { term: { [x: string]: string; }; }[]; minimum_should_match: number; }; }[]; }; }" + "(field: string, queryValue?: string | undefined, status?: string | undefined, queryField?: string | undefined) => { bool: { filter: ({ bool: { should: { term: { [x: string]: string; }; }[]; minimum_should_match: number; }; } | undefined)[]; }; }" ], "path": "x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.ts", "deprecated": false, @@ -143,7 +143,7 @@ "children": [ { "parentPluginId": "@kbn/cloud-security-posture-common", - "id": "def-common.buildEntityFlyoutPreviewQuery.$1", + "id": "def-common.buildGenericEntityFlyoutPreviewQuery.$1", "type": "string", "tags": [], "label": "field", @@ -158,7 +158,7 @@ }, { "parentPluginId": "@kbn/cloud-security-posture-common", - "id": "def-common.buildEntityFlyoutPreviewQuery.$2", + "id": "def-common.buildGenericEntityFlyoutPreviewQuery.$2", "type": "string", "tags": [], "label": "queryValue", @@ -170,6 +170,99 @@ "deprecated": false, "trackAdoption": false, "isRequired": false + }, + { + "parentPluginId": "@kbn/cloud-security-posture-common", + "id": "def-common.buildGenericEntityFlyoutPreviewQuery.$3", + "type": "string", + "tags": [], + "label": "status", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + }, + { + "parentPluginId": "@kbn/cloud-security-posture-common", + "id": "def-common.buildGenericEntityFlyoutPreviewQuery.$4", + "type": "string", + "tags": [], + "label": "queryField", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/cloud-security-posture-common", + "id": "def-common.buildMisconfigurationEntityFlyoutPreviewQuery", + "type": "Function", + "tags": [], + "label": "buildMisconfigurationEntityFlyoutPreviewQuery", + "description": [], + "signature": [ + "(field: string, queryValue?: string | undefined, status?: string | undefined) => { bool: { filter: ({ bool: { should: { term: { [x: string]: string; }; }[]; minimum_should_match: number; }; } | undefined)[]; }; }" + ], + "path": "x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/cloud-security-posture-common", + "id": "def-common.buildMisconfigurationEntityFlyoutPreviewQuery.$1", + "type": "string", + "tags": [], + "label": "field", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/cloud-security-posture-common", + "id": "def-common.buildMisconfigurationEntityFlyoutPreviewQuery.$2", + "type": "string", + "tags": [], + "label": "queryValue", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + }, + { + "parentPluginId": "@kbn/cloud-security-posture-common", + "id": "def-common.buildMisconfigurationEntityFlyoutPreviewQuery.$3", + "type": "string", + "tags": [], + "label": "status", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false } ], "returnComment": [], @@ -210,6 +303,69 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/cloud-security-posture-common", + "id": "def-common.buildVulnerabilityEntityFlyoutPreviewQuery", + "type": "Function", + "tags": [], + "label": "buildVulnerabilityEntityFlyoutPreviewQuery", + "description": [], + "signature": [ + "(field: string, queryValue?: string | undefined, status?: string | undefined) => { bool: { filter: ({ bool: { should: { term: { [x: string]: string; }; }[]; minimum_should_match: number; }; } | undefined)[]; }; }" + ], + "path": "x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/cloud-security-posture-common", + "id": "def-common.buildVulnerabilityEntityFlyoutPreviewQuery.$1", + "type": "string", + "tags": [], + "label": "field", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/cloud-security-posture-common", + "id": "def-common.buildVulnerabilityEntityFlyoutPreviewQuery.$2", + "type": "string", + "tags": [], + "label": "queryValue", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + }, + { + "parentPluginId": "@kbn/cloud-security-posture-common", + "id": "def-common.buildVulnerabilityEntityFlyoutPreviewQuery.$3", + "type": "string", + "tags": [], + "label": "status", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/cloud-security-posture-common", "id": "def-common.extractErrorMessage", @@ -1556,6 +1712,42 @@ } ], "objects": [ + { + "parentPluginId": "@kbn/cloud-security-posture-common", + "id": "def-common.MISCONFIGURATION_STATUS", + "type": "Object", + "tags": [], + "label": "MISCONFIGURATION_STATUS", + "description": [], + "path": "x-pack/packages/kbn-cloud-security-posture/common/constants.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/cloud-security-posture-common", + "id": "def-common.MISCONFIGURATION_STATUS.PASSED", + "type": "string", + "tags": [], + "label": "PASSED", + "description": [], + "path": "x-pack/packages/kbn-cloud-security-posture/common/constants.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/cloud-security-posture-common", + "id": "def-common.MISCONFIGURATION_STATUS.FAILED", + "type": "string", + "tags": [], + "label": "FAILED", + "description": [], + "path": "x-pack/packages/kbn-cloud-security-posture/common/constants.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/cloud-security-posture-common", "id": "def-common.VULNERABILITIES_SEVERITY", diff --git a/api_docs/kbn_cloud_security_posture_common.mdx b/api_docs/kbn_cloud_security_posture_common.mdx index d48d105d62a6d..3061b19b9b5b6 100644 --- a/api_docs/kbn_cloud_security_posture_common.mdx +++ b/api_docs/kbn_cloud_security_posture_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cloud-security-posture-common title: "@kbn/cloud-security-posture-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cloud-security-posture-common plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cloud-security-posture-common'] --- import kbnCloudSecurityPostureCommonObj from './kbn_cloud_security_posture_common.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-cloud-security-posture](https://github.com/orgs/elastic | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 109 | 0 | 107 | 1 | +| 122 | 0 | 120 | 1 | ## Common diff --git a/api_docs/kbn_cloud_security_posture_graph.mdx b/api_docs/kbn_cloud_security_posture_graph.mdx index 02a47d6bb3ac0..0c4de1cb4f303 100644 --- a/api_docs/kbn_cloud_security_posture_graph.mdx +++ b/api_docs/kbn_cloud_security_posture_graph.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cloud-security-posture-graph title: "@kbn/cloud-security-posture-graph" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cloud-security-posture-graph plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cloud-security-posture-graph'] --- import kbnCloudSecurityPostureGraphObj from './kbn_cloud_security_posture_graph.devdocs.json'; diff --git a/api_docs/kbn_code_editor.mdx b/api_docs/kbn_code_editor.mdx index 0101f5a4ddec8..4e2366ef40ef0 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-12-02 +date: 2024-12-05 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 2a99a5474f574..69f24d27ba3ed 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-12-02 +date: 2024-12-05 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 77586f5cd67fa..a5d4ee78e778b 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-12-02 +date: 2024-12-05 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 325a4e3294f58..18f3e55f51bce 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-12-02 +date: 2024-12-05 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 c658a8755bffd..0d610b960ae19 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-12-02 +date: 2024-12-05 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 214b24b50c4d7..2a9d3e05c72a4 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-12-02 +date: 2024-12-05 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 560c0eff57e83..e5bc89bc83666 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-12-02 +date: 2024-12-05 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 bb6c24d93c714..3161c83420fab 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-12-02 +date: 2024-12-05 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_content_insights_public.mdx b/api_docs/kbn_content_management_content_insights_public.mdx index 9527087b06ee4..8d37ce7a9090d 100644 --- a/api_docs/kbn_content_management_content_insights_public.mdx +++ b/api_docs/kbn_content_management_content_insights_public.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-content-insights-public title: "@kbn/content-management-content-insights-public" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-content-insights-public plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-content-insights-public'] --- import kbnContentManagementContentInsightsPublicObj from './kbn_content_management_content_insights_public.devdocs.json'; diff --git a/api_docs/kbn_content_management_content_insights_server.mdx b/api_docs/kbn_content_management_content_insights_server.mdx index c14fa9867e59d..a161d2ea1d6db 100644 --- a/api_docs/kbn_content_management_content_insights_server.mdx +++ b/api_docs/kbn_content_management_content_insights_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-content-insights-server title: "@kbn/content-management-content-insights-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-content-insights-server plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-content-insights-server'] --- import kbnContentManagementContentInsightsServerObj from './kbn_content_management_content_insights_server.devdocs.json'; diff --git a/api_docs/kbn_content_management_favorites_common.mdx b/api_docs/kbn_content_management_favorites_common.mdx index 305b54d60c35e..73d3db4f243ab 100644 --- a/api_docs/kbn_content_management_favorites_common.mdx +++ b/api_docs/kbn_content_management_favorites_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-favorites-common title: "@kbn/content-management-favorites-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-favorites-common plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-favorites-common'] --- import kbnContentManagementFavoritesCommonObj from './kbn_content_management_favorites_common.devdocs.json'; diff --git a/api_docs/kbn_content_management_favorites_public.mdx b/api_docs/kbn_content_management_favorites_public.mdx index 9c0cbd32aaa37..001d4187cdb59 100644 --- a/api_docs/kbn_content_management_favorites_public.mdx +++ b/api_docs/kbn_content_management_favorites_public.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-favorites-public title: "@kbn/content-management-favorites-public" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-favorites-public plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-favorites-public'] --- import kbnContentManagementFavoritesPublicObj from './kbn_content_management_favorites_public.devdocs.json'; diff --git a/api_docs/kbn_content_management_favorites_server.mdx b/api_docs/kbn_content_management_favorites_server.mdx index 581beb79cd422..422aa03144436 100644 --- a/api_docs/kbn_content_management_favorites_server.mdx +++ b/api_docs/kbn_content_management_favorites_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-favorites-server title: "@kbn/content-management-favorites-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-favorites-server plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-favorites-server'] --- import kbnContentManagementFavoritesServerObj from './kbn_content_management_favorites_server.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 eb34359ef0560..8e6097f33c5c7 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-12-02 +date: 2024-12-05 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 9475bfa5aecbf..88c4312a3f1fa 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-12-02 +date: 2024-12-05 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 b121f64e560a0..759a66f28587b 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-12-02 +date: 2024-12-05 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 716f7d3c5690b..cbe6712566e89 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-12-02 +date: 2024-12-05 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_user_profiles.mdx b/api_docs/kbn_content_management_user_profiles.mdx index 19e3f1a4e2032..ef4957429848d 100644 --- a/api_docs/kbn_content_management_user_profiles.mdx +++ b/api_docs/kbn_content_management_user_profiles.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-user-profiles title: "@kbn/content-management-user-profiles" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-user-profiles plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-user-profiles'] --- import kbnContentManagementUserProfilesObj from './kbn_content_management_user_profiles.devdocs.json'; diff --git a/api_docs/kbn_content_management_utils.mdx b/api_docs/kbn_content_management_utils.mdx index 76184143bce7c..33a653d39a967 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-12-02 +date: 2024-12-05 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.devdocs.json b/api_docs/kbn_core_analytics_browser.devdocs.json index 2f2c5fc3f3d9f..d9e9918f342d9 100644 --- a/api_docs/kbn_core_analytics_browser.devdocs.json +++ b/api_docs/kbn_core_analytics_browser.devdocs.json @@ -942,6 +942,10 @@ "plugin": "inventory", "path": "x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_client.ts" }, + { + "plugin": "inventory", + "path": "x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_client.ts" + }, { "plugin": "observabilityLogsExplorer", "path": "x-pack/plugins/observability_solution/observability_logs_explorer/public/state_machines/observability_logs_explorer/src/telemetry_events.ts" @@ -1398,6 +1402,14 @@ "plugin": "inventory", "path": "x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_service.test.ts" }, + { + "plugin": "inventory", + "path": "x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_service.test.ts" + }, + { + "plugin": "inventory", + "path": "x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_service.test.ts" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/lib/telemetry/telemetry_service.test.ts" diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index c505ad8d6fb55..a3832c4febbaa 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-12-02 +date: 2024-12-05 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 380fb1316ae2c..cf3c7a9263d90 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-12-02 +date: 2024-12-05 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 335e18d4f6f12..617fa01449b91 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-12-02 +date: 2024-12-05 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.devdocs.json b/api_docs/kbn_core_analytics_server.devdocs.json index fe50bcb0679dd..f551b259301d1 100644 --- a/api_docs/kbn_core_analytics_server.devdocs.json +++ b/api_docs/kbn_core_analytics_server.devdocs.json @@ -950,6 +950,10 @@ "plugin": "inventory", "path": "x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_client.ts" }, + { + "plugin": "inventory", + "path": "x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_client.ts" + }, { "plugin": "observabilityLogsExplorer", "path": "x-pack/plugins/observability_solution/observability_logs_explorer/public/state_machines/observability_logs_explorer/src/telemetry_events.ts" @@ -1406,6 +1410,14 @@ "plugin": "inventory", "path": "x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_service.test.ts" }, + { + "plugin": "inventory", + "path": "x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_service.test.ts" + }, + { + "plugin": "inventory", + "path": "x-pack/plugins/observability_solution/inventory/public/services/telemetry/telemetry_service.test.ts" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/lib/telemetry/telemetry_service.test.ts" diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx index 4a9d175088940..59108e360bacc 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-12-02 +date: 2024-12-05 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 e2fe871cf5b42..4dbe3607886d8 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-12-02 +date: 2024-12-05 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 2fcc36bb05305..07430df9d07f2 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-12-02 +date: 2024-12-05 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.devdocs.json b/api_docs/kbn_core_application_browser.devdocs.json index a26570399596d..ebe47e7422312 100644 --- a/api_docs/kbn_core_application_browser.devdocs.json +++ b/api_docs/kbn_core_application_browser.devdocs.json @@ -1201,6 +1201,10 @@ "plugin": "@kbn/core-application-browser-mocks", "path": "packages/core/application/core-application-browser-mocks/src/application_service.mock.ts" }, + { + "plugin": "assetInventory", + "path": "x-pack/plugins/asset_inventory/public/application.tsx" + }, { "plugin": "fleet", "path": "x-pack/plugins/fleet/public/applications/integrations/index.tsx" diff --git a/api_docs/kbn_core_application_browser.mdx b/api_docs/kbn_core_application_browser.mdx index be23a6f20d572..fcb768fc96bad 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-12-02 +date: 2024-12-05 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 67517ac9d25e1..a40c22b14fbb6 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-12-02 +date: 2024-12-05 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 59300938cc852..b584e1505faa2 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-12-02 +date: 2024-12-05 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 bcba5d0726476..94c96cb04f150 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-12-02 +date: 2024-12-05 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 29c9b1fa48233..d682dff24480c 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-12-02 +date: 2024-12-05 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 90100776befda..0b4146c285cc8 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-12-02 +date: 2024-12-05 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 896cddc51d978..77743705ed3a9 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-server-internal'] --- import kbnCoreAppsServerInternalObj from './kbn_core_apps_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index 5766ea27ee532..b1fc695a87a2c 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-12-02 +date: 2024-12-05 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 65cceb72d2d37..bf98cd68db054 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-12-02 +date: 2024-12-05 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 01bd872b36a7d..bae54f0339b9a 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-12-02 +date: 2024-12-05 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 daa0b387f2343..9b89a6db2d7f9 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-12-02 +date: 2024-12-05 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 d62d9c9fd6852..b8bf30f841ca5 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-12-02 +date: 2024-12-05 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 6965f6ff7bc44..eec671caf8033 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-12-02 +date: 2024-12-05 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 72463d7d17836..953a27c63b3fd 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-12-02 +date: 2024-12-05 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 36ff34d66e45f..c560507ef80ea 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-12-02 +date: 2024-12-05 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 acc96d2631c68..113afb7d94fca 100644 --- a/api_docs/kbn_core_chrome_browser.devdocs.json +++ b/api_docs/kbn_core_chrome_browser.devdocs.json @@ -3765,7 +3765,7 @@ "label": "AppDeepLinkId", "description": [], "signature": [ - "\"fleet\" | \"graph\" | \"ml\" | \"monitoring\" | \"profiling\" | \"metrics\" | \"management\" | \"apm\" | \"synthetics\" | \"ux\" | \"canvas\" | \"logs\" | \"dashboards\" | \"slo\" | \"observabilityAIAssistant\" | \"home\" | \"integrations\" | \"discover\" | \"observability-overview\" | \"streams\" | \"appSearch\" | \"dev_tools\" | \"maps\" | \"visualize\" | \"dev_tools:console\" | \"dev_tools:searchprofiler\" | \"dev_tools:painless_lab\" | \"dev_tools:grokdebugger\" | \"ml:notifications\" | \"ml:nodes\" | \"ml:overview\" | \"ml:memoryUsage\" | \"ml:settings\" | \"ml:dataVisualizer\" | \"ml:logPatternAnalysis\" | \"ml:logRateAnalysis\" | \"ml:singleMetricViewer\" | \"ml:anomalyDetection\" | \"ml:anomalyExplorer\" | \"ml:dataDrift\" | \"ml:dataFrameAnalytics\" | \"ml:resultExplorer\" | \"ml:analyticsMap\" | \"ml:aiOps\" | \"ml:changePointDetections\" | \"ml:modelManagement\" | \"ml:nodesOverview\" | \"ml:esqlDataVisualizer\" | \"ml:fileUpload\" | \"ml:indexDataVisualizer\" | \"ml:calendarSettings\" | \"ml:filterListsSettings\" | \"ml:suppliedConfigurations\" | \"osquery\" | \"management:transform\" | \"management:watcher\" | \"management:cases\" | \"management:tags\" | \"management:maintenanceWindows\" | \"management:cross_cluster_replication\" | \"management:dataViews\" | \"management:spaces\" | \"management:settings\" | \"management:users\" | \"management:migrate_data\" | \"management:search_sessions\" | \"management:data_quality\" | \"management:filesManagement\" | \"management:roles\" | \"management:reporting\" | \"management:aiAssistantManagementSelection\" | \"management:securityAiAssistantManagement\" | \"management:observabilityAiAssistantManagement\" | \"management:api_keys\" | \"management:license_management\" | \"management:index_lifecycle_management\" | \"management:index_management\" | \"management:ingest_pipelines\" | \"management:jobsListLink\" | \"management:objects\" | \"management:pipelines\" | \"management:remote_clusters\" | \"management:role_mappings\" | \"management:rollup_jobs\" | \"management:snapshot_restore\" | \"management:triggersActions\" | \"management:triggersActionsConnectors\" | \"management:upgrade_assistant\" | \"enterpriseSearch\" | \"enterpriseSearchContent\" | \"enterpriseSearchApplications\" | \"searchInferenceEndpoints\" | \"enterpriseSearchAnalytics\" | \"workplaceSearch\" | \"serverlessElasticsearch\" | \"serverlessConnectors\" | \"serverlessWebCrawlers\" | \"searchPlayground\" | \"searchHomepage\" | \"enterpriseSearchContent:connectors\" | \"enterpriseSearchContent:searchIndices\" | \"enterpriseSearchContent:webCrawlers\" | \"enterpriseSearchApplications:searchApplications\" | \"enterpriseSearchApplications:playground\" | \"appSearch:engines\" | \"searchInferenceEndpoints:inferenceEndpoints\" | \"elasticsearchStart\" | \"elasticsearchIndices\" | \"enterpriseSearchElasticsearch\" | \"enterpriseSearchVectorSearch\" | \"enterpriseSearchSemanticSearch\" | \"enterpriseSearchAISearch\" | \"elasticsearchIndices:createIndex\" | \"observability-logs-explorer\" | \"last-used-logs-viewer\" | \"observabilityOnboarding\" | \"inventory\" | \"logs:settings\" | \"logs:stream\" | \"logs:log-categories\" | \"logs:anomalies\" | \"observability-overview:cases\" | \"observability-overview:alerts\" | \"observability-overview:rules\" | \"observability-overview:cases_create\" | \"observability-overview:cases_configure\" | \"metrics:settings\" | \"metrics:hosts\" | \"metrics:inventory\" | \"metrics:metrics-explorer\" | \"metrics:assetDetails\" | \"apm:services\" | \"apm:traces\" | \"apm:dependencies\" | \"apm:service-map\" | \"apm:settings\" | \"apm:service-groups-list\" | \"apm:storage-explorer\" | \"synthetics:overview\" | \"synthetics:certificates\" | \"profiling:functions\" | \"profiling:stacktraces\" | \"profiling:flamegraphs\" | \"inventory:datastreams\" | \"streams:overview\" | \"securitySolutionUI\" | \"securitySolutionUI:\" | \"securitySolutionUI:cases\" | \"securitySolutionUI:alerts\" | \"securitySolutionUI:rules\" | \"securitySolutionUI:policy\" | \"securitySolutionUI:overview\" | \"securitySolutionUI:dashboards\" | \"securitySolutionUI:kubernetes\" | \"securitySolutionUI:cases_create\" | \"securitySolutionUI:cases_configure\" | \"securitySolutionUI:hosts\" | \"securitySolutionUI:users\" | \"securitySolutionUI:cloud_defend-policies\" | \"securitySolutionUI:cloud_security_posture-dashboard\" | \"securitySolutionUI:cloud_security_posture-findings\" | \"securitySolutionUI:cloud_security_posture-benchmarks\" | \"securitySolutionUI:network\" | \"securitySolutionUI:data_quality\" | \"securitySolutionUI:explore\" | \"securitySolutionUI:assets\" | \"securitySolutionUI:cloud_defend\" | \"securitySolutionUI:notes\" | \"securitySolutionUI:administration\" | \"securitySolutionUI:attack_discovery\" | \"securitySolutionUI:blocklist\" | \"securitySolutionUI:cloud_security_posture-rules\" | \"securitySolutionUI:detections\" | \"securitySolutionUI:detection_response\" | \"securitySolutionUI:endpoints\" | \"securitySolutionUI:event_filters\" | \"securitySolutionUI:exceptions\" | \"securitySolutionUI:host_isolation_exceptions\" | \"securitySolutionUI:hosts-all\" | \"securitySolutionUI:hosts-anomalies\" | \"securitySolutionUI:hosts-risk\" | \"securitySolutionUI:hosts-events\" | \"securitySolutionUI:hosts-sessions\" | \"securitySolutionUI:hosts-uncommon_processes\" | \"securitySolutionUI:investigations\" | \"securitySolutionUI:get_started\" | \"securitySolutionUI:machine_learning-landing\" | \"securitySolutionUI:network-anomalies\" | \"securitySolutionUI:network-dns\" | \"securitySolutionUI:network-events\" | \"securitySolutionUI:network-flows\" | \"securitySolutionUI:network-http\" | \"securitySolutionUI:network-tls\" | \"securitySolutionUI:response_actions_history\" | \"securitySolutionUI:rules-add\" | \"securitySolutionUI:rules-create\" | \"securitySolutionUI:rules-landing\" | \"securitySolutionUI:siem_migrations-rules\" | \"securitySolutionUI:threat_intelligence\" | \"securitySolutionUI:timelines\" | \"securitySolutionUI:timelines-templates\" | \"securitySolutionUI:trusted_apps\" | \"securitySolutionUI:users-all\" | \"securitySolutionUI:users-anomalies\" | \"securitySolutionUI:users-authentications\" | \"securitySolutionUI:users-events\" | \"securitySolutionUI:users-risk\" | \"securitySolutionUI:entity_analytics\" | \"securitySolutionUI:entity_analytics-management\" | \"securitySolutionUI:entity_analytics-asset-classification\" | \"securitySolutionUI:entity_analytics-entity_store_management\" | \"securitySolutionUI:coverage-overview\" | \"fleet:settings\" | \"fleet:agents\" | \"fleet:policies\" | \"fleet:data_streams\" | \"fleet:enrollment_tokens\" | \"fleet:uninstall_tokens\"" + "\"fleet\" | \"graph\" | \"ml\" | \"monitoring\" | \"profiling\" | \"metrics\" | \"management\" | \"apm\" | \"synthetics\" | \"ux\" | \"canvas\" | \"logs\" | \"dashboards\" | \"slo\" | \"observabilityAIAssistant\" | \"home\" | \"integrations\" | \"discover\" | \"observability-overview\" | \"streams\" | \"appSearch\" | \"dev_tools\" | \"maps\" | \"visualize\" | \"dev_tools:console\" | \"dev_tools:searchprofiler\" | \"dev_tools:painless_lab\" | \"dev_tools:grokdebugger\" | \"ml:notifications\" | \"ml:nodes\" | \"ml:overview\" | \"ml:memoryUsage\" | \"ml:settings\" | \"ml:dataVisualizer\" | \"ml:logPatternAnalysis\" | \"ml:logRateAnalysis\" | \"ml:singleMetricViewer\" | \"ml:anomalyDetection\" | \"ml:anomalyExplorer\" | \"ml:dataDrift\" | \"ml:dataFrameAnalytics\" | \"ml:resultExplorer\" | \"ml:analyticsMap\" | \"ml:aiOps\" | \"ml:changePointDetections\" | \"ml:modelManagement\" | \"ml:nodesOverview\" | \"ml:esqlDataVisualizer\" | \"ml:fileUpload\" | \"ml:indexDataVisualizer\" | \"ml:calendarSettings\" | \"ml:filterListsSettings\" | \"ml:suppliedConfigurations\" | \"osquery\" | \"management:transform\" | \"management:watcher\" | \"management:cases\" | \"management:tags\" | \"management:maintenanceWindows\" | \"management:cross_cluster_replication\" | \"management:dataViews\" | \"management:spaces\" | \"management:settings\" | \"management:users\" | \"management:migrate_data\" | \"management:search_sessions\" | \"management:data_quality\" | \"management:filesManagement\" | \"management:pipelines\" | \"management:roles\" | \"management:reporting\" | \"management:aiAssistantManagementSelection\" | \"management:securityAiAssistantManagement\" | \"management:observabilityAiAssistantManagement\" | \"management:api_keys\" | \"management:license_management\" | \"management:index_lifecycle_management\" | \"management:index_management\" | \"management:ingest_pipelines\" | \"management:jobsListLink\" | \"management:objects\" | \"management:remote_clusters\" | \"management:role_mappings\" | \"management:rollup_jobs\" | \"management:snapshot_restore\" | \"management:triggersActions\" | \"management:triggersActionsConnectors\" | \"management:upgrade_assistant\" | \"enterpriseSearch\" | \"enterpriseSearchContent\" | \"enterpriseSearchApplications\" | \"searchInferenceEndpoints\" | \"enterpriseSearchAnalytics\" | \"workplaceSearch\" | \"serverlessElasticsearch\" | \"serverlessConnectors\" | \"serverlessWebCrawlers\" | \"searchPlayground\" | \"searchHomepage\" | \"enterpriseSearchContent:connectors\" | \"enterpriseSearchContent:searchIndices\" | \"enterpriseSearchContent:webCrawlers\" | \"enterpriseSearchApplications:searchApplications\" | \"enterpriseSearchApplications:playground\" | \"appSearch:engines\" | \"searchInferenceEndpoints:inferenceEndpoints\" | \"elasticsearchStart\" | \"elasticsearchIndices\" | \"enterpriseSearchElasticsearch\" | \"enterpriseSearchVectorSearch\" | \"enterpriseSearchSemanticSearch\" | \"enterpriseSearchAISearch\" | \"elasticsearchIndices:createIndex\" | \"observability-logs-explorer\" | \"last-used-logs-viewer\" | \"observabilityOnboarding\" | \"inventory\" | \"logs:settings\" | \"logs:stream\" | \"logs:log-categories\" | \"logs:anomalies\" | \"observability-overview:cases\" | \"observability-overview:alerts\" | \"observability-overview:rules\" | \"observability-overview:cases_create\" | \"observability-overview:cases_configure\" | \"metrics:settings\" | \"metrics:hosts\" | \"metrics:inventory\" | \"metrics:metrics-explorer\" | \"metrics:assetDetails\" | \"apm:services\" | \"apm:traces\" | \"apm:dependencies\" | \"apm:service-map\" | \"apm:settings\" | \"apm:service-groups-list\" | \"apm:storage-explorer\" | \"synthetics:overview\" | \"synthetics:certificates\" | \"profiling:functions\" | \"profiling:stacktraces\" | \"profiling:flamegraphs\" | \"inventory:datastreams\" | \"streams:overview\" | \"securitySolutionUI\" | \"securitySolutionUI:\" | \"securitySolutionUI:cases\" | \"securitySolutionUI:alerts\" | \"securitySolutionUI:rules\" | \"securitySolutionUI:policy\" | \"securitySolutionUI:overview\" | \"securitySolutionUI:dashboards\" | \"securitySolutionUI:kubernetes\" | \"securitySolutionUI:cases_create\" | \"securitySolutionUI:cases_configure\" | \"securitySolutionUI:hosts\" | \"securitySolutionUI:users\" | \"securitySolutionUI:cloud_defend-policies\" | \"securitySolutionUI:cloud_security_posture-dashboard\" | \"securitySolutionUI:cloud_security_posture-findings\" | \"securitySolutionUI:cloud_security_posture-benchmarks\" | \"securitySolutionUI:network\" | \"securitySolutionUI:data_quality\" | \"securitySolutionUI:explore\" | \"securitySolutionUI:assets\" | \"securitySolutionUI:cloud_defend\" | \"securitySolutionUI:notes\" | \"securitySolutionUI:administration\" | \"securitySolutionUI:attack_discovery\" | \"securitySolutionUI:blocklist\" | \"securitySolutionUI:cloud_security_posture-rules\" | \"securitySolutionUI:detections\" | \"securitySolutionUI:detection_response\" | \"securitySolutionUI:endpoints\" | \"securitySolutionUI:event_filters\" | \"securitySolutionUI:exceptions\" | \"securitySolutionUI:host_isolation_exceptions\" | \"securitySolutionUI:hosts-all\" | \"securitySolutionUI:hosts-anomalies\" | \"securitySolutionUI:hosts-risk\" | \"securitySolutionUI:hosts-events\" | \"securitySolutionUI:hosts-sessions\" | \"securitySolutionUI:hosts-uncommon_processes\" | \"securitySolutionUI:investigations\" | \"securitySolutionUI:get_started\" | \"securitySolutionUI:machine_learning-landing\" | \"securitySolutionUI:network-anomalies\" | \"securitySolutionUI:network-dns\" | \"securitySolutionUI:network-events\" | \"securitySolutionUI:network-flows\" | \"securitySolutionUI:network-http\" | \"securitySolutionUI:network-tls\" | \"securitySolutionUI:response_actions_history\" | \"securitySolutionUI:rules-add\" | \"securitySolutionUI:rules-create\" | \"securitySolutionUI:rules-landing\" | \"securitySolutionUI:siem_migrations-rules\" | \"securitySolutionUI:threat_intelligence\" | \"securitySolutionUI:timelines\" | \"securitySolutionUI:timelines-templates\" | \"securitySolutionUI:trusted_apps\" | \"securitySolutionUI:users-all\" | \"securitySolutionUI:users-anomalies\" | \"securitySolutionUI:users-authentications\" | \"securitySolutionUI:users-events\" | \"securitySolutionUI:users-risk\" | \"securitySolutionUI:entity_analytics\" | \"securitySolutionUI:entity_analytics-management\" | \"securitySolutionUI:entity_analytics-asset-classification\" | \"securitySolutionUI:entity_analytics-entity_store_management\" | \"securitySolutionUI:coverage-overview\" | \"fleet:settings\" | \"fleet:agents\" | \"fleet:policies\" | \"fleet:data_streams\" | \"fleet:enrollment_tokens\" | \"fleet:uninstall_tokens\"" ], "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", "deprecated": false, diff --git a/api_docs/kbn_core_chrome_browser.mdx b/api_docs/kbn_core_chrome_browser.mdx index bf27d7755123f..b125a4e5e5fe9 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser'] --- import kbnCoreChromeBrowserObj from './kbn_core_chrome_browser.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser_mocks.mdx b/api_docs/kbn_core_chrome_browser_mocks.mdx index d5ebd3a652bc4..2e071f814565d 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-12-02 +date: 2024-12-05 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 e245d72f11364..81f63fae5fd40 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-12-02 +date: 2024-12-05 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 83dd725e06424..ff2ef81681ee5 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-12-02 +date: 2024-12-05 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 c08b5f21b0353..e759b5239a435 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-12-02 +date: 2024-12-05 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 3f1b08a566d2f..4861840b61679 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-12-02 +date: 2024-12-05 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 739dbe33812a3..4a19096576956 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-12-02 +date: 2024-12-05 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 6d344f6f63345..8f6ef2a0bda5c 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-12-02 +date: 2024-12-05 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 f7c768d24a6fb..673c8088714c0 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-12-02 +date: 2024-12-05 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 6b6fbba27fb54..5240f99dd403a 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-12-02 +date: 2024-12-05 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 b2803026fb7a7..29ec68ba35d27 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-12-02 +date: 2024-12-05 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 7ff6355d74101..84df54ab8e49e 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-12-02 +date: 2024-12-05 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 31e6dc031ae08..b589c715a6429 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-12-02 +date: 2024-12-05 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 5454270ec90a4..4c7c5678cea19 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-12-02 +date: 2024-12-05 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 5e70900b6a687..24078b4eea76e 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-12-02 +date: 2024-12-05 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 e2c2fe68edaba..fb2be986c9134 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-12-02 +date: 2024-12-05 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 89ff34bf8ffda..32c1f425f8faf 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-12-02 +date: 2024-12-05 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 448e362224121..b93e11588d665 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-12-02 +date: 2024-12-05 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 f89362dd6f4a7..1763fc52fd0a0 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-12-02 +date: 2024-12-05 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 87dc33d2ed318..f93080392e2e1 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-12-02 +date: 2024-12-05 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 792d3d2680e6f..8eeb6aae2698e 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-12-02 +date: 2024-12-05 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 0f9dab8e89d96..04c40d6fed6d3 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-12-02 +date: 2024-12-05 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 97671d8be1b3e..207ebe5e5fdf9 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-12-02 +date: 2024-12-05 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.devdocs.json b/api_docs/kbn_core_elasticsearch_server.devdocs.json index 14c2183992b42..2a902c07e0969 100644 --- a/api_docs/kbn_core_elasticsearch_server.devdocs.json +++ b/api_docs/kbn_core_elasticsearch_server.devdocs.json @@ -1095,7 +1095,7 @@ "Headers used for authentication against Elasticsearch" ], "signature": [ - "{ date?: string | string[] | undefined; allow?: string | string[] | undefined; warning?: string | string[] | undefined; location?: string | string[] | undefined; from?: string | string[] | undefined; host?: string | string[] | undefined; range?: string | string[] | undefined; etag?: string | string[] | undefined; accept?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; authorization?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; connection?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; expect?: string | string[] | undefined; expires?: string | string[] | undefined; forwarded?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; origin?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" + "{ date?: string | string[] | undefined; allow?: string | string[] | undefined; warning?: string | string[] | undefined; location?: string | string[] | undefined; authorization?: string | string[] | undefined; from?: string | string[] | undefined; host?: string | string[] | undefined; range?: string | string[] | undefined; etag?: string | string[] | undefined; accept?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; connection?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; expect?: string | string[] | undefined; expires?: string | string[] | undefined; forwarded?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; origin?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" ], "path": "packages/core/elasticsearch/core-elasticsearch-server/src/client/scopeable_request.ts", "deprecated": false, diff --git a/api_docs/kbn_core_elasticsearch_server.mdx b/api_docs/kbn_core_elasticsearch_server.mdx index 81418faa8bad3..be3482fd4d8a2 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-12-02 +date: 2024-12-05 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 b2194cc577f66..4f1cc7ed6f996 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-12-02 +date: 2024-12-05 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 6555380e65212..372b62a1600fb 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-12-02 +date: 2024-12-05 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 70f7dd9b4cd8c..e4907cb59999e 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-12-02 +date: 2024-12-05 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 a1fc13047728e..ce2c7c8a9d902 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-12-02 +date: 2024-12-05 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 4e6fcd973ebc6..554bb432d4406 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-12-02 +date: 2024-12-05 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 a972ffa8ba906..b215bc409d44b 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-12-02 +date: 2024-12-05 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 cace7671875fc..b72ef85c3b93a 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-12-02 +date: 2024-12-05 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 b20549ac49c78..a2ca12f0d754c 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-12-02 +date: 2024-12-05 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 7c27e32c3b0ab..fa00ae4b9c8a7 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-12-02 +date: 2024-12-05 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 dcf414ded98bb..9a5e33f5a5b6c 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-12-02 +date: 2024-12-05 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 926a72b0b03ce..cccff5fe48058 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-12-02 +date: 2024-12-05 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 e91b2c137e194..030f53e0d5b2b 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-12-02 +date: 2024-12-05 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 f60630a1c5345..d3735a2615d17 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-12-02 +date: 2024-12-05 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_feature_flags_browser.mdx b/api_docs/kbn_core_feature_flags_browser.mdx index 6a582183484da..e6fc3ef698ccd 100644 --- a/api_docs/kbn_core_feature_flags_browser.mdx +++ b/api_docs/kbn_core_feature_flags_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-feature-flags-browser title: "@kbn/core-feature-flags-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-feature-flags-browser plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-feature-flags-browser'] --- import kbnCoreFeatureFlagsBrowserObj from './kbn_core_feature_flags_browser.devdocs.json'; diff --git a/api_docs/kbn_core_feature_flags_browser_internal.mdx b/api_docs/kbn_core_feature_flags_browser_internal.mdx index 9664194d6775c..9614fcb0f9451 100644 --- a/api_docs/kbn_core_feature_flags_browser_internal.mdx +++ b/api_docs/kbn_core_feature_flags_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-feature-flags-browser-internal title: "@kbn/core-feature-flags-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-feature-flags-browser-internal plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-feature-flags-browser-internal'] --- import kbnCoreFeatureFlagsBrowserInternalObj from './kbn_core_feature_flags_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_feature_flags_browser_mocks.mdx b/api_docs/kbn_core_feature_flags_browser_mocks.mdx index c39ae5a1c60eb..4216d28c0f163 100644 --- a/api_docs/kbn_core_feature_flags_browser_mocks.mdx +++ b/api_docs/kbn_core_feature_flags_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-feature-flags-browser-mocks title: "@kbn/core-feature-flags-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-feature-flags-browser-mocks plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-feature-flags-browser-mocks'] --- import kbnCoreFeatureFlagsBrowserMocksObj from './kbn_core_feature_flags_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_feature_flags_server.mdx b/api_docs/kbn_core_feature_flags_server.mdx index 9903b18e84090..d42014a9d7d52 100644 --- a/api_docs/kbn_core_feature_flags_server.mdx +++ b/api_docs/kbn_core_feature_flags_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-feature-flags-server title: "@kbn/core-feature-flags-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-feature-flags-server plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-feature-flags-server'] --- import kbnCoreFeatureFlagsServerObj from './kbn_core_feature_flags_server.devdocs.json'; diff --git a/api_docs/kbn_core_feature_flags_server_internal.mdx b/api_docs/kbn_core_feature_flags_server_internal.mdx index ab7013671ab68..b012e68abc8e6 100644 --- a/api_docs/kbn_core_feature_flags_server_internal.mdx +++ b/api_docs/kbn_core_feature_flags_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-feature-flags-server-internal title: "@kbn/core-feature-flags-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-feature-flags-server-internal plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-feature-flags-server-internal'] --- import kbnCoreFeatureFlagsServerInternalObj from './kbn_core_feature_flags_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_feature_flags_server_mocks.mdx b/api_docs/kbn_core_feature_flags_server_mocks.mdx index 7ae4d365485ce..74ec68ae732b5 100644 --- a/api_docs/kbn_core_feature_flags_server_mocks.mdx +++ b/api_docs/kbn_core_feature_flags_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-feature-flags-server-mocks title: "@kbn/core-feature-flags-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-feature-flags-server-mocks plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-feature-flags-server-mocks'] --- import kbnCoreFeatureFlagsServerMocksObj from './kbn_core_feature_flags_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser.mdx b/api_docs/kbn_core_http_browser.mdx index aa7733925d075..93317a929f573 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-12-02 +date: 2024-12-05 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 cca5acaa4e6c7..b87b7069f235f 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-12-02 +date: 2024-12-05 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 9922ec614153c..85f080bef0e0d 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-12-02 +date: 2024-12-05 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 ac4b8fc6b5a7e..f43071f0b5ad4 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-12-02 +date: 2024-12-05 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 ffdb01e9e7d89..7d2a5791a5542 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-context-server-mocks'] --- import kbnCoreHttpContextServerMocksObj from './kbn_core_http_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_request_handler_context_server.mdx b/api_docs/kbn_core_http_request_handler_context_server.mdx index f6be899c813fb..ebd3121542acb 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-request-handler-context-server'] --- import kbnCoreHttpRequestHandlerContextServerObj from './kbn_core_http_request_handler_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server.mdx b/api_docs/kbn_core_http_resources_server.mdx index 3f16d645a0a11..304e9829906c0 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-12-02 +date: 2024-12-05 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 6e6e12cb00b25..3777e8370cfb9 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-12-02 +date: 2024-12-05 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 d09776a9184d4..b871c5844280a 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-12-02 +date: 2024-12-05 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 e0697cf8029a3..65c2d797fd88e 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-12-02 +date: 2024-12-05 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 9bd26490fb3b6..3b6d88a4848e5 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-12-02 +date: 2024-12-05 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 e00fe9fba4edb..dd55a6904231d 100644 --- a/api_docs/kbn_core_http_server.devdocs.json +++ b/api_docs/kbn_core_http_server.devdocs.json @@ -1160,7 +1160,7 @@ "The headers associated with the request." ], "signature": [ - "{ date?: string | string[] | undefined; allow?: string | string[] | undefined; warning?: string | string[] | undefined; location?: string | string[] | undefined; from?: string | string[] | undefined; host?: string | string[] | undefined; range?: string | string[] | undefined; etag?: string | string[] | undefined; accept?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; authorization?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; connection?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; expect?: string | string[] | undefined; expires?: string | string[] | undefined; forwarded?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; origin?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" + "{ date?: string | string[] | undefined; allow?: string | string[] | undefined; warning?: string | string[] | undefined; location?: string | string[] | undefined; authorization?: string | string[] | undefined; from?: string | string[] | undefined; host?: string | string[] | undefined; range?: string | string[] | undefined; etag?: string | string[] | undefined; accept?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; connection?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; expect?: string | string[] | undefined; expires?: string | string[] | undefined; forwarded?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; origin?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" ], "path": "packages/core/http/core-http-server/src/router/raw_request.ts", "deprecated": false, @@ -4019,15 +4019,15 @@ }, { "plugin": "ruleRegistry", - "path": "x-pack/plugins/rule_registry/server/routes/get_feature_ids_by_registration_contexts.ts" + "path": "x-pack/plugins/rule_registry/server/routes/get_browser_fields_by_rule_type_ids.ts" }, { "plugin": "ruleRegistry", - "path": "x-pack/plugins/rule_registry/server/routes/get_browser_fields_by_feature_id.ts" + "path": "x-pack/plugins/rule_registry/server/routes/get_aad_fields_by_rule_type.ts" }, { - "plugin": "ruleRegistry", - "path": "x-pack/plugins/rule_registry/server/routes/get_aad_fields_by_rule_type.ts" + "plugin": "assetInventory", + "path": "x-pack/plugins/asset_inventory/server/routes/index.ts" }, { "plugin": "banners", @@ -4193,6 +4193,10 @@ "plugin": "inference", "path": "x-pack/plugins/inference/server/routes/connectors.ts" }, + { + "plugin": "productDocBase", + "path": "x-pack/plugins/ai_infra/product_doc_base/server/routes/installation.ts" + }, { "plugin": "globalSearch", "path": "x-pack/plugins/global_search/server/routes/get_searchable_types.ts" @@ -4789,6 +4793,10 @@ "plugin": "searchPlayground", "path": "x-pack/plugins/search_playground/server/routes.ts" }, + { + "plugin": "searchprofiler", + "path": "x-pack/plugins/searchprofiler/server/routes/profile.ts" + }, { "plugin": "serverlessSearch", "path": "x-pack/plugins/serverless_search/server/routes/api_key_routes.ts" @@ -4969,10 +4977,6 @@ "plugin": "watcher", "path": "x-pack/plugins/watcher/server/routes/api/register_load_history_route.ts" }, - { - "plugin": "productDocBase", - "path": "x-pack/plugins/ai_infra/product_doc_base/server/routes/installation.ts" - }, { "plugin": "customBranding", "path": "x-pack/plugins/custom_branding/server/routes/info.ts" @@ -5829,6 +5833,14 @@ "plugin": "alerting", "path": "x-pack/plugins/alerting/server/routes/rule/apis/find/find_rules_route.test.ts" }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/routes/rule/apis/find/find_rules_route.test.ts" + }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/routes/rule/apis/find/find_rules_route.test.ts" + }, { "plugin": "alerting", "path": "x-pack/plugins/alerting/server/routes/rule/apis/get/get_rule_route.test.ts" @@ -6875,6 +6887,14 @@ "plugin": "inference", "path": "x-pack/plugins/inference/server/routes/chat_complete.ts" }, + { + "plugin": "productDocBase", + "path": "x-pack/plugins/ai_infra/product_doc_base/server/routes/installation.ts" + }, + { + "plugin": "productDocBase", + "path": "x-pack/plugins/ai_infra/product_doc_base/server/routes/installation.ts" + }, { "plugin": "globalSearch", "path": "x-pack/plugins/global_search/server/routes/find.ts" @@ -7551,14 +7571,6 @@ "plugin": "watcher", "path": "x-pack/plugins/watcher/server/routes/api/register_list_fields_route.ts" }, - { - "plugin": "productDocBase", - "path": "x-pack/plugins/ai_infra/product_doc_base/server/routes/installation.ts" - }, - { - "plugin": "productDocBase", - "path": "x-pack/plugins/ai_infra/product_doc_base/server/routes/installation.ts" - }, { "plugin": "grokdebugger", "path": "x-pack/plugins/grokdebugger/server/lib/kibana_framework.ts" @@ -8371,6 +8383,10 @@ "plugin": "alerting", "path": "x-pack/plugins/alerting/server/routes/rule/apis/find/find_internal_rules_route.test.ts" }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/routes/rule/apis/find/find_internal_rules_route.test.ts" + }, { "plugin": "alerting", "path": "x-pack/plugins/alerting/server/routes/rule/apis/mute_alert/mute_alert.test.ts" @@ -11273,7 +11289,7 @@ "\nReadonly copy of incoming request headers." ], "signature": [ - "{ date?: string | string[] | undefined; allow?: string | string[] | undefined; warning?: string | string[] | undefined; location?: string | string[] | undefined; from?: string | string[] | undefined; host?: string | string[] | undefined; range?: string | string[] | undefined; etag?: string | string[] | undefined; accept?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; authorization?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; connection?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; expect?: string | string[] | undefined; expires?: string | string[] | undefined; forwarded?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; origin?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" + "{ date?: string | string[] | undefined; allow?: string | string[] | undefined; warning?: string | string[] | undefined; location?: string | string[] | undefined; authorization?: string | string[] | undefined; from?: string | string[] | undefined; host?: string | string[] | undefined; range?: string | string[] | undefined; etag?: string | string[] | undefined; accept?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; connection?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; expect?: string | string[] | undefined; expires?: string | string[] | undefined; forwarded?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; origin?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" ], "path": "packages/core/http/core-http-server/src/router/request.ts", "deprecated": false, @@ -15475,31 +15491,31 @@ }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/calendars.ts" + "path": "x-pack/plugins/ml/server/routes/trained_models.ts" }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/calendars.ts" + "path": "x-pack/plugins/ml/server/routes/trained_models.ts" }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/datafeeds.ts" + "path": "x-pack/plugins/ml/server/routes/trained_models.ts" }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/datafeeds.ts" + "path": "x-pack/plugins/ml/server/routes/trained_models.ts" }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/datafeeds.ts" + "path": "x-pack/plugins/ml/server/routes/trained_models.ts" }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/datafeeds.ts" + "path": "x-pack/plugins/ml/server/routes/trained_models.ts" }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/datafeeds.ts" + "path": "x-pack/plugins/ml/server/routes/trained_models.ts" }, { "plugin": "ml", @@ -15515,27 +15531,31 @@ }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/trained_models.ts" + "path": "x-pack/plugins/ml/server/routes/calendars.ts" }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/trained_models.ts" + "path": "x-pack/plugins/ml/server/routes/calendars.ts" }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/trained_models.ts" + "path": "x-pack/plugins/ml/server/routes/datafeeds.ts" }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/trained_models.ts" + "path": "x-pack/plugins/ml/server/routes/datafeeds.ts" }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/trained_models.ts" + "path": "x-pack/plugins/ml/server/routes/datafeeds.ts" }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/trained_models.ts" + "path": "x-pack/plugins/ml/server/routes/datafeeds.ts" + }, + { + "plugin": "ml", + "path": "x-pack/plugins/ml/server/routes/datafeeds.ts" }, { "plugin": "ml", @@ -15997,6 +16017,10 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/index/read_alerts_index_exists_route.ts" }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/endpoint/routes/workflow_insights/get_insights.ts" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/risk_score/prebuilt_dev_tool_content/routes/read_prebuilt_dev_tool_content_route.ts" @@ -16101,6 +16125,10 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/stats.ts" }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/translation_stats.ts" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/stats_all.ts" @@ -16510,11 +16538,11 @@ }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/annotations.ts" + "path": "x-pack/plugins/ml/server/routes/trained_models.ts" }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/calendars.ts" + "path": "x-pack/plugins/ml/server/routes/annotations.ts" }, { "plugin": "ml", @@ -16522,11 +16550,11 @@ }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/datafeeds.ts" + "path": "x-pack/plugins/ml/server/routes/calendars.ts" }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/trained_models.ts" + "path": "x-pack/plugins/ml/server/routes/datafeeds.ts" }, { "plugin": "ml", @@ -16604,6 +16632,10 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/update_rule/route.ts" }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/endpoint/routes/workflow_insights/update_insight.ts" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/risk_score/indices/create_index_route.ts" @@ -16953,19 +16985,19 @@ }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/annotations.ts" + "path": "x-pack/plugins/ml/server/routes/trained_models.ts" }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/datafeeds.ts" + "path": "x-pack/plugins/ml/server/routes/trained_models.ts" }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/datafeeds.ts" + "path": "x-pack/plugins/ml/server/routes/trained_models.ts" }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/datafeeds.ts" + "path": "x-pack/plugins/ml/server/routes/trained_models.ts" }, { "plugin": "ml", @@ -16981,19 +17013,19 @@ }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/trained_models.ts" + "path": "x-pack/plugins/ml/server/routes/annotations.ts" }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/trained_models.ts" + "path": "x-pack/plugins/ml/server/routes/datafeeds.ts" }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/trained_models.ts" + "path": "x-pack/plugins/ml/server/routes/datafeeds.ts" }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/trained_models.ts" + "path": "x-pack/plugins/ml/server/routes/datafeeds.ts" }, { "plugin": "ml", @@ -17665,11 +17697,11 @@ }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/rules/install.ts" + "path": "x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/install.ts" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/rules/install_translated.ts" + "path": "x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/install_translated.ts" }, { "plugin": "securitySolution", @@ -18143,19 +18175,19 @@ }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/annotations.ts" + "path": "x-pack/plugins/ml/server/routes/trained_models.ts" }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/calendars.ts" + "path": "x-pack/plugins/ml/server/routes/annotations.ts" }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/datafeeds.ts" + "path": "x-pack/plugins/ml/server/routes/calendars.ts" }, { "plugin": "ml", - "path": "x-pack/plugins/ml/server/routes/trained_models.ts" + "path": "x-pack/plugins/ml/server/routes/datafeeds.ts" }, { "plugin": "ml", @@ -19201,7 +19233,7 @@ "\nHttp request headers to read." ], "signature": [ - "{ date?: string | string[] | undefined; allow?: string | string[] | undefined; warning?: string | string[] | undefined; location?: string | string[] | undefined; from?: string | string[] | undefined; host?: string | string[] | undefined; range?: string | string[] | undefined; etag?: string | string[] | undefined; accept?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; authorization?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; connection?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; expect?: string | string[] | undefined; expires?: string | string[] | undefined; forwarded?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; origin?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" + "{ date?: string | string[] | undefined; allow?: string | string[] | undefined; warning?: string | string[] | undefined; location?: string | string[] | undefined; authorization?: string | string[] | undefined; from?: string | string[] | undefined; host?: string | string[] | undefined; range?: string | string[] | undefined; etag?: string | string[] | undefined; accept?: string | string[] | undefined; \"accept-language\"?: string | string[] | undefined; \"accept-patch\"?: string | string[] | undefined; \"accept-ranges\"?: string | string[] | undefined; \"access-control-allow-credentials\"?: string | string[] | undefined; \"access-control-allow-headers\"?: string | string[] | undefined; \"access-control-allow-methods\"?: string | string[] | undefined; \"access-control-allow-origin\"?: string | string[] | undefined; \"access-control-expose-headers\"?: string | string[] | undefined; \"access-control-max-age\"?: string | string[] | undefined; \"access-control-request-headers\"?: string | string[] | undefined; \"access-control-request-method\"?: string | string[] | undefined; age?: string | string[] | undefined; \"alt-svc\"?: string | string[] | undefined; \"cache-control\"?: string | string[] | undefined; connection?: string | string[] | undefined; \"content-disposition\"?: string | string[] | undefined; \"content-encoding\"?: string | string[] | undefined; \"content-language\"?: string | string[] | undefined; \"content-length\"?: string | string[] | undefined; \"content-location\"?: string | string[] | undefined; \"content-range\"?: string | string[] | undefined; \"content-type\"?: string | string[] | undefined; cookie?: string | string[] | undefined; expect?: string | string[] | undefined; expires?: string | string[] | undefined; forwarded?: string | string[] | undefined; \"if-match\"?: string | string[] | undefined; \"if-modified-since\"?: string | string[] | undefined; \"if-none-match\"?: string | string[] | undefined; \"if-unmodified-since\"?: string | string[] | undefined; \"last-modified\"?: string | string[] | undefined; origin?: string | string[] | undefined; pragma?: string | string[] | undefined; \"proxy-authenticate\"?: string | string[] | undefined; \"proxy-authorization\"?: string | string[] | undefined; \"public-key-pins\"?: string | string[] | undefined; referer?: string | string[] | undefined; \"retry-after\"?: string | string[] | undefined; \"sec-websocket-accept\"?: string | string[] | undefined; \"sec-websocket-extensions\"?: string | string[] | undefined; \"sec-websocket-key\"?: string | string[] | undefined; \"sec-websocket-protocol\"?: string | string[] | undefined; \"sec-websocket-version\"?: string | string[] | undefined; \"set-cookie\"?: string | string[] | undefined; \"strict-transport-security\"?: string | string[] | undefined; tk?: string | string[] | undefined; trailer?: string | string[] | undefined; \"transfer-encoding\"?: string | string[] | undefined; upgrade?: string | string[] | undefined; \"user-agent\"?: string | string[] | undefined; vary?: string | string[] | undefined; via?: string | string[] | undefined; \"www-authenticate\"?: string | string[] | undefined; } & { [header: string]: string | string[] | undefined; }" ], "path": "packages/core/http/core-http-server/src/router/headers.ts", "deprecated": false, @@ -19569,7 +19601,7 @@ "\nSet of well-known HTTP headers." ], "signature": [ - "\"date\" | \"allow\" | \"warning\" | \"location\" | \"from\" | \"host\" | \"range\" | \"etag\" | \"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"expires\" | \"forwarded\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"origin\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\"" + "\"date\" | \"allow\" | \"warning\" | \"location\" | \"authorization\" | \"from\" | \"host\" | \"range\" | \"etag\" | \"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"expires\" | \"forwarded\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"origin\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\"" ], "path": "packages/core/http/core-http-server/src/router/headers.ts", "deprecated": false, @@ -20739,7 +20771,7 @@ "\nHttp response headers to set." ], "signature": [ - "Record | Record<\"date\" | \"allow\" | \"warning\" | \"location\" | \"from\" | \"host\" | \"range\" | \"etag\" | \"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"authorization\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"expires\" | \"forwarded\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"origin\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\", string | string[]>" + "Record<\"date\" | \"allow\" | \"warning\" | \"location\" | \"authorization\" | \"from\" | \"host\" | \"range\" | \"etag\" | \"accept\" | \"accept-language\" | \"accept-patch\" | \"accept-ranges\" | \"access-control-allow-credentials\" | \"access-control-allow-headers\" | \"access-control-allow-methods\" | \"access-control-allow-origin\" | \"access-control-expose-headers\" | \"access-control-max-age\" | \"access-control-request-headers\" | \"access-control-request-method\" | \"age\" | \"alt-svc\" | \"cache-control\" | \"connection\" | \"content-disposition\" | \"content-encoding\" | \"content-language\" | \"content-length\" | \"content-location\" | \"content-range\" | \"content-type\" | \"cookie\" | \"expect\" | \"expires\" | \"forwarded\" | \"if-match\" | \"if-modified-since\" | \"if-none-match\" | \"if-unmodified-since\" | \"last-modified\" | \"origin\" | \"pragma\" | \"proxy-authenticate\" | \"proxy-authorization\" | \"public-key-pins\" | \"referer\" | \"retry-after\" | \"sec-websocket-accept\" | \"sec-websocket-extensions\" | \"sec-websocket-key\" | \"sec-websocket-protocol\" | \"sec-websocket-version\" | \"set-cookie\" | \"strict-transport-security\" | \"tk\" | \"trailer\" | \"transfer-encoding\" | \"upgrade\" | \"user-agent\" | \"vary\" | \"via\" | \"www-authenticate\", string | string[]> | Record" ], "path": "packages/core/http/core-http-server/src/router/headers.ts", "deprecated": false, diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index b8136f935246a..d53c431bc997c 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-12-02 +date: 2024-12-05 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 eed45bc3d740c..9f7800f0c42ed 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-12-02 +date: 2024-12-05 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 15ba73a25cd65..eb5b1b4d22b1e 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-12-02 +date: 2024-12-05 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_http_server_utils.mdx b/api_docs/kbn_core_http_server_utils.mdx index 905ce075df741..6ae3c6c8bdc17 100644 --- a/api_docs/kbn_core_http_server_utils.mdx +++ b/api_docs/kbn_core_http_server_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-utils title: "@kbn/core-http-server-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-utils plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-utils'] --- import kbnCoreHttpServerUtilsObj from './kbn_core_http_server_utils.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx index 707637ce9796f..e635398eccc7a 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-12-02 +date: 2024-12-05 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 254b74d50d992..3d0e8bb5c5054 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-12-02 +date: 2024-12-05 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 c56d217ccb888..3fec91b07b63c 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-12-02 +date: 2024-12-05 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 3801b492c31a1..9c117c90e46e0 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-12-02 +date: 2024-12-05 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 c1472e50a1610..33cb92b0bbf4c 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-12-02 +date: 2024-12-05 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 0c9adff678f5b..197b20f5decf4 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-12-02 +date: 2024-12-05 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 8e0b48cba4eef..3dc7c57b7f83a 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-12-02 +date: 2024-12-05 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 47065f992bbdd..c0ca84a0076f1 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-mocks'] --- import kbnCoreIntegrationsBrowserMocksObj from './kbn_core_integrations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser.mdx b/api_docs/kbn_core_lifecycle_browser.mdx index be51c46f7fdb5..9c9397f5c0497 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser'] --- import kbnCoreLifecycleBrowserObj from './kbn_core_lifecycle_browser.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.mdx b/api_docs/kbn_core_lifecycle_browser_mocks.mdx index 2642f26008ee6..546bae9e59052 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser-mocks'] --- import kbnCoreLifecycleBrowserMocksObj from './kbn_core_lifecycle_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server.mdx b/api_docs/kbn_core_lifecycle_server.mdx index a02240fd3b65a..8e3ca85eaeb44 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server'] --- import kbnCoreLifecycleServerObj from './kbn_core_lifecycle_server.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server_mocks.mdx b/api_docs/kbn_core_lifecycle_server_mocks.mdx index 386120e55fcff..e6a888711379c 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-12-02 +date: 2024-12-05 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 80a7ad1a1f072..de4833fdf3a65 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-12-02 +date: 2024-12-05 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 5e8046259b58a..e94c2b96f1186 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-12-02 +date: 2024-12-05 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 3c28b271808ec..7c9076fd10e6c 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-12-02 +date: 2024-12-05 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 02876d0699a53..b01050d97c3a3 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-12-02 +date: 2024-12-05 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 303da037b8aec..96472497405a0 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-12-02 +date: 2024-12-05 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 74c2cd06d5fc9..5d2e583a447b3 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-12-02 +date: 2024-12-05 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 e8dd4c7cfb212..58fe2c7c7688a 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-12-02 +date: 2024-12-05 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 dac3b830bc6a9..654b4a5202382 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-12-02 +date: 2024-12-05 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 d032ccb33f1e8..bc7bfdca9165d 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-12-02 +date: 2024-12-05 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 7be2b303f7e45..4f55d8999fe14 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-12-02 +date: 2024-12-05 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 6ab9309d5f86f..a68f2a7115f09 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-12-02 +date: 2024-12-05 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 f4b46113e1ce7..5ffaad7010caa 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-12-02 +date: 2024-12-05 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 c50ce039f0594..a66d2379f3b7b 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-12-02 +date: 2024-12-05 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 c446ccea56e75..307edfb975a03 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-12-02 +date: 2024-12-05 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 2ca0a1c898de5..0386b6ac66e02 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-12-02 +date: 2024-12-05 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 b6f352c24ca4c..444a44e81f75e 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-12-02 +date: 2024-12-05 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 245620d996759..277b8c8c7a8f3 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-12-02 +date: 2024-12-05 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 64266b18bb746..852b22548654b 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-12-02 +date: 2024-12-05 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 47f3990b9cb64..77a7444974c7b 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-12-02 +date: 2024-12-05 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 0aac7272d02f6..56c9435e72204 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-12-02 +date: 2024-12-05 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 77b000d07b9ec..3da12cdd78ad2 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-12-02 +date: 2024-12-05 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 a6088bdf0b19f..7cd76f5393ac2 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-12-02 +date: 2024-12-05 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 604698e7f0bbf..542ec6f810c4d 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-12-02 +date: 2024-12-05 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 dff55995b8bdb..cd1e406d4ef22 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-12-02 +date: 2024-12-05 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 cbafb4c105675..c7815ec645a6d 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-12-02 +date: 2024-12-05 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 0ecb1afdb3c3b..e38218fc0d999 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-12-02 +date: 2024-12-05 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 8be3206433d1d..93b2a3e0df091 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-12-02 +date: 2024-12-05 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 ec159849d6e50..df370cdc30d64 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-12-02 +date: 2024-12-05 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.mdx b/api_docs/kbn_core_rendering_browser.mdx index 0fdb6968447e9..d0fba64e00ba0 100644 --- a/api_docs/kbn_core_rendering_browser.mdx +++ b/api_docs/kbn_core_rendering_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-browser title: "@kbn/core-rendering-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-browser plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-browser'] --- import kbnCoreRenderingBrowserObj from './kbn_core_rendering_browser.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_browser_mocks.mdx b/api_docs/kbn_core_rendering_browser_mocks.mdx index 73a818c7efdb4..5771b78a30fa9 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-12-02 +date: 2024-12-05 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 8044c4015ab42..a00f4a050123e 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-12-02 +date: 2024-12-05 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 3626715008bf4..518bac917d8c7 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-12-02 +date: 2024-12-05 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 c82fdebce1a34..9ededd3289f77 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-12-02 +date: 2024-12-05 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 b4eb1afbf972b..c18b4d37b20c3 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-12-02 +date: 2024-12-05 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 cb040481b27ad..f6e8e8d522a41 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-12-02 +date: 2024-12-05 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 d07f6c4215273..fd07c7706410d 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-12-02 +date: 2024-12-05 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 b1600d0b06cac..1d54509a60e04 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-12-02 +date: 2024-12-05 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 1035ca589f515..d764dcb29ce2c 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-12-02 +date: 2024-12-05 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 05a16959f4328..4a5cfacbfe05a 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-12-02 +date: 2024-12-05 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 c64435cda35d7..60087c614efa3 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-12-02 +date: 2024-12-05 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 9f41bbd73748c..356f860780c85 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-12-02 +date: 2024-12-05 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.devdocs.json b/api_docs/kbn_core_saved_objects_common.devdocs.json index 63ae4b1d1ff34..18aab13982006 100644 --- a/api_docs/kbn_core_saved_objects_common.devdocs.json +++ b/api_docs/kbn_core_saved_objects_common.devdocs.json @@ -1560,36 +1560,36 @@ "path": "src/core/types/index.ts" }, { - "plugin": "@kbn/alerts-ui-shared", - "path": "packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_item.tsx" + "plugin": "@kbn/response-ops-rule-form", + "path": "packages/response-ops/rule_form/src/rule_actions/rule_actions_item.tsx" }, { - "plugin": "@kbn/alerts-ui-shared", - "path": "packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_item.tsx" + "plugin": "@kbn/response-ops-rule-form", + "path": "packages/response-ops/rule_form/src/rule_actions/rule_actions_item.tsx" }, { - "plugin": "@kbn/alerts-ui-shared", - "path": "packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_item.tsx" + "plugin": "@kbn/response-ops-rule-form", + "path": "packages/response-ops/rule_form/src/rule_actions/rule_actions_item.tsx" }, { - "plugin": "@kbn/alerts-ui-shared", - "path": "packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_item.tsx" + "plugin": "@kbn/response-ops-rule-form", + "path": "packages/response-ops/rule_form/src/rule_actions/rule_actions_item.tsx" }, { - "plugin": "@kbn/alerts-ui-shared", - "path": "packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_system_actions_item.tsx" + "plugin": "@kbn/response-ops-rule-form", + "path": "packages/response-ops/rule_form/src/rule_actions/rule_actions_system_actions_item.tsx" }, { - "plugin": "@kbn/alerts-ui-shared", - "path": "packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_system_actions_item.tsx" + "plugin": "@kbn/response-ops-rule-form", + "path": "packages/response-ops/rule_form/src/rule_actions/rule_actions_system_actions_item.tsx" }, { - "plugin": "@kbn/alerts-ui-shared", - "path": "packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_system_actions_item.tsx" + "plugin": "@kbn/response-ops-rule-form", + "path": "packages/response-ops/rule_form/src/rule_actions/rule_actions_system_actions_item.tsx" }, { - "plugin": "@kbn/alerts-ui-shared", - "path": "packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_system_actions_item.tsx" + "plugin": "@kbn/response-ops-rule-form", + "path": "packages/response-ops/rule_form/src/rule_actions/rule_actions_system_actions_item.tsx" } ], "initialIsOpen": false diff --git a/api_docs/kbn_core_saved_objects_common.mdx b/api_docs/kbn_core_saved_objects_common.mdx index c87795be3cb25..cf0cb5f060a53 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-12-02 +date: 2024-12-05 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 a84763fbaedf9..a08d13c9ce455 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-12-02 +date: 2024-12-05 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 0290a7a9d71d7..582f622e8f24c 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-12-02 +date: 2024-12-05 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 0b3703fdd2f84..1738eda766167 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-12-02 +date: 2024-12-05 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 84daffacaf006..e06c6ffc6ba35 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-12-02 +date: 2024-12-05 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 96853cb2bfc82..f709e4cf3dcc8 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-12-02 +date: 2024-12-05 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 1ac2730614891..01cf64367b930 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-12-02 +date: 2024-12-05 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 265ca3079f09d..2eb1b6207be4c 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-12-02 +date: 2024-12-05 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 b21f8044e7341..c186fe40e4981 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-utils-server'] --- import kbnCoreSavedObjectsUtilsServerObj from './kbn_core_saved_objects_utils_server.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser.mdx b/api_docs/kbn_core_security_browser.mdx index ac1b4480959a1..b7c9af8be4dde 100644 --- a/api_docs/kbn_core_security_browser.mdx +++ b/api_docs/kbn_core_security_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser title: "@kbn/core-security-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser'] --- import kbnCoreSecurityBrowserObj from './kbn_core_security_browser.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser_internal.mdx b/api_docs/kbn_core_security_browser_internal.mdx index f79a3b1f50db6..819a604f933a0 100644 --- a/api_docs/kbn_core_security_browser_internal.mdx +++ b/api_docs/kbn_core_security_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser-internal title: "@kbn/core-security-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser-internal plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-internal'] --- import kbnCoreSecurityBrowserInternalObj from './kbn_core_security_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser_mocks.mdx b/api_docs/kbn_core_security_browser_mocks.mdx index 3c292e0d528fe..9ef6baeef9af5 100644 --- a/api_docs/kbn_core_security_browser_mocks.mdx +++ b/api_docs/kbn_core_security_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser-mocks title: "@kbn/core-security-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser-mocks plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-mocks'] --- import kbnCoreSecurityBrowserMocksObj from './kbn_core_security_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_security_common.mdx b/api_docs/kbn_core_security_common.mdx index 35e4f68afd5bd..ade892a629634 100644 --- a/api_docs/kbn_core_security_common.mdx +++ b/api_docs/kbn_core_security_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-common title: "@kbn/core-security-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-common plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-common'] --- import kbnCoreSecurityCommonObj from './kbn_core_security_common.devdocs.json'; diff --git a/api_docs/kbn_core_security_server.mdx b/api_docs/kbn_core_security_server.mdx index 74b868a540a4e..bbb402db93bb5 100644 --- a/api_docs/kbn_core_security_server.mdx +++ b/api_docs/kbn_core_security_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server title: "@kbn/core-security-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server'] --- import kbnCoreSecurityServerObj from './kbn_core_security_server.devdocs.json'; diff --git a/api_docs/kbn_core_security_server_internal.mdx b/api_docs/kbn_core_security_server_internal.mdx index bcc1d0eeba37c..5c8aae302f6c8 100644 --- a/api_docs/kbn_core_security_server_internal.mdx +++ b/api_docs/kbn_core_security_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server-internal title: "@kbn/core-security-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server-internal plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-internal'] --- import kbnCoreSecurityServerInternalObj from './kbn_core_security_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_security_server_mocks.mdx b/api_docs/kbn_core_security_server_mocks.mdx index d41bd048a4415..d4ebdd7093d4e 100644 --- a/api_docs/kbn_core_security_server_mocks.mdx +++ b/api_docs/kbn_core_security_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server-mocks title: "@kbn/core-security-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server-mocks plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-mocks'] --- import kbnCoreSecurityServerMocksObj from './kbn_core_security_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_status_common.mdx b/api_docs/kbn_core_status_common.mdx index 0b1057a583249..25d492eec2cea 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-12-02 +date: 2024-12-05 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_server.mdx b/api_docs/kbn_core_status_server.mdx index aaa2b476312b8..f8a6763467762 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-12-02 +date: 2024-12-05 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 94e8e40e0b9fc..72408f30f2a27 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-12-02 +date: 2024-12-05 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 30ec47d60d399..91075bc408082 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-12-02 +date: 2024-12-05 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 f5f16d33ef253..b7dc893f5e661 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-12-02 +date: 2024-12-05 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 845e375699db3..89c3d76c580bc 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-12-02 +date: 2024-12-05 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 b30e1bd80c488..76610bb39ebb2 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-12-02 +date: 2024-12-05 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 eb0f70ef0cc11..e0e62e3711a64 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-12-02 +date: 2024-12-05 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 e6eb65575d544..f05defa4a9c15 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-12-02 +date: 2024-12-05 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 50dfdc56946a3..6524d0dad75f6 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-12-02 +date: 2024-12-05 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 bedd51d10d1b6..d050dd18c6903 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-12-02 +date: 2024-12-05 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 f300b9526515c..3b412c2e35f2b 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-12-02 +date: 2024-12-05 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 79b69659410c2..55239a0925ac7 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-12-02 +date: 2024-12-05 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 9c2cbcdbbab43..a09e61f0614d9 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-12-02 +date: 2024-12-05 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 a98735051c387..a23c8f2e760da 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-12-02 +date: 2024-12-05 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.devdocs.json b/api_docs/kbn_core_ui_settings_common.devdocs.json index 8c13ce99b607c..44c116985b70b 100644 --- a/api_docs/kbn_core_ui_settings_common.devdocs.json +++ b/api_docs/kbn_core_ui_settings_common.devdocs.json @@ -608,10 +608,6 @@ "plugin": "discover", "path": "src/plugins/discover/server/ui_settings.ts" }, - { - "plugin": "discover", - "path": "src/plugins/discover/server/ui_settings.ts" - }, { "plugin": "@kbn/management-settings-field-definition", "path": "packages/kbn-management/settings/field_definition/get_definition.ts" diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx index fd40d6b794cab..f07c8635c04a5 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-12-02 +date: 2024-12-05 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 2d11b7a986d17..33c63a5136f77 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-12-02 +date: 2024-12-05 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 a64befde6f755..e79c1e5558596 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-12-02 +date: 2024-12-05 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 6547814ed2a78..1829385b680e2 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-12-02 +date: 2024-12-05 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 80b952d97f203..bfb317da8da3f 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-12-02 +date: 2024-12-05 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 bf4615bff28f6..e77142009e897 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-12-02 +date: 2024-12-05 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 601d59bdbb7f6..7d34f39d430d3 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-mocks'] --- import kbnCoreUsageDataServerMocksObj from './kbn_core_usage_data_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser.mdx b/api_docs/kbn_core_user_profile_browser.mdx index 5d65b9a27caac..74273043edcf8 100644 --- a/api_docs/kbn_core_user_profile_browser.mdx +++ b/api_docs/kbn_core_user_profile_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser title: "@kbn/core-user-profile-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser'] --- import kbnCoreUserProfileBrowserObj from './kbn_core_user_profile_browser.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser_internal.mdx b/api_docs/kbn_core_user_profile_browser_internal.mdx index 58482d77da0e2..cdcf484a5773a 100644 --- a/api_docs/kbn_core_user_profile_browser_internal.mdx +++ b/api_docs/kbn_core_user_profile_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser-internal title: "@kbn/core-user-profile-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser-internal plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser-internal'] --- import kbnCoreUserProfileBrowserInternalObj from './kbn_core_user_profile_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser_mocks.mdx b/api_docs/kbn_core_user_profile_browser_mocks.mdx index 67048ad22dc9d..f711c7728abba 100644 --- a/api_docs/kbn_core_user_profile_browser_mocks.mdx +++ b/api_docs/kbn_core_user_profile_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser-mocks title: "@kbn/core-user-profile-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser-mocks plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser-mocks'] --- import kbnCoreUserProfileBrowserMocksObj from './kbn_core_user_profile_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_common.mdx b/api_docs/kbn_core_user_profile_common.mdx index 5345e281af343..5771840dd7fdc 100644 --- a/api_docs/kbn_core_user_profile_common.mdx +++ b/api_docs/kbn_core_user_profile_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-common title: "@kbn/core-user-profile-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-common plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-common'] --- import kbnCoreUserProfileCommonObj from './kbn_core_user_profile_common.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server.mdx b/api_docs/kbn_core_user_profile_server.mdx index 6c3f51562883a..1b3748d7e396c 100644 --- a/api_docs/kbn_core_user_profile_server.mdx +++ b/api_docs/kbn_core_user_profile_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server title: "@kbn/core-user-profile-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server'] --- import kbnCoreUserProfileServerObj from './kbn_core_user_profile_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server_internal.mdx b/api_docs/kbn_core_user_profile_server_internal.mdx index 1f9aca2425a85..d537c7cc88adc 100644 --- a/api_docs/kbn_core_user_profile_server_internal.mdx +++ b/api_docs/kbn_core_user_profile_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server-internal title: "@kbn/core-user-profile-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server-internal plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server-internal'] --- import kbnCoreUserProfileServerInternalObj from './kbn_core_user_profile_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server_mocks.mdx b/api_docs/kbn_core_user_profile_server_mocks.mdx index 4dca44802c235..a3803242e9fcc 100644 --- a/api_docs/kbn_core_user_profile_server_mocks.mdx +++ b/api_docs/kbn_core_user_profile_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server-mocks title: "@kbn/core-user-profile-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server-mocks plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server-mocks'] --- import kbnCoreUserProfileServerMocksObj from './kbn_core_user_profile_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server.mdx b/api_docs/kbn_core_user_settings_server.mdx index 7d215c8706bfe..3a80ee49393c9 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server'] --- import kbnCoreUserSettingsServerObj from './kbn_core_user_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server_mocks.mdx b/api_docs/kbn_core_user_settings_server_mocks.mdx index 07be5ee0a9466..bf6260a407bee 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-12-02 +date: 2024-12-05 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 c9d6c40a0b179..8434d24e33989 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-12-02 +date: 2024-12-05 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 05501daccae29..66ed4410036aa 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-12-02 +date: 2024-12-05 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 de31d87dd1f14..751e134214d1a 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-12-02 +date: 2024-12-05 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 d51a33a5ff951..5edbcb21820aa 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-12-02 +date: 2024-12-05 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 685f74dc966bd..5c58ff51d786a 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-12-02 +date: 2024-12-05 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 b50179f786ffc..7c9548979c262 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-12-02 +date: 2024-12-05 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 679263ae32c83..db6539f65359b 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-12-02 +date: 2024-12-05 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 c12f8b728af32..a70a5c5713dd5 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-12-02 +date: 2024-12-05 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 e747f56f19969..fff86f338f532 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-12-02 +date: 2024-12-05 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 51065be074b4d..0a262e45d7b90 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-12-02 +date: 2024-12-05 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 c6db8b886c4d9..d9efc3af68e78 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-12-02 +date: 2024-12-05 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 fb0ced79424e3..eb0611c880bc2 100644 --- a/api_docs/kbn_deeplinks_devtools.mdx +++ b/api_docs/kbn_deeplinks_devtools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-devtools title: "@kbn/deeplinks-devtools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-devtools plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-devtools'] --- import kbnDeeplinksDevtoolsObj from './kbn_deeplinks_devtools.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_fleet.mdx b/api_docs/kbn_deeplinks_fleet.mdx index fa640723a6aef..fa840d7e95990 100644 --- a/api_docs/kbn_deeplinks_fleet.mdx +++ b/api_docs/kbn_deeplinks_fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-fleet title: "@kbn/deeplinks-fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-fleet plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-fleet'] --- import kbnDeeplinksFleetObj from './kbn_deeplinks_fleet.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_management.devdocs.json b/api_docs/kbn_deeplinks_management.devdocs.json index 8279acbff8269..379adac0327dc 100644 --- a/api_docs/kbn_deeplinks_management.devdocs.json +++ b/api_docs/kbn_deeplinks_management.devdocs.json @@ -45,7 +45,7 @@ "label": "DeepLinkId", "description": [], "signature": [ - "\"fleet\" | \"monitoring\" | \"management\" | \"integrations\" | \"osquery\" | \"management:transform\" | \"management:watcher\" | \"management:cases\" | \"management:tags\" | \"management:maintenanceWindows\" | \"management:cross_cluster_replication\" | \"management:dataViews\" | \"management:spaces\" | \"management:settings\" | \"management:users\" | \"management:migrate_data\" | \"management:search_sessions\" | \"management:data_quality\" | \"management:filesManagement\" | \"management:roles\" | \"management:reporting\" | \"management:aiAssistantManagementSelection\" | \"management:securityAiAssistantManagement\" | \"management:observabilityAiAssistantManagement\" | \"management:api_keys\" | \"management:license_management\" | \"management:index_lifecycle_management\" | \"management:index_management\" | \"management:ingest_pipelines\" | \"management:jobsListLink\" | \"management:objects\" | \"management:pipelines\" | \"management:remote_clusters\" | \"management:role_mappings\" | \"management:rollup_jobs\" | \"management:snapshot_restore\" | \"management:triggersActions\" | \"management:triggersActionsConnectors\" | \"management:upgrade_assistant\"" + "\"fleet\" | \"monitoring\" | \"management\" | \"integrations\" | \"osquery\" | \"management:transform\" | \"management:watcher\" | \"management:cases\" | \"management:tags\" | \"management:maintenanceWindows\" | \"management:cross_cluster_replication\" | \"management:dataViews\" | \"management:spaces\" | \"management:settings\" | \"management:users\" | \"management:migrate_data\" | \"management:search_sessions\" | \"management:data_quality\" | \"management:filesManagement\" | \"management:pipelines\" | \"management:roles\" | \"management:reporting\" | \"management:aiAssistantManagementSelection\" | \"management:securityAiAssistantManagement\" | \"management:observabilityAiAssistantManagement\" | \"management:api_keys\" | \"management:license_management\" | \"management:index_lifecycle_management\" | \"management:index_management\" | \"management:ingest_pipelines\" | \"management:jobsListLink\" | \"management:objects\" | \"management:remote_clusters\" | \"management:role_mappings\" | \"management:rollup_jobs\" | \"management:snapshot_restore\" | \"management:triggersActions\" | \"management:triggersActionsConnectors\" | \"management:upgrade_assistant\"" ], "path": "packages/deeplinks/management/deep_links.ts", "deprecated": false, @@ -60,7 +60,7 @@ "label": "LinkId", "description": [], "signature": [ - "\"transform\" | \"watcher\" | \"cases\" | \"tags\" | \"maintenanceWindows\" | \"cross_cluster_replication\" | \"dataViews\" | \"spaces\" | \"settings\" | \"users\" | \"migrate_data\" | \"search_sessions\" | \"data_quality\" | \"filesManagement\" | \"roles\" | \"reporting\" | \"aiAssistantManagementSelection\" | \"securityAiAssistantManagement\" | \"observabilityAiAssistantManagement\" | \"api_keys\" | \"license_management\" | \"index_lifecycle_management\" | \"index_management\" | \"ingest_pipelines\" | \"jobsListLink\" | \"objects\" | \"pipelines\" | \"remote_clusters\" | \"role_mappings\" | \"rollup_jobs\" | \"snapshot_restore\" | \"triggersActions\" | \"triggersActionsConnectors\" | \"upgrade_assistant\"" + "\"transform\" | \"watcher\" | \"cases\" | \"tags\" | \"maintenanceWindows\" | \"cross_cluster_replication\" | \"dataViews\" | \"spaces\" | \"settings\" | \"users\" | \"migrate_data\" | \"search_sessions\" | \"data_quality\" | \"filesManagement\" | \"pipelines\" | \"roles\" | \"reporting\" | \"aiAssistantManagementSelection\" | \"securityAiAssistantManagement\" | \"observabilityAiAssistantManagement\" | \"api_keys\" | \"license_management\" | \"index_lifecycle_management\" | \"index_management\" | \"ingest_pipelines\" | \"jobsListLink\" | \"objects\" | \"remote_clusters\" | \"role_mappings\" | \"rollup_jobs\" | \"snapshot_restore\" | \"triggersActions\" | \"triggersActionsConnectors\" | \"upgrade_assistant\"" ], "path": "packages/deeplinks/management/deep_links.ts", "deprecated": false, diff --git a/api_docs/kbn_deeplinks_management.mdx b/api_docs/kbn_deeplinks_management.mdx index 544f11120c7f4..eed1cf6cf5816 100644 --- a/api_docs/kbn_deeplinks_management.mdx +++ b/api_docs/kbn_deeplinks_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-management title: "@kbn/deeplinks-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-management plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-management'] --- import kbnDeeplinksManagementObj from './kbn_deeplinks_management.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_ml.mdx b/api_docs/kbn_deeplinks_ml.mdx index a46068b429b9c..f76c4832b8bdd 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-12-02 +date: 2024-12-05 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 a416e518a8cb3..86d8cb02fb077 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-12-02 +date: 2024-12-05 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 63a2fdcec54f9..0c5aa89e27bac 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-search'] --- import kbnDeeplinksSearchObj from './kbn_deeplinks_search.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_security.mdx b/api_docs/kbn_deeplinks_security.mdx index 59dd721ac587b..0afa887c2cfa2 100644 --- a/api_docs/kbn_deeplinks_security.mdx +++ b/api_docs/kbn_deeplinks_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-security title: "@kbn/deeplinks-security" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-security plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-security'] --- import kbnDeeplinksSecurityObj from './kbn_deeplinks_security.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_shared.mdx b/api_docs/kbn_deeplinks_shared.mdx index 041468337b5b9..d310a678a3511 100644 --- a/api_docs/kbn_deeplinks_shared.mdx +++ b/api_docs/kbn_deeplinks_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-shared title: "@kbn/deeplinks-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-shared plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-shared'] --- import kbnDeeplinksSharedObj from './kbn_deeplinks_shared.devdocs.json'; diff --git a/api_docs/kbn_default_nav_analytics.mdx b/api_docs/kbn_default_nav_analytics.mdx index 650a61e7c2e5f..fb757ed168867 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-12-02 +date: 2024-12-05 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 a995658a7b385..3b66a3d944e06 100644 --- a/api_docs/kbn_default_nav_devtools.mdx +++ b/api_docs/kbn_default_nav_devtools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-devtools title: "@kbn/default-nav-devtools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-devtools plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-devtools'] --- import kbnDefaultNavDevtoolsObj from './kbn_default_nav_devtools.devdocs.json'; diff --git a/api_docs/kbn_default_nav_management.mdx b/api_docs/kbn_default_nav_management.mdx index 0951a73030d58..a1fef9959cf2a 100644 --- a/api_docs/kbn_default_nav_management.mdx +++ b/api_docs/kbn_default_nav_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-management title: "@kbn/default-nav-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-management plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-management'] --- import kbnDefaultNavManagementObj from './kbn_default_nav_management.devdocs.json'; diff --git a/api_docs/kbn_default_nav_ml.mdx b/api_docs/kbn_default_nav_ml.mdx index b14b00adaf824..246e0bd5e365e 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-12-02 +date: 2024-12-05 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 b1d6aa119bcb2..16fe3b1ab4428 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-12-02 +date: 2024-12-05 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 e3b7a0d41d05e..715be8b8e72a6 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-12-02 +date: 2024-12-05 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 0fe57d4bcba2b..04a4817f24048 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-12-02 +date: 2024-12-05 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 c5d3adc3c8ce5..b628230f9ab44 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] --- import kbnDevUtilsObj from './kbn_dev_utils.devdocs.json'; diff --git a/api_docs/kbn_discover_contextual_components.mdx b/api_docs/kbn_discover_contextual_components.mdx index 64d4038709f95..dd540f89dd994 100644 --- a/api_docs/kbn_discover_contextual_components.mdx +++ b/api_docs/kbn_discover_contextual_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-discover-contextual-components title: "@kbn/discover-contextual-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/discover-contextual-components plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/discover-contextual-components'] --- import kbnDiscoverContextualComponentsObj from './kbn_discover_contextual_components.devdocs.json'; diff --git a/api_docs/kbn_discover_utils.devdocs.json b/api_docs/kbn_discover_utils.devdocs.json index 3d5f8e6ae0a3b..e16d23d1e7c14 100644 --- a/api_docs/kbn_discover_utils.devdocs.json +++ b/api_docs/kbn_discover_utils.devdocs.json @@ -285,7 +285,7 @@ "tags": [], "label": "buildDataTableRecord", "description": [ - "\nBuild a record for data table, explorer + classic one" + "\nBuild a record for data grid" ], "signature": [ "(doc: ", @@ -2069,76 +2069,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/discover-utils", - "id": "def-common.isLegacyTableEnabled", - "type": "Function", - "tags": [], - "label": "isLegacyTableEnabled", - "description": [], - "signature": [ - "({\n uiSettings,\n isEsqlMode,\n}: { uiSettings: ", - { - "pluginId": "@kbn/core-ui-settings-browser", - "scope": "public", - "docId": "kibKbnCoreUiSettingsBrowserPluginApi", - "section": "def-public.IUiSettingsClient", - "text": "IUiSettingsClient" - }, - "; isEsqlMode: boolean; }) => boolean" - ], - "path": "packages/kbn-discover-utils/src/utils/is_legacy_table_enabled.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/discover-utils", - "id": "def-common.isLegacyTableEnabled.$1", - "type": "Object", - "tags": [], - "label": "{\n uiSettings,\n isEsqlMode,\n}", - "description": [], - "path": "packages/kbn-discover-utils/src/utils/is_legacy_table_enabled.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/discover-utils", - "id": "def-common.isLegacyTableEnabled.$1.uiSettings", - "type": "Object", - "tags": [], - "label": "uiSettings", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-ui-settings-browser", - "scope": "public", - "docId": "kibKbnCoreUiSettingsBrowserPluginApi", - "section": "def-public.IUiSettingsClient", - "text": "IUiSettingsClient" - } - ], - "path": "packages/kbn-discover-utils/src/utils/is_legacy_table_enabled.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/discover-utils", - "id": "def-common.isLegacyTableEnabled.$1.isEsqlMode", - "type": "boolean", - "tags": [], - "label": "isEsqlMode", - "description": [], - "path": "packages/kbn-discover-utils/src/utils/is_legacy_table_enabled.ts", - "deprecated": false, - "trackAdoption": false - } - ] - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/discover-utils", "id": "def-common.isNestedFieldParent", @@ -4703,21 +4633,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "@kbn/discover-utils", - "id": "def-common.DOC_TABLE_LEGACY", - "type": "string", - "tags": [], - "label": "DOC_TABLE_LEGACY", - "description": [], - "signature": [ - "\"doc_table:legacy\"" - ], - "path": "packages/kbn-discover-utils/src/constants.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "@kbn/discover-utils", "id": "def-common.ERROR_EXCEPTION_STACKTRACE", @@ -5342,36 +5257,6 @@ "deprecated": false, "trackAdoption": false, "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/discover-utils", - "id": "def-common.TRUNCATE_MAX_HEIGHT", - "type": "string", - "tags": [], - "label": "TRUNCATE_MAX_HEIGHT", - "description": [], - "signature": [ - "\"truncate:maxHeight\"" - ], - "path": "packages/kbn-discover-utils/src/constants.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/discover-utils", - "id": "def-common.TRUNCATE_MAX_HEIGHT_DEFAULT_VALUE", - "type": "number", - "tags": [], - "label": "TRUNCATE_MAX_HEIGHT_DEFAULT_VALUE", - "description": [], - "signature": [ - "115" - ], - "path": "packages/kbn-discover-utils/src/constants.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false } ], "objects": [ diff --git a/api_docs/kbn_discover_utils.mdx b/api_docs/kbn_discover_utils.mdx index 60bfa191f14b9..832e2bd9dd49e 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/discover-utils'] --- import kbnDiscoverUtilsObj from './kbn_discover_utils.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 284 | 0 | 234 | 4 | +| 277 | 0 | 227 | 4 | ## Common diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index ec773d3dcbdea..a336c7d7355f4 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-12-02 +date: 2024-12-05 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 05b1ab39bb23b..ed2d5bbe7b9d2 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-12-02 +date: 2024-12-05 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 232c0230b5be7..c542c802d674c 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-12-02 +date: 2024-12-05 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 01df2578832df..c00fa59b7a85c 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-12-02 +date: 2024-12-05 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 003405a3bab49..25d1c1927ad9d 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-12-02 +date: 2024-12-05 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 1ac6ea5157c9f..1bb3be1d94a6d 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-12-02 +date: 2024-12-05 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 ee204130640d4..80756ca060356 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-12-02 +date: 2024-12-05 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 77ddbd74f163d..dcbda49d0549b 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant-common'] --- import kbnElasticAssistantCommonObj from './kbn_elastic_assistant_common.devdocs.json'; diff --git a/api_docs/kbn_entities_schema.devdocs.json b/api_docs/kbn_entities_schema.devdocs.json index 5bc7ba4f31a9f..0269efb5711d8 100644 --- a/api_docs/kbn_entities_schema.devdocs.json +++ b/api_docs/kbn_entities_schema.devdocs.json @@ -144,10 +144,10 @@ }, { "parentPluginId": "@kbn/entities-schema", - "id": "def-common.EntityV2.entity.last_seen_timestamp", + "id": "def-common.EntityV2.entity.type", "type": "string", "tags": [], - "label": "'entity.last_seen_timestamp'", + "label": "'entity.type'", "description": [], "path": "x-pack/packages/kbn-entities-schema/src/schema/entity.ts", "deprecated": false, @@ -155,15 +155,29 @@ }, { "parentPluginId": "@kbn/entities-schema", - "id": "def-common.EntityV2.entity.type", + "id": "def-common.EntityV2.entity.display_name", "type": "string", "tags": [], - "label": "'entity.type'", + "label": "'entity.display_name'", "description": [], "path": "x-pack/packages/kbn-entities-schema/src/schema/entity.ts", "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/entities-schema", + "id": "def-common.EntityV2.entity.last_seen_timestamp", + "type": "string", + "tags": [], + "label": "'entity.last_seen_timestamp'", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/packages/kbn-entities-schema/src/schema/entity.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/entities-schema", "id": "def-common.EntityV2.Unnamed", diff --git a/api_docs/kbn_entities_schema.mdx b/api_docs/kbn_entities_schema.mdx index cab2a67aef98a..87e334ffee10d 100644 --- a/api_docs/kbn_entities_schema.mdx +++ b/api_docs/kbn_entities_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-entities-schema title: "@kbn/entities-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/entities-schema plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/entities-schema'] --- import kbnEntitiesSchemaObj from './kbn_entities_schema.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-entities](https://github.com/orgs/elastic/teams/obs-entiti | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 50 | 0 | 50 | 0 | +| 51 | 0 | 51 | 0 | ## Common diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index 54701800c959e..06c36e7e3a0d7 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-12-02 +date: 2024-12-05 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 49f59e578e36b..f68c178f31a6a 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-12-02 +date: 2024-12-05 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 346230850c9e8..0a3bb4f9da1bc 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-12-02 +date: 2024-12-05 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 9863afc72e3a0..f6eb9a88e57d7 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] --- import kbnEsQueryObj from './kbn_es_query.devdocs.json'; diff --git a/api_docs/kbn_es_types.mdx b/api_docs/kbn_es_types.mdx index a3f3f3d875dbb..a78417d27f38b 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-types'] --- import kbnEsTypesObj from './kbn_es_types.devdocs.json'; diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index 6b430c44aab93..117463c4c3437 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] --- import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json'; diff --git a/api_docs/kbn_esql_ast.devdocs.json b/api_docs/kbn_esql_ast.devdocs.json index f2d113ae788eb..3a850ab7e31f6 100644 --- a/api_docs/kbn_esql_ast.devdocs.json +++ b/api_docs/kbn_esql_ast.devdocs.json @@ -282,13 +282,7 @@ "description": [], "signature": [ "(expression: ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ", opts?: ", { "pluginId": "@kbn/esql-ast", @@ -313,13 +307,7 @@ "ES|QL expression AST node to print." ], "signature": [ - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - } + "ESQLAstExpression" ], "path": "packages/kbn-esql-ast/src/pretty_print/basic_pretty_printer.ts", "deprecated": false, @@ -496,13 +484,7 @@ "description": [], "signature": [ "(node: ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ", minusCount?: number) => string | undefined" ], "path": "packages/kbn-esql-ast/src/pretty_print/basic_pretty_printer.ts", @@ -517,13 +499,7 @@ "label": "node", "description": [], "signature": [ - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - } + "ESQLAstExpression" ], "path": "packages/kbn-esql-ast/src/pretty_print/basic_pretty_printer.ts", "deprecated": false, @@ -666,13 +642,7 @@ "description": [], "signature": [ "(expression: ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ") => any" ], "path": "packages/kbn-esql-ast/src/pretty_print/basic_pretty_printer.ts", @@ -687,13 +657,7 @@ "label": "expression", "description": [], "signature": [ - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - } + "ESQLAstExpression" ], "path": "packages/kbn-esql-ast/src/pretty_print/basic_pretty_printer.ts", "deprecated": false, @@ -1037,6 +1001,28 @@ "deprecated": false, "trackAdoption": false, "isRequired": true + }, + { + "parentPluginId": "@kbn/esql-ast", + "id": "def-common.EsqlQuery.Unnamed.$4", + "type": "Array", + "tags": [], + "label": "errors", + "description": [], + "signature": [ + { + "pluginId": "@kbn/esql-ast", + "scope": "common", + "docId": "kibKbnEsqlAstPluginApi", + "section": "def-common.EditorError", + "text": "EditorError" + }, + "[]" + ], + "path": "packages/kbn-esql-ast/src/query/query.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true } ], "returnComment": [] @@ -2650,13 +2636,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -2672,13 +2652,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -2696,13 +2670,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -2718,13 +2686,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -2744,13 +2706,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -2766,13 +2722,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -2790,13 +2740,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -2812,13 +2756,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -2848,13 +2786,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -2870,13 +2802,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -2894,13 +2820,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -2916,13 +2836,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -2942,13 +2856,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -2964,13 +2872,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -2988,13 +2890,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -3010,13 +2906,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -3048,13 +2938,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -3070,13 +2954,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -3094,13 +2972,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -3116,13 +2988,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -3142,13 +3008,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -3164,13 +3024,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -3188,13 +3042,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -3210,13 +3058,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -3246,13 +3088,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -3268,13 +3104,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -3292,13 +3122,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -3314,13 +3138,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -3340,13 +3158,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -3362,13 +3174,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -3386,13 +3192,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -3408,13 +3208,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -3448,13 +3242,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -3470,13 +3258,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -3494,13 +3276,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -3516,13 +3292,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -3542,13 +3312,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -3564,13 +3328,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -3588,13 +3346,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -3610,13 +3362,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -3646,13 +3392,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -3668,13 +3408,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -3692,13 +3426,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -3714,13 +3442,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -3740,13 +3462,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -3762,13 +3478,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -3786,13 +3496,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -3808,13 +3512,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -3846,13 +3544,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -3868,13 +3560,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -3892,13 +3578,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -3914,13 +3594,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -3940,13 +3614,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -3962,13 +3630,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -3986,13 +3648,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -4008,13 +3664,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -4044,13 +3694,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -4066,13 +3710,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -4090,13 +3728,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -4112,13 +3744,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -4138,13 +3764,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -4160,13 +3780,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -4184,13 +3798,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -4206,13 +3814,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -4248,13 +3850,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -4270,13 +3866,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -4294,13 +3884,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -4316,13 +3900,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -4342,13 +3920,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -4364,13 +3936,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -4388,13 +3954,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -4410,13 +3970,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -4446,13 +4000,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -4468,13 +4016,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -4492,13 +4034,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -4514,13 +4050,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -4540,13 +4070,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -4562,13 +4086,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -4586,13 +4104,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -4608,13 +4120,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -4646,13 +4152,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -4668,13 +4168,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -4692,13 +4186,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -4714,13 +4202,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -4740,13 +4222,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -4762,13 +4238,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -4786,13 +4256,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -4808,13 +4272,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -4844,13 +4302,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -4866,13 +4318,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -4890,13 +4336,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -4912,13 +4352,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -4938,13 +4372,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -4960,13 +4388,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -4984,13 +4406,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -5006,13 +4422,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -5046,13 +4456,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -5068,13 +4472,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -5092,13 +4490,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -5114,13 +4506,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -5140,13 +4526,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -5162,13 +4542,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -5186,13 +4560,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -5208,13 +4576,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -5244,13 +4606,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -5266,13 +4622,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -5290,13 +4640,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -5312,13 +4656,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -5338,13 +4676,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -5360,13 +4692,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -5384,13 +4710,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -5406,13 +4726,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -5444,13 +4758,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -5466,13 +4774,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -5490,13 +4792,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -5512,13 +4808,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -5538,13 +4828,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -5560,13 +4844,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -5584,13 +4862,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -5606,13 +4878,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -5642,13 +4908,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -5664,13 +4924,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -5688,13 +4942,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -5710,13 +4958,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -5736,13 +4978,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -5758,13 +4994,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -5782,13 +5012,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -5804,13 +5028,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -5850,13 +5068,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -5872,13 +5084,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -5896,13 +5102,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -5918,13 +5118,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -5944,13 +5138,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -5966,13 +5154,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -5990,13 +5172,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -6012,13 +5188,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -6048,13 +5218,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -6070,13 +5234,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -6094,13 +5252,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -6116,13 +5268,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -6142,13 +5288,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -6164,13 +5304,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -6188,13 +5322,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -6210,13 +5338,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -6248,13 +5370,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -6270,13 +5386,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -6294,13 +5404,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -6316,13 +5420,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -6342,13 +5440,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -6364,13 +5456,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -6388,13 +5474,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -6410,13 +5490,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -6446,13 +5520,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -6468,13 +5536,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -6492,13 +5554,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -6514,13 +5570,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -6540,13 +5590,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -6562,13 +5606,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -6586,13 +5624,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -6608,13 +5640,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -6648,13 +5674,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -6670,13 +5690,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -6694,13 +5708,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -6716,13 +5724,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -6742,13 +5744,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -6764,13 +5760,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -6788,13 +5778,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -6810,13 +5794,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -6846,13 +5824,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -6868,13 +5840,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -6892,13 +5858,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -6914,13 +5874,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -6940,13 +5894,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -6962,13 +5910,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -6986,13 +5928,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -7008,13 +5944,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -7046,13 +5976,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -7068,13 +5992,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -7092,13 +6010,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -7114,13 +6026,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -7140,13 +6046,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -7162,13 +6062,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -7186,13 +6080,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -7208,13 +6096,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -7244,13 +6126,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -7266,13 +6142,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -7290,13 +6160,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -7312,13 +6176,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -7338,13 +6196,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -7360,13 +6212,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -7384,13 +6230,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -7406,13 +6246,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -7448,13 +6282,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -7470,13 +6298,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -7494,13 +6316,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -7516,13 +6332,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -7542,13 +6352,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -7564,13 +6368,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -7588,13 +6386,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -7610,13 +6402,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -7646,13 +6432,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -7668,13 +6448,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -7692,13 +6466,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -7714,13 +6482,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -7740,13 +6502,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -7762,13 +6518,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -7786,13 +6536,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -7808,13 +6552,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -7846,13 +6584,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -7868,13 +6600,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -7892,13 +6618,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -7914,13 +6634,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -7940,13 +6654,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -7962,13 +6670,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -7986,13 +6688,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -8008,13 +6704,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -8044,13 +6734,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -8066,13 +6750,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -8090,13 +6768,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -8112,13 +6784,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -8138,13 +6804,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -8160,13 +6820,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -8184,13 +6838,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -8206,13 +6854,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -8246,13 +6888,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -8268,13 +6904,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -8292,13 +6922,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -8314,13 +6938,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -8340,13 +6958,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -8362,13 +6974,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -8386,13 +6992,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -8408,13 +7008,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -8444,13 +7038,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -8466,13 +7054,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -8490,13 +7072,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -8512,13 +7088,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -8538,13 +7108,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -8560,13 +7124,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -8584,13 +7142,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -8606,13 +7158,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -8644,13 +7190,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -8666,13 +7206,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -8690,13 +7224,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -8712,13 +7240,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -8738,13 +7260,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -8760,13 +7276,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -8784,13 +7294,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -8806,13 +7310,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -8842,13 +7340,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -8864,13 +7356,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -8888,13 +7374,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -8910,13 +7390,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -8936,13 +7410,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -8958,13 +7426,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -8982,13 +7444,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -9004,13 +7460,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -9052,13 +7502,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -9074,13 +7518,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -9098,13 +7536,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -9120,13 +7552,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -9146,13 +7572,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -9168,13 +7588,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -9192,13 +7606,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -9214,13 +7622,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -9250,13 +7652,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -9272,13 +7668,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -9296,13 +7686,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -9318,13 +7702,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -9344,13 +7722,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -9366,13 +7738,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -9390,13 +7756,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -9412,13 +7772,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -9450,13 +7804,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -9472,13 +7820,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -9496,13 +7838,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -9518,13 +7854,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -9544,13 +7874,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -9566,13 +7890,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -9590,13 +7908,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -9612,13 +7924,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -9648,13 +7954,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -9670,13 +7970,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -9694,13 +7988,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -9716,13 +8004,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -9742,13 +8024,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -9764,13 +8040,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -9788,13 +8058,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -9810,13 +8074,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -9850,13 +8108,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -9872,13 +8124,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -9896,13 +8142,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -9918,13 +8158,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -9944,13 +8178,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -9966,13 +8194,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -9990,13 +8212,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -10012,13 +8228,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -10048,13 +8258,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -10070,13 +8274,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -10094,13 +8292,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -10116,13 +8308,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -10142,13 +8328,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -10164,13 +8344,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -10188,13 +8362,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -10210,13 +8378,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -10248,13 +8410,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -10270,13 +8426,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -10294,13 +8444,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -10316,13 +8460,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -10342,13 +8480,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -10364,13 +8496,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -10388,13 +8514,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -10410,13 +8530,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -10446,13 +8560,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -10468,13 +8576,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -10492,13 +8594,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -10514,13 +8610,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -10540,13 +8630,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -10562,13 +8646,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -10586,13 +8664,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -10608,13 +8680,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -10650,13 +8716,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -10672,13 +8732,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -10696,13 +8750,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -10718,13 +8766,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -10744,13 +8786,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -10766,13 +8802,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -10790,13 +8820,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -10812,13 +8836,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -10848,13 +8866,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -10870,13 +8882,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -10894,13 +8900,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -10916,13 +8916,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -10942,13 +8936,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -10964,13 +8952,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -10988,13 +8970,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -11010,13 +8986,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -11048,13 +9018,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -11070,13 +9034,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -11094,13 +9052,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -11116,13 +9068,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -11142,13 +9088,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -11164,13 +9104,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -11188,13 +9122,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -11210,13 +9138,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -11246,13 +9168,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -11268,13 +9184,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -11292,13 +9202,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -11314,13 +9218,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -11340,13 +9238,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -11362,13 +9254,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -11386,13 +9272,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -11408,13 +9288,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -11448,13 +9322,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -11470,13 +9338,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -11494,13 +9356,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -11516,13 +9372,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -11542,13 +9392,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -11564,13 +9408,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -11588,13 +9426,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -11610,13 +9442,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -11646,13 +9472,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -11668,13 +9488,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -11692,13 +9506,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -11714,13 +9522,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -11740,13 +9542,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -11762,13 +9558,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -11786,13 +9576,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -11808,13 +9592,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -11846,13 +9624,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -11868,13 +9640,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -11892,13 +9658,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -11914,13 +9674,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -11940,13 +9694,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -11962,13 +9710,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -11986,13 +9728,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -12008,13 +9744,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -12044,13 +9774,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -12066,13 +9790,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -12090,13 +9808,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -12112,13 +9824,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -12138,13 +9844,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -12160,13 +9860,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -12184,13 +9878,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -12206,13 +9894,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -12252,13 +9934,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -12274,13 +9950,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -12298,13 +9968,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -12320,13 +9984,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -12346,13 +10004,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -12368,13 +10020,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -12392,13 +10038,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -12414,13 +10054,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -12450,13 +10084,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -12472,13 +10100,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -12496,13 +10118,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -12518,13 +10134,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -12544,13 +10154,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -12566,13 +10170,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -12590,13 +10188,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -12612,13 +10204,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -12650,13 +10236,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -12672,13 +10252,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -12696,13 +10270,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -12718,13 +10286,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -12744,13 +10306,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -12766,13 +10322,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -12790,13 +10340,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -12812,13 +10356,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -12848,13 +10386,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -12870,13 +10402,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -12894,13 +10420,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -12916,13 +10436,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -12942,13 +10456,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -12964,13 +10472,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -12988,13 +10490,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -13010,13 +10506,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -13050,13 +10540,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -13072,13 +10556,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -13096,13 +10574,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -13118,13 +10590,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -13144,13 +10610,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -13166,13 +10626,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -13190,13 +10644,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -13212,13 +10660,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -13248,13 +10690,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -13270,13 +10706,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -13294,13 +10724,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -13316,13 +10740,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -13342,13 +10760,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -13364,13 +10776,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -13388,13 +10794,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -13410,13 +10810,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -13448,13 +10842,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -13470,13 +10858,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -13494,13 +10876,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -13516,13 +10892,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -13542,13 +10912,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -13564,13 +10928,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -13588,13 +10946,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -13610,13 +10962,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -13646,13 +10992,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -13668,13 +11008,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -13692,13 +11026,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -13714,13 +11042,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -13740,13 +11062,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -13762,13 +11078,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -13786,13 +11096,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -13808,13 +11112,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -13850,13 +11148,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -13872,13 +11164,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -13896,13 +11182,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -13918,13 +11198,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -13944,13 +11218,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -13966,13 +11234,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -13990,13 +11252,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -14012,13 +11268,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -14048,13 +11298,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -14070,13 +11314,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -14094,13 +11332,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -14116,13 +11348,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -14142,13 +11368,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -14164,13 +11384,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -14188,13 +11402,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -14210,13 +11418,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -14248,13 +11450,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -14270,13 +11466,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -14294,13 +11484,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -14316,13 +11500,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -14342,13 +11520,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -14364,13 +11536,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -14388,13 +11554,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -14410,13 +11570,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -14446,13 +11600,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -14468,13 +11616,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -14492,13 +11634,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -14514,13 +11650,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -14540,13 +11670,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -14562,13 +11686,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -14586,13 +11704,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -14608,13 +11720,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -14648,13 +11754,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -14670,13 +11770,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -14694,13 +11788,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -14716,13 +11804,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -14742,13 +11824,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -14764,13 +11840,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -14788,13 +11858,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -14808,15 +11872,9 @@ ", ", - "SharedData", - ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "SharedData", + ", ", + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -14846,13 +11904,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -14868,13 +11920,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -14892,13 +11938,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -14914,13 +11954,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -14940,13 +11974,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -14962,13 +11990,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -14986,13 +12008,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -15008,13 +12024,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -15046,13 +12056,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -15068,13 +12072,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -15092,13 +12090,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -15114,13 +12106,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -15140,13 +12126,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -15162,13 +12142,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -15186,13 +12160,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -15208,13 +12176,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -15244,13 +12206,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -15266,13 +12222,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -15290,13 +12240,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -15312,13 +12256,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -15338,13 +12276,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -15360,13 +12292,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -15384,13 +12310,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -15406,13 +12326,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -15456,13 +12370,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -15478,13 +12386,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -15502,13 +12404,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -15524,13 +12420,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -15550,13 +12440,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -15572,13 +12456,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -15596,13 +12474,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -15618,13 +12490,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -15654,13 +12520,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -15676,13 +12536,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -15700,13 +12554,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -15722,13 +12570,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -15748,13 +12590,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -15770,13 +12606,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -15794,13 +12624,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -15816,13 +12640,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -15854,13 +12672,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -15874,15 +12686,9 @@ ", ", - "SharedData", - ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "SharedData", + ", ", + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -15900,13 +12706,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -15922,13 +12722,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -15948,13 +12742,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -15970,13 +12758,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -15994,13 +12776,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -16016,13 +12792,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -16052,13 +12822,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -16074,13 +12838,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -16098,13 +12856,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -16120,13 +12872,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -16146,13 +12892,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -16168,13 +12908,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -16192,13 +12926,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -16214,13 +12942,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -16254,13 +12976,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -16276,13 +12992,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -16300,13 +13010,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -16322,13 +13026,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -16348,13 +13046,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -16370,13 +13062,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -16394,13 +13080,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -16416,13 +13096,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -16452,13 +13126,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -16474,13 +13142,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -16498,13 +13160,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -16520,13 +13176,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -16546,13 +13196,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -16568,13 +13212,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -16592,13 +13230,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -16614,13 +13246,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -16652,13 +13278,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -16674,13 +13294,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -16698,13 +13312,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -16720,13 +13328,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -16746,13 +13348,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -16768,13 +13364,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { visitColumnExpression: (ctx: ", @@ -16792,13 +13382,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -16814,13 +13398,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; }, ", @@ -16850,13 +13428,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; } & { visitSourceExpression: (ctx: ", "SourceExpressionVisitorContext", "<", @@ -16872,13 +13444,7 @@ ">, ", "SharedData", ", ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLSingleAstItem", - "text": "ESQLSingleAstItem" - }, + "ESQLAstExpression", ">, inp: Input) => Output; }, ", "SharedData", ">, inp: Input) => Output; } & { ...; } & { ...; }, ", @@ -17890,6 +14456,22 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/esql-ast", + "id": "def-common.ESQLCommand.commandType", + "type": "string", + "tags": [], + "label": "commandType", + "description": [ + "\nThe subtype of the command. For example, the `JOIN` command can be: (1)\nLOOKUP JOIN, (2) LEFT JOIN, (3) RIGHT JOIN." + ], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-esql-ast/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/esql-ast", "id": "def-common.ESQLCommand.args", diff --git a/api_docs/kbn_esql_ast.mdx b/api_docs/kbn_esql_ast.mdx index 836b6e71364fe..3dc114d5d9bbe 100644 --- a/api_docs/kbn_esql_ast.mdx +++ b/api_docs/kbn_esql_ast.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-ast title: "@kbn/esql-ast" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-ast plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-ast'] --- import kbnEsqlAstObj from './kbn_esql_ast.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 283 | 1 | 222 | 36 | +| 285 | 1 | 223 | 36 | ## Common diff --git a/api_docs/kbn_esql_editor.mdx b/api_docs/kbn_esql_editor.mdx index 7692278df2ae2..98f677db84a6f 100644 --- a/api_docs/kbn_esql_editor.mdx +++ b/api_docs/kbn_esql_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-editor title: "@kbn/esql-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-editor plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-editor'] --- import kbnEsqlEditorObj from './kbn_esql_editor.devdocs.json'; diff --git a/api_docs/kbn_esql_utils.mdx b/api_docs/kbn_esql_utils.mdx index 88087d40e1e00..3b81e50c906a7 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-utils'] --- import kbnEsqlUtilsObj from './kbn_esql_utils.devdocs.json'; diff --git a/api_docs/kbn_esql_validation_autocomplete.mdx b/api_docs/kbn_esql_validation_autocomplete.mdx index 99ba37f3a2180..64da979683dab 100644 --- a/api_docs/kbn_esql_validation_autocomplete.mdx +++ b/api_docs/kbn_esql_validation_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-validation-autocomplete title: "@kbn/esql-validation-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-validation-autocomplete plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-validation-autocomplete'] --- import kbnEsqlValidationAutocompleteObj from './kbn_esql_validation_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_common.mdx b/api_docs/kbn_event_annotation_common.mdx index 1e2022a6b8318..2abeaca9ad9bb 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-12-02 +date: 2024-12-05 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 f1c0c1e73825b..a2051c6e8dbaf 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-12-02 +date: 2024-12-05 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 88a4d3ca80e2e..08a91bd2c969b 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-12-02 +date: 2024-12-05 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 4a47ee4e8ed4e..a9a414ef15111 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-12-02 +date: 2024-12-05 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 899a30598c90e..2d9af29fd67e3 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-12-02 +date: 2024-12-05 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 250a68fc98b5f..edd29b5401904 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-12-02 +date: 2024-12-05 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 ad3c1b411c903..862287ce98b76 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-12-02 +date: 2024-12-05 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 798068ff3bf06..614beb41db6a4 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-12-02 +date: 2024-12-05 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 94aa158af9c7d..b07c5ad9f2edb 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-12-02 +date: 2024-12-05 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_gen_ai_functional_testing.devdocs.json b/api_docs/kbn_gen_ai_functional_testing.devdocs.json new file mode 100644 index 0000000000000..af7da09a371a7 --- /dev/null +++ b/api_docs/kbn_gen_ai_functional_testing.devdocs.json @@ -0,0 +1,205 @@ +{ + "id": "@kbn/gen-ai-functional-testing", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [ + { + "parentPluginId": "@kbn/gen-ai-functional-testing", + "id": "def-common.getAvailableConnectors", + "type": "Function", + "tags": [], + "label": "getAvailableConnectors", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "@kbn/gen-ai-functional-testing", + "scope": "common", + "docId": "kibKbnGenAiFunctionalTestingPluginApi", + "section": "def-common.AvailableConnectorWithId", + "text": "AvailableConnectorWithId" + }, + "[]" + ], + "path": "packages/kbn-gen-ai-functional-testing/src/connectors.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/gen-ai-functional-testing", + "id": "def-common.getPreconfiguredConnectorConfig", + "type": "Function", + "tags": [], + "label": "getPreconfiguredConnectorConfig", + "description": [ + "\nRetrieve the list of preconfigured connectors that should be used when defining the\nFTR configuration of suites using the connectors.\n" + ], + "signature": [ + "() => Record" + ], + "path": "packages/kbn-gen-ai-functional-testing/src/connectors.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "@kbn/gen-ai-functional-testing", + "id": "def-common.AvailableConnector", + "type": "Interface", + "tags": [], + "label": "AvailableConnector", + "description": [], + "path": "packages/kbn-gen-ai-functional-testing/src/connectors.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/gen-ai-functional-testing", + "id": "def-common.AvailableConnector.name", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "path": "packages/kbn-gen-ai-functional-testing/src/connectors.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/gen-ai-functional-testing", + "id": "def-common.AvailableConnector.actionTypeId", + "type": "string", + "tags": [], + "label": "actionTypeId", + "description": [], + "path": "packages/kbn-gen-ai-functional-testing/src/connectors.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/gen-ai-functional-testing", + "id": "def-common.AvailableConnector.config", + "type": "Object", + "tags": [], + "label": "config", + "description": [], + "signature": [ + "{ [x: string]: unknown; }" + ], + "path": "packages/kbn-gen-ai-functional-testing/src/connectors.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/gen-ai-functional-testing", + "id": "def-common.AvailableConnector.secrets", + "type": "Object", + "tags": [], + "label": "secrets", + "description": [], + "signature": [ + "{ [x: string]: unknown; }" + ], + "path": "packages/kbn-gen-ai-functional-testing/src/connectors.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/gen-ai-functional-testing", + "id": "def-common.AvailableConnectorWithId", + "type": "Interface", + "tags": [], + "label": "AvailableConnectorWithId", + "description": [], + "signature": [ + { + "pluginId": "@kbn/gen-ai-functional-testing", + "scope": "common", + "docId": "kibKbnGenAiFunctionalTestingPluginApi", + "section": "def-common.AvailableConnectorWithId", + "text": "AvailableConnectorWithId" + }, + " extends ", + { + "pluginId": "@kbn/gen-ai-functional-testing", + "scope": "common", + "docId": "kibKbnGenAiFunctionalTestingPluginApi", + "section": "def-common.AvailableConnector", + "text": "AvailableConnector" + } + ], + "path": "packages/kbn-gen-ai-functional-testing/src/connectors.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/gen-ai-functional-testing", + "id": "def-common.AvailableConnectorWithId.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "packages/kbn-gen-ai-functional-testing/src/connectors.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/gen-ai-functional-testing", + "id": "def-common.AI_CONNECTORS_VAR_ENV", + "type": "string", + "tags": [], + "label": "AI_CONNECTORS_VAR_ENV", + "description": [ + "\nThe environment variable that is used by the CI to load the connectors configuration" + ], + "signature": [ + "\"KIBANA_TESTING_AI_CONNECTORS\"" + ], + "path": "packages/kbn-gen-ai-functional-testing/src/connectors.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_gen_ai_functional_testing.mdx b/api_docs/kbn_gen_ai_functional_testing.mdx new file mode 100644 index 0000000000000..408ba16a232ed --- /dev/null +++ b/api_docs/kbn_gen_ai_functional_testing.mdx @@ -0,0 +1,36 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnGenAiFunctionalTestingPluginApi +slug: /kibana-dev-docs/api/kbn-gen-ai-functional-testing +title: "@kbn/gen-ai-functional-testing" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/gen-ai-functional-testing plugin +date: 2024-12-05 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/gen-ai-functional-testing'] +--- +import kbnGenAiFunctionalTestingObj from './kbn_gen_ai_functional_testing.devdocs.json'; + + + +Contact [@elastic/appex-ai-infra](https://github.com/orgs/elastic/teams/appex-ai-infra) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 10 | 0 | 8 | 0 | + +## Common + +### Functions + + +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/kbn_generate.mdx b/api_docs/kbn_generate.mdx index 159916f2dca23..18972f01cb745 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-12-02 +date: 2024-12-05 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 699613b55e9c8..d8f624eb028bc 100644 --- a/api_docs/kbn_generate_console_definitions.mdx +++ b/api_docs/kbn_generate_console_definitions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-console-definitions title: "@kbn/generate-console-definitions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-console-definitions plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-console-definitions'] --- import kbnGenerateConsoleDefinitionsObj from './kbn_generate_console_definitions.devdocs.json'; diff --git a/api_docs/kbn_generate_csv.mdx b/api_docs/kbn_generate_csv.mdx index 496343cce29d4..574b2ac6320fc 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-csv'] --- import kbnGenerateCsvObj from './kbn_generate_csv.devdocs.json'; diff --git a/api_docs/kbn_grid_layout.mdx b/api_docs/kbn_grid_layout.mdx index dbb2a24d642f6..51592ebbbbfbc 100644 --- a/api_docs/kbn_grid_layout.mdx +++ b/api_docs/kbn_grid_layout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-grid-layout title: "@kbn/grid-layout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/grid-layout plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/grid-layout'] --- import kbnGridLayoutObj from './kbn_grid_layout.devdocs.json'; diff --git a/api_docs/kbn_grouping.mdx b/api_docs/kbn_grouping.mdx index 44be85280c0d5..c55abd4f399af 100644 --- a/api_docs/kbn_grouping.mdx +++ b/api_docs/kbn_grouping.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-grouping title: "@kbn/grouping" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/grouping plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/grouping'] --- import kbnGroupingObj from './kbn_grouping.devdocs.json'; diff --git a/api_docs/kbn_guided_onboarding.mdx b/api_docs/kbn_guided_onboarding.mdx index 95cc8f66e7c2a..cb2167a5e2c8f 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-12-02 +date: 2024-12-05 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 cf1a0403e3391..9335d3b1dfd3c 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-12-02 +date: 2024-12-05 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 0f7928b933500..8fbc998187d48 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-12-02 +date: 2024-12-05 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 72170f369200f..74d54eb01052f 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-12-02 +date: 2024-12-05 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 4c41bd33728a2..5e53efa31efb2 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-12-02 +date: 2024-12-05 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 0fa77b5c55a49..4eb5e1615f19c 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-12-02 +date: 2024-12-05 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 cdbd291bc026e..c77e95de4cf00 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-12-02 +date: 2024-12-05 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 55764fccf43fa..a6c639049514d 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-12-02 +date: 2024-12-05 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 1270c692ebe11..d74ee2e04c1cb 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_index_adapter.mdx b/api_docs/kbn_index_adapter.mdx index 967d956883c3b..608ed7e6fae0c 100644 --- a/api_docs/kbn_index_adapter.mdx +++ b/api_docs/kbn_index_adapter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-index-adapter title: "@kbn/index-adapter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/index-adapter plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/index-adapter'] --- import kbnIndexAdapterObj from './kbn_index_adapter.devdocs.json'; diff --git a/api_docs/kbn_index_lifecycle_management_common_shared.mdx b/api_docs/kbn_index_lifecycle_management_common_shared.mdx index 997de9a0ffb8c..1e83e617cefc0 100644 --- a/api_docs/kbn_index_lifecycle_management_common_shared.mdx +++ b/api_docs/kbn_index_lifecycle_management_common_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-index-lifecycle-management-common-shared title: "@kbn/index-lifecycle-management-common-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/index-lifecycle-management-common-shared plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/index-lifecycle-management-common-shared'] --- import kbnIndexLifecycleManagementCommonSharedObj from './kbn_index_lifecycle_management_common_shared.devdocs.json'; diff --git a/api_docs/kbn_index_management_shared_types.mdx b/api_docs/kbn_index_management_shared_types.mdx index d95cc0cbf6730..741fb28236fec 100644 --- a/api_docs/kbn_index_management_shared_types.mdx +++ b/api_docs/kbn_index_management_shared_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-index-management-shared-types title: "@kbn/index-management-shared-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/index-management-shared-types plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/index-management-shared-types'] --- import kbnIndexManagementSharedTypesObj from './kbn_index_management_shared_types.devdocs.json'; diff --git a/api_docs/kbn_inference_common.mdx b/api_docs/kbn_inference_common.mdx index eaed9806b054a..8fea2dcf8433f 100644 --- a/api_docs/kbn_inference_common.mdx +++ b/api_docs/kbn_inference_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-inference-common title: "@kbn/inference-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/inference-common plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/inference-common'] --- import kbnInferenceCommonObj from './kbn_inference_common.devdocs.json'; diff --git a/api_docs/kbn_inference_integration_flyout.mdx b/api_docs/kbn_inference_integration_flyout.mdx index 4b180ae10bf22..f54206eb31cdd 100644 --- a/api_docs/kbn_inference_integration_flyout.mdx +++ b/api_docs/kbn_inference_integration_flyout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-inference_integration_flyout title: "@kbn/inference_integration_flyout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/inference_integration_flyout plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/inference_integration_flyout'] --- import kbnInferenceIntegrationFlyoutObj from './kbn_inference_integration_flyout.devdocs.json'; diff --git a/api_docs/kbn_infra_forge.mdx b/api_docs/kbn_infra_forge.mdx index 748c3b3541036..fa0333569364a 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-12-02 +date: 2024-12-05 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 0b9ed1b242544..1d1336e746dcc 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter'] --- import kbnInterpreterObj from './kbn_interpreter.devdocs.json'; diff --git a/api_docs/kbn_investigation_shared.mdx b/api_docs/kbn_investigation_shared.mdx index d1ea062e05716..4d5858c688a5b 100644 --- a/api_docs/kbn_investigation_shared.mdx +++ b/api_docs/kbn_investigation_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-investigation-shared title: "@kbn/investigation-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/investigation-shared plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/investigation-shared'] --- import kbnInvestigationSharedObj from './kbn_investigation_shared.devdocs.json'; diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx index be293ed643717..93b98e6f037cf 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] --- import kbnIoTsUtilsObj from './kbn_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_ipynb.mdx b/api_docs/kbn_ipynb.mdx index 3d3d38686b427..b1ff1a9a64209 100644 --- a/api_docs/kbn_ipynb.mdx +++ b/api_docs/kbn_ipynb.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ipynb title: "@kbn/ipynb" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ipynb plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ipynb'] --- import kbnIpynbObj from './kbn_ipynb.devdocs.json'; diff --git a/api_docs/kbn_item_buffer.mdx b/api_docs/kbn_item_buffer.mdx index c576bfa5f4601..b40672091ca60 100644 --- a/api_docs/kbn_item_buffer.mdx +++ b/api_docs/kbn_item_buffer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-item-buffer title: "@kbn/item-buffer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/item-buffer plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/item-buffer'] --- import kbnItemBufferObj from './kbn_item_buffer.devdocs.json'; diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index 344db3f253120..83de93d67d40d 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] --- import kbnJestSerializersObj from './kbn_jest_serializers.devdocs.json'; diff --git a/api_docs/kbn_journeys.mdx b/api_docs/kbn_journeys.mdx index 9ad29b85c964d..f45e580d9e8c8 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/journeys'] --- import kbnJourneysObj from './kbn_journeys.devdocs.json'; diff --git a/api_docs/kbn_json_ast.mdx b/api_docs/kbn_json_ast.mdx index 573262fe623de..e298af26ffe87 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/json-ast'] --- import kbnJsonAstObj from './kbn_json_ast.devdocs.json'; diff --git a/api_docs/kbn_json_schemas.mdx b/api_docs/kbn_json_schemas.mdx index d5995c386302d..40672c6fca2e2 100644 --- a/api_docs/kbn_json_schemas.mdx +++ b/api_docs/kbn_json_schemas.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-json-schemas title: "@kbn/json-schemas" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/json-schemas plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/json-schemas'] --- import kbnJsonSchemasObj from './kbn_json_schemas.devdocs.json'; diff --git a/api_docs/kbn_kibana_manifest_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx index 81f5caedc08c8..80f91463cb1ed 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-12-02 +date: 2024-12-05 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.mdx b/api_docs/kbn_language_documentation.mdx index e32554f343e67..c23569c5d0f07 100644 --- a/api_docs/kbn_language_documentation.mdx +++ b/api_docs/kbn_language_documentation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-language-documentation title: "@kbn/language-documentation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/language-documentation plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/language-documentation'] --- import kbnLanguageDocumentationObj from './kbn_language_documentation.devdocs.json'; diff --git a/api_docs/kbn_lens_embeddable_utils.mdx b/api_docs/kbn_lens_embeddable_utils.mdx index 4ed8563935bdc..e2bcd3824e403 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-12-02 +date: 2024-12-05 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 c6bc684b7d76b..eac1fb96d8855 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-12-02 +date: 2024-12-05 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 786475d4e1be0..01ad495fe83ef 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-12-02 +date: 2024-12-05 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 129e8f18db913..29ce476c33b4b 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-12-02 +date: 2024-12-05 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 f5f9369b024ea..210f36e7874d7 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-12-02 +date: 2024-12-05 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 53b6d9be5d61d..c68b643a6b519 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-12-02 +date: 2024-12-05 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.devdocs.json b/api_docs/kbn_management_cards_navigation.devdocs.json index 09bcfb00d4e2d..761cfc57d721c 100644 --- a/api_docs/kbn_management_cards_navigation.devdocs.json +++ b/api_docs/kbn_management_cards_navigation.devdocs.json @@ -145,7 +145,7 @@ "label": "hideLinksTo", "description": [], "signature": [ - "(\"transform\" | \"tags\" | \"maintenanceWindows\" | \"dataViews\" | \"spaces\" | \"settings\" | \"data_quality\" | \"data_usage\" | \"filesManagement\" | \"roles\" | \"reporting\" | \"api_keys\" | \"index_management\" | \"ingest_pipelines\" | \"jobsListLink\" | \"objects\" | \"pipelines\" | \"triggersActions\" | \"triggersActionsConnectors\")[] | undefined" + "(\"transform\" | \"tags\" | \"maintenanceWindows\" | \"dataViews\" | \"spaces\" | \"settings\" | \"data_quality\" | \"data_usage\" | \"filesManagement\" | \"pipelines\" | \"roles\" | \"reporting\" | \"api_keys\" | \"index_management\" | \"ingest_pipelines\" | \"jobsListLink\" | \"objects\" | \"triggersActions\" | \"triggersActionsConnectors\")[] | undefined" ], "path": "packages/kbn-management/cards_navigation/src/types.ts", "deprecated": false, @@ -202,7 +202,7 @@ "label": "AppId", "description": [], "signature": [ - "\"transform\" | \"tags\" | \"maintenanceWindows\" | \"dataViews\" | \"spaces\" | \"settings\" | \"data_quality\" | \"data_usage\" | \"filesManagement\" | \"roles\" | \"reporting\" | \"api_keys\" | \"index_management\" | \"ingest_pipelines\" | \"jobsListLink\" | \"objects\" | \"pipelines\" | \"triggersActions\" | \"triggersActionsConnectors\"" + "\"transform\" | \"tags\" | \"maintenanceWindows\" | \"dataViews\" | \"spaces\" | \"settings\" | \"data_quality\" | \"data_usage\" | \"filesManagement\" | \"pipelines\" | \"roles\" | \"reporting\" | \"api_keys\" | \"index_management\" | \"ingest_pipelines\" | \"jobsListLink\" | \"objects\" | \"triggersActions\" | \"triggersActionsConnectors\"" ], "path": "packages/kbn-management/cards_navigation/src/types.ts", "deprecated": false, diff --git a/api_docs/kbn_management_cards_navigation.mdx b/api_docs/kbn_management_cards_navigation.mdx index 4974f81a195c8..0e12559aa6b2f 100644 --- a/api_docs/kbn_management_cards_navigation.mdx +++ b/api_docs/kbn_management_cards_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-cards-navigation title: "@kbn/management-cards-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-cards-navigation plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-cards-navigation'] --- import kbnManagementCardsNavigationObj from './kbn_management_cards_navigation.devdocs.json'; diff --git a/api_docs/kbn_management_settings_application.mdx b/api_docs/kbn_management_settings_application.mdx index 939c5820665ec..1397355486a34 100644 --- a/api_docs/kbn_management_settings_application.mdx +++ b/api_docs/kbn_management_settings_application.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-application title: "@kbn/management-settings-application" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-application plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-application'] --- import kbnManagementSettingsApplicationObj from './kbn_management_settings_application.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_category.mdx b/api_docs/kbn_management_settings_components_field_category.mdx index d78e660c045ba..d1227bf640b28 100644 --- a/api_docs/kbn_management_settings_components_field_category.mdx +++ b/api_docs/kbn_management_settings_components_field_category.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-category title: "@kbn/management-settings-components-field-category" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-category plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-category'] --- import kbnManagementSettingsComponentsFieldCategoryObj from './kbn_management_settings_components_field_category.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_input.mdx b/api_docs/kbn_management_settings_components_field_input.mdx index db8b95fb452fa..6f07b3f85b9fc 100644 --- a/api_docs/kbn_management_settings_components_field_input.mdx +++ b/api_docs/kbn_management_settings_components_field_input.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-input title: "@kbn/management-settings-components-field-input" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-input plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-input'] --- import kbnManagementSettingsComponentsFieldInputObj from './kbn_management_settings_components_field_input.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_row.mdx b/api_docs/kbn_management_settings_components_field_row.mdx index 4a9da462123eb..709af981d90b5 100644 --- a/api_docs/kbn_management_settings_components_field_row.mdx +++ b/api_docs/kbn_management_settings_components_field_row.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-row title: "@kbn/management-settings-components-field-row" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-row plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-row'] --- import kbnManagementSettingsComponentsFieldRowObj from './kbn_management_settings_components_field_row.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_form.mdx b/api_docs/kbn_management_settings_components_form.mdx index 5d21435faea94..537ac2789f12d 100644 --- a/api_docs/kbn_management_settings_components_form.mdx +++ b/api_docs/kbn_management_settings_components_form.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-form title: "@kbn/management-settings-components-form" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-form plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-form'] --- import kbnManagementSettingsComponentsFormObj from './kbn_management_settings_components_form.devdocs.json'; diff --git a/api_docs/kbn_management_settings_field_definition.mdx b/api_docs/kbn_management_settings_field_definition.mdx index 913248a5391d0..e0f15b7a14a07 100644 --- a/api_docs/kbn_management_settings_field_definition.mdx +++ b/api_docs/kbn_management_settings_field_definition.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-field-definition title: "@kbn/management-settings-field-definition" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-field-definition plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-field-definition'] --- import kbnManagementSettingsFieldDefinitionObj from './kbn_management_settings_field_definition.devdocs.json'; diff --git a/api_docs/kbn_management_settings_ids.devdocs.json b/api_docs/kbn_management_settings_ids.devdocs.json index f46ff2faa9694..5e248ad3ff958 100644 --- a/api_docs/kbn_management_settings_ids.devdocs.json +++ b/api_docs/kbn_management_settings_ids.devdocs.json @@ -592,21 +592,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "@kbn/management-settings-ids", - "id": "def-common.DOC_TABLE_LEGACY_ID", - "type": "string", - "tags": [], - "label": "DOC_TABLE_LEGACY_ID", - "description": [], - "signature": [ - "\"doc_table:legacy\"" - ], - "path": "packages/kbn-management/settings/setting_ids/index.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "@kbn/management-settings-ids", "id": "def-common.ENABLE_ESQL_ID", @@ -2004,21 +1989,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "@kbn/management-settings-ids", - "id": "def-common.TRUNCATE_MAX_HEIGHT_ID", - "type": "string", - "tags": [], - "label": "TRUNCATE_MAX_HEIGHT_ID", - "description": [], - "signature": [ - "\"truncate:maxHeight\"" - ], - "path": "packages/kbn-management/settings/setting_ids/index.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "@kbn/management-settings-ids", "id": "def-common.VISUALIZATION_COLOR_MAPPING_ID", diff --git a/api_docs/kbn_management_settings_ids.mdx b/api_docs/kbn_management_settings_ids.mdx index 93c0b595a1e54..a1517ceda355b 100644 --- a/api_docs/kbn_management_settings_ids.mdx +++ b/api_docs/kbn_management_settings_ids.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-ids title: "@kbn/management-settings-ids" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-ids plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-ids'] --- import kbnManagementSettingsIdsObj from './kbn_management_settings_ids.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 | |-------------------|-----------|------------------------|-----------------| -| 140 | 0 | 139 | 0 | +| 138 | 0 | 137 | 0 | ## Common diff --git a/api_docs/kbn_management_settings_section_registry.mdx b/api_docs/kbn_management_settings_section_registry.mdx index 5cfb38b63269e..7b1132020715e 100644 --- a/api_docs/kbn_management_settings_section_registry.mdx +++ b/api_docs/kbn_management_settings_section_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-section-registry title: "@kbn/management-settings-section-registry" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-section-registry plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-section-registry'] --- import kbnManagementSettingsSectionRegistryObj from './kbn_management_settings_section_registry.devdocs.json'; diff --git a/api_docs/kbn_management_settings_types.mdx b/api_docs/kbn_management_settings_types.mdx index 6a02abf6f4f3a..d6a59dfc0e5fc 100644 --- a/api_docs/kbn_management_settings_types.mdx +++ b/api_docs/kbn_management_settings_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-types title: "@kbn/management-settings-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-types plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-types'] --- import kbnManagementSettingsTypesObj from './kbn_management_settings_types.devdocs.json'; diff --git a/api_docs/kbn_management_settings_utilities.mdx b/api_docs/kbn_management_settings_utilities.mdx index 73087d68895b7..f371c43a002c1 100644 --- a/api_docs/kbn_management_settings_utilities.mdx +++ b/api_docs/kbn_management_settings_utilities.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-utilities title: "@kbn/management-settings-utilities" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-utilities plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-utilities'] --- import kbnManagementSettingsUtilitiesObj from './kbn_management_settings_utilities.devdocs.json'; diff --git a/api_docs/kbn_management_storybook_config.mdx b/api_docs/kbn_management_storybook_config.mdx index 402fef1558c45..b81bff14d9060 100644 --- a/api_docs/kbn_management_storybook_config.mdx +++ b/api_docs/kbn_management_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-storybook-config title: "@kbn/management-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-storybook-config plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-storybook-config'] --- import kbnManagementStorybookConfigObj from './kbn_management_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_manifest.mdx b/api_docs/kbn_manifest.mdx index 7279258844e48..ac85da019b97a 100644 --- a/api_docs/kbn_manifest.mdx +++ b/api_docs/kbn_manifest.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-manifest title: "@kbn/manifest" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/manifest plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/manifest'] --- import kbnManifestObj from './kbn_manifest.devdocs.json'; diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index 39143a2c919cb..62a82581c0345 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-12-02 +date: 2024-12-05 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 22e9665c50c5a..edcbbba797d26 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-12-02 +date: 2024-12-05 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 ef7fc0835ffd7..492bace27e304 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-12-02 +date: 2024-12-05 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 adafecac1cb86..23ddc848ffcff 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-12-02 +date: 2024-12-05 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 9d6fc2de85213..c867ea0c8370c 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-12-02 +date: 2024-12-05 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 5f9620582fa71..b12336ef55a6b 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-12-02 +date: 2024-12-05 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 ddfbe41ee3055..0d5b6e09e5fc8 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-12-02 +date: 2024-12-05 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 511f1613814e0..8df28c43af3cf 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-12-02 +date: 2024-12-05 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 dfaf879f35eab..9e18b7177161c 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-12-02 +date: 2024-12-05 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 1b45bffa43233..ad86bbf3c2559 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-12-02 +date: 2024-12-05 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 b7c9f6ade86f9..3d0abf5f4b708 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-12-02 +date: 2024-12-05 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 ca45e7173f3e9..d9e898c21aec7 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-12-02 +date: 2024-12-05 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_field_stats_flyout.mdx b/api_docs/kbn_ml_field_stats_flyout.mdx index 3ddf2ee69f111..1cf3cb5fab097 100644 --- a/api_docs/kbn_ml_field_stats_flyout.mdx +++ b/api_docs/kbn_ml_field_stats_flyout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-field-stats-flyout title: "@kbn/ml-field-stats-flyout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-field-stats-flyout plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-field-stats-flyout'] --- import kbnMlFieldStatsFlyoutObj from './kbn_ml_field_stats_flyout.devdocs.json'; diff --git a/api_docs/kbn_ml_in_memory_table.mdx b/api_docs/kbn_ml_in_memory_table.mdx index 82ec437a1f6ce..a528653c4b40f 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-12-02 +date: 2024-12-05 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 967e30f566251..d7954e63c4ddd 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-12-02 +date: 2024-12-05 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 412eca577305d..0e4cb2194bcf5 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-12-02 +date: 2024-12-05 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 a81393c55d490..4e9a5aba92786 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-12-02 +date: 2024-12-05 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 d12ff50bc560b..78da0cb7c0339 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-12-02 +date: 2024-12-05 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 85a4279730903..e02ec4051f518 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-12-02 +date: 2024-12-05 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 ea6f8c4d2dd9c..c8fd3d29090a7 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-12-02 +date: 2024-12-05 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_parse_interval.mdx b/api_docs/kbn_ml_parse_interval.mdx index 2baa85ae8ac9c..b58eeacbf3e6d 100644 --- a/api_docs/kbn_ml_parse_interval.mdx +++ b/api_docs/kbn_ml_parse_interval.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-parse-interval title: "@kbn/ml-parse-interval" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-parse-interval plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-parse-interval'] --- import kbnMlParseIntervalObj from './kbn_ml_parse_interval.devdocs.json'; diff --git a/api_docs/kbn_ml_query_utils.mdx b/api_docs/kbn_ml_query_utils.mdx index 887ae1c355bea..7d1fcc26425af 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-12-02 +date: 2024-12-05 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 c018e29f7742b..2c2627b325f36 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-12-02 +date: 2024-12-05 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 cfce6e5ec5a90..4c26e21e0ee7c 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-12-02 +date: 2024-12-05 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 2e3d75c747808..9ff6f48174d9c 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-12-02 +date: 2024-12-05 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 544a77512c800..6b2eb5ad119f1 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-12-02 +date: 2024-12-05 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_time_buckets.mdx b/api_docs/kbn_ml_time_buckets.mdx index 93c38f4abfb08..4c0a167702c2d 100644 --- a/api_docs/kbn_ml_time_buckets.mdx +++ b/api_docs/kbn_ml_time_buckets.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-time-buckets title: "@kbn/ml-time-buckets" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-time-buckets plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-time-buckets'] --- import kbnMlTimeBucketsObj from './kbn_ml_time_buckets.devdocs.json'; diff --git a/api_docs/kbn_ml_trained_models_utils.devdocs.json b/api_docs/kbn_ml_trained_models_utils.devdocs.json index f3065fd30c25c..e3c63f83892f7 100644 --- a/api_docs/kbn_ml_trained_models_utils.devdocs.json +++ b/api_docs/kbn_ml_trained_models_utils.devdocs.json @@ -522,7 +522,8 @@ "label": "InferenceAPIConfigResponse", "description": [], "signature": [ - "{ inference_id: string; task_type: \"sparse_embedding\" | \"text_embedding\"; task_settings: { model?: string | undefined; }; } & ", + "InferenceInferenceEndpointInfo", + " & ", "InferenceServiceSettings" ], "path": "x-pack/packages/ml/trained_models_utils/src/constants/trained_models.ts", @@ -650,7 +651,7 @@ "label": "TrainedModelType", "description": [], "signature": [ - "\"tree_ensemble\" | \"lang_ident\" | \"pytorch\"" + "\"pytorch\" | \"tree_ensemble\" | \"lang_ident\"" ], "path": "x-pack/packages/ml/trained_models_utils/src/constants/trained_models.ts", "deprecated": false, diff --git a/api_docs/kbn_ml_trained_models_utils.mdx b/api_docs/kbn_ml_trained_models_utils.mdx index 5a376935967e3..c31fd63e7703f 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-12-02 +date: 2024-12-05 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 d4a0eaf3cd71c..31deb90048027 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-12-02 +date: 2024-12-05 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 fb8a4b9ba12ea..b53472793003b 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-url-state'] --- import kbnMlUrlStateObj from './kbn_ml_url_state.devdocs.json'; diff --git a/api_docs/kbn_ml_validators.mdx b/api_docs/kbn_ml_validators.mdx index bb6f6224f73ac..ad55ccd0b8a1a 100644 --- a/api_docs/kbn_ml_validators.mdx +++ b/api_docs/kbn_ml_validators.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-validators title: "@kbn/ml-validators" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-validators plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-validators'] --- import kbnMlValidatorsObj from './kbn_ml_validators.devdocs.json'; diff --git a/api_docs/kbn_mock_idp_utils.mdx b/api_docs/kbn_mock_idp_utils.mdx index 246c1a6af7360..bb6286ad771ca 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-12-02 +date: 2024-12-05 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 87d3beec02364..8a8bc6fac69f3 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-12-02 +date: 2024-12-05 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 0b31ad69f9c59..174f331a19a3f 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/object-versioning'] --- import kbnObjectVersioningObj from './kbn_object_versioning.devdocs.json'; diff --git a/api_docs/kbn_object_versioning_utils.mdx b/api_docs/kbn_object_versioning_utils.mdx index a7794de94002e..957da727cba47 100644 --- a/api_docs/kbn_object_versioning_utils.mdx +++ b/api_docs/kbn_object_versioning_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-object-versioning-utils title: "@kbn/object-versioning-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/object-versioning-utils plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/object-versioning-utils'] --- import kbnObjectVersioningUtilsObj from './kbn_object_versioning_utils.devdocs.json'; diff --git a/api_docs/kbn_observability_alert_details.devdocs.json b/api_docs/kbn_observability_alert_details.devdocs.json index 3c81625eeaff7..b1c6297dead23 100644 --- a/api_docs/kbn_observability_alert_details.devdocs.json +++ b/api_docs/kbn_observability_alert_details.devdocs.json @@ -159,7 +159,7 @@ "label": "useAlertsHistory", "description": [], "signature": [ - "({\n featureIds,\n ruleId,\n dateRange,\n http,\n instanceId,\n}: ", + "({\n ruleTypeIds,\n consumers,\n ruleId,\n dateRange,\n http,\n instanceId,\n}: ", "Props", ") => ", "UseAlertsHistory" @@ -173,7 +173,7 @@ "id": "def-common.useAlertsHistory.$1", "type": "Object", "tags": [], - "label": "{\n featureIds,\n ruleId,\n dateRange,\n http,\n instanceId,\n}", + "label": "{\n ruleTypeIds,\n consumers,\n ruleId,\n dateRange,\n http,\n instanceId,\n}", "description": [], "signature": [ "Props" diff --git a/api_docs/kbn_observability_alert_details.mdx b/api_docs/kbn_observability_alert_details.mdx index 7b56c63e0e2d3..e86c08a9c2caa 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-12-02 +date: 2024-12-05 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_rule_utils.mdx b/api_docs/kbn_observability_alerting_rule_utils.mdx index 2459553fbf88c..fea47baeb6880 100644 --- a/api_docs/kbn_observability_alerting_rule_utils.mdx +++ b/api_docs/kbn_observability_alerting_rule_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alerting-rule-utils title: "@kbn/observability-alerting-rule-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alerting-rule-utils plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alerting-rule-utils'] --- import kbnObservabilityAlertingRuleUtilsObj from './kbn_observability_alerting_rule_utils.devdocs.json'; diff --git a/api_docs/kbn_observability_alerting_test_data.mdx b/api_docs/kbn_observability_alerting_test_data.mdx index 31ac8e193c63b..32e0165f932eb 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-12-02 +date: 2024-12-05 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 1a9f88baa9d75..a55eb6a2fa253 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-12-02 +date: 2024-12-05 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_observability_logs_overview.mdx b/api_docs/kbn_observability_logs_overview.mdx index 50dd757b98e5c..2bb54a2dccf67 100644 --- a/api_docs/kbn_observability_logs_overview.mdx +++ b/api_docs/kbn_observability_logs_overview.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-logs-overview title: "@kbn/observability-logs-overview" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-logs-overview plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-logs-overview'] --- import kbnObservabilityLogsOverviewObj from './kbn_observability_logs_overview.devdocs.json'; diff --git a/api_docs/kbn_observability_synthetics_test_data.mdx b/api_docs/kbn_observability_synthetics_test_data.mdx index 8d19102f93a30..6c9fe9e705352 100644 --- a/api_docs/kbn_observability_synthetics_test_data.mdx +++ b/api_docs/kbn_observability_synthetics_test_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-synthetics-test-data title: "@kbn/observability-synthetics-test-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-synthetics-test-data plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-synthetics-test-data'] --- import kbnObservabilitySyntheticsTestDataObj from './kbn_observability_synthetics_test_data.devdocs.json'; diff --git a/api_docs/kbn_openapi_bundler.mdx b/api_docs/kbn_openapi_bundler.mdx index 005ae6b4955f0..93e21b43bd6ce 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-12-02 +date: 2024-12-05 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 5f4244a8e9ff1..55c1eeed3cfdf 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-12-02 +date: 2024-12-05 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 3b72783c1b27b..10ec9d427b92e 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-12-02 +date: 2024-12-05 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 72b37397ec9f8..ad63194371c64 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-12-02 +date: 2024-12-05 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 6665072802c07..230a3fe62b3a4 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-12-02 +date: 2024-12-05 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 6dd96a4443eb3..3ce840271de91 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-12-02 +date: 2024-12-05 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 4cc836564c7ec..72e3da7872478 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-12-02 +date: 2024-12-05 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 178ca25e75859..f90d77eec7cbb 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-12-02 +date: 2024-12-05 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 76be418dced39..5998e3f932fc1 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-12-02 +date: 2024-12-05 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 9f8317973e625..a6c31f6114c32 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-12-02 +date: 2024-12-05 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 d992ae4c86b60..ad615f5265036 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-containers'] --- import kbnPresentationContainersObj from './kbn_presentation_containers.devdocs.json'; diff --git a/api_docs/kbn_presentation_publishing.devdocs.json b/api_docs/kbn_presentation_publishing.devdocs.json index 46dd41e293a4c..f631ed6e70da3 100644 --- a/api_docs/kbn_presentation_publishing.devdocs.json +++ b/api_docs/kbn_presentation_publishing.devdocs.json @@ -7992,7 +7992,7 @@ "section": "def-public.PublishesFilters", "text": "PublishesFilters" }, - " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; query$: ", + " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; canEditUnifiedSearch?: (() => boolean) | undefined; query$: ", { "pluginId": "@kbn/presentation-publishing", "scope": "public", @@ -8120,7 +8120,7 @@ "section": "def-public.PublishesFilters", "text": "PublishesFilters" }, - " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; query$: ", + " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; canEditUnifiedSearch?: (() => boolean) | undefined; query$: ", { "pluginId": "@kbn/presentation-publishing", "scope": "public", diff --git a/api_docs/kbn_presentation_publishing.mdx b/api_docs/kbn_presentation_publishing.mdx index f2c2fc069c551..8bed87f5c802f 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-publishing'] --- import kbnPresentationPublishingObj from './kbn_presentation_publishing.devdocs.json'; diff --git a/api_docs/kbn_product_doc_artifact_builder.mdx b/api_docs/kbn_product_doc_artifact_builder.mdx index b2e739a2a3fa0..418593a1d8087 100644 --- a/api_docs/kbn_product_doc_artifact_builder.mdx +++ b/api_docs/kbn_product_doc_artifact_builder.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-product-doc-artifact-builder title: "@kbn/product-doc-artifact-builder" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/product-doc-artifact-builder plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/product-doc-artifact-builder'] --- import kbnProductDocArtifactBuilderObj from './kbn_product_doc_artifact_builder.devdocs.json'; diff --git a/api_docs/kbn_product_doc_common.mdx b/api_docs/kbn_product_doc_common.mdx index f69ae2250f75c..9f116a29a743f 100644 --- a/api_docs/kbn_product_doc_common.mdx +++ b/api_docs/kbn_product_doc_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-product-doc-common title: "@kbn/product-doc-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/product-doc-common plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/product-doc-common'] --- import kbnProductDocCommonObj from './kbn_product_doc_common.devdocs.json'; diff --git a/api_docs/kbn_profiling_utils.mdx b/api_docs/kbn_profiling_utils.mdx index 7b8802af3a2b8..ef52f5664e5d6 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-12-02 +date: 2024-12-05 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 1d2f4c5582037..ca703801378e0 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-12-02 +date: 2024-12-05 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 1c1d4a307d5ad..b3e283c5e3f64 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_react_hooks.mdx b/api_docs/kbn_react_hooks.mdx index f7ed92c66962d..6091507c022d5 100644 --- a/api_docs/kbn_react_hooks.mdx +++ b/api_docs/kbn_react_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-hooks title: "@kbn/react-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-hooks plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-hooks'] --- import kbnReactHooksObj from './kbn_react_hooks.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_common.mdx b/api_docs/kbn_react_kibana_context_common.mdx index ace3f044df613..1446fedf9a793 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-12-02 +date: 2024-12-05 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 93e8de30f6273..5a6091df5eddb 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-12-02 +date: 2024-12-05 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 d2f6423ed70f5..2f7ff52dc7544 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-12-02 +date: 2024-12-05 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 7fd82ca810cec..e52f54db570ce 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-12-02 +date: 2024-12-05 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 e12a9e0d3c710..a463bc58ecc6b 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-12-02 +date: 2024-12-05 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 a5419248c35f1..ebb8a88be3839 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-mount'] --- import kbnReactKibanaMountObj from './kbn_react_kibana_mount.devdocs.json'; diff --git a/api_docs/kbn_recently_accessed.mdx b/api_docs/kbn_recently_accessed.mdx index e1c812832d8d1..9c8ff5d44ee45 100644 --- a/api_docs/kbn_recently_accessed.mdx +++ b/api_docs/kbn_recently_accessed.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-recently-accessed title: "@kbn/recently-accessed" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/recently-accessed plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/recently-accessed'] --- import kbnRecentlyAccessedObj from './kbn_recently_accessed.devdocs.json'; diff --git a/api_docs/kbn_repo_file_maps.mdx b/api_docs/kbn_repo_file_maps.mdx index d5140b8dd9b79..102cae640dc02 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-12-02 +date: 2024-12-05 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 dc6b2ee44f4e6..e569773a34515 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-12-02 +date: 2024-12-05 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 424c34e4c082d..d75b1e2ddfb81 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-12-02 +date: 2024-12-05 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 1f2a195f43ceb..4d8a4007410a9 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier'] --- import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json'; diff --git a/api_docs/kbn_reporting_common.mdx b/api_docs/kbn_reporting_common.mdx index a6c4aa772cb4a..72382f1d90f2c 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-common'] --- import kbnReportingCommonObj from './kbn_reporting_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_csv_share_panel.devdocs.json b/api_docs/kbn_reporting_csv_share_panel.devdocs.json index ef9cac6807088..529dd32169094 100644 --- a/api_docs/kbn_reporting_csv_share_panel.devdocs.json +++ b/api_docs/kbn_reporting_csv_share_panel.devdocs.json @@ -86,7 +86,7 @@ "id": "def-public.ReportingCsvPanelAction.Unnamed.$1", "type": "Object", "tags": [], - "label": "{ core, csvConfig, apiClient, startServices$, usesUiCapabilities }", + "label": "{ core, apiClient, startServices$ }", "description": [], "signature": [ "Params" diff --git a/api_docs/kbn_reporting_csv_share_panel.mdx b/api_docs/kbn_reporting_csv_share_panel.mdx index 4159e2f96fde9..d292282a22f73 100644 --- a/api_docs/kbn_reporting_csv_share_panel.mdx +++ b/api_docs/kbn_reporting_csv_share_panel.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-csv-share-panel title: "@kbn/reporting-csv-share-panel" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-csv-share-panel plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-csv-share-panel'] --- import kbnReportingCsvSharePanelObj from './kbn_reporting_csv_share_panel.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_csv.devdocs.json b/api_docs/kbn_reporting_export_types_csv.devdocs.json index 9e4bdaccb78ca..56748215d9395 100644 --- a/api_docs/kbn_reporting_export_types_csv.devdocs.json +++ b/api_docs/kbn_reporting_export_types_csv.devdocs.json @@ -168,7 +168,7 @@ "section": "def-server.CoreSetup", "text": "CoreSetup" }, - ", config: Readonly<{ encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", + ", config: Readonly<{ roles?: Readonly<{} & { enabled: boolean; allow: string[]; }> | undefined; encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -176,7 +176,7 @@ "section": "def-common.ByteSizeValue", "text": "ByteSizeValue" }, - "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>, logger: ", + "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>, logger: ", { "pluginId": "@kbn/logging", "scope": "common", @@ -192,7 +192,7 @@ "section": "def-server.PluginInitializerContext", "text": "PluginInitializerContext" }, - "; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", + " | undefined; encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -200,7 +200,7 @@ "section": "def-common.ByteSizeValue", "text": "ByteSizeValue" }, - "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>>]" + "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>>]" ], "path": "packages/kbn-reporting/export_types/csv/csv_searchsource.ts", "deprecated": false, @@ -565,7 +565,7 @@ "section": "def-server.CoreSetup", "text": "CoreSetup" }, - ", config: Readonly<{ encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", + ", config: Readonly<{ roles?: Readonly<{} & { enabled: boolean; allow: string[]; }> | undefined; encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -573,7 +573,7 @@ "section": "def-common.ByteSizeValue", "text": "ByteSizeValue" }, - "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>, logger: ", + "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>, logger: ", { "pluginId": "@kbn/logging", "scope": "common", @@ -589,7 +589,7 @@ "section": "def-server.PluginInitializerContext", "text": "PluginInitializerContext" }, - "; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", + " | undefined; encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -597,7 +597,7 @@ "section": "def-common.ByteSizeValue", "text": "ByteSizeValue" }, - "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>>]" + "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>>]" ], "path": "packages/kbn-reporting/export_types/csv/csv_v2.ts", "deprecated": false, diff --git a/api_docs/kbn_reporting_export_types_csv.mdx b/api_docs/kbn_reporting_export_types_csv.mdx index 3835244d6238a..dc38c6c3651fb 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-12-02 +date: 2024-12-05 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 2a10df30ec442..45bc0829b4beb 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-12-02 +date: 2024-12-05 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.devdocs.json b/api_docs/kbn_reporting_export_types_pdf.devdocs.json index f0fb7f203f946..a3f6183280b45 100644 --- a/api_docs/kbn_reporting_export_types_pdf.devdocs.json +++ b/api_docs/kbn_reporting_export_types_pdf.devdocs.json @@ -176,7 +176,7 @@ "section": "def-server.CoreSetup", "text": "CoreSetup" }, - ", config: Readonly<{ encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", + ", config: Readonly<{ roles?: Readonly<{} & { enabled: boolean; allow: string[]; }> | undefined; encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -184,7 +184,7 @@ "section": "def-common.ByteSizeValue", "text": "ByteSizeValue" }, - "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>, logger: ", + "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>, logger: ", { "pluginId": "@kbn/logging", "scope": "common", @@ -200,7 +200,7 @@ "section": "def-server.PluginInitializerContext", "text": "PluginInitializerContext" }, - "; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", + " | undefined; encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -208,7 +208,7 @@ "section": "def-common.ByteSizeValue", "text": "ByteSizeValue" }, - "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>>]" + "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>>]" ], "path": "packages/kbn-reporting/export_types/pdf/printable_pdf_v2.ts", "deprecated": false, @@ -597,7 +597,7 @@ "section": "def-server.CoreSetup", "text": "CoreSetup" }, - ", config: Readonly<{ encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", + ", config: Readonly<{ roles?: Readonly<{} & { enabled: boolean; allow: string[]; }> | undefined; encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -605,7 +605,7 @@ "section": "def-common.ByteSizeValue", "text": "ByteSizeValue" }, - "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>, logger: ", + "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>, logger: ", { "pluginId": "@kbn/logging", "scope": "common", @@ -621,7 +621,7 @@ "section": "def-server.PluginInitializerContext", "text": "PluginInitializerContext" }, - "; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", + " | undefined; encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -629,7 +629,7 @@ "section": "def-common.ByteSizeValue", "text": "ByteSizeValue" }, - "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>>]" + "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>>]" ], "path": "packages/kbn-reporting/export_types/pdf/printable_pdf.ts", "deprecated": false, diff --git a/api_docs/kbn_reporting_export_types_pdf.mdx b/api_docs/kbn_reporting_export_types_pdf.mdx index 4eb7ebbd8ee83..d660d1b5a78d6 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-12-02 +date: 2024-12-05 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 c963f9b270d0d..610546d2d5c1b 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-12-02 +date: 2024-12-05 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.devdocs.json b/api_docs/kbn_reporting_export_types_png.devdocs.json index 99fb9ba2966b3..022be1c0e97c3 100644 --- a/api_docs/kbn_reporting_export_types_png.devdocs.json +++ b/api_docs/kbn_reporting_export_types_png.devdocs.json @@ -176,7 +176,7 @@ "section": "def-server.CoreSetup", "text": "CoreSetup" }, - ", config: Readonly<{ encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", + ", config: Readonly<{ roles?: Readonly<{} & { enabled: boolean; allow: string[]; }> | undefined; encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -184,7 +184,7 @@ "section": "def-common.ByteSizeValue", "text": "ByteSizeValue" }, - "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>, logger: ", + "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>, logger: ", { "pluginId": "@kbn/logging", "scope": "common", @@ -200,7 +200,7 @@ "section": "def-server.PluginInitializerContext", "text": "PluginInitializerContext" }, - "; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", + " | undefined; encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -208,7 +208,7 @@ "section": "def-common.ByteSizeValue", "text": "ByteSizeValue" }, - "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>>]" + "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>>]" ], "path": "packages/kbn-reporting/export_types/png/png_v2.ts", "deprecated": false, diff --git a/api_docs/kbn_reporting_export_types_png.mdx b/api_docs/kbn_reporting_export_types_png.mdx index 723b6bb4ce6e0..77eed3e73b29a 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-12-02 +date: 2024-12-05 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 e133e81d32c54..b3006c504bc4b 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-12-02 +date: 2024-12-05 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.devdocs.json b/api_docs/kbn_reporting_mocks_server.devdocs.json index 2ad48d68483b0..9fd240d87c90e 100644 --- a/api_docs/kbn_reporting_mocks_server.devdocs.json +++ b/api_docs/kbn_reporting_mocks_server.devdocs.json @@ -29,7 +29,7 @@ "signature": [ "(overrides?: ", "_DeepPartialObject", - "; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", + " | undefined; encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -37,7 +37,7 @@ "section": "def-common.ByteSizeValue", "text": "ByteSizeValue" }, - "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>>) => Readonly<{ encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", + "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>>) => Readonly<{ roles?: Readonly<{} & { enabled: boolean; allow: string[]; }> | undefined; encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -45,7 +45,7 @@ "section": "def-common.ByteSizeValue", "text": "ByteSizeValue" }, - "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>" + "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>" ], "path": "packages/kbn-reporting/mocks_server/index.ts", "deprecated": false, @@ -60,7 +60,7 @@ "description": [], "signature": [ "_DeepPartialObject", - "; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", + " | undefined; encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -68,7 +68,7 @@ "section": "def-common.ByteSizeValue", "text": "ByteSizeValue" }, - "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>>" + "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>>" ], "path": "packages/kbn-reporting/mocks_server/index.ts", "deprecated": false, diff --git a/api_docs/kbn_reporting_mocks_server.mdx b/api_docs/kbn_reporting_mocks_server.mdx index f016832605129..69bb64193e5b3 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-12-02 +date: 2024-12-05 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.devdocs.json b/api_docs/kbn_reporting_public.devdocs.json index a57898a72dd7b..474ecf1139f3e 100644 --- a/api_docs/kbn_reporting_public.devdocs.json +++ b/api_docs/kbn_reporting_public.devdocs.json @@ -1710,20 +1710,6 @@ "deprecated": false, "trackAdoption": false }, - { - "parentPluginId": "@kbn/reporting-public", - "id": "def-public.ClientConfigType.roles", - "type": "Object", - "tags": [], - "label": "roles", - "description": [], - "signature": [ - "{ enabled: boolean; }" - ], - "path": "packages/kbn-reporting/public/types.ts", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "@kbn/reporting-public", "id": "def-public.ClientConfigType.export_types", diff --git a/api_docs/kbn_reporting_public.mdx b/api_docs/kbn_reporting_public.mdx index ac0b07e61c9ea..77353bf28dc64 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-public'] --- import kbnReportingPublicObj from './kbn_reporting_public.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 | |-------------------|-----------|------------------------|-----------------| -| 111 | 0 | 104 | 2 | +| 110 | 0 | 103 | 2 | ## Client diff --git a/api_docs/kbn_reporting_server.devdocs.json b/api_docs/kbn_reporting_server.devdocs.json index 29373857cb9db..0a7505bde41b5 100644 --- a/api_docs/kbn_reporting_server.devdocs.json +++ b/api_docs/kbn_reporting_server.devdocs.json @@ -416,7 +416,7 @@ "label": "config", "description": [], "signature": [ - "Readonly<{ encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", + "Readonly<{ roles?: Readonly<{} & { enabled: boolean; allow: string[]; }> | undefined; encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -424,7 +424,7 @@ "section": "def-common.ByteSizeValue", "text": "ByteSizeValue" }, - "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>" + "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>" ], "path": "packages/kbn-reporting/server/export_type.ts", "deprecated": false, @@ -467,7 +467,7 @@ "section": "def-server.PluginInitializerContext", "text": "PluginInitializerContext" }, - "; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", + " | undefined; encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -475,7 +475,7 @@ "section": "def-common.ByteSizeValue", "text": "ByteSizeValue" }, - "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>>" + "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>>" ], "path": "packages/kbn-reporting/server/export_type.ts", "deprecated": false, @@ -949,7 +949,7 @@ "label": "getFullRedirectAppUrl", "description": [], "signature": [ - "(config: Readonly<{ encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", + "(config: Readonly<{ roles?: Readonly<{} & { enabled: boolean; allow: string[]; }> | undefined; encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -957,7 +957,7 @@ "section": "def-common.ByteSizeValue", "text": "ByteSizeValue" }, - "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>, serverInfo: ", + "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>, serverInfo: ", "ReportingServerInfo", ", spaceId: string | undefined, forceNow: string | undefined) => string" ], @@ -973,7 +973,7 @@ "label": "config", "description": [], "signature": [ - "Readonly<{ encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", + "Readonly<{ roles?: Readonly<{} & { enabled: boolean; allow: string[]; }> | undefined; encryptionKey?: string | undefined; } & { enabled: boolean; csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -981,7 +981,7 @@ "section": "def-common.ByteSizeValue", "text": "ByteSizeValue" }, - "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>" + "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; capture: Readonly<{} & { maxAttempts: number; }>; kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; statefulSettings: Readonly<{} & { enabled: boolean; }>; }>" ], "path": "packages/kbn-reporting/server/get_full_redirect_app_url.ts", "deprecated": false, @@ -1320,24 +1320,6 @@ } ], "returnComment": [] - }, - { - "parentPluginId": "@kbn/reporting-server", - "id": "def-server.ReportingServerPluginSetup.usesUiCapabilities", - "type": "Function", - "tags": [], - "label": "usesUiCapabilities", - "description": [ - "\nUsed to inform plugins if Reporting config is compatible with UI Capabilities / Application Sub-Feature Controls" - ], - "signature": [ - "() => boolean" - ], - "path": "packages/kbn-reporting/server/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] } ], "initialIsOpen": false @@ -1661,7 +1643,7 @@ "label": "ReportingConfigType", "description": [], "signature": [ - "{ readonly encryptionKey?: string | undefined; readonly enabled: boolean; readonly csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", + "{ readonly roles?: Readonly<{} & { enabled: boolean; allow: string[]; }> | undefined; readonly encryptionKey?: string | undefined; readonly enabled: boolean; readonly csv: Readonly<{ enablePanelActionDownload?: boolean | undefined; } & { scroll: Readonly<{} & { size: number; duration: string; strategy: \"scroll\" | \"pit\"; }>; checkForFormulas: boolean; escapeFormulaValues: boolean; maxSizeBytes: number | ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -1669,7 +1651,7 @@ "section": "def-common.ByteSizeValue", "text": "ByteSizeValue" }, - "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; readonly capture: Readonly<{} & { maxAttempts: number; }>; readonly roles: Readonly<{} & { enabled: boolean; allow: string[]; }>; readonly kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; readonly queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; readonly poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; readonly export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; readonly statefulSettings: Readonly<{} & { enabled: boolean; }>; }" + "; useByteOrderMarkEncoding: boolean; maxConcurrentShardRequests: number; }>; readonly capture: Readonly<{} & { maxAttempts: number; }>; readonly kibanaServer: Readonly<{ hostname?: string | undefined; protocol?: string | undefined; port?: number | undefined; } & {}>; readonly queue: Readonly<{} & { timeout: number | moment.Duration; pollInterval: number | moment.Duration; indexInterval: string; pollEnabled: boolean; pollIntervalErrorMultiplier: number; }>; readonly poll: Readonly<{} & { jobCompletionNotifier: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; jobsRefresh: Readonly<{} & { interval: number; intervalErrorMultiplier: number; }>; }>; readonly export_types: Readonly<{} & { csv: Readonly<{} & { enabled: boolean; }>; png: Readonly<{} & { enabled: boolean; }>; pdf: Readonly<{} & { enabled: boolean; }>; }>; readonly statefulSettings: Readonly<{} & { enabled: boolean; }>; }" ], "path": "packages/kbn-reporting/server/types.ts", "deprecated": false, @@ -2026,26 +2008,10 @@ "pluginId": "@kbn/config-schema", "scope": "common", "docId": "kibKbnConfigSchemaPluginApi", - "section": "def-common.ObjectType", - "text": "ObjectType" - }, - "<{ enabled: ", - { - "pluginId": "@kbn/config-schema", - "scope": "common", - "docId": "kibKbnConfigSchemaPluginApi", - "section": "def-common.ConditionalType", - "text": "ConditionalType" - }, - "; allow: ", - { - "pluginId": "@kbn/config-schema", - "scope": "common", - "docId": "kibKbnConfigSchemaPluginApi", - "section": "def-common.ConditionalType", - "text": "ConditionalType" + "section": "def-common.Type", + "text": "Type" }, - "; }>; poll: ", + " | undefined>; poll: ", { "pluginId": "@kbn/config-schema", "scope": "common", diff --git a/api_docs/kbn_reporting_server.mdx b/api_docs/kbn_reporting_server.mdx index 265518fc2b1a7..ef3d16faa98a0 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-12-02 +date: 2024-12-05 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 | |-------------------|-----------|------------------------|-----------------| -| 92 | 0 | 91 | 0 | +| 91 | 0 | 91 | 0 | ## Server diff --git a/api_docs/kbn_resizable_layout.mdx b/api_docs/kbn_resizable_layout.mdx index 8d8efef5a3dcd..97c54324476a5 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/resizable-layout'] --- import kbnResizableLayoutObj from './kbn_resizable_layout.devdocs.json'; diff --git a/api_docs/kbn_response_ops_feature_flag_service.mdx b/api_docs/kbn_response_ops_feature_flag_service.mdx index 19f044a6c2db1..c327a15a73770 100644 --- a/api_docs/kbn_response_ops_feature_flag_service.mdx +++ b/api_docs/kbn_response_ops_feature_flag_service.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-response-ops-feature-flag-service title: "@kbn/response-ops-feature-flag-service" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/response-ops-feature-flag-service plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/response-ops-feature-flag-service'] --- import kbnResponseOpsFeatureFlagServiceObj from './kbn_response_ops_feature_flag_service.devdocs.json'; diff --git a/api_docs/kbn_response_ops_rule_form.devdocs.json b/api_docs/kbn_response_ops_rule_form.devdocs.json new file mode 100644 index 0000000000000..b163e043f7950 --- /dev/null +++ b/api_docs/kbn_response_ops_rule_form.devdocs.json @@ -0,0 +1,3095 @@ +{ + "id": "@kbn/response-ops-rule-form", + "client": { + "classes": [], + "functions": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.createRule", + "type": "Function", + "tags": [], + "label": "createRule", + "description": [], + "signature": [ + "({\n http,\n rule,\n}: { http: ", + { + "pluginId": "@kbn/core-http-browser", + "scope": "public", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-public.HttpSetup", + "text": "HttpSetup" + }, + "; rule: ", + { + "pluginId": "@kbn/response-ops-rule-form", + "scope": "public", + "docId": "kibKbnResponseOpsRuleFormPluginApi", + "section": "def-public.CreateRuleBody", + "text": "CreateRuleBody" + }, + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">; }) => Promise<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.Rule", + "text": "Rule" + }, + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">>" + ], + "path": "packages/response-ops/rule_form/src/common/apis/create_rule/create_rule.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.createRule.$1", + "type": "Object", + "tags": [], + "label": "{\n http,\n rule,\n}", + "description": [], + "path": "packages/response-ops/rule_form/src/common/apis/create_rule/create_rule.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.createRule.$1.http", + "type": "Object", + "tags": [], + "label": "http", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-browser", + "scope": "public", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-public.HttpSetup", + "text": "HttpSetup" + } + ], + "path": "packages/response-ops/rule_form/src/common/apis/create_rule/create_rule.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.createRule.$1.rule", + "type": "Object", + "tags": [], + "label": "rule", + "description": [], + "signature": [ + { + "pluginId": "@kbn/response-ops-rule-form", + "scope": "public", + "docId": "kibKbnResponseOpsRuleFormPluginApi", + "section": "def-public.CreateRuleBody", + "text": "CreateRuleBody" + }, + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">" + ], + "path": "packages/response-ops/rule_form/src/common/apis/create_rule/create_rule.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.fetchUiConfig", + "type": "Function", + "tags": [], + "label": "fetchUiConfig", + "description": [], + "signature": [ + "({ http }: { http: ", + { + "pluginId": "@kbn/core-http-browser", + "scope": "public", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-public.HttpSetup", + "text": "HttpSetup" + }, + "; }) => Promise<", + "UiConfig", + ">" + ], + "path": "packages/response-ops/rule_form/src/common/apis/fetch_ui_config/fetch_ui_config.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.fetchUiConfig.$1", + "type": "Object", + "tags": [], + "label": "{ http }", + "description": [], + "path": "packages/response-ops/rule_form/src/common/apis/fetch_ui_config/fetch_ui_config.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.fetchUiConfig.$1.http", + "type": "Object", + "tags": [], + "label": "http", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-browser", + "scope": "public", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-public.HttpSetup", + "text": "HttpSetup" + } + ], + "path": "packages/response-ops/rule_form/src/common/apis/fetch_ui_config/fetch_ui_config.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.resolveRule", + "type": "Function", + "tags": [], + "label": "resolveRule", + "description": [], + "signature": [ + "({\n http,\n id,\n}: { http: ", + { + "pluginId": "@kbn/core-http-browser", + "scope": "public", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-public.HttpSetup", + "text": "HttpSetup" + }, + "; id: string; }) => Promise<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.ResolvedRule", + "text": "ResolvedRule" + }, + ">" + ], + "path": "packages/response-ops/rule_form/src/common/apis/resolve_rule/resolve_rule.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.resolveRule.$1", + "type": "Object", + "tags": [], + "label": "{\n http,\n id,\n}", + "description": [], + "path": "packages/response-ops/rule_form/src/common/apis/resolve_rule/resolve_rule.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.resolveRule.$1.http", + "type": "Object", + "tags": [], + "label": "http", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-browser", + "scope": "public", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-public.HttpSetup", + "text": "HttpSetup" + } + ], + "path": "packages/response-ops/rule_form/src/common/apis/resolve_rule/resolve_rule.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.resolveRule.$1.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "packages/response-ops/rule_form/src/common/apis/resolve_rule/resolve_rule.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleActionsAlertsFilter", + "type": "Function", + "tags": [], + "label": "RuleActionsAlertsFilter", + "description": [], + "signature": [ + "({ action, onChange, appName, ruleTypeId, plugins: propsPlugins, }: ", + "RuleActionsAlertsFilterProps", + ") => React.JSX.Element" + ], + "path": "packages/response-ops/rule_form/src/rule_actions/rule_actions_alerts_filter.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleActionsAlertsFilter.$1", + "type": "Object", + "tags": [], + "label": "{\n action,\n onChange,\n appName,\n ruleTypeId,\n plugins: propsPlugins,\n}", + "description": [], + "signature": [ + "RuleActionsAlertsFilterProps" + ], + "path": "packages/response-ops/rule_form/src/rule_actions/rule_actions_alerts_filter.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleActionsAlertsFilterTimeframe", + "type": "Function", + "tags": [], + "label": "RuleActionsAlertsFilterTimeframe", + "description": [], + "signature": [ + "({ action, settings, onChange, }: ", + "RuleActionsAlertsFilterTimeframeProps", + ") => React.JSX.Element" + ], + "path": "packages/response-ops/rule_form/src/rule_actions/rule_actions_alerts_filter_timeframe.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleActionsAlertsFilterTimeframe.$1", + "type": "Object", + "tags": [], + "label": "{\n action,\n settings,\n onChange,\n}", + "description": [], + "signature": [ + "RuleActionsAlertsFilterTimeframeProps" + ], + "path": "packages/response-ops/rule_form/src/rule_actions/rule_actions_alerts_filter_timeframe.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleActionsNotifyWhen", + "type": "Function", + "tags": [], + "label": "RuleActionsNotifyWhen", + "description": [], + "signature": [ + "({ hasAlertsMappings, frequency, throttle, throttleUnit, showMinimumThrottleWarning, showMinimumThrottleUnitWarning, notifyWhenSelectOptions, onChange, onUseDefaultMessage, }: ", + "RuleActionsNotifyWhenProps", + ") => React.JSX.Element" + ], + "path": "packages/response-ops/rule_form/src/rule_actions/rule_actions_notify_when.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleActionsNotifyWhen.$1", + "type": "Object", + "tags": [], + "label": "{\n hasAlertsMappings,\n frequency = DEFAULT_FREQUENCY,\n throttle,\n throttleUnit,\n showMinimumThrottleWarning,\n showMinimumThrottleUnitWarning,\n notifyWhenSelectOptions = NOTIFY_WHEN_OPTIONS,\n onChange,\n onUseDefaultMessage,\n}", + "description": [], + "signature": [ + "RuleActionsNotifyWhenProps" + ], + "path": "packages/response-ops/rule_form/src/rule_actions/rule_actions_notify_when.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleForm", + "type": "Function", + "tags": [], + "label": "RuleForm", + "description": [], + "signature": [ + "(props: ", + "RuleFormProps", + ") => React.JSX.Element" + ], + "path": "packages/response-ops/rule_form/src/rule_form.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleForm.$1", + "type": "Object", + "tags": [], + "label": "props", + "description": [], + "signature": [ + "RuleFormProps" + ], + "path": "packages/response-ops/rule_form/src/rule_form.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeModalComponent", + "type": "Function", + "tags": [], + "label": "RuleTypeModalComponent", + "description": [], + "signature": [ + "({ http, toasts, filteredRuleTypes, registeredRuleTypes, ...rest }: ", + "RuleTypeModalComponentProps", + ") => React.JSX.Element" + ], + "path": "packages/response-ops/rule_form/src/rule_type_modal/components/index.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeModalComponent.$1", + "type": "Object", + "tags": [], + "label": "{\n http,\n toasts,\n filteredRuleTypes = EMPTY_ARRAY,\n registeredRuleTypes,\n ...rest\n}", + "description": [], + "signature": [ + "RuleTypeModalComponentProps" + ], + "path": "packages/response-ops/rule_form/src/rule_type_modal/components/index.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.transformCreateRuleBody", + "type": "Function", + "tags": [], + "label": "transformCreateRuleBody", + "description": [], + "signature": [ + "({ ruleTypeId, actions, alertDelay, flapping, ...res }: ", + { + "pluginId": "@kbn/response-ops-rule-form", + "scope": "public", + "docId": "kibKbnResponseOpsRuleFormPluginApi", + "section": "def-public.CreateRuleBody", + "text": "CreateRuleBody" + }, + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">) => any" + ], + "path": "packages/response-ops/rule_form/src/common/apis/create_rule/transform_create_rule_body.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.transformCreateRuleBody.$1", + "type": "Object", + "tags": [], + "label": "{\n ruleTypeId,\n actions = [],\n alertDelay,\n flapping,\n ...res\n}", + "description": [], + "signature": [ + { + "pluginId": "@kbn/response-ops-rule-form", + "scope": "public", + "docId": "kibKbnResponseOpsRuleFormPluginApi", + "section": "def-public.CreateRuleBody", + "text": "CreateRuleBody" + }, + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">" + ], + "path": "packages/response-ops/rule_form/src/common/apis/create_rule/transform_create_rule_body.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.transformUpdateRuleBody", + "type": "Function", + "tags": [], + "label": "transformUpdateRuleBody", + "description": [], + "signature": [ + "({ actions, alertDelay, flapping, ...res }: ", + "UpdateRuleBody", + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">) => any" + ], + "path": "packages/response-ops/rule_form/src/common/apis/update_rule/transform_update_rule_body.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.transformUpdateRuleBody.$1", + "type": "Object", + "tags": [], + "label": "{\n actions = [],\n alertDelay,\n flapping,\n ...res\n}", + "description": [], + "signature": [ + "UpdateRuleBody", + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">" + ], + "path": "packages/response-ops/rule_form/src/common/apis/update_rule/transform_update_rule_body.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.updateRule", + "type": "Function", + "tags": [], + "label": "updateRule", + "description": [], + "signature": [ + "({\n http,\n rule,\n id,\n}: { http: ", + { + "pluginId": "@kbn/core-http-browser", + "scope": "public", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-public.HttpSetup", + "text": "HttpSetup" + }, + "; rule: ", + "UpdateRuleBody", + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">; id: string; }) => Promise<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.Rule", + "text": "Rule" + }, + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">>" + ], + "path": "packages/response-ops/rule_form/src/common/apis/update_rule/update_rule.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.updateRule.$1", + "type": "Object", + "tags": [], + "label": "{\n http,\n rule,\n id,\n}", + "description": [], + "path": "packages/response-ops/rule_form/src/common/apis/update_rule/update_rule.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.updateRule.$1.http", + "type": "Object", + "tags": [], + "label": "http", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-browser", + "scope": "public", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-public.HttpSetup", + "text": "HttpSetup" + } + ], + "path": "packages/response-ops/rule_form/src/common/apis/update_rule/update_rule.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.updateRule.$1.rule", + "type": "Object", + "tags": [], + "label": "rule", + "description": [], + "signature": [ + "UpdateRuleBody", + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">" + ], + "path": "packages/response-ops/rule_form/src/common/apis/update_rule/update_rule.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.updateRule.$1.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "packages/response-ops/rule_form/src/common/apis/update_rule/update_rule.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.CreateRuleBody", + "type": "Interface", + "tags": [], + "label": "CreateRuleBody", + "description": [], + "signature": [ + { + "pluginId": "@kbn/response-ops-rule-form", + "scope": "public", + "docId": "kibKbnResponseOpsRuleFormPluginApi", + "section": "def-public.CreateRuleBody", + "text": "CreateRuleBody" + }, + "" + ], + "path": "packages/response-ops/rule_form/src/common/apis/create_rule/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.CreateRuleBody.name", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "path": "packages/response-ops/rule_form/src/common/apis/create_rule/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.CreateRuleBody.ruleTypeId", + "type": "string", + "tags": [], + "label": "ruleTypeId", + "description": [], + "path": "packages/response-ops/rule_form/src/common/apis/create_rule/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.CreateRuleBody.enabled", + "type": "boolean", + "tags": [], + "label": "enabled", + "description": [], + "path": "packages/response-ops/rule_form/src/common/apis/create_rule/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.CreateRuleBody.consumer", + "type": "string", + "tags": [], + "label": "consumer", + "description": [], + "path": "packages/response-ops/rule_form/src/common/apis/create_rule/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.CreateRuleBody.tags", + "type": "Array", + "tags": [], + "label": "tags", + "description": [], + "signature": [ + "string[]" + ], + "path": "packages/response-ops/rule_form/src/common/apis/create_rule/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.CreateRuleBody.params", + "type": "Uncategorized", + "tags": [], + "label": "params", + "description": [], + "signature": [ + "Params" + ], + "path": "packages/response-ops/rule_form/src/common/apis/create_rule/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.CreateRuleBody.schedule", + "type": "Object", + "tags": [], + "label": "schedule", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.IntervalSchedule", + "text": "IntervalSchedule" + } + ], + "path": "packages/response-ops/rule_form/src/common/apis/create_rule/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.CreateRuleBody.actions", + "type": "Array", + "tags": [], + "label": "actions", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleUiAction", + "text": "RuleUiAction" + }, + "[]" + ], + "path": "packages/response-ops/rule_form/src/common/apis/create_rule/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.CreateRuleBody.throttle", + "type": "CompoundType", + "tags": [], + "label": "throttle", + "description": [], + "signature": [ + "string | null | undefined" + ], + "path": "packages/response-ops/rule_form/src/common/apis/create_rule/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.CreateRuleBody.notifyWhen", + "type": "CompoundType", + "tags": [], + "label": "notifyWhen", + "description": [], + "signature": [ + "\"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\" | null | undefined" + ], + "path": "packages/response-ops/rule_form/src/common/apis/create_rule/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.CreateRuleBody.alertDelay", + "type": "CompoundType", + "tags": [], + "label": "alertDelay", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.AlertDelay", + "text": "AlertDelay" + }, + " | null | undefined" + ], + "path": "packages/response-ops/rule_form/src/common/apis/create_rule/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.CreateRuleBody.flapping", + "type": "CompoundType", + "tags": [], + "label": "flapping", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.Flapping", + "text": "Flapping" + }, + " | null | undefined" + ], + "path": "packages/response-ops/rule_form/src/common/apis/create_rule/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.MinimumScheduleInterval", + "type": "Interface", + "tags": [], + "label": "MinimumScheduleInterval", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.MinimumScheduleInterval.value", + "type": "string", + "tags": [], + "label": "value", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.MinimumScheduleInterval.enforce", + "type": "boolean", + "tags": [], + "label": "enforce", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormActionsErrors", + "type": "Interface", + "tags": [], + "label": "RuleFormActionsErrors", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormActionsErrors.filterQuery", + "type": "Array", + "tags": [], + "label": "filterQuery", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormBaseErrors", + "type": "Interface", + "tags": [], + "label": "RuleFormBaseErrors", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormBaseErrors.name", + "type": "Array", + "tags": [], + "label": "name", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormBaseErrors.interval", + "type": "Array", + "tags": [], + "label": "interval", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormBaseErrors.consumer", + "type": "Array", + "tags": [], + "label": "consumer", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormBaseErrors.ruleTypeId", + "type": "Array", + "tags": [], + "label": "ruleTypeId", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormBaseErrors.actionConnectors", + "type": "Array", + "tags": [], + "label": "actionConnectors", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormBaseErrors.alertDelay", + "type": "Array", + "tags": [], + "label": "alertDelay", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormBaseErrors.tags", + "type": "Array", + "tags": [], + "label": "tags", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormData", + "type": "Interface", + "tags": [], + "label": "RuleFormData", + "description": [], + "signature": [ + { + "pluginId": "@kbn/response-ops-rule-form", + "scope": "public", + "docId": "kibKbnResponseOpsRuleFormPluginApi", + "section": "def-public.RuleFormData", + "text": "RuleFormData" + }, + "" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormData.name", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormData.tags", + "type": "Array", + "tags": [], + "label": "tags", + "description": [], + "signature": [ + "string[]" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormData.params", + "type": "Uncategorized", + "tags": [], + "label": "params", + "description": [], + "signature": [ + "Params" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormData.schedule", + "type": "Object", + "tags": [], + "label": "schedule", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.IntervalSchedule", + "text": "IntervalSchedule" + } + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormData.consumer", + "type": "string", + "tags": [], + "label": "consumer", + "description": [], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormData.actions", + "type": "Array", + "tags": [], + "label": "actions", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleUiAction", + "text": "RuleUiAction" + }, + "[]" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormData.alertDelay", + "type": "CompoundType", + "tags": [], + "label": "alertDelay", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.AlertDelay", + "text": "AlertDelay" + }, + " | null | undefined" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormData.notifyWhen", + "type": "CompoundType", + "tags": [], + "label": "notifyWhen", + "description": [], + "signature": [ + "\"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\" | null | undefined" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormData.ruleTypeId", + "type": "string", + "tags": [], + "label": "ruleTypeId", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormData.flapping", + "type": "CompoundType", + "tags": [], + "label": "flapping", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.Flapping", + "text": "Flapping" + }, + " | null | undefined" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormParamsErrors", + "type": "Interface", + "tags": [], + "label": "RuleFormParamsErrors", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormParamsErrors.Unnamed", + "type": "IndexSignature", + "tags": [], + "label": "[key: string]: string | string[] | RuleFormParamsErrors", + "description": [], + "signature": [ + "[key: string]: string | string[] | ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleFormParamsErrors", + "text": "RuleFormParamsErrors" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormPlugins", + "type": "Interface", + "tags": [], + "label": "RuleFormPlugins", + "description": [], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormPlugins.http", + "type": "Object", + "tags": [], + "label": "http", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-browser", + "scope": "public", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-public.HttpSetup", + "text": "HttpSetup" + } + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormPlugins.i18n", + "type": "Object", + "tags": [], + "label": "i18n", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-i18n-browser", + "scope": "public", + "docId": "kibKbnCoreI18nBrowserPluginApi", + "section": "def-public.I18nStart", + "text": "I18nStart" + } + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormPlugins.theme", + "type": "Object", + "tags": [], + "label": "theme", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-theme-browser", + "scope": "public", + "docId": "kibKbnCoreThemeBrowserPluginApi", + "section": "def-public.ThemeServiceSetup", + "text": "ThemeServiceSetup" + } + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormPlugins.application", + "type": "Object", + "tags": [], + "label": "application", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-application-browser", + "scope": "public", + "docId": "kibKbnCoreApplicationBrowserPluginApi", + "section": "def-public.ApplicationStart", + "text": "ApplicationStart" + } + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormPlugins.notifications", + "type": "Object", + "tags": [], + "label": "notifications", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-notifications-browser", + "scope": "public", + "docId": "kibKbnCoreNotificationsBrowserPluginApi", + "section": "def-public.NotificationsStart", + "text": "NotificationsStart" + } + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormPlugins.charts", + "type": "Object", + "tags": [], + "label": "charts", + "description": [], + "signature": [ + { + "pluginId": "charts", + "scope": "public", + "docId": "kibChartsPluginApi", + "section": "def-public.ChartsPluginSetup", + "text": "ChartsPluginSetup" + } + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormPlugins.settings", + "type": "Object", + "tags": [], + "label": "settings", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "public", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-public.SettingsStart", + "text": "SettingsStart" + } + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormPlugins.data", + "type": "Object", + "tags": [], + "label": "data", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "public", + "docId": "kibDataPluginApi", + "section": "def-public.DataPublicPluginStart", + "text": "DataPublicPluginStart" + } + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormPlugins.dataViews", + "type": "Object", + "tags": [], + "label": "dataViews", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "public", + "docId": "kibDataViewsPluginApi", + "section": "def-public.DataViewsServicePublic", + "text": "DataViewsServicePublic" + } + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormPlugins.unifiedSearch", + "type": "Object", + "tags": [], + "label": "unifiedSearch", + "description": [], + "signature": [ + { + "pluginId": "unifiedSearch", + "scope": "public", + "docId": "kibUnifiedSearchPluginApi", + "section": "def-public.UnifiedSearchPublicPluginStart", + "text": "UnifiedSearchPublicPluginStart" + } + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormPlugins.docLinks", + "type": "Object", + "tags": [], + "label": "docLinks", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-doc-links-browser", + "scope": "public", + "docId": "kibKbnCoreDocLinksBrowserPluginApi", + "section": "def-public.DocLinksStart", + "text": "DocLinksStart" + } + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormPlugins.ruleTypeRegistry", + "type": "Object", + "tags": [], + "label": "ruleTypeRegistry", + "description": [], + "signature": [ + "{ get: (id: string) => ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeModel", + "text": "RuleTypeModel" + }, + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">; list: () => ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeModel", + "text": "RuleTypeModel" + }, + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">[]; register: (objectType: ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeModel", + "text": "RuleTypeModel" + }, + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">) => void; has: (id: string) => boolean; }" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormPlugins.actionTypeRegistry", + "type": "Object", + "tags": [], + "label": "actionTypeRegistry", + "description": [], + "signature": [ + "{ get: (id: string) => ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.ActionTypeModel", + "text": "ActionTypeModel" + }, + "; list: () => ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.ActionTypeModel", + "text": "ActionTypeModel" + }, + "[]; register: (objectType: ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.ActionTypeModel", + "text": "ActionTypeModel" + }, + ") => void; has: (id: string) => boolean; }" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormState", + "type": "Interface", + "tags": [], + "label": "RuleFormState", + "description": [], + "signature": [ + { + "pluginId": "@kbn/response-ops-rule-form", + "scope": "public", + "docId": "kibKbnResponseOpsRuleFormPluginApi", + "section": "def-public.RuleFormState", + "text": "RuleFormState" + }, + "" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormState.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormState.formData", + "type": "Object", + "tags": [], + "label": "formData", + "description": [], + "signature": [ + { + "pluginId": "@kbn/response-ops-rule-form", + "scope": "public", + "docId": "kibKbnResponseOpsRuleFormPluginApi", + "section": "def-public.RuleFormData", + "text": "RuleFormData" + }, + "" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormState.plugins", + "type": "Object", + "tags": [], + "label": "plugins", + "description": [], + "signature": [ + { + "pluginId": "@kbn/response-ops-rule-form", + "scope": "public", + "docId": "kibKbnResponseOpsRuleFormPluginApi", + "section": "def-public.RuleFormPlugins", + "text": "RuleFormPlugins" + } + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormState.connectors", + "type": "Array", + "tags": [], + "label": "connectors", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.ActionConnector", + "text": "ActionConnector" + }, + ", Record>[]" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormState.connectorTypes", + "type": "Array", + "tags": [], + "label": "connectorTypes", + "description": [], + "signature": [ + { + "pluginId": "@kbn/actions-types", + "scope": "common", + "docId": "kibKbnActionsTypesPluginApi", + "section": "def-common.ActionType", + "text": "ActionType" + }, + "[]" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormState.aadTemplateFields", + "type": "Array", + "tags": [], + "label": "aadTemplateFields", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionVariable", + "text": "ActionVariable" + }, + "[]" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormState.availableRuleTypes", + "type": "Array", + "tags": [], + "label": "availableRuleTypes", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeWithDescription", + "text": "RuleTypeWithDescription" + }, + "[]" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormState.baseErrors", + "type": "Object", + "tags": [], + "label": "baseErrors", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleFormBaseErrors", + "text": "RuleFormBaseErrors" + }, + " | undefined" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormState.paramsErrors", + "type": "Object", + "tags": [], + "label": "paramsErrors", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleFormParamsErrors", + "text": "RuleFormParamsErrors" + }, + " | undefined" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormState.actionsErrors", + "type": "Object", + "tags": [], + "label": "actionsErrors", + "description": [], + "signature": [ + "Record | undefined" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormState.actionsParamsErrors", + "type": "Object", + "tags": [], + "label": "actionsParamsErrors", + "description": [], + "signature": [ + "Record | undefined" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormState.selectedRuleType", + "type": "CompoundType", + "tags": [], + "label": "selectedRuleType", + "description": [], + "signature": [ + { + "pluginId": "@kbn/triggers-actions-ui-types", + "scope": "common", + "docId": "kibKbnTriggersActionsUiTypesPluginApi", + "section": "def-common.RuleType", + "text": "RuleType" + }, + " & { description?: string | undefined; }" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormState.selectedRuleTypeModel", + "type": "Object", + "tags": [], + "label": "selectedRuleTypeModel", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeModel", + "text": "RuleTypeModel" + }, + "" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormState.multiConsumerSelection", + "type": "CompoundType", + "tags": [], + "label": "multiConsumerSelection", + "description": [], + "signature": [ + { + "pluginId": "@kbn/rule-data-utils", + "scope": "common", + "docId": "kibKbnRuleDataUtilsPluginApi", + "section": "def-common.RuleCreationValidConsumer", + "text": "RuleCreationValidConsumer" + }, + " | null | undefined" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormState.showMustacheAutocompleteSwitch", + "type": "CompoundType", + "tags": [], + "label": "showMustacheAutocompleteSwitch", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormState.metadata", + "type": "Object", + "tags": [], + "label": "metadata", + "description": [], + "signature": [ + "Record | undefined" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormState.minimumScheduleInterval", + "type": "Object", + "tags": [], + "label": "minimumScheduleInterval", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.MinimumScheduleInterval", + "text": "MinimumScheduleInterval" + }, + " | undefined" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormState.canShowConsumerSelection", + "type": "CompoundType", + "tags": [], + "label": "canShowConsumerSelection", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormState.validConsumers", + "type": "Array", + "tags": [], + "label": "validConsumers", + "description": [], + "signature": [ + { + "pluginId": "@kbn/rule-data-utils", + "scope": "common", + "docId": "kibKbnRuleDataUtilsPluginApi", + "section": "def-common.RuleCreationValidConsumer", + "text": "RuleCreationValidConsumer" + }, + "[]" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormState.flappingSettings", + "type": "CompoundType", + "tags": [], + "label": "flappingSettings", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.RulesSettingsFlapping", + "text": "RulesSettingsFlapping" + }, + " | undefined" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleFormState.touched", + "type": "CompoundType", + "tags": [], + "label": "touched", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeModel", + "type": "Interface", + "tags": [], + "label": "RuleTypeModel", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeModel", + "text": "RuleTypeModel" + }, + "" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeModel.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeModel.description", + "type": "string", + "tags": [], + "label": "description", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeModel.iconClass", + "type": "string", + "tags": [], + "label": "iconClass", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeModel.documentationUrl", + "type": "CompoundType", + "tags": [], + "label": "documentationUrl", + "description": [], + "signature": [ + "string | ((docLinks: ", + { + "pluginId": "@kbn/core-doc-links-browser", + "scope": "public", + "docId": "kibKbnCoreDocLinksBrowserPluginApi", + "section": "def-public.DocLinksStart", + "text": "DocLinksStart" + }, + ") => string) | null" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeModel.validate", + "type": "Function", + "tags": [], + "label": "validate", + "description": [], + "signature": [ + "(ruleParams: Params, isServerless?: boolean | undefined) => ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.ValidationResult", + "text": "ValidationResult" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeModel.validate.$1", + "type": "Uncategorized", + "tags": [], + "label": "ruleParams", + "description": [], + "signature": [ + "Params" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeModel.validate.$2", + "type": "CompoundType", + "tags": [], + "label": "isServerless", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeModel.ruleParamsExpression", + "type": "Function", + "tags": [], + "label": "ruleParamsExpression", + "description": [], + "signature": [ + "React.FunctionComponent | React.LazyExoticComponent, string>>>" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeModel.ruleParamsExpression.$1", + "type": "Uncategorized", + "tags": [], + "label": "props", + "description": [], + "signature": [ + "P" + ], + "path": "node_modules/@types/react/ts5.0/index.d.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeModel.requiresAppContext", + "type": "boolean", + "tags": [], + "label": "requiresAppContext", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeModel.defaultActionMessage", + "type": "string", + "tags": [], + "label": "defaultActionMessage", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeModel.defaultRecoveryMessage", + "type": "string", + "tags": [], + "label": "defaultRecoveryMessage", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeModel.defaultSummaryMessage", + "type": "string", + "tags": [], + "label": "defaultSummaryMessage", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeModel.alertDetailsAppSection", + "type": "CompoundType", + "tags": [], + "label": "alertDetailsAppSection", + "description": [], + "signature": [ + "React.FunctionComponent | React.LazyExoticComponent> | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParamsExpressionProps", + "type": "Interface", + "tags": [], + "label": "RuleTypeParamsExpressionProps", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeParamsExpressionProps", + "text": "RuleTypeParamsExpressionProps" + }, + "" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParamsExpressionProps.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParamsExpressionProps.ruleParams", + "type": "Uncategorized", + "tags": [], + "label": "ruleParams", + "description": [], + "signature": [ + "Params" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParamsExpressionProps.ruleInterval", + "type": "string", + "tags": [], + "label": "ruleInterval", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParamsExpressionProps.ruleThrottle", + "type": "string", + "tags": [], + "label": "ruleThrottle", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParamsExpressionProps.alertNotifyWhen", + "type": "CompoundType", + "tags": [], + "label": "alertNotifyWhen", + "description": [], + "signature": [ + "\"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParamsExpressionProps.setRuleParams", + "type": "Function", + "tags": [], + "label": "setRuleParams", + "description": [], + "signature": [ + "(property: Key, value: Params[Key] | undefined) => void" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParamsExpressionProps.setRuleParams.$1", + "type": "Uncategorized", + "tags": [], + "label": "property", + "description": [], + "signature": [ + "Key" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParamsExpressionProps.setRuleParams.$2", + "type": "Uncategorized", + "tags": [], + "label": "value", + "description": [], + "signature": [ + "Params[Key] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParamsExpressionProps.setRuleProperty", + "type": "Function", + "tags": [], + "label": "setRuleProperty", + "description": [], + "signature": [ + "(key: Prop, value: ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.SanitizedRule", + "text": "SanitizedRule" + }, + "[Prop] | null) => void" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParamsExpressionProps.setRuleProperty.$1", + "type": "Uncategorized", + "tags": [], + "label": "key", + "description": [], + "signature": [ + "Prop" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParamsExpressionProps.setRuleProperty.$2", + "type": "CompoundType", + "tags": [], + "label": "value", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.SanitizedRule", + "text": "SanitizedRule" + }, + "[Prop] | null" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParamsExpressionProps.onChangeMetaData", + "type": "Function", + "tags": [], + "label": "onChangeMetaData", + "description": [], + "signature": [ + "(metadata: MetaData) => void" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParamsExpressionProps.onChangeMetaData.$1", + "type": "Uncategorized", + "tags": [], + "label": "metadata", + "description": [], + "signature": [ + "MetaData" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParamsExpressionProps.errors", + "type": "Object", + "tags": [], + "label": "errors", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleFormParamsErrors", + "text": "RuleFormParamsErrors" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParamsExpressionProps.defaultActionGroupId", + "type": "string", + "tags": [], + "label": "defaultActionGroupId", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParamsExpressionProps.actionGroups", + "type": "Array", + "tags": [], + "label": "actionGroups", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ActionGroup", + "text": "ActionGroup" + }, + "[]" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParamsExpressionProps.metadata", + "type": "Uncategorized", + "tags": [], + "label": "metadata", + "description": [], + "signature": [ + "MetaData | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParamsExpressionProps.charts", + "type": "Object", + "tags": [], + "label": "charts", + "description": [], + "signature": [ + { + "pluginId": "charts", + "scope": "public", + "docId": "kibChartsPluginApi", + "section": "def-public.ChartsPluginSetup", + "text": "ChartsPluginSetup" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParamsExpressionProps.data", + "type": "Object", + "tags": [], + "label": "data", + "description": [], + "signature": [ + { + "pluginId": "data", + "scope": "public", + "docId": "kibDataPluginApi", + "section": "def-public.DataPublicPluginStart", + "text": "DataPublicPluginStart" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParamsExpressionProps.dataViews", + "type": "Object", + "tags": [], + "label": "dataViews", + "description": [], + "signature": [ + { + "pluginId": "dataViews", + "scope": "public", + "docId": "kibDataViewsPluginApi", + "section": "def-public.DataViewsServicePublic", + "text": "DataViewsServicePublic" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParamsExpressionProps.unifiedSearch", + "type": "Object", + "tags": [], + "label": "unifiedSearch", + "description": [], + "signature": [ + { + "pluginId": "unifiedSearch", + "scope": "public", + "docId": "kibUnifiedSearchPluginApi", + "section": "def-public.UnifiedSearchPublicPluginStart", + "text": "UnifiedSearchPublicPluginStart" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.ValidationResult", + "type": "Interface", + "tags": [], + "label": "ValidationResult", + "description": [], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.ValidationResult.errors", + "type": "Object", + "tags": [], + "label": "errors", + "description": [], + "signature": [ + "{ [x: string]: any; }" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.CREATE_RULE_ROUTE", + "type": "string", + "tags": [], + "label": "CREATE_RULE_ROUTE", + "description": [], + "signature": [ + "\"/rule/create/:ruleTypeId\"" + ], + "path": "packages/response-ops/rule_form/src/constants/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.EDIT_RULE_ROUTE", + "type": "string", + "tags": [], + "label": "EDIT_RULE_ROUTE", + "description": [], + "signature": [ + "\"/rule/edit/:id\"" + ], + "path": "packages/response-ops/rule_form/src/constants/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.InitialRule", + "type": "Type", + "tags": [], + "label": "InitialRule", + "description": [], + "signature": [ + "Partial<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.Rule", + "text": "Rule" + }, + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">> & Pick<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.Rule", + "text": "Rule" + }, + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">, \"params\" | \"consumer\" | \"actions\" | \"tags\" | \"schedule\">" + ], + "path": "packages/response-ops/rule_form/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.ResolvedRule", + "type": "Type", + "tags": [], + "label": "ResolvedRule", + "description": [], + "signature": [ + "Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.ResolvedSanitizedRule", + "text": "ResolvedSanitizedRule" + }, + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">, \"actions\" | \"alertTypeId\" | \"systemActions\"> & { ruleTypeId: string; actions: ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleUiAction", + "text": "RuleUiAction" + }, + "[]; }" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.Rule", + "type": "Type", + "tags": [], + "label": "Rule", + "description": [], + "signature": [ + "Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.SanitizedRule", + "text": "SanitizedRule" + }, + ", \"actions\" | \"alertTypeId\" | \"systemActions\"> & { ruleTypeId: string; actions: ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleUiAction", + "text": "RuleUiAction" + }, + "[]; }" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeIndexWithDescriptions", + "type": "Type", + "tags": [], + "label": "RuleTypeIndexWithDescriptions", + "description": [], + "signature": [ + "Map" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeParams", + "type": "Type", + "tags": [], + "label": "RuleTypeParams", + "description": [], + "signature": [ + "{ [x: string]: unknown; }" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeRegistryContract", + "type": "Type", + "tags": [], + "label": "RuleTypeRegistryContract", + "description": [], + "signature": [ + "{ get: (id: string) => ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeModel", + "text": "RuleTypeModel" + }, + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">; list: () => ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeModel", + "text": "RuleTypeModel" + }, + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">[]; register: (objectType: ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeModel", + "text": "RuleTypeModel" + }, + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">) => void; has: (id: string) => boolean; }" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleTypeWithDescription", + "type": "Type", + "tags": [], + "label": "RuleTypeWithDescription", + "description": [], + "signature": [ + { + "pluginId": "@kbn/triggers-actions-ui-types", + "scope": "common", + "docId": "kibKbnTriggersActionsUiTypesPluginApi", + "section": "def-common.RuleType", + "text": "RuleType" + }, + " & { description?: string | undefined; }" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.RuleUiAction", + "type": "Type", + "tags": [], + "label": "RuleUiAction", + "description": [], + "signature": [ + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.SanitizedRuleAction", + "text": "SanitizedRuleAction" + }, + " | ", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.RuleSystemAction", + "text": "RuleSystemAction" + } + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.SanitizedRule", + "type": "Type", + "tags": [], + "label": "SanitizedRule", + "description": [], + "signature": [ + "Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.SanitizedRule", + "text": "SanitizedRule" + }, + ", \"actions\" | \"alertTypeId\" | \"systemActions\"> & { ruleTypeId: string; actions: ", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleUiAction", + "text": "RuleUiAction" + }, + "[]; }" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.SanitizedRuleAction", + "type": "Type", + "tags": [], + "label": "SanitizedRuleAction", + "description": [], + "signature": [ + "Omit<", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.RuleAction", + "text": "RuleAction" + }, + ", \"alertsFilter\"> & { alertsFilter?: ", + { + "pluginId": "@kbn/alerting-types", + "scope": "common", + "docId": "kibKbnAlertingTypesPluginApi", + "section": "def-common.SanitizedAlertsFilter", + "text": "SanitizedAlertsFilter" + }, + " | undefined; }" + ], + "path": "packages/kbn-alerting-types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/response-ops-rule-form", + "id": "def-public.UPDATE_FIELDS_WITH_ACTIONS", + "type": "Array", + "tags": [], + "label": "UPDATE_FIELDS_WITH_ACTIONS", + "description": [], + "signature": [ + "(keyof ", + "UpdateRuleBody", + "<", + { + "pluginId": "@kbn/alerts-ui-shared", + "scope": "public", + "docId": "kibKbnAlertsUiSharedPluginApi", + "section": "def-public.RuleTypeParams", + "text": "RuleTypeParams" + }, + ">)[]" + ], + "path": "packages/response-ops/rule_form/src/common/apis/update_rule/update_rule.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_response_ops_rule_form.mdx b/api_docs/kbn_response_ops_rule_form.mdx new file mode 100644 index 0000000000000..50104b165a34e --- /dev/null +++ b/api_docs/kbn_response_ops_rule_form.mdx @@ -0,0 +1,36 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnResponseOpsRuleFormPluginApi +slug: /kibana-dev-docs/api/kbn-response-ops-rule-form +title: "@kbn/response-ops-rule-form" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/response-ops-rule-form plugin +date: 2024-12-05 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/response-ops-rule-form'] +--- +import kbnResponseOpsRuleFormObj from './kbn_response_ops_rule_form.devdocs.json'; + + + +Contact [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 157 | 0 | 156 | 7 | + +## Client + +### Functions + + +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/kbn_response_ops_rule_params.mdx b/api_docs/kbn_response_ops_rule_params.mdx index 8c68df72c90de..00169434f6cfb 100644 --- a/api_docs/kbn_response_ops_rule_params.mdx +++ b/api_docs/kbn_response_ops_rule_params.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-response-ops-rule-params title: "@kbn/response-ops-rule-params" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/response-ops-rule-params plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/response-ops-rule-params'] --- import kbnResponseOpsRuleParamsObj from './kbn_response_ops_rule_params.devdocs.json'; diff --git a/api_docs/kbn_rison.mdx b/api_docs/kbn_rison.mdx index d7d1e27a71590..67baf7e906292 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rison'] --- import kbnRisonObj from './kbn_rison.devdocs.json'; diff --git a/api_docs/kbn_rollup.mdx b/api_docs/kbn_rollup.mdx index 568b74bad29e0..acbc7bc7652da 100644 --- a/api_docs/kbn_rollup.mdx +++ b/api_docs/kbn_rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rollup title: "@kbn/rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rollup plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rollup'] --- import kbnRollupObj from './kbn_rollup.devdocs.json'; diff --git a/api_docs/kbn_router_to_openapispec.mdx b/api_docs/kbn_router_to_openapispec.mdx index 4f43fafb016f9..4a1b01ceb6fba 100644 --- a/api_docs/kbn_router_to_openapispec.mdx +++ b/api_docs/kbn_router_to_openapispec.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-router-to-openapispec title: "@kbn/router-to-openapispec" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/router-to-openapispec plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/router-to-openapispec'] --- import kbnRouterToOpenapispecObj from './kbn_router_to_openapispec.devdocs.json'; diff --git a/api_docs/kbn_router_utils.mdx b/api_docs/kbn_router_utils.mdx index ef7b4723be15f..29bdd119be031 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-12-02 +date: 2024-12-05 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 5b318a0fcdff9..acc5865ce9ba1 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rrule'] --- import kbnRruleObj from './kbn_rrule.devdocs.json'; diff --git a/api_docs/kbn_rule_data_utils.devdocs.json b/api_docs/kbn_rule_data_utils.devdocs.json index 20d8ad66f520a..4bf841aff9435 100644 --- a/api_docs/kbn_rule_data_utils.devdocs.json +++ b/api_docs/kbn_rule_data_utils.devdocs.json @@ -200,6 +200,41 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/rule-data-utils", + "id": "def-common.isSiemRuleType", + "type": "Function", + "tags": [], + "label": "isSiemRuleType", + "description": [ + "\nTODO: Remove when checks for specific rule type ids is not needed\nin the codebase." + ], + "signature": [ + "(ruleTypeId: string) => boolean" + ], + "path": "packages/kbn-rule-data-utils/src/alerts_as_data_rbac.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/rule-data-utils", + "id": "def-common.isSiemRuleType.$1", + "type": "string", + "tags": [], + "label": "ruleTypeId", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-rule-data-utils/src/alerts_as_data_rbac.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/rule-data-utils", "id": "def-common.isValidFeatureId", @@ -249,7 +284,23 @@ "type": "Enum", "tags": [], "label": "ApmRuleType", - "description": [], + "description": [ + "\nAPM rule types" + ], + "path": "packages/kbn-rule-data-utils/src/rule_types/o11y_rules.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/rule-data-utils", + "id": "def-common.InfraRuleType", + "type": "Enum", + "tags": [], + "label": "InfraRuleType", + "description": [ + "\nInfra rule types" + ], "path": "packages/kbn-rule-data-utils/src/rule_types/o11y_rules.ts", "deprecated": false, "trackAdoption": false, @@ -1615,7 +1666,7 @@ "label": "AlertConsumers", "description": [], "signature": [ - "\"ml\" | \"monitoring\" | \"uptime\" | \"siem\" | \"observability\" | \"stackAlerts\" | \"apm\" | \"logs\" | \"infrastructure\" | \"slo\" | \"AlertingExample\"" + "\"ml\" | \"monitoring\" | \"uptime\" | \"siem\" | \"observability\" | \"stackAlerts\" | \"alerts\" | \"apm\" | \"logs\" | \"infrastructure\" | \"slo\" | \"discover\" | \"AlertingExample\"" ], "path": "packages/kbn-rule-data-utils/src/alerts_as_data_rbac.ts", "deprecated": false, @@ -1652,6 +1703,28 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/rule-data-utils", + "id": "def-common.APM_RULE_TYPE_IDS", + "type": "Array", + "tags": [], + "label": "APM_RULE_TYPE_IDS", + "description": [], + "signature": [ + { + "pluginId": "@kbn/rule-data-utils", + "scope": "common", + "docId": "kibKbnRuleDataUtilsPluginApi", + "section": "def-common.ApmRuleType", + "text": "ApmRuleType" + }, + "[]" + ], + "path": "packages/kbn-rule-data-utils/src/rule_types/o11y_rules.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/rule-data-utils", "id": "def-common.createRuleRoute", @@ -1787,6 +1860,29 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/rule-data-utils", + "id": "def-common.INFRA_RULE_TYPE_IDS", + "type": "Array", + "tags": [], + "label": "INFRA_RULE_TYPE_IDS", + "description": [], + "signature": [ + "(string | ", + { + "pluginId": "@kbn/rule-data-utils", + "scope": "common", + "docId": "kibKbnRuleDataUtilsPluginApi", + "section": "def-common.InfraRuleType", + "text": "InfraRuleType" + }, + ")[]" + ], + "path": "packages/kbn-rule-data-utils/src/rule_types/o11y_rules.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/rule-data-utils", "id": "def-common.KIBANA_NAMESPACE", @@ -1802,13 +1898,30 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/rule-data-utils", + "id": "def-common.LOG_RULE_TYPE_IDS", + "type": "Array", + "tags": [], + "label": "LOG_RULE_TYPE_IDS", + "description": [], + "signature": [ + "string[]" + ], + "path": "packages/kbn-rule-data-utils/src/rule_types/o11y_rules.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/rule-data-utils", "id": "def-common.LOG_THRESHOLD_ALERT_TYPE_ID", "type": "string", "tags": [], "label": "LOG_THRESHOLD_ALERT_TYPE_ID", - "description": [], + "description": [ + "\nLogs rule types" + ], "signature": [ "\"logs.alert.document.count\"" ], @@ -1838,7 +1951,9 @@ "type": "string", "tags": [], "label": "METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID", - "description": [], + "description": [ + "\nMetrics rule types" + ], "signature": [ "\"metrics.alert.inventory.threshold\"" ], @@ -1877,6 +1992,29 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/rule-data-utils", + "id": "def-common.OBSERVABILITY_RULE_TYPE_IDS", + "type": "Array", + "tags": [], + "label": "OBSERVABILITY_RULE_TYPE_IDS", + "description": [], + "signature": [ + "(string | ", + { + "pluginId": "@kbn/rule-data-utils", + "scope": "common", + "docId": "kibKbnRuleDataUtilsPluginApi", + "section": "def-common.InfraRuleType", + "text": "InfraRuleType" + }, + ")[]" + ], + "path": "packages/kbn-rule-data-utils/src/rule_types/o11y_rules.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/rule-data-utils", "id": "def-common.OBSERVABILITY_THRESHOLD_RULE_TYPE_ID", @@ -1928,7 +2066,9 @@ "type": "string", "tags": [], "label": "SLO_BURN_RATE_RULE_TYPE_ID", - "description": [], + "description": [ + "\nSLO rule types" + ], "signature": [ "\"slo.rules.burnRate\"" ], @@ -1937,6 +2077,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/rule-data-utils", + "id": "def-common.SLO_RULE_TYPE_IDS", + "type": "Array", + "tags": [], + "label": "SLO_RULE_TYPE_IDS", + "description": [], + "signature": [ + "string[]" + ], + "path": "packages/kbn-rule-data-utils/src/rule_types/o11y_rules.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/rule-data-utils", "id": "def-common.SPACE_IDS", @@ -1967,6 +2122,23 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/rule-data-utils", + "id": "def-common.STACK_RULE_TYPE_IDS_SUPPORTED_BY_OBSERVABILITY", + "type": "Array", + "tags": [], + "label": "STACK_RULE_TYPE_IDS_SUPPORTED_BY_OBSERVABILITY", + "description": [ + "\nThese rule types are not the only stack rules. There are more.\nThe variable holds all stack rule types that support multiple\nconsumers aka the \"Role visibility\" UX dropdown." + ], + "signature": [ + "string[]" + ], + "path": "packages/kbn-rule-data-utils/src/rule_types/stack_rules.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/rule-data-utils", "id": "def-common.STATUS_VALUES", @@ -1982,13 +2154,30 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/rule-data-utils", + "id": "def-common.SYNTHETICS_RULE_TYPE_IDS", + "type": "Array", + "tags": [], + "label": "SYNTHETICS_RULE_TYPE_IDS", + "description": [], + "signature": [ + "string[]" + ], + "path": "packages/kbn-rule-data-utils/src/rule_types/o11y_rules.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/rule-data-utils", "id": "def-common.SYNTHETICS_STATUS_RULE", "type": "string", "tags": [], "label": "SYNTHETICS_STATUS_RULE", - "description": [], + "description": [ + "\nSynthetics ryle types" + ], "signature": [ "\"xpack.synthetics.alerts.monitorStatus\"" ], @@ -2072,6 +2261,23 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/rule-data-utils", + "id": "def-common.UPTIME_RULE_TYPE_IDS", + "type": "Array", + "tags": [], + "label": "UPTIME_RULE_TYPE_IDS", + "description": [ + "\nUptime rule types" + ], + "signature": [ + "string[]" + ], + "path": "packages/kbn-rule-data-utils/src/rule_types/o11y_rules.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/rule-data-utils", "id": "def-common.ValidFeatureId", @@ -2080,7 +2286,7 @@ "label": "ValidFeatureId", "description": [], "signature": [ - "\"ml\" | \"monitoring\" | \"uptime\" | \"siem\" | \"observability\" | \"stackAlerts\" | \"apm\" | \"logs\" | \"infrastructure\" | \"slo\" | \"AlertingExample\"" + "\"ml\" | \"monitoring\" | \"uptime\" | \"siem\" | \"observability\" | \"stackAlerts\" | \"alerts\" | \"apm\" | \"logs\" | \"infrastructure\" | \"slo\" | \"discover\" | \"AlertingExample\"" ], "path": "packages/kbn-rule-data-utils/src/alerts_as_data_rbac.ts", "deprecated": false, @@ -2129,12 +2335,48 @@ "\nregistering a new instance of the rule data client\nin a new plugin will require updating the below data structure\nto include the index name where the alerts as data will be written to." ], "signature": [ - "{ readonly APM: \"apm\"; readonly LOGS: \"logs\"; readonly INFRASTRUCTURE: \"infrastructure\"; readonly OBSERVABILITY: \"observability\"; readonly SLO: \"slo\"; readonly SIEM: \"siem\"; readonly UPTIME: \"uptime\"; readonly ML: \"ml\"; readonly STACK_ALERTS: \"stackAlerts\"; readonly EXAMPLE: \"AlertingExample\"; readonly MONITORING: \"monitoring\"; }" + "{ readonly APM: \"apm\"; readonly LOGS: \"logs\"; readonly INFRASTRUCTURE: \"infrastructure\"; readonly OBSERVABILITY: \"observability\"; readonly SLO: \"slo\"; readonly SIEM: \"siem\"; readonly UPTIME: \"uptime\"; readonly ML: \"ml\"; readonly STACK_ALERTS: \"stackAlerts\"; readonly EXAMPLE: \"AlertingExample\"; readonly MONITORING: \"monitoring\"; readonly ALERTS: \"alerts\"; readonly DISCOVER: \"discover\"; }" ], "path": "packages/kbn-rule-data-utils/src/alerts_as_data_rbac.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/rule-data-utils", + "id": "def-common.SYNTHETICS_ALERT_RULE_TYPES", + "type": "Object", + "tags": [], + "label": "SYNTHETICS_ALERT_RULE_TYPES", + "description": [], + "path": "packages/kbn-rule-data-utils/src/rule_types/o11y_rules.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/rule-data-utils", + "id": "def-common.SYNTHETICS_ALERT_RULE_TYPES.MONITOR_STATUS", + "type": "string", + "tags": [], + "label": "MONITOR_STATUS", + "description": [], + "path": "packages/kbn-rule-data-utils/src/rule_types/o11y_rules.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/rule-data-utils", + "id": "def-common.SYNTHETICS_ALERT_RULE_TYPES.TLS", + "type": "string", + "tags": [], + "label": "TLS", + "description": [], + "path": "packages/kbn-rule-data-utils/src/rule_types/o11y_rules.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false } ] } diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index 0a0493b670802..082a217ee7599 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] --- import kbnRuleDataUtilsObj from './kbn_rule_data_utils.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/security-detections-response](https://github.com/orgs/elastic/ | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 138 | 0 | 135 | 0 | +| 152 | 0 | 140 | 0 | ## Common diff --git a/api_docs/kbn_saved_objects_settings.mdx b/api_docs/kbn_saved_objects_settings.mdx index d83444e5efa3c..fe24e1ae6c654 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/saved-objects-settings'] --- import kbnSavedObjectsSettingsObj from './kbn_saved_objects_settings.devdocs.json'; diff --git a/api_docs/kbn_saved_search_component.mdx b/api_docs/kbn_saved_search_component.mdx index a87202fd82e6c..2b115579f37e4 100644 --- a/api_docs/kbn_saved_search_component.mdx +++ b/api_docs/kbn_saved_search_component.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-saved-search-component title: "@kbn/saved-search-component" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/saved-search-component plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/saved-search-component'] --- import kbnSavedSearchComponentObj from './kbn_saved_search_component.devdocs.json'; diff --git a/api_docs/kbn_scout.devdocs.json b/api_docs/kbn_scout.devdocs.json index 8766dbc9f9f4d..2ff2ea1d3c0d5 100644 --- a/api_docs/kbn_scout.devdocs.json +++ b/api_docs/kbn_scout.devdocs.json @@ -17,7 +17,1369 @@ "objects": [] }, "common": { - "classes": [], + "classes": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.Client", + "type": "Class", + "tags": [], + "label": "Client", + "description": [], + "signature": [ + "default", + " extends ", + "default" + ], + "path": "node_modules/@elastic/elasticsearch/lib/client.d.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.Client.diagnostic", + "type": "Object", + "tags": [], + "label": "diagnostic", + "description": [], + "signature": [ + "default" + ], + "path": "node_modules/@elastic/elasticsearch/lib/client.d.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.Client.name", + "type": "CompoundType", + "tags": [], + "label": "name", + "description": [], + "signature": [ + "string | symbol" + ], + "path": "node_modules/@elastic/elasticsearch/lib/client.d.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.Client.connectionPool", + "type": "Object", + "tags": [], + "label": "connectionPool", + "description": [], + "signature": [ + "default" + ], + "path": "node_modules/@elastic/elasticsearch/lib/client.d.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.Client.transport", + "type": "Object", + "tags": [], + "label": "transport", + "description": [], + "signature": [ + "default" + ], + "path": "node_modules/@elastic/elasticsearch/lib/client.d.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.Client.serializer", + "type": "Object", + "tags": [], + "label": "serializer", + "description": [], + "signature": [ + "default" + ], + "path": "node_modules/@elastic/elasticsearch/lib/client.d.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.Client.helpers", + "type": "Object", + "tags": [], + "label": "helpers", + "description": [], + "signature": [ + "default" + ], + "path": "node_modules/@elastic/elasticsearch/lib/client.d.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.Client.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "node_modules/@elastic/elasticsearch/lib/client.d.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.Client.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "opts", + "description": [], + "signature": [ + "ClientOptions" + ], + "path": "node_modules/@elastic/elasticsearch/lib/client.d.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.Client.child", + "type": "Function", + "tags": [], + "label": "child", + "description": [], + "signature": [ + "(opts: ", + "ClientOptions", + ") => ", + "default" + ], + "path": "node_modules/@elastic/elasticsearch/lib/client.d.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.Client.child.$1", + "type": "Object", + "tags": [], + "label": "opts", + "description": [], + "signature": [ + "ClientOptions" + ], + "path": "node_modules/@elastic/elasticsearch/lib/client.d.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.Client.close", + "type": "Function", + "tags": [], + "label": "close", + "description": [], + "signature": [ + "() => Promise" + ], + "path": "node_modules/@elastic/elasticsearch/lib/client.d.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KbnClient", + "type": "Class", + "tags": [], + "label": "KbnClient", + "description": [], + "path": "packages/kbn-test/src/kbn_client/kbn_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KbnClient.status", + "type": "Object", + "tags": [], + "label": "status", + "description": [], + "signature": [ + "KbnClientStatus" + ], + "path": "packages/kbn-test/src/kbn_client/kbn_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KbnClient.plugins", + "type": "Object", + "tags": [], + "label": "plugins", + "description": [], + "signature": [ + "KbnClientPlugins" + ], + "path": "packages/kbn-test/src/kbn_client/kbn_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KbnClient.version", + "type": "Object", + "tags": [], + "label": "version", + "description": [], + "signature": [ + "KbnClientVersion" + ], + "path": "packages/kbn-test/src/kbn_client/kbn_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KbnClient.savedObjects", + "type": "Object", + "tags": [], + "label": "savedObjects", + "description": [], + "signature": [ + "KbnClientSavedObjects" + ], + "path": "packages/kbn-test/src/kbn_client/kbn_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KbnClient.spaces", + "type": "Object", + "tags": [], + "label": "spaces", + "description": [], + "signature": [ + "KbnClientSpaces" + ], + "path": "packages/kbn-test/src/kbn_client/kbn_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KbnClient.uiSettings", + "type": "Object", + "tags": [], + "label": "uiSettings", + "description": [], + "signature": [ + "KbnClientUiSettings" + ], + "path": "packages/kbn-test/src/kbn_client/kbn_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KbnClient.importExport", + "type": "Object", + "tags": [], + "label": "importExport", + "description": [], + "signature": [ + "KbnClientImportExport" + ], + "path": "packages/kbn-test/src/kbn_client/kbn_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KbnClient.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [ + "\nBasic Kibana server client that implements common behaviors for talking\nto the Kibana server from dev tooling." + ], + "signature": [ + "any" + ], + "path": "packages/kbn-test/src/kbn_client/kbn_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KbnClient.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "signature": [ + { + "pluginId": "@kbn/test", + "scope": "common", + "docId": "kibKbnTestPluginApi", + "section": "def-common.KbnClientOptions", + "text": "KbnClientOptions" + } + ], + "path": "packages/kbn-test/src/kbn_client/kbn_client.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KbnClient.request", + "type": "Function", + "tags": [], + "label": "request", + "description": [ + "\nMake a direct request to the Kibana server" + ], + "signature": [ + "(options: ", + "ReqOptions", + ") => Promise<", + "AxiosResponse", + ">" + ], + "path": "packages/kbn-test/src/kbn_client/kbn_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KbnClient.request.$1", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "signature": [ + "ReqOptions" + ], + "path": "packages/kbn-test/src/kbn_client/kbn_client.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KbnClient.resolveUrl", + "type": "Function", + "tags": [], + "label": "resolveUrl", + "description": [], + "signature": [ + "(relativeUrl: string) => string" + ], + "path": "packages/kbn-test/src/kbn_client/kbn_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KbnClient.resolveUrl.$1", + "type": "string", + "tags": [], + "label": "relativeUrl", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-test/src/kbn_client/kbn_client.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KibanaUrl", + "type": "Class", + "tags": [], + "label": "KibanaUrl", + "description": [], + "path": "packages/kbn-scout/src/common/services/kibana_url.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KibanaUrl.baseUrl", + "type": "Object", + "tags": [], + "label": "#baseUrl", + "description": [], + "signature": [ + "URL" + ], + "path": "packages/kbn-scout/src/common/services/kibana_url.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KibanaUrl.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "packages/kbn-scout/src/common/services/kibana_url.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KibanaUrl.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "baseUrl", + "description": [], + "signature": [ + "URL" + ], + "path": "packages/kbn-scout/src/common/services/kibana_url.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KibanaUrl.get", + "type": "Function", + "tags": [], + "label": "get", + "description": [ + "\nGet an absolute URL based on Kibana's URL" + ], + "signature": [ + "(rel?: string | undefined, options?: ", + "PathOptions", + " | undefined) => string" + ], + "path": "packages/kbn-scout/src/common/services/kibana_url.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KibanaUrl.get.$1", + "type": "string", + "tags": [], + "label": "rel", + "description": [ + "relative url, resolved relative to Kibana's url" + ], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-scout/src/common/services/kibana_url.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KibanaUrl.get.$2", + "type": "Object", + "tags": [], + "label": "options", + "description": [ + "optional modifications to apply to the URL" + ], + "signature": [ + "PathOptions", + " | undefined" + ], + "path": "packages/kbn-scout/src/common/services/kibana_url.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KibanaUrl.app", + "type": "Function", + "tags": [], + "label": "app", + "description": [ + "\nGet the URL for an app" + ], + "signature": [ + "(appName: string, options?: ", + "PathOptions", + " | undefined) => string" + ], + "path": "packages/kbn-scout/src/common/services/kibana_url.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KibanaUrl.app.$1", + "type": "string", + "tags": [], + "label": "appName", + "description": [ + "name of the app to get the URL for" + ], + "signature": [ + "string" + ], + "path": "packages/kbn-scout/src/common/services/kibana_url.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KibanaUrl.app.$2", + "type": "Object", + "tags": [], + "label": "options", + "description": [ + "optional modifications to apply to the URL" + ], + "signature": [ + "PathOptions", + " | undefined" + ], + "path": "packages/kbn-scout/src/common/services/kibana_url.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.KibanaUrl.toString", + "type": "Function", + "tags": [], + "label": "toString", + "description": [], + "signature": [ + "() => string" + ], + "path": "packages/kbn-scout/src/common/services/kibana_url.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.SamlSessionManager", + "type": "Class", + "tags": [], + "label": "SamlSessionManager", + "description": [ + "\nManages cookies associated with user roles" + ], + "path": "packages/kbn-test/src/auth/session_manager.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.SamlSessionManager.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "packages/kbn-test/src/auth/session_manager.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.SamlSessionManager.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "signature": [ + { + "pluginId": "@kbn/test", + "scope": "common", + "docId": "kibKbnTestPluginApi", + "section": "def-common.SamlSessionManagerOptions", + "text": "SamlSessionManagerOptions" + } + ], + "path": "packages/kbn-test/src/auth/session_manager.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.SamlSessionManager.getApiCredentialsForRole", + "type": "Function", + "tags": [], + "label": "getApiCredentialsForRole", + "description": [], + "signature": [ + "(role: string, options?: ", + { + "pluginId": "@kbn/test", + "scope": "common", + "docId": "kibKbnTestPluginApi", + "section": "def-common.GetCookieOptions", + "text": "GetCookieOptions" + }, + " | undefined) => Promise<{ Cookie: string; }>" + ], + "path": "packages/kbn-test/src/auth/session_manager.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.SamlSessionManager.getApiCredentialsForRole.$1", + "type": "string", + "tags": [], + "label": "role", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-test/src/auth/session_manager.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.SamlSessionManager.getApiCredentialsForRole.$2", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "signature": [ + { + "pluginId": "@kbn/test", + "scope": "common", + "docId": "kibKbnTestPluginApi", + "section": "def-common.GetCookieOptions", + "text": "GetCookieOptions" + }, + " | undefined" + ], + "path": "packages/kbn-test/src/auth/session_manager.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.SamlSessionManager.getInteractiveUserSessionCookieWithRoleScope", + "type": "Function", + "tags": [], + "label": "getInteractiveUserSessionCookieWithRoleScope", + "description": [], + "signature": [ + "(role: string, options?: ", + { + "pluginId": "@kbn/test", + "scope": "common", + "docId": "kibKbnTestPluginApi", + "section": "def-common.GetCookieOptions", + "text": "GetCookieOptions" + }, + " | undefined) => Promise" + ], + "path": "packages/kbn-test/src/auth/session_manager.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.SamlSessionManager.getInteractiveUserSessionCookieWithRoleScope.$1", + "type": "string", + "tags": [], + "label": "role", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-test/src/auth/session_manager.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.SamlSessionManager.getInteractiveUserSessionCookieWithRoleScope.$2", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "signature": [ + { + "pluginId": "@kbn/test", + "scope": "common", + "docId": "kibKbnTestPluginApi", + "section": "def-common.GetCookieOptions", + "text": "GetCookieOptions" + }, + " | undefined" + ], + "path": "packages/kbn-test/src/auth/session_manager.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.SamlSessionManager.getEmail", + "type": "Function", + "tags": [], + "label": "getEmail", + "description": [], + "signature": [ + "(role: string) => Promise" + ], + "path": "packages/kbn-test/src/auth/session_manager.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.SamlSessionManager.getEmail.$1", + "type": "string", + "tags": [], + "label": "role", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-test/src/auth/session_manager.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.SamlSessionManager.getUserData", + "type": "Function", + "tags": [], + "label": "getUserData", + "description": [], + "signature": [ + "(role: string) => Promise<", + "UserProfile", + ">" + ], + "path": "packages/kbn-test/src/auth/session_manager.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.SamlSessionManager.getUserData.$1", + "type": "string", + "tags": [], + "label": "role", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-test/src/auth/session_manager.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog", + "type": "Class", + "tags": [], + "label": "ToolingLog", + "description": [], + "signature": [ + { + "pluginId": "@kbn/tooling-log", + "scope": "common", + "docId": "kibKbnToolingLogPluginApi", + "section": "def-common.ToolingLog", + "text": "ToolingLog" + }, + " implements ", + { + "pluginId": "@kbn/some-dev-log", + "scope": "common", + "docId": "kibKbnSomeDevLogPluginApi", + "section": "def-common.SomeDevLog", + "text": "SomeDevLog" + } + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "writerConfig", + "description": [], + "signature": [ + { + "pluginId": "@kbn/tooling-log", + "scope": "common", + "docId": "kibKbnToolingLogPluginApi", + "section": "def-common.ToolingLogTextWriterConfig", + "text": "ToolingLogTextWriterConfig" + }, + " | undefined" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.Unnamed.$2", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "signature": [ + { + "pluginId": "@kbn/tooling-log", + "scope": "common", + "docId": "kibKbnToolingLogPluginApi", + "section": "def-common.ToolingLogOptions", + "text": "ToolingLogOptions" + }, + " | undefined" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.getIndent", + "type": "Function", + "tags": [], + "label": "getIndent", + "description": [ + "\nGet the current indentation level of the ToolingLog" + ], + "signature": [ + "() => number" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.indent", + "type": "Function", + "tags": [], + "label": "indent", + "description": [], + "signature": [ + "{ (delta: number): void; (delta: number, block: () => Promise): Promise; (delta: number, block: () => T): T; }" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.indent.$1", + "type": "number", + "tags": [], + "label": "delta", + "description": [], + "signature": [ + "number" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.indent.$2", + "type": "Function", + "tags": [], + "label": "block", + "description": [], + "signature": [ + "(() => T | Promise) | undefined" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.verbose", + "type": "Function", + "tags": [], + "label": "verbose", + "description": [], + "signature": [ + "(...args: any[]) => void" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.verbose.$1", + "type": "Array", + "tags": [], + "label": "args", + "description": [], + "signature": [ + "any[]" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.debug", + "type": "Function", + "tags": [], + "label": "debug", + "description": [], + "signature": [ + "(...args: any[]) => void" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.debug.$1", + "type": "Array", + "tags": [], + "label": "args", + "description": [], + "signature": [ + "any[]" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.info", + "type": "Function", + "tags": [], + "label": "info", + "description": [], + "signature": [ + "(...args: any[]) => void" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.info.$1", + "type": "Array", + "tags": [], + "label": "args", + "description": [], + "signature": [ + "any[]" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.success", + "type": "Function", + "tags": [], + "label": "success", + "description": [], + "signature": [ + "(...args: any[]) => void" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.success.$1", + "type": "Array", + "tags": [], + "label": "args", + "description": [], + "signature": [ + "any[]" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.warning", + "type": "Function", + "tags": [], + "label": "warning", + "description": [], + "signature": [ + "(...args: any[]) => void" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.warning.$1", + "type": "Array", + "tags": [], + "label": "args", + "description": [], + "signature": [ + "any[]" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.error", + "type": "Function", + "tags": [], + "label": "error", + "description": [], + "signature": [ + "(error: string | Error) => void" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.error.$1", + "type": "CompoundType", + "tags": [], + "label": "error", + "description": [], + "signature": [ + "string | Error" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.write", + "type": "Function", + "tags": [], + "label": "write", + "description": [], + "signature": [ + "(...args: any[]) => void" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.write.$1", + "type": "Array", + "tags": [], + "label": "args", + "description": [], + "signature": [ + "any[]" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.getWriters", + "type": "Function", + "tags": [], + "label": "getWriters", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "@kbn/tooling-log", + "scope": "common", + "docId": "kibKbnToolingLogPluginApi", + "section": "def-common.Writer", + "text": "Writer" + }, + "[]" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.setWriters", + "type": "Function", + "tags": [], + "label": "setWriters", + "description": [], + "signature": [ + "(writers: ", + { + "pluginId": "@kbn/tooling-log", + "scope": "common", + "docId": "kibKbnToolingLogPluginApi", + "section": "def-common.Writer", + "text": "Writer" + }, + "[]) => void" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.setWriters.$1", + "type": "Array", + "tags": [], + "label": "writers", + "description": [], + "signature": [ + { + "pluginId": "@kbn/tooling-log", + "scope": "common", + "docId": "kibKbnToolingLogPluginApi", + "section": "def-common.Writer", + "text": "Writer" + }, + "[]" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.getWritten$", + "type": "Function", + "tags": [], + "label": "getWritten$", + "description": [], + "signature": [ + "() => ", + "Observable", + "<", + { + "pluginId": "@kbn/tooling-log", + "scope": "common", + "docId": "kibKbnToolingLogPluginApi", + "section": "def-common.Message", + "text": "Message" + }, + ">" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.withType", + "type": "Function", + "tags": [], + "label": "withType", + "description": [ + "\nCreate a new ToolingLog which sets a different \"type\", allowing messages to be filtered out by \"source\"" + ], + "signature": [ + "(type: string) => ", + { + "pluginId": "@kbn/tooling-log", + "scope": "common", + "docId": "kibKbnToolingLogPluginApi", + "section": "def-common.ToolingLog", + "text": "ToolingLog" + } + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ToolingLog.withType.$1", + "type": "string", + "tags": [], + "label": "type", + "description": [ + "A string that will be passed along with messages from this logger which can be used to filter messages with `ignoreSources`" + ], + "signature": [ + "string" + ], + "path": "packages/kbn-tooling-log/src/tooling_log.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], "functions": [ { "parentPluginId": "@kbn/scout", @@ -179,7 +1541,7 @@ "label": "expect", "description": [], "signature": [ - "{ (actual: T, messageOrOptions?: string | { message?: string | undefined; } | undefined): MakeMatchers; soft: (actual: T, messageOrOptions?: string | { message?: string | undefined; } | undefined) => MakeMatchers; poll: (actual: () => T | Promise, messageOrOptions?: string | { message?: string | undefined; timeout?: number | undefined; intervals?: number[] | undefined; } | undefined) => GenericAssertions> & PlaywrightTest.Matchers, T> & SnapshotAssertions & { not: BaseMatchers, T>; }; extend(actual: T, messageOrOptions?: string | { message?: string | undefined; } | undefined): MakeMatchers; soft: (actual: T, messageOrOptions?: string | { message?: string | undefined; } | undefined) => MakeMatchers; poll: (actual: () => T | Promise, messageOrOptions?: string | { message?: string | undefined; timeout?: number | undefined; intervals?: number[] | undefined; } | undefined) => PollMatchers, T, {}>; extend ", "MatcherReturnType", @@ -280,16 +1642,6 @@ "PlaywrightTestOptions", " & { browserAuth: ", "LoginFixture", - "; } & { page: ", - { - "pluginId": "@kbn/scout", - "scope": "common", - "docId": "kibKbnScoutPluginApi", - "section": "def-common.ScoutPage", - "text": "ScoutPage" - }, - "; kbnUrl: ", - "KibanaUrl", "; } & ", { "pluginId": "@kbn/scout", @@ -319,6 +1671,84 @@ } ], "interfaces": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.EsArchiverFixture", + "type": "Interface", + "tags": [], + "label": "EsArchiverFixture", + "description": [], + "path": "packages/kbn-scout/src/playwright/fixtures/types/worker_scope.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.EsArchiverFixture.loadIfNeeded", + "type": "Function", + "tags": [], + "label": "loadIfNeeded", + "description": [], + "signature": [ + "(name: string, performance?: ", + { + "pluginId": "@kbn/es-archiver", + "scope": "common", + "docId": "kibKbnEsArchiverPluginApi", + "section": "def-common.LoadActionPerfOptions", + "text": "LoadActionPerfOptions" + }, + " | undefined) => Promise>" + ], + "path": "packages/kbn-scout/src/playwright/fixtures/types/worker_scope.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/scout", + "id": "def-common.EsArchiverFixture.loadIfNeeded.$1", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-scout/src/playwright/fixtures/types/worker_scope.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.EsArchiverFixture.loadIfNeeded.$2", + "type": "Object", + "tags": [], + "label": "performance", + "description": [], + "signature": [ + { + "pluginId": "@kbn/es-archiver", + "scope": "common", + "docId": "kibKbnEsArchiverPluginApi", + "section": "def-common.LoadActionPerfOptions", + "text": "LoadActionPerfOptions" + }, + " | undefined" + ], + "path": "packages/kbn-scout/src/playwright/fixtures/types/worker_scope.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/scout", "id": "def-common.PageObjects", @@ -357,6 +1787,34 @@ "path": "packages/kbn-scout/src/playwright/page_objects/index.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.PageObjects.dashboard", + "type": "Object", + "tags": [], + "label": "dashboard", + "description": [], + "signature": [ + "DashboardApp" + ], + "path": "packages/kbn-scout/src/playwright/page_objects/index.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.PageObjects.filterBar", + "type": "Object", + "tags": [], + "label": "filterBar", + "description": [], + "signature": [ + "FilterBar" + ], + "path": "packages/kbn-scout/src/playwright/page_objects/index.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -448,13 +1906,17 @@ "Page", " & { gotoApp: (appName: string, options?: { referer?: string | undefined; timeout?: number | undefined; waitUntil?: \"load\" | \"domcontentloaded\" | \"networkidle\" | \"commit\" | undefined; } | undefined) => Promise<", "Response", - " | null>; testSubj: { check: (selector: string, options?: { force?: boolean | undefined; noWaitAfter?: boolean | undefined; position?: { x: number; y: number; } | undefined; strict?: boolean | undefined; timeout?: number | undefined; trial?: boolean | undefined; } | undefined) => Promise; click: (selector: string, options?: { button?: \"right\" | \"left\" | \"middle\" | undefined; clickCount?: number | undefined; delay?: number | undefined; force?: boolean | undefined; modifiers?: (\"Alt\" | \"Control\" | \"Meta\" | \"Shift\" | \"ControlOrMeta\")[] | undefined; noWaitAfter?: boolean | undefined; position?: { x: number; y: number; } | undefined; strict?: boolean | undefined; timeout?: number | undefined; trial?: boolean | undefined; } | undefined) => Promise; dblclick: (selector: string, options?: { button?: \"right\" | \"left\" | \"middle\" | undefined; delay?: number | undefined; force?: boolean | undefined; modifiers?: (\"Alt\" | \"Control\" | \"Meta\" | \"Shift\" | \"ControlOrMeta\")[] | undefined; noWaitAfter?: boolean | undefined; position?: { x: number; y: number; } | undefined; strict?: boolean | undefined; timeout?: number | undefined; trial?: boolean | undefined; } | undefined) => Promise; fill: (selector: string, value: string, options?: { force?: boolean | undefined; noWaitAfter?: boolean | undefined; strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; focus: (selector: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; getAttribute: (selector: string, name: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; hover: (selector: string, options?: { force?: boolean | undefined; modifiers?: (\"Alt\" | \"Control\" | \"Meta\" | \"Shift\" | \"ControlOrMeta\")[] | undefined; noWaitAfter?: boolean | undefined; position?: { x: number; y: number; } | undefined; strict?: boolean | undefined; timeout?: number | undefined; trial?: boolean | undefined; } | undefined) => Promise; innerText: (selector: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; isEnabled: (selector: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; isChecked: (selector: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; isHidden: (selector: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; locator: (selector: string, options?: { has?: ", + " | null>; waitForLoadingIndicatorHidden: () => Promise<", + "ElementHandle", + " | null>; testSubj: { check: (selector: string, options?: { force?: boolean | undefined; noWaitAfter?: boolean | undefined; position?: { x: number; y: number; } | undefined; strict?: boolean | undefined; timeout?: number | undefined; trial?: boolean | undefined; } | undefined) => Promise; click: (selector: string, options?: { button?: \"right\" | \"left\" | \"middle\" | undefined; clickCount?: number | undefined; delay?: number | undefined; force?: boolean | undefined; modifiers?: (\"Alt\" | \"Control\" | \"Meta\" | \"Shift\" | \"ControlOrMeta\")[] | undefined; noWaitAfter?: boolean | undefined; position?: { x: number; y: number; } | undefined; strict?: boolean | undefined; timeout?: number | undefined; trial?: boolean | undefined; } | undefined) => Promise; dblclick: (selector: string, options?: { button?: \"right\" | \"left\" | \"middle\" | undefined; delay?: number | undefined; force?: boolean | undefined; modifiers?: (\"Alt\" | \"Control\" | \"Meta\" | \"Shift\" | \"ControlOrMeta\")[] | undefined; noWaitAfter?: boolean | undefined; position?: { x: number; y: number; } | undefined; strict?: boolean | undefined; timeout?: number | undefined; trial?: boolean | undefined; } | undefined) => Promise; fill: (selector: string, value: string, options?: { force?: boolean | undefined; noWaitAfter?: boolean | undefined; strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; focus: (selector: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; getAttribute: (selector: string, name: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; hover: (selector: string, options?: { force?: boolean | undefined; modifiers?: (\"Alt\" | \"Control\" | \"Meta\" | \"Shift\" | \"ControlOrMeta\")[] | undefined; noWaitAfter?: boolean | undefined; position?: { x: number; y: number; } | undefined; strict?: boolean | undefined; timeout?: number | undefined; trial?: boolean | undefined; } | undefined) => Promise; innerText: (selector: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; isEnabled: (selector: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; isChecked: (selector: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; isHidden: (selector: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; isVisible: (selector: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; locator: (selector: string, options?: { has?: ", "Locator", " | undefined; hasNot?: ", "Locator", " | undefined; hasNotText?: string | RegExp | undefined; hasText?: string | RegExp | undefined; } | undefined) => ", "Locator", - "; }; }" + "; waitForSelector: (selector: string, options?: PageWaitForSelectorOptions | undefined) => Promise<", + "ElementHandle", + " | null>; typeWithDelay: (selector: string, text: string, options?: { delay: number; } | undefined) => Promise; clearInput: (selector: string) => Promise; }; }" ], "path": "packages/kbn-scout/src/playwright/fixtures/types/test_scope.ts", "deprecated": false, @@ -583,7 +2045,13 @@ "label": "kbnUrl", "description": [], "signature": [ - "KibanaUrl" + { + "pluginId": "@kbn/scout", + "scope": "common", + "docId": "kibKbnScoutPluginApi", + "section": "def-common.KibanaUrl", + "text": "KibanaUrl" + } ], "path": "packages/kbn-scout/src/playwright/fixtures/types/worker_scope.ts", "deprecated": false, @@ -623,6 +2091,20 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/scout", + "id": "def-common.ScoutWorkerFixtures.uiSettings", + "type": "Object", + "tags": [], + "label": "uiSettings", + "description": [], + "signature": [ + "UiSettingsFixture" + ], + "path": "packages/kbn-scout/src/playwright/fixtures/types/worker_scope.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/scout", "id": "def-common.ScoutWorkerFixtures.esArchiver", @@ -631,7 +2113,13 @@ "label": "esArchiver", "description": [], "signature": [ - "EsArchiverFixture" + { + "pluginId": "@kbn/scout", + "scope": "common", + "docId": "kibKbnScoutPluginApi", + "section": "def-common.EsArchiverFixture", + "text": "EsArchiverFixture" + } ], "path": "packages/kbn-scout/src/playwright/fixtures/types/worker_scope.ts", "deprecated": false, @@ -669,18 +2157,24 @@ "type": "Type", "tags": [], "label": "ScoutPage", - "description": [], + "description": [ + "\nExtends the Playwright 'Page' interface with methods specific to Kibana.\nReasons to use 'ReturnType' instead of Explicit Typings:\n- DRY Principle: automatically stays in sync with the Playwright API, reducing maintenance overhead.\n- Future-Proofing: If Playwright changes the return type of methods, these types will update accordingly.\nRecommendation: define Explicit Types as return types only if methods (e.g. 'typeWithDelay')\nhave any additional logic or Kibana-specific behavior." + ], "signature": [ "Page", " & { gotoApp: (appName: string, options?: { referer?: string | undefined; timeout?: number | undefined; waitUntil?: \"load\" | \"domcontentloaded\" | \"networkidle\" | \"commit\" | undefined; } | undefined) => Promise<", "Response", - " | null>; testSubj: { check: (selector: string, options?: { force?: boolean | undefined; noWaitAfter?: boolean | undefined; position?: { x: number; y: number; } | undefined; strict?: boolean | undefined; timeout?: number | undefined; trial?: boolean | undefined; } | undefined) => Promise; click: (selector: string, options?: { button?: \"right\" | \"left\" | \"middle\" | undefined; clickCount?: number | undefined; delay?: number | undefined; force?: boolean | undefined; modifiers?: (\"Alt\" | \"Control\" | \"Meta\" | \"Shift\" | \"ControlOrMeta\")[] | undefined; noWaitAfter?: boolean | undefined; position?: { x: number; y: number; } | undefined; strict?: boolean | undefined; timeout?: number | undefined; trial?: boolean | undefined; } | undefined) => Promise; dblclick: (selector: string, options?: { button?: \"right\" | \"left\" | \"middle\" | undefined; delay?: number | undefined; force?: boolean | undefined; modifiers?: (\"Alt\" | \"Control\" | \"Meta\" | \"Shift\" | \"ControlOrMeta\")[] | undefined; noWaitAfter?: boolean | undefined; position?: { x: number; y: number; } | undefined; strict?: boolean | undefined; timeout?: number | undefined; trial?: boolean | undefined; } | undefined) => Promise; fill: (selector: string, value: string, options?: { force?: boolean | undefined; noWaitAfter?: boolean | undefined; strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; focus: (selector: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; getAttribute: (selector: string, name: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; hover: (selector: string, options?: { force?: boolean | undefined; modifiers?: (\"Alt\" | \"Control\" | \"Meta\" | \"Shift\" | \"ControlOrMeta\")[] | undefined; noWaitAfter?: boolean | undefined; position?: { x: number; y: number; } | undefined; strict?: boolean | undefined; timeout?: number | undefined; trial?: boolean | undefined; } | undefined) => Promise; innerText: (selector: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; isEnabled: (selector: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; isChecked: (selector: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; isHidden: (selector: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; locator: (selector: string, options?: { has?: ", + " | null>; waitForLoadingIndicatorHidden: () => Promise<", + "ElementHandle", + " | null>; testSubj: { check: (selector: string, options?: { force?: boolean | undefined; noWaitAfter?: boolean | undefined; position?: { x: number; y: number; } | undefined; strict?: boolean | undefined; timeout?: number | undefined; trial?: boolean | undefined; } | undefined) => Promise; click: (selector: string, options?: { button?: \"right\" | \"left\" | \"middle\" | undefined; clickCount?: number | undefined; delay?: number | undefined; force?: boolean | undefined; modifiers?: (\"Alt\" | \"Control\" | \"Meta\" | \"Shift\" | \"ControlOrMeta\")[] | undefined; noWaitAfter?: boolean | undefined; position?: { x: number; y: number; } | undefined; strict?: boolean | undefined; timeout?: number | undefined; trial?: boolean | undefined; } | undefined) => Promise; dblclick: (selector: string, options?: { button?: \"right\" | \"left\" | \"middle\" | undefined; delay?: number | undefined; force?: boolean | undefined; modifiers?: (\"Alt\" | \"Control\" | \"Meta\" | \"Shift\" | \"ControlOrMeta\")[] | undefined; noWaitAfter?: boolean | undefined; position?: { x: number; y: number; } | undefined; strict?: boolean | undefined; timeout?: number | undefined; trial?: boolean | undefined; } | undefined) => Promise; fill: (selector: string, value: string, options?: { force?: boolean | undefined; noWaitAfter?: boolean | undefined; strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; focus: (selector: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; getAttribute: (selector: string, name: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; hover: (selector: string, options?: { force?: boolean | undefined; modifiers?: (\"Alt\" | \"Control\" | \"Meta\" | \"Shift\" | \"ControlOrMeta\")[] | undefined; noWaitAfter?: boolean | undefined; position?: { x: number; y: number; } | undefined; strict?: boolean | undefined; timeout?: number | undefined; trial?: boolean | undefined; } | undefined) => Promise; innerText: (selector: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; isEnabled: (selector: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; isChecked: (selector: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; isHidden: (selector: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; isVisible: (selector: string, options?: { strict?: boolean | undefined; timeout?: number | undefined; } | undefined) => Promise; locator: (selector: string, options?: { has?: ", "Locator", " | undefined; hasNot?: ", "Locator", " | undefined; hasNotText?: string | RegExp | undefined; hasText?: string | RegExp | undefined; } | undefined) => ", "Locator", - "; }; }" + "; waitForSelector: (selector: string, options?: PageWaitForSelectorOptions | undefined) => Promise<", + "ElementHandle", + " | null>; typeWithDelay: (selector: string, text: string, options?: { delay: number; } | undefined) => Promise; clearInput: (selector: string) => Promise; }; }" ], "path": "packages/kbn-scout/src/playwright/fixtures/types/test_scope.ts", "deprecated": false, diff --git a/api_docs/kbn_scout.mdx b/api_docs/kbn_scout.mdx index c8294dc51bc01..9e77b255f4883 100644 --- a/api_docs/kbn_scout.mdx +++ b/api_docs/kbn_scout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-scout title: "@kbn/scout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/scout plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/scout'] --- import kbnScoutObj from './kbn_scout.devdocs.json'; @@ -21,13 +21,16 @@ Contact [@elastic/appex-qa](https://github.com/orgs/elastic/teams/appex-qa) for | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 34 | 0 | 26 | 5 | +| 119 | 0 | 86 | 8 | ## Common ### Functions +### Classes + + ### Interfaces diff --git a/api_docs/kbn_screenshotting_server.mdx b/api_docs/kbn_screenshotting_server.mdx index 03a03460f1a0d..d0c8c99189985 100644 --- a/api_docs/kbn_screenshotting_server.mdx +++ b/api_docs/kbn_screenshotting_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-screenshotting-server title: "@kbn/screenshotting-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/screenshotting-server plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/screenshotting-server'] --- import kbnScreenshottingServerObj from './kbn_screenshotting_server.devdocs.json'; diff --git a/api_docs/kbn_search_api_keys_components.mdx b/api_docs/kbn_search_api_keys_components.mdx index ab5456d12b82a..ddb0cbe006837 100644 --- a/api_docs/kbn_search_api_keys_components.mdx +++ b/api_docs/kbn_search_api_keys_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-api-keys-components title: "@kbn/search-api-keys-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-api-keys-components plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-api-keys-components'] --- import kbnSearchApiKeysComponentsObj from './kbn_search_api_keys_components.devdocs.json'; diff --git a/api_docs/kbn_search_api_keys_server.mdx b/api_docs/kbn_search_api_keys_server.mdx index 0f08d071303ab..37429f7642573 100644 --- a/api_docs/kbn_search_api_keys_server.mdx +++ b/api_docs/kbn_search_api_keys_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-api-keys-server title: "@kbn/search-api-keys-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-api-keys-server plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-api-keys-server'] --- import kbnSearchApiKeysServerObj from './kbn_search_api_keys_server.devdocs.json'; diff --git a/api_docs/kbn_search_api_panels.mdx b/api_docs/kbn_search_api_panels.mdx index 5e0ad966b9b41..9528ef4986c2a 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-api-panels'] --- import kbnSearchApiPanelsObj from './kbn_search_api_panels.devdocs.json'; diff --git a/api_docs/kbn_search_connectors.mdx b/api_docs/kbn_search_connectors.mdx index e151260a6eb7b..6f04f0a51eb80 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-12-02 +date: 2024-12-05 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 eb2ac2d29b319..fd29730175a6b 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-12-02 +date: 2024-12-05 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 9e870b43b7242..e7d280a88f7a2 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-12-02 +date: 2024-12-05 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 3550bfc897545..ca9d429f1b1c2 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-response-warnings'] --- import kbnSearchResponseWarningsObj from './kbn_search_response_warnings.devdocs.json'; diff --git a/api_docs/kbn_search_shared_ui.mdx b/api_docs/kbn_search_shared_ui.mdx index 7e52bb53d825c..628c66d36a652 100644 --- a/api_docs/kbn_search_shared_ui.mdx +++ b/api_docs/kbn_search_shared_ui.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-shared-ui title: "@kbn/search-shared-ui" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-shared-ui plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-shared-ui'] --- import kbnSearchSharedUiObj from './kbn_search_shared_ui.devdocs.json'; diff --git a/api_docs/kbn_search_types.mdx b/api_docs/kbn_search_types.mdx index 087e32fe3361a..56e46027490e8 100644 --- a/api_docs/kbn_search_types.mdx +++ b/api_docs/kbn_search_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-types title: "@kbn/search-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-types plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-types'] --- import kbnSearchTypesObj from './kbn_search_types.devdocs.json'; diff --git a/api_docs/kbn_security_api_key_management.mdx b/api_docs/kbn_security_api_key_management.mdx index ce535705359ed..8728b332fd669 100644 --- a/api_docs/kbn_security_api_key_management.mdx +++ b/api_docs/kbn_security_api_key_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-api-key-management title: "@kbn/security-api-key-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-api-key-management plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-api-key-management'] --- import kbnSecurityApiKeyManagementObj from './kbn_security_api_key_management.devdocs.json'; diff --git a/api_docs/kbn_security_authorization_core.mdx b/api_docs/kbn_security_authorization_core.mdx index 88fd7fe12fc96..1ad9916845546 100644 --- a/api_docs/kbn_security_authorization_core.mdx +++ b/api_docs/kbn_security_authorization_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-authorization-core title: "@kbn/security-authorization-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-authorization-core plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-authorization-core'] --- import kbnSecurityAuthorizationCoreObj from './kbn_security_authorization_core.devdocs.json'; diff --git a/api_docs/kbn_security_authorization_core_common.mdx b/api_docs/kbn_security_authorization_core_common.mdx index b5adb391c9c90..2228b9d8c4085 100644 --- a/api_docs/kbn_security_authorization_core_common.mdx +++ b/api_docs/kbn_security_authorization_core_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-authorization-core-common title: "@kbn/security-authorization-core-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-authorization-core-common plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-authorization-core-common'] --- import kbnSecurityAuthorizationCoreCommonObj from './kbn_security_authorization_core_common.devdocs.json'; diff --git a/api_docs/kbn_security_form_components.mdx b/api_docs/kbn_security_form_components.mdx index 1bb479dc0b1ea..42499bf8d897f 100644 --- a/api_docs/kbn_security_form_components.mdx +++ b/api_docs/kbn_security_form_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-form-components title: "@kbn/security-form-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-form-components plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-form-components'] --- import kbnSecurityFormComponentsObj from './kbn_security_form_components.devdocs.json'; diff --git a/api_docs/kbn_security_hardening.mdx b/api_docs/kbn_security_hardening.mdx index 82d81acffa73b..26d23c3b97258 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-hardening'] --- import kbnSecurityHardeningObj from './kbn_security_hardening.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_common.mdx b/api_docs/kbn_security_plugin_types_common.mdx index 128594cb163d4..7b40a5f741eb0 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-common'] --- import kbnSecurityPluginTypesCommonObj from './kbn_security_plugin_types_common.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_public.mdx b/api_docs/kbn_security_plugin_types_public.mdx index b240c10c605a7..0cec768d41108 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-public'] --- import kbnSecurityPluginTypesPublicObj from './kbn_security_plugin_types_public.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_server.mdx b/api_docs/kbn_security_plugin_types_server.mdx index 9e064c1b74c84..12a9ecb5b889e 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-12-02 +date: 2024-12-05 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_role_management_model.mdx b/api_docs/kbn_security_role_management_model.mdx index d46f47a4c72c2..8fba07b3a26e8 100644 --- a/api_docs/kbn_security_role_management_model.mdx +++ b/api_docs/kbn_security_role_management_model.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-role-management-model title: "@kbn/security-role-management-model" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-role-management-model plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-role-management-model'] --- import kbnSecurityRoleManagementModelObj from './kbn_security_role_management_model.devdocs.json'; diff --git a/api_docs/kbn_security_solution_distribution_bar.devdocs.json b/api_docs/kbn_security_solution_distribution_bar.devdocs.json index edcd3cad12f9b..51fdf64ef88c7 100644 --- a/api_docs/kbn_security_solution_distribution_bar.devdocs.json +++ b/api_docs/kbn_security_solution_distribution_bar.devdocs.json @@ -84,7 +84,7 @@ "distribution data points" ], "signature": [ - "{ key: string; count: number; color: string; label?: React.ReactNode; }[]" + "{ key: string; count: number; color: string; label?: React.ReactNode; isCurrentFilter?: boolean | undefined; filter?: (() => void) | undefined; reset?: ((event: React.MouseEvent) => void) | undefined; }[]" ], "path": "x-pack/packages/security-solution/distribution_bar/src/distribution_bar.tsx", "deprecated": false, diff --git a/api_docs/kbn_security_solution_distribution_bar.mdx b/api_docs/kbn_security_solution_distribution_bar.mdx index 0f04b13109f9b..60a31b402b494 100644 --- a/api_docs/kbn_security_solution_distribution_bar.mdx +++ b/api_docs/kbn_security_solution_distribution_bar.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-distribution-bar title: "@kbn/security-solution-distribution-bar" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-distribution-bar plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-distribution-bar'] --- import kbnSecuritySolutionDistributionBarObj from './kbn_security_solution_distribution_bar.devdocs.json'; diff --git a/api_docs/kbn_security_solution_features.devdocs.json b/api_docs/kbn_security_solution_features.devdocs.json index 8549994fd336f..f77d52c6d9ffa 100644 --- a/api_docs/kbn_security_solution_features.devdocs.json +++ b/api_docs/kbn_security_solution_features.devdocs.json @@ -57,7 +57,9 @@ "section": "def-common.KibanaFeatureScope", "text": "KibanaFeatureScope" }, - "[] | undefined; order?: number | undefined; name: string; alerting?: readonly string[] | undefined; cases?: readonly string[] | undefined; hidden?: boolean | undefined; description?: string | undefined; category: ", + "[] | undefined; order?: number | undefined; name: string; alerting?: ", + "AlertingKibanaPrivilege", + " | undefined; cases?: readonly string[] | undefined; hidden?: boolean | undefined; description?: string | undefined; category: ", { "pluginId": "@kbn/core-application-common", "scope": "common", @@ -170,7 +172,9 @@ "section": "def-common.KibanaFeatureScope", "text": "KibanaFeatureScope" }, - "[] | undefined; order?: number | undefined; name: string; alerting?: readonly string[] | undefined; cases?: readonly string[] | undefined; hidden?: boolean | undefined; description?: string | undefined; category: ", + "[] | undefined; order?: number | undefined; name: string; alerting?: ", + "AlertingKibanaPrivilege", + " | undefined; cases?: readonly string[] | undefined; hidden?: boolean | undefined; description?: string | undefined; category: ", { "pluginId": "@kbn/core-application-common", "scope": "common", @@ -469,7 +473,15 @@ "section": "def-common.RecursivePartial", "text": "RecursivePartial" }, - "<{ rule?: { all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined; alert?: { all?: readonly string[] | undefined; read?: readonly string[] | undefined; } | undefined; } | undefined>; cases?: ", + "<{ rule?: { all?: ", + "AlertingKibanaPrivilege", + " | undefined; read?: ", + "AlertingKibanaPrivilege", + " | undefined; } | undefined; alert?: { all?: ", + "AlertingKibanaPrivilege", + " | undefined; read?: ", + "AlertingKibanaPrivilege", + " | undefined; } | undefined; } | undefined>; cases?: ", { "pluginId": "@kbn/utility-types", "scope": "common", diff --git a/api_docs/kbn_security_solution_features.mdx b/api_docs/kbn_security_solution_features.mdx index 5c81c38c1b04e..aece765ae9702 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-12-02 +date: 2024-12-05 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 cbcf202efbe24..b22b550d202de 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-12-02 +date: 2024-12-05 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 13a02a0171cb2..83256bbb60a35 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-12-02 +date: 2024-12-05 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 b62eced29a398..051a0883deae2 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-12-02 +date: 2024-12-05 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_security_ui_components.mdx b/api_docs/kbn_security_ui_components.mdx index 052767c78cecf..d58b0b0dfe47c 100644 --- a/api_docs/kbn_security_ui_components.mdx +++ b/api_docs/kbn_security_ui_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-ui-components title: "@kbn/security-ui-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-ui-components plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-ui-components'] --- import kbnSecurityUiComponentsObj from './kbn_security_ui_components.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index 28469ed68d06b..8015bb4fed32e 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-12-02 +date: 2024-12-05 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 07d8d4add3aeb..518de5069f5c7 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-12-02 +date: 2024-12-05 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 c89b27f02e7a2..10872029fe051 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-12-02 +date: 2024-12-05 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 ab586bac8a0aa..30fe1092ae20c 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-12-02 +date: 2024-12-05 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 5acf3d974c07f..18cc1d9824859 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-12-02 +date: 2024-12-05 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_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index 639bfb3884a3f..59813dd16ca85 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-12-02 +date: 2024-12-05 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 c8b3010a75bea..cac972b0d625c 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-12-02 +date: 2024-12-05 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 60cf4580a6ce6..e3488134e926b 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-12-02 +date: 2024-12-05 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 60a6afa51e31c..573a0af403027 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-12-02 +date: 2024-12-05 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 314756a9c7a6d..f4d2902f71b7f 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-12-02 +date: 2024-12-05 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 0c8738a06d5b8..532c4aff3e698 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-12-02 +date: 2024-12-05 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 aba269b861a1d..a9330d8e5dbd0 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-12-02 +date: 2024-12-05 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 f976bc039b806..105b3e4540180 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-12-02 +date: 2024-12-05 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 9e60420ae3049..2d50a210666ee 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-12-02 +date: 2024-12-05 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.devdocs.json b/api_docs/kbn_securitysolution_rules.devdocs.json index 15c7914511c23..fe9b23ae17e99 100644 --- a/api_docs/kbn_securitysolution_rules.devdocs.json +++ b/api_docs/kbn_securitysolution_rules.devdocs.json @@ -296,6 +296,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/securitysolution-rules", + "id": "def-common.SECURITY_SOLUTION_RULE_TYPE_IDS", + "type": "Array", + "tags": [], + "label": "SECURITY_SOLUTION_RULE_TYPE_IDS", + "description": [], + "signature": [ + "(\"siem.eqlRule\" | \"siem.esqlRule\" | \"siem.indicatorRule\" | \"siem.mlRule\" | \"siem.queryRule\" | \"siem.savedQueryRule\" | \"siem.thresholdRule\" | \"siem.newTermsRule\")[]" + ], + "path": "packages/kbn-securitysolution-rules/src/rule_type_constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/securitysolution-rules", "id": "def-common.SIGNALS_ID", diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx index 25a1d11e2221b..af93af1c2bd6c 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-rules'] --- import kbnSecuritysolutionRulesObj from './kbn_securitysolution_rules.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/security-detection-engine](https://github.com/orgs/elastic/tea | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 28 | 0 | 25 | 0 | +| 29 | 0 | 26 | 0 | ## Common diff --git a/api_docs/kbn_securitysolution_t_grid.mdx b/api_docs/kbn_securitysolution_t_grid.mdx index 24f01e6a80ec4..7cbb5cfcf4b21 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-12-02 +date: 2024-12-05 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 62e7352c77d78..c370f29498099 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-12-02 +date: 2024-12-05 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 4f78793ed5f00..ded0e09e5950b 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-12-02 +date: 2024-12-05 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 fb0b842b28d1e..8981034abc16c 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] --- import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json'; diff --git a/api_docs/kbn_server_route_repository_client.mdx b/api_docs/kbn_server_route_repository_client.mdx index aba792f505679..99ec9eff9f1c9 100644 --- a/api_docs/kbn_server_route_repository_client.mdx +++ b/api_docs/kbn_server_route_repository_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository-client title: "@kbn/server-route-repository-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-route-repository-client plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository-client'] --- import kbnServerRouteRepositoryClientObj from './kbn_server_route_repository_client.devdocs.json'; diff --git a/api_docs/kbn_server_route_repository_utils.mdx b/api_docs/kbn_server_route_repository_utils.mdx index 5852cf64f1018..3c63f400f5f7c 100644 --- a/api_docs/kbn_server_route_repository_utils.mdx +++ b/api_docs/kbn_server_route_repository_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository-utils title: "@kbn/server-route-repository-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-route-repository-utils plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository-utils'] --- import kbnServerRouteRepositoryUtilsObj from './kbn_server_route_repository_utils.devdocs.json'; diff --git a/api_docs/kbn_serverless_common_settings.mdx b/api_docs/kbn_serverless_common_settings.mdx index 9800ac31ff500..bf17fda265bd3 100644 --- a/api_docs/kbn_serverless_common_settings.mdx +++ b/api_docs/kbn_serverless_common_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-common-settings title: "@kbn/serverless-common-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-common-settings plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-common-settings'] --- import kbnServerlessCommonSettingsObj from './kbn_serverless_common_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_observability_settings.mdx b/api_docs/kbn_serverless_observability_settings.mdx index e4052e4d6ad12..34b950278519e 100644 --- a/api_docs/kbn_serverless_observability_settings.mdx +++ b/api_docs/kbn_serverless_observability_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-observability-settings title: "@kbn/serverless-observability-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-observability-settings plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-observability-settings'] --- import kbnServerlessObservabilitySettingsObj from './kbn_serverless_observability_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_project_switcher.mdx b/api_docs/kbn_serverless_project_switcher.mdx index 6da69c0607683..235ddb8346826 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-12-02 +date: 2024-12-05 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 ec35fe2894014..da738e6cd2cbe 100644 --- a/api_docs/kbn_serverless_search_settings.mdx +++ b/api_docs/kbn_serverless_search_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-search-settings title: "@kbn/serverless-search-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-search-settings plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-search-settings'] --- import kbnServerlessSearchSettingsObj from './kbn_serverless_search_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_security_settings.mdx b/api_docs/kbn_serverless_security_settings.mdx index e08a661d6419d..858f9f7085f3b 100644 --- a/api_docs/kbn_serverless_security_settings.mdx +++ b/api_docs/kbn_serverless_security_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-security-settings title: "@kbn/serverless-security-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-security-settings plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-security-settings'] --- import kbnServerlessSecuritySettingsObj from './kbn_serverless_security_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_storybook_config.mdx b/api_docs/kbn_serverless_storybook_config.mdx index fb3761972b205..4ed5c69136af7 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-12-02 +date: 2024-12-05 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 51966046e47bf..69c620329d44d 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-12-02 +date: 2024-12-05 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 00064fe57bc17..dd0363c7f94d2 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-12-02 +date: 2024-12-05 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 ad9c0cf4f0c62..f041d73864106 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-12-02 +date: 2024-12-05 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 0f72580b6a9e5..7dfdc999d217e 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-12-02 +date: 2024-12-05 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 67cfcaedc417c..6d0bc5b47d195 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-12-02 +date: 2024-12-05 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 b42bc0bfaf669..ae1c36ad0bf38 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-12-02 +date: 2024-12-05 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 f1aaa72bcfdd4..f2faffce46eef 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-12-02 +date: 2024-12-05 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 cf5b964a7ae8d..afafdbe01cf52 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-12-02 +date: 2024-12-05 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 bc049f5b082d0..74f76c42410cf 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-12-02 +date: 2024-12-05 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 ce75f6bedbc18..c114b1c7c1242 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-12-02 +date: 2024-12-05 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 e1df4bdadf54a..56fb65d18e823 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-12-02 +date: 2024-12-05 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 41b9ab7b7dc7c..dc14e663bb265 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-12-02 +date: 2024-12-05 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 ff977a00dffa3..c3ec414139b13 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-12-02 +date: 2024-12-05 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 f19cd1c2ee5bb..0a4f1ce0882d7 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-12-02 +date: 2024-12-05 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 a020913d6e948..c2ef00151dc26 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-12-02 +date: 2024-12-05 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 fdbf5f455c39f..fe233ec6c9b79 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-12-02 +date: 2024-12-05 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 1d60a45438662..cb1e518b57172 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-12-02 +date: 2024-12-05 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 3ae913b44cf19..b0a8ca2a55028 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-12-02 +date: 2024-12-05 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 67eac32aa229f..3e147a88ba27e 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-12-02 +date: 2024-12-05 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 f1ca8af713821..59d33903bd7b9 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-12-02 +date: 2024-12-05 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 626ca2293a1f6..d128f233ffb51 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-12-02 +date: 2024-12-05 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 ac7fc22fd3b2e..c7ab3578cfa55 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-12-02 +date: 2024-12-05 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 cd82f6cfcdfd9..104b73f31f044 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-12-02 +date: 2024-12-05 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 b1ce02332ac8d..d8e0bea30a87a 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-12-02 +date: 2024-12-05 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 be5e3d089f80c..2b5efee386948 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-12-02 +date: 2024-12-05 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 cc6414916738c..2acdcc173320c 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-12-02 +date: 2024-12-05 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 f9307526f4e79..482004a4a91a8 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-12-02 +date: 2024-12-05 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 d940a3c0b435f..8f3bfae7f219d 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-12-02 +date: 2024-12-05 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 7eb9787574eb7..c56fcbdc80657 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-12-02 +date: 2024-12-05 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 1f50e244c2de0..c41e6bd415dc1 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-12-02 +date: 2024-12-05 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 929c47f66768c..cf40558b1d07d 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-12-02 +date: 2024-12-05 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 f1cf2b72be140..78afcc9ac763d 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-12-02 +date: 2024-12-05 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 72de1cb21426b..8e0d9562d314a 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-12-02 +date: 2024-12-05 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 2cf8f1b4bcc23..a52b1fe929535 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-12-02 +date: 2024-12-05 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 8d09077f5a4c8..c446cbcb35a8e 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-12-02 +date: 2024-12-05 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 e36e965faca84..ac4c69658a6eb 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-12-02 +date: 2024-12-05 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 c2f7ca94cc468..bbbb33e24c127 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-12-02 +date: 2024-12-05 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 d8948647856e2..6e2f9a0d7edf0 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-mock'] --- import kbnSharedUxStorybookMockObj from './kbn_shared_ux_storybook_mock.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_tabbed_modal.mdx b/api_docs/kbn_shared_ux_tabbed_modal.mdx index 58cbe464de16e..2ab9a355f339f 100644 --- a/api_docs/kbn_shared_ux_tabbed_modal.mdx +++ b/api_docs/kbn_shared_ux_tabbed_modal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-tabbed-modal title: "@kbn/shared-ux-tabbed-modal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-tabbed-modal plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-tabbed-modal'] --- import kbnSharedUxTabbedModalObj from './kbn_shared_ux_tabbed_modal.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_table_persist.mdx b/api_docs/kbn_shared_ux_table_persist.mdx index d69f0cd24db68..4a1be765fae64 100644 --- a/api_docs/kbn_shared_ux_table_persist.mdx +++ b/api_docs/kbn_shared_ux_table_persist.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-table-persist title: "@kbn/shared-ux-table-persist" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-table-persist plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-table-persist'] --- import kbnSharedUxTablePersistObj from './kbn_shared_ux_table_persist.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index f87c300fcc707..c474cfa289d3b 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-12-02 +date: 2024-12-05 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.devdocs.json b/api_docs/kbn_slo_schema.devdocs.json index 13f17bcf471b8..57d2f788dc036 100644 --- a/api_docs/kbn_slo_schema.devdocs.json +++ b/api_docs/kbn_slo_schema.devdocs.json @@ -606,7 +606,7 @@ "label": "CreateSLOInput", "description": [], "signature": [ - "{ name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }; timeWindow: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; } & { id?: string | undefined; settings?: { syncDelay?: string | undefined; frequency?: string | undefined; preventInitialBackfill?: boolean | undefined; } | undefined; tags?: string[] | undefined; groupBy?: string | string[] | undefined; revision?: number | undefined; }" + "{ name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }; timeWindow: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; } & { id?: string | undefined; settings?: { syncDelay?: string | undefined; frequency?: string | undefined; preventInitialBackfill?: boolean | undefined; syncField?: string | null | undefined; } | undefined; tags?: string[] | undefined; groupBy?: string | string[] | undefined; revision?: number | undefined; }" ], "path": "x-pack/packages/kbn-slo-schema/src/rest_specs/routes/create.ts", "deprecated": false, @@ -661,7 +661,7 @@ "section": "def-common.Duration", "text": "Duration" }, - " | undefined; preventInitialBackfill?: boolean | undefined; } | undefined; tags?: string[] | undefined; groupBy?: string | string[] | undefined; revision?: number | undefined; }" + " | undefined; preventInitialBackfill?: boolean | undefined; syncField?: string | null | undefined; } | undefined; tags?: string[] | undefined; groupBy?: string | string[] | undefined; revision?: number | undefined; }" ], "path": "x-pack/packages/kbn-slo-schema/src/rest_specs/routes/create.ts", "deprecated": false, @@ -835,7 +835,7 @@ "label": "FindSLODefinitionsResponse", "description": [], "signature": [ - "{ page: number; perPage: number; total: number; results: { id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }; timeWindow: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; settings: { syncDelay: string; frequency: string; preventInitialBackfill: boolean; }; revision: number; enabled: boolean; tags: string[]; createdAt: string; updatedAt: string; groupBy: string | string[]; version: number; }[]; }" + "{ page: number; perPage: number; total: number; results: { id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }; timeWindow: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; settings: { syncDelay: string; frequency: string; preventInitialBackfill: boolean; } & { syncField?: string | null | undefined; }; revision: number; enabled: boolean; tags: string[]; createdAt: string; updatedAt: string; groupBy: string | string[]; version: number; }[]; }" ], "path": "x-pack/packages/kbn-slo-schema/src/rest_specs/routes/find_definition.ts", "deprecated": false, @@ -895,7 +895,7 @@ "label": "FindSLOResponse", "description": [], "signature": [ - "{ page: number; perPage: number; total: number; results: ({ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }; timeWindow: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; settings: { syncDelay: string; frequency: string; preventInitialBackfill: boolean; }; revision: number; enabled: boolean; tags: string[]; createdAt: string; updatedAt: string; groupBy: string | string[]; version: number; } & { summary: { status: \"HEALTHY\" | \"NO_DATA\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; fiveMinuteBurnRate: number; oneHourBurnRate: number; oneDayBurnRate: number; } & { summaryUpdatedAt?: string | null | undefined; }; groupings: { [x: string]: string | number; }; } & { instanceId?: string | undefined; meta?: { synthetics?: { monitorId: string; locationId: string; configId: string; } | undefined; } | undefined; remote?: { remoteName: string; kibanaUrl: string; } | undefined; })[]; }" + "{ page: number; perPage: number; total: number; results: ({ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }; timeWindow: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; settings: { syncDelay: string; frequency: string; preventInitialBackfill: boolean; } & { syncField?: string | null | undefined; }; revision: number; enabled: boolean; tags: string[]; createdAt: string; updatedAt: string; groupBy: string | string[]; version: number; } & { summary: { status: \"HEALTHY\" | \"NO_DATA\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; fiveMinuteBurnRate: number; oneHourBurnRate: number; oneDayBurnRate: number; } & { summaryUpdatedAt?: string | null | undefined; }; groupings: { [x: string]: string | number; }; } & { instanceId?: string | undefined; meta?: { synthetics?: { monitorId: string; locationId: string; configId: string; } | undefined; } | undefined; remote?: { remoteName: string; kibanaUrl: string; } | undefined; })[]; }" ], "path": "x-pack/packages/kbn-slo-schema/src/rest_specs/routes/find.ts", "deprecated": false, @@ -993,7 +993,7 @@ "label": "GetSLOResponse", "description": [], "signature": [ - "{ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }; timeWindow: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; settings: { syncDelay: string; frequency: string; preventInitialBackfill: boolean; }; revision: number; enabled: boolean; tags: string[]; createdAt: string; updatedAt: string; groupBy: string | string[]; version: number; } & { summary: { status: \"HEALTHY\" | \"NO_DATA\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; fiveMinuteBurnRate: number; oneHourBurnRate: number; oneDayBurnRate: number; } & { summaryUpdatedAt?: string | null | undefined; }; groupings: { [x: string]: string | number; }; } & { instanceId?: string | undefined; meta?: { synthetics?: { monitorId: string; locationId: string; configId: string; } | undefined; } | undefined; remote?: { remoteName: string; kibanaUrl: string; } | undefined; }" + "{ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }; timeWindow: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; settings: { syncDelay: string; frequency: string; preventInitialBackfill: boolean; } & { syncField?: string | null | undefined; }; revision: number; enabled: boolean; tags: string[]; createdAt: string; updatedAt: string; groupBy: string | string[]; version: number; } & { summary: { status: \"HEALTHY\" | \"NO_DATA\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; fiveMinuteBurnRate: number; oneHourBurnRate: number; oneDayBurnRate: number; } & { summaryUpdatedAt?: string | null | undefined; }; groupings: { [x: string]: string | number; }; } & { instanceId?: string | undefined; meta?: { synthetics?: { monitorId: string; locationId: string; configId: string; } | undefined; } | undefined; remote?: { remoteName: string; kibanaUrl: string; } | undefined; }" ], "path": "x-pack/packages/kbn-slo-schema/src/rest_specs/routes/get.ts", "deprecated": false, @@ -1263,7 +1263,7 @@ "label": "ResetSLOResponse", "description": [], "signature": [ - "{ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }; timeWindow: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; settings: { syncDelay: string; frequency: string; preventInitialBackfill: boolean; }; revision: number; enabled: boolean; tags: string[]; createdAt: string; updatedAt: string; groupBy: string | string[]; version: number; }" + "{ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }; timeWindow: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; settings: { syncDelay: string; frequency: string; preventInitialBackfill: boolean; } & { syncField?: string | null | undefined; }; revision: number; enabled: boolean; tags: string[]; createdAt: string; updatedAt: string; groupBy: string | string[]; version: number; }" ], "path": "x-pack/packages/kbn-slo-schema/src/rest_specs/routes/reset.ts", "deprecated": false, @@ -1278,7 +1278,7 @@ "label": "SLODefinitionResponse", "description": [], "signature": [ - "{ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }; timeWindow: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; settings: { syncDelay: string; frequency: string; preventInitialBackfill: boolean; }; revision: number; enabled: boolean; tags: string[]; createdAt: string; updatedAt: string; groupBy: string | string[]; version: number; }" + "{ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }; timeWindow: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; settings: { syncDelay: string; frequency: string; preventInitialBackfill: boolean; } & { syncField?: string | null | undefined; }; revision: number; enabled: boolean; tags: string[]; createdAt: string; updatedAt: string; groupBy: string | string[]; version: number; }" ], "path": "x-pack/packages/kbn-slo-schema/src/rest_specs/slo.ts", "deprecated": false, @@ -1293,7 +1293,7 @@ "label": "SLOWithSummaryResponse", "description": [], "signature": [ - "{ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }; timeWindow: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; settings: { syncDelay: string; frequency: string; preventInitialBackfill: boolean; }; revision: number; enabled: boolean; tags: string[]; createdAt: string; updatedAt: string; groupBy: string | string[]; version: number; } & { summary: { status: \"HEALTHY\" | \"NO_DATA\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; fiveMinuteBurnRate: number; oneHourBurnRate: number; oneDayBurnRate: number; } & { summaryUpdatedAt?: string | null | undefined; }; groupings: { [x: string]: string | number; }; } & { instanceId?: string | undefined; meta?: { synthetics?: { monitorId: string; locationId: string; configId: string; } | undefined; } | undefined; remote?: { remoteName: string; kibanaUrl: string; } | undefined; }" + "{ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }; timeWindow: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; settings: { syncDelay: string; frequency: string; preventInitialBackfill: boolean; } & { syncField?: string | null | undefined; }; revision: number; enabled: boolean; tags: string[]; createdAt: string; updatedAt: string; groupBy: string | string[]; version: number; } & { summary: { status: \"HEALTHY\" | \"NO_DATA\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; fiveMinuteBurnRate: number; oneHourBurnRate: number; oneDayBurnRate: number; } & { summaryUpdatedAt?: string | null | undefined; }; groupings: { [x: string]: string | number; }; } & { instanceId?: string | undefined; meta?: { synthetics?: { monitorId: string; locationId: string; configId: string; } | undefined; } | undefined; remote?: { remoteName: string; kibanaUrl: string; } | undefined; }" ], "path": "x-pack/packages/kbn-slo-schema/src/rest_specs/slo.ts", "deprecated": false, @@ -1398,7 +1398,7 @@ "label": "UpdateSLOInput", "description": [], "signature": [ - "{ name?: string | undefined; description?: string | undefined; indicator?: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | undefined; timeWindow?: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; } | undefined; budgetingMethod?: \"occurrences\" | \"timeslices\" | undefined; objective?: ({ target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }) | undefined; settings?: { syncDelay?: string | undefined; frequency?: string | undefined; preventInitialBackfill?: boolean | undefined; } | undefined; tags?: string[] | undefined; groupBy?: string | string[] | undefined; }" + "{ name?: string | undefined; description?: string | undefined; indicator?: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | undefined; timeWindow?: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; } | undefined; budgetingMethod?: \"occurrences\" | \"timeslices\" | undefined; objective?: ({ target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }) | undefined; settings?: { syncDelay?: string | undefined; frequency?: string | undefined; preventInitialBackfill?: boolean | undefined; syncField?: string | null | undefined; } | undefined; tags?: string[] | undefined; groupBy?: string | string[] | undefined; }" ], "path": "x-pack/packages/kbn-slo-schema/src/rest_specs/routes/update.ts", "deprecated": false, @@ -1453,7 +1453,7 @@ "section": "def-common.Duration", "text": "Duration" }, - " | undefined; preventInitialBackfill?: boolean | undefined; } | undefined; tags?: string[] | undefined; groupBy?: string | string[] | undefined; }" + " | undefined; preventInitialBackfill?: boolean | undefined; syncField?: string | null | undefined; } | undefined; tags?: string[] | undefined; groupBy?: string | string[] | undefined; }" ], "path": "x-pack/packages/kbn-slo-schema/src/rest_specs/routes/update.ts", "deprecated": false, @@ -1468,7 +1468,7 @@ "label": "UpdateSLOResponse", "description": [], "signature": [ - "{ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }; timeWindow: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; settings: { syncDelay: string; frequency: string; preventInitialBackfill: boolean; }; revision: number; enabled: boolean; tags: string[]; createdAt: string; updatedAt: string; groupBy: string | string[]; version: number; }" + "{ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }; timeWindow: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; settings: { syncDelay: string; frequency: string; preventInitialBackfill: boolean; } & { syncField?: string | null | undefined; }; revision: number; enabled: boolean; tags: string[]; createdAt: string; updatedAt: string; groupBy: string | string[]; version: number; }" ], "path": "x-pack/packages/kbn-slo-schema/src/rest_specs/routes/update.ts", "deprecated": false, @@ -3250,7 +3250,13 @@ }, ", string, unknown>; preventInitialBackfill: ", "BooleanC", - "; }>; tags: ", + "; syncField: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; }>; tags: ", "ArrayC", "<", "StringC", @@ -5171,6 +5177,8 @@ "text": "Duration" }, ", string, unknown>; }>]>; settings: ", + "IntersectionC", + "<[", "TypeC", "<{ syncDelay: ", "Type", @@ -5194,7 +5202,15 @@ }, ", string, unknown>; preventInitialBackfill: ", "BooleanC", - "; }>; revision: ", + "; }>, ", + "PartialC", + "<{ syncField: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; }>]>; revision: ", "NumberC", "; enabled: ", "BooleanC", @@ -6811,6 +6827,8 @@ "text": "Duration" }, ", string, unknown>; }>]>; settings: ", + "IntersectionC", + "<[", "TypeC", "<{ syncDelay: ", "Type", @@ -6834,7 +6852,15 @@ }, ", string, unknown>; preventInitialBackfill: ", "BooleanC", - "; }>; revision: ", + "; }>, ", + "PartialC", + "<{ syncField: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; }>]>; revision: ", "NumberC", "; enabled: ", "BooleanC", @@ -9945,6 +9971,8 @@ "text": "Duration" }, ", string, unknown>; }>]>; settings: ", + "IntersectionC", + "<[", "TypeC", "<{ syncDelay: ", "Type", @@ -9968,7 +9996,15 @@ }, ", string, unknown>; preventInitialBackfill: ", "BooleanC", - "; }>; revision: ", + "; }>, ", + "PartialC", + "<{ syncField: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; }>]>; revision: ", "NumberC", "; enabled: ", "BooleanC", @@ -12867,7 +12903,13 @@ }, ", string, unknown>; preventInitialBackfill: ", "BooleanC", - "; }>" + "; syncField: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; }>" ], "path": "x-pack/packages/kbn-slo-schema/src/schema/slo.ts", "deprecated": false, @@ -14444,6 +14486,8 @@ "text": "Duration" }, ", string, unknown>; }>]>; settings: ", + "IntersectionC", + "<[", "TypeC", "<{ syncDelay: ", "Type", @@ -14467,7 +14511,15 @@ }, ", string, unknown>; preventInitialBackfill: ", "BooleanC", - "; }>; revision: ", + "; }>, ", + "PartialC", + "<{ syncField: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; }>]>; revision: ", "NumberC", "; enabled: ", "BooleanC", @@ -14554,6 +14606,8 @@ "label": "settingsSchema", "description": [], "signature": [ + "IntersectionC", + "<[", "TypeC", "<{ syncDelay: ", "Type", @@ -14577,7 +14631,15 @@ }, ", string, unknown>; preventInitialBackfill: ", "BooleanC", - "; }>" + "; }>, ", + "PartialC", + "<{ syncField: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; }>]>" ], "path": "x-pack/packages/kbn-slo-schema/src/schema/slo.ts", "deprecated": false, @@ -15982,6 +16044,8 @@ "text": "Duration" }, ", string, unknown>; }>]>; settings: ", + "IntersectionC", + "<[", "TypeC", "<{ syncDelay: ", "Type", @@ -16005,7 +16069,15 @@ }, ", string, unknown>; preventInitialBackfill: ", "BooleanC", - "; }>; revision: ", + "; }>, ", + "PartialC", + "<{ syncField: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; }>]>; revision: ", "NumberC", "; enabled: ", "BooleanC", @@ -17562,6 +17634,8 @@ "text": "Duration" }, ", string, unknown>; }>]>; settings: ", + "IntersectionC", + "<[", "TypeC", "<{ syncDelay: ", "Type", @@ -17585,7 +17659,15 @@ }, ", string, unknown>; preventInitialBackfill: ", "BooleanC", - "; }>; revision: ", + "; }>, ", + "PartialC", + "<{ syncField: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; }>]>; revision: ", "NumberC", "; enabled: ", "BooleanC", @@ -20241,7 +20323,13 @@ }, ", string, unknown>; preventInitialBackfill: ", "BooleanC", - "; }>; tags: ", + "; syncField: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; }>; tags: ", "ArrayC", "<", "StringC", @@ -21664,6 +21752,8 @@ "text": "Duration" }, ", string, unknown>; }>]>; settings: ", + "IntersectionC", + "<[", "TypeC", "<{ syncDelay: ", "Type", @@ -21687,7 +21777,15 @@ }, ", string, unknown>; preventInitialBackfill: ", "BooleanC", - "; }>; revision: ", + "; }>, ", + "PartialC", + "<{ syncField: ", + "UnionC", + "<[", + "StringC", + ", ", + "NullC", + "]>; }>]>; revision: ", "NumberC", "; enabled: ", "BooleanC", diff --git a/api_docs/kbn_slo_schema.mdx b/api_docs/kbn_slo_schema.mdx index 0bbc2902a0c2b..c9640e76e5b91 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/slo-schema'] --- import kbnSloSchemaObj from './kbn_slo_schema.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index aafc262ed15f2..1147c8628b73b 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-12-02 +date: 2024-12-05 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 f9a01746e8a47..59288860028b0 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sort-predicates'] --- import kbnSortPredicatesObj from './kbn_sort_predicates.devdocs.json'; diff --git a/api_docs/kbn_sse_utils.mdx b/api_docs/kbn_sse_utils.mdx index b3af5d631d79e..d9c6dc6a006e0 100644 --- a/api_docs/kbn_sse_utils.mdx +++ b/api_docs/kbn_sse_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sse-utils title: "@kbn/sse-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/sse-utils plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sse-utils'] --- import kbnSseUtilsObj from './kbn_sse_utils.devdocs.json'; diff --git a/api_docs/kbn_sse_utils_client.mdx b/api_docs/kbn_sse_utils_client.mdx index 7fe6c574abd87..b011596f89319 100644 --- a/api_docs/kbn_sse_utils_client.mdx +++ b/api_docs/kbn_sse_utils_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sse-utils-client title: "@kbn/sse-utils-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/sse-utils-client plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sse-utils-client'] --- import kbnSseUtilsClientObj from './kbn_sse_utils_client.devdocs.json'; diff --git a/api_docs/kbn_sse_utils_server.devdocs.json b/api_docs/kbn_sse_utils_server.devdocs.json index add589a703b5e..dbf75dfc2083a 100644 --- a/api_docs/kbn_sse_utils_server.devdocs.json +++ b/api_docs/kbn_sse_utils_server.devdocs.json @@ -55,6 +55,45 @@ ], "returnComment": [], "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/sse-utils-server", + "id": "def-common.supertestToObservable", + "type": "Function", + "tags": [], + "label": "supertestToObservable", + "description": [ + "\nConvert a supertest response to an SSE observable.\n\nNote: the supertest response should *NOT* be awaited when using that utility,\nor at least not before calling it.\n" + ], + "signature": [ + "(response: ", + "Test", + ") => ", + "Observable", + "" + ], + "path": "packages/kbn-sse-utils-server/src/supertest_to_observable.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/sse-utils-server", + "id": "def-common.supertestToObservable.$1", + "type": "Object", + "tags": [], + "label": "response", + "description": [], + "signature": [ + "Test" + ], + "path": "packages/kbn-sse-utils-server/src/supertest_to_observable.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false } ], "interfaces": [], diff --git a/api_docs/kbn_sse_utils_server.mdx b/api_docs/kbn_sse_utils_server.mdx index c8c4fb686e0eb..cebfa7235f064 100644 --- a/api_docs/kbn_sse_utils_server.mdx +++ b/api_docs/kbn_sse_utils_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sse-utils-server title: "@kbn/sse-utils-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/sse-utils-server plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sse-utils-server'] --- import kbnSseUtilsServerObj from './kbn_sse_utils_server.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 | |-------------------|-----------|------------------------|-----------------| -| 2 | 0 | 2 | 0 | +| 4 | 0 | 3 | 0 | ## Common diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index 42f8e490e1efa..cacd4078dc9f0 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-12-02 +date: 2024-12-05 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 15f1cea43d816..14ded0c87e2f6 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-12-02 +date: 2024-12-05 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 677530dd46327..3837fd10aba3e 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook'] --- import kbnStorybookObj from './kbn_storybook.devdocs.json'; diff --git a/api_docs/kbn_synthetics_e2e.mdx b/api_docs/kbn_synthetics_e2e.mdx index d2f64ca0aec97..596a8d5f9ede5 100644 --- a/api_docs/kbn_synthetics_e2e.mdx +++ b/api_docs/kbn_synthetics_e2e.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-synthetics-e2e title: "@kbn/synthetics-e2e" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/synthetics-e2e plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/synthetics-e2e'] --- import kbnSyntheticsE2eObj from './kbn_synthetics_e2e.devdocs.json'; diff --git a/api_docs/kbn_synthetics_private_location.mdx b/api_docs/kbn_synthetics_private_location.mdx index b96843778e9ea..c706181bdbeea 100644 --- a/api_docs/kbn_synthetics_private_location.mdx +++ b/api_docs/kbn_synthetics_private_location.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-synthetics-private-location title: "@kbn/synthetics-private-location" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/synthetics-private-location plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/synthetics-private-location'] --- import kbnSyntheticsPrivateLocationObj from './kbn_synthetics_private_location.devdocs.json'; diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx index 7cda46839f276..188bdf4c20e5e 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools'] --- import kbnTelemetryToolsObj from './kbn_telemetry_tools.devdocs.json'; diff --git a/api_docs/kbn_test.devdocs.json b/api_docs/kbn_test.devdocs.json index d06c2234a316d..85e09a0c2b0bc 100644 --- a/api_docs/kbn_test.devdocs.json +++ b/api_docs/kbn_test.devdocs.json @@ -2167,6 +2167,112 @@ } ], "functions": [ + { + "parentPluginId": "@kbn/test", + "id": "def-common.cleanupElasticsearch", + "type": "Function", + "tags": [], + "label": "cleanupElasticsearch", + "description": [], + "signature": [ + "(node: ", + { + "pluginId": "@kbn/test", + "scope": "common", + "docId": "kibKbnTestPluginApi", + "section": "def-common.ICluster", + "text": "ICluster" + }, + ", isServerless: boolean, logsDir: string | undefined, log: ", + { + "pluginId": "@kbn/tooling-log", + "scope": "common", + "docId": "kibKbnToolingLogPluginApi", + "section": "def-common.ToolingLog", + "text": "ToolingLog" + }, + ") => Promise" + ], + "path": "packages/kbn-test/src/functional_tests/lib/run_elasticsearch.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/test", + "id": "def-common.cleanupElasticsearch.$1", + "type": "Object", + "tags": [], + "label": "node", + "description": [], + "signature": [ + { + "pluginId": "@kbn/test", + "scope": "common", + "docId": "kibKbnTestPluginApi", + "section": "def-common.ICluster", + "text": "ICluster" + } + ], + "path": "packages/kbn-test/src/functional_tests/lib/run_elasticsearch.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/test", + "id": "def-common.cleanupElasticsearch.$2", + "type": "boolean", + "tags": [], + "label": "isServerless", + "description": [], + "signature": [ + "boolean" + ], + "path": "packages/kbn-test/src/functional_tests/lib/run_elasticsearch.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/test", + "id": "def-common.cleanupElasticsearch.$3", + "type": "string", + "tags": [], + "label": "logsDir", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-test/src/functional_tests/lib/run_elasticsearch.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + }, + { + "parentPluginId": "@kbn/test", + "id": "def-common.cleanupElasticsearch.$4", + "type": "Object", + "tags": [], + "label": "log", + "description": [], + "signature": [ + { + "pluginId": "@kbn/tooling-log", + "scope": "common", + "docId": "kibKbnToolingLogPluginApi", + "section": "def-common.ToolingLog", + "text": "ToolingLog" + } + ], + "path": "packages/kbn-test/src/functional_tests/lib/run_elasticsearch.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/test", "id": "def-common.createAsyncInstance", diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx index e1edd7ea33cfd..caaa930e0b2e5 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] --- import kbnTestObj from './kbn_test.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 | |-------------------|-----------|------------------------|-----------------| -| 353 | 4 | 298 | 14 | +| 358 | 4 | 303 | 14 | ## Common diff --git a/api_docs/kbn_test_eui_helpers.mdx b/api_docs/kbn_test_eui_helpers.mdx index 3621488774704..49443b0f2b540 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-12-02 +date: 2024-12-05 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 d6ef9207d6801..5f86aedaeaa0c 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-12-02 +date: 2024-12-05 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.devdocs.json b/api_docs/kbn_test_subj_selector.devdocs.json index 2ab9cc3c4a7a3..dafcf5ceb970e 100644 --- a/api_docs/kbn_test_subj_selector.devdocs.json +++ b/api_docs/kbn_test_subj_selector.devdocs.json @@ -26,7 +26,7 @@ "tags": [], "label": "subj", "description": [ - "\nConverts a testSubject selector into a CSS selector.\n\ntestSubject selector syntax rules:\n\n - `data-test-subj` values can include spaces\n\n - prefixing a value with `*` will allow matching a `data-test-subj` attribute containing at least one occurrence of value within the string.\n - example: `*foo`\n - css equivalent: `[data-test-subj*=\"foo\"]`\n - DOM match example:
data-test-subj=\"bar-foo\"
\n\n - prefixing a value with `~` will allow matching a `data-test-subj` attribute represented as a whitespace-separated list of words, one of which is exactly value\n - example: `~foo`\n - css equivalent: `[data-test-subj~=\"foo\"]`\n - DOM match example:
data-test-subj=\"foo bar\"
\n\n - the `>` character is used between two values to indicate that the value on the right must match an element inside an element matched by the value on the left\n - example: `foo > bar`\n - css equivalent: `[data-test-subj=foo] [data-test-subj=bar]`\n - DOM match example:\n
data-test-subj=\"foo\"\n
data-test-subj=\"bar\"
\n
\n\n - the `&` character is used between two values to indicate that the value on both sides must both match the element\n - example: `foo & bar`\n - css equivalent: `[data-test-subj=foo][data-test-subj=bar]`\n - DOM match example:
data-test-subj=\"foo bar\"
" + "\nConverts a testSubject selector into a CSS selector.\n\ntestSubject selector syntax rules:\n\n - `data-test-subj` values can include spaces\n\n - prefixing a value with `*` will allow matching a `data-test-subj` attribute containing at least one occurrence of value within the string.\n - example: `*foo`\n - css equivalent: `[data-test-subj*=\"foo\"]`\n - DOM match example:
\n\n - prefixing a value with `^` will allow matching a `data-test-subj` attribute beginning with the specified value.\n - example: `^foo`\n - css equivalent: `[data-test-subj^=\"foo\"]`\n - DOM match example:
\n\n - prefixing a value with `~` will allow matching a `data-test-subj` attribute represented as a whitespace-separated list of words, one of which is exactly value\n - example: `~foo`\n - css equivalent: `[data-test-subj~=\"foo\"]`\n - DOM match example:
\n\n - the `>` character is used between two values to indicate that the value on the right must match an element inside an element matched by the value on the left\n - example: `foo > bar`\n - css equivalent: `[data-test-subj=foo] [data-test-subj=bar]`\n - DOM match example:\n
\n
\n
\n\n - the `&` character is used between two values to indicate that the value on both sides must both match the element\n - example: `foo & bar`\n - css equivalent: `[data-test-subj=foo][data-test-subj=bar]`\n - DOM match example:
" ], "signature": [ "(selector: string) => string" diff --git a/api_docs/kbn_test_subj_selector.mdx b/api_docs/kbn_test_subj_selector.mdx index ac51589df261f..bcf8c08d96cb0 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-subj-selector'] --- import kbnTestSubjSelectorObj from './kbn_test_subj_selector.devdocs.json'; diff --git a/api_docs/kbn_timerange.mdx b/api_docs/kbn_timerange.mdx index 2d7bad138542c..e9c51c80bff42 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-12-02 +date: 2024-12-05 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 7e699b9c7895f..c3c19c6e2707f 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_transpose_utils.mdx b/api_docs/kbn_transpose_utils.mdx index a56714eee8cd0..7ba5f027e9993 100644 --- a/api_docs/kbn_transpose_utils.mdx +++ b/api_docs/kbn_transpose_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-transpose-utils title: "@kbn/transpose-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/transpose-utils plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/transpose-utils'] --- import kbnTransposeUtilsObj from './kbn_transpose_utils.devdocs.json'; diff --git a/api_docs/kbn_triggers_actions_ui_types.devdocs.json b/api_docs/kbn_triggers_actions_ui_types.devdocs.json index 2f521b77ee6ce..1801bba9a5515 100644 --- a/api_docs/kbn_triggers_actions_ui_types.devdocs.json +++ b/api_docs/kbn_triggers_actions_ui_types.devdocs.json @@ -110,7 +110,7 @@ "section": "def-common.RuleType", "text": "RuleType" }, - ", \"id\" | \"name\" | \"recoveryActionGroup\" | \"actionGroups\" | \"defaultActionGroupId\" | \"producer\" | \"minimumLicenseRequired\" | \"defaultScheduleInterval\" | \"ruleTaskTimeout\" | \"doesSetRecoveryContext\">" + ", \"id\" | \"name\" | \"recoveryActionGroup\" | \"actionGroups\" | \"defaultActionGroupId\" | \"category\" | \"producer\" | \"minimumLicenseRequired\" | \"defaultScheduleInterval\" | \"ruleTaskTimeout\" | \"doesSetRecoveryContext\">" ], "path": "packages/kbn-triggers-actions-ui-types/rule_types.ts", "deprecated": false, @@ -241,6 +241,51 @@ "deprecated": false, "trackAdoption": false, "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/triggers-actions-ui-types", + "id": "def-common.RuleTypeIndexWithDescriptions", + "type": "Type", + "tags": [], + "label": "RuleTypeIndexWithDescriptions", + "description": [], + "signature": [ + "Map" + ], + "path": "packages/kbn-triggers-actions-ui-types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/triggers-actions-ui-types", + "id": "def-common.RuleTypeWithDescription", + "type": "Type", + "tags": [], + "label": "RuleTypeWithDescription", + "description": [], + "signature": [ + { + "pluginId": "@kbn/triggers-actions-ui-types", + "scope": "common", + "docId": "kibKbnTriggersActionsUiTypesPluginApi", + "section": "def-common.RuleType", + "text": "RuleType" + }, + " & { description?: string | undefined; }" + ], + "path": "packages/kbn-triggers-actions-ui-types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false } ], "objects": [ diff --git a/api_docs/kbn_triggers_actions_ui_types.mdx b/api_docs/kbn_triggers_actions_ui_types.mdx index 856ad08954491..7a76b37e5528a 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/triggers-actions-ui-types'] --- import kbnTriggersActionsUiTypesObj from './kbn_triggers_actions_ui_types.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 | |-------------------|-----------|------------------------|-----------------| -| 15 | 0 | 15 | 0 | +| 17 | 0 | 17 | 0 | ## Common diff --git a/api_docs/kbn_try_in_console.mdx b/api_docs/kbn_try_in_console.mdx index 28e14cf9a57ff..8f523be047a8b 100644 --- a/api_docs/kbn_try_in_console.mdx +++ b/api_docs/kbn_try_in_console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-try-in-console title: "@kbn/try-in-console" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/try-in-console plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/try-in-console'] --- import kbnTryInConsoleObj from './kbn_try_in_console.devdocs.json'; diff --git a/api_docs/kbn_ts_projects.mdx b/api_docs/kbn_ts_projects.mdx index 4e1d2e4b9ffe1..88edc70deb634 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-12-02 +date: 2024-12-05 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 85c53fa2a7c69..fe9ba6657fdbf 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-12-02 +date: 2024-12-05 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 e9e878207e447..c1d1d422c7b0a 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-12-02 +date: 2024-12-05 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 c089b223ebbd8..c91d8bd2183b3 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-12-02 +date: 2024-12-05 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 d2255d6ea6b29..9fdc78b1aa38c 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-12-02 +date: 2024-12-05 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 a81acbd6022ed..6c63158f5fc69 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-12-02 +date: 2024-12-05 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 0e2d5b54cf136..b22ae3bb364a9 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-12-02 +date: 2024-12-05 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 bb3d1e8c01b2a..7b4012feffc81 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-12-02 +date: 2024-12-05 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 e3e311c195033..59baf075fb9b4 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unsaved-changes-badge'] --- import kbnUnsavedChangesBadgeObj from './kbn_unsaved_changes_badge.devdocs.json'; diff --git a/api_docs/kbn_unsaved_changes_prompt.mdx b/api_docs/kbn_unsaved_changes_prompt.mdx index 98d87f62582c6..44f992677f2cd 100644 --- a/api_docs/kbn_unsaved_changes_prompt.mdx +++ b/api_docs/kbn_unsaved_changes_prompt.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unsaved-changes-prompt title: "@kbn/unsaved-changes-prompt" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unsaved-changes-prompt plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unsaved-changes-prompt'] --- import kbnUnsavedChangesPromptObj from './kbn_unsaved_changes_prompt.devdocs.json'; diff --git a/api_docs/kbn_use_tracked_promise.mdx b/api_docs/kbn_use_tracked_promise.mdx index 9bf872c7bfcd3..2af23d5eb7500 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-12-02 +date: 2024-12-05 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 c424de92644cc..700263df9d6ca 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-12-02 +date: 2024-12-05 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 80535cb3a09fe..df388be4045c2 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-12-02 +date: 2024-12-05 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 146dd3ab96792..6894218660cc3 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-12-02 +date: 2024-12-05 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 d35e379f36429..b201178f04fad 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-12-02 +date: 2024-12-05 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 061b27d87b35d..ec8f70b04abb0 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-12-02 +date: 2024-12-05 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 7c543b978437c..c131b146a79f2 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-12-02 +date: 2024-12-05 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 ffc5b06e3a005..a00cd4de5c0f6 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-12-02 +date: 2024-12-05 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 c636479f27522..2b3655b4f7c96 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-12-02 +date: 2024-12-05 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.mdx b/api_docs/kbn_zod.mdx index 3769cbee83372..02522cb4a61a6 100644 --- a/api_docs/kbn_zod.mdx +++ b/api_docs/kbn_zod.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-zod title: "@kbn/zod" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/zod plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/zod'] --- import kbnZodObj from './kbn_zod.devdocs.json'; diff --git a/api_docs/kbn_zod_helpers.mdx b/api_docs/kbn_zod_helpers.mdx index e841ab2b7df64..3ef344eace2f1 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-12-02 +date: 2024-12-05 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 46dfb00ca5932..056ea08798a46 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] --- import kibanaOverviewObj from './kibana_overview.devdocs.json'; diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index 9a47eb68e31e8..3702555c30403 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-12-02 +date: 2024-12-05 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 79a034fc89588..f8771aa0535f7 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-12-02 +date: 2024-12-05 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 568976d9d9fbe..0d2731a0a307c 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-12-02 +date: 2024-12-05 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 013522ad1bafa..2aafc998767a6 100644 --- a/api_docs/lens.devdocs.json +++ b/api_docs/lens.devdocs.json @@ -665,7 +665,7 @@ "section": "def-common.Filter", "text": "Filter" }, - "[] | undefined>; isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; query$: ", + "[] | undefined>; isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; canEditUnifiedSearch?: (() => boolean) | undefined; query$: ", { "pluginId": "@kbn/presentation-publishing", "scope": "public", @@ -18289,7 +18289,7 @@ "section": "def-common.Filter", "text": "Filter" }, - "[] | undefined>; isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; query$: ", + "[] | undefined>; isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; canEditUnifiedSearch?: (() => boolean) | undefined; query$: ", { "pluginId": "@kbn/presentation-publishing", "scope": "public", @@ -20843,7 +20843,7 @@ "section": "def-common.Filter", "text": "Filter" }, - "[] | undefined>; isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; query$: ", + "[] | undefined>; isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; canEditUnifiedSearch?: (() => boolean) | undefined; query$: ", { "pluginId": "@kbn/presentation-publishing", "scope": "public", diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index 6a0b02570a33d..e6bdcac40ce95 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-12-02 +date: 2024-12-05 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 334d0461c8bf6..d286697bfc3e6 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseApiGuard plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard'] --- import licenseApiGuardObj from './license_api_guard.devdocs.json'; diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx index 399c8111cfb28..fae5d1b6a1044 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseManagement plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement'] --- import licenseManagementObj from './license_management.devdocs.json'; diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index 9c84b04df00ed..d71b97ac74c87 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-12-02 +date: 2024-12-05 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 5322898674308..2b05c97edcd09 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-12-02 +date: 2024-12-05 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 a2ddfe102baac..4963030c351da 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] --- import listsObj from './lists.devdocs.json'; diff --git a/api_docs/llm_tasks.mdx b/api_docs/llm_tasks.mdx index 9dfd74fa93a59..51dfe4c0368bc 100644 --- a/api_docs/llm_tasks.mdx +++ b/api_docs/llm_tasks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/llmTasks title: "llmTasks" image: https://source.unsplash.com/400x175/?github description: API docs for the llmTasks plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'llmTasks'] --- import llmTasksObj from './llm_tasks.devdocs.json'; diff --git a/api_docs/logs_data_access.mdx b/api_docs/logs_data_access.mdx index ac6538ce80f45..9430af534ee97 100644 --- a/api_docs/logs_data_access.mdx +++ b/api_docs/logs_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsDataAccess title: "logsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the logsDataAccess plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsDataAccess'] --- import logsDataAccessObj from './logs_data_access.devdocs.json'; diff --git a/api_docs/logs_explorer.mdx b/api_docs/logs_explorer.mdx index beed56181485c..b21975a42075f 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-12-02 +date: 2024-12-05 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 cdd2153840233..f806e45f3c9cd 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-12-02 +date: 2024-12-05 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 50bbaab97d879..52c6c65034c3a 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github description: API docs for the management plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] --- import managementObj from './management.devdocs.json'; diff --git a/api_docs/maps.devdocs.json b/api_docs/maps.devdocs.json index c26fbbab46075..9fc15f88d570b 100644 --- a/api_docs/maps.devdocs.json +++ b/api_docs/maps.devdocs.json @@ -3017,7 +3017,7 @@ "section": "def-public.PublishesFilters", "text": "PublishesFilters" }, - " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; query$: ", + " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; canEditUnifiedSearch?: (() => boolean) | undefined; query$: ", { "pluginId": "@kbn/presentation-publishing", "scope": "public", diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index 2dfe567417c7a..542cc753ed5e5 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-12-02 +date: 2024-12-05 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 8442eeb9f5d44..eada5bc1fbbcd 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-12-02 +date: 2024-12-05 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 ee4ee561797f2..709fe37157f55 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'metricsDataAccess'] --- import metricsDataAccessObj from './metrics_data_access.devdocs.json'; diff --git a/api_docs/ml.devdocs.json b/api_docs/ml.devdocs.json index 4133d3000fca3..484e9c66925f6 100644 --- a/api_docs/ml.devdocs.json +++ b/api_docs/ml.devdocs.json @@ -996,7 +996,7 @@ "section": "def-public.PublishesFilters", "text": "PublishesFilters" }, - " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; query$: ", + " & { isCompatibleWithUnifiedSearch?: (() => boolean) | undefined; canEditUnifiedSearch?: (() => boolean) | undefined; query$: ", { "pluginId": "@kbn/presentation-publishing", "scope": "public", @@ -1092,9 +1092,9 @@ "description": [], "signature": [ "MlTrainedModelConfig", - " & { pipelines?: Record | null | undefined; origin_job_exists?: boolean | undefined; metadata?: ({ analytics_config: ", + " & { metadata?: (", + "MlTrainedModelConfigMetadata", + " & { analytics_config?: ", { "pluginId": "@kbn/ml-data-frame-analytics-utils", "scope": "common", @@ -1102,7 +1102,7 @@ "section": "def-common.DataFrameAnalyticsConfig", "text": "DataFrameAnalyticsConfig" }, - "; input: unknown; total_feature_importance?: ", + " | undefined; input: unknown; total_feature_importance?: ", { "pluginId": "@kbn/ml-data-frame-analytics-utils", "scope": "common", @@ -1118,25 +1118,7 @@ "section": "def-common.FeatureImportanceBaseline", "text": "FeatureImportanceBaseline" }, - " | undefined; model_aliases?: string[] | undefined; } & Record) | undefined; model_id: string; model_type: ", - { - "pluginId": "@kbn/ml-trained-models-utils", - "scope": "common", - "docId": "kibKbnMlTrainedModelsUtilsPluginApi", - "section": "def-common.TrainedModelType", - "text": "TrainedModelType" - }, - "; tags: string[]; version: string; inference_config?: Record | undefined; indices?: Record[] | undefined; hasInferenceServices?: boolean | undefined; inference_apis?: ", - { - "pluginId": "@kbn/ml-trained-models-utils", - "scope": "common", - "docId": "kibKbnMlTrainedModelsUtilsPluginApi", - "section": "def-common.InferenceAPIConfigResponse", - "text": "InferenceAPIConfigResponse" - }, - "[] | undefined; }" + " | undefined; } & Record) | undefined; }" ], "path": "x-pack/plugins/ml/common/types/trained_models.ts", "deprecated": false, @@ -1643,6 +1625,8 @@ "InferenceQueryParams", " | undefined): Promise<", "TrainedModelConfigResponse", + "[]>; getTrainedModelsList(): Promise<", + "TrainedModelUIItem", "[]>; getTrainedModelStats(modelId?: string | string[] | undefined, params?: ", "InferenceStatsQueryParams", " | undefined): Promise<", @@ -3186,6 +3170,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "ml", + "id": "def-common.ML_RULE_TYPE_IDS", + "type": "Array", + "tags": [], + "label": "ML_RULE_TYPE_IDS", + "description": [], + "signature": [ + "(\"xpack.ml.anomaly_detection_alert\" | \"xpack.ml.anomaly_detection_jobs_health\")[]" + ], + "path": "x-pack/plugins/ml/common/constants/alerts.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "ml", "id": "def-common.SummaryJobState", diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index cd8f873117447..16ba0339dc6b2 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] --- import mlObj from './ml.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) for questi | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 148 | 3 | 63 | 104 | +| 149 | 3 | 64 | 104 | ## Client diff --git a/api_docs/mock_idp_plugin.mdx b/api_docs/mock_idp_plugin.mdx index 6fb0df788a69f..7597824780235 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-12-02 +date: 2024-12-05 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 7e6144c8da81c..48163e5eb5a95 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-12-02 +date: 2024-12-05 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 f2217a9c978da..00a3703e00386 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-12-02 +date: 2024-12-05 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 be99b3dfc8165..066ea166d2c12 100644 --- a/api_docs/navigation.devdocs.json +++ b/api_docs/navigation.devdocs.json @@ -554,7 +554,7 @@ "ToolTipPositions", " | undefined; anchorProps?: (", "CommonProps", - " & React.HTMLAttributes) | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"accentSecondary\" | \"hollow\" | undefined; size?: \"m\" | \"s\" | undefined; alignment?: \"middle\" | \"baseline\" | undefined; } & ", + " & React.HTMLAttributes) | undefined; title?: string | undefined; color?: \"warning\" | \"subdued\" | \"accent\" | \"accentSecondary\" | \"hollow\" | undefined; size?: \"m\" | \"s\" | undefined; alignment?: \"middle\" | \"baseline\" | undefined; } & ", "DisambiguateSet", " & LabelAsString) | (", "CommonProps", @@ -570,7 +570,7 @@ "ToolTipPositions", " | undefined; anchorProps?: (", "CommonProps", - " & React.HTMLAttributes) | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"accentSecondary\" | \"hollow\" | undefined; size?: \"m\" | \"s\" | undefined; alignment?: \"middle\" | \"baseline\" | undefined; } & ", + " & React.HTMLAttributes) | undefined; title?: string | undefined; color?: \"warning\" | \"subdued\" | \"accent\" | \"accentSecondary\" | \"hollow\" | undefined; size?: \"m\" | \"s\" | undefined; alignment?: \"middle\" | \"baseline\" | undefined; } & ", "DisambiguateSet", " & ", "DisambiguateSet", @@ -590,7 +590,7 @@ "ToolTipPositions", " | undefined; anchorProps?: (", "CommonProps", - " & React.HTMLAttributes) | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"accentSecondary\" | \"hollow\" | undefined; size?: \"m\" | \"s\" | undefined; alignment?: \"middle\" | \"baseline\" | undefined; } & ", + " & React.HTMLAttributes) | undefined; title?: string | undefined; color?: \"warning\" | \"subdued\" | \"accent\" | \"accentSecondary\" | \"hollow\" | undefined; size?: \"m\" | \"s\" | undefined; alignment?: \"middle\" | \"baseline\" | undefined; } & ", "DisambiguateSet", " & LabelAsString) | (", "CommonProps", @@ -608,7 +608,7 @@ "ToolTipPositions", " | undefined; anchorProps?: (", "CommonProps", - " & React.HTMLAttributes) | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"accentSecondary\" | \"hollow\" | undefined; size?: \"m\" | \"s\" | undefined; alignment?: \"middle\" | \"baseline\" | undefined; } & ", + " & React.HTMLAttributes) | undefined; title?: string | undefined; color?: \"warning\" | \"subdued\" | \"accent\" | \"accentSecondary\" | \"hollow\" | undefined; size?: \"m\" | \"s\" | undefined; alignment?: \"middle\" | \"baseline\" | undefined; } & ", "DisambiguateSet", " & ", "DisambiguateSet", @@ -628,7 +628,7 @@ "ToolTipPositions", " | undefined; anchorProps?: (", "CommonProps", - " & React.HTMLAttributes) | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"accentSecondary\" | \"hollow\" | undefined; size?: \"m\" | \"s\" | undefined; alignment?: \"middle\" | \"baseline\" | undefined; } & ", + " & React.HTMLAttributes) | undefined; title?: string | undefined; color?: \"warning\" | \"subdued\" | \"accent\" | \"accentSecondary\" | \"hollow\" | undefined; size?: \"m\" | \"s\" | undefined; alignment?: \"middle\" | \"baseline\" | undefined; } & ", "DisambiguateSet", " & ", "DisambiguateSet", @@ -648,7 +648,7 @@ "ToolTipPositions", " | undefined; anchorProps?: (", "CommonProps", - " & React.HTMLAttributes) | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"accentSecondary\" | \"hollow\" | undefined; size?: \"m\" | \"s\" | undefined; alignment?: \"middle\" | \"baseline\" | undefined; } & ", + " & React.HTMLAttributes) | undefined; title?: string | undefined; color?: \"warning\" | \"subdued\" | \"accent\" | \"accentSecondary\" | \"hollow\" | undefined; size?: \"m\" | \"s\" | undefined; alignment?: \"middle\" | \"baseline\" | undefined; } & ", "DisambiguateSet", " & LabelAsString) | (", "CommonProps", @@ -666,7 +666,7 @@ "ToolTipPositions", " | undefined; anchorProps?: (", "CommonProps", - " & React.HTMLAttributes) | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"accentSecondary\" | \"hollow\" | undefined; size?: \"m\" | \"s\" | undefined; alignment?: \"middle\" | \"baseline\" | undefined; } & ", + " & React.HTMLAttributes) | undefined; title?: string | undefined; color?: \"warning\" | \"subdued\" | \"accent\" | \"accentSecondary\" | \"hollow\" | undefined; size?: \"m\" | \"s\" | undefined; alignment?: \"middle\" | \"baseline\" | undefined; } & ", "DisambiguateSet", " & ", "DisambiguateSet", @@ -686,7 +686,7 @@ "ToolTipPositions", " | undefined; anchorProps?: (", "CommonProps", - " & React.HTMLAttributes) | undefined; title?: string | undefined; color?: \"subdued\" | \"accent\" | \"accentSecondary\" | \"hollow\" | undefined; size?: \"m\" | \"s\" | undefined; alignment?: \"middle\" | \"baseline\" | undefined; } & ", + " & React.HTMLAttributes) | undefined; title?: string | undefined; color?: \"warning\" | \"subdued\" | \"accent\" | \"accentSecondary\" | \"hollow\" | undefined; size?: \"m\" | \"s\" | undefined; alignment?: \"middle\" | \"baseline\" | undefined; } & ", "DisambiguateSet", " & ", "DisambiguateSet", diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index 1387535a7e9fe..1fbb7cef1ed2c 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation'] --- import navigationObj from './navigation.devdocs.json'; diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index 86a1e787a7e03..706b2d7175277 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-12-02 +date: 2024-12-05 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 4cd2f7acf0dda..f2f3ba21b0499 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-12-02 +date: 2024-12-05 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 14a9e7c33aa6c..1ff8e8763a00f 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.devdocs.json b/api_docs/observability.devdocs.json index 6f2110a875d2a..89b649746b7af 100644 --- a/api_docs/observability.devdocs.json +++ b/api_docs/observability.devdocs.json @@ -1008,7 +1008,7 @@ "label": "useAnnotations", "description": [], "signature": [ - "({ domain, editAnnotation, slo, setEditAnnotation, }?: { slo?: ({ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }; timeWindow: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; settings: { syncDelay: string; frequency: string; preventInitialBackfill: boolean; }; revision: number; enabled: boolean; tags: string[]; createdAt: string; updatedAt: string; groupBy: string | string[]; version: number; } & { summary: { status: \"HEALTHY\" | \"NO_DATA\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; fiveMinuteBurnRate: number; oneHourBurnRate: number; oneDayBurnRate: number; } & { summaryUpdatedAt?: string | null | undefined; }; groupings: { [x: string]: string | number; }; } & { instanceId?: string | undefined; meta?: { synthetics?: { monitorId: string; locationId: string; configId: string; } | undefined; } | undefined; remote?: { remoteName: string; kibanaUrl: string; } | undefined; }) | undefined; editAnnotation?: ({ id: string; } & { annotation: { title?: string | undefined; type?: string | undefined; style?: { icon?: string | undefined; color?: string | undefined; line?: { width?: number | undefined; style?: \"dashed\" | \"solid\" | \"dotted\" | undefined; iconPosition?: \"top\" | \"bottom\" | undefined; textDecoration?: \"none\" | \"name\" | undefined; } | undefined; rect?: { fill?: \"inside\" | \"outside\" | undefined; } | undefined; } | undefined; }; '@timestamp': string; message: string; } & { event?: ({ start: string; } & { end?: string | undefined; }) | undefined; tags?: string[] | undefined; service?: { name?: string | undefined; environment?: string | undefined; version?: string | undefined; } | undefined; monitor?: { id?: string | undefined; } | undefined; slo?: ({ id: string; } & { instanceId?: string | undefined; }) | undefined; host?: { name?: string | undefined; } | undefined; }) | null | undefined; setEditAnnotation?: ((annotation: ({ id: string; } & { annotation: { title?: string | undefined; type?: string | undefined; style?: { icon?: string | undefined; color?: string | undefined; line?: { width?: number | undefined; style?: \"dashed\" | \"solid\" | \"dotted\" | undefined; iconPosition?: \"top\" | \"bottom\" | undefined; textDecoration?: \"none\" | \"name\" | undefined; } | undefined; rect?: { fill?: \"inside\" | \"outside\" | undefined; } | undefined; } | undefined; }; '@timestamp': string; message: string; } & { event?: ({ start: string; } & { end?: string | undefined; }) | undefined; tags?: string[] | undefined; service?: { name?: string | undefined; environment?: string | undefined; version?: string | undefined; } | undefined; monitor?: { id?: string | undefined; } | undefined; slo?: ({ id: string; } & { instanceId?: string | undefined; }) | undefined; host?: { name?: string | undefined; } | undefined; }) | null) => void) | undefined; domain?: { min: string | number; max: string | number; } | undefined; }) => { annotations: ({ id: string; } & { annotation: { title?: string | undefined; type?: string | undefined; style?: { icon?: string | undefined; color?: string | undefined; line?: { width?: number | undefined; style?: \"dashed\" | \"solid\" | \"dotted\" | undefined; iconPosition?: \"top\" | \"bottom\" | undefined; textDecoration?: \"none\" | \"name\" | undefined; } | undefined; rect?: { fill?: \"inside\" | \"outside\" | undefined; } | undefined; } | undefined; }; '@timestamp': string; message: string; } & { event?: ({ start: string; } & { end?: string | undefined; }) | undefined; tags?: string[] | undefined; service?: { name?: string | undefined; environment?: string | undefined; version?: string | undefined; } | undefined; monitor?: { id?: string | undefined; } | undefined; slo?: ({ id: string; } & { instanceId?: string | undefined; }) | undefined; host?: { name?: string | undefined; } | undefined; })[]; onAnnotationClick: (annotations: { rects: ", + "({ domain, editAnnotation, slo, setEditAnnotation, }?: { slo?: ({ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }; timeWindow: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; settings: { syncDelay: string; frequency: string; preventInitialBackfill: boolean; } & { syncField?: string | null | undefined; }; revision: number; enabled: boolean; tags: string[]; createdAt: string; updatedAt: string; groupBy: string | string[]; version: number; } & { summary: { status: \"HEALTHY\" | \"NO_DATA\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; fiveMinuteBurnRate: number; oneHourBurnRate: number; oneDayBurnRate: number; } & { summaryUpdatedAt?: string | null | undefined; }; groupings: { [x: string]: string | number; }; } & { instanceId?: string | undefined; meta?: { synthetics?: { monitorId: string; locationId: string; configId: string; } | undefined; } | undefined; remote?: { remoteName: string; kibanaUrl: string; } | undefined; }) | undefined; editAnnotation?: ({ id: string; } & { annotation: { title?: string | undefined; type?: string | undefined; style?: { icon?: string | undefined; color?: string | undefined; line?: { width?: number | undefined; style?: \"dashed\" | \"solid\" | \"dotted\" | undefined; iconPosition?: \"top\" | \"bottom\" | undefined; textDecoration?: \"none\" | \"name\" | undefined; } | undefined; rect?: { fill?: \"inside\" | \"outside\" | undefined; } | undefined; } | undefined; }; '@timestamp': string; message: string; } & { event?: ({ start: string; } & { end?: string | undefined; }) | undefined; tags?: string[] | undefined; service?: { name?: string | undefined; environment?: string | undefined; version?: string | undefined; } | undefined; monitor?: { id?: string | undefined; } | undefined; slo?: ({ id: string; } & { instanceId?: string | undefined; }) | undefined; host?: { name?: string | undefined; } | undefined; }) | null | undefined; setEditAnnotation?: ((annotation: ({ id: string; } & { annotation: { title?: string | undefined; type?: string | undefined; style?: { icon?: string | undefined; color?: string | undefined; line?: { width?: number | undefined; style?: \"dashed\" | \"solid\" | \"dotted\" | undefined; iconPosition?: \"top\" | \"bottom\" | undefined; textDecoration?: \"none\" | \"name\" | undefined; } | undefined; rect?: { fill?: \"inside\" | \"outside\" | undefined; } | undefined; } | undefined; }; '@timestamp': string; message: string; } & { event?: ({ start: string; } & { end?: string | undefined; }) | undefined; tags?: string[] | undefined; service?: { name?: string | undefined; environment?: string | undefined; version?: string | undefined; } | undefined; monitor?: { id?: string | undefined; } | undefined; slo?: ({ id: string; } & { instanceId?: string | undefined; }) | undefined; host?: { name?: string | undefined; } | undefined; }) | null) => void) | undefined; domain?: { min: string | number; max: string | number; } | undefined; }) => { annotations: ({ id: string; } & { annotation: { title?: string | undefined; type?: string | undefined; style?: { icon?: string | undefined; color?: string | undefined; line?: { width?: number | undefined; style?: \"dashed\" | \"solid\" | \"dotted\" | undefined; iconPosition?: \"top\" | \"bottom\" | undefined; textDecoration?: \"none\" | \"name\" | undefined; } | undefined; rect?: { fill?: \"inside\" | \"outside\" | undefined; } | undefined; } | undefined; }; '@timestamp': string; message: string; } & { event?: ({ start: string; } & { end?: string | undefined; }) | undefined; tags?: string[] | undefined; service?: { name?: string | undefined; environment?: string | undefined; version?: string | undefined; } | undefined; monitor?: { id?: string | undefined; } | undefined; slo?: ({ id: string; } & { instanceId?: string | undefined; }) | undefined; host?: { name?: string | undefined; } | undefined; })[]; onAnnotationClick: (annotations: { rects: ", "RectAnnotationEvent", "[]; lines: ", "LineAnnotationEvent", @@ -1045,7 +1045,7 @@ "label": "slo", "description": [], "signature": [ - "({ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }; timeWindow: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; settings: { syncDelay: string; frequency: string; preventInitialBackfill: boolean; }; revision: number; enabled: boolean; tags: string[]; createdAt: string; updatedAt: string; groupBy: string | string[]; version: number; } & { summary: { status: \"HEALTHY\" | \"NO_DATA\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; fiveMinuteBurnRate: number; oneHourBurnRate: number; oneDayBurnRate: number; } & { summaryUpdatedAt?: string | null | undefined; }; groupings: { [x: string]: string | number; }; } & { instanceId?: string | undefined; meta?: { synthetics?: { monitorId: string; locationId: string; configId: string; } | undefined; } | undefined; remote?: { remoteName: string; kibanaUrl: string; } | undefined; }) | undefined" + "({ id: string; name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }; timeWindow: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; settings: { syncDelay: string; frequency: string; preventInitialBackfill: boolean; } & { syncField?: string | null | undefined; }; revision: number; enabled: boolean; tags: string[]; createdAt: string; updatedAt: string; groupBy: string | string[]; version: number; } & { summary: { status: \"HEALTHY\" | \"NO_DATA\" | \"DEGRADING\" | \"VIOLATED\"; sliValue: number; errorBudget: { initial: number; consumed: number; remaining: number; isEstimated: boolean; }; fiveMinuteBurnRate: number; oneHourBurnRate: number; oneDayBurnRate: number; } & { summaryUpdatedAt?: string | null | undefined; }; groupings: { [x: string]: string | number; }; } & { instanceId?: string | undefined; meta?: { synthetics?: { monitorId: string; locationId: string; configId: string; } | undefined; } | undefined; remote?: { remoteName: string; kibanaUrl: string; } | undefined; }) | undefined" ], "path": "x-pack/plugins/observability_solution/observability/public/components/annotations/use_annotations.tsx", "deprecated": false, diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 0ecefc402d4db..76fe12c04e84a 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-12-02 +date: 2024-12-05 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 a11aa4c4548bd..322e88d27cdf3 100644 --- a/api_docs/observability_a_i_assistant.devdocs.json +++ b/api_docs/observability_a_i_assistant.devdocs.json @@ -2418,18 +2418,8 @@ "<{ id: ", "StringC", "; text: ", - "BrandC", - "<", "StringC", - ", ", - { - "pluginId": "@kbn/io-ts-utils", - "scope": "common", - "docId": "kibKbnIoTsUtilsPluginApi", - "section": "def-common.NonEmptyStringBrand", - "text": "NonEmptyStringBrand" - }, - ">; public: ", + "; public: ", "Type", "; }>; }>, ", "ObservabilityAIAssistantRouteHandlerResources", @@ -3398,18 +3388,8 @@ "<{ id: ", "StringC", "; text: ", - "BrandC", - "<", "StringC", - ", ", - { - "pluginId": "@kbn/io-ts-utils", - "scope": "common", - "docId": "kibKbnIoTsUtilsPluginApi", - "section": "def-common.NonEmptyStringBrand", - "text": "NonEmptyStringBrand" - }, - ">; public: ", + "; public: ", "Type", "; }>; }>, ", "ObservabilityAIAssistantRouteHandlerResources", @@ -5115,18 +5095,8 @@ "<{ id: ", "StringC", "; text: ", - "BrandC", - "<", "StringC", - ", ", - { - "pluginId": "@kbn/io-ts-utils", - "scope": "common", - "docId": "kibKbnIoTsUtilsPluginApi", - "section": "def-common.NonEmptyStringBrand", - "text": "NonEmptyStringBrand" - }, - ">; public: ", + "; public: ", "Type", "; }>; }>, ", "ObservabilityAIAssistantRouteHandlerResources", @@ -6322,18 +6292,8 @@ "<{ id: ", "StringC", "; text: ", - "BrandC", - "<", "StringC", - ", ", - { - "pluginId": "@kbn/io-ts-utils", - "scope": "common", - "docId": "kibKbnIoTsUtilsPluginApi", - "section": "def-common.NonEmptyStringBrand", - "text": "NonEmptyStringBrand" - }, - ">; public: ", + "; public: ", "Type", "; }>; }>, ", "ObservabilityAIAssistantRouteHandlerResources", @@ -7301,7 +7261,17 @@ "section": "def-common.AssistantScope", "text": "AssistantScope" }, - "[]; }; }" + "[]; }; } | { type: ", + { + "pluginId": "observabilityAIAssistant", + "scope": "public", + "docId": "kibObservabilityAIAssistantPluginApi", + "section": "def-public.ObservabilityAIAssistantTelemetryEventType", + "text": "ObservabilityAIAssistantTelemetryEventType" + }, + ".InsightResponse; payload: ", + "InsightResponse", + "; }" ], "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/analytics/index.ts", "deprecated": false, @@ -8062,18 +8032,8 @@ "<{ id: ", "StringC", "; text: ", - "BrandC", - "<", "StringC", - ", ", - { - "pluginId": "@kbn/io-ts-utils", - "scope": "common", - "docId": "kibKbnIoTsUtilsPluginApi", - "section": "def-common.NonEmptyStringBrand", - "text": "NonEmptyStringBrand" - }, - ">; public: ", + "; public: ", "Type", "; }>; }>, ", "ObservabilityAIAssistantRouteHandlerResources", diff --git a/api_docs/observability_a_i_assistant.mdx b/api_docs/observability_a_i_assistant.mdx index b9cc8713bcabd..ac398a6a63ff6 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistant'] --- import observabilityAIAssistantObj from './observability_a_i_assistant.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 296 | 1 | 294 | 27 | +| 296 | 1 | 294 | 28 | ## Client diff --git a/api_docs/observability_a_i_assistant_app.mdx b/api_docs/observability_a_i_assistant_app.mdx index 8e13b3ad2bb4a..64b91c74f67e5 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistantApp'] --- import observabilityAIAssistantAppObj from './observability_a_i_assistant_app.devdocs.json'; diff --git a/api_docs/observability_ai_assistant_management.mdx b/api_docs/observability_ai_assistant_management.mdx index 912f1c3c5d276..b9de9b86b93a4 100644 --- a/api_docs/observability_ai_assistant_management.mdx +++ b/api_docs/observability_ai_assistant_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAiAssistantManagement title: "observabilityAiAssistantManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAiAssistantManagement plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAiAssistantManagement'] --- import observabilityAiAssistantManagementObj from './observability_ai_assistant_management.devdocs.json'; diff --git a/api_docs/observability_logs_explorer.mdx b/api_docs/observability_logs_explorer.mdx index 467f871f888fd..748111ef2e697 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-12-02 +date: 2024-12-05 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 47e1c25101893..9637ce0f978ea 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-12-02 +date: 2024-12-05 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 4ed172ebec110..8eb7b713ce5d5 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-12-02 +date: 2024-12-05 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 98b5c4e023efd..7fb8c83b4ca75 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-12-02 +date: 2024-12-05 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 eba9b2d11bccd..1df633c972a10 100644 --- a/api_docs/painless_lab.mdx +++ b/api_docs/painless_lab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/painlessLab title: "painlessLab" image: https://source.unsplash.com/400x175/?github description: API docs for the painlessLab plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'painlessLab'] --- import painlessLabObj from './painless_lab.devdocs.json'; diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index 8d667ce81b59d..64cf6c4638b13 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -15,25 +15,26 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Count | Plugins or Packages with a
public API | Number of teams | |--------------|----------|------------------------| -| 895 | 762 | 43 | +| 898 | 765 | 43 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 54698 | 240 | 41110 | 2031 | +| 54976 | 240 | 41347 | 2038 | ## 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) | - | 322 | 0 | 316 | 37 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 321 | 0 | 315 | 37 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 2 | 0 | | | [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai-assistant) | - | 4 | 0 | 4 | 1 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | AIOps plugin maintained by ML team. | 72 | 0 | 8 | 2 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 881 | 1 | 849 | 50 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 872 | 1 | 839 | 50 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | The user interface for Elastic APM | 29 | 0 | 29 | 119 | -| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 86 | 0 | 86 | 3 | +| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 93 | 0 | 93 | 3 | +| | [@elastic/kibana-cloud-security-posture](https://github.com/orgs/elastic/teams/kibana-cloud-security-posture) | Centralized asset inventory experience within the Elastic Security solution. A central place for users to view and manage all their assets from different environments | 6 | 0 | 6 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 9 | 0 | 9 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Considering using bfetch capabilities when fetching large amounts of data. This services supports batching HTTP requests and streaming responses back. | 60 | 1 | 59 | 2 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds Canvas application to Kibana | 9 | 0 | 8 | 3 | @@ -53,7 +54,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | crossClusterReplication | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 0 | 0 | 0 | 0 | | customBranding | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Enables customization of Kibana | 0 | 0 | 0 | 0 | | | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | Add custom data integrations so they can be displayed in the Fleet integrations app | 268 | 0 | 249 | 1 | -| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds the Dashboard app to Kibana | 114 | 0 | 111 | 13 | +| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds the Dashboard app to Kibana | 114 | 0 | 111 | 14 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 54 | 0 | 51 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3209 | 31 | 2594 | 24 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 6 | 0 | 6 | 0 | @@ -69,13 +70,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 35 | 0 | 33 | 2 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | A stateful layer to register shared features and provide an access point to discover without a direct dependency | 26 | 0 | 23 | 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 | 53 | 0 | 38 | 2 | +| | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | Server APIs for the Elastic AI Assistant | 56 | 0 | 41 | 2 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds embeddables service to Kibana | 578 | 1 | 468 | 9 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Extends embeddable plugin with more functionality | 19 | 0 | 19 | 2 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides encryption and decryption utilities for saved objects containing sensitive information. | 54 | 0 | 47 | 1 | | | [@elastic/search-kibana](https://github.com/orgs/elastic/teams/search-kibana) | Adds dashboards for discovering and managing Enterprise Search products. | 5 | 0 | 5 | 0 | | | [@elastic/obs-entities](https://github.com/orgs/elastic/teams/obs-entities) | - | 2 | 0 | 2 | 0 | -| | [@elastic/obs-entities](https://github.com/orgs/elastic/teams/obs-entities) | Entity manager plugin for entity assets (inventory, topology, etc) | 37 | 0 | 37 | 3 | +| | [@elastic/obs-entities](https://github.com/orgs/elastic/teams/obs-entities) | Entity manager plugin for entity assets (inventory, topology, etc) | 42 | 0 | 42 | 3 | | entityManagerApp | [@elastic/obs-entities](https://github.com/orgs/elastic/teams/obs-entities) | Entity manager plugin for entity assets (inventory, topology, etc) | 0 | 0 | 0 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 99 | 3 | 97 | 3 | | | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 25 | 0 | 9 | 0 | @@ -98,13 +99,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Expression Tagcloud plugin adds a `tagcloud` renderer and function to the expression plugin. The renderer will display the `Wordcloud` chart. | 6 | 0 | 6 | 2 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Expression XY plugin adds a `xy` renderer and function to the expression plugin. The renderer will display the `xy` chart. | 182 | 0 | 171 | 13 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Adds expression runtime to Kibana | 2241 | 17 | 1769 | 6 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 270 | 0 | 110 | 2 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 270 | 0 | 110 | 3 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Index pattern fields and ambiguous values formatters | 292 | 5 | 253 | 3 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | Exposes services for async usage and search of fields metadata. | 45 | 0 | 45 | 9 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | 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. | 89 | 0 | 89 | 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 | 3 | 0 | 3 | 0 | -| | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1432 | 5 | 1306 | 82 | +| | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1435 | 5 | 1309 | 82 | | 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 | @@ -116,7 +117,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Image embeddable | 1 | 0 | 1 | 0 | | | [@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) | - | 244 | 0 | 239 | 1 | -| | [@elastic/appex-ai-infra](https://github.com/orgs/elastic/teams/appex-ai-infra) | - | 40 | 0 | 29 | 6 | +| | [@elastic/appex-ai-infra](https://github.com/orgs/elastic/teams/appex-ai-infra) | - | 40 | 0 | 28 | 6 | | | [@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 | 24 | 0 | 24 | 5 | | | [@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 | @@ -146,7 +147,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 213 | 0 | 207 | 28 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 60 | 0 | 60 | 0 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | Exposes utilities for accessing metrics data | 135 | 6 | 135 | 5 | -| | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the machine learning features provided by Elastic. | 148 | 3 | 63 | 104 | +| | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the machine learning features provided by Elastic. | 149 | 3 | 64 | 104 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 2 | 0 | 2 | 0 | | | [@elastic/stack-monitoring](https://github.com/orgs/elastic/teams/stack-monitoring) | - | 15 | 3 | 13 | 1 | | | [@elastic/stack-monitoring](https://github.com/orgs/elastic/teams/stack-monitoring) | - | 9 | 0 | 9 | 0 | @@ -155,7 +156,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 3 | 0 | 3 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 2 | 1 | | | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 697 | 2 | 689 | 23 | -| | [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai-assistant) | - | 296 | 1 | 294 | 27 | +| | [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai-assistant) | - | 296 | 1 | 294 | 28 | | | [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai-assistant) | - | 4 | 0 | 4 | 0 | | | [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai-assistant) | - | 2 | 0 | 2 | 0 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin exposes and registers observability log consumption features. | 19 | 0 | 19 | 1 | @@ -169,9 +170,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@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/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/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. | 7 | 0 | 2 | 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) | - | 263 | 0 | 226 | 10 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 259 | 0 | 222 | 10 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 24 | 0 | 19 | 2 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 97 | 2 | 96 | 3 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 26 | 0 | 26 | 1 | @@ -199,13 +200,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/search-kibana](https://github.com/orgs/elastic/teams/search-kibana) | Serverless customizations for search. | 7 | 0 | 7 | 0 | | | [@elastic/kibana-cloud-security-posture](https://github.com/orgs/elastic/teams/kibana-cloud-security-posture) | - | 134 | 0 | 134 | 8 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Adds URL Service and sharing capabilities to Kibana | 136 | 0 | 73 | 15 | -| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 47 | 0 | 47 | 4 | +| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 48 | 0 | 48 | 2 | | | [@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. | 269 | 0 | 73 | 1 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 25 | 0 | 25 | 3 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 10 | 0 | 10 | 0 | -| | @simianhacker @flash1293 @dgieselaar | A manager for Streams | 13 | 0 | 13 | 4 | -| | @simianhacker @flash1293 @dgieselaar | - | 8 | 0 | 8 | 0 | +| | [@elastic/streams-program-team](https://github.com/orgs/elastic/teams/streams-program-team) | A manager for Streams | 13 | 0 | 13 | 4 | +| | [@elastic/streams-program-team](https://github.com/orgs/elastic/teams/streams-program-team) | - | 8 | 0 | 8 | 0 | | synthetics | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | This plugin visualizes data from Synthetics and Heartbeat, and integrates with other Observability solutions. | 0 | 0 | 0 | 1 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 108 | 0 | 64 | 7 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 45 | 0 | 1 | 0 | @@ -223,7 +224,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@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. | 69 | 0 | 35 | 6 | | | [@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. | 149 | 2 | 112 | 21 | | upgradeAssistant | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 0 | 0 | 0 | 0 | -| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | This plugin visualizes data from Heartbeat, and integrates with other Observability solutions. | 1 | 0 | 1 | 0 | +| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | This plugin visualizes data from Heartbeat, and integrates with other Observability solutions. | 1 | 0 | 0 | 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 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 52 | 0 | 14 | 5 | @@ -251,7 +252,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 14 | 0 | 14 | 0 | | | [@elastic/search-kibana](https://github.com/orgs/elastic/teams/search-kibana) | - | 64 | 0 | 64 | 1 | | | [@elastic/search-kibana](https://github.com/orgs/elastic/teams/search-kibana) | - | 3 | 0 | 3 | 0 | -| | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 36 | 0 | 0 | 0 | +| | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 37 | 0 | 0 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 2 | 0 | 0 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 66 | 0 | 0 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 27 | 3 | 27 | 0 | @@ -259,8 +260,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 23 | 0 | 22 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 243 | 0 | 240 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 33 | 0 | 33 | 0 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 31 | 0 | 15 | 1 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 321 | 0 | 305 | 8 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 32 | 0 | 15 | 1 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 302 | 0 | 286 | 4 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 73 | 0 | 73 | 2 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 1 | 0 | 0 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 18 | 0 | 18 | 0 | @@ -283,8 +284,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 3 | 0 | 3 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 62 | 0 | 17 | 1 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 2 | 0 | -| | [@elastic/kibana-cloud-security-posture](https://github.com/orgs/elastic/teams/kibana-cloud-security-posture) | - | 89 | 1 | 89 | 0 | -| | [@elastic/kibana-cloud-security-posture](https://github.com/orgs/elastic/teams/kibana-cloud-security-posture) | - | 109 | 0 | 107 | 1 | +| | [@elastic/kibana-cloud-security-posture](https://github.com/orgs/elastic/teams/kibana-cloud-security-posture) | - | 93 | 1 | 93 | 0 | +| | [@elastic/kibana-cloud-security-posture](https://github.com/orgs/elastic/teams/kibana-cloud-security-posture) | - | 122 | 0 | 120 | 1 | | | [@elastic/kibana-cloud-security-posture](https://github.com/orgs/elastic/teams/kibana-cloud-security-posture) | - | 20 | 0 | 15 | 4 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 41 | 0 | 17 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 2 | 0 | @@ -512,7 +513,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 15 | 0 | 9 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 38 | 2 | 33 | 0 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 37 | 0 | 34 | 2 | -| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 284 | 0 | 234 | 4 | +| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 277 | 0 | 227 | 4 | | | [@elastic/docs](https://github.com/orgs/elastic/teams/docs) | - | 80 | 0 | 80 | 2 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 5 | 0 | 5 | 1 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 57 | 0 | 30 | 6 | @@ -521,14 +522,14 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 42 | 0 | 41 | 0 | | | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 170 | 0 | 141 | 10 | | | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 442 | 0 | 405 | 0 | -| | [@elastic/obs-entities](https://github.com/orgs/elastic/teams/obs-entities) | - | 50 | 0 | 50 | 0 | +| | [@elastic/obs-entities](https://github.com/orgs/elastic/teams/obs-entities) | - | 51 | 0 | 51 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 55 | 0 | 40 | 7 | | | [@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) | - | 11 | 0 | 6 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 271 | 1 | 210 | 14 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 30 | 0 | 30 | 1 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 1 | 0 | -| | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 283 | 1 | 222 | 36 | +| | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 285 | 1 | 223 | 36 | | | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 29 | 0 | 12 | 0 | | | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 83 | 0 | 74 | 0 | | | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 205 | 0 | 193 | 12 | @@ -541,6 +542,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 3 | 0 | 3 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 111 | 2 | 86 | 1 | | | [@elastic/appex-qa](https://github.com/orgs/elastic/teams/appex-qa) | - | 560 | 6 | 520 | 7 | +| | [@elastic/appex-ai-infra](https://github.com/orgs/elastic/teams/appex-ai-infra) | - | 10 | 0 | 8 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 1 | 0 | 0 | 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 | @@ -585,7 +587,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@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](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 140 | 0 | 139 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 138 | 0 | 137 | 0 | | | [@elastic/appex-sharedux](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 | @@ -670,20 +672,21 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 17 | 0 | 16 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 11 | 0 | 9 | 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) | - | 111 | 0 | 104 | 2 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 92 | 0 | 91 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 110 | 0 | 103 | 2 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 91 | 0 | 91 | 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/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 3 | 0 | 3 | 0 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 157 | 0 | 156 | 7 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 8 | 0 | 8 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 13 | 2 | 8 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 3 | 0 | 3 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 10 | 0 | 10 | 1 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 2 | 0 | 1 | 1 | | | [@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) | - | 138 | 0 | 135 | 0 | +| | [@elastic/security-detections-response](https://github.com/orgs/elastic/teams/security-detections-response) | - | 152 | 0 | 140 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 2 | 0 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 15 | 0 | 14 | 0 | -| | [@elastic/appex-qa](https://github.com/orgs/elastic/teams/appex-qa) | - | 34 | 0 | 26 | 5 | +| | [@elastic/appex-qa](https://github.com/orgs/elastic/teams/appex-qa) | - | 119 | 0 | 86 | 8 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 35 | 0 | 34 | 0 | | | [@elastic/search-kibana](https://github.com/orgs/elastic/teams/search-kibana) | - | 8 | 0 | 8 | 1 | | | [@elastic/search-kibana](https://github.com/orgs/elastic/teams/search-kibana) | - | 3 | 0 | 3 | 0 | @@ -723,7 +726,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/security-detection-engine](https://github.com/orgs/elastic/teams/security-detection-engine) | - | 35 | 0 | 23 | 0 | | | [@elastic/security-detection-engine](https://github.com/orgs/elastic/teams/security-detection-engine) | - | 94 | 0 | 81 | 0 | | | [@elastic/security-detection-engine](https://github.com/orgs/elastic/teams/security-detection-engine) | - | 211 | 0 | 162 | 0 | -| | [@elastic/security-detection-engine](https://github.com/orgs/elastic/teams/security-detection-engine) | - | 28 | 0 | 25 | 0 | +| | [@elastic/security-detection-engine](https://github.com/orgs/elastic/teams/security-detection-engine) | - | 29 | 0 | 26 | 0 | | | [@elastic/security-detection-engine](https://github.com/orgs/elastic/teams/security-detection-engine) | - | 120 | 0 | 116 | 0 | | | [@elastic/security-detection-engine](https://github.com/orgs/elastic/teams/security-detection-engine) | - | 63 | 0 | 55 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 69 | 0 | 64 | 0 | @@ -782,21 +785,21 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 4 | 0 | 4 | 0 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 19 | 0 | 19 | 3 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 1 | 0 | 1 | 1 | -| | [@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) | - | 4 | 0 | 3 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 108 | 2 | 70 | 1 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 4 | 0 | 2 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 41 | 2 | 21 | 0 | | | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 32 | 2 | 32 | 0 | | | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 19 | 0 | 19 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 7 | 0 | 5 | 1 | -| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 353 | 4 | 298 | 14 | +| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 358 | 4 | 303 | 14 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 37 | 1 | 19 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 131 | 3 | 98 | 2 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 1 | 0 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 8 | 0 | 8 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 74 | 0 | 55 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 9 | 0 | 7 | 0 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 15 | 0 | 15 | 0 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 17 | 0 | 17 | 0 | | | [@elastic/search-kibana](https://github.com/orgs/elastic/teams/search-kibana) | - | 2 | 0 | 2 | 1 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 40 | 0 | 25 | 1 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 92 | 0 | 92 | 2 | diff --git a/api_docs/presentation_panel.mdx b/api_docs/presentation_panel.mdx index e939e90d4c17f..01414e90ef48f 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-12-02 +date: 2024-12-05 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 21b2857538760..a78dd1125b6fa 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil'] --- import presentationUtilObj from './presentation_util.devdocs.json'; diff --git a/api_docs/product_doc_base.mdx b/api_docs/product_doc_base.mdx index 586a25f3c0459..5b32c12174e0b 100644 --- a/api_docs/product_doc_base.mdx +++ b/api_docs/product_doc_base.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/productDocBase title: "productDocBase" image: https://source.unsplash.com/400x175/?github description: API docs for the productDocBase plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'productDocBase'] --- import productDocBaseObj from './product_doc_base.devdocs.json'; diff --git a/api_docs/profiling.mdx b/api_docs/profiling.mdx index 887ee95fe1d91..0acc2ff44bf6a 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-12-02 +date: 2024-12-05 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 d293ab20b8524..7912783a48de0 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-12-02 +date: 2024-12-05 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 908d1b1723e78..2b63fa1ba1ae6 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github description: API docs for the remoteClusters plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters'] --- import remoteClustersObj from './remote_clusters.devdocs.json'; diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index 27b8496ac3558..6804d5935dd9f 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting'] --- import reportingObj from './reporting.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 | |-------------------|-----------|------------------------|-----------------| -| 9 | 0 | 2 | 0 | +| 7 | 0 | 2 | 0 | ## Client diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index ec0c006f542f0..fb070eb291b15 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the rollup plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.devdocs.json b/api_docs/rule_registry.devdocs.json index 17ebe064cea2a..c8b4ab490604b 100644 --- a/api_docs/rule_registry.devdocs.json +++ b/api_docs/rule_registry.devdocs.json @@ -139,7 +139,7 @@ "label": "getAlertSummary", "description": [], "signature": [ - "({ gte, lte, featureIds, filter, fixedInterval, }: GetAlertSummaryParams) => Promise<{ activeAlertCount: number; recoveredAlertCount: number; activeAlerts: ", + "({ gte, lte, ruleTypeIds, consumers, filter, fixedInterval, }: GetAlertSummaryParams) => Promise<{ activeAlertCount: number; recoveredAlertCount: number; activeAlerts: ", "AggregationsBuckets", "<", "AggregationsDateHistogramBucket", @@ -158,7 +158,7 @@ "id": "def-server.AlertsClient.getAlertSummary.$1", "type": "Object", "tags": [], - "label": "{\n gte,\n lte,\n featureIds,\n filter,\n fixedInterval = '1m',\n }", + "label": "{\n gte,\n lte,\n ruleTypeIds,\n consumers,\n filter,\n fixedInterval = '1m',\n }", "description": [], "signature": [ "GetAlertSummaryParams" @@ -401,7 +401,7 @@ }, " = never, TAggregations = Record>({ aggs, featureIds, index, query, search_after: searchAfter, size, sort, track_total_hits: trackTotalHits, _source, runtimeMappings, }: { aggs?: object | undefined; featureIds?: string[] | undefined; index?: string | undefined; query?: object | undefined; search_after?: (string | number)[] | undefined; size?: number | undefined; sort?: ", + ">>({ aggs, ruleTypeIds, consumers, index, query, search_after: searchAfter, size, sort, track_total_hits: trackTotalHits, _source, runtimeMappings, }: { aggs?: object | undefined; ruleTypeIds?: string[] | undefined; consumers?: string[] | undefined; index?: string | undefined; query?: object | undefined; search_after?: (string | number)[] | undefined; size?: number | undefined; sort?: ", "SortOptions", "[] | undefined; track_total_hits?: number | boolean | undefined; _source?: false | string[] | undefined; runtimeMappings?: ", "MappingRuntimeFields", @@ -426,7 +426,7 @@ "id": "def-server.AlertsClient.find.$1", "type": "Object", "tags": [], - "label": "{\n aggs,\n featureIds,\n index,\n query,\n search_after: searchAfter,\n size,\n sort,\n track_total_hits: trackTotalHits,\n _source,\n runtimeMappings,\n }", + "label": "{\n aggs,\n ruleTypeIds,\n consumers,\n index,\n query,\n search_after: searchAfter,\n size,\n sort,\n track_total_hits: trackTotalHits,\n _source,\n runtimeMappings,\n }", "description": [], "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", "deprecated": false, @@ -448,10 +448,24 @@ }, { "parentPluginId": "ruleRegistry", - "id": "def-server.AlertsClient.find.$1.featureIds", + "id": "def-server.AlertsClient.find.$1.ruleTypeIds", "type": "Array", "tags": [], - "label": "featureIds", + "label": "ruleTypeIds", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.AlertsClient.find.$1.consumers", + "type": "Array", + "tags": [], + "label": "consumers", "description": [], "signature": [ "string[] | undefined" @@ -589,7 +603,7 @@ "\nPerforms a `find` query to extract aggregations on alert groups" ], "signature": [ - "({ featureIds, groupByField, aggregations, filters, pageIndex, pageSize, sort, }: { featureIds: string[]; groupByField: string; aggregations?: { [x: string]: { avg?: { field?: string | undefined; missing?: string | number | boolean | undefined; } | undefined; cardinality?: { field?: string | undefined; precision_threshold?: number | undefined; rehash?: boolean | undefined; missing?: string | number | boolean | undefined; } | undefined; min?: { field?: string | undefined; missing?: string | number | boolean | undefined; format?: string | undefined; } | undefined; max?: { field?: string | undefined; missing?: string | number | boolean | undefined; format?: string | undefined; } | undefined; sum?: { field?: string | undefined; missing?: string | number | boolean | undefined; } | undefined; top_hits?: { explain?: boolean | undefined; docvalue_fields?: string | string[] | undefined; stored_fields?: string | string[] | undefined; from?: number | undefined; size?: number | undefined; sort?: string | { [x: string]: \"asc\" | \"desc\" | \"_doc\" | { missing?: string | number | boolean | undefined; mode?: \"min\" | \"max\" | \"sum\" | \"avg\" | \"median\" | undefined; order?: \"asc\" | \"desc\" | \"_doc\" | undefined; }; } | (string | { [x: string]: \"asc\" | \"desc\" | \"_doc\" | { missing?: string | number | boolean | undefined; mode?: \"min\" | \"max\" | \"sum\" | \"avg\" | \"median\" | undefined; order?: \"asc\" | \"desc\" | \"_doc\" | undefined; }; })[] | undefined; seq_no_primary_term?: boolean | undefined; version?: boolean | undefined; track_scores?: boolean | undefined; highlight?: any; _source?: string | boolean | string[] | undefined; } | undefined; weighted_avg?: { format?: string | undefined; value_type?: string | undefined; value?: { field?: string | undefined; missing?: number | undefined; } | undefined; weight?: { field?: string | undefined; missing?: number | undefined; } | undefined; } | undefined; } & BucketAggsSchemas & { aggs?: { [x: string]: BucketAggsSchemas & { avg?: { field?: string | undefined; missing?: string | number | boolean | undefined; } | undefined; cardinality?: { field?: string | undefined; precision_threshold?: number | undefined; rehash?: boolean | undefined; missing?: string | number | boolean | undefined; } | undefined; min?: { field?: string | undefined; missing?: string | number | boolean | undefined; format?: string | undefined; } | undefined; max?: { field?: string | undefined; missing?: string | number | boolean | undefined; format?: string | undefined; } | undefined; sum?: { field?: string | undefined; missing?: string | number | boolean | undefined; } | undefined; top_hits?: { explain?: boolean | undefined; docvalue_fields?: string | string[] | undefined; stored_fields?: string | string[] | undefined; from?: number | undefined; size?: number | undefined; sort?: string | { [x: string]: \"asc\" | \"desc\" | \"_doc\" | { missing?: string | number | boolean | undefined; mode?: \"min\" | \"max\" | \"sum\" | \"avg\" | \"median\" | undefined; order?: \"asc\" | \"desc\" | \"_doc\" | undefined; }; } | (string | { [x: string]: \"asc\" | \"desc\" | \"_doc\" | { missing?: string | number | boolean | undefined; mode?: \"min\" | \"max\" | \"sum\" | \"avg\" | \"median\" | undefined; order?: \"asc\" | \"desc\" | \"_doc\" | undefined; }; })[] | undefined; seq_no_primary_term?: boolean | undefined; version?: boolean | undefined; track_scores?: boolean | undefined; highlight?: any; _source?: string | boolean | string[] | undefined; } | undefined; weighted_avg?: { format?: string | undefined; value_type?: string | undefined; value?: { field?: string | undefined; missing?: number | undefined; } | undefined; weight?: { field?: string | undefined; missing?: number | undefined; } | undefined; } | undefined; }; } | undefined; aggregations?: { [x: string]: BucketAggsSchemas & { avg?: { field?: string | undefined; missing?: string | number | boolean | undefined; } | undefined; cardinality?: { field?: string | undefined; precision_threshold?: number | undefined; rehash?: boolean | undefined; missing?: string | number | boolean | undefined; } | undefined; min?: { field?: string | undefined; missing?: string | number | boolean | undefined; format?: string | undefined; } | undefined; max?: { field?: string | undefined; missing?: string | number | boolean | undefined; format?: string | undefined; } | undefined; sum?: { field?: string | undefined; missing?: string | number | boolean | undefined; } | undefined; top_hits?: { explain?: boolean | undefined; docvalue_fields?: string | string[] | undefined; stored_fields?: string | string[] | undefined; from?: number | undefined; size?: number | undefined; sort?: string | { [x: string]: \"asc\" | \"desc\" | \"_doc\" | { missing?: string | number | boolean | undefined; mode?: \"min\" | \"max\" | \"sum\" | \"avg\" | \"median\" | undefined; order?: \"asc\" | \"desc\" | \"_doc\" | undefined; }; } | (string | { [x: string]: \"asc\" | \"desc\" | \"_doc\" | { missing?: string | number | boolean | undefined; mode?: \"min\" | \"max\" | \"sum\" | \"avg\" | \"median\" | undefined; order?: \"asc\" | \"desc\" | \"_doc\" | undefined; }; })[] | undefined; seq_no_primary_term?: boolean | undefined; version?: boolean | undefined; track_scores?: boolean | undefined; highlight?: any; _source?: string | boolean | string[] | undefined; } | undefined; weighted_avg?: { format?: string | undefined; value_type?: string | undefined; value?: { field?: string | undefined; missing?: number | undefined; } | undefined; weight?: { field?: string | undefined; missing?: number | undefined; } | undefined; } | undefined; }; } | undefined; }; } | undefined; filters?: ", + "({ ruleTypeIds, consumers, groupByField, aggregations, filters, pageIndex, pageSize, sort, }: { ruleTypeIds: string[]; consumers?: string[] | undefined; groupByField: string; aggregations?: { [x: string]: { avg?: { field?: string | undefined; missing?: string | number | boolean | undefined; } | undefined; cardinality?: { field?: string | undefined; precision_threshold?: number | undefined; rehash?: boolean | undefined; missing?: string | number | boolean | undefined; } | undefined; min?: { field?: string | undefined; missing?: string | number | boolean | undefined; format?: string | undefined; } | undefined; max?: { field?: string | undefined; missing?: string | number | boolean | undefined; format?: string | undefined; } | undefined; sum?: { field?: string | undefined; missing?: string | number | boolean | undefined; } | undefined; top_hits?: { explain?: boolean | undefined; docvalue_fields?: string | string[] | undefined; stored_fields?: string | string[] | undefined; from?: number | undefined; size?: number | undefined; sort?: string | { [x: string]: \"asc\" | \"desc\" | \"_doc\" | { missing?: string | number | boolean | undefined; mode?: \"min\" | \"max\" | \"sum\" | \"avg\" | \"median\" | undefined; order?: \"asc\" | \"desc\" | \"_doc\" | undefined; }; } | (string | { [x: string]: \"asc\" | \"desc\" | \"_doc\" | { missing?: string | number | boolean | undefined; mode?: \"min\" | \"max\" | \"sum\" | \"avg\" | \"median\" | undefined; order?: \"asc\" | \"desc\" | \"_doc\" | undefined; }; })[] | undefined; seq_no_primary_term?: boolean | undefined; version?: boolean | undefined; track_scores?: boolean | undefined; highlight?: any; _source?: string | boolean | string[] | undefined; } | undefined; weighted_avg?: { format?: string | undefined; value_type?: string | undefined; value?: { field?: string | undefined; missing?: number | undefined; } | undefined; weight?: { field?: string | undefined; missing?: number | undefined; } | undefined; } | undefined; } & BucketAggsSchemas & { aggs?: { [x: string]: BucketAggsSchemas & { avg?: { field?: string | undefined; missing?: string | number | boolean | undefined; } | undefined; cardinality?: { field?: string | undefined; precision_threshold?: number | undefined; rehash?: boolean | undefined; missing?: string | number | boolean | undefined; } | undefined; min?: { field?: string | undefined; missing?: string | number | boolean | undefined; format?: string | undefined; } | undefined; max?: { field?: string | undefined; missing?: string | number | boolean | undefined; format?: string | undefined; } | undefined; sum?: { field?: string | undefined; missing?: string | number | boolean | undefined; } | undefined; top_hits?: { explain?: boolean | undefined; docvalue_fields?: string | string[] | undefined; stored_fields?: string | string[] | undefined; from?: number | undefined; size?: number | undefined; sort?: string | { [x: string]: \"asc\" | \"desc\" | \"_doc\" | { missing?: string | number | boolean | undefined; mode?: \"min\" | \"max\" | \"sum\" | \"avg\" | \"median\" | undefined; order?: \"asc\" | \"desc\" | \"_doc\" | undefined; }; } | (string | { [x: string]: \"asc\" | \"desc\" | \"_doc\" | { missing?: string | number | boolean | undefined; mode?: \"min\" | \"max\" | \"sum\" | \"avg\" | \"median\" | undefined; order?: \"asc\" | \"desc\" | \"_doc\" | undefined; }; })[] | undefined; seq_no_primary_term?: boolean | undefined; version?: boolean | undefined; track_scores?: boolean | undefined; highlight?: any; _source?: string | boolean | string[] | undefined; } | undefined; weighted_avg?: { format?: string | undefined; value_type?: string | undefined; value?: { field?: string | undefined; missing?: number | undefined; } | undefined; weight?: { field?: string | undefined; missing?: number | undefined; } | undefined; } | undefined; }; } | undefined; aggregations?: { [x: string]: BucketAggsSchemas & { avg?: { field?: string | undefined; missing?: string | number | boolean | undefined; } | undefined; cardinality?: { field?: string | undefined; precision_threshold?: number | undefined; rehash?: boolean | undefined; missing?: string | number | boolean | undefined; } | undefined; min?: { field?: string | undefined; missing?: string | number | boolean | undefined; format?: string | undefined; } | undefined; max?: { field?: string | undefined; missing?: string | number | boolean | undefined; format?: string | undefined; } | undefined; sum?: { field?: string | undefined; missing?: string | number | boolean | undefined; } | undefined; top_hits?: { explain?: boolean | undefined; docvalue_fields?: string | string[] | undefined; stored_fields?: string | string[] | undefined; from?: number | undefined; size?: number | undefined; sort?: string | { [x: string]: \"asc\" | \"desc\" | \"_doc\" | { missing?: string | number | boolean | undefined; mode?: \"min\" | \"max\" | \"sum\" | \"avg\" | \"median\" | undefined; order?: \"asc\" | \"desc\" | \"_doc\" | undefined; }; } | (string | { [x: string]: \"asc\" | \"desc\" | \"_doc\" | { missing?: string | number | boolean | undefined; mode?: \"min\" | \"max\" | \"sum\" | \"avg\" | \"median\" | undefined; order?: \"asc\" | \"desc\" | \"_doc\" | undefined; }; })[] | undefined; seq_no_primary_term?: boolean | undefined; version?: boolean | undefined; track_scores?: boolean | undefined; highlight?: any; _source?: string | boolean | string[] | undefined; } | undefined; weighted_avg?: { format?: string | undefined; value_type?: string | undefined; value?: { field?: string | undefined; missing?: number | undefined; } | undefined; weight?: { field?: string | undefined; missing?: number | undefined; } | undefined; } | undefined; }; } | undefined; }; } | undefined; filters?: ", "QueryDslQueryContainer", "[] | undefined; sort?: ", "SortCombinations", @@ -616,7 +630,7 @@ "id": "def-server.AlertsClient.getGroupAggregations.$1", "type": "Object", "tags": [], - "label": "{\n featureIds,\n groupByField,\n aggregations,\n filters,\n pageIndex,\n pageSize,\n sort = [{ unitsCount: { order: 'desc' } }],\n }", + "label": "{\n ruleTypeIds,\n consumers,\n groupByField,\n aggregations,\n filters,\n pageIndex,\n pageSize,\n sort = [{ unitsCount: { order: 'desc' } }],\n }", "description": [], "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", "deprecated": false, @@ -624,12 +638,12 @@ "children": [ { "parentPluginId": "ruleRegistry", - "id": "def-server.AlertsClient.getGroupAggregations.$1.featureIds", + "id": "def-server.AlertsClient.getGroupAggregations.$1.ruleTypeIds", "type": "Array", "tags": [], - "label": "featureIds", + "label": "ruleTypeIds", "description": [ - "\nThe feature ids the alerts belong to, used for authorization" + "\nThe rule type IDs the alerts belong to.\nUsed for filtering." ], "signature": [ "string[]" @@ -638,6 +652,22 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.AlertsClient.getGroupAggregations.$1.consumers", + "type": "Array", + "tags": [], + "label": "consumers", + "description": [ + "\nThe consumers the alerts belong to.\nUsed for filtering." + ], + "signature": [ + "string[] | undefined" + ], + "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "ruleRegistry", "id": "def-server.AlertsClient.getGroupAggregations.$1.groupByField", @@ -740,7 +770,7 @@ "label": "getAuthorizedAlertsIndices", "description": [], "signature": [ - "(featureIds: string[]) => Promise" + "(ruleTypeIds?: string[] | undefined) => Promise" ], "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", "deprecated": false, @@ -751,47 +781,15 @@ "id": "def-server.AlertsClient.getAuthorizedAlertsIndices.$1", "type": "Array", "tags": [], - "label": "featureIds", - "description": [], - "signature": [ - "string[]" - ], - "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, - { - "parentPluginId": "ruleRegistry", - "id": "def-server.AlertsClient.getFeatureIdsByRegistrationContexts", - "type": "Function", - "tags": [], - "label": "getFeatureIdsByRegistrationContexts", - "description": [], - "signature": [ - "(RegistrationContexts: string[]) => Promise" - ], - "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "ruleRegistry", - "id": "def-server.AlertsClient.getFeatureIdsByRegistrationContexts.$1", - "type": "Array", - "tags": [], - "label": "RegistrationContexts", + "label": "ruleTypeIds", "description": [], "signature": [ - "string[]" + "string[] | undefined" ], "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", "deprecated": false, "trackAdoption": false, - "isRequired": true + "isRequired": false } ], "returnComment": [] @@ -804,7 +802,7 @@ "label": "getBrowserFields", "description": [], "signature": [ - "({ featureIds, indices, metaFields, allowNoIndex, }: { featureIds: string[]; indices: string[]; metaFields: string[]; allowNoIndex: boolean; }) => Promise<{ browserFields: ", + "({ ruleTypeIds, indices, metaFields, allowNoIndex, }: { ruleTypeIds: string[]; indices: string[]; metaFields: string[]; allowNoIndex: boolean; }) => Promise<{ browserFields: ", { "pluginId": "@kbn/alerting-types", "scope": "common", @@ -831,7 +829,7 @@ "id": "def-server.AlertsClient.getBrowserFields.$1", "type": "Object", "tags": [], - "label": "{\n featureIds,\n indices,\n metaFields,\n allowNoIndex,\n }", + "label": "{\n ruleTypeIds,\n indices,\n metaFields,\n allowNoIndex,\n }", "description": [], "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", "deprecated": false, @@ -839,10 +837,10 @@ "children": [ { "parentPluginId": "ruleRegistry", - "id": "def-server.AlertsClient.getBrowserFields.$1.featureIds", + "id": "def-server.AlertsClient.getBrowserFields.$1.ruleTypeIds", "type": "Array", "tags": [], - "label": "featureIds", + "label": "ruleTypeIds", "description": [], "signature": [ "string[]" @@ -1529,38 +1527,6 @@ ], "returnComment": [] }, - { - "parentPluginId": "ruleRegistry", - "id": "def-server.RuleDataService.findFeatureIdsByRegistrationContexts", - "type": "Function", - "tags": [], - "label": "findFeatureIdsByRegistrationContexts", - "description": [], - "signature": [ - "(registrationContexts: string[]) => string[]" - ], - "path": "x-pack/plugins/rule_registry/server/rule_data_plugin_service/rule_data_plugin_service.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "ruleRegistry", - "id": "def-server.RuleDataService.findFeatureIdsByRegistrationContexts.$1", - "type": "Array", - "tags": [], - "label": "registrationContexts", - "description": [], - "signature": [ - "string[]" - ], - "path": "x-pack/plugins/rule_registry/server/rule_data_plugin_service/rule_data_plugin_service.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] - }, { "parentPluginId": "ruleRegistry", "id": "def-server.RuleDataService.findIndexByFeature", @@ -2225,7 +2191,7 @@ "\nID of the Kibana feature associated with the index.\nUsed by alerts-as-data RBAC.\n\nNote from @dhurley14\nThe purpose of the `feature` param is to force the user to update\nthe data structure which contains the mapping of consumers to alerts\nas data indices. The idea is it is typed such that it forces the\nuser to go to the code and modify it. At least until a better system\nis put in place or we move the alerts as data client out of rule registry.\n" ], "signature": [ - "\"ml\" | \"monitoring\" | \"uptime\" | \"siem\" | \"observability\" | \"stackAlerts\" | \"apm\" | \"logs\" | \"infrastructure\" | \"slo\" | \"AlertingExample\"" + "\"ml\" | \"monitoring\" | \"uptime\" | \"siem\" | \"observability\" | \"stackAlerts\" | \"alerts\" | \"apm\" | \"logs\" | \"infrastructure\" | \"slo\" | \"discover\" | \"AlertingExample\"" ], "path": "x-pack/plugins/rule_registry/server/rule_data_plugin_service/index_options.ts", "deprecated": false, @@ -3063,40 +3029,6 @@ } ], "returnComment": [] - }, - { - "parentPluginId": "ruleRegistry", - "id": "def-server.IRuleDataService.findFeatureIdsByRegistrationContexts", - "type": "Function", - "tags": [], - "label": "findFeatureIdsByRegistrationContexts", - "description": [ - "\nLooks up Kibana \"feature\" associated with the given registration context.\nNote: features are used in RBAC." - ], - "signature": [ - "(registrationContexts: string[]) => string[]" - ], - "path": "x-pack/plugins/rule_registry/server/rule_data_plugin_service/rule_data_plugin_service.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "ruleRegistry", - "id": "def-server.IRuleDataService.findFeatureIdsByRegistrationContexts.$1", - "type": "Array", - "tags": [], - "label": "registrationContexts", - "description": [], - "signature": [ - "string[]" - ], - "path": "x-pack/plugins/rule_registry/server/rule_data_plugin_service/rule_data_plugin_service.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [] } ], "initialIsOpen": false @@ -3322,8 +3254,8 @@ "description": [], "signature": [ "(alerts: { _id: string; _source: T; }[], suppressionWindow: string, enrichAlerts?: ((alerts: { _id: string; _source: T; }[], params: { spaceId: string; }) => Promise<{ _id: string; _source: T; }[]>) | undefined, currentTimeOverride?: Date | undefined, isRuleExecutionOnly?: boolean | undefined, maxAlerts?: number | undefined) => Promise<", + "SuppressionFields8170", + ">(alerts: { _id: string; _source: T; subAlerts?: { _id: string; _source: T; }[] | undefined; }[], suppressionWindow: string, enrichAlerts?: ((alerts: { _id: string; _source: T; }[], params: { spaceId: string; }) => Promise<{ _id: string; _source: T; }[]>) | undefined, currentTimeOverride?: Date | undefined, isRuleExecutionOnly?: boolean | undefined, maxAlerts?: number | undefined) => Promise<", { "pluginId": "ruleRegistry", "scope": "server", @@ -3346,7 +3278,7 @@ "label": "alerts", "description": [], "signature": [ - "{ _id: string; _source: T; }[]" + "{ _id: string; _source: T; subAlerts?: { _id: string; _source: T; }[] | undefined; }[]" ], "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", "deprecated": false, @@ -4058,8 +3990,8 @@ "description": [], "signature": [ "(alerts: { _id: string; _source: T; }[], suppressionWindow: string, enrichAlerts?: ((alerts: { _id: string; _source: T; }[], params: { spaceId: string; }) => Promise<{ _id: string; _source: T; }[]>) | undefined, currentTimeOverride?: Date | undefined, isRuleExecutionOnly?: boolean | undefined, maxAlerts?: number | undefined) => Promise<", + "SuppressionFields8170", + ">(alerts: { _id: string; _source: T; subAlerts?: { _id: string; _source: T; }[] | undefined; }[], suppressionWindow: string, enrichAlerts?: ((alerts: { _id: string; _source: T; }[], params: { spaceId: string; }) => Promise<{ _id: string; _source: T; }[]>) | undefined, currentTimeOverride?: Date | undefined, isRuleExecutionOnly?: boolean | undefined, maxAlerts?: number | undefined) => Promise<", { "pluginId": "ruleRegistry", "scope": "server", @@ -4082,7 +4014,7 @@ "label": "alerts", "description": [], "signature": [ - "{ _id: string; _source: T; }[]" + "{ _id: string; _source: T; subAlerts?: { _id: string; _source: T; }[] | undefined; }[]" ], "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", "deprecated": false, @@ -4410,8 +4342,8 @@ "pluginId": "alerting", "scope": "server", "docId": "kibAlertingPluginApi", - "section": "def-server.PluginStartContract", - "text": "PluginStartContract" + "section": "def-server.AlertingServerStart", + "text": "AlertingServerStart" } ], "path": "x-pack/plugins/rule_registry/server/plugin.ts", @@ -4897,15 +4829,7 @@ "section": "def-common.ISearchRequestParams", "text": "ISearchRequestParams" }, - "> & { featureIds: ", - { - "pluginId": "@kbn/rule-data-utils", - "scope": "common", - "docId": "kibKbnRuleDataUtilsPluginApi", - "section": "def-common.AlertConsumers", - "text": "AlertConsumers" - }, - "[]; fields?: ", + "> & { ruleTypeIds: string[]; consumers?: string[] | undefined; fields?: ", "QueryDslFieldAndFormat", "[] | undefined; query?: Pick<", "QueryDslQueryContainer", diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index abd80adc8571d..3dbb8c0e6a810 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] --- import ruleRegistryObj from './rule_registry.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 | |-------------------|-----------|------------------------|-----------------| -| 263 | 0 | 226 | 10 | +| 259 | 0 | 222 | 10 | ## Server diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index 407f0b763a2cf..bc1b863e8305d 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github description: API docs for the runtimeFields plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] --- import runtimeFieldsObj from './runtime_fields.devdocs.json'; diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index c2823684c8fbf..9c871b27e32dc 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-12-02 +date: 2024-12-05 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 dd54ae01450c8..9add26b265187 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-12-02 +date: 2024-12-05 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 c8184ae57eca1..f002a09248e93 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-12-02 +date: 2024-12-05 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 3c8b2ad753490..21ea11b39b58f 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-12-02 +date: 2024-12-05 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 12c0239d273d0..3d80815e812b7 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-12-02 +date: 2024-12-05 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 0be608aa5f345..2046dd4fea9b5 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-12-02 +date: 2024-12-05 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 5ccf6668141e3..eb8517c03e3a4 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-12-02 +date: 2024-12-05 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 964e79d296533..80059588c47ab 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] --- import screenshottingObj from './screenshotting.devdocs.json'; diff --git a/api_docs/search_assistant.mdx b/api_docs/search_assistant.mdx index c48dbfd418c6f..b82bd5f8e4fda 100644 --- a/api_docs/search_assistant.mdx +++ b/api_docs/search_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchAssistant title: "searchAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the searchAssistant plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchAssistant'] --- import searchAssistantObj from './search_assistant.devdocs.json'; diff --git a/api_docs/search_connectors.mdx b/api_docs/search_connectors.mdx index 63087328647de..72bab57150441 100644 --- a/api_docs/search_connectors.mdx +++ b/api_docs/search_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchConnectors title: "searchConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the searchConnectors plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchConnectors'] --- import searchConnectorsObj from './search_connectors.devdocs.json'; diff --git a/api_docs/search_homepage.mdx b/api_docs/search_homepage.mdx index 5379cb93d02ba..1349d9178902d 100644 --- a/api_docs/search_homepage.mdx +++ b/api_docs/search_homepage.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchHomepage title: "searchHomepage" image: https://source.unsplash.com/400x175/?github description: API docs for the searchHomepage plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchHomepage'] --- import searchHomepageObj from './search_homepage.devdocs.json'; diff --git a/api_docs/search_indices.devdocs.json b/api_docs/search_indices.devdocs.json index 8446bc09cbb0d..c2b13298b2e18 100644 --- a/api_docs/search_indices.devdocs.json +++ b/api_docs/search_indices.devdocs.json @@ -85,7 +85,7 @@ "label": "startAppId", "description": [], "signature": [ - "\"fleet\" | \"graph\" | \"ml\" | \"monitoring\" | \"profiling\" | \"metrics\" | \"management\" | \"apm\" | \"synthetics\" | \"ux\" | \"canvas\" | \"logs\" | \"dashboards\" | \"slo\" | \"observabilityAIAssistant\" | \"home\" | \"integrations\" | \"discover\" | \"observability-overview\" | \"streams\" | \"appSearch\" | \"dev_tools\" | \"maps\" | \"visualize\" | \"dev_tools:console\" | \"dev_tools:searchprofiler\" | \"dev_tools:painless_lab\" | \"dev_tools:grokdebugger\" | \"ml:notifications\" | \"ml:nodes\" | \"ml:overview\" | \"ml:memoryUsage\" | \"ml:settings\" | \"ml:dataVisualizer\" | \"ml:logPatternAnalysis\" | \"ml:logRateAnalysis\" | \"ml:singleMetricViewer\" | \"ml:anomalyDetection\" | \"ml:anomalyExplorer\" | \"ml:dataDrift\" | \"ml:dataFrameAnalytics\" | \"ml:resultExplorer\" | \"ml:analyticsMap\" | \"ml:aiOps\" | \"ml:changePointDetections\" | \"ml:modelManagement\" | \"ml:nodesOverview\" | \"ml:esqlDataVisualizer\" | \"ml:fileUpload\" | \"ml:indexDataVisualizer\" | \"ml:calendarSettings\" | \"ml:filterListsSettings\" | \"ml:suppliedConfigurations\" | \"osquery\" | \"management:transform\" | \"management:watcher\" | \"management:cases\" | \"management:tags\" | \"management:maintenanceWindows\" | \"management:cross_cluster_replication\" | \"management:dataViews\" | \"management:spaces\" | \"management:settings\" | \"management:users\" | \"management:migrate_data\" | \"management:search_sessions\" | \"management:data_quality\" | \"management:filesManagement\" | \"management:roles\" | \"management:reporting\" | \"management:aiAssistantManagementSelection\" | \"management:securityAiAssistantManagement\" | \"management:observabilityAiAssistantManagement\" | \"management:api_keys\" | \"management:license_management\" | \"management:index_lifecycle_management\" | \"management:index_management\" | \"management:ingest_pipelines\" | \"management:jobsListLink\" | \"management:objects\" | \"management:pipelines\" | \"management:remote_clusters\" | \"management:role_mappings\" | \"management:rollup_jobs\" | \"management:snapshot_restore\" | \"management:triggersActions\" | \"management:triggersActionsConnectors\" | \"management:upgrade_assistant\" | \"enterpriseSearch\" | \"enterpriseSearchContent\" | \"enterpriseSearchApplications\" | \"searchInferenceEndpoints\" | \"enterpriseSearchAnalytics\" | \"workplaceSearch\" | \"serverlessElasticsearch\" | \"serverlessConnectors\" | \"serverlessWebCrawlers\" | \"searchPlayground\" | \"searchHomepage\" | \"enterpriseSearchContent:connectors\" | \"enterpriseSearchContent:searchIndices\" | \"enterpriseSearchContent:webCrawlers\" | \"enterpriseSearchApplications:searchApplications\" | \"enterpriseSearchApplications:playground\" | \"appSearch:engines\" | \"searchInferenceEndpoints:inferenceEndpoints\" | \"elasticsearchStart\" | \"elasticsearchIndices\" | \"enterpriseSearchElasticsearch\" | \"enterpriseSearchVectorSearch\" | \"enterpriseSearchSemanticSearch\" | \"enterpriseSearchAISearch\" | \"elasticsearchIndices:createIndex\" | \"observability-logs-explorer\" | \"last-used-logs-viewer\" | \"observabilityOnboarding\" | \"inventory\" | \"logs:settings\" | \"logs:stream\" | \"logs:log-categories\" | \"logs:anomalies\" | \"observability-overview:cases\" | \"observability-overview:alerts\" | \"observability-overview:rules\" | \"observability-overview:cases_create\" | \"observability-overview:cases_configure\" | \"metrics:settings\" | \"metrics:hosts\" | \"metrics:inventory\" | \"metrics:metrics-explorer\" | \"metrics:assetDetails\" | \"apm:services\" | \"apm:traces\" | \"apm:dependencies\" | \"apm:service-map\" | \"apm:settings\" | \"apm:service-groups-list\" | \"apm:storage-explorer\" | \"synthetics:overview\" | \"synthetics:certificates\" | \"profiling:functions\" | \"profiling:stacktraces\" | \"profiling:flamegraphs\" | \"inventory:datastreams\" | \"streams:overview\" | \"securitySolutionUI\" | \"securitySolutionUI:\" | \"securitySolutionUI:cases\" | \"securitySolutionUI:alerts\" | \"securitySolutionUI:rules\" | \"securitySolutionUI:policy\" | \"securitySolutionUI:overview\" | \"securitySolutionUI:dashboards\" | \"securitySolutionUI:kubernetes\" | \"securitySolutionUI:cases_create\" | \"securitySolutionUI:cases_configure\" | \"securitySolutionUI:hosts\" | \"securitySolutionUI:users\" | \"securitySolutionUI:cloud_defend-policies\" | \"securitySolutionUI:cloud_security_posture-dashboard\" | \"securitySolutionUI:cloud_security_posture-findings\" | \"securitySolutionUI:cloud_security_posture-benchmarks\" | \"securitySolutionUI:network\" | \"securitySolutionUI:data_quality\" | \"securitySolutionUI:explore\" | \"securitySolutionUI:assets\" | \"securitySolutionUI:cloud_defend\" | \"securitySolutionUI:notes\" | \"securitySolutionUI:administration\" | \"securitySolutionUI:attack_discovery\" | \"securitySolutionUI:blocklist\" | \"securitySolutionUI:cloud_security_posture-rules\" | \"securitySolutionUI:detections\" | \"securitySolutionUI:detection_response\" | \"securitySolutionUI:endpoints\" | \"securitySolutionUI:event_filters\" | \"securitySolutionUI:exceptions\" | \"securitySolutionUI:host_isolation_exceptions\" | \"securitySolutionUI:hosts-all\" | \"securitySolutionUI:hosts-anomalies\" | \"securitySolutionUI:hosts-risk\" | \"securitySolutionUI:hosts-events\" | \"securitySolutionUI:hosts-sessions\" | \"securitySolutionUI:hosts-uncommon_processes\" | \"securitySolutionUI:investigations\" | \"securitySolutionUI:get_started\" | \"securitySolutionUI:machine_learning-landing\" | \"securitySolutionUI:network-anomalies\" | \"securitySolutionUI:network-dns\" | \"securitySolutionUI:network-events\" | \"securitySolutionUI:network-flows\" | \"securitySolutionUI:network-http\" | \"securitySolutionUI:network-tls\" | \"securitySolutionUI:response_actions_history\" | \"securitySolutionUI:rules-add\" | \"securitySolutionUI:rules-create\" | \"securitySolutionUI:rules-landing\" | \"securitySolutionUI:siem_migrations-rules\" | \"securitySolutionUI:threat_intelligence\" | \"securitySolutionUI:timelines\" | \"securitySolutionUI:timelines-templates\" | \"securitySolutionUI:trusted_apps\" | \"securitySolutionUI:users-all\" | \"securitySolutionUI:users-anomalies\" | \"securitySolutionUI:users-authentications\" | \"securitySolutionUI:users-events\" | \"securitySolutionUI:users-risk\" | \"securitySolutionUI:entity_analytics\" | \"securitySolutionUI:entity_analytics-management\" | \"securitySolutionUI:entity_analytics-asset-classification\" | \"securitySolutionUI:entity_analytics-entity_store_management\" | \"securitySolutionUI:coverage-overview\" | \"fleet:settings\" | \"fleet:agents\" | \"fleet:policies\" | \"fleet:data_streams\" | \"fleet:enrollment_tokens\" | \"fleet:uninstall_tokens\"" + "\"fleet\" | \"graph\" | \"ml\" | \"monitoring\" | \"profiling\" | \"metrics\" | \"management\" | \"apm\" | \"synthetics\" | \"ux\" | \"canvas\" | \"logs\" | \"dashboards\" | \"slo\" | \"observabilityAIAssistant\" | \"home\" | \"integrations\" | \"discover\" | \"observability-overview\" | \"streams\" | \"appSearch\" | \"dev_tools\" | \"maps\" | \"visualize\" | \"dev_tools:console\" | \"dev_tools:searchprofiler\" | \"dev_tools:painless_lab\" | \"dev_tools:grokdebugger\" | \"ml:notifications\" | \"ml:nodes\" | \"ml:overview\" | \"ml:memoryUsage\" | \"ml:settings\" | \"ml:dataVisualizer\" | \"ml:logPatternAnalysis\" | \"ml:logRateAnalysis\" | \"ml:singleMetricViewer\" | \"ml:anomalyDetection\" | \"ml:anomalyExplorer\" | \"ml:dataDrift\" | \"ml:dataFrameAnalytics\" | \"ml:resultExplorer\" | \"ml:analyticsMap\" | \"ml:aiOps\" | \"ml:changePointDetections\" | \"ml:modelManagement\" | \"ml:nodesOverview\" | \"ml:esqlDataVisualizer\" | \"ml:fileUpload\" | \"ml:indexDataVisualizer\" | \"ml:calendarSettings\" | \"ml:filterListsSettings\" | \"ml:suppliedConfigurations\" | \"osquery\" | \"management:transform\" | \"management:watcher\" | \"management:cases\" | \"management:tags\" | \"management:maintenanceWindows\" | \"management:cross_cluster_replication\" | \"management:dataViews\" | \"management:spaces\" | \"management:settings\" | \"management:users\" | \"management:migrate_data\" | \"management:search_sessions\" | \"management:data_quality\" | \"management:filesManagement\" | \"management:pipelines\" | \"management:roles\" | \"management:reporting\" | \"management:aiAssistantManagementSelection\" | \"management:securityAiAssistantManagement\" | \"management:observabilityAiAssistantManagement\" | \"management:api_keys\" | \"management:license_management\" | \"management:index_lifecycle_management\" | \"management:index_management\" | \"management:ingest_pipelines\" | \"management:jobsListLink\" | \"management:objects\" | \"management:remote_clusters\" | \"management:role_mappings\" | \"management:rollup_jobs\" | \"management:snapshot_restore\" | \"management:triggersActions\" | \"management:triggersActionsConnectors\" | \"management:upgrade_assistant\" | \"enterpriseSearch\" | \"enterpriseSearchContent\" | \"enterpriseSearchApplications\" | \"searchInferenceEndpoints\" | \"enterpriseSearchAnalytics\" | \"workplaceSearch\" | \"serverlessElasticsearch\" | \"serverlessConnectors\" | \"serverlessWebCrawlers\" | \"searchPlayground\" | \"searchHomepage\" | \"enterpriseSearchContent:connectors\" | \"enterpriseSearchContent:searchIndices\" | \"enterpriseSearchContent:webCrawlers\" | \"enterpriseSearchApplications:searchApplications\" | \"enterpriseSearchApplications:playground\" | \"appSearch:engines\" | \"searchInferenceEndpoints:inferenceEndpoints\" | \"elasticsearchStart\" | \"elasticsearchIndices\" | \"enterpriseSearchElasticsearch\" | \"enterpriseSearchVectorSearch\" | \"enterpriseSearchSemanticSearch\" | \"enterpriseSearchAISearch\" | \"elasticsearchIndices:createIndex\" | \"observability-logs-explorer\" | \"last-used-logs-viewer\" | \"observabilityOnboarding\" | \"inventory\" | \"logs:settings\" | \"logs:stream\" | \"logs:log-categories\" | \"logs:anomalies\" | \"observability-overview:cases\" | \"observability-overview:alerts\" | \"observability-overview:rules\" | \"observability-overview:cases_create\" | \"observability-overview:cases_configure\" | \"metrics:settings\" | \"metrics:hosts\" | \"metrics:inventory\" | \"metrics:metrics-explorer\" | \"metrics:assetDetails\" | \"apm:services\" | \"apm:traces\" | \"apm:dependencies\" | \"apm:service-map\" | \"apm:settings\" | \"apm:service-groups-list\" | \"apm:storage-explorer\" | \"synthetics:overview\" | \"synthetics:certificates\" | \"profiling:functions\" | \"profiling:stacktraces\" | \"profiling:flamegraphs\" | \"inventory:datastreams\" | \"streams:overview\" | \"securitySolutionUI\" | \"securitySolutionUI:\" | \"securitySolutionUI:cases\" | \"securitySolutionUI:alerts\" | \"securitySolutionUI:rules\" | \"securitySolutionUI:policy\" | \"securitySolutionUI:overview\" | \"securitySolutionUI:dashboards\" | \"securitySolutionUI:kubernetes\" | \"securitySolutionUI:cases_create\" | \"securitySolutionUI:cases_configure\" | \"securitySolutionUI:hosts\" | \"securitySolutionUI:users\" | \"securitySolutionUI:cloud_defend-policies\" | \"securitySolutionUI:cloud_security_posture-dashboard\" | \"securitySolutionUI:cloud_security_posture-findings\" | \"securitySolutionUI:cloud_security_posture-benchmarks\" | \"securitySolutionUI:network\" | \"securitySolutionUI:data_quality\" | \"securitySolutionUI:explore\" | \"securitySolutionUI:assets\" | \"securitySolutionUI:cloud_defend\" | \"securitySolutionUI:notes\" | \"securitySolutionUI:administration\" | \"securitySolutionUI:attack_discovery\" | \"securitySolutionUI:blocklist\" | \"securitySolutionUI:cloud_security_posture-rules\" | \"securitySolutionUI:detections\" | \"securitySolutionUI:detection_response\" | \"securitySolutionUI:endpoints\" | \"securitySolutionUI:event_filters\" | \"securitySolutionUI:exceptions\" | \"securitySolutionUI:host_isolation_exceptions\" | \"securitySolutionUI:hosts-all\" | \"securitySolutionUI:hosts-anomalies\" | \"securitySolutionUI:hosts-risk\" | \"securitySolutionUI:hosts-events\" | \"securitySolutionUI:hosts-sessions\" | \"securitySolutionUI:hosts-uncommon_processes\" | \"securitySolutionUI:investigations\" | \"securitySolutionUI:get_started\" | \"securitySolutionUI:machine_learning-landing\" | \"securitySolutionUI:network-anomalies\" | \"securitySolutionUI:network-dns\" | \"securitySolutionUI:network-events\" | \"securitySolutionUI:network-flows\" | \"securitySolutionUI:network-http\" | \"securitySolutionUI:network-tls\" | \"securitySolutionUI:response_actions_history\" | \"securitySolutionUI:rules-add\" | \"securitySolutionUI:rules-create\" | \"securitySolutionUI:rules-landing\" | \"securitySolutionUI:siem_migrations-rules\" | \"securitySolutionUI:threat_intelligence\" | \"securitySolutionUI:timelines\" | \"securitySolutionUI:timelines-templates\" | \"securitySolutionUI:trusted_apps\" | \"securitySolutionUI:users-all\" | \"securitySolutionUI:users-anomalies\" | \"securitySolutionUI:users-authentications\" | \"securitySolutionUI:users-events\" | \"securitySolutionUI:users-risk\" | \"securitySolutionUI:entity_analytics\" | \"securitySolutionUI:entity_analytics-management\" | \"securitySolutionUI:entity_analytics-asset-classification\" | \"securitySolutionUI:entity_analytics-entity_store_management\" | \"securitySolutionUI:coverage-overview\" | \"fleet:settings\" | \"fleet:agents\" | \"fleet:policies\" | \"fleet:data_streams\" | \"fleet:enrollment_tokens\" | \"fleet:uninstall_tokens\"" ], "path": "x-pack/plugins/search_indices/public/types.ts", "deprecated": false, diff --git a/api_docs/search_indices.mdx b/api_docs/search_indices.mdx index da6c90af5dc63..78d8ce1c1713e 100644 --- a/api_docs/search_indices.mdx +++ b/api_docs/search_indices.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchIndices title: "searchIndices" image: https://source.unsplash.com/400x175/?github description: API docs for the searchIndices plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchIndices'] --- import searchIndicesObj from './search_indices.devdocs.json'; diff --git a/api_docs/search_inference_endpoints.mdx b/api_docs/search_inference_endpoints.mdx index 717a9ba2a0be1..6f67f4d4b6efd 100644 --- a/api_docs/search_inference_endpoints.mdx +++ b/api_docs/search_inference_endpoints.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchInferenceEndpoints title: "searchInferenceEndpoints" image: https://source.unsplash.com/400x175/?github description: API docs for the searchInferenceEndpoints plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchInferenceEndpoints'] --- import searchInferenceEndpointsObj from './search_inference_endpoints.devdocs.json'; diff --git a/api_docs/search_navigation.devdocs.json b/api_docs/search_navigation.devdocs.json index 9f9ff7e4294c4..2abd5573472a1 100644 --- a/api_docs/search_navigation.devdocs.json +++ b/api_docs/search_navigation.devdocs.json @@ -132,7 +132,7 @@ "label": "link", "description": [], "signature": [ - "\"fleet\" | \"graph\" | \"ml\" | \"monitoring\" | \"profiling\" | \"metrics\" | \"management\" | \"apm\" | \"synthetics\" | \"ux\" | \"canvas\" | \"logs\" | \"dashboards\" | \"slo\" | \"observabilityAIAssistant\" | \"home\" | \"integrations\" | \"discover\" | \"observability-overview\" | \"streams\" | \"appSearch\" | \"dev_tools\" | \"maps\" | \"visualize\" | \"dev_tools:console\" | \"dev_tools:searchprofiler\" | \"dev_tools:painless_lab\" | \"dev_tools:grokdebugger\" | \"ml:notifications\" | \"ml:nodes\" | \"ml:overview\" | \"ml:memoryUsage\" | \"ml:settings\" | \"ml:dataVisualizer\" | \"ml:logPatternAnalysis\" | \"ml:logRateAnalysis\" | \"ml:singleMetricViewer\" | \"ml:anomalyDetection\" | \"ml:anomalyExplorer\" | \"ml:dataDrift\" | \"ml:dataFrameAnalytics\" | \"ml:resultExplorer\" | \"ml:analyticsMap\" | \"ml:aiOps\" | \"ml:changePointDetections\" | \"ml:modelManagement\" | \"ml:nodesOverview\" | \"ml:esqlDataVisualizer\" | \"ml:fileUpload\" | \"ml:indexDataVisualizer\" | \"ml:calendarSettings\" | \"ml:filterListsSettings\" | \"ml:suppliedConfigurations\" | \"osquery\" | \"management:transform\" | \"management:watcher\" | \"management:cases\" | \"management:tags\" | \"management:maintenanceWindows\" | \"management:cross_cluster_replication\" | \"management:dataViews\" | \"management:spaces\" | \"management:settings\" | \"management:users\" | \"management:migrate_data\" | \"management:search_sessions\" | \"management:data_quality\" | \"management:filesManagement\" | \"management:roles\" | \"management:reporting\" | \"management:aiAssistantManagementSelection\" | \"management:securityAiAssistantManagement\" | \"management:observabilityAiAssistantManagement\" | \"management:api_keys\" | \"management:license_management\" | \"management:index_lifecycle_management\" | \"management:index_management\" | \"management:ingest_pipelines\" | \"management:jobsListLink\" | \"management:objects\" | \"management:pipelines\" | \"management:remote_clusters\" | \"management:role_mappings\" | \"management:rollup_jobs\" | \"management:snapshot_restore\" | \"management:triggersActions\" | \"management:triggersActionsConnectors\" | \"management:upgrade_assistant\" | \"enterpriseSearch\" | \"enterpriseSearchContent\" | \"enterpriseSearchApplications\" | \"searchInferenceEndpoints\" | \"enterpriseSearchAnalytics\" | \"workplaceSearch\" | \"serverlessElasticsearch\" | \"serverlessConnectors\" | \"serverlessWebCrawlers\" | \"searchPlayground\" | \"searchHomepage\" | \"enterpriseSearchContent:connectors\" | \"enterpriseSearchContent:searchIndices\" | \"enterpriseSearchContent:webCrawlers\" | \"enterpriseSearchApplications:searchApplications\" | \"enterpriseSearchApplications:playground\" | \"appSearch:engines\" | \"searchInferenceEndpoints:inferenceEndpoints\" | \"elasticsearchStart\" | \"elasticsearchIndices\" | \"enterpriseSearchElasticsearch\" | \"enterpriseSearchVectorSearch\" | \"enterpriseSearchSemanticSearch\" | \"enterpriseSearchAISearch\" | \"elasticsearchIndices:createIndex\" | \"observability-logs-explorer\" | \"last-used-logs-viewer\" | \"observabilityOnboarding\" | \"inventory\" | \"logs:settings\" | \"logs:stream\" | \"logs:log-categories\" | \"logs:anomalies\" | \"observability-overview:cases\" | \"observability-overview:alerts\" | \"observability-overview:rules\" | \"observability-overview:cases_create\" | \"observability-overview:cases_configure\" | \"metrics:settings\" | \"metrics:hosts\" | \"metrics:inventory\" | \"metrics:metrics-explorer\" | \"metrics:assetDetails\" | \"apm:services\" | \"apm:traces\" | \"apm:dependencies\" | \"apm:service-map\" | \"apm:settings\" | \"apm:service-groups-list\" | \"apm:storage-explorer\" | \"synthetics:overview\" | \"synthetics:certificates\" | \"profiling:functions\" | \"profiling:stacktraces\" | \"profiling:flamegraphs\" | \"inventory:datastreams\" | \"streams:overview\" | \"securitySolutionUI\" | \"securitySolutionUI:\" | \"securitySolutionUI:cases\" | \"securitySolutionUI:alerts\" | \"securitySolutionUI:rules\" | \"securitySolutionUI:policy\" | \"securitySolutionUI:overview\" | \"securitySolutionUI:dashboards\" | \"securitySolutionUI:kubernetes\" | \"securitySolutionUI:cases_create\" | \"securitySolutionUI:cases_configure\" | \"securitySolutionUI:hosts\" | \"securitySolutionUI:users\" | \"securitySolutionUI:cloud_defend-policies\" | \"securitySolutionUI:cloud_security_posture-dashboard\" | \"securitySolutionUI:cloud_security_posture-findings\" | \"securitySolutionUI:cloud_security_posture-benchmarks\" | \"securitySolutionUI:network\" | \"securitySolutionUI:data_quality\" | \"securitySolutionUI:explore\" | \"securitySolutionUI:assets\" | \"securitySolutionUI:cloud_defend\" | \"securitySolutionUI:notes\" | \"securitySolutionUI:administration\" | \"securitySolutionUI:attack_discovery\" | \"securitySolutionUI:blocklist\" | \"securitySolutionUI:cloud_security_posture-rules\" | \"securitySolutionUI:detections\" | \"securitySolutionUI:detection_response\" | \"securitySolutionUI:endpoints\" | \"securitySolutionUI:event_filters\" | \"securitySolutionUI:exceptions\" | \"securitySolutionUI:host_isolation_exceptions\" | \"securitySolutionUI:hosts-all\" | \"securitySolutionUI:hosts-anomalies\" | \"securitySolutionUI:hosts-risk\" | \"securitySolutionUI:hosts-events\" | \"securitySolutionUI:hosts-sessions\" | \"securitySolutionUI:hosts-uncommon_processes\" | \"securitySolutionUI:investigations\" | \"securitySolutionUI:get_started\" | \"securitySolutionUI:machine_learning-landing\" | \"securitySolutionUI:network-anomalies\" | \"securitySolutionUI:network-dns\" | \"securitySolutionUI:network-events\" | \"securitySolutionUI:network-flows\" | \"securitySolutionUI:network-http\" | \"securitySolutionUI:network-tls\" | \"securitySolutionUI:response_actions_history\" | \"securitySolutionUI:rules-add\" | \"securitySolutionUI:rules-create\" | \"securitySolutionUI:rules-landing\" | \"securitySolutionUI:siem_migrations-rules\" | \"securitySolutionUI:threat_intelligence\" | \"securitySolutionUI:timelines\" | \"securitySolutionUI:timelines-templates\" | \"securitySolutionUI:trusted_apps\" | \"securitySolutionUI:users-all\" | \"securitySolutionUI:users-anomalies\" | \"securitySolutionUI:users-authentications\" | \"securitySolutionUI:users-events\" | \"securitySolutionUI:users-risk\" | \"securitySolutionUI:entity_analytics\" | \"securitySolutionUI:entity_analytics-management\" | \"securitySolutionUI:entity_analytics-asset-classification\" | \"securitySolutionUI:entity_analytics-entity_store_management\" | \"securitySolutionUI:coverage-overview\" | \"fleet:settings\" | \"fleet:agents\" | \"fleet:policies\" | \"fleet:data_streams\" | \"fleet:enrollment_tokens\" | \"fleet:uninstall_tokens\"" + "\"fleet\" | \"graph\" | \"ml\" | \"monitoring\" | \"profiling\" | \"metrics\" | \"management\" | \"apm\" | \"synthetics\" | \"ux\" | \"canvas\" | \"logs\" | \"dashboards\" | \"slo\" | \"observabilityAIAssistant\" | \"home\" | \"integrations\" | \"discover\" | \"observability-overview\" | \"streams\" | \"appSearch\" | \"dev_tools\" | \"maps\" | \"visualize\" | \"dev_tools:console\" | \"dev_tools:searchprofiler\" | \"dev_tools:painless_lab\" | \"dev_tools:grokdebugger\" | \"ml:notifications\" | \"ml:nodes\" | \"ml:overview\" | \"ml:memoryUsage\" | \"ml:settings\" | \"ml:dataVisualizer\" | \"ml:logPatternAnalysis\" | \"ml:logRateAnalysis\" | \"ml:singleMetricViewer\" | \"ml:anomalyDetection\" | \"ml:anomalyExplorer\" | \"ml:dataDrift\" | \"ml:dataFrameAnalytics\" | \"ml:resultExplorer\" | \"ml:analyticsMap\" | \"ml:aiOps\" | \"ml:changePointDetections\" | \"ml:modelManagement\" | \"ml:nodesOverview\" | \"ml:esqlDataVisualizer\" | \"ml:fileUpload\" | \"ml:indexDataVisualizer\" | \"ml:calendarSettings\" | \"ml:filterListsSettings\" | \"ml:suppliedConfigurations\" | \"osquery\" | \"management:transform\" | \"management:watcher\" | \"management:cases\" | \"management:tags\" | \"management:maintenanceWindows\" | \"management:cross_cluster_replication\" | \"management:dataViews\" | \"management:spaces\" | \"management:settings\" | \"management:users\" | \"management:migrate_data\" | \"management:search_sessions\" | \"management:data_quality\" | \"management:filesManagement\" | \"management:pipelines\" | \"management:roles\" | \"management:reporting\" | \"management:aiAssistantManagementSelection\" | \"management:securityAiAssistantManagement\" | \"management:observabilityAiAssistantManagement\" | \"management:api_keys\" | \"management:license_management\" | \"management:index_lifecycle_management\" | \"management:index_management\" | \"management:ingest_pipelines\" | \"management:jobsListLink\" | \"management:objects\" | \"management:remote_clusters\" | \"management:role_mappings\" | \"management:rollup_jobs\" | \"management:snapshot_restore\" | \"management:triggersActions\" | \"management:triggersActionsConnectors\" | \"management:upgrade_assistant\" | \"enterpriseSearch\" | \"enterpriseSearchContent\" | \"enterpriseSearchApplications\" | \"searchInferenceEndpoints\" | \"enterpriseSearchAnalytics\" | \"workplaceSearch\" | \"serverlessElasticsearch\" | \"serverlessConnectors\" | \"serverlessWebCrawlers\" | \"searchPlayground\" | \"searchHomepage\" | \"enterpriseSearchContent:connectors\" | \"enterpriseSearchContent:searchIndices\" | \"enterpriseSearchContent:webCrawlers\" | \"enterpriseSearchApplications:searchApplications\" | \"enterpriseSearchApplications:playground\" | \"appSearch:engines\" | \"searchInferenceEndpoints:inferenceEndpoints\" | \"elasticsearchStart\" | \"elasticsearchIndices\" | \"enterpriseSearchElasticsearch\" | \"enterpriseSearchVectorSearch\" | \"enterpriseSearchSemanticSearch\" | \"enterpriseSearchAISearch\" | \"elasticsearchIndices:createIndex\" | \"observability-logs-explorer\" | \"last-used-logs-viewer\" | \"observabilityOnboarding\" | \"inventory\" | \"logs:settings\" | \"logs:stream\" | \"logs:log-categories\" | \"logs:anomalies\" | \"observability-overview:cases\" | \"observability-overview:alerts\" | \"observability-overview:rules\" | \"observability-overview:cases_create\" | \"observability-overview:cases_configure\" | \"metrics:settings\" | \"metrics:hosts\" | \"metrics:inventory\" | \"metrics:metrics-explorer\" | \"metrics:assetDetails\" | \"apm:services\" | \"apm:traces\" | \"apm:dependencies\" | \"apm:service-map\" | \"apm:settings\" | \"apm:service-groups-list\" | \"apm:storage-explorer\" | \"synthetics:overview\" | \"synthetics:certificates\" | \"profiling:functions\" | \"profiling:stacktraces\" | \"profiling:flamegraphs\" | \"inventory:datastreams\" | \"streams:overview\" | \"securitySolutionUI\" | \"securitySolutionUI:\" | \"securitySolutionUI:cases\" | \"securitySolutionUI:alerts\" | \"securitySolutionUI:rules\" | \"securitySolutionUI:policy\" | \"securitySolutionUI:overview\" | \"securitySolutionUI:dashboards\" | \"securitySolutionUI:kubernetes\" | \"securitySolutionUI:cases_create\" | \"securitySolutionUI:cases_configure\" | \"securitySolutionUI:hosts\" | \"securitySolutionUI:users\" | \"securitySolutionUI:cloud_defend-policies\" | \"securitySolutionUI:cloud_security_posture-dashboard\" | \"securitySolutionUI:cloud_security_posture-findings\" | \"securitySolutionUI:cloud_security_posture-benchmarks\" | \"securitySolutionUI:network\" | \"securitySolutionUI:data_quality\" | \"securitySolutionUI:explore\" | \"securitySolutionUI:assets\" | \"securitySolutionUI:cloud_defend\" | \"securitySolutionUI:notes\" | \"securitySolutionUI:administration\" | \"securitySolutionUI:attack_discovery\" | \"securitySolutionUI:blocklist\" | \"securitySolutionUI:cloud_security_posture-rules\" | \"securitySolutionUI:detections\" | \"securitySolutionUI:detection_response\" | \"securitySolutionUI:endpoints\" | \"securitySolutionUI:event_filters\" | \"securitySolutionUI:exceptions\" | \"securitySolutionUI:host_isolation_exceptions\" | \"securitySolutionUI:hosts-all\" | \"securitySolutionUI:hosts-anomalies\" | \"securitySolutionUI:hosts-risk\" | \"securitySolutionUI:hosts-events\" | \"securitySolutionUI:hosts-sessions\" | \"securitySolutionUI:hosts-uncommon_processes\" | \"securitySolutionUI:investigations\" | \"securitySolutionUI:get_started\" | \"securitySolutionUI:machine_learning-landing\" | \"securitySolutionUI:network-anomalies\" | \"securitySolutionUI:network-dns\" | \"securitySolutionUI:network-events\" | \"securitySolutionUI:network-flows\" | \"securitySolutionUI:network-http\" | \"securitySolutionUI:network-tls\" | \"securitySolutionUI:response_actions_history\" | \"securitySolutionUI:rules-add\" | \"securitySolutionUI:rules-create\" | \"securitySolutionUI:rules-landing\" | \"securitySolutionUI:siem_migrations-rules\" | \"securitySolutionUI:threat_intelligence\" | \"securitySolutionUI:timelines\" | \"securitySolutionUI:timelines-templates\" | \"securitySolutionUI:trusted_apps\" | \"securitySolutionUI:users-all\" | \"securitySolutionUI:users-anomalies\" | \"securitySolutionUI:users-authentications\" | \"securitySolutionUI:users-events\" | \"securitySolutionUI:users-risk\" | \"securitySolutionUI:entity_analytics\" | \"securitySolutionUI:entity_analytics-management\" | \"securitySolutionUI:entity_analytics-asset-classification\" | \"securitySolutionUI:entity_analytics-entity_store_management\" | \"securitySolutionUI:coverage-overview\" | \"fleet:settings\" | \"fleet:agents\" | \"fleet:policies\" | \"fleet:data_streams\" | \"fleet:enrollment_tokens\" | \"fleet:uninstall_tokens\"" ], "path": "x-pack/plugins/search_solution/search_navigation/public/types.ts", "deprecated": false, diff --git a/api_docs/search_navigation.mdx b/api_docs/search_navigation.mdx index 696b008eade6e..e0c890e57baff 100644 --- a/api_docs/search_navigation.mdx +++ b/api_docs/search_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchNavigation title: "searchNavigation" image: https://source.unsplash.com/400x175/?github description: API docs for the searchNavigation plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchNavigation'] --- import searchNavigationObj from './search_navigation.devdocs.json'; diff --git a/api_docs/search_notebooks.mdx b/api_docs/search_notebooks.mdx index d4171fe8be324..134a0e12f368f 100644 --- a/api_docs/search_notebooks.mdx +++ b/api_docs/search_notebooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchNotebooks title: "searchNotebooks" image: https://source.unsplash.com/400x175/?github description: API docs for the searchNotebooks plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchNotebooks'] --- import searchNotebooksObj from './search_notebooks.devdocs.json'; diff --git a/api_docs/search_playground.mdx b/api_docs/search_playground.mdx index 92b698eb400f2..5754dd1df1c80 100644 --- a/api_docs/search_playground.mdx +++ b/api_docs/search_playground.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchPlayground title: "searchPlayground" image: https://source.unsplash.com/400x175/?github description: API docs for the searchPlayground plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchPlayground'] --- import searchPlaygroundObj from './search_playground.devdocs.json'; diff --git a/api_docs/security.mdx b/api_docs/security.mdx index 845ea00bd7b5f..86094ac61c79d 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; diff --git a/api_docs/security_solution.devdocs.json b/api_docs/security_solution.devdocs.json index 8320b9f633933..ff8b79974b7b8 100644 --- a/api_docs/security_solution.devdocs.json +++ b/api_docs/security_solution.devdocs.json @@ -522,7 +522,7 @@ "\nExperimental flag needed to enable the link" ], "signature": [ - "\"assistantModelEvaluation\" | \"defendInsights\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"responseActionsSentinelOneKillProcessEnabled\" | \"responseActionsSentinelOneProcessesEnabled\" | \"responseActionsCrowdstrikeManualHostIsolationEnabled\" | \"endpointManagementSpaceAwarenessEnabled\" | \"securitySolutionNotesDisabled\" | \"entityAlertPreviewDisabled\" | \"newUserDetailsFlyoutManagedUser\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"responseActionsTelemetryEnabled\" | \"jamfDataInAnalyzerEnabled\" | \"timelineEsqlTabDisabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"graphVisualizationInFlyoutEnabled\" | \"prebuiltRulesCustomizationEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"unifiedManifestEnabled\" | \"valueListItemsModalEnabled\" | \"filterProcessDescendantsForEventFiltersEnabled\" | \"dataIngestionHubEnabled\" | \"entityStoreDisabled\" | \"siemMigrationsEnabled\" | undefined" + "\"assistantModelEvaluation\" | \"defendInsights\" | \"alertSuppressionForSequenceEqlRuleEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"responseActionsSentinelOneKillProcessEnabled\" | \"responseActionsSentinelOneProcessesEnabled\" | \"responseActionsCrowdstrikeManualHostIsolationEnabled\" | \"endpointManagementSpaceAwarenessEnabled\" | \"securitySolutionNotesDisabled\" | \"entityAlertPreviewDisabled\" | \"newUserDetailsFlyoutManagedUser\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"responseActionsTelemetryEnabled\" | \"jamfDataInAnalyzerEnabled\" | \"timelineEsqlTabDisabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"graphVisualizationInFlyoutEnabled\" | \"prebuiltRulesCustomizationEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"unifiedManifestEnabled\" | \"valueListItemsModalEnabled\" | \"filterProcessDescendantsForEventFiltersEnabled\" | \"dataIngestionHubEnabled\" | \"entityStoreDisabled\" | \"siemMigrationsEnabled\" | undefined" ], "path": "x-pack/plugins/security_solution/public/common/links/types.ts", "deprecated": false, @@ -602,7 +602,7 @@ "\nExperimental flag needed to disable the link. Opposite of experimentalKey" ], "signature": [ - "\"assistantModelEvaluation\" | \"defendInsights\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"responseActionsSentinelOneKillProcessEnabled\" | \"responseActionsSentinelOneProcessesEnabled\" | \"responseActionsCrowdstrikeManualHostIsolationEnabled\" | \"endpointManagementSpaceAwarenessEnabled\" | \"securitySolutionNotesDisabled\" | \"entityAlertPreviewDisabled\" | \"newUserDetailsFlyoutManagedUser\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"responseActionsTelemetryEnabled\" | \"jamfDataInAnalyzerEnabled\" | \"timelineEsqlTabDisabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"graphVisualizationInFlyoutEnabled\" | \"prebuiltRulesCustomizationEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"unifiedManifestEnabled\" | \"valueListItemsModalEnabled\" | \"filterProcessDescendantsForEventFiltersEnabled\" | \"dataIngestionHubEnabled\" | \"entityStoreDisabled\" | \"siemMigrationsEnabled\" | undefined" + "\"assistantModelEvaluation\" | \"defendInsights\" | \"alertSuppressionForSequenceEqlRuleEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"responseActionsSentinelOneKillProcessEnabled\" | \"responseActionsSentinelOneProcessesEnabled\" | \"responseActionsCrowdstrikeManualHostIsolationEnabled\" | \"endpointManagementSpaceAwarenessEnabled\" | \"securitySolutionNotesDisabled\" | \"entityAlertPreviewDisabled\" | \"newUserDetailsFlyoutManagedUser\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"responseActionsTelemetryEnabled\" | \"jamfDataInAnalyzerEnabled\" | \"timelineEsqlTabDisabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"graphVisualizationInFlyoutEnabled\" | \"prebuiltRulesCustomizationEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"unifiedManifestEnabled\" | \"valueListItemsModalEnabled\" | \"filterProcessDescendantsForEventFiltersEnabled\" | \"dataIngestionHubEnabled\" | \"entityStoreDisabled\" | \"siemMigrationsEnabled\" | undefined" ], "path": "x-pack/plugins/security_solution/public/common/links/types.ts", "deprecated": false, @@ -1882,7 +1882,7 @@ "label": "experimentalFeatures", "description": [], "signature": [ - "{ readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly responseActionsSentinelOneKillProcessEnabled: boolean; readonly responseActionsSentinelOneProcessesEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly endpointManagementSpaceAwarenessEnabled: boolean; readonly securitySolutionNotesDisabled: boolean; readonly entityAlertPreviewDisabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly responseActionsTelemetryEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly graphVisualizationInFlyoutEnabled: boolean; readonly prebuiltRulesCustomizationEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly valueListItemsModalEnabled: boolean; readonly filterProcessDescendantsForEventFiltersEnabled: boolean; readonly dataIngestionHubEnabled: boolean; readonly entityStoreDisabled: boolean; readonly siemMigrationsEnabled: boolean; readonly defendInsights: boolean; }" + "{ readonly alertSuppressionForSequenceEqlRuleEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly responseActionsSentinelOneKillProcessEnabled: boolean; readonly responseActionsSentinelOneProcessesEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly endpointManagementSpaceAwarenessEnabled: boolean; readonly securitySolutionNotesDisabled: boolean; readonly entityAlertPreviewDisabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly responseActionsTelemetryEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly graphVisualizationInFlyoutEnabled: boolean; readonly prebuiltRulesCustomizationEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly valueListItemsModalEnabled: boolean; readonly filterProcessDescendantsForEventFiltersEnabled: boolean; readonly dataIngestionHubEnabled: boolean; readonly entityStoreDisabled: boolean; readonly siemMigrationsEnabled: boolean; readonly defendInsights: boolean; }" ], "path": "x-pack/plugins/security_solution/public/types.ts", "deprecated": false, @@ -3130,7 +3130,7 @@ "\nThe security solution generic experimental features" ], "signature": [ - "{ readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly responseActionsSentinelOneKillProcessEnabled: boolean; readonly responseActionsSentinelOneProcessesEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly endpointManagementSpaceAwarenessEnabled: boolean; readonly securitySolutionNotesDisabled: boolean; readonly entityAlertPreviewDisabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly responseActionsTelemetryEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly graphVisualizationInFlyoutEnabled: boolean; readonly prebuiltRulesCustomizationEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly valueListItemsModalEnabled: boolean; readonly filterProcessDescendantsForEventFiltersEnabled: boolean; readonly dataIngestionHubEnabled: boolean; readonly entityStoreDisabled: boolean; readonly siemMigrationsEnabled: boolean; readonly defendInsights: boolean; }" + "{ readonly alertSuppressionForSequenceEqlRuleEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly responseActionsSentinelOneKillProcessEnabled: boolean; readonly responseActionsSentinelOneProcessesEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly endpointManagementSpaceAwarenessEnabled: boolean; readonly securitySolutionNotesDisabled: boolean; readonly entityAlertPreviewDisabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly responseActionsTelemetryEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly graphVisualizationInFlyoutEnabled: boolean; readonly prebuiltRulesCustomizationEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly valueListItemsModalEnabled: boolean; readonly filterProcessDescendantsForEventFiltersEnabled: boolean; readonly dataIngestionHubEnabled: boolean; readonly entityStoreDisabled: boolean; readonly siemMigrationsEnabled: boolean; readonly defendInsights: boolean; }" ], "path": "x-pack/plugins/security_solution/server/plugin_contract.ts", "deprecated": false, @@ -3303,7 +3303,7 @@ "label": "ExperimentalFeatures", "description": [], "signature": [ - "{ readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly responseActionsSentinelOneKillProcessEnabled: boolean; readonly responseActionsSentinelOneProcessesEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly endpointManagementSpaceAwarenessEnabled: boolean; readonly securitySolutionNotesDisabled: boolean; readonly entityAlertPreviewDisabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly responseActionsTelemetryEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly graphVisualizationInFlyoutEnabled: boolean; readonly prebuiltRulesCustomizationEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly valueListItemsModalEnabled: boolean; readonly filterProcessDescendantsForEventFiltersEnabled: boolean; readonly dataIngestionHubEnabled: boolean; readonly entityStoreDisabled: boolean; readonly siemMigrationsEnabled: boolean; readonly defendInsights: boolean; }" + "{ readonly alertSuppressionForSequenceEqlRuleEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly responseActionsSentinelOneKillProcessEnabled: boolean; readonly responseActionsSentinelOneProcessesEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly endpointManagementSpaceAwarenessEnabled: boolean; readonly securitySolutionNotesDisabled: boolean; readonly entityAlertPreviewDisabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly responseActionsTelemetryEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly graphVisualizationInFlyoutEnabled: boolean; readonly prebuiltRulesCustomizationEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly unifiedManifestEnabled: boolean; readonly valueListItemsModalEnabled: boolean; readonly filterProcessDescendantsForEventFiltersEnabled: boolean; readonly dataIngestionHubEnabled: boolean; readonly entityStoreDisabled: boolean; readonly siemMigrationsEnabled: boolean; readonly defendInsights: boolean; }" ], "path": "x-pack/plugins/security_solution/common/experimental_features.ts", "deprecated": false, @@ -3369,7 +3369,7 @@ "\nA list of allowed values that can be used in `xpack.securitySolution.enableExperimental`.\nThis object is then used to validate and parse the value entered." ], "signature": [ - "{ readonly excludePoliciesInFilterEnabled: false; readonly kubernetesEnabled: false; readonly donutChartEmbeddablesEnabled: false; readonly previewTelemetryUrlEnabled: false; readonly extendedRuleExecutionLoggingEnabled: false; readonly socTrendsEnabled: false; readonly responseActionUploadEnabled: true; readonly automatedProcessActionsEnabled: true; readonly responseActionsSentinelOneV1Enabled: true; readonly responseActionsSentinelOneV2Enabled: true; readonly responseActionsSentinelOneGetFileEnabled: true; readonly responseActionsSentinelOneKillProcessEnabled: true; readonly responseActionsSentinelOneProcessesEnabled: true; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: true; readonly endpointManagementSpaceAwarenessEnabled: false; readonly securitySolutionNotesDisabled: false; readonly entityAlertPreviewDisabled: false; readonly assistantModelEvaluation: false; readonly newUserDetailsFlyoutManagedUser: false; readonly riskScoringPersistence: true; readonly riskScoringRoutesEnabled: true; readonly esqlRulesDisabled: false; readonly protectionUpdatesEnabled: true; readonly disableTimelineSaveTour: false; readonly riskEnginePrivilegesRouteEnabled: true; readonly sentinelOneDataInAnalyzerEnabled: true; readonly sentinelOneManualHostActionsEnabled: true; readonly crowdstrikeDataInAnalyzerEnabled: true; readonly responseActionsTelemetryEnabled: false; readonly jamfDataInAnalyzerEnabled: true; readonly timelineEsqlTabDisabled: false; readonly analyzerDatePickersAndSourcererDisabled: false; readonly graphVisualizationInFlyoutEnabled: false; readonly prebuiltRulesCustomizationEnabled: false; readonly malwareOnWriteScanOptionAvailable: true; readonly unifiedManifestEnabled: true; readonly valueListItemsModalEnabled: true; readonly filterProcessDescendantsForEventFiltersEnabled: true; readonly dataIngestionHubEnabled: false; readonly entityStoreDisabled: false; readonly siemMigrationsEnabled: false; readonly defendInsights: false; }" + "{ readonly alertSuppressionForSequenceEqlRuleEnabled: true; readonly excludePoliciesInFilterEnabled: false; readonly kubernetesEnabled: false; readonly donutChartEmbeddablesEnabled: false; readonly previewTelemetryUrlEnabled: false; readonly extendedRuleExecutionLoggingEnabled: false; readonly socTrendsEnabled: false; readonly responseActionUploadEnabled: true; readonly automatedProcessActionsEnabled: true; readonly responseActionsSentinelOneV1Enabled: true; readonly responseActionsSentinelOneV2Enabled: true; readonly responseActionsSentinelOneGetFileEnabled: true; readonly responseActionsSentinelOneKillProcessEnabled: true; readonly responseActionsSentinelOneProcessesEnabled: true; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: true; readonly endpointManagementSpaceAwarenessEnabled: false; readonly securitySolutionNotesDisabled: false; readonly entityAlertPreviewDisabled: false; readonly assistantModelEvaluation: false; readonly newUserDetailsFlyoutManagedUser: false; readonly riskScoringPersistence: true; readonly riskScoringRoutesEnabled: true; readonly esqlRulesDisabled: false; readonly protectionUpdatesEnabled: true; readonly disableTimelineSaveTour: false; readonly riskEnginePrivilegesRouteEnabled: true; readonly sentinelOneDataInAnalyzerEnabled: true; readonly sentinelOneManualHostActionsEnabled: true; readonly crowdstrikeDataInAnalyzerEnabled: true; readonly responseActionsTelemetryEnabled: false; readonly jamfDataInAnalyzerEnabled: true; readonly timelineEsqlTabDisabled: false; readonly analyzerDatePickersAndSourcererDisabled: false; readonly graphVisualizationInFlyoutEnabled: false; readonly prebuiltRulesCustomizationEnabled: false; readonly malwareOnWriteScanOptionAvailable: true; readonly unifiedManifestEnabled: true; readonly valueListItemsModalEnabled: true; readonly filterProcessDescendantsForEventFiltersEnabled: true; readonly dataIngestionHubEnabled: false; readonly entityStoreDisabled: false; readonly siemMigrationsEnabled: false; readonly defendInsights: false; }" ], "path": "x-pack/plugins/security_solution/common/experimental_features.ts", "deprecated": false, diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index e46d694e3ae15..fa48cda70fba1 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-12-02 +date: 2024-12-05 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 e1a4fe0b178ab..4a58a37c33a08 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-12-02 +date: 2024-12-05 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 508b6b47f99eb..3b87510bbab9a 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-12-02 +date: 2024-12-05 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 b8017d3c3045c..1bce5689dd94b 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-12-02 +date: 2024-12-05 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 f77857c46c8a2..d8d823181a96e 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-12-02 +date: 2024-12-05 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 a9b1117f5ce6d..24a3beb0fe69c 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-12-02 +date: 2024-12-05 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 6c74162eb1fd1..592b08ffaa0ca 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-12-02 +date: 2024-12-05 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 7f75bf21fc310..b5d7cec902506 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] --- import shareObj from './share.devdocs.json'; diff --git a/api_docs/slo.devdocs.json b/api_docs/slo.devdocs.json index 0485730fce148..2aa0b68399118 100644 --- a/api_docs/slo.devdocs.json +++ b/api_docs/slo.devdocs.json @@ -665,6 +665,27 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "slo", + "id": "def-public.SLOPublicPluginsStart.embeddableEnhanced", + "type": "Object", + "tags": [], + "label": "embeddableEnhanced", + "description": [], + "signature": [ + { + "pluginId": "embeddableEnhanced", + "scope": "public", + "docId": "kibEmbeddableEnhancedPluginApi", + "section": "def-public.StartContract", + "text": "StartContract" + }, + " | undefined" + ], + "path": "x-pack/plugins/observability_solution/slo/public/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "slo", "id": "def-public.SLOPublicPluginsStart.fieldFormats", @@ -1142,9 +1163,7 @@ "section": "def-common.RecursivePartial", "text": "RecursivePartial" }, - "<", - "CreateSLOForm", - "<{ type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }>> | undefined; }>; }" + "<{ name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }; timeWindow: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; } & { id?: string | undefined; settings?: { syncDelay?: string | undefined; frequency?: string | undefined; preventInitialBackfill?: boolean | undefined; syncField?: string | null | undefined; } | undefined; tags?: string[] | undefined; groupBy?: string | string[] | undefined; revision?: number | undefined; }> | undefined; }>; }" ], "path": "x-pack/plugins/observability_solution/slo/public/types.ts", "deprecated": false, @@ -1179,8 +1198,8 @@ "text": "LocatorPublic" }, "<", - "SloEditLocatorParams", - ">; sloListLocator: ", + "RecursivePartial", + "<{ name: string; description: string; indicator: { type: \"sli.apm.transactionDuration\"; params: { environment: string; service: string; transactionType: string; transactionName: string; threshold: number; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.apm.transactionErrorRate\"; params: { environment: string; service: string; transactionType: string; transactionName: string; index: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.synthetics.availability\"; params: { monitorIds: { value: string; label: string; }[]; index: string; } & { tags?: { value: string; label: string; }[] | undefined; projects?: { value: string; label: string; }[] | undefined; filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.kql.custom\"; params: { index: string; good: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; total: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.custom\"; params: { index: string; good: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; total: { metrics: (({ name: string; aggregation: \"sum\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.metric.timeslice\"; params: { index: string; metric: { metrics: (({ name: string; aggregation: \"min\" | \"max\" | \"sum\" | \"avg\" | \"cardinality\" | \"last_value\" | \"std_deviation\"; field: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"doc_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ name: string; aggregation: \"percentile\"; field: string; percentile: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }))[]; equation: string; threshold: number; comparator: \"GT\" | \"GTE\" | \"LT\" | \"LTE\"; }; timestampField: string; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; } | { type: \"sli.histogram.custom\"; params: { index: string; timestampField: string; good: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); total: ({ field: string; aggregation: \"value_count\"; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }) | ({ field: string; aggregation: \"range\"; from: number; to: number; } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; }); } & { filter?: string | { kqlQuery: string; filters: { meta: { alias?: string | null | undefined; disabled?: boolean | undefined; negate?: boolean | undefined; controlledBy?: string | undefined; group?: string | undefined; index?: string | undefined; isMultiIndex?: boolean | undefined; type?: string | undefined; key?: string | undefined; field?: string | undefined; params?: any; value?: string | undefined; }; query: { [x: string]: any; }; }[]; } | undefined; dataViewId?: string | undefined; }; }; timeWindow: { duration: string; type: \"rolling\"; } | { duration: string; type: \"calendarAligned\"; }; budgetingMethod: \"occurrences\" | \"timeslices\"; objective: { target: number; } & { timesliceTarget?: number | undefined; timesliceWindow?: string | undefined; }; } & { id?: string | undefined; settings?: { syncDelay?: string | undefined; frequency?: string | undefined; preventInitialBackfill?: boolean | undefined; syncField?: string | null | undefined; } | undefined; tags?: string[] | undefined; groupBy?: string | string[] | undefined; revision?: number | undefined; }>>; sloListLocator: ", { "pluginId": "share", "scope": "common", diff --git a/api_docs/slo.mdx b/api_docs/slo.mdx index 7257d29e3982e..689806fa24559 100644 --- a/api_docs/slo.mdx +++ b/api_docs/slo.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/slo title: "slo" image: https://source.unsplash.com/400x175/?github description: API docs for the slo plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'slo'] --- import sloObj from './slo.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/ | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 47 | 0 | 47 | 4 | +| 48 | 0 | 48 | 2 | ## Client diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index 90d472b5abe1c..289ef73971b1f 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github description: API docs for the snapshotRestore plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] --- import snapshotRestoreObj from './snapshot_restore.devdocs.json'; diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index 8fbadcf7f7295..7f3dbaebd92cf 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-12-02 +date: 2024-12-05 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 bd53c9fe642e6..3626aafe3a713 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-12-02 +date: 2024-12-05 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 d9733edec8ff8..cf11b8e102cc2 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors'] --- import stackConnectorsObj from './stack_connectors.devdocs.json'; diff --git a/api_docs/streams.devdocs.json b/api_docs/streams.devdocs.json index 1d744b0580b2f..095b9b87cb116 100644 --- a/api_docs/streams.devdocs.json +++ b/api_docs/streams.devdocs.json @@ -63,7 +63,29 @@ "section": "def-common.RouteRepositoryClient", "text": "RouteRepositoryClient" }, - "<{ \"POST /api/streams/_disable\": ", + "<{ \"POST /api/streams/{id}/_sample\": ", + { + "pluginId": "@kbn/server-route-repository-utils", + "scope": "common", + "docId": "kibKbnServerRouteRepositoryUtilsPluginApi", + "section": "def-common.ServerRoute", + "text": "ServerRoute" + }, + "<\"POST /api/streams/{id}/_sample\", Zod.ZodObject<{ path: Zod.ZodObject<{ id: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; }, { id: string; }>; body: Zod.ZodObject<{ condition: Zod.ZodOptional>; start: Zod.ZodOptional; end: Zod.ZodOptional; number: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { number?: number | undefined; start?: number | undefined; end?: number | undefined; condition?: ", + "Condition", + "; }, { number?: number | undefined; start?: number | undefined; end?: number | undefined; condition?: ", + "Condition", + "; }>; }, \"strip\", Zod.ZodTypeAny, { path: { id: string; }; body: { number?: number | undefined; start?: number | undefined; end?: number | undefined; condition?: ", + "Condition", + "; }; }, { path: { id: string; }; body: { number?: number | undefined; start?: number | undefined; end?: number | undefined; condition?: ", + "Condition", + "; }; }>, ", + "StreamsRouteHandlerResources", + ", { documents: unknown[]; }, undefined>; \"POST /api/streams/_disable\": ", { "pluginId": "@kbn/server-route-repository-utils", "scope": "common", @@ -107,9 +129,9 @@ "StreamsRouteHandlerResources", ", { definitions: { id: string; children: { id: string; condition?: ", "Condition", - "; }[]; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", + "; }[]; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; managed: boolean; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", "Condition", - "; }[]; }[]; trees: ", + "; }[]; unmanaged_elasticsearch_assets?: { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }[] | undefined; }[]; trees: ", "StreamTree", "[]; }, undefined>; \"DELETE /api/streams/{id}\": ", { @@ -175,9 +197,9 @@ "StreamsRouteHandlerResources", ", { id: string; children: { id: string; condition?: ", "Condition", - "; }[]; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", + "; }[]; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; managed: boolean; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", "Condition", - "; }[]; } & { inheritedFields: ({ type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; } & { from: string; })[]; }, undefined>; \"POST /api/streams/{id}/_fork\": ", + "; }[]; inheritedFields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; from: string; }[]; unmanaged_elasticsearch_assets?: { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }[] | undefined; }, undefined>; \"POST /api/streams/{id}/_fork\": ", { "pluginId": "@kbn/server-route-repository-utils", "scope": "common", @@ -201,29 +223,29 @@ "Condition", "; }, { id: string; condition?: ", "Condition", - "; }>, \"many\">>; }, { id: Zod.ZodString; }>, \"children\">, \"strip\", Zod.ZodTypeAny, { id: string; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", + "; }>, \"many\">>; }, { id: Zod.ZodString; managed: Zod.ZodDefault; unmanaged_elasticsearch_assets: Zod.ZodOptional; id: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }, { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }>, \"many\">>; }>, \"children\">, \"strip\", Zod.ZodTypeAny, { id: string; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; managed: boolean; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", "Condition", - "; }[]; }, { id: string; fields?: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[] | undefined; processing?: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", + "; }[]; unmanaged_elasticsearch_assets?: { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }[] | undefined; }, { id: string; fields?: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[] | undefined; managed?: boolean | undefined; processing?: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", "Condition", - "; }[] | undefined; }>; condition: Zod.ZodType<", + "; }[] | undefined; unmanaged_elasticsearch_assets?: { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }[] | undefined; }>; condition: Zod.ZodType<", "Condition", ", Zod.ZodTypeDef, ", "Condition", - ">; }, \"strip\", Zod.ZodTypeAny, { stream: { id: string; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", + ">; }, \"strip\", Zod.ZodTypeAny, { stream: { id: string; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; managed: boolean; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", "Condition", - "; }[]; }; condition?: ", + "; }[]; unmanaged_elasticsearch_assets?: { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }[] | undefined; }; condition?: ", "Condition", - "; }, { stream: { id: string; fields?: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[] | undefined; processing?: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", + "; }, { stream: { id: string; fields?: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[] | undefined; managed?: boolean | undefined; processing?: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", "Condition", - "; }[] | undefined; }; condition?: ", + "; }[] | undefined; unmanaged_elasticsearch_assets?: { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }[] | undefined; }; condition?: ", "Condition", - "; }>; }, \"strip\", Zod.ZodTypeAny, { path: { id: string; }; body: { stream: { id: string; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", + "; }>; }, \"strip\", Zod.ZodTypeAny, { path: { id: string; }; body: { stream: { id: string; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; managed: boolean; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", "Condition", - "; }[]; }; condition?: ", + "; }[]; unmanaged_elasticsearch_assets?: { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }[] | undefined; }; condition?: ", "Condition", - "; }; }, { path: { id: string; }; body: { stream: { id: string; fields?: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[] | undefined; processing?: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", + "; }; }, { path: { id: string; }; body: { stream: { id: string; fields?: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[] | undefined; managed?: boolean | undefined; processing?: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", "Condition", - "; }[] | undefined; }; condition?: ", + "; }[] | undefined; unmanaged_elasticsearch_assets?: { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }[] | undefined; }; condition?: ", "Condition", "; }; }>, ", "StreamsRouteHandlerResources", @@ -290,17 +312,6 @@ "deprecated": false, "trackAdoption": false, "children": [ - { - "parentPluginId": "streams", - "id": "def-server.ListStreamResponse.total", - "type": "number", - "tags": [], - "label": "total", - "description": [], - "path": "x-pack/plugins/streams/server/lib/streams/stream_crud.ts", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "streams", "id": "def-server.ListStreamResponse.definitions", @@ -311,9 +322,9 @@ "signature": [ "{ id: string; children: { id: string; condition?: ", "Condition", - "; }[]; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", + "; }[]; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; managed: boolean; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", "Condition", - "; }[]; }[]" + "; }[]; unmanaged_elasticsearch_assets?: { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }[] | undefined; }[]" ], "path": "x-pack/plugins/streams/server/lib/streams/stream_crud.ts", "deprecated": false, @@ -348,7 +359,29 @@ "label": "StreamsRouteRepository", "description": [], "signature": [ - "{ \"POST /api/streams/_disable\": ", + "{ \"POST /api/streams/{id}/_sample\": ", + { + "pluginId": "@kbn/server-route-repository-utils", + "scope": "common", + "docId": "kibKbnServerRouteRepositoryUtilsPluginApi", + "section": "def-common.ServerRoute", + "text": "ServerRoute" + }, + "<\"POST /api/streams/{id}/_sample\", Zod.ZodObject<{ path: Zod.ZodObject<{ id: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; }, { id: string; }>; body: Zod.ZodObject<{ condition: Zod.ZodOptional>; start: Zod.ZodOptional; end: Zod.ZodOptional; number: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { number?: number | undefined; start?: number | undefined; end?: number | undefined; condition?: ", + "Condition", + "; }, { number?: number | undefined; start?: number | undefined; end?: number | undefined; condition?: ", + "Condition", + "; }>; }, \"strip\", Zod.ZodTypeAny, { path: { id: string; }; body: { number?: number | undefined; start?: number | undefined; end?: number | undefined; condition?: ", + "Condition", + "; }; }, { path: { id: string; }; body: { number?: number | undefined; start?: number | undefined; end?: number | undefined; condition?: ", + "Condition", + "; }; }>, ", + "StreamsRouteHandlerResources", + ", { documents: unknown[]; }, undefined>; \"POST /api/streams/_disable\": ", { "pluginId": "@kbn/server-route-repository-utils", "scope": "common", @@ -392,9 +425,9 @@ "StreamsRouteHandlerResources", ", { definitions: { id: string; children: { id: string; condition?: ", "Condition", - "; }[]; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", + "; }[]; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; managed: boolean; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", "Condition", - "; }[]; }[]; trees: ", + "; }[]; unmanaged_elasticsearch_assets?: { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }[] | undefined; }[]; trees: ", "StreamTree", "[]; }, undefined>; \"DELETE /api/streams/{id}\": ", { @@ -460,9 +493,9 @@ "StreamsRouteHandlerResources", ", { id: string; children: { id: string; condition?: ", "Condition", - "; }[]; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", + "; }[]; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; managed: boolean; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", "Condition", - "; }[]; } & { inheritedFields: ({ type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; } & { from: string; })[]; }, undefined>; \"POST /api/streams/{id}/_fork\": ", + "; }[]; inheritedFields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; from: string; }[]; unmanaged_elasticsearch_assets?: { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }[] | undefined; }, undefined>; \"POST /api/streams/{id}/_fork\": ", { "pluginId": "@kbn/server-route-repository-utils", "scope": "common", @@ -486,29 +519,29 @@ "Condition", "; }, { id: string; condition?: ", "Condition", - "; }>, \"many\">>; }, { id: Zod.ZodString; }>, \"children\">, \"strip\", Zod.ZodTypeAny, { id: string; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", + "; }>, \"many\">>; }, { id: Zod.ZodString; managed: Zod.ZodDefault; unmanaged_elasticsearch_assets: Zod.ZodOptional; id: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }, { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }>, \"many\">>; }>, \"children\">, \"strip\", Zod.ZodTypeAny, { id: string; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; managed: boolean; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", "Condition", - "; }[]; }, { id: string; fields?: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[] | undefined; processing?: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", + "; }[]; unmanaged_elasticsearch_assets?: { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }[] | undefined; }, { id: string; fields?: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[] | undefined; managed?: boolean | undefined; processing?: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", "Condition", - "; }[] | undefined; }>; condition: Zod.ZodType<", + "; }[] | undefined; unmanaged_elasticsearch_assets?: { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }[] | undefined; }>; condition: Zod.ZodType<", "Condition", ", Zod.ZodTypeDef, ", "Condition", - ">; }, \"strip\", Zod.ZodTypeAny, { stream: { id: string; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", + ">; }, \"strip\", Zod.ZodTypeAny, { stream: { id: string; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; managed: boolean; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", "Condition", - "; }[]; }; condition?: ", + "; }[]; unmanaged_elasticsearch_assets?: { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }[] | undefined; }; condition?: ", "Condition", - "; }, { stream: { id: string; fields?: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[] | undefined; processing?: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", + "; }, { stream: { id: string; fields?: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[] | undefined; managed?: boolean | undefined; processing?: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", "Condition", - "; }[] | undefined; }; condition?: ", + "; }[] | undefined; unmanaged_elasticsearch_assets?: { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }[] | undefined; }; condition?: ", "Condition", - "; }>; }, \"strip\", Zod.ZodTypeAny, { path: { id: string; }; body: { stream: { id: string; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", + "; }>; }, \"strip\", Zod.ZodTypeAny, { path: { id: string; }; body: { stream: { id: string; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; managed: boolean; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", "Condition", - "; }[]; }; condition?: ", + "; }[]; unmanaged_elasticsearch_assets?: { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }[] | undefined; }; condition?: ", "Condition", - "; }; }, { path: { id: string; }; body: { stream: { id: string; fields?: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[] | undefined; processing?: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", + "; }; }, { path: { id: string; }; body: { stream: { id: string; fields?: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[] | undefined; managed?: boolean | undefined; processing?: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", "Condition", - "; }[] | undefined; }; condition?: ", + "; }[] | undefined; unmanaged_elasticsearch_assets?: { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }[] | undefined; }; condition?: ", "Condition", "; }; }>, ", "StreamsRouteHandlerResources", @@ -576,6 +609,25 @@ "interfaces": [], "enums": [], "misc": [ + { + "parentPluginId": "streams", + "id": "def-common.ReadStreamDefinition", + "type": "Type", + "tags": [], + "label": "ReadStreamDefinition", + "description": [], + "signature": [ + "{ id: string; children: { id: string; condition?: ", + "Condition", + "; }[]; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; managed: boolean; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", + "Condition", + "; }[]; inheritedFields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; from: string; }[]; unmanaged_elasticsearch_assets?: { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }[] | undefined; }" + ], + "path": "x-pack/plugins/streams/common/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "streams", "id": "def-common.StreamDefinition", @@ -586,9 +638,9 @@ "signature": [ "{ id: string; children: { id: string; condition?: ", "Condition", - "; }[]; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", + "; }[]; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; managed: boolean; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", "Condition", - "; }[]; }" + "; }[]; unmanaged_elasticsearch_assets?: { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }[] | undefined; }" ], "path": "x-pack/plugins/streams/common/types.ts", "deprecated": false, diff --git a/api_docs/streams.mdx b/api_docs/streams.mdx index 8acd3ce71dabf..003aade7cc175 100644 --- a/api_docs/streams.mdx +++ b/api_docs/streams.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/streams title: "streams" image: https://source.unsplash.com/400x175/?github description: API docs for the streams plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'streams'] --- import streamsObj from './streams.devdocs.json'; A manager for Streams -Contact @simianhacker @flash1293 @dgieselaar for questions regarding this plugin. +Contact [@elastic/streams-program-team](https://github.com/orgs/elastic/teams/streams-program-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/streams_app.devdocs.json b/api_docs/streams_app.devdocs.json index 2bb7bd48fb0cb..12a4d9b1b7d5a 100644 --- a/api_docs/streams_app.devdocs.json +++ b/api_docs/streams_app.devdocs.json @@ -114,9 +114,9 @@ "signature": [ "EntityBase & { type: \"stream\"; properties: { id: string; children: { id: string; condition?: ", "Condition", - "; }[]; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", + "; }[]; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; managed: boolean; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", "Condition", - "; }[]; }; }" + "; }[]; unmanaged_elasticsearch_assets?: { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }[] | undefined; }; }" ], "path": "x-pack/plugins/streams_app/common/index.ts", "deprecated": false, @@ -133,9 +133,9 @@ "signature": [ "EntityBase & { type: \"stream\"; properties: { id: string; children: { id: string; condition?: ", "Condition", - "; }[]; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", + "; }[]; fields: { type: \"boolean\" | \"ip\" | \"keyword\" | \"date\" | \"long\" | \"double\" | \"match_only_text\"; name: string; }[]; managed: boolean; processing: { config: { type: \"grok\"; field: string; patterns: string[]; pattern_definitions?: Record | undefined; } | { type: \"dissect\"; field: string; pattern: string; }; condition?: ", "Condition", - "; }[]; }; }" + "; }[]; unmanaged_elasticsearch_assets?: { id: string; type: \"ingest_pipeline\" | \"data_stream\" | \"index_template\" | \"component_template\"; }[] | undefined; }; }" ], "path": "x-pack/plugins/streams_app/common/index.ts", "deprecated": false, diff --git a/api_docs/streams_app.mdx b/api_docs/streams_app.mdx index f5a2a70c66da0..329525ae787fa 100644 --- a/api_docs/streams_app.mdx +++ b/api_docs/streams_app.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/streamsApp title: "streamsApp" image: https://source.unsplash.com/400x175/?github description: API docs for the streamsApp plugin -date: 2024-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'streamsApp'] --- import streamsAppObj from './streams_app.devdocs.json'; -Contact @simianhacker @flash1293 @dgieselaar for questions regarding this plugin. +Contact [@elastic/streams-program-team](https://github.com/orgs/elastic/teams/streams-program-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index c36afc3e5bb43..703d8351735c7 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] --- import taskManagerObj from './task_manager.devdocs.json'; diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index 46b620d39c886..a866c7d3850ee 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-12-02 +date: 2024-12-05 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 6871890f85ec4..d539948409e38 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager'] --- import telemetryCollectionManagerObj from './telemetry_collection_manager.devdocs.json'; diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx index 97f7009271f70..65a50a0688cdc 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] --- import telemetryManagementSectionObj from './telemetry_management_section.devdocs.json'; diff --git a/api_docs/threat_intelligence.mdx b/api_docs/threat_intelligence.mdx index 6c0dbd56343e2..ec46a182fa48e 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-12-02 +date: 2024-12-05 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 81d6615d632ed..2386818bb1276 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-12-02 +date: 2024-12-05 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 6747f46b949f1..8b0b38ff27c69 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.devdocs.json b/api_docs/triggers_actions_ui.devdocs.json index 7521fa286a980..745d84311216c 100644 --- a/api_docs/triggers_actions_ui.devdocs.json +++ b/api_docs/triggers_actions_ui.devdocs.json @@ -1261,7 +1261,7 @@ "label": "loadRuleAggregations", "description": [], "signature": [ - "({\n http,\n searchText,\n typesFilter,\n actionTypesFilter,\n ruleExecutionStatusesFilter,\n ruleStatusesFilter,\n tagsFilter,\n filterConsumers,\n}: ", + "({\n http,\n searchText,\n actionTypesFilter,\n ruleExecutionStatusesFilter,\n ruleStatusesFilter,\n tagsFilter,\n ruleTypeIds,\n consumers,\n}: ", "LoadRuleAggregationsProps", ") => Promise<", "AggregateRulesResponse", @@ -1276,7 +1276,7 @@ "id": "def-public.loadRuleAggregations.$1", "type": "Object", "tags": [], - "label": "{\n http,\n searchText,\n typesFilter,\n actionTypesFilter,\n ruleExecutionStatusesFilter,\n ruleStatusesFilter,\n tagsFilter,\n filterConsumers,\n}", + "label": "{\n http,\n searchText,\n actionTypesFilter,\n ruleExecutionStatusesFilter,\n ruleStatusesFilter,\n tagsFilter,\n ruleTypeIds,\n consumers,\n}", "description": [], "signature": [ "LoadRuleAggregationsProps" @@ -4602,7 +4602,7 @@ "section": "def-common.RuleType", "text": "RuleType" }, - ", \"id\" | \"name\" | \"recoveryActionGroup\" | \"actionGroups\" | \"defaultActionGroupId\" | \"producer\" | \"minimumLicenseRequired\" | \"defaultScheduleInterval\" | \"ruleTaskTimeout\" | \"doesSetRecoveryContext\">" + ", \"id\" | \"name\" | \"recoveryActionGroup\" | \"actionGroups\" | \"defaultActionGroupId\" | \"category\" | \"producer\" | \"minimumLicenseRequired\" | \"defaultScheduleInterval\" | \"ruleTaskTimeout\" | \"doesSetRecoveryContext\">" ], "path": "packages/kbn-triggers-actions-ui-types/rule_types.ts", "deprecated": false, @@ -4764,9 +4764,9 @@ "signature": [ "(ruleParams: Params, isServerless?: boolean | undefined) => ", { - "pluginId": "@kbn/alerts-ui-shared", + "pluginId": "@kbn/response-ops-rule-form", "scope": "public", - "docId": "kibKbnAlertsUiSharedPluginApi", + "docId": "kibKbnResponseOpsRuleFormPluginApi", "section": "def-public.ValidationResult", "text": "ValidationResult" } @@ -5963,7 +5963,7 @@ "tags": [], "label": "ValidationResult", "description": [], - "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "path": "packages/response-ops/rule_form/src/types.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -5977,7 +5977,7 @@ "signature": [ "{ [x: string]: any; }" ], - "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "path": "packages/response-ops/rule_form/src/types.ts", "deprecated": false, "trackAdoption": false } @@ -6274,15 +6274,7 @@ "section": "def-common.Alert", "text": "Alert" }, - ") => boolean) | undefined; dynamicRowHeight?: boolean | undefined; featureIds?: ", - { - "pluginId": "@kbn/rule-data-utils", - "scope": "common", - "docId": "kibKbnRuleDataUtilsPluginApi", - "section": "def-common.AlertConsumers", - "text": "AlertConsumers" - }, - "[] | undefined; pageIndex: number; pageSize: number; sort: ", + ") => boolean) | undefined; dynamicRowHeight?: boolean | undefined; ruleTypeIds?: string[] | undefined; pageIndex: number; pageSize: number; sort: ", "SortCombinations", "[]; isLoading: boolean; alerts: ", "Alerts", @@ -7906,7 +7898,7 @@ }, ">(props: Omit<", "RuleAddProps", - ", \"actionTypeRegistry\" | \"ruleTypeRegistry\">) => React.ReactElement<", + ", \"ruleTypeRegistry\" | \"actionTypeRegistry\">) => React.ReactElement<", "RuleAddProps", ", string | React.JSXElementConstructor>" ], @@ -7924,7 +7916,7 @@ "signature": [ "Omit<", "RuleAddProps", - ", \"actionTypeRegistry\" | \"ruleTypeRegistry\">" + ", \"ruleTypeRegistry\" | \"actionTypeRegistry\">" ], "path": "x-pack/plugins/triggers_actions_ui/public/plugin.ts", "deprecated": false, @@ -7976,7 +7968,7 @@ }, ">(props: Omit<", "RuleEditProps", - ", \"actionTypeRegistry\" | \"ruleTypeRegistry\">) => React.ReactElement<", + ", \"ruleTypeRegistry\" | \"actionTypeRegistry\">) => React.ReactElement<", "RuleEditProps", ", string | React.JSXElementConstructor>" ], @@ -7994,7 +7986,7 @@ "signature": [ "Omit<", "RuleEditProps", - ", \"actionTypeRegistry\" | \"ruleTypeRegistry\">" + ", \"ruleTypeRegistry\" | \"actionTypeRegistry\">" ], "path": "x-pack/plugins/triggers_actions_ui/public/plugin.ts", "deprecated": false, @@ -8110,15 +8102,7 @@ "section": "def-public.AlertsTableConfigurationRegistryContract", "text": "AlertsTableConfigurationRegistryContract" }, - "; configurationId: string; id: string; featureIds: ", - { - "pluginId": "@kbn/rule-data-utils", - "scope": "common", - "docId": "kibKbnRuleDataUtilsPluginApi", - "section": "def-common.AlertConsumers", - "text": "AlertConsumers" - }, - "[]; query: Pick<", + "; configurationId: string; id: string; ruleTypeIds: string[]; consumers?: string[] | undefined; query: Pick<", "QueryDslQueryContainer", ", \"ids\" | \"bool\">; initialPageSize?: number | undefined; browserFields?: ", { @@ -8182,15 +8166,7 @@ "section": "def-public.AlertsTableConfigurationRegistryContract", "text": "AlertsTableConfigurationRegistryContract" }, - "; configurationId: string; id: string; featureIds: ", - { - "pluginId": "@kbn/rule-data-utils", - "scope": "common", - "docId": "kibKbnRuleDataUtilsPluginApi", - "section": "def-common.AlertConsumers", - "text": "AlertConsumers" - }, - "[]; query: Pick<", + "; configurationId: string; id: string; ruleTypeIds: string[]; consumers?: string[] | undefined; query: Pick<", "QueryDslQueryContainer", ", \"ids\" | \"bool\">; initialPageSize?: number | undefined; browserFields?: ", { diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index b0e6e5e5d8048..82a0e67444e37 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-12-02 +date: 2024-12-05 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 0716d683733d2..c19d33faafb53 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-12-02 +date: 2024-12-05 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 9e54ffe4d13ae..c7f6e59a5cfae 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-12-02 +date: 2024-12-05 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 5f1550f07b0f6..fb7e58deb13fa 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-12-02 +date: 2024-12-05 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 7be5386d8b475..3189130e339ba 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-12-02 +date: 2024-12-05 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 b5596e5abd2b2..ed1eaebaba5d5 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-12-02 +date: 2024-12-05 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 52b36bcbbe154..344f79ae663cb 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] --- import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json'; diff --git a/api_docs/uptime.devdocs.json b/api_docs/uptime.devdocs.json index 2472612c7dcdf..7bfe1796ff507 100644 --- a/api_docs/uptime.devdocs.json +++ b/api_docs/uptime.devdocs.json @@ -24,15 +24,17 @@ "misc": [ { "parentPluginId": "uptime", - "id": "def-common.UPTIME_RULE_TYPES", + "id": "def-common.UPTIME_RULE_TYPE_IDS", "type": "Array", "tags": [], - "label": "UPTIME_RULE_TYPES", - "description": [], + "label": "UPTIME_RULE_TYPE_IDS", + "description": [ + "\nUptime rule types" + ], "signature": [ "string[]" ], - "path": "x-pack/plugins/observability_solution/uptime/common/constants/uptime_alerts.ts", + "path": "packages/kbn-rule-data-utils/src/rule_types/o11y_rules.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false diff --git a/api_docs/uptime.mdx b/api_docs/uptime.mdx index ee5dbdd12028b..47377ce873102 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uptime'] --- import uptimeObj from './uptime.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/ | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 1 | 0 | 1 | 0 | +| 1 | 0 | 0 | 0 | ## Common diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index 0e659842cbcc8..6293673e8efce 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-12-02 +date: 2024-12-05 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 b952d56307cbd..2959756858a34 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-12-02 +date: 2024-12-05 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 477d53923484b..1849f153beb16 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-12-02 +date: 2024-12-05 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 8d55c8d0ce2d0..cb30d696b8d47 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-12-02 +date: 2024-12-05 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 ebfa49437fac6..fe5200e40449e 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-12-02 +date: 2024-12-05 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 dfeeb1cccb369..ac5c387a931f1 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-12-02 +date: 2024-12-05 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 48604e4e4ade4..63309102a77df 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-12-02 +date: 2024-12-05 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 173b2ab5bbaf0..1bdaadadee3ed 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-12-02 +date: 2024-12-05 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 add4a6395ba20..71b3830f68f21 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-12-02 +date: 2024-12-05 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 44d02df92be31..e99c9c96e2108 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-12-02 +date: 2024-12-05 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 75330684e8cdc..7a2f0e25bc075 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-12-02 +date: 2024-12-05 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 5646761024a66..668daa2023afb 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-12-02 +date: 2024-12-05 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 5356b9310413b..66222fd332344 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-12-02 +date: 2024-12-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index 488fd696cf436..36b81ccc0ae54 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-12-02 +date: 2024-12-05 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 55e7fec7a3d39..4f2e5a0883b52 100644 --- a/config/serverless.oblt.yml +++ b/config/serverless.oblt.yml @@ -157,11 +157,20 @@ xpack.fleet.internal.registry.excludePackages: [ 'cloud_defend', 'security_detection_engine', - # Removed in 8.11 integrations + # Deprecated security integrations + 'bluecoat', 'cisco', + 'cyberark', + 'cylance', + 'f5', + 'fortinet_forticlient', + 'juniper_junos', + 'juniper_netscreen', 'microsoft', + 'netscout', + 'radware', 'symantec', - 'cyberark', + 'tomcat', # ML integrations 'dga', diff --git a/config/serverless.security.yml b/config/serverless.security.yml index d7c1a13822ccf..d92075fbb3fdc 100644 --- a/config/serverless.security.yml +++ b/config/serverless.security.yml @@ -84,11 +84,20 @@ xpack.fleet.internal.registry.excludePackages: [ 'synthetics', 'synthetics_dashboards', - # Removed in 8.11 integrations + # Deprecated security integrations + 'bluecoat', 'cisco', + 'cyberark', + 'cylance', + 'f5', + 'fortinet_forticlient', + 'juniper_junos', + 'juniper_netscreen', 'microsoft', + 'netscout', + 'radware', 'symantec', - 'cyberark', + 'tomcat', # ML integrations 'dga', diff --git a/config/serverless.yml b/config/serverless.yml index d62f26a4642eb..6c7125d0e47f0 100644 --- a/config/serverless.yml +++ b/config/serverless.yml @@ -215,7 +215,6 @@ xpack.task_manager.metrics_reset_interval: 120000 # Reporting feature xpack.screenshotting.enabled: false xpack.reporting.queue.pollInterval: 3m -xpack.reporting.roles.enabled: false xpack.reporting.statefulSettings.enabled: false xpack.reporting.csv.maxConcurrentShardRequests: 0 diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index 8e8ee80ff81be..00841c869ef4f 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -470,6 +470,10 @@ The plugin exposes the static DefaultEditorController class to consume. |WARNING: Missing README. +|{kib-repo}blob/{branch}/x-pack/plugins/asset_inventory/README.md[assetInventory] +|Centralized asset inventory experience within the Elastic Security solution. A central place for users to view and manage all their assets from different environments. + + |{kib-repo}blob/{branch}/x-pack/plugins/banners/README.md[banners] |Allow to add a header banner that will be displayed on every page of the Kibana application diff --git a/docs/management/advanced-options.asciidoc b/docs/management/advanced-options.asciidoc index f6b8e6844ce04..fde70b5ffca0e 100644 --- a/docs/management/advanced-options.asciidoc +++ b/docs/management/advanced-options.asciidoc @@ -208,10 +208,6 @@ The default refresh interval for the time filter. Example: [[timepicker-timedefaults]]`timepicker:timeDefaults`:: The default selection in the time filter. -[[truncate-maxheight]]`truncate:maxHeight`:: -deprecated:[8.16.0]The maximum height that a cell occupies in a table. Set to 0 to disable -truncation. - [[enableESQL]]`enableESQL`:: This setting enables ES|QL in Kibana. @@ -340,14 +336,6 @@ Hides the "Time" column in *Discover* and in all saved searches on dashboards. Highlights results in *Discover* and saved searches on dashboards. Highlighting slows requests when working on big documents. -[[doctable-legacy]]`doc_table:legacy`:: -deprecated:[8.15.0] Controls the way the document table looks and works. -To use the new *Document Explorer* instead of the classic view, turn off this option. -The *Document Explorer* offers better data sorting, resizable columns, and a full screen view. - -[[truncate-max-height]]`truncate:maxHeight`:: -The maximum height that a cell in a table can occupy. To disable truncation, set to 0. - [float] [[kibana-ml-settings]] diff --git a/docs/settings/alert-action-settings.asciidoc b/docs/settings/alert-action-settings.asciidoc index 0f4987822dc32..6bd7eb1e76345 100644 --- a/docs/settings/alert-action-settings.asciidoc +++ b/docs/settings/alert-action-settings.asciidoc @@ -577,12 +577,6 @@ For a <>, <> - `xpack.alerting.cancelAlertsOnRuleTimeout` {ess-icon}:: Specifies whether to skip writing alerts and scheduling actions if rule processing was cancelled due to a timeout. Default: `true`. This setting can be diff --git a/docs/settings/reporting-settings.asciidoc b/docs/settings/reporting-settings.asciidoc index b43f3b268e438..5dda6bf81954f 100644 --- a/docs/settings/reporting-settings.asciidoc +++ b/docs/settings/reporting-settings.asciidoc @@ -61,29 +61,8 @@ xpack.reporting.encryptionKey: "something_secret" [[reporting-advanced-settings]] === Security settings -Reporting has two forms of access control: each user can only access their own reports, -and custom roles determine who has the privilege to generate reports. When Reporting is configured with -<>, you can control the spaces and applications where users -are allowed to generate reports. - -[NOTE] -============================================================================ -The `xpack.reporting.roles` settings are for a deprecated system of access control in Reporting. Turning off -this feature allows API keys to generate reports, and allows reporting access through {kib} application -privileges. We recommend that you explicitly turn off reporting's deprecated access control feature by adding -`xpack.reporting.roles.enabled: false` to kibana.yml. This will enable you to create custom roles that provide -application privileges for reporting, as described in <>. -============================================================================ - -[[xpack-reporting-roles-enabled]] `xpack.reporting.roles.enabled`:: -deprecated:[7.14.0,The default for this setting will be `false` in an upcoming version of {kib}.] Sets access -control to a set of assigned reporting roles, specified by `xpack.reporting.roles.allow`. Defaults to `true`. - -`xpack.reporting.roles.allow`:: -deprecated:[7.14.0] In addition to superusers, specifies the roles that can generate reports using the -{ref}/security-api.html#security-role-apis[{es} role management APIs]. Requires `xpack.reporting.roles.enabled` -to be `true`. Defaults to `[ "reporting_user" ]`. +Reporting privileges are configured with <>. You can control +the spaces and applications where users are allowed to generate reports. [float] [[reporting-job-queue-settings]] diff --git a/docs/settings/task-manager-settings.asciidoc b/docs/settings/task-manager-settings.asciidoc index 1311974e27342..7200500a2bf06 100644 --- a/docs/settings/task-manager-settings.asciidoc +++ b/docs/settings/task-manager-settings.asciidoc @@ -17,7 +17,7 @@ Task Manager runs background tasks by polling for work on an interval. You can The maximum number of times a task will be attempted before being abandoned as failed. Defaults to 3. `xpack.task_manager.poll_interval`:: -How often, in milliseconds, the task manager will look for more work. Defaults to 3000 and cannot be lower than 100. +How often, in milliseconds, the task manager will look for more work. Defaults to 500 and cannot be lower than 100. `xpack.task_manager.request_capacity`:: How many requests can Task Manager buffer before it rejects new requests. Defaults to 1000. diff --git a/docs/setup/configuring-reporting.asciidoc b/docs/setup/configuring-reporting.asciidoc index 61ef028d1504f..bcef6a0266251 100644 --- a/docs/setup/configuring-reporting.asciidoc +++ b/docs/setup/configuring-reporting.asciidoc @@ -37,15 +37,6 @@ to enable the {kib} server to have screenshotting capabilities. === Grant users access to reporting When security is enabled, you grant users access to {report-features} with <>, which allow you to create custom roles that control the spaces and applications where users generate reports. -. Enable application privileges in Reporting. To enable, turn off the default user access control features in `kibana.yml`: -+ -[source,yaml] ------------------------------------- -xpack.reporting.roles.enabled: false ------------------------------------- -+ -NOTE: If you use the default settings, you can still create a custom role that grants reporting privileges. The default role is `reporting_user`. This behavior is being deprecated and does not allow application-level access controls for {report-features}, and does not allow API keys or authentication tokens to authorize report generation. Refer to <> for information and caveats about the deprecated access control features. - . Create the reporting role. .. Go to the *Roles* management page using the navigation menu or the @@ -79,7 +70,7 @@ NOTE: If you have a Basic license, sub-feature privileges are unavailable. For d [role="screenshot"] image::user/reporting/images/kibana-privileges-with-reporting.png["Kibana privileges with Reporting options, Gold or higher license"] + -NOTE: If the *Reporting* options for application features are unavailable, and the cluster license is higher than Basic, contact your administrator, or <>. +NOTE: If the *Reporting* options for application features are unavailable, and the cluster license is higher than Basic, contact your administrator. .. Click *Add {kib} privilege*. @@ -101,7 +92,7 @@ Granting the privilege to generate reports also grants the user the privilege to [float] [[reporting-roles-user-api]] ==== Grant access with the role API -With <> enabled in Reporting, you can also use the {api-kibana}/group/endpoint-roles[role APIs] to grant access to the {report-features}, using *All* privileges, or sub-feature privileges. +With <>, you can use the {api-kibana}/group/endpoint-roles[role APIs] to grant access to the {report-features}, using *All* privileges, or sub-feature privileges. NOTE: This API request needs to be run against the <>. diff --git a/docs/upgrade-notes.asciidoc b/docs/upgrade-notes.asciidoc index 236d768b16d4e..effe1308408cc 100644 --- a/docs/upgrade-notes.asciidoc +++ b/docs/upgrade-notes.asciidoc @@ -23,8 +23,8 @@ ADD INSTRUCTIONS FOR USERS LOOKING TO UPGRADE. HOW CAN THEY WORK AROUND THIS? 1. Copy and edit the template in the right section of this file. Most recent entries should be at the top of the section, search for sections using the text "[float]". 2. Edit the anchor ID [[REPO-PR]] of the template with proper values. 3. Don't hardcode the link to the new entry. Instead, make it available through the doc link service files: - - https://github.com/elastic/kibana/blob/main/packages/kbn-doc-links/src/get_doc_links.ts - - https://github.com/elastic/kibana/blob/main/packages/kbn-doc-links/src/types.ts + - https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts + - https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-doc-links/src/types.ts The entry in the main links file should look like this: diff --git a/docs/user/alerting/create-and-manage-rules.asciidoc b/docs/user/alerting/create-and-manage-rules.asciidoc index 1caae10ead421..28c31c6844d42 100644 --- a/docs/user/alerting/create-and-manage-rules.asciidoc +++ b/docs/user/alerting/create-and-manage-rules.asciidoc @@ -8,17 +8,21 @@ The *{stack-manage-app}* > *{rules-ui}* UI provides a cross-app view of alerting. Different {kib} apps like {observability-guide}/create-alerts.html[*{observability}*], {security-guide}/prebuilt-rules.html[*Security*], <> and -<> can offer their own rules. *{rules-ui}* provides a +<> can offer their own rules. + +You can find **Rules** in *Stack Management* > *Alerts and insights* > *Rules* in {kib} or by using +the <>. + +[role="screenshot"] +image:images/stack-management-rules.png[Rules page navigation] + +*{rules-ui}* provides a central place to: * <> rules * <> including enabling/disabling, muting/unmuting, and deleting * Drill down to <> -* Configure settings that apply to all rules in the space - -[role="screenshot"] -image:images/rules-ui.png[Example rule listing in {rules-ui}] -// NOTE: This is an autogenerated screenshot. Do not edit it directly. +* Configure rule settings For more information on alerting concepts and the types of rules and connectors available, go to <>. diff --git a/docs/user/images/stack-management-rules.png b/docs/user/images/stack-management-rules.png new file mode 100644 index 0000000000000..2cab8200ee6d8 Binary files /dev/null and b/docs/user/images/stack-management-rules.png differ diff --git a/oas_docs/bundle.json b/oas_docs/bundle.json index b96aaa3a3ce00..210ecb6fa266f 100644 --- a/oas_docs/bundle.json +++ b/oas_docs/bundle.json @@ -5644,6 +5644,3244 @@ ] } }, + "/api/dashboards/dashboard": { + "get": { + "description": "This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.", + "operationId": "get-dashboards-dashboard", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "The page number to return. Default is \"1\".", + "in": "query", + "name": "page", + "required": false, + "schema": { + "default": 1, + "minimum": 1, + "type": "number" + } + }, + { + "description": "The number of dashboards to display on each page (max 1000). Default is \"20\".", + "in": "query", + "name": "perPage", + "required": false, + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "items": { + "items": { + "additionalProperties": true, + "properties": { + "attributes": { + "additionalProperties": false, + "properties": { + "description": { + "default": "", + "description": "A short description.", + "type": "string" + }, + "timeRestore": { + "default": false, + "description": "Whether to restore time upon viewing this dashboard", + "type": "boolean" + }, + "title": { + "description": "A human-readable title for the dashboard", + "type": "string" + } + }, + "required": [ + "title" + ], + "type": "object" + }, + "createdAt": { + "type": "string" + }, + "createdBy": { + "type": "string" + }, + "error": { + "additionalProperties": false, + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "metadata": { + "additionalProperties": true, + "properties": {}, + "type": "object" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "error", + "message", + "statusCode" + ], + "type": "object" + }, + "id": { + "type": "string" + }, + "managed": { + "type": "boolean" + }, + "namespaces": { + "items": { + "type": "string" + }, + "type": "array" + }, + "originId": { + "type": "string" + }, + "references": { + "items": { + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "id" + ], + "type": "object" + }, + "type": "array" + }, + "type": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "updatedBy": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "id", + "type", + "attributes", + "references" + ], + "type": "object" + }, + "type": "array" + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ], + "type": "object" + } + } + } + } + }, + "summary": "Get a list of dashboards", + "tags": [ + "Dashboards" + ], + "x-state": "Technical Preview" + } + }, + "/api/dashboards/dashboard/{id}": { + "delete": { + "description": "This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.", + "operationId": "delete-dashboards-dashboard-id", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "description": "A unique identifier for the dashboard.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": {}, + "summary": "Delete a dashboard", + "tags": [ + "Dashboards" + ], + "x-state": "Technical Preview" + }, + "get": { + "description": "This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.", + "operationId": "get-dashboards-dashboard-id", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "A unique identifier for the dashboard.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "item": { + "additionalProperties": true, + "properties": { + "attributes": { + "additionalProperties": false, + "properties": { + "controlGroupInput": { + "additionalProperties": false, + "properties": { + "autoApplySelections": { + "default": true, + "description": "Show apply selections button in controls.", + "type": "boolean" + }, + "chainingSystem": { + "default": "HIERARCHICAL", + "description": "The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".", + "enum": [ + "NONE", + "HIERARCHICAL" + ], + "type": "string" + }, + "controls": { + "default": [], + "description": "An array of control panels and their state in the control group.", + "items": { + "additionalProperties": true, + "properties": { + "controlConfig": { + "additionalProperties": {}, + "type": "object" + }, + "grow": { + "default": false, + "description": "Expand width of the control panel to fit available space.", + "type": "boolean" + }, + "id": { + "description": "The unique ID of the control.", + "type": "string" + }, + "order": { + "description": "The order of the control panel in the control group.", + "type": "number" + }, + "type": { + "description": "The type of the control panel.", + "type": "string" + }, + "width": { + "default": "medium", + "description": "Minimum width of the control panel in the control group.", + "enum": [ + "small", + "medium", + "large" + ], + "type": "string" + } + }, + "required": [ + "type", + "order" + ], + "type": "object" + }, + "type": "array" + }, + "enhancements": { + "additionalProperties": {}, + "type": "object" + }, + "ignoreParentSettings": { + "additionalProperties": false, + "properties": { + "ignoreFilters": { + "default": false, + "description": "Ignore global filters in controls.", + "type": "boolean" + }, + "ignoreQuery": { + "default": false, + "description": "Ignore the global query bar in controls.", + "type": "boolean" + }, + "ignoreTimerange": { + "default": false, + "description": "Ignore the global time range in controls.", + "type": "boolean" + }, + "ignoreValidations": { + "default": false, + "description": "Ignore validations in controls.", + "type": "boolean" + } + }, + "type": "object" + }, + "labelPosition": { + "default": "oneLine", + "description": "Position of the labels for controls. For example, \"oneLine\", \"twoLine\".", + "enum": [ + "oneLine", + "twoLine" + ], + "type": "string" + } + }, + "required": [ + "ignoreParentSettings" + ], + "type": "object" + }, + "description": { + "default": "", + "description": "A short description.", + "type": "string" + }, + "kibanaSavedObjectMeta": { + "additionalProperties": false, + "default": {}, + "description": "A container for various metadata", + "properties": { + "searchSource": { + "additionalProperties": true, + "properties": { + "filter": { + "items": { + "additionalProperties": false, + "description": "A filter for the search source.", + "properties": { + "$state": { + "additionalProperties": false, + "properties": { + "store": { + "description": "Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').", + "enum": [ + "appState", + "globalState" + ], + "type": "string" + } + }, + "required": [ + "store" + ], + "type": "object" + }, + "meta": { + "additionalProperties": true, + "properties": { + "alias": { + "nullable": true, + "type": "string" + }, + "controlledBy": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "field": { + "type": "string" + }, + "group": { + "type": "string" + }, + "index": { + "type": "string" + }, + "isMultiIndex": { + "type": "boolean" + }, + "key": { + "type": "string" + }, + "negate": { + "type": "boolean" + }, + "params": {}, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "params" + ], + "type": "object" + }, + "query": { + "additionalProperties": {}, + "type": "object" + } + }, + "required": [ + "meta" + ], + "type": "object" + }, + "type": "array" + }, + "query": { + "additionalProperties": false, + "properties": { + "language": { + "description": "The query language such as KQL or Lucene.", + "type": "string" + }, + "query": { + "anyOf": [ + { + "description": "A text-based query such as Kibana Query Language (KQL) or Lucene query language.", + "type": "string" + }, + { + "additionalProperties": {}, + "type": "object" + } + ] + } + }, + "required": [ + "query", + "language" + ], + "type": "object" + }, + "sort": { + "items": { + "additionalProperties": { + "anyOf": [ + { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + { + "additionalProperties": false, + "properties": { + "format": { + "type": "string" + }, + "order": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "required": [ + "order" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "numeric_type": { + "enum": [ + "double", + "long", + "date", + "date_nanos" + ], + "type": "string" + }, + "order": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "required": [ + "order" + ], + "type": "object" + } + ] + }, + "type": "object" + }, + "type": "array" + }, + "type": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "options": { + "additionalProperties": false, + "properties": { + "hidePanelTitles": { + "default": false, + "description": "Hide the panel titles in the dashboard.", + "type": "boolean" + }, + "syncColors": { + "default": true, + "description": "Synchronize colors between related panels in the dashboard.", + "type": "boolean" + }, + "syncCursor": { + "default": true, + "description": "Synchronize cursor position between related panels in the dashboard.", + "type": "boolean" + }, + "syncTooltips": { + "default": true, + "description": "Synchronize tooltips between related panels in the dashboard.", + "type": "boolean" + }, + "useMargins": { + "default": true, + "description": "Show margins between panels in the dashboard layout.", + "type": "boolean" + } + }, + "type": "object" + }, + "panels": { + "default": [], + "items": { + "additionalProperties": false, + "properties": { + "gridData": { + "additionalProperties": false, + "properties": { + "h": { + "default": 15, + "description": "The height of the panel in grid units", + "minimum": 1, + "type": "number" + }, + "i": { + "type": "string" + }, + "w": { + "default": 24, + "description": "The width of the panel in grid units", + "maximum": 48, + "minimum": 1, + "type": "number" + }, + "x": { + "description": "The x coordinate of the panel in grid units", + "type": "number" + }, + "y": { + "description": "The y coordinate of the panel in grid units", + "type": "number" + } + }, + "required": [ + "x", + "y", + "i" + ], + "type": "object" + }, + "id": { + "description": "The saved object id for by reference panels", + "type": "string" + }, + "panelConfig": { + "additionalProperties": true, + "properties": { + "description": { + "description": "The description of the panel", + "type": "string" + }, + "enhancements": { + "additionalProperties": {}, + "type": "object" + }, + "hidePanelTitles": { + "description": "Set to true to hide the panel title in its container.", + "type": "boolean" + }, + "savedObjectId": { + "description": "The unique id of the library item to construct the embeddable.", + "type": "string" + }, + "title": { + "description": "The title of the panel", + "type": "string" + }, + "version": { + "description": "The version of the embeddable in the panel.", + "type": "string" + } + }, + "type": "object" + }, + "panelIndex": { + "type": "string" + }, + "panelRefName": { + "type": "string" + }, + "title": { + "description": "The title of the panel", + "type": "string" + }, + "type": { + "description": "The embeddable type", + "type": "string" + }, + "version": { + "deprecated": true, + "description": "The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).", + "type": "string" + } + }, + "required": [ + "panelConfig", + "type", + "gridData", + "panelIndex" + ], + "type": "object" + }, + "type": "array" + }, + "refreshInterval": { + "additionalProperties": false, + "description": "A container for various refresh interval settings", + "properties": { + "display": { + "deprecated": true, + "description": "A human-readable string indicating the refresh frequency. No longer used.", + "type": "string" + }, + "pause": { + "description": "Whether the refresh interval is set to be paused while viewing the dashboard.", + "type": "boolean" + }, + "section": { + "deprecated": true, + "description": "No longer used.", + "type": "number" + }, + "value": { + "description": "A numeric value indicating refresh frequency in milliseconds.", + "type": "number" + } + }, + "required": [ + "pause", + "value" + ], + "type": "object" + }, + "timeFrom": { + "description": "An ISO string indicating when to restore time from", + "type": "string" + }, + "timeRestore": { + "default": false, + "description": "Whether to restore time upon viewing this dashboard", + "type": "boolean" + }, + "timeTo": { + "description": "An ISO string indicating when to restore time from", + "type": "string" + }, + "title": { + "description": "A human-readable title for the dashboard", + "type": "string" + }, + "version": { + "deprecated": true, + "type": "number" + } + }, + "required": [ + "title", + "options" + ], + "type": "object" + }, + "createdAt": { + "type": "string" + }, + "createdBy": { + "type": "string" + }, + "error": { + "additionalProperties": false, + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "metadata": { + "additionalProperties": true, + "properties": {}, + "type": "object" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "error", + "message", + "statusCode" + ], + "type": "object" + }, + "id": { + "type": "string" + }, + "managed": { + "type": "boolean" + }, + "namespaces": { + "items": { + "type": "string" + }, + "type": "array" + }, + "originId": { + "type": "string" + }, + "references": { + "items": { + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "id" + ], + "type": "object" + }, + "type": "array" + }, + "type": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "updatedBy": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "id", + "type", + "attributes", + "references" + ], + "type": "object" + }, + "meta": { + "additionalProperties": false, + "properties": { + "aliasPurpose": { + "enum": [ + "savedObjectConversion", + "savedObjectImport" + ], + "type": "string" + }, + "aliasTargetId": { + "type": "string" + }, + "outcome": { + "enum": [ + "exactMatch", + "aliasMatch", + "conflict" + ], + "type": "string" + } + }, + "required": [ + "outcome" + ], + "type": "object" + } + }, + "required": [ + "item", + "meta" + ], + "type": "object" + } + } + } + } + }, + "summary": "Get a dashboard", + "tags": [ + "Dashboards" + ], + "x-state": "Technical Preview" + }, + "post": { + "description": "This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.", + "operationId": "post-dashboards-dashboard-id", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "description": "A unique identifier for the dashboard.", + "in": "path", + "name": "id", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "attributes": { + "additionalProperties": false, + "properties": { + "controlGroupInput": { + "additionalProperties": false, + "properties": { + "autoApplySelections": { + "default": true, + "description": "Show apply selections button in controls.", + "type": "boolean" + }, + "chainingSystem": { + "default": "HIERARCHICAL", + "description": "The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".", + "enum": [ + "NONE", + "HIERARCHICAL" + ], + "type": "string" + }, + "controls": { + "default": [], + "description": "An array of control panels and their state in the control group.", + "items": { + "additionalProperties": true, + "properties": { + "controlConfig": { + "additionalProperties": {}, + "type": "object" + }, + "grow": { + "default": false, + "description": "Expand width of the control panel to fit available space.", + "type": "boolean" + }, + "id": { + "description": "The unique ID of the control.", + "type": "string" + }, + "order": { + "description": "The order of the control panel in the control group.", + "type": "number" + }, + "type": { + "description": "The type of the control panel.", + "type": "string" + }, + "width": { + "default": "medium", + "description": "Minimum width of the control panel in the control group.", + "enum": [ + "small", + "medium", + "large" + ], + "type": "string" + } + }, + "required": [ + "type", + "order" + ], + "type": "object" + }, + "type": "array" + }, + "enhancements": { + "additionalProperties": {}, + "type": "object" + }, + "ignoreParentSettings": { + "additionalProperties": false, + "properties": { + "ignoreFilters": { + "default": false, + "description": "Ignore global filters in controls.", + "type": "boolean" + }, + "ignoreQuery": { + "default": false, + "description": "Ignore the global query bar in controls.", + "type": "boolean" + }, + "ignoreTimerange": { + "default": false, + "description": "Ignore the global time range in controls.", + "type": "boolean" + }, + "ignoreValidations": { + "default": false, + "description": "Ignore validations in controls.", + "type": "boolean" + } + }, + "type": "object" + }, + "labelPosition": { + "default": "oneLine", + "description": "Position of the labels for controls. For example, \"oneLine\", \"twoLine\".", + "enum": [ + "oneLine", + "twoLine" + ], + "type": "string" + } + }, + "required": [ + "ignoreParentSettings" + ], + "type": "object" + }, + "description": { + "default": "", + "description": "A short description.", + "type": "string" + }, + "kibanaSavedObjectMeta": { + "additionalProperties": false, + "default": {}, + "description": "A container for various metadata", + "properties": { + "searchSource": { + "additionalProperties": true, + "properties": { + "filter": { + "items": { + "additionalProperties": false, + "description": "A filter for the search source.", + "properties": { + "$state": { + "additionalProperties": false, + "properties": { + "store": { + "description": "Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').", + "enum": [ + "appState", + "globalState" + ], + "type": "string" + } + }, + "required": [ + "store" + ], + "type": "object" + }, + "meta": { + "additionalProperties": true, + "properties": { + "alias": { + "nullable": true, + "type": "string" + }, + "controlledBy": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "field": { + "type": "string" + }, + "group": { + "type": "string" + }, + "index": { + "type": "string" + }, + "isMultiIndex": { + "type": "boolean" + }, + "key": { + "type": "string" + }, + "negate": { + "type": "boolean" + }, + "params": {}, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "params" + ], + "type": "object" + }, + "query": { + "additionalProperties": {}, + "type": "object" + } + }, + "required": [ + "meta" + ], + "type": "object" + }, + "type": "array" + }, + "query": { + "additionalProperties": false, + "properties": { + "language": { + "description": "The query language such as KQL or Lucene.", + "type": "string" + }, + "query": { + "anyOf": [ + { + "description": "A text-based query such as Kibana Query Language (KQL) or Lucene query language.", + "type": "string" + }, + { + "additionalProperties": {}, + "type": "object" + } + ] + } + }, + "required": [ + "query", + "language" + ], + "type": "object" + }, + "sort": { + "items": { + "additionalProperties": { + "anyOf": [ + { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + { + "additionalProperties": false, + "properties": { + "format": { + "type": "string" + }, + "order": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "required": [ + "order" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "numeric_type": { + "enum": [ + "double", + "long", + "date", + "date_nanos" + ], + "type": "string" + }, + "order": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "required": [ + "order" + ], + "type": "object" + } + ] + }, + "type": "object" + }, + "type": "array" + }, + "type": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "options": { + "additionalProperties": false, + "properties": { + "hidePanelTitles": { + "default": false, + "description": "Hide the panel titles in the dashboard.", + "type": "boolean" + }, + "syncColors": { + "default": true, + "description": "Synchronize colors between related panels in the dashboard.", + "type": "boolean" + }, + "syncCursor": { + "default": true, + "description": "Synchronize cursor position between related panels in the dashboard.", + "type": "boolean" + }, + "syncTooltips": { + "default": true, + "description": "Synchronize tooltips between related panels in the dashboard.", + "type": "boolean" + }, + "useMargins": { + "default": true, + "description": "Show margins between panels in the dashboard layout.", + "type": "boolean" + } + }, + "type": "object" + }, + "panels": { + "default": [], + "items": { + "additionalProperties": false, + "properties": { + "gridData": { + "additionalProperties": false, + "properties": { + "h": { + "default": 15, + "description": "The height of the panel in grid units", + "minimum": 1, + "type": "number" + }, + "i": { + "description": "The unique identifier of the panel", + "type": "string" + }, + "w": { + "default": 24, + "description": "The width of the panel in grid units", + "maximum": 48, + "minimum": 1, + "type": "number" + }, + "x": { + "description": "The x coordinate of the panel in grid units", + "type": "number" + }, + "y": { + "description": "The y coordinate of the panel in grid units", + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "type": "object" + }, + "id": { + "description": "The saved object id for by reference panels", + "type": "string" + }, + "panelConfig": { + "additionalProperties": true, + "properties": { + "description": { + "description": "The description of the panel", + "type": "string" + }, + "enhancements": { + "additionalProperties": {}, + "type": "object" + }, + "hidePanelTitles": { + "description": "Set to true to hide the panel title in its container.", + "type": "boolean" + }, + "savedObjectId": { + "description": "The unique id of the library item to construct the embeddable.", + "type": "string" + }, + "title": { + "description": "The title of the panel", + "type": "string" + }, + "version": { + "description": "The version of the embeddable in the panel.", + "type": "string" + } + }, + "type": "object" + }, + "panelIndex": { + "description": "The unique ID of the panel.", + "type": "string" + }, + "panelRefName": { + "type": "string" + }, + "title": { + "description": "The title of the panel", + "type": "string" + }, + "type": { + "description": "The embeddable type", + "type": "string" + }, + "version": { + "deprecated": true, + "description": "The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).", + "type": "string" + } + }, + "required": [ + "panelConfig", + "type", + "gridData" + ], + "type": "object" + }, + "type": "array" + }, + "refreshInterval": { + "additionalProperties": false, + "description": "A container for various refresh interval settings", + "properties": { + "display": { + "deprecated": true, + "description": "A human-readable string indicating the refresh frequency. No longer used.", + "type": "string" + }, + "pause": { + "description": "Whether the refresh interval is set to be paused while viewing the dashboard.", + "type": "boolean" + }, + "section": { + "deprecated": true, + "description": "No longer used.", + "type": "number" + }, + "value": { + "description": "A numeric value indicating refresh frequency in milliseconds.", + "type": "number" + } + }, + "required": [ + "pause", + "value" + ], + "type": "object" + }, + "timeFrom": { + "description": "An ISO string indicating when to restore time from", + "type": "string" + }, + "timeRestore": { + "default": false, + "description": "Whether to restore time upon viewing this dashboard", + "type": "boolean" + }, + "timeTo": { + "description": "An ISO string indicating when to restore time from", + "type": "string" + }, + "title": { + "description": "A human-readable title for the dashboard", + "type": "string" + }, + "version": { + "deprecated": true, + "type": "number" + } + }, + "required": [ + "title", + "options" + ], + "type": "object" + }, + "references": { + "items": { + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "id" + ], + "type": "object" + }, + "type": "array" + }, + "spaces": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "attributes" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "item": { + "additionalProperties": true, + "properties": { + "attributes": { + "additionalProperties": false, + "properties": { + "controlGroupInput": { + "additionalProperties": false, + "properties": { + "autoApplySelections": { + "default": true, + "description": "Show apply selections button in controls.", + "type": "boolean" + }, + "chainingSystem": { + "default": "HIERARCHICAL", + "description": "The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".", + "enum": [ + "NONE", + "HIERARCHICAL" + ], + "type": "string" + }, + "controls": { + "default": [], + "description": "An array of control panels and their state in the control group.", + "items": { + "additionalProperties": true, + "properties": { + "controlConfig": { + "additionalProperties": {}, + "type": "object" + }, + "grow": { + "default": false, + "description": "Expand width of the control panel to fit available space.", + "type": "boolean" + }, + "id": { + "description": "The unique ID of the control.", + "type": "string" + }, + "order": { + "description": "The order of the control panel in the control group.", + "type": "number" + }, + "type": { + "description": "The type of the control panel.", + "type": "string" + }, + "width": { + "default": "medium", + "description": "Minimum width of the control panel in the control group.", + "enum": [ + "small", + "medium", + "large" + ], + "type": "string" + } + }, + "required": [ + "type", + "order" + ], + "type": "object" + }, + "type": "array" + }, + "enhancements": { + "additionalProperties": {}, + "type": "object" + }, + "ignoreParentSettings": { + "additionalProperties": false, + "properties": { + "ignoreFilters": { + "default": false, + "description": "Ignore global filters in controls.", + "type": "boolean" + }, + "ignoreQuery": { + "default": false, + "description": "Ignore the global query bar in controls.", + "type": "boolean" + }, + "ignoreTimerange": { + "default": false, + "description": "Ignore the global time range in controls.", + "type": "boolean" + }, + "ignoreValidations": { + "default": false, + "description": "Ignore validations in controls.", + "type": "boolean" + } + }, + "type": "object" + }, + "labelPosition": { + "default": "oneLine", + "description": "Position of the labels for controls. For example, \"oneLine\", \"twoLine\".", + "enum": [ + "oneLine", + "twoLine" + ], + "type": "string" + } + }, + "required": [ + "ignoreParentSettings" + ], + "type": "object" + }, + "description": { + "default": "", + "description": "A short description.", + "type": "string" + }, + "kibanaSavedObjectMeta": { + "additionalProperties": false, + "default": {}, + "description": "A container for various metadata", + "properties": { + "searchSource": { + "additionalProperties": true, + "properties": { + "filter": { + "items": { + "additionalProperties": false, + "description": "A filter for the search source.", + "properties": { + "$state": { + "additionalProperties": false, + "properties": { + "store": { + "description": "Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').", + "enum": [ + "appState", + "globalState" + ], + "type": "string" + } + }, + "required": [ + "store" + ], + "type": "object" + }, + "meta": { + "additionalProperties": true, + "properties": { + "alias": { + "nullable": true, + "type": "string" + }, + "controlledBy": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "field": { + "type": "string" + }, + "group": { + "type": "string" + }, + "index": { + "type": "string" + }, + "isMultiIndex": { + "type": "boolean" + }, + "key": { + "type": "string" + }, + "negate": { + "type": "boolean" + }, + "params": {}, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "params" + ], + "type": "object" + }, + "query": { + "additionalProperties": {}, + "type": "object" + } + }, + "required": [ + "meta" + ], + "type": "object" + }, + "type": "array" + }, + "query": { + "additionalProperties": false, + "properties": { + "language": { + "description": "The query language such as KQL or Lucene.", + "type": "string" + }, + "query": { + "anyOf": [ + { + "description": "A text-based query such as Kibana Query Language (KQL) or Lucene query language.", + "type": "string" + }, + { + "additionalProperties": {}, + "type": "object" + } + ] + } + }, + "required": [ + "query", + "language" + ], + "type": "object" + }, + "sort": { + "items": { + "additionalProperties": { + "anyOf": [ + { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + { + "additionalProperties": false, + "properties": { + "format": { + "type": "string" + }, + "order": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "required": [ + "order" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "numeric_type": { + "enum": [ + "double", + "long", + "date", + "date_nanos" + ], + "type": "string" + }, + "order": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "required": [ + "order" + ], + "type": "object" + } + ] + }, + "type": "object" + }, + "type": "array" + }, + "type": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "options": { + "additionalProperties": false, + "properties": { + "hidePanelTitles": { + "default": false, + "description": "Hide the panel titles in the dashboard.", + "type": "boolean" + }, + "syncColors": { + "default": true, + "description": "Synchronize colors between related panels in the dashboard.", + "type": "boolean" + }, + "syncCursor": { + "default": true, + "description": "Synchronize cursor position between related panels in the dashboard.", + "type": "boolean" + }, + "syncTooltips": { + "default": true, + "description": "Synchronize tooltips between related panels in the dashboard.", + "type": "boolean" + }, + "useMargins": { + "default": true, + "description": "Show margins between panels in the dashboard layout.", + "type": "boolean" + } + }, + "type": "object" + }, + "panels": { + "default": [], + "items": { + "additionalProperties": false, + "properties": { + "gridData": { + "additionalProperties": false, + "properties": { + "h": { + "default": 15, + "description": "The height of the panel in grid units", + "minimum": 1, + "type": "number" + }, + "i": { + "type": "string" + }, + "w": { + "default": 24, + "description": "The width of the panel in grid units", + "maximum": 48, + "minimum": 1, + "type": "number" + }, + "x": { + "description": "The x coordinate of the panel in grid units", + "type": "number" + }, + "y": { + "description": "The y coordinate of the panel in grid units", + "type": "number" + } + }, + "required": [ + "x", + "y", + "i" + ], + "type": "object" + }, + "id": { + "description": "The saved object id for by reference panels", + "type": "string" + }, + "panelConfig": { + "additionalProperties": true, + "properties": { + "description": { + "description": "The description of the panel", + "type": "string" + }, + "enhancements": { + "additionalProperties": {}, + "type": "object" + }, + "hidePanelTitles": { + "description": "Set to true to hide the panel title in its container.", + "type": "boolean" + }, + "savedObjectId": { + "description": "The unique id of the library item to construct the embeddable.", + "type": "string" + }, + "title": { + "description": "The title of the panel", + "type": "string" + }, + "version": { + "description": "The version of the embeddable in the panel.", + "type": "string" + } + }, + "type": "object" + }, + "panelIndex": { + "type": "string" + }, + "panelRefName": { + "type": "string" + }, + "title": { + "description": "The title of the panel", + "type": "string" + }, + "type": { + "description": "The embeddable type", + "type": "string" + }, + "version": { + "deprecated": true, + "description": "The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).", + "type": "string" + } + }, + "required": [ + "panelConfig", + "type", + "gridData", + "panelIndex" + ], + "type": "object" + }, + "type": "array" + }, + "refreshInterval": { + "additionalProperties": false, + "description": "A container for various refresh interval settings", + "properties": { + "display": { + "deprecated": true, + "description": "A human-readable string indicating the refresh frequency. No longer used.", + "type": "string" + }, + "pause": { + "description": "Whether the refresh interval is set to be paused while viewing the dashboard.", + "type": "boolean" + }, + "section": { + "deprecated": true, + "description": "No longer used.", + "type": "number" + }, + "value": { + "description": "A numeric value indicating refresh frequency in milliseconds.", + "type": "number" + } + }, + "required": [ + "pause", + "value" + ], + "type": "object" + }, + "timeFrom": { + "description": "An ISO string indicating when to restore time from", + "type": "string" + }, + "timeRestore": { + "default": false, + "description": "Whether to restore time upon viewing this dashboard", + "type": "boolean" + }, + "timeTo": { + "description": "An ISO string indicating when to restore time from", + "type": "string" + }, + "title": { + "description": "A human-readable title for the dashboard", + "type": "string" + }, + "version": { + "deprecated": true, + "type": "number" + } + }, + "required": [ + "title", + "options" + ], + "type": "object" + }, + "createdAt": { + "type": "string" + }, + "createdBy": { + "type": "string" + }, + "error": { + "additionalProperties": false, + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "metadata": { + "additionalProperties": true, + "properties": {}, + "type": "object" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "error", + "message", + "statusCode" + ], + "type": "object" + }, + "id": { + "type": "string" + }, + "managed": { + "type": "boolean" + }, + "namespaces": { + "items": { + "type": "string" + }, + "type": "array" + }, + "originId": { + "type": "string" + }, + "references": { + "items": { + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "id" + ], + "type": "object" + }, + "type": "array" + }, + "type": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "updatedBy": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "id", + "type", + "attributes", + "references" + ], + "type": "object" + } + }, + "required": [ + "item" + ], + "type": "object" + } + } + } + } + }, + "summary": "Create a dashboard", + "tags": [ + "Dashboards" + ], + "x-state": "Technical Preview" + }, + "put": { + "description": "This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.", + "operationId": "put-dashboards-dashboard-id", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "description": "A unique identifier for the dashboard.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "attributes": { + "additionalProperties": false, + "properties": { + "controlGroupInput": { + "additionalProperties": false, + "properties": { + "autoApplySelections": { + "default": true, + "description": "Show apply selections button in controls.", + "type": "boolean" + }, + "chainingSystem": { + "default": "HIERARCHICAL", + "description": "The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".", + "enum": [ + "NONE", + "HIERARCHICAL" + ], + "type": "string" + }, + "controls": { + "default": [], + "description": "An array of control panels and their state in the control group.", + "items": { + "additionalProperties": true, + "properties": { + "controlConfig": { + "additionalProperties": {}, + "type": "object" + }, + "grow": { + "default": false, + "description": "Expand width of the control panel to fit available space.", + "type": "boolean" + }, + "id": { + "description": "The unique ID of the control.", + "type": "string" + }, + "order": { + "description": "The order of the control panel in the control group.", + "type": "number" + }, + "type": { + "description": "The type of the control panel.", + "type": "string" + }, + "width": { + "default": "medium", + "description": "Minimum width of the control panel in the control group.", + "enum": [ + "small", + "medium", + "large" + ], + "type": "string" + } + }, + "required": [ + "type", + "order" + ], + "type": "object" + }, + "type": "array" + }, + "enhancements": { + "additionalProperties": {}, + "type": "object" + }, + "ignoreParentSettings": { + "additionalProperties": false, + "properties": { + "ignoreFilters": { + "default": false, + "description": "Ignore global filters in controls.", + "type": "boolean" + }, + "ignoreQuery": { + "default": false, + "description": "Ignore the global query bar in controls.", + "type": "boolean" + }, + "ignoreTimerange": { + "default": false, + "description": "Ignore the global time range in controls.", + "type": "boolean" + }, + "ignoreValidations": { + "default": false, + "description": "Ignore validations in controls.", + "type": "boolean" + } + }, + "type": "object" + }, + "labelPosition": { + "default": "oneLine", + "description": "Position of the labels for controls. For example, \"oneLine\", \"twoLine\".", + "enum": [ + "oneLine", + "twoLine" + ], + "type": "string" + } + }, + "required": [ + "ignoreParentSettings" + ], + "type": "object" + }, + "description": { + "default": "", + "description": "A short description.", + "type": "string" + }, + "kibanaSavedObjectMeta": { + "additionalProperties": false, + "default": {}, + "description": "A container for various metadata", + "properties": { + "searchSource": { + "additionalProperties": true, + "properties": { + "filter": { + "items": { + "additionalProperties": false, + "description": "A filter for the search source.", + "properties": { + "$state": { + "additionalProperties": false, + "properties": { + "store": { + "description": "Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').", + "enum": [ + "appState", + "globalState" + ], + "type": "string" + } + }, + "required": [ + "store" + ], + "type": "object" + }, + "meta": { + "additionalProperties": true, + "properties": { + "alias": { + "nullable": true, + "type": "string" + }, + "controlledBy": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "field": { + "type": "string" + }, + "group": { + "type": "string" + }, + "index": { + "type": "string" + }, + "isMultiIndex": { + "type": "boolean" + }, + "key": { + "type": "string" + }, + "negate": { + "type": "boolean" + }, + "params": {}, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "params" + ], + "type": "object" + }, + "query": { + "additionalProperties": {}, + "type": "object" + } + }, + "required": [ + "meta" + ], + "type": "object" + }, + "type": "array" + }, + "query": { + "additionalProperties": false, + "properties": { + "language": { + "description": "The query language such as KQL or Lucene.", + "type": "string" + }, + "query": { + "anyOf": [ + { + "description": "A text-based query such as Kibana Query Language (KQL) or Lucene query language.", + "type": "string" + }, + { + "additionalProperties": {}, + "type": "object" + } + ] + } + }, + "required": [ + "query", + "language" + ], + "type": "object" + }, + "sort": { + "items": { + "additionalProperties": { + "anyOf": [ + { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + { + "additionalProperties": false, + "properties": { + "format": { + "type": "string" + }, + "order": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "required": [ + "order" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "numeric_type": { + "enum": [ + "double", + "long", + "date", + "date_nanos" + ], + "type": "string" + }, + "order": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "required": [ + "order" + ], + "type": "object" + } + ] + }, + "type": "object" + }, + "type": "array" + }, + "type": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "options": { + "additionalProperties": false, + "properties": { + "hidePanelTitles": { + "default": false, + "description": "Hide the panel titles in the dashboard.", + "type": "boolean" + }, + "syncColors": { + "default": true, + "description": "Synchronize colors between related panels in the dashboard.", + "type": "boolean" + }, + "syncCursor": { + "default": true, + "description": "Synchronize cursor position between related panels in the dashboard.", + "type": "boolean" + }, + "syncTooltips": { + "default": true, + "description": "Synchronize tooltips between related panels in the dashboard.", + "type": "boolean" + }, + "useMargins": { + "default": true, + "description": "Show margins between panels in the dashboard layout.", + "type": "boolean" + } + }, + "type": "object" + }, + "panels": { + "default": [], + "items": { + "additionalProperties": false, + "properties": { + "gridData": { + "additionalProperties": false, + "properties": { + "h": { + "default": 15, + "description": "The height of the panel in grid units", + "minimum": 1, + "type": "number" + }, + "i": { + "description": "The unique identifier of the panel", + "type": "string" + }, + "w": { + "default": 24, + "description": "The width of the panel in grid units", + "maximum": 48, + "minimum": 1, + "type": "number" + }, + "x": { + "description": "The x coordinate of the panel in grid units", + "type": "number" + }, + "y": { + "description": "The y coordinate of the panel in grid units", + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "type": "object" + }, + "id": { + "description": "The saved object id for by reference panels", + "type": "string" + }, + "panelConfig": { + "additionalProperties": true, + "properties": { + "description": { + "description": "The description of the panel", + "type": "string" + }, + "enhancements": { + "additionalProperties": {}, + "type": "object" + }, + "hidePanelTitles": { + "description": "Set to true to hide the panel title in its container.", + "type": "boolean" + }, + "savedObjectId": { + "description": "The unique id of the library item to construct the embeddable.", + "type": "string" + }, + "title": { + "description": "The title of the panel", + "type": "string" + }, + "version": { + "description": "The version of the embeddable in the panel.", + "type": "string" + } + }, + "type": "object" + }, + "panelIndex": { + "description": "The unique ID of the panel.", + "type": "string" + }, + "panelRefName": { + "type": "string" + }, + "title": { + "description": "The title of the panel", + "type": "string" + }, + "type": { + "description": "The embeddable type", + "type": "string" + }, + "version": { + "deprecated": true, + "description": "The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).", + "type": "string" + } + }, + "required": [ + "panelConfig", + "type", + "gridData" + ], + "type": "object" + }, + "type": "array" + }, + "refreshInterval": { + "additionalProperties": false, + "description": "A container for various refresh interval settings", + "properties": { + "display": { + "deprecated": true, + "description": "A human-readable string indicating the refresh frequency. No longer used.", + "type": "string" + }, + "pause": { + "description": "Whether the refresh interval is set to be paused while viewing the dashboard.", + "type": "boolean" + }, + "section": { + "deprecated": true, + "description": "No longer used.", + "type": "number" + }, + "value": { + "description": "A numeric value indicating refresh frequency in milliseconds.", + "type": "number" + } + }, + "required": [ + "pause", + "value" + ], + "type": "object" + }, + "timeFrom": { + "description": "An ISO string indicating when to restore time from", + "type": "string" + }, + "timeRestore": { + "default": false, + "description": "Whether to restore time upon viewing this dashboard", + "type": "boolean" + }, + "timeTo": { + "description": "An ISO string indicating when to restore time from", + "type": "string" + }, + "title": { + "description": "A human-readable title for the dashboard", + "type": "string" + }, + "version": { + "deprecated": true, + "type": "number" + } + }, + "required": [ + "title", + "options" + ], + "type": "object" + }, + "references": { + "items": { + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "id" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "attributes" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "item": { + "additionalProperties": true, + "properties": { + "attributes": { + "additionalProperties": false, + "properties": { + "controlGroupInput": { + "additionalProperties": false, + "properties": { + "autoApplySelections": { + "default": true, + "description": "Show apply selections button in controls.", + "type": "boolean" + }, + "chainingSystem": { + "default": "HIERARCHICAL", + "description": "The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".", + "enum": [ + "NONE", + "HIERARCHICAL" + ], + "type": "string" + }, + "controls": { + "default": [], + "description": "An array of control panels and their state in the control group.", + "items": { + "additionalProperties": true, + "properties": { + "controlConfig": { + "additionalProperties": {}, + "type": "object" + }, + "grow": { + "default": false, + "description": "Expand width of the control panel to fit available space.", + "type": "boolean" + }, + "id": { + "description": "The unique ID of the control.", + "type": "string" + }, + "order": { + "description": "The order of the control panel in the control group.", + "type": "number" + }, + "type": { + "description": "The type of the control panel.", + "type": "string" + }, + "width": { + "default": "medium", + "description": "Minimum width of the control panel in the control group.", + "enum": [ + "small", + "medium", + "large" + ], + "type": "string" + } + }, + "required": [ + "type", + "order" + ], + "type": "object" + }, + "type": "array" + }, + "enhancements": { + "additionalProperties": {}, + "type": "object" + }, + "ignoreParentSettings": { + "additionalProperties": false, + "properties": { + "ignoreFilters": { + "default": false, + "description": "Ignore global filters in controls.", + "type": "boolean" + }, + "ignoreQuery": { + "default": false, + "description": "Ignore the global query bar in controls.", + "type": "boolean" + }, + "ignoreTimerange": { + "default": false, + "description": "Ignore the global time range in controls.", + "type": "boolean" + }, + "ignoreValidations": { + "default": false, + "description": "Ignore validations in controls.", + "type": "boolean" + } + }, + "type": "object" + }, + "labelPosition": { + "default": "oneLine", + "description": "Position of the labels for controls. For example, \"oneLine\", \"twoLine\".", + "enum": [ + "oneLine", + "twoLine" + ], + "type": "string" + } + }, + "required": [ + "ignoreParentSettings" + ], + "type": "object" + }, + "description": { + "default": "", + "description": "A short description.", + "type": "string" + }, + "kibanaSavedObjectMeta": { + "additionalProperties": false, + "default": {}, + "description": "A container for various metadata", + "properties": { + "searchSource": { + "additionalProperties": true, + "properties": { + "filter": { + "items": { + "additionalProperties": false, + "description": "A filter for the search source.", + "properties": { + "$state": { + "additionalProperties": false, + "properties": { + "store": { + "description": "Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').", + "enum": [ + "appState", + "globalState" + ], + "type": "string" + } + }, + "required": [ + "store" + ], + "type": "object" + }, + "meta": { + "additionalProperties": true, + "properties": { + "alias": { + "nullable": true, + "type": "string" + }, + "controlledBy": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "field": { + "type": "string" + }, + "group": { + "type": "string" + }, + "index": { + "type": "string" + }, + "isMultiIndex": { + "type": "boolean" + }, + "key": { + "type": "string" + }, + "negate": { + "type": "boolean" + }, + "params": {}, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "params" + ], + "type": "object" + }, + "query": { + "additionalProperties": {}, + "type": "object" + } + }, + "required": [ + "meta" + ], + "type": "object" + }, + "type": "array" + }, + "query": { + "additionalProperties": false, + "properties": { + "language": { + "description": "The query language such as KQL or Lucene.", + "type": "string" + }, + "query": { + "anyOf": [ + { + "description": "A text-based query such as Kibana Query Language (KQL) or Lucene query language.", + "type": "string" + }, + { + "additionalProperties": {}, + "type": "object" + } + ] + } + }, + "required": [ + "query", + "language" + ], + "type": "object" + }, + "sort": { + "items": { + "additionalProperties": { + "anyOf": [ + { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + { + "additionalProperties": false, + "properties": { + "format": { + "type": "string" + }, + "order": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "required": [ + "order" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "numeric_type": { + "enum": [ + "double", + "long", + "date", + "date_nanos" + ], + "type": "string" + }, + "order": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "required": [ + "order" + ], + "type": "object" + } + ] + }, + "type": "object" + }, + "type": "array" + }, + "type": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "options": { + "additionalProperties": false, + "properties": { + "hidePanelTitles": { + "default": false, + "description": "Hide the panel titles in the dashboard.", + "type": "boolean" + }, + "syncColors": { + "default": true, + "description": "Synchronize colors between related panels in the dashboard.", + "type": "boolean" + }, + "syncCursor": { + "default": true, + "description": "Synchronize cursor position between related panels in the dashboard.", + "type": "boolean" + }, + "syncTooltips": { + "default": true, + "description": "Synchronize tooltips between related panels in the dashboard.", + "type": "boolean" + }, + "useMargins": { + "default": true, + "description": "Show margins between panels in the dashboard layout.", + "type": "boolean" + } + }, + "type": "object" + }, + "panels": { + "default": [], + "items": { + "additionalProperties": false, + "properties": { + "gridData": { + "additionalProperties": false, + "properties": { + "h": { + "default": 15, + "description": "The height of the panel in grid units", + "minimum": 1, + "type": "number" + }, + "i": { + "type": "string" + }, + "w": { + "default": 24, + "description": "The width of the panel in grid units", + "maximum": 48, + "minimum": 1, + "type": "number" + }, + "x": { + "description": "The x coordinate of the panel in grid units", + "type": "number" + }, + "y": { + "description": "The y coordinate of the panel in grid units", + "type": "number" + } + }, + "required": [ + "x", + "y", + "i" + ], + "type": "object" + }, + "id": { + "description": "The saved object id for by reference panels", + "type": "string" + }, + "panelConfig": { + "additionalProperties": true, + "properties": { + "description": { + "description": "The description of the panel", + "type": "string" + }, + "enhancements": { + "additionalProperties": {}, + "type": "object" + }, + "hidePanelTitles": { + "description": "Set to true to hide the panel title in its container.", + "type": "boolean" + }, + "savedObjectId": { + "description": "The unique id of the library item to construct the embeddable.", + "type": "string" + }, + "title": { + "description": "The title of the panel", + "type": "string" + }, + "version": { + "description": "The version of the embeddable in the panel.", + "type": "string" + } + }, + "type": "object" + }, + "panelIndex": { + "type": "string" + }, + "panelRefName": { + "type": "string" + }, + "title": { + "description": "The title of the panel", + "type": "string" + }, + "type": { + "description": "The embeddable type", + "type": "string" + }, + "version": { + "deprecated": true, + "description": "The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).", + "type": "string" + } + }, + "required": [ + "panelConfig", + "type", + "gridData", + "panelIndex" + ], + "type": "object" + }, + "type": "array" + }, + "refreshInterval": { + "additionalProperties": false, + "description": "A container for various refresh interval settings", + "properties": { + "display": { + "deprecated": true, + "description": "A human-readable string indicating the refresh frequency. No longer used.", + "type": "string" + }, + "pause": { + "description": "Whether the refresh interval is set to be paused while viewing the dashboard.", + "type": "boolean" + }, + "section": { + "deprecated": true, + "description": "No longer used.", + "type": "number" + }, + "value": { + "description": "A numeric value indicating refresh frequency in milliseconds.", + "type": "number" + } + }, + "required": [ + "pause", + "value" + ], + "type": "object" + }, + "timeFrom": { + "description": "An ISO string indicating when to restore time from", + "type": "string" + }, + "timeRestore": { + "default": false, + "description": "Whether to restore time upon viewing this dashboard", + "type": "boolean" + }, + "timeTo": { + "description": "An ISO string indicating when to restore time from", + "type": "string" + }, + "title": { + "description": "A human-readable title for the dashboard", + "type": "string" + }, + "version": { + "deprecated": true, + "type": "number" + } + }, + "required": [ + "title", + "options" + ], + "type": "object" + }, + "createdAt": { + "type": "string" + }, + "createdBy": { + "type": "string" + }, + "error": { + "additionalProperties": false, + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "metadata": { + "additionalProperties": true, + "properties": {}, + "type": "object" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "error", + "message", + "statusCode" + ], + "type": "object" + }, + "id": { + "type": "string" + }, + "managed": { + "type": "boolean" + }, + "namespaces": { + "items": { + "type": "string" + }, + "type": "array" + }, + "originId": { + "type": "string" + }, + "references": { + "items": { + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "id" + ], + "type": "object" + }, + "type": "array" + }, + "type": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "updatedBy": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "id", + "type", + "attributes", + "references" + ], + "type": "object" + } + }, + "required": [ + "item" + ], + "type": "object" + } + } + } + } + }, + "summary": "Update an existing dashboard", + "tags": [ + "Dashboards" + ], + "x-state": "Technical Preview" + } + }, "/api/fleet/agent_download_sources": { "get": { "operationId": "get-fleet-agent-download-sources", @@ -6547,9 +9785,6 @@ "type": "number" } }, - "required": [ - "enabled" - ], "type": "object" }, "monitoring_output_id": { @@ -7316,9 +10551,6 @@ "type": "number" } }, - "required": [ - "enabled" - ], "type": "object" }, "monitoring_output_id": { @@ -7577,9 +10809,6 @@ "type": "number" } }, - "required": [ - "enabled" - ], "type": "object" }, "monitoring_output_id": { @@ -8376,9 +11605,6 @@ "type": "number" } }, - "required": [ - "enabled" - ], "type": "object" }, "monitoring_output_id": { @@ -9436,9 +12662,6 @@ "type": "number" } }, - "required": [ - "enabled" - ], "type": "object" }, "monitoring_output_id": { @@ -10204,9 +13427,6 @@ "type": "number" } }, - "required": [ - "enabled" - ], "type": "object" }, "monitoring_output_id": { @@ -10465,9 +13685,6 @@ "type": "number" } }, - "required": [ - "enabled" - ], "type": "object" }, "monitoring_output_id": { @@ -11265,9 +14482,6 @@ "type": "number" } }, - "required": [ - "enabled" - ], "type": "object" }, "monitoring_output_id": { @@ -13278,6 +16492,7 @@ }, "upgrade_details": { "additionalProperties": false, + "nullable": true, "properties": { "action_id": { "type": "string" @@ -15470,494 +18685,496 @@ }, "upgrade_details": { "additionalProperties": false, - "properties": { - "action_id": { - "type": "string" - }, - "metadata": { - "additionalProperties": false, - "properties": { - "download_percent": { - "type": "number" - }, - "download_rate": { - "type": "number" - }, - "error_msg": { - "type": "string" - }, - "failed_state": { - "enum": [ - "UPG_REQUESTED", - "UPG_SCHEDULED", - "UPG_DOWNLOADING", - "UPG_EXTRACTING", - "UPG_REPLACING", - "UPG_RESTARTING", - "UPG_FAILED", - "UPG_WATCHING", - "UPG_ROLLBACK" - ], - "type": "string" - }, - "retry_error_msg": { - "type": "string" - }, - "retry_until": { - "type": "string" - }, - "scheduled_at": { - "type": "string" - } - }, - "type": "object" - }, - "state": { - "enum": [ - "UPG_REQUESTED", - "UPG_SCHEDULED", - "UPG_DOWNLOADING", - "UPG_EXTRACTING", - "UPG_REPLACING", - "UPG_RESTARTING", - "UPG_FAILED", - "UPG_WATCHING", - "UPG_ROLLBACK" - ], - "type": "string" - }, - "target_version": { - "type": "string" - } - }, - "required": [ - "target_version", - "action_id", - "state" - ], - "type": "object" - }, - "upgrade_started_at": { - "nullable": true, - "type": "string" - }, - "upgraded_at": { "nullable": true, - "type": "string" - }, - "user_provided_metadata": { - "additionalProperties": {}, - "type": "object" - } - }, - "required": [ - "id", - "packages", - "type", - "active", - "enrolled_at", - "local_metadata" - ], - "type": "object" - } - }, - "required": [ - "item" - ], - "type": "object" - } - } - } - }, - "400": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "description": "Generic Error", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } - } - }, - "summary": "Get an agent", - "tags": [ - "Elastic Agents" - ] - }, - "put": { - "description": "Update an agent by ID.", - "operationId": "put-fleet-agents-agentid", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "path", - "name": "agentId", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "user_provided_metadata": { - "additionalProperties": {}, - "type": "object" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "item": { - "additionalProperties": false, - "properties": { - "access_api_key": { - "type": "string" - }, - "access_api_key_id": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "agent": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "version" - ], - "type": "object" - }, - "components": { - "items": { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "status": { - "enum": [ - "STARTING", - "CONFIGURING", - "HEALTHY", - "DEGRADED", - "FAILED", - "STOPPING", - "STOPPED" - ], - "type": "string" - }, - "type": { - "type": "string" - }, - "units": { - "items": { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "payload": { - "additionalProperties": {}, - "type": "object" - }, - "status": { - "enum": [ - "STARTING", - "CONFIGURING", - "HEALTHY", - "DEGRADED", - "FAILED", - "STOPPING", - "STOPPED" - ], - "type": "string" - }, - "type": { - "enum": [ - "input", - "output" - ], - "type": "string" - } - }, - "required": [ - "id", - "type", - "status", - "message" - ], - "type": "object" - }, - "type": "array" - } - }, - "required": [ - "id", - "type", - "status", - "message" - ], - "type": "object" - }, - "type": "array" - }, - "default_api_key": { - "type": "string" - }, - "default_api_key_history": { - "items": { - "additionalProperties": false, - "deprecated": true, - "properties": { - "id": { - "type": "string" - }, - "retired_at": { - "type": "string" - } - }, - "required": [ - "id", - "retired_at" - ], - "type": "object" - }, - "type": "array" - }, - "default_api_key_id": { - "type": "string" - }, - "enrolled_at": { - "type": "string" - }, - "id": { - "type": "string" - }, - "last_checkin": { - "type": "string" - }, - "last_checkin_message": { - "type": "string" - }, - "last_checkin_status": { - "enum": [ - "error", - "online", - "degraded", - "updating", - "starting" - ], - "type": "string" - }, - "local_metadata": { - "additionalProperties": {}, - "type": "object" - }, - "metrics": { - "additionalProperties": false, - "properties": { - "cpu_avg": { - "type": "number" - }, - "memory_size_byte_avg": { - "type": "number" - } - }, - "type": "object" - }, - "namespaces": { - "items": { - "type": "string" - }, - "type": "array" - }, - "outputs": { - "additionalProperties": { - "additionalProperties": false, - "properties": { - "api_key_id": { - "type": "string" - }, - "to_retire_api_key_ids": { - "items": { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "retired_at": { - "type": "string" - } - }, - "required": [ - "id", - "retired_at" - ], - "type": "object" - }, - "type": "array" - }, - "type": { - "type": "string" - } - }, - "required": [ - "api_key_id", - "type" - ], - "type": "object" - }, - "type": "object" - }, - "packages": { - "items": { - "type": "string" - }, - "type": "array" - }, - "policy_id": { - "type": "string" - }, - "policy_revision": { - "nullable": true, - "type": "number" - }, - "sort": { - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - }, - { - "enum": [], - "nullable": true - } - ] - }, - "type": "array" - }, - "status": { - "enum": [ - "offline", - "error", - "online", - "inactive", - "enrolling", - "unenrolling", - "unenrolled", - "updating", - "degraded" - ], - "type": "string" - }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "type": { - "enum": [ - "PERMANENT", - "EPHEMERAL", - "TEMPORARY" - ], - "type": "string" - }, - "unenrolled_at": { - "type": "string" - }, - "unenrollment_started_at": { - "type": "string" - }, - "unhealthy_reason": { - "items": { - "enum": [ - "input", - "output", - "other" - ], - "type": "string" - }, - "nullable": true, - "type": "array" - }, - "upgrade_details": { - "additionalProperties": false, + "properties": { + "action_id": { + "type": "string" + }, + "metadata": { + "additionalProperties": false, + "properties": { + "download_percent": { + "type": "number" + }, + "download_rate": { + "type": "number" + }, + "error_msg": { + "type": "string" + }, + "failed_state": { + "enum": [ + "UPG_REQUESTED", + "UPG_SCHEDULED", + "UPG_DOWNLOADING", + "UPG_EXTRACTING", + "UPG_REPLACING", + "UPG_RESTARTING", + "UPG_FAILED", + "UPG_WATCHING", + "UPG_ROLLBACK" + ], + "type": "string" + }, + "retry_error_msg": { + "type": "string" + }, + "retry_until": { + "type": "string" + }, + "scheduled_at": { + "type": "string" + } + }, + "type": "object" + }, + "state": { + "enum": [ + "UPG_REQUESTED", + "UPG_SCHEDULED", + "UPG_DOWNLOADING", + "UPG_EXTRACTING", + "UPG_REPLACING", + "UPG_RESTARTING", + "UPG_FAILED", + "UPG_WATCHING", + "UPG_ROLLBACK" + ], + "type": "string" + }, + "target_version": { + "type": "string" + } + }, + "required": [ + "target_version", + "action_id", + "state" + ], + "type": "object" + }, + "upgrade_started_at": { + "nullable": true, + "type": "string" + }, + "upgraded_at": { + "nullable": true, + "type": "string" + }, + "user_provided_metadata": { + "additionalProperties": {}, + "type": "object" + } + }, + "required": [ + "id", + "packages", + "type", + "active", + "enrolled_at", + "local_metadata" + ], + "type": "object" + } + }, + "required": [ + "item" + ], + "type": "object" + } + } + } + }, + "400": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "description": "Generic Error", + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } + } + }, + "summary": "Get an agent", + "tags": [ + "Elastic Agents" + ] + }, + "put": { + "description": "Update an agent by ID.", + "operationId": "put-fleet-agents-agentid", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "in": "path", + "name": "agentId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "user_provided_metadata": { + "additionalProperties": {}, + "type": "object" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "item": { + "additionalProperties": false, + "properties": { + "access_api_key": { + "type": "string" + }, + "access_api_key_id": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "agent": { + "additionalProperties": true, + "properties": { + "id": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "id", + "version" + ], + "type": "object" + }, + "components": { + "items": { + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "enum": [ + "STARTING", + "CONFIGURING", + "HEALTHY", + "DEGRADED", + "FAILED", + "STOPPING", + "STOPPED" + ], + "type": "string" + }, + "type": { + "type": "string" + }, + "units": { + "items": { + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "payload": { + "additionalProperties": {}, + "type": "object" + }, + "status": { + "enum": [ + "STARTING", + "CONFIGURING", + "HEALTHY", + "DEGRADED", + "FAILED", + "STOPPING", + "STOPPED" + ], + "type": "string" + }, + "type": { + "enum": [ + "input", + "output" + ], + "type": "string" + } + }, + "required": [ + "id", + "type", + "status", + "message" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "id", + "type", + "status", + "message" + ], + "type": "object" + }, + "type": "array" + }, + "default_api_key": { + "type": "string" + }, + "default_api_key_history": { + "items": { + "additionalProperties": false, + "deprecated": true, + "properties": { + "id": { + "type": "string" + }, + "retired_at": { + "type": "string" + } + }, + "required": [ + "id", + "retired_at" + ], + "type": "object" + }, + "type": "array" + }, + "default_api_key_id": { + "type": "string" + }, + "enrolled_at": { + "type": "string" + }, + "id": { + "type": "string" + }, + "last_checkin": { + "type": "string" + }, + "last_checkin_message": { + "type": "string" + }, + "last_checkin_status": { + "enum": [ + "error", + "online", + "degraded", + "updating", + "starting" + ], + "type": "string" + }, + "local_metadata": { + "additionalProperties": {}, + "type": "object" + }, + "metrics": { + "additionalProperties": false, + "properties": { + "cpu_avg": { + "type": "number" + }, + "memory_size_byte_avg": { + "type": "number" + } + }, + "type": "object" + }, + "namespaces": { + "items": { + "type": "string" + }, + "type": "array" + }, + "outputs": { + "additionalProperties": { + "additionalProperties": false, + "properties": { + "api_key_id": { + "type": "string" + }, + "to_retire_api_key_ids": { + "items": { + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "retired_at": { + "type": "string" + } + }, + "required": [ + "id", + "retired_at" + ], + "type": "object" + }, + "type": "array" + }, + "type": { + "type": "string" + } + }, + "required": [ + "api_key_id", + "type" + ], + "type": "object" + }, + "type": "object" + }, + "packages": { + "items": { + "type": "string" + }, + "type": "array" + }, + "policy_id": { + "type": "string" + }, + "policy_revision": { + "nullable": true, + "type": "number" + }, + "sort": { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "enum": [], + "nullable": true + } + ] + }, + "type": "array" + }, + "status": { + "enum": [ + "offline", + "error", + "online", + "inactive", + "enrolling", + "unenrolling", + "unenrolled", + "updating", + "degraded" + ], + "type": "string" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "type": { + "enum": [ + "PERMANENT", + "EPHEMERAL", + "TEMPORARY" + ], + "type": "string" + }, + "unenrolled_at": { + "type": "string" + }, + "unenrollment_started_at": { + "type": "string" + }, + "unhealthy_reason": { + "items": { + "enum": [ + "input", + "output", + "other" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "upgrade_details": { + "additionalProperties": false, + "nullable": true, "properties": { "action_id": { "type": "string" @@ -39075,6 +42292,9 @@ { "name": "connectors" }, + { + "name": "Dashboards" + }, { "name": "Data streams" }, diff --git a/oas_docs/bundle.serverless.json b/oas_docs/bundle.serverless.json index 9115670ecb313..ff2a4b17661b9 100644 --- a/oas_docs/bundle.serverless.json +++ b/oas_docs/bundle.serverless.json @@ -5644,6 +5644,3244 @@ ] } }, + "/api/dashboards/dashboard": { + "get": { + "description": "This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.", + "operationId": "get-dashboards-dashboard", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "The page number to return. Default is \"1\".", + "in": "query", + "name": "page", + "required": false, + "schema": { + "default": 1, + "minimum": 1, + "type": "number" + } + }, + { + "description": "The number of dashboards to display on each page (max 1000). Default is \"20\".", + "in": "query", + "name": "perPage", + "required": false, + "schema": { + "maximum": 1000, + "minimum": 1, + "type": "number" + } + } + ], + "responses": { + "200": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "items": { + "items": { + "additionalProperties": true, + "properties": { + "attributes": { + "additionalProperties": false, + "properties": { + "description": { + "default": "", + "description": "A short description.", + "type": "string" + }, + "timeRestore": { + "default": false, + "description": "Whether to restore time upon viewing this dashboard", + "type": "boolean" + }, + "title": { + "description": "A human-readable title for the dashboard", + "type": "string" + } + }, + "required": [ + "title" + ], + "type": "object" + }, + "createdAt": { + "type": "string" + }, + "createdBy": { + "type": "string" + }, + "error": { + "additionalProperties": false, + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "metadata": { + "additionalProperties": true, + "properties": {}, + "type": "object" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "error", + "message", + "statusCode" + ], + "type": "object" + }, + "id": { + "type": "string" + }, + "managed": { + "type": "boolean" + }, + "namespaces": { + "items": { + "type": "string" + }, + "type": "array" + }, + "originId": { + "type": "string" + }, + "references": { + "items": { + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "id" + ], + "type": "object" + }, + "type": "array" + }, + "type": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "updatedBy": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "id", + "type", + "attributes", + "references" + ], + "type": "object" + }, + "type": "array" + }, + "total": { + "type": "number" + } + }, + "required": [ + "items", + "total" + ], + "type": "object" + } + } + } + } + }, + "summary": "Get a list of dashboards", + "tags": [ + "Dashboards" + ], + "x-state": "Technical Preview" + } + }, + "/api/dashboards/dashboard/{id}": { + "delete": { + "description": "This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.", + "operationId": "delete-dashboards-dashboard-id", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "description": "A unique identifier for the dashboard.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": {}, + "summary": "Delete a dashboard", + "tags": [ + "Dashboards" + ], + "x-state": "Technical Preview" + }, + "get": { + "description": "This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.", + "operationId": "get-dashboards-dashboard-id", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "A unique identifier for the dashboard.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "item": { + "additionalProperties": true, + "properties": { + "attributes": { + "additionalProperties": false, + "properties": { + "controlGroupInput": { + "additionalProperties": false, + "properties": { + "autoApplySelections": { + "default": true, + "description": "Show apply selections button in controls.", + "type": "boolean" + }, + "chainingSystem": { + "default": "HIERARCHICAL", + "description": "The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".", + "enum": [ + "NONE", + "HIERARCHICAL" + ], + "type": "string" + }, + "controls": { + "default": [], + "description": "An array of control panels and their state in the control group.", + "items": { + "additionalProperties": true, + "properties": { + "controlConfig": { + "additionalProperties": {}, + "type": "object" + }, + "grow": { + "default": false, + "description": "Expand width of the control panel to fit available space.", + "type": "boolean" + }, + "id": { + "description": "The unique ID of the control.", + "type": "string" + }, + "order": { + "description": "The order of the control panel in the control group.", + "type": "number" + }, + "type": { + "description": "The type of the control panel.", + "type": "string" + }, + "width": { + "default": "medium", + "description": "Minimum width of the control panel in the control group.", + "enum": [ + "small", + "medium", + "large" + ], + "type": "string" + } + }, + "required": [ + "type", + "order" + ], + "type": "object" + }, + "type": "array" + }, + "enhancements": { + "additionalProperties": {}, + "type": "object" + }, + "ignoreParentSettings": { + "additionalProperties": false, + "properties": { + "ignoreFilters": { + "default": false, + "description": "Ignore global filters in controls.", + "type": "boolean" + }, + "ignoreQuery": { + "default": false, + "description": "Ignore the global query bar in controls.", + "type": "boolean" + }, + "ignoreTimerange": { + "default": false, + "description": "Ignore the global time range in controls.", + "type": "boolean" + }, + "ignoreValidations": { + "default": false, + "description": "Ignore validations in controls.", + "type": "boolean" + } + }, + "type": "object" + }, + "labelPosition": { + "default": "oneLine", + "description": "Position of the labels for controls. For example, \"oneLine\", \"twoLine\".", + "enum": [ + "oneLine", + "twoLine" + ], + "type": "string" + } + }, + "required": [ + "ignoreParentSettings" + ], + "type": "object" + }, + "description": { + "default": "", + "description": "A short description.", + "type": "string" + }, + "kibanaSavedObjectMeta": { + "additionalProperties": false, + "default": {}, + "description": "A container for various metadata", + "properties": { + "searchSource": { + "additionalProperties": true, + "properties": { + "filter": { + "items": { + "additionalProperties": false, + "description": "A filter for the search source.", + "properties": { + "$state": { + "additionalProperties": false, + "properties": { + "store": { + "description": "Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').", + "enum": [ + "appState", + "globalState" + ], + "type": "string" + } + }, + "required": [ + "store" + ], + "type": "object" + }, + "meta": { + "additionalProperties": true, + "properties": { + "alias": { + "nullable": true, + "type": "string" + }, + "controlledBy": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "field": { + "type": "string" + }, + "group": { + "type": "string" + }, + "index": { + "type": "string" + }, + "isMultiIndex": { + "type": "boolean" + }, + "key": { + "type": "string" + }, + "negate": { + "type": "boolean" + }, + "params": {}, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "params" + ], + "type": "object" + }, + "query": { + "additionalProperties": {}, + "type": "object" + } + }, + "required": [ + "meta" + ], + "type": "object" + }, + "type": "array" + }, + "query": { + "additionalProperties": false, + "properties": { + "language": { + "description": "The query language such as KQL or Lucene.", + "type": "string" + }, + "query": { + "anyOf": [ + { + "description": "A text-based query such as Kibana Query Language (KQL) or Lucene query language.", + "type": "string" + }, + { + "additionalProperties": {}, + "type": "object" + } + ] + } + }, + "required": [ + "query", + "language" + ], + "type": "object" + }, + "sort": { + "items": { + "additionalProperties": { + "anyOf": [ + { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + { + "additionalProperties": false, + "properties": { + "format": { + "type": "string" + }, + "order": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "required": [ + "order" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "numeric_type": { + "enum": [ + "double", + "long", + "date", + "date_nanos" + ], + "type": "string" + }, + "order": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "required": [ + "order" + ], + "type": "object" + } + ] + }, + "type": "object" + }, + "type": "array" + }, + "type": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "options": { + "additionalProperties": false, + "properties": { + "hidePanelTitles": { + "default": false, + "description": "Hide the panel titles in the dashboard.", + "type": "boolean" + }, + "syncColors": { + "default": true, + "description": "Synchronize colors between related panels in the dashboard.", + "type": "boolean" + }, + "syncCursor": { + "default": true, + "description": "Synchronize cursor position between related panels in the dashboard.", + "type": "boolean" + }, + "syncTooltips": { + "default": true, + "description": "Synchronize tooltips between related panels in the dashboard.", + "type": "boolean" + }, + "useMargins": { + "default": true, + "description": "Show margins between panels in the dashboard layout.", + "type": "boolean" + } + }, + "type": "object" + }, + "panels": { + "default": [], + "items": { + "additionalProperties": false, + "properties": { + "gridData": { + "additionalProperties": false, + "properties": { + "h": { + "default": 15, + "description": "The height of the panel in grid units", + "minimum": 1, + "type": "number" + }, + "i": { + "type": "string" + }, + "w": { + "default": 24, + "description": "The width of the panel in grid units", + "maximum": 48, + "minimum": 1, + "type": "number" + }, + "x": { + "description": "The x coordinate of the panel in grid units", + "type": "number" + }, + "y": { + "description": "The y coordinate of the panel in grid units", + "type": "number" + } + }, + "required": [ + "x", + "y", + "i" + ], + "type": "object" + }, + "id": { + "description": "The saved object id for by reference panels", + "type": "string" + }, + "panelConfig": { + "additionalProperties": true, + "properties": { + "description": { + "description": "The description of the panel", + "type": "string" + }, + "enhancements": { + "additionalProperties": {}, + "type": "object" + }, + "hidePanelTitles": { + "description": "Set to true to hide the panel title in its container.", + "type": "boolean" + }, + "savedObjectId": { + "description": "The unique id of the library item to construct the embeddable.", + "type": "string" + }, + "title": { + "description": "The title of the panel", + "type": "string" + }, + "version": { + "description": "The version of the embeddable in the panel.", + "type": "string" + } + }, + "type": "object" + }, + "panelIndex": { + "type": "string" + }, + "panelRefName": { + "type": "string" + }, + "title": { + "description": "The title of the panel", + "type": "string" + }, + "type": { + "description": "The embeddable type", + "type": "string" + }, + "version": { + "deprecated": true, + "description": "The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).", + "type": "string" + } + }, + "required": [ + "panelConfig", + "type", + "gridData", + "panelIndex" + ], + "type": "object" + }, + "type": "array" + }, + "refreshInterval": { + "additionalProperties": false, + "description": "A container for various refresh interval settings", + "properties": { + "display": { + "deprecated": true, + "description": "A human-readable string indicating the refresh frequency. No longer used.", + "type": "string" + }, + "pause": { + "description": "Whether the refresh interval is set to be paused while viewing the dashboard.", + "type": "boolean" + }, + "section": { + "deprecated": true, + "description": "No longer used.", + "type": "number" + }, + "value": { + "description": "A numeric value indicating refresh frequency in milliseconds.", + "type": "number" + } + }, + "required": [ + "pause", + "value" + ], + "type": "object" + }, + "timeFrom": { + "description": "An ISO string indicating when to restore time from", + "type": "string" + }, + "timeRestore": { + "default": false, + "description": "Whether to restore time upon viewing this dashboard", + "type": "boolean" + }, + "timeTo": { + "description": "An ISO string indicating when to restore time from", + "type": "string" + }, + "title": { + "description": "A human-readable title for the dashboard", + "type": "string" + }, + "version": { + "deprecated": true, + "type": "number" + } + }, + "required": [ + "title", + "options" + ], + "type": "object" + }, + "createdAt": { + "type": "string" + }, + "createdBy": { + "type": "string" + }, + "error": { + "additionalProperties": false, + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "metadata": { + "additionalProperties": true, + "properties": {}, + "type": "object" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "error", + "message", + "statusCode" + ], + "type": "object" + }, + "id": { + "type": "string" + }, + "managed": { + "type": "boolean" + }, + "namespaces": { + "items": { + "type": "string" + }, + "type": "array" + }, + "originId": { + "type": "string" + }, + "references": { + "items": { + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "id" + ], + "type": "object" + }, + "type": "array" + }, + "type": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "updatedBy": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "id", + "type", + "attributes", + "references" + ], + "type": "object" + }, + "meta": { + "additionalProperties": false, + "properties": { + "aliasPurpose": { + "enum": [ + "savedObjectConversion", + "savedObjectImport" + ], + "type": "string" + }, + "aliasTargetId": { + "type": "string" + }, + "outcome": { + "enum": [ + "exactMatch", + "aliasMatch", + "conflict" + ], + "type": "string" + } + }, + "required": [ + "outcome" + ], + "type": "object" + } + }, + "required": [ + "item", + "meta" + ], + "type": "object" + } + } + } + } + }, + "summary": "Get a dashboard", + "tags": [ + "Dashboards" + ], + "x-state": "Technical Preview" + }, + "post": { + "description": "This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.", + "operationId": "post-dashboards-dashboard-id", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "description": "A unique identifier for the dashboard.", + "in": "path", + "name": "id", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "attributes": { + "additionalProperties": false, + "properties": { + "controlGroupInput": { + "additionalProperties": false, + "properties": { + "autoApplySelections": { + "default": true, + "description": "Show apply selections button in controls.", + "type": "boolean" + }, + "chainingSystem": { + "default": "HIERARCHICAL", + "description": "The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".", + "enum": [ + "NONE", + "HIERARCHICAL" + ], + "type": "string" + }, + "controls": { + "default": [], + "description": "An array of control panels and their state in the control group.", + "items": { + "additionalProperties": true, + "properties": { + "controlConfig": { + "additionalProperties": {}, + "type": "object" + }, + "grow": { + "default": false, + "description": "Expand width of the control panel to fit available space.", + "type": "boolean" + }, + "id": { + "description": "The unique ID of the control.", + "type": "string" + }, + "order": { + "description": "The order of the control panel in the control group.", + "type": "number" + }, + "type": { + "description": "The type of the control panel.", + "type": "string" + }, + "width": { + "default": "medium", + "description": "Minimum width of the control panel in the control group.", + "enum": [ + "small", + "medium", + "large" + ], + "type": "string" + } + }, + "required": [ + "type", + "order" + ], + "type": "object" + }, + "type": "array" + }, + "enhancements": { + "additionalProperties": {}, + "type": "object" + }, + "ignoreParentSettings": { + "additionalProperties": false, + "properties": { + "ignoreFilters": { + "default": false, + "description": "Ignore global filters in controls.", + "type": "boolean" + }, + "ignoreQuery": { + "default": false, + "description": "Ignore the global query bar in controls.", + "type": "boolean" + }, + "ignoreTimerange": { + "default": false, + "description": "Ignore the global time range in controls.", + "type": "boolean" + }, + "ignoreValidations": { + "default": false, + "description": "Ignore validations in controls.", + "type": "boolean" + } + }, + "type": "object" + }, + "labelPosition": { + "default": "oneLine", + "description": "Position of the labels for controls. For example, \"oneLine\", \"twoLine\".", + "enum": [ + "oneLine", + "twoLine" + ], + "type": "string" + } + }, + "required": [ + "ignoreParentSettings" + ], + "type": "object" + }, + "description": { + "default": "", + "description": "A short description.", + "type": "string" + }, + "kibanaSavedObjectMeta": { + "additionalProperties": false, + "default": {}, + "description": "A container for various metadata", + "properties": { + "searchSource": { + "additionalProperties": true, + "properties": { + "filter": { + "items": { + "additionalProperties": false, + "description": "A filter for the search source.", + "properties": { + "$state": { + "additionalProperties": false, + "properties": { + "store": { + "description": "Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').", + "enum": [ + "appState", + "globalState" + ], + "type": "string" + } + }, + "required": [ + "store" + ], + "type": "object" + }, + "meta": { + "additionalProperties": true, + "properties": { + "alias": { + "nullable": true, + "type": "string" + }, + "controlledBy": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "field": { + "type": "string" + }, + "group": { + "type": "string" + }, + "index": { + "type": "string" + }, + "isMultiIndex": { + "type": "boolean" + }, + "key": { + "type": "string" + }, + "negate": { + "type": "boolean" + }, + "params": {}, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "params" + ], + "type": "object" + }, + "query": { + "additionalProperties": {}, + "type": "object" + } + }, + "required": [ + "meta" + ], + "type": "object" + }, + "type": "array" + }, + "query": { + "additionalProperties": false, + "properties": { + "language": { + "description": "The query language such as KQL or Lucene.", + "type": "string" + }, + "query": { + "anyOf": [ + { + "description": "A text-based query such as Kibana Query Language (KQL) or Lucene query language.", + "type": "string" + }, + { + "additionalProperties": {}, + "type": "object" + } + ] + } + }, + "required": [ + "query", + "language" + ], + "type": "object" + }, + "sort": { + "items": { + "additionalProperties": { + "anyOf": [ + { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + { + "additionalProperties": false, + "properties": { + "format": { + "type": "string" + }, + "order": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "required": [ + "order" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "numeric_type": { + "enum": [ + "double", + "long", + "date", + "date_nanos" + ], + "type": "string" + }, + "order": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "required": [ + "order" + ], + "type": "object" + } + ] + }, + "type": "object" + }, + "type": "array" + }, + "type": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "options": { + "additionalProperties": false, + "properties": { + "hidePanelTitles": { + "default": false, + "description": "Hide the panel titles in the dashboard.", + "type": "boolean" + }, + "syncColors": { + "default": true, + "description": "Synchronize colors between related panels in the dashboard.", + "type": "boolean" + }, + "syncCursor": { + "default": true, + "description": "Synchronize cursor position between related panels in the dashboard.", + "type": "boolean" + }, + "syncTooltips": { + "default": true, + "description": "Synchronize tooltips between related panels in the dashboard.", + "type": "boolean" + }, + "useMargins": { + "default": true, + "description": "Show margins between panels in the dashboard layout.", + "type": "boolean" + } + }, + "type": "object" + }, + "panels": { + "default": [], + "items": { + "additionalProperties": false, + "properties": { + "gridData": { + "additionalProperties": false, + "properties": { + "h": { + "default": 15, + "description": "The height of the panel in grid units", + "minimum": 1, + "type": "number" + }, + "i": { + "description": "The unique identifier of the panel", + "type": "string" + }, + "w": { + "default": 24, + "description": "The width of the panel in grid units", + "maximum": 48, + "minimum": 1, + "type": "number" + }, + "x": { + "description": "The x coordinate of the panel in grid units", + "type": "number" + }, + "y": { + "description": "The y coordinate of the panel in grid units", + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "type": "object" + }, + "id": { + "description": "The saved object id for by reference panels", + "type": "string" + }, + "panelConfig": { + "additionalProperties": true, + "properties": { + "description": { + "description": "The description of the panel", + "type": "string" + }, + "enhancements": { + "additionalProperties": {}, + "type": "object" + }, + "hidePanelTitles": { + "description": "Set to true to hide the panel title in its container.", + "type": "boolean" + }, + "savedObjectId": { + "description": "The unique id of the library item to construct the embeddable.", + "type": "string" + }, + "title": { + "description": "The title of the panel", + "type": "string" + }, + "version": { + "description": "The version of the embeddable in the panel.", + "type": "string" + } + }, + "type": "object" + }, + "panelIndex": { + "description": "The unique ID of the panel.", + "type": "string" + }, + "panelRefName": { + "type": "string" + }, + "title": { + "description": "The title of the panel", + "type": "string" + }, + "type": { + "description": "The embeddable type", + "type": "string" + }, + "version": { + "deprecated": true, + "description": "The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).", + "type": "string" + } + }, + "required": [ + "panelConfig", + "type", + "gridData" + ], + "type": "object" + }, + "type": "array" + }, + "refreshInterval": { + "additionalProperties": false, + "description": "A container for various refresh interval settings", + "properties": { + "display": { + "deprecated": true, + "description": "A human-readable string indicating the refresh frequency. No longer used.", + "type": "string" + }, + "pause": { + "description": "Whether the refresh interval is set to be paused while viewing the dashboard.", + "type": "boolean" + }, + "section": { + "deprecated": true, + "description": "No longer used.", + "type": "number" + }, + "value": { + "description": "A numeric value indicating refresh frequency in milliseconds.", + "type": "number" + } + }, + "required": [ + "pause", + "value" + ], + "type": "object" + }, + "timeFrom": { + "description": "An ISO string indicating when to restore time from", + "type": "string" + }, + "timeRestore": { + "default": false, + "description": "Whether to restore time upon viewing this dashboard", + "type": "boolean" + }, + "timeTo": { + "description": "An ISO string indicating when to restore time from", + "type": "string" + }, + "title": { + "description": "A human-readable title for the dashboard", + "type": "string" + }, + "version": { + "deprecated": true, + "type": "number" + } + }, + "required": [ + "title", + "options" + ], + "type": "object" + }, + "references": { + "items": { + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "id" + ], + "type": "object" + }, + "type": "array" + }, + "spaces": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "attributes" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "item": { + "additionalProperties": true, + "properties": { + "attributes": { + "additionalProperties": false, + "properties": { + "controlGroupInput": { + "additionalProperties": false, + "properties": { + "autoApplySelections": { + "default": true, + "description": "Show apply selections button in controls.", + "type": "boolean" + }, + "chainingSystem": { + "default": "HIERARCHICAL", + "description": "The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".", + "enum": [ + "NONE", + "HIERARCHICAL" + ], + "type": "string" + }, + "controls": { + "default": [], + "description": "An array of control panels and their state in the control group.", + "items": { + "additionalProperties": true, + "properties": { + "controlConfig": { + "additionalProperties": {}, + "type": "object" + }, + "grow": { + "default": false, + "description": "Expand width of the control panel to fit available space.", + "type": "boolean" + }, + "id": { + "description": "The unique ID of the control.", + "type": "string" + }, + "order": { + "description": "The order of the control panel in the control group.", + "type": "number" + }, + "type": { + "description": "The type of the control panel.", + "type": "string" + }, + "width": { + "default": "medium", + "description": "Minimum width of the control panel in the control group.", + "enum": [ + "small", + "medium", + "large" + ], + "type": "string" + } + }, + "required": [ + "type", + "order" + ], + "type": "object" + }, + "type": "array" + }, + "enhancements": { + "additionalProperties": {}, + "type": "object" + }, + "ignoreParentSettings": { + "additionalProperties": false, + "properties": { + "ignoreFilters": { + "default": false, + "description": "Ignore global filters in controls.", + "type": "boolean" + }, + "ignoreQuery": { + "default": false, + "description": "Ignore the global query bar in controls.", + "type": "boolean" + }, + "ignoreTimerange": { + "default": false, + "description": "Ignore the global time range in controls.", + "type": "boolean" + }, + "ignoreValidations": { + "default": false, + "description": "Ignore validations in controls.", + "type": "boolean" + } + }, + "type": "object" + }, + "labelPosition": { + "default": "oneLine", + "description": "Position of the labels for controls. For example, \"oneLine\", \"twoLine\".", + "enum": [ + "oneLine", + "twoLine" + ], + "type": "string" + } + }, + "required": [ + "ignoreParentSettings" + ], + "type": "object" + }, + "description": { + "default": "", + "description": "A short description.", + "type": "string" + }, + "kibanaSavedObjectMeta": { + "additionalProperties": false, + "default": {}, + "description": "A container for various metadata", + "properties": { + "searchSource": { + "additionalProperties": true, + "properties": { + "filter": { + "items": { + "additionalProperties": false, + "description": "A filter for the search source.", + "properties": { + "$state": { + "additionalProperties": false, + "properties": { + "store": { + "description": "Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').", + "enum": [ + "appState", + "globalState" + ], + "type": "string" + } + }, + "required": [ + "store" + ], + "type": "object" + }, + "meta": { + "additionalProperties": true, + "properties": { + "alias": { + "nullable": true, + "type": "string" + }, + "controlledBy": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "field": { + "type": "string" + }, + "group": { + "type": "string" + }, + "index": { + "type": "string" + }, + "isMultiIndex": { + "type": "boolean" + }, + "key": { + "type": "string" + }, + "negate": { + "type": "boolean" + }, + "params": {}, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "params" + ], + "type": "object" + }, + "query": { + "additionalProperties": {}, + "type": "object" + } + }, + "required": [ + "meta" + ], + "type": "object" + }, + "type": "array" + }, + "query": { + "additionalProperties": false, + "properties": { + "language": { + "description": "The query language such as KQL or Lucene.", + "type": "string" + }, + "query": { + "anyOf": [ + { + "description": "A text-based query such as Kibana Query Language (KQL) or Lucene query language.", + "type": "string" + }, + { + "additionalProperties": {}, + "type": "object" + } + ] + } + }, + "required": [ + "query", + "language" + ], + "type": "object" + }, + "sort": { + "items": { + "additionalProperties": { + "anyOf": [ + { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + { + "additionalProperties": false, + "properties": { + "format": { + "type": "string" + }, + "order": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "required": [ + "order" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "numeric_type": { + "enum": [ + "double", + "long", + "date", + "date_nanos" + ], + "type": "string" + }, + "order": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "required": [ + "order" + ], + "type": "object" + } + ] + }, + "type": "object" + }, + "type": "array" + }, + "type": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "options": { + "additionalProperties": false, + "properties": { + "hidePanelTitles": { + "default": false, + "description": "Hide the panel titles in the dashboard.", + "type": "boolean" + }, + "syncColors": { + "default": true, + "description": "Synchronize colors between related panels in the dashboard.", + "type": "boolean" + }, + "syncCursor": { + "default": true, + "description": "Synchronize cursor position between related panels in the dashboard.", + "type": "boolean" + }, + "syncTooltips": { + "default": true, + "description": "Synchronize tooltips between related panels in the dashboard.", + "type": "boolean" + }, + "useMargins": { + "default": true, + "description": "Show margins between panels in the dashboard layout.", + "type": "boolean" + } + }, + "type": "object" + }, + "panels": { + "default": [], + "items": { + "additionalProperties": false, + "properties": { + "gridData": { + "additionalProperties": false, + "properties": { + "h": { + "default": 15, + "description": "The height of the panel in grid units", + "minimum": 1, + "type": "number" + }, + "i": { + "type": "string" + }, + "w": { + "default": 24, + "description": "The width of the panel in grid units", + "maximum": 48, + "minimum": 1, + "type": "number" + }, + "x": { + "description": "The x coordinate of the panel in grid units", + "type": "number" + }, + "y": { + "description": "The y coordinate of the panel in grid units", + "type": "number" + } + }, + "required": [ + "x", + "y", + "i" + ], + "type": "object" + }, + "id": { + "description": "The saved object id for by reference panels", + "type": "string" + }, + "panelConfig": { + "additionalProperties": true, + "properties": { + "description": { + "description": "The description of the panel", + "type": "string" + }, + "enhancements": { + "additionalProperties": {}, + "type": "object" + }, + "hidePanelTitles": { + "description": "Set to true to hide the panel title in its container.", + "type": "boolean" + }, + "savedObjectId": { + "description": "The unique id of the library item to construct the embeddable.", + "type": "string" + }, + "title": { + "description": "The title of the panel", + "type": "string" + }, + "version": { + "description": "The version of the embeddable in the panel.", + "type": "string" + } + }, + "type": "object" + }, + "panelIndex": { + "type": "string" + }, + "panelRefName": { + "type": "string" + }, + "title": { + "description": "The title of the panel", + "type": "string" + }, + "type": { + "description": "The embeddable type", + "type": "string" + }, + "version": { + "deprecated": true, + "description": "The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).", + "type": "string" + } + }, + "required": [ + "panelConfig", + "type", + "gridData", + "panelIndex" + ], + "type": "object" + }, + "type": "array" + }, + "refreshInterval": { + "additionalProperties": false, + "description": "A container for various refresh interval settings", + "properties": { + "display": { + "deprecated": true, + "description": "A human-readable string indicating the refresh frequency. No longer used.", + "type": "string" + }, + "pause": { + "description": "Whether the refresh interval is set to be paused while viewing the dashboard.", + "type": "boolean" + }, + "section": { + "deprecated": true, + "description": "No longer used.", + "type": "number" + }, + "value": { + "description": "A numeric value indicating refresh frequency in milliseconds.", + "type": "number" + } + }, + "required": [ + "pause", + "value" + ], + "type": "object" + }, + "timeFrom": { + "description": "An ISO string indicating when to restore time from", + "type": "string" + }, + "timeRestore": { + "default": false, + "description": "Whether to restore time upon viewing this dashboard", + "type": "boolean" + }, + "timeTo": { + "description": "An ISO string indicating when to restore time from", + "type": "string" + }, + "title": { + "description": "A human-readable title for the dashboard", + "type": "string" + }, + "version": { + "deprecated": true, + "type": "number" + } + }, + "required": [ + "title", + "options" + ], + "type": "object" + }, + "createdAt": { + "type": "string" + }, + "createdBy": { + "type": "string" + }, + "error": { + "additionalProperties": false, + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "metadata": { + "additionalProperties": true, + "properties": {}, + "type": "object" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "error", + "message", + "statusCode" + ], + "type": "object" + }, + "id": { + "type": "string" + }, + "managed": { + "type": "boolean" + }, + "namespaces": { + "items": { + "type": "string" + }, + "type": "array" + }, + "originId": { + "type": "string" + }, + "references": { + "items": { + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "id" + ], + "type": "object" + }, + "type": "array" + }, + "type": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "updatedBy": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "id", + "type", + "attributes", + "references" + ], + "type": "object" + } + }, + "required": [ + "item" + ], + "type": "object" + } + } + } + } + }, + "summary": "Create a dashboard", + "tags": [ + "Dashboards" + ], + "x-state": "Technical Preview" + }, + "put": { + "description": "This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.", + "operationId": "put-dashboards-dashboard-id", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "description": "A unique identifier for the dashboard.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "attributes": { + "additionalProperties": false, + "properties": { + "controlGroupInput": { + "additionalProperties": false, + "properties": { + "autoApplySelections": { + "default": true, + "description": "Show apply selections button in controls.", + "type": "boolean" + }, + "chainingSystem": { + "default": "HIERARCHICAL", + "description": "The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".", + "enum": [ + "NONE", + "HIERARCHICAL" + ], + "type": "string" + }, + "controls": { + "default": [], + "description": "An array of control panels and their state in the control group.", + "items": { + "additionalProperties": true, + "properties": { + "controlConfig": { + "additionalProperties": {}, + "type": "object" + }, + "grow": { + "default": false, + "description": "Expand width of the control panel to fit available space.", + "type": "boolean" + }, + "id": { + "description": "The unique ID of the control.", + "type": "string" + }, + "order": { + "description": "The order of the control panel in the control group.", + "type": "number" + }, + "type": { + "description": "The type of the control panel.", + "type": "string" + }, + "width": { + "default": "medium", + "description": "Minimum width of the control panel in the control group.", + "enum": [ + "small", + "medium", + "large" + ], + "type": "string" + } + }, + "required": [ + "type", + "order" + ], + "type": "object" + }, + "type": "array" + }, + "enhancements": { + "additionalProperties": {}, + "type": "object" + }, + "ignoreParentSettings": { + "additionalProperties": false, + "properties": { + "ignoreFilters": { + "default": false, + "description": "Ignore global filters in controls.", + "type": "boolean" + }, + "ignoreQuery": { + "default": false, + "description": "Ignore the global query bar in controls.", + "type": "boolean" + }, + "ignoreTimerange": { + "default": false, + "description": "Ignore the global time range in controls.", + "type": "boolean" + }, + "ignoreValidations": { + "default": false, + "description": "Ignore validations in controls.", + "type": "boolean" + } + }, + "type": "object" + }, + "labelPosition": { + "default": "oneLine", + "description": "Position of the labels for controls. For example, \"oneLine\", \"twoLine\".", + "enum": [ + "oneLine", + "twoLine" + ], + "type": "string" + } + }, + "required": [ + "ignoreParentSettings" + ], + "type": "object" + }, + "description": { + "default": "", + "description": "A short description.", + "type": "string" + }, + "kibanaSavedObjectMeta": { + "additionalProperties": false, + "default": {}, + "description": "A container for various metadata", + "properties": { + "searchSource": { + "additionalProperties": true, + "properties": { + "filter": { + "items": { + "additionalProperties": false, + "description": "A filter for the search source.", + "properties": { + "$state": { + "additionalProperties": false, + "properties": { + "store": { + "description": "Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').", + "enum": [ + "appState", + "globalState" + ], + "type": "string" + } + }, + "required": [ + "store" + ], + "type": "object" + }, + "meta": { + "additionalProperties": true, + "properties": { + "alias": { + "nullable": true, + "type": "string" + }, + "controlledBy": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "field": { + "type": "string" + }, + "group": { + "type": "string" + }, + "index": { + "type": "string" + }, + "isMultiIndex": { + "type": "boolean" + }, + "key": { + "type": "string" + }, + "negate": { + "type": "boolean" + }, + "params": {}, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "params" + ], + "type": "object" + }, + "query": { + "additionalProperties": {}, + "type": "object" + } + }, + "required": [ + "meta" + ], + "type": "object" + }, + "type": "array" + }, + "query": { + "additionalProperties": false, + "properties": { + "language": { + "description": "The query language such as KQL or Lucene.", + "type": "string" + }, + "query": { + "anyOf": [ + { + "description": "A text-based query such as Kibana Query Language (KQL) or Lucene query language.", + "type": "string" + }, + { + "additionalProperties": {}, + "type": "object" + } + ] + } + }, + "required": [ + "query", + "language" + ], + "type": "object" + }, + "sort": { + "items": { + "additionalProperties": { + "anyOf": [ + { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + { + "additionalProperties": false, + "properties": { + "format": { + "type": "string" + }, + "order": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "required": [ + "order" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "numeric_type": { + "enum": [ + "double", + "long", + "date", + "date_nanos" + ], + "type": "string" + }, + "order": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "required": [ + "order" + ], + "type": "object" + } + ] + }, + "type": "object" + }, + "type": "array" + }, + "type": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "options": { + "additionalProperties": false, + "properties": { + "hidePanelTitles": { + "default": false, + "description": "Hide the panel titles in the dashboard.", + "type": "boolean" + }, + "syncColors": { + "default": true, + "description": "Synchronize colors between related panels in the dashboard.", + "type": "boolean" + }, + "syncCursor": { + "default": true, + "description": "Synchronize cursor position between related panels in the dashboard.", + "type": "boolean" + }, + "syncTooltips": { + "default": true, + "description": "Synchronize tooltips between related panels in the dashboard.", + "type": "boolean" + }, + "useMargins": { + "default": true, + "description": "Show margins between panels in the dashboard layout.", + "type": "boolean" + } + }, + "type": "object" + }, + "panels": { + "default": [], + "items": { + "additionalProperties": false, + "properties": { + "gridData": { + "additionalProperties": false, + "properties": { + "h": { + "default": 15, + "description": "The height of the panel in grid units", + "minimum": 1, + "type": "number" + }, + "i": { + "description": "The unique identifier of the panel", + "type": "string" + }, + "w": { + "default": 24, + "description": "The width of the panel in grid units", + "maximum": 48, + "minimum": 1, + "type": "number" + }, + "x": { + "description": "The x coordinate of the panel in grid units", + "type": "number" + }, + "y": { + "description": "The y coordinate of the panel in grid units", + "type": "number" + } + }, + "required": [ + "x", + "y" + ], + "type": "object" + }, + "id": { + "description": "The saved object id for by reference panels", + "type": "string" + }, + "panelConfig": { + "additionalProperties": true, + "properties": { + "description": { + "description": "The description of the panel", + "type": "string" + }, + "enhancements": { + "additionalProperties": {}, + "type": "object" + }, + "hidePanelTitles": { + "description": "Set to true to hide the panel title in its container.", + "type": "boolean" + }, + "savedObjectId": { + "description": "The unique id of the library item to construct the embeddable.", + "type": "string" + }, + "title": { + "description": "The title of the panel", + "type": "string" + }, + "version": { + "description": "The version of the embeddable in the panel.", + "type": "string" + } + }, + "type": "object" + }, + "panelIndex": { + "description": "The unique ID of the panel.", + "type": "string" + }, + "panelRefName": { + "type": "string" + }, + "title": { + "description": "The title of the panel", + "type": "string" + }, + "type": { + "description": "The embeddable type", + "type": "string" + }, + "version": { + "deprecated": true, + "description": "The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).", + "type": "string" + } + }, + "required": [ + "panelConfig", + "type", + "gridData" + ], + "type": "object" + }, + "type": "array" + }, + "refreshInterval": { + "additionalProperties": false, + "description": "A container for various refresh interval settings", + "properties": { + "display": { + "deprecated": true, + "description": "A human-readable string indicating the refresh frequency. No longer used.", + "type": "string" + }, + "pause": { + "description": "Whether the refresh interval is set to be paused while viewing the dashboard.", + "type": "boolean" + }, + "section": { + "deprecated": true, + "description": "No longer used.", + "type": "number" + }, + "value": { + "description": "A numeric value indicating refresh frequency in milliseconds.", + "type": "number" + } + }, + "required": [ + "pause", + "value" + ], + "type": "object" + }, + "timeFrom": { + "description": "An ISO string indicating when to restore time from", + "type": "string" + }, + "timeRestore": { + "default": false, + "description": "Whether to restore time upon viewing this dashboard", + "type": "boolean" + }, + "timeTo": { + "description": "An ISO string indicating when to restore time from", + "type": "string" + }, + "title": { + "description": "A human-readable title for the dashboard", + "type": "string" + }, + "version": { + "deprecated": true, + "type": "number" + } + }, + "required": [ + "title", + "options" + ], + "type": "object" + }, + "references": { + "items": { + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "id" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "attributes" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "item": { + "additionalProperties": true, + "properties": { + "attributes": { + "additionalProperties": false, + "properties": { + "controlGroupInput": { + "additionalProperties": false, + "properties": { + "autoApplySelections": { + "default": true, + "description": "Show apply selections button in controls.", + "type": "boolean" + }, + "chainingSystem": { + "default": "HIERARCHICAL", + "description": "The chaining strategy for multiple controls. For example, \"HIERARCHICAL\" or \"NONE\".", + "enum": [ + "NONE", + "HIERARCHICAL" + ], + "type": "string" + }, + "controls": { + "default": [], + "description": "An array of control panels and their state in the control group.", + "items": { + "additionalProperties": true, + "properties": { + "controlConfig": { + "additionalProperties": {}, + "type": "object" + }, + "grow": { + "default": false, + "description": "Expand width of the control panel to fit available space.", + "type": "boolean" + }, + "id": { + "description": "The unique ID of the control.", + "type": "string" + }, + "order": { + "description": "The order of the control panel in the control group.", + "type": "number" + }, + "type": { + "description": "The type of the control panel.", + "type": "string" + }, + "width": { + "default": "medium", + "description": "Minimum width of the control panel in the control group.", + "enum": [ + "small", + "medium", + "large" + ], + "type": "string" + } + }, + "required": [ + "type", + "order" + ], + "type": "object" + }, + "type": "array" + }, + "enhancements": { + "additionalProperties": {}, + "type": "object" + }, + "ignoreParentSettings": { + "additionalProperties": false, + "properties": { + "ignoreFilters": { + "default": false, + "description": "Ignore global filters in controls.", + "type": "boolean" + }, + "ignoreQuery": { + "default": false, + "description": "Ignore the global query bar in controls.", + "type": "boolean" + }, + "ignoreTimerange": { + "default": false, + "description": "Ignore the global time range in controls.", + "type": "boolean" + }, + "ignoreValidations": { + "default": false, + "description": "Ignore validations in controls.", + "type": "boolean" + } + }, + "type": "object" + }, + "labelPosition": { + "default": "oneLine", + "description": "Position of the labels for controls. For example, \"oneLine\", \"twoLine\".", + "enum": [ + "oneLine", + "twoLine" + ], + "type": "string" + } + }, + "required": [ + "ignoreParentSettings" + ], + "type": "object" + }, + "description": { + "default": "", + "description": "A short description.", + "type": "string" + }, + "kibanaSavedObjectMeta": { + "additionalProperties": false, + "default": {}, + "description": "A container for various metadata", + "properties": { + "searchSource": { + "additionalProperties": true, + "properties": { + "filter": { + "items": { + "additionalProperties": false, + "description": "A filter for the search source.", + "properties": { + "$state": { + "additionalProperties": false, + "properties": { + "store": { + "description": "Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState').", + "enum": [ + "appState", + "globalState" + ], + "type": "string" + } + }, + "required": [ + "store" + ], + "type": "object" + }, + "meta": { + "additionalProperties": true, + "properties": { + "alias": { + "nullable": true, + "type": "string" + }, + "controlledBy": { + "type": "string" + }, + "disabled": { + "type": "boolean" + }, + "field": { + "type": "string" + }, + "group": { + "type": "string" + }, + "index": { + "type": "string" + }, + "isMultiIndex": { + "type": "boolean" + }, + "key": { + "type": "string" + }, + "negate": { + "type": "boolean" + }, + "params": {}, + "type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "params" + ], + "type": "object" + }, + "query": { + "additionalProperties": {}, + "type": "object" + } + }, + "required": [ + "meta" + ], + "type": "object" + }, + "type": "array" + }, + "query": { + "additionalProperties": false, + "properties": { + "language": { + "description": "The query language such as KQL or Lucene.", + "type": "string" + }, + "query": { + "anyOf": [ + { + "description": "A text-based query such as Kibana Query Language (KQL) or Lucene query language.", + "type": "string" + }, + { + "additionalProperties": {}, + "type": "object" + } + ] + } + }, + "required": [ + "query", + "language" + ], + "type": "object" + }, + "sort": { + "items": { + "additionalProperties": { + "anyOf": [ + { + "enum": [ + "asc", + "desc" + ], + "type": "string" + }, + { + "additionalProperties": false, + "properties": { + "format": { + "type": "string" + }, + "order": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "required": [ + "order" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "numeric_type": { + "enum": [ + "double", + "long", + "date", + "date_nanos" + ], + "type": "string" + }, + "order": { + "enum": [ + "asc", + "desc" + ], + "type": "string" + } + }, + "required": [ + "order" + ], + "type": "object" + } + ] + }, + "type": "object" + }, + "type": "array" + }, + "type": { + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "options": { + "additionalProperties": false, + "properties": { + "hidePanelTitles": { + "default": false, + "description": "Hide the panel titles in the dashboard.", + "type": "boolean" + }, + "syncColors": { + "default": true, + "description": "Synchronize colors between related panels in the dashboard.", + "type": "boolean" + }, + "syncCursor": { + "default": true, + "description": "Synchronize cursor position between related panels in the dashboard.", + "type": "boolean" + }, + "syncTooltips": { + "default": true, + "description": "Synchronize tooltips between related panels in the dashboard.", + "type": "boolean" + }, + "useMargins": { + "default": true, + "description": "Show margins between panels in the dashboard layout.", + "type": "boolean" + } + }, + "type": "object" + }, + "panels": { + "default": [], + "items": { + "additionalProperties": false, + "properties": { + "gridData": { + "additionalProperties": false, + "properties": { + "h": { + "default": 15, + "description": "The height of the panel in grid units", + "minimum": 1, + "type": "number" + }, + "i": { + "type": "string" + }, + "w": { + "default": 24, + "description": "The width of the panel in grid units", + "maximum": 48, + "minimum": 1, + "type": "number" + }, + "x": { + "description": "The x coordinate of the panel in grid units", + "type": "number" + }, + "y": { + "description": "The y coordinate of the panel in grid units", + "type": "number" + } + }, + "required": [ + "x", + "y", + "i" + ], + "type": "object" + }, + "id": { + "description": "The saved object id for by reference panels", + "type": "string" + }, + "panelConfig": { + "additionalProperties": true, + "properties": { + "description": { + "description": "The description of the panel", + "type": "string" + }, + "enhancements": { + "additionalProperties": {}, + "type": "object" + }, + "hidePanelTitles": { + "description": "Set to true to hide the panel title in its container.", + "type": "boolean" + }, + "savedObjectId": { + "description": "The unique id of the library item to construct the embeddable.", + "type": "string" + }, + "title": { + "description": "The title of the panel", + "type": "string" + }, + "version": { + "description": "The version of the embeddable in the panel.", + "type": "string" + } + }, + "type": "object" + }, + "panelIndex": { + "type": "string" + }, + "panelRefName": { + "type": "string" + }, + "title": { + "description": "The title of the panel", + "type": "string" + }, + "type": { + "description": "The embeddable type", + "type": "string" + }, + "version": { + "deprecated": true, + "description": "The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type).", + "type": "string" + } + }, + "required": [ + "panelConfig", + "type", + "gridData", + "panelIndex" + ], + "type": "object" + }, + "type": "array" + }, + "refreshInterval": { + "additionalProperties": false, + "description": "A container for various refresh interval settings", + "properties": { + "display": { + "deprecated": true, + "description": "A human-readable string indicating the refresh frequency. No longer used.", + "type": "string" + }, + "pause": { + "description": "Whether the refresh interval is set to be paused while viewing the dashboard.", + "type": "boolean" + }, + "section": { + "deprecated": true, + "description": "No longer used.", + "type": "number" + }, + "value": { + "description": "A numeric value indicating refresh frequency in milliseconds.", + "type": "number" + } + }, + "required": [ + "pause", + "value" + ], + "type": "object" + }, + "timeFrom": { + "description": "An ISO string indicating when to restore time from", + "type": "string" + }, + "timeRestore": { + "default": false, + "description": "Whether to restore time upon viewing this dashboard", + "type": "boolean" + }, + "timeTo": { + "description": "An ISO string indicating when to restore time from", + "type": "string" + }, + "title": { + "description": "A human-readable title for the dashboard", + "type": "string" + }, + "version": { + "deprecated": true, + "type": "number" + } + }, + "required": [ + "title", + "options" + ], + "type": "object" + }, + "createdAt": { + "type": "string" + }, + "createdBy": { + "type": "string" + }, + "error": { + "additionalProperties": false, + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "metadata": { + "additionalProperties": true, + "properties": {}, + "type": "object" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "error", + "message", + "statusCode" + ], + "type": "object" + }, + "id": { + "type": "string" + }, + "managed": { + "type": "boolean" + }, + "namespaces": { + "items": { + "type": "string" + }, + "type": "array" + }, + "originId": { + "type": "string" + }, + "references": { + "items": { + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "id" + ], + "type": "object" + }, + "type": "array" + }, + "type": { + "type": "string" + }, + "updatedAt": { + "type": "string" + }, + "updatedBy": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "id", + "type", + "attributes", + "references" + ], + "type": "object" + } + }, + "required": [ + "item" + ], + "type": "object" + } + } + } + } + }, + "summary": "Update an existing dashboard", + "tags": [ + "Dashboards" + ], + "x-state": "Technical Preview" + } + }, "/api/fleet/agent_download_sources": { "get": { "operationId": "get-fleet-agent-download-sources", @@ -6547,9 +9785,6 @@ "type": "number" } }, - "required": [ - "enabled" - ], "type": "object" }, "monitoring_output_id": { @@ -7316,9 +10551,6 @@ "type": "number" } }, - "required": [ - "enabled" - ], "type": "object" }, "monitoring_output_id": { @@ -7577,9 +10809,6 @@ "type": "number" } }, - "required": [ - "enabled" - ], "type": "object" }, "monitoring_output_id": { @@ -8376,9 +11605,6 @@ "type": "number" } }, - "required": [ - "enabled" - ], "type": "object" }, "monitoring_output_id": { @@ -9436,9 +12662,6 @@ "type": "number" } }, - "required": [ - "enabled" - ], "type": "object" }, "monitoring_output_id": { @@ -10204,9 +13427,6 @@ "type": "number" } }, - "required": [ - "enabled" - ], "type": "object" }, "monitoring_output_id": { @@ -10465,9 +13685,6 @@ "type": "number" } }, - "required": [ - "enabled" - ], "type": "object" }, "monitoring_output_id": { @@ -11265,9 +14482,6 @@ "type": "number" } }, - "required": [ - "enabled" - ], "type": "object" }, "monitoring_output_id": { @@ -13278,6 +16492,7 @@ }, "upgrade_details": { "additionalProperties": false, + "nullable": true, "properties": { "action_id": { "type": "string" @@ -15470,494 +18685,496 @@ }, "upgrade_details": { "additionalProperties": false, - "properties": { - "action_id": { - "type": "string" - }, - "metadata": { - "additionalProperties": false, - "properties": { - "download_percent": { - "type": "number" - }, - "download_rate": { - "type": "number" - }, - "error_msg": { - "type": "string" - }, - "failed_state": { - "enum": [ - "UPG_REQUESTED", - "UPG_SCHEDULED", - "UPG_DOWNLOADING", - "UPG_EXTRACTING", - "UPG_REPLACING", - "UPG_RESTARTING", - "UPG_FAILED", - "UPG_WATCHING", - "UPG_ROLLBACK" - ], - "type": "string" - }, - "retry_error_msg": { - "type": "string" - }, - "retry_until": { - "type": "string" - }, - "scheduled_at": { - "type": "string" - } - }, - "type": "object" - }, - "state": { - "enum": [ - "UPG_REQUESTED", - "UPG_SCHEDULED", - "UPG_DOWNLOADING", - "UPG_EXTRACTING", - "UPG_REPLACING", - "UPG_RESTARTING", - "UPG_FAILED", - "UPG_WATCHING", - "UPG_ROLLBACK" - ], - "type": "string" - }, - "target_version": { - "type": "string" - } - }, - "required": [ - "target_version", - "action_id", - "state" - ], - "type": "object" - }, - "upgrade_started_at": { - "nullable": true, - "type": "string" - }, - "upgraded_at": { "nullable": true, - "type": "string" - }, - "user_provided_metadata": { - "additionalProperties": {}, - "type": "object" - } - }, - "required": [ - "id", - "packages", - "type", - "active", - "enrolled_at", - "local_metadata" - ], - "type": "object" - } - }, - "required": [ - "item" - ], - "type": "object" - } - } - } - }, - "400": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "description": "Generic Error", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } - } - }, - "summary": "Get an agent", - "tags": [ - "Elastic Agents" - ] - }, - "put": { - "description": "Update an agent by ID.", - "operationId": "put-fleet-agents-agentid", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "path", - "name": "agentId", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "user_provided_metadata": { - "additionalProperties": {}, - "type": "object" - } - }, - "type": "object" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "item": { - "additionalProperties": false, - "properties": { - "access_api_key": { - "type": "string" - }, - "access_api_key_id": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "agent": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "version" - ], - "type": "object" - }, - "components": { - "items": { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "status": { - "enum": [ - "STARTING", - "CONFIGURING", - "HEALTHY", - "DEGRADED", - "FAILED", - "STOPPING", - "STOPPED" - ], - "type": "string" - }, - "type": { - "type": "string" - }, - "units": { - "items": { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "message": { - "type": "string" - }, - "payload": { - "additionalProperties": {}, - "type": "object" - }, - "status": { - "enum": [ - "STARTING", - "CONFIGURING", - "HEALTHY", - "DEGRADED", - "FAILED", - "STOPPING", - "STOPPED" - ], - "type": "string" - }, - "type": { - "enum": [ - "input", - "output" - ], - "type": "string" - } - }, - "required": [ - "id", - "type", - "status", - "message" - ], - "type": "object" - }, - "type": "array" - } - }, - "required": [ - "id", - "type", - "status", - "message" - ], - "type": "object" - }, - "type": "array" - }, - "default_api_key": { - "type": "string" - }, - "default_api_key_history": { - "items": { - "additionalProperties": false, - "deprecated": true, - "properties": { - "id": { - "type": "string" - }, - "retired_at": { - "type": "string" - } - }, - "required": [ - "id", - "retired_at" - ], - "type": "object" - }, - "type": "array" - }, - "default_api_key_id": { - "type": "string" - }, - "enrolled_at": { - "type": "string" - }, - "id": { - "type": "string" - }, - "last_checkin": { - "type": "string" - }, - "last_checkin_message": { - "type": "string" - }, - "last_checkin_status": { - "enum": [ - "error", - "online", - "degraded", - "updating", - "starting" - ], - "type": "string" - }, - "local_metadata": { - "additionalProperties": {}, - "type": "object" - }, - "metrics": { - "additionalProperties": false, - "properties": { - "cpu_avg": { - "type": "number" - }, - "memory_size_byte_avg": { - "type": "number" - } - }, - "type": "object" - }, - "namespaces": { - "items": { - "type": "string" - }, - "type": "array" - }, - "outputs": { - "additionalProperties": { - "additionalProperties": false, - "properties": { - "api_key_id": { - "type": "string" - }, - "to_retire_api_key_ids": { - "items": { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "retired_at": { - "type": "string" - } - }, - "required": [ - "id", - "retired_at" - ], - "type": "object" - }, - "type": "array" - }, - "type": { - "type": "string" - } - }, - "required": [ - "api_key_id", - "type" - ], - "type": "object" - }, - "type": "object" - }, - "packages": { - "items": { - "type": "string" - }, - "type": "array" - }, - "policy_id": { - "type": "string" - }, - "policy_revision": { - "nullable": true, - "type": "number" - }, - "sort": { - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - }, - { - "enum": [], - "nullable": true - } - ] - }, - "type": "array" - }, - "status": { - "enum": [ - "offline", - "error", - "online", - "inactive", - "enrolling", - "unenrolling", - "unenrolled", - "updating", - "degraded" - ], - "type": "string" - }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "type": { - "enum": [ - "PERMANENT", - "EPHEMERAL", - "TEMPORARY" - ], - "type": "string" - }, - "unenrolled_at": { - "type": "string" - }, - "unenrollment_started_at": { - "type": "string" - }, - "unhealthy_reason": { - "items": { - "enum": [ - "input", - "output", - "other" - ], - "type": "string" - }, - "nullable": true, - "type": "array" - }, - "upgrade_details": { - "additionalProperties": false, + "properties": { + "action_id": { + "type": "string" + }, + "metadata": { + "additionalProperties": false, + "properties": { + "download_percent": { + "type": "number" + }, + "download_rate": { + "type": "number" + }, + "error_msg": { + "type": "string" + }, + "failed_state": { + "enum": [ + "UPG_REQUESTED", + "UPG_SCHEDULED", + "UPG_DOWNLOADING", + "UPG_EXTRACTING", + "UPG_REPLACING", + "UPG_RESTARTING", + "UPG_FAILED", + "UPG_WATCHING", + "UPG_ROLLBACK" + ], + "type": "string" + }, + "retry_error_msg": { + "type": "string" + }, + "retry_until": { + "type": "string" + }, + "scheduled_at": { + "type": "string" + } + }, + "type": "object" + }, + "state": { + "enum": [ + "UPG_REQUESTED", + "UPG_SCHEDULED", + "UPG_DOWNLOADING", + "UPG_EXTRACTING", + "UPG_REPLACING", + "UPG_RESTARTING", + "UPG_FAILED", + "UPG_WATCHING", + "UPG_ROLLBACK" + ], + "type": "string" + }, + "target_version": { + "type": "string" + } + }, + "required": [ + "target_version", + "action_id", + "state" + ], + "type": "object" + }, + "upgrade_started_at": { + "nullable": true, + "type": "string" + }, + "upgraded_at": { + "nullable": true, + "type": "string" + }, + "user_provided_metadata": { + "additionalProperties": {}, + "type": "object" + } + }, + "required": [ + "id", + "packages", + "type", + "active", + "enrolled_at", + "local_metadata" + ], + "type": "object" + } + }, + "required": [ + "item" + ], + "type": "object" + } + } + } + }, + "400": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "description": "Generic Error", + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } + } + }, + "summary": "Get an agent", + "tags": [ + "Elastic Agents" + ] + }, + "put": { + "description": "Update an agent by ID.", + "operationId": "put-fleet-agents-agentid", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "in": "path", + "name": "agentId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "user_provided_metadata": { + "additionalProperties": {}, + "type": "object" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "item": { + "additionalProperties": false, + "properties": { + "access_api_key": { + "type": "string" + }, + "access_api_key_id": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "agent": { + "additionalProperties": true, + "properties": { + "id": { + "type": "string" + }, + "version": { + "type": "string" + } + }, + "required": [ + "id", + "version" + ], + "type": "object" + }, + "components": { + "items": { + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "status": { + "enum": [ + "STARTING", + "CONFIGURING", + "HEALTHY", + "DEGRADED", + "FAILED", + "STOPPING", + "STOPPED" + ], + "type": "string" + }, + "type": { + "type": "string" + }, + "units": { + "items": { + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "message": { + "type": "string" + }, + "payload": { + "additionalProperties": {}, + "type": "object" + }, + "status": { + "enum": [ + "STARTING", + "CONFIGURING", + "HEALTHY", + "DEGRADED", + "FAILED", + "STOPPING", + "STOPPED" + ], + "type": "string" + }, + "type": { + "enum": [ + "input", + "output" + ], + "type": "string" + } + }, + "required": [ + "id", + "type", + "status", + "message" + ], + "type": "object" + }, + "type": "array" + } + }, + "required": [ + "id", + "type", + "status", + "message" + ], + "type": "object" + }, + "type": "array" + }, + "default_api_key": { + "type": "string" + }, + "default_api_key_history": { + "items": { + "additionalProperties": false, + "deprecated": true, + "properties": { + "id": { + "type": "string" + }, + "retired_at": { + "type": "string" + } + }, + "required": [ + "id", + "retired_at" + ], + "type": "object" + }, + "type": "array" + }, + "default_api_key_id": { + "type": "string" + }, + "enrolled_at": { + "type": "string" + }, + "id": { + "type": "string" + }, + "last_checkin": { + "type": "string" + }, + "last_checkin_message": { + "type": "string" + }, + "last_checkin_status": { + "enum": [ + "error", + "online", + "degraded", + "updating", + "starting" + ], + "type": "string" + }, + "local_metadata": { + "additionalProperties": {}, + "type": "object" + }, + "metrics": { + "additionalProperties": false, + "properties": { + "cpu_avg": { + "type": "number" + }, + "memory_size_byte_avg": { + "type": "number" + } + }, + "type": "object" + }, + "namespaces": { + "items": { + "type": "string" + }, + "type": "array" + }, + "outputs": { + "additionalProperties": { + "additionalProperties": false, + "properties": { + "api_key_id": { + "type": "string" + }, + "to_retire_api_key_ids": { + "items": { + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "retired_at": { + "type": "string" + } + }, + "required": [ + "id", + "retired_at" + ], + "type": "object" + }, + "type": "array" + }, + "type": { + "type": "string" + } + }, + "required": [ + "api_key_id", + "type" + ], + "type": "object" + }, + "type": "object" + }, + "packages": { + "items": { + "type": "string" + }, + "type": "array" + }, + "policy_id": { + "type": "string" + }, + "policy_revision": { + "nullable": true, + "type": "number" + }, + "sort": { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + }, + { + "enum": [], + "nullable": true + } + ] + }, + "type": "array" + }, + "status": { + "enum": [ + "offline", + "error", + "online", + "inactive", + "enrolling", + "unenrolling", + "unenrolled", + "updating", + "degraded" + ], + "type": "string" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "type": { + "enum": [ + "PERMANENT", + "EPHEMERAL", + "TEMPORARY" + ], + "type": "string" + }, + "unenrolled_at": { + "type": "string" + }, + "unenrollment_started_at": { + "type": "string" + }, + "unhealthy_reason": { + "items": { + "enum": [ + "input", + "output", + "other" + ], + "type": "string" + }, + "nullable": true, + "type": "array" + }, + "upgrade_details": { + "additionalProperties": false, + "nullable": true, "properties": { "action_id": { "type": "string" @@ -38606,6 +41823,9 @@ { "name": "connectors" }, + { + "name": "Dashboards" + }, { "name": "Data streams" }, diff --git a/oas_docs/kibana.info.yaml b/oas_docs/kibana.info.yaml index cb478f300214e..693f4db5981e4 100644 --- a/oas_docs/kibana.info.yaml +++ b/oas_docs/kibana.info.yaml @@ -42,11 +42,6 @@ info: x-feedbackLink: label: Feedback url: https://github.com/elastic/docs-content/issues/new?assignees=&labels=feedback%2Ccommunity&projects=&template=api-feedback.yaml&title=%5BFeedback%5D%3A+ -servers: - - url: https://{kibana_url} - variables: - kibana_url: - default: localhost:5601 security: - apiKeyAuth: [] - basicAuth: [] diff --git a/oas_docs/output/kibana.serverless.yaml b/oas_docs/output/kibana.serverless.yaml index 6c27d0380c435..72fc1b093903a 100644 --- a/oas_docs/output/kibana.serverless.yaml +++ b/oas_docs/output/kibana.serverless.yaml @@ -40,7 +40,7 @@ servers: - url: https://{kibana_url} variables: kibana_url: - default: localhost:5601 + default: security: - apiKeyAuth: [] tags: @@ -71,6 +71,7 @@ tags: description: Connector documentation url: https://www.elastic.co/docs/current/serverless/action-connectors x-displayName: Connectors + - name: Dashboards - name: Data streams - description: Data view APIs enable you to manage data views, formerly known as Kibana index patterns. name: data views @@ -5195,6 +5196,2321 @@ paths: tags: - Security Entity Analytics API x-beta: true + /api/dashboards/dashboard: + get: + description: This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. + operationId: get-dashboards-dashboard + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: The page number to return. Default is "1". + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: number + - description: The number of dashboards to display on each page (max 1000). Default is "20". + in: query + name: perPage + required: false + schema: + maximum: 1000 + minimum: 1 + type: number + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + items: + items: + additionalProperties: true + type: object + properties: + attributes: + additionalProperties: false + type: object + properties: + description: + default: '' + description: A short description. + type: string + timeRestore: + default: false + description: Whether to restore time upon viewing this dashboard + type: boolean + title: + description: A human-readable title for the dashboard + type: string + required: + - title + createdAt: + type: string + createdBy: + type: string + error: + additionalProperties: false + type: object + properties: + error: + type: string + message: + type: string + metadata: + additionalProperties: true + type: object + properties: {} + statusCode: + type: number + required: + - error + - message + - statusCode + id: + type: string + managed: + type: boolean + namespaces: + items: + type: string + type: array + originId: + type: string + references: + items: + additionalProperties: false + type: object + properties: + id: + type: string + name: + type: string + type: + type: string + required: + - name + - type + - id + type: array + type: + type: string + updatedAt: + type: string + updatedBy: + type: string + version: + type: string + required: + - id + - type + - attributes + - references + type: array + total: + type: number + required: + - items + - total + summary: Get a list of dashboards + tags: + - Dashboards + x-state: Technical Preview + x-beta: true + /api/dashboards/dashboard/{id}: + delete: + description: This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. + operationId: delete-dashboards-dashboard-id + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: A unique identifier for the dashboard. + in: path + name: id + required: true + schema: + type: string + responses: {} + summary: Delete a dashboard + tags: + - Dashboards + x-state: Technical Preview + x-beta: true + get: + description: This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. + operationId: get-dashboards-dashboard-id + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: A unique identifier for the dashboard. + in: path + name: id + required: true + schema: + type: string + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + item: + additionalProperties: true + type: object + properties: + attributes: + additionalProperties: false + type: object + properties: + controlGroupInput: + additionalProperties: false + type: object + properties: + autoApplySelections: + default: true + description: Show apply selections button in controls. + type: boolean + chainingSystem: + default: HIERARCHICAL + description: The chaining strategy for multiple controls. For example, "HIERARCHICAL" or "NONE". + enum: + - NONE + - HIERARCHICAL + type: string + controls: + default: [] + description: An array of control panels and their state in the control group. + items: + additionalProperties: true + type: object + properties: + controlConfig: + additionalProperties: {} + type: object + grow: + default: false + description: Expand width of the control panel to fit available space. + type: boolean + id: + description: The unique ID of the control. + type: string + order: + description: The order of the control panel in the control group. + type: number + type: + description: The type of the control panel. + type: string + width: + default: medium + description: Minimum width of the control panel in the control group. + enum: + - small + - medium + - large + type: string + required: + - type + - order + type: array + enhancements: + additionalProperties: {} + type: object + ignoreParentSettings: + additionalProperties: false + type: object + properties: + ignoreFilters: + default: false + description: Ignore global filters in controls. + type: boolean + ignoreQuery: + default: false + description: Ignore the global query bar in controls. + type: boolean + ignoreTimerange: + default: false + description: Ignore the global time range in controls. + type: boolean + ignoreValidations: + default: false + description: Ignore validations in controls. + type: boolean + labelPosition: + default: oneLine + description: Position of the labels for controls. For example, "oneLine", "twoLine". + enum: + - oneLine + - twoLine + type: string + required: + - ignoreParentSettings + description: + default: '' + description: A short description. + type: string + kibanaSavedObjectMeta: + additionalProperties: false + default: {} + description: A container for various metadata + type: object + properties: + searchSource: + additionalProperties: true + type: object + properties: + filter: + items: + additionalProperties: false + description: A filter for the search source. + type: object + properties: + $state: + additionalProperties: false + type: object + properties: + store: + description: Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState'). + enum: + - appState + - globalState + type: string + required: + - store + meta: + additionalProperties: true + type: object + properties: + alias: + nullable: true + type: string + controlledBy: + type: string + disabled: + type: boolean + field: + type: string + group: + type: string + index: + type: string + isMultiIndex: + type: boolean + key: + type: string + negate: + type: boolean + params: {} + type: + type: string + value: + type: string + required: + - params + query: + additionalProperties: {} + type: object + required: + - meta + type: array + query: + additionalProperties: false + type: object + properties: + language: + description: The query language such as KQL or Lucene. + type: string + query: + anyOf: + - description: A text-based query such as Kibana Query Language (KQL) or Lucene query language. + type: string + - additionalProperties: {} + type: object + required: + - query + - language + sort: + items: + additionalProperties: + anyOf: + - enum: + - asc + - desc + type: string + - additionalProperties: false + type: object + properties: + format: + type: string + order: + enum: + - asc + - desc + type: string + required: + - order + - additionalProperties: false + type: object + properties: + numeric_type: + enum: + - double + - long + - date + - date_nanos + type: string + order: + enum: + - asc + - desc + type: string + required: + - order + type: object + type: array + type: + type: string + options: + additionalProperties: false + type: object + properties: + hidePanelTitles: + default: false + description: Hide the panel titles in the dashboard. + type: boolean + syncColors: + default: true + description: Synchronize colors between related panels in the dashboard. + type: boolean + syncCursor: + default: true + description: Synchronize cursor position between related panels in the dashboard. + type: boolean + syncTooltips: + default: true + description: Synchronize tooltips between related panels in the dashboard. + type: boolean + useMargins: + default: true + description: Show margins between panels in the dashboard layout. + type: boolean + panels: + default: [] + items: + additionalProperties: false + type: object + properties: + gridData: + additionalProperties: false + type: object + properties: + h: + default: 15 + description: The height of the panel in grid units + minimum: 1 + type: number + i: + type: string + w: + default: 24 + description: The width of the panel in grid units + maximum: 48 + minimum: 1 + type: number + x: + description: The x coordinate of the panel in grid units + type: number + 'y': + description: The y coordinate of the panel in grid units + type: number + required: + - x + - 'y' + - i + id: + description: The saved object id for by reference panels + type: string + panelConfig: + additionalProperties: true + type: object + properties: + description: + description: The description of the panel + type: string + enhancements: + additionalProperties: {} + type: object + hidePanelTitles: + description: Set to true to hide the panel title in its container. + type: boolean + savedObjectId: + description: The unique id of the library item to construct the embeddable. + type: string + title: + description: The title of the panel + type: string + version: + description: The version of the embeddable in the panel. + type: string + panelIndex: + type: string + panelRefName: + type: string + title: + description: The title of the panel + type: string + type: + description: The embeddable type + type: string + version: + deprecated: true + description: The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type). + type: string + required: + - panelConfig + - type + - gridData + - panelIndex + type: array + refreshInterval: + additionalProperties: false + description: A container for various refresh interval settings + type: object + properties: + display: + deprecated: true + description: A human-readable string indicating the refresh frequency. No longer used. + type: string + pause: + description: Whether the refresh interval is set to be paused while viewing the dashboard. + type: boolean + section: + deprecated: true + description: No longer used. + type: number + value: + description: A numeric value indicating refresh frequency in milliseconds. + type: number + required: + - pause + - value + timeFrom: + description: An ISO string indicating when to restore time from + type: string + timeRestore: + default: false + description: Whether to restore time upon viewing this dashboard + type: boolean + timeTo: + description: An ISO string indicating when to restore time from + type: string + title: + description: A human-readable title for the dashboard + type: string + version: + deprecated: true + type: number + required: + - title + - options + createdAt: + type: string + createdBy: + type: string + error: + additionalProperties: false + type: object + properties: + error: + type: string + message: + type: string + metadata: + additionalProperties: true + type: object + properties: {} + statusCode: + type: number + required: + - error + - message + - statusCode + id: + type: string + managed: + type: boolean + namespaces: + items: + type: string + type: array + originId: + type: string + references: + items: + additionalProperties: false + type: object + properties: + id: + type: string + name: + type: string + type: + type: string + required: + - name + - type + - id + type: array + type: + type: string + updatedAt: + type: string + updatedBy: + type: string + version: + type: string + required: + - id + - type + - attributes + - references + meta: + additionalProperties: false + type: object + properties: + aliasPurpose: + enum: + - savedObjectConversion + - savedObjectImport + type: string + aliasTargetId: + type: string + outcome: + enum: + - exactMatch + - aliasMatch + - conflict + type: string + required: + - outcome + required: + - item + - meta + summary: Get a dashboard + tags: + - Dashboards + x-state: Technical Preview + x-beta: true + post: + description: This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. + operationId: post-dashboards-dashboard-id + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: A unique identifier for the dashboard. + in: path + name: id + required: false + schema: + type: string + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + attributes: + additionalProperties: false + type: object + properties: + controlGroupInput: + additionalProperties: false + type: object + properties: + autoApplySelections: + default: true + description: Show apply selections button in controls. + type: boolean + chainingSystem: + default: HIERARCHICAL + description: The chaining strategy for multiple controls. For example, "HIERARCHICAL" or "NONE". + enum: + - NONE + - HIERARCHICAL + type: string + controls: + default: [] + description: An array of control panels and their state in the control group. + items: + additionalProperties: true + type: object + properties: + controlConfig: + additionalProperties: {} + type: object + grow: + default: false + description: Expand width of the control panel to fit available space. + type: boolean + id: + description: The unique ID of the control. + type: string + order: + description: The order of the control panel in the control group. + type: number + type: + description: The type of the control panel. + type: string + width: + default: medium + description: Minimum width of the control panel in the control group. + enum: + - small + - medium + - large + type: string + required: + - type + - order + type: array + enhancements: + additionalProperties: {} + type: object + ignoreParentSettings: + additionalProperties: false + type: object + properties: + ignoreFilters: + default: false + description: Ignore global filters in controls. + type: boolean + ignoreQuery: + default: false + description: Ignore the global query bar in controls. + type: boolean + ignoreTimerange: + default: false + description: Ignore the global time range in controls. + type: boolean + ignoreValidations: + default: false + description: Ignore validations in controls. + type: boolean + labelPosition: + default: oneLine + description: Position of the labels for controls. For example, "oneLine", "twoLine". + enum: + - oneLine + - twoLine + type: string + required: + - ignoreParentSettings + description: + default: '' + description: A short description. + type: string + kibanaSavedObjectMeta: + additionalProperties: false + default: {} + description: A container for various metadata + type: object + properties: + searchSource: + additionalProperties: true + type: object + properties: + filter: + items: + additionalProperties: false + description: A filter for the search source. + type: object + properties: + $state: + additionalProperties: false + type: object + properties: + store: + description: Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState'). + enum: + - appState + - globalState + type: string + required: + - store + meta: + additionalProperties: true + type: object + properties: + alias: + nullable: true + type: string + controlledBy: + type: string + disabled: + type: boolean + field: + type: string + group: + type: string + index: + type: string + isMultiIndex: + type: boolean + key: + type: string + negate: + type: boolean + params: {} + type: + type: string + value: + type: string + required: + - params + query: + additionalProperties: {} + type: object + required: + - meta + type: array + query: + additionalProperties: false + type: object + properties: + language: + description: The query language such as KQL or Lucene. + type: string + query: + anyOf: + - description: A text-based query such as Kibana Query Language (KQL) or Lucene query language. + type: string + - additionalProperties: {} + type: object + required: + - query + - language + sort: + items: + additionalProperties: + anyOf: + - enum: + - asc + - desc + type: string + - additionalProperties: false + type: object + properties: + format: + type: string + order: + enum: + - asc + - desc + type: string + required: + - order + - additionalProperties: false + type: object + properties: + numeric_type: + enum: + - double + - long + - date + - date_nanos + type: string + order: + enum: + - asc + - desc + type: string + required: + - order + type: object + type: array + type: + type: string + options: + additionalProperties: false + type: object + properties: + hidePanelTitles: + default: false + description: Hide the panel titles in the dashboard. + type: boolean + syncColors: + default: true + description: Synchronize colors between related panels in the dashboard. + type: boolean + syncCursor: + default: true + description: Synchronize cursor position between related panels in the dashboard. + type: boolean + syncTooltips: + default: true + description: Synchronize tooltips between related panels in the dashboard. + type: boolean + useMargins: + default: true + description: Show margins between panels in the dashboard layout. + type: boolean + panels: + default: [] + items: + additionalProperties: false + type: object + properties: + gridData: + additionalProperties: false + type: object + properties: + h: + default: 15 + description: The height of the panel in grid units + minimum: 1 + type: number + i: + description: The unique identifier of the panel + type: string + w: + default: 24 + description: The width of the panel in grid units + maximum: 48 + minimum: 1 + type: number + x: + description: The x coordinate of the panel in grid units + type: number + 'y': + description: The y coordinate of the panel in grid units + type: number + required: + - x + - 'y' + id: + description: The saved object id for by reference panels + type: string + panelConfig: + additionalProperties: true + type: object + properties: + description: + description: The description of the panel + type: string + enhancements: + additionalProperties: {} + type: object + hidePanelTitles: + description: Set to true to hide the panel title in its container. + type: boolean + savedObjectId: + description: The unique id of the library item to construct the embeddable. + type: string + title: + description: The title of the panel + type: string + version: + description: The version of the embeddable in the panel. + type: string + panelIndex: + description: The unique ID of the panel. + type: string + panelRefName: + type: string + title: + description: The title of the panel + type: string + type: + description: The embeddable type + type: string + version: + deprecated: true + description: The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type). + type: string + required: + - panelConfig + - type + - gridData + type: array + refreshInterval: + additionalProperties: false + description: A container for various refresh interval settings + type: object + properties: + display: + deprecated: true + description: A human-readable string indicating the refresh frequency. No longer used. + type: string + pause: + description: Whether the refresh interval is set to be paused while viewing the dashboard. + type: boolean + section: + deprecated: true + description: No longer used. + type: number + value: + description: A numeric value indicating refresh frequency in milliseconds. + type: number + required: + - pause + - value + timeFrom: + description: An ISO string indicating when to restore time from + type: string + timeRestore: + default: false + description: Whether to restore time upon viewing this dashboard + type: boolean + timeTo: + description: An ISO string indicating when to restore time from + type: string + title: + description: A human-readable title for the dashboard + type: string + version: + deprecated: true + type: number + required: + - title + - options + references: + items: + additionalProperties: false + type: object + properties: + id: + type: string + name: + type: string + type: + type: string + required: + - name + - type + - id + type: array + spaces: + items: + type: string + type: array + required: + - attributes + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + item: + additionalProperties: true + type: object + properties: + attributes: + additionalProperties: false + type: object + properties: + controlGroupInput: + additionalProperties: false + type: object + properties: + autoApplySelections: + default: true + description: Show apply selections button in controls. + type: boolean + chainingSystem: + default: HIERARCHICAL + description: The chaining strategy for multiple controls. For example, "HIERARCHICAL" or "NONE". + enum: + - NONE + - HIERARCHICAL + type: string + controls: + default: [] + description: An array of control panels and their state in the control group. + items: + additionalProperties: true + type: object + properties: + controlConfig: + additionalProperties: {} + type: object + grow: + default: false + description: Expand width of the control panel to fit available space. + type: boolean + id: + description: The unique ID of the control. + type: string + order: + description: The order of the control panel in the control group. + type: number + type: + description: The type of the control panel. + type: string + width: + default: medium + description: Minimum width of the control panel in the control group. + enum: + - small + - medium + - large + type: string + required: + - type + - order + type: array + enhancements: + additionalProperties: {} + type: object + ignoreParentSettings: + additionalProperties: false + type: object + properties: + ignoreFilters: + default: false + description: Ignore global filters in controls. + type: boolean + ignoreQuery: + default: false + description: Ignore the global query bar in controls. + type: boolean + ignoreTimerange: + default: false + description: Ignore the global time range in controls. + type: boolean + ignoreValidations: + default: false + description: Ignore validations in controls. + type: boolean + labelPosition: + default: oneLine + description: Position of the labels for controls. For example, "oneLine", "twoLine". + enum: + - oneLine + - twoLine + type: string + required: + - ignoreParentSettings + description: + default: '' + description: A short description. + type: string + kibanaSavedObjectMeta: + additionalProperties: false + default: {} + description: A container for various metadata + type: object + properties: + searchSource: + additionalProperties: true + type: object + properties: + filter: + items: + additionalProperties: false + description: A filter for the search source. + type: object + properties: + $state: + additionalProperties: false + type: object + properties: + store: + description: Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState'). + enum: + - appState + - globalState + type: string + required: + - store + meta: + additionalProperties: true + type: object + properties: + alias: + nullable: true + type: string + controlledBy: + type: string + disabled: + type: boolean + field: + type: string + group: + type: string + index: + type: string + isMultiIndex: + type: boolean + key: + type: string + negate: + type: boolean + params: {} + type: + type: string + value: + type: string + required: + - params + query: + additionalProperties: {} + type: object + required: + - meta + type: array + query: + additionalProperties: false + type: object + properties: + language: + description: The query language such as KQL or Lucene. + type: string + query: + anyOf: + - description: A text-based query such as Kibana Query Language (KQL) or Lucene query language. + type: string + - additionalProperties: {} + type: object + required: + - query + - language + sort: + items: + additionalProperties: + anyOf: + - enum: + - asc + - desc + type: string + - additionalProperties: false + type: object + properties: + format: + type: string + order: + enum: + - asc + - desc + type: string + required: + - order + - additionalProperties: false + type: object + properties: + numeric_type: + enum: + - double + - long + - date + - date_nanos + type: string + order: + enum: + - asc + - desc + type: string + required: + - order + type: object + type: array + type: + type: string + options: + additionalProperties: false + type: object + properties: + hidePanelTitles: + default: false + description: Hide the panel titles in the dashboard. + type: boolean + syncColors: + default: true + description: Synchronize colors between related panels in the dashboard. + type: boolean + syncCursor: + default: true + description: Synchronize cursor position between related panels in the dashboard. + type: boolean + syncTooltips: + default: true + description: Synchronize tooltips between related panels in the dashboard. + type: boolean + useMargins: + default: true + description: Show margins between panels in the dashboard layout. + type: boolean + panels: + default: [] + items: + additionalProperties: false + type: object + properties: + gridData: + additionalProperties: false + type: object + properties: + h: + default: 15 + description: The height of the panel in grid units + minimum: 1 + type: number + i: + type: string + w: + default: 24 + description: The width of the panel in grid units + maximum: 48 + minimum: 1 + type: number + x: + description: The x coordinate of the panel in grid units + type: number + 'y': + description: The y coordinate of the panel in grid units + type: number + required: + - x + - 'y' + - i + id: + description: The saved object id for by reference panels + type: string + panelConfig: + additionalProperties: true + type: object + properties: + description: + description: The description of the panel + type: string + enhancements: + additionalProperties: {} + type: object + hidePanelTitles: + description: Set to true to hide the panel title in its container. + type: boolean + savedObjectId: + description: The unique id of the library item to construct the embeddable. + type: string + title: + description: The title of the panel + type: string + version: + description: The version of the embeddable in the panel. + type: string + panelIndex: + type: string + panelRefName: + type: string + title: + description: The title of the panel + type: string + type: + description: The embeddable type + type: string + version: + deprecated: true + description: The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type). + type: string + required: + - panelConfig + - type + - gridData + - panelIndex + type: array + refreshInterval: + additionalProperties: false + description: A container for various refresh interval settings + type: object + properties: + display: + deprecated: true + description: A human-readable string indicating the refresh frequency. No longer used. + type: string + pause: + description: Whether the refresh interval is set to be paused while viewing the dashboard. + type: boolean + section: + deprecated: true + description: No longer used. + type: number + value: + description: A numeric value indicating refresh frequency in milliseconds. + type: number + required: + - pause + - value + timeFrom: + description: An ISO string indicating when to restore time from + type: string + timeRestore: + default: false + description: Whether to restore time upon viewing this dashboard + type: boolean + timeTo: + description: An ISO string indicating when to restore time from + type: string + title: + description: A human-readable title for the dashboard + type: string + version: + deprecated: true + type: number + required: + - title + - options + createdAt: + type: string + createdBy: + type: string + error: + additionalProperties: false + type: object + properties: + error: + type: string + message: + type: string + metadata: + additionalProperties: true + type: object + properties: {} + statusCode: + type: number + required: + - error + - message + - statusCode + id: + type: string + managed: + type: boolean + namespaces: + items: + type: string + type: array + originId: + type: string + references: + items: + additionalProperties: false + type: object + properties: + id: + type: string + name: + type: string + type: + type: string + required: + - name + - type + - id + type: array + type: + type: string + updatedAt: + type: string + updatedBy: + type: string + version: + type: string + required: + - id + - type + - attributes + - references + required: + - item + summary: Create a dashboard + tags: + - Dashboards + x-state: Technical Preview + x-beta: true + put: + description: This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. + operationId: put-dashboards-dashboard-id + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: A unique identifier for the dashboard. + in: path + name: id + required: true + schema: + type: string + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + attributes: + additionalProperties: false + type: object + properties: + controlGroupInput: + additionalProperties: false + type: object + properties: + autoApplySelections: + default: true + description: Show apply selections button in controls. + type: boolean + chainingSystem: + default: HIERARCHICAL + description: The chaining strategy for multiple controls. For example, "HIERARCHICAL" or "NONE". + enum: + - NONE + - HIERARCHICAL + type: string + controls: + default: [] + description: An array of control panels and their state in the control group. + items: + additionalProperties: true + type: object + properties: + controlConfig: + additionalProperties: {} + type: object + grow: + default: false + description: Expand width of the control panel to fit available space. + type: boolean + id: + description: The unique ID of the control. + type: string + order: + description: The order of the control panel in the control group. + type: number + type: + description: The type of the control panel. + type: string + width: + default: medium + description: Minimum width of the control panel in the control group. + enum: + - small + - medium + - large + type: string + required: + - type + - order + type: array + enhancements: + additionalProperties: {} + type: object + ignoreParentSettings: + additionalProperties: false + type: object + properties: + ignoreFilters: + default: false + description: Ignore global filters in controls. + type: boolean + ignoreQuery: + default: false + description: Ignore the global query bar in controls. + type: boolean + ignoreTimerange: + default: false + description: Ignore the global time range in controls. + type: boolean + ignoreValidations: + default: false + description: Ignore validations in controls. + type: boolean + labelPosition: + default: oneLine + description: Position of the labels for controls. For example, "oneLine", "twoLine". + enum: + - oneLine + - twoLine + type: string + required: + - ignoreParentSettings + description: + default: '' + description: A short description. + type: string + kibanaSavedObjectMeta: + additionalProperties: false + default: {} + description: A container for various metadata + type: object + properties: + searchSource: + additionalProperties: true + type: object + properties: + filter: + items: + additionalProperties: false + description: A filter for the search source. + type: object + properties: + $state: + additionalProperties: false + type: object + properties: + store: + description: Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState'). + enum: + - appState + - globalState + type: string + required: + - store + meta: + additionalProperties: true + type: object + properties: + alias: + nullable: true + type: string + controlledBy: + type: string + disabled: + type: boolean + field: + type: string + group: + type: string + index: + type: string + isMultiIndex: + type: boolean + key: + type: string + negate: + type: boolean + params: {} + type: + type: string + value: + type: string + required: + - params + query: + additionalProperties: {} + type: object + required: + - meta + type: array + query: + additionalProperties: false + type: object + properties: + language: + description: The query language such as KQL or Lucene. + type: string + query: + anyOf: + - description: A text-based query such as Kibana Query Language (KQL) or Lucene query language. + type: string + - additionalProperties: {} + type: object + required: + - query + - language + sort: + items: + additionalProperties: + anyOf: + - enum: + - asc + - desc + type: string + - additionalProperties: false + type: object + properties: + format: + type: string + order: + enum: + - asc + - desc + type: string + required: + - order + - additionalProperties: false + type: object + properties: + numeric_type: + enum: + - double + - long + - date + - date_nanos + type: string + order: + enum: + - asc + - desc + type: string + required: + - order + type: object + type: array + type: + type: string + options: + additionalProperties: false + type: object + properties: + hidePanelTitles: + default: false + description: Hide the panel titles in the dashboard. + type: boolean + syncColors: + default: true + description: Synchronize colors between related panels in the dashboard. + type: boolean + syncCursor: + default: true + description: Synchronize cursor position between related panels in the dashboard. + type: boolean + syncTooltips: + default: true + description: Synchronize tooltips between related panels in the dashboard. + type: boolean + useMargins: + default: true + description: Show margins between panels in the dashboard layout. + type: boolean + panels: + default: [] + items: + additionalProperties: false + type: object + properties: + gridData: + additionalProperties: false + type: object + properties: + h: + default: 15 + description: The height of the panel in grid units + minimum: 1 + type: number + i: + description: The unique identifier of the panel + type: string + w: + default: 24 + description: The width of the panel in grid units + maximum: 48 + minimum: 1 + type: number + x: + description: The x coordinate of the panel in grid units + type: number + 'y': + description: The y coordinate of the panel in grid units + type: number + required: + - x + - 'y' + id: + description: The saved object id for by reference panels + type: string + panelConfig: + additionalProperties: true + type: object + properties: + description: + description: The description of the panel + type: string + enhancements: + additionalProperties: {} + type: object + hidePanelTitles: + description: Set to true to hide the panel title in its container. + type: boolean + savedObjectId: + description: The unique id of the library item to construct the embeddable. + type: string + title: + description: The title of the panel + type: string + version: + description: The version of the embeddable in the panel. + type: string + panelIndex: + description: The unique ID of the panel. + type: string + panelRefName: + type: string + title: + description: The title of the panel + type: string + type: + description: The embeddable type + type: string + version: + deprecated: true + description: The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type). + type: string + required: + - panelConfig + - type + - gridData + type: array + refreshInterval: + additionalProperties: false + description: A container for various refresh interval settings + type: object + properties: + display: + deprecated: true + description: A human-readable string indicating the refresh frequency. No longer used. + type: string + pause: + description: Whether the refresh interval is set to be paused while viewing the dashboard. + type: boolean + section: + deprecated: true + description: No longer used. + type: number + value: + description: A numeric value indicating refresh frequency in milliseconds. + type: number + required: + - pause + - value + timeFrom: + description: An ISO string indicating when to restore time from + type: string + timeRestore: + default: false + description: Whether to restore time upon viewing this dashboard + type: boolean + timeTo: + description: An ISO string indicating when to restore time from + type: string + title: + description: A human-readable title for the dashboard + type: string + version: + deprecated: true + type: number + required: + - title + - options + references: + items: + additionalProperties: false + type: object + properties: + id: + type: string + name: + type: string + type: + type: string + required: + - name + - type + - id + type: array + required: + - attributes + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + item: + additionalProperties: true + type: object + properties: + attributes: + additionalProperties: false + type: object + properties: + controlGroupInput: + additionalProperties: false + type: object + properties: + autoApplySelections: + default: true + description: Show apply selections button in controls. + type: boolean + chainingSystem: + default: HIERARCHICAL + description: The chaining strategy for multiple controls. For example, "HIERARCHICAL" or "NONE". + enum: + - NONE + - HIERARCHICAL + type: string + controls: + default: [] + description: An array of control panels and their state in the control group. + items: + additionalProperties: true + type: object + properties: + controlConfig: + additionalProperties: {} + type: object + grow: + default: false + description: Expand width of the control panel to fit available space. + type: boolean + id: + description: The unique ID of the control. + type: string + order: + description: The order of the control panel in the control group. + type: number + type: + description: The type of the control panel. + type: string + width: + default: medium + description: Minimum width of the control panel in the control group. + enum: + - small + - medium + - large + type: string + required: + - type + - order + type: array + enhancements: + additionalProperties: {} + type: object + ignoreParentSettings: + additionalProperties: false + type: object + properties: + ignoreFilters: + default: false + description: Ignore global filters in controls. + type: boolean + ignoreQuery: + default: false + description: Ignore the global query bar in controls. + type: boolean + ignoreTimerange: + default: false + description: Ignore the global time range in controls. + type: boolean + ignoreValidations: + default: false + description: Ignore validations in controls. + type: boolean + labelPosition: + default: oneLine + description: Position of the labels for controls. For example, "oneLine", "twoLine". + enum: + - oneLine + - twoLine + type: string + required: + - ignoreParentSettings + description: + default: '' + description: A short description. + type: string + kibanaSavedObjectMeta: + additionalProperties: false + default: {} + description: A container for various metadata + type: object + properties: + searchSource: + additionalProperties: true + type: object + properties: + filter: + items: + additionalProperties: false + description: A filter for the search source. + type: object + properties: + $state: + additionalProperties: false + type: object + properties: + store: + description: Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState'). + enum: + - appState + - globalState + type: string + required: + - store + meta: + additionalProperties: true + type: object + properties: + alias: + nullable: true + type: string + controlledBy: + type: string + disabled: + type: boolean + field: + type: string + group: + type: string + index: + type: string + isMultiIndex: + type: boolean + key: + type: string + negate: + type: boolean + params: {} + type: + type: string + value: + type: string + required: + - params + query: + additionalProperties: {} + type: object + required: + - meta + type: array + query: + additionalProperties: false + type: object + properties: + language: + description: The query language such as KQL or Lucene. + type: string + query: + anyOf: + - description: A text-based query such as Kibana Query Language (KQL) or Lucene query language. + type: string + - additionalProperties: {} + type: object + required: + - query + - language + sort: + items: + additionalProperties: + anyOf: + - enum: + - asc + - desc + type: string + - additionalProperties: false + type: object + properties: + format: + type: string + order: + enum: + - asc + - desc + type: string + required: + - order + - additionalProperties: false + type: object + properties: + numeric_type: + enum: + - double + - long + - date + - date_nanos + type: string + order: + enum: + - asc + - desc + type: string + required: + - order + type: object + type: array + type: + type: string + options: + additionalProperties: false + type: object + properties: + hidePanelTitles: + default: false + description: Hide the panel titles in the dashboard. + type: boolean + syncColors: + default: true + description: Synchronize colors between related panels in the dashboard. + type: boolean + syncCursor: + default: true + description: Synchronize cursor position between related panels in the dashboard. + type: boolean + syncTooltips: + default: true + description: Synchronize tooltips between related panels in the dashboard. + type: boolean + useMargins: + default: true + description: Show margins between panels in the dashboard layout. + type: boolean + panels: + default: [] + items: + additionalProperties: false + type: object + properties: + gridData: + additionalProperties: false + type: object + properties: + h: + default: 15 + description: The height of the panel in grid units + minimum: 1 + type: number + i: + type: string + w: + default: 24 + description: The width of the panel in grid units + maximum: 48 + minimum: 1 + type: number + x: + description: The x coordinate of the panel in grid units + type: number + 'y': + description: The y coordinate of the panel in grid units + type: number + required: + - x + - 'y' + - i + id: + description: The saved object id for by reference panels + type: string + panelConfig: + additionalProperties: true + type: object + properties: + description: + description: The description of the panel + type: string + enhancements: + additionalProperties: {} + type: object + hidePanelTitles: + description: Set to true to hide the panel title in its container. + type: boolean + savedObjectId: + description: The unique id of the library item to construct the embeddable. + type: string + title: + description: The title of the panel + type: string + version: + description: The version of the embeddable in the panel. + type: string + panelIndex: + type: string + panelRefName: + type: string + title: + description: The title of the panel + type: string + type: + description: The embeddable type + type: string + version: + deprecated: true + description: The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type). + type: string + required: + - panelConfig + - type + - gridData + - panelIndex + type: array + refreshInterval: + additionalProperties: false + description: A container for various refresh interval settings + type: object + properties: + display: + deprecated: true + description: A human-readable string indicating the refresh frequency. No longer used. + type: string + pause: + description: Whether the refresh interval is set to be paused while viewing the dashboard. + type: boolean + section: + deprecated: true + description: No longer used. + type: number + value: + description: A numeric value indicating refresh frequency in milliseconds. + type: number + required: + - pause + - value + timeFrom: + description: An ISO string indicating when to restore time from + type: string + timeRestore: + default: false + description: Whether to restore time upon viewing this dashboard + type: boolean + timeTo: + description: An ISO string indicating when to restore time from + type: string + title: + description: A human-readable title for the dashboard + type: string + version: + deprecated: true + type: number + required: + - title + - options + createdAt: + type: string + createdBy: + type: string + error: + additionalProperties: false + type: object + properties: + error: + type: string + message: + type: string + metadata: + additionalProperties: true + type: object + properties: {} + statusCode: + type: number + required: + - error + - message + - statusCode + id: + type: string + managed: + type: boolean + namespaces: + items: + type: string + type: array + originId: + type: string + references: + items: + additionalProperties: false + type: object + properties: + id: + type: string + name: + type: string + type: + type: string + required: + - name + - type + - id + type: array + type: + type: string + updatedAt: + type: string + updatedBy: + type: string + version: + type: string + required: + - id + - type + - attributes + - references + required: + - item + summary: Update an existing dashboard + tags: + - Dashboards + x-state: Technical Preview + x-beta: true /api/data_views: get: operationId: getAllDataViewsDefault @@ -9628,8 +11944,6 @@ paths: maximum: 65353 minimum: 0 type: number - required: - - enabled monitoring_output_id: nullable: true type: string @@ -10160,8 +12474,6 @@ paths: maximum: 65353 minimum: 0 type: number - required: - - enabled monitoring_output_id: nullable: true type: string @@ -10342,8 +12654,6 @@ paths: maximum: 65353 minimum: 0 type: number - required: - - enabled monitoring_output_id: nullable: true type: string @@ -10896,8 +13206,6 @@ paths: maximum: 65353 minimum: 0 type: number - required: - - enabled monitoring_output_id: nullable: true type: string @@ -11430,8 +13738,6 @@ paths: maximum: 65353 minimum: 0 type: number - required: - - enabled monitoring_output_id: nullable: true type: string @@ -11961,8 +14267,6 @@ paths: maximum: 65353 minimum: 0 type: number - required: - - enabled monitoring_output_id: nullable: true type: string @@ -12143,8 +14447,6 @@ paths: maximum: 65353 minimum: 0 type: number - required: - - enabled monitoring_output_id: nullable: true type: string @@ -12697,8 +14999,6 @@ paths: maximum: 65353 minimum: 0 type: number - required: - - enabled monitoring_output_id: nullable: true type: string @@ -14248,6 +16548,7 @@ paths: type: array upgrade_details: additionalProperties: false + nullable: true type: object properties: action_id: @@ -14715,350 +17016,352 @@ paths: type: array upgrade_details: additionalProperties: false - type: object - properties: - action_id: - type: string - metadata: - additionalProperties: false - type: object - properties: - download_percent: - type: number - download_rate: - type: number - error_msg: - type: string - failed_state: - enum: - - UPG_REQUESTED - - UPG_SCHEDULED - - UPG_DOWNLOADING - - UPG_EXTRACTING - - UPG_REPLACING - - UPG_RESTARTING - - UPG_FAILED - - UPG_WATCHING - - UPG_ROLLBACK - type: string - retry_error_msg: - type: string - retry_until: - type: string - scheduled_at: - type: string - state: - enum: - - UPG_REQUESTED - - UPG_SCHEDULED - - UPG_DOWNLOADING - - UPG_EXTRACTING - - UPG_REPLACING - - UPG_RESTARTING - - UPG_FAILED - - UPG_WATCHING - - UPG_ROLLBACK - type: string - target_version: - type: string - required: - - target_version - - action_id - - state - upgrade_started_at: - nullable: true - type: string - upgraded_at: - nullable: true - type: string - user_provided_metadata: - additionalProperties: {} - type: object - required: - - id - - packages - - type - - active - - enrolled_at - - local_metadata - required: - - item - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - required: - - message - summary: Get an agent - tags: - - Elastic Agents - x-beta: true - put: - description: Update an agent by ID. - operationId: put-fleet-agents-agentid - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: path - name: agentId - required: true - schema: - type: string - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - tags: - items: - type: string - type: array - user_provided_metadata: - additionalProperties: {} - type: object - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - access_api_key: - type: string - access_api_key_id: - type: string - active: - type: boolean - agent: - additionalProperties: true - type: object - properties: - id: - type: string - version: - type: string - required: - - id - - version - components: - items: - additionalProperties: false - type: object - properties: - id: - type: string - message: - type: string - status: - enum: - - STARTING - - CONFIGURING - - HEALTHY - - DEGRADED - - FAILED - - STOPPING - - STOPPED - type: string - type: - type: string - units: - items: - additionalProperties: false - type: object - properties: - id: - type: string - message: - type: string - payload: - additionalProperties: {} - type: object - status: - enum: - - STARTING - - CONFIGURING - - HEALTHY - - DEGRADED - - FAILED - - STOPPING - - STOPPED - type: string - type: - enum: - - input - - output - type: string - required: - - id - - type - - status - - message - type: array - required: - - id - - type - - status - - message - type: array - default_api_key: - type: string - default_api_key_history: - items: - additionalProperties: false - deprecated: true - type: object - properties: - id: - type: string - retired_at: - type: string - required: - - id - - retired_at - type: array - default_api_key_id: - type: string - enrolled_at: - type: string - id: - type: string - last_checkin: - type: string - last_checkin_message: - type: string - last_checkin_status: - enum: - - error - - online - - degraded - - updating - - starting - type: string - local_metadata: - additionalProperties: {} - type: object - metrics: - additionalProperties: false - type: object - properties: - cpu_avg: - type: number - memory_size_byte_avg: - type: number - namespaces: - items: - type: string - type: array - outputs: - additionalProperties: - additionalProperties: false - type: object - properties: - api_key_id: - type: string - to_retire_api_key_ids: - items: - additionalProperties: false - type: object - properties: - id: - type: string - retired_at: - type: string - required: - - id - - retired_at - type: array - type: - type: string - required: - - api_key_id - - type - type: object - packages: - items: - type: string - type: array - policy_id: - type: string - policy_revision: - nullable: true - type: number - sort: - items: - anyOf: - - type: number - - type: string - - enum: [] - nullable: true - type: array - status: - enum: - - offline - - error - - online - - inactive - - enrolling - - unenrolling - - unenrolled - - updating - - degraded - type: string - tags: - items: - type: string - type: array - type: - enum: - - PERMANENT - - EPHEMERAL - - TEMPORARY - type: string - unenrolled_at: - type: string - unenrollment_started_at: - type: string - unhealthy_reason: - items: - enum: - - input - - output - - other - type: string nullable: true - type: array - upgrade_details: - additionalProperties: false + type: object + properties: + action_id: + type: string + metadata: + additionalProperties: false + type: object + properties: + download_percent: + type: number + download_rate: + type: number + error_msg: + type: string + failed_state: + enum: + - UPG_REQUESTED + - UPG_SCHEDULED + - UPG_DOWNLOADING + - UPG_EXTRACTING + - UPG_REPLACING + - UPG_RESTARTING + - UPG_FAILED + - UPG_WATCHING + - UPG_ROLLBACK + type: string + retry_error_msg: + type: string + retry_until: + type: string + scheduled_at: + type: string + state: + enum: + - UPG_REQUESTED + - UPG_SCHEDULED + - UPG_DOWNLOADING + - UPG_EXTRACTING + - UPG_REPLACING + - UPG_RESTARTING + - UPG_FAILED + - UPG_WATCHING + - UPG_ROLLBACK + type: string + target_version: + type: string + required: + - target_version + - action_id + - state + upgrade_started_at: + nullable: true + type: string + upgraded_at: + nullable: true + type: string + user_provided_metadata: + additionalProperties: {} + type: object + required: + - id + - packages + - type + - active + - enrolled_at + - local_metadata + required: + - item + '400': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + error: + type: string + message: + type: string + statusCode: + type: number + required: + - message + summary: Get an agent + tags: + - Elastic Agents + x-beta: true + put: + description: Update an agent by ID. + operationId: put-fleet-agents-agentid + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - in: path + name: agentId + required: true + schema: + type: string + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + tags: + items: + type: string + type: array + user_provided_metadata: + additionalProperties: {} + type: object + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + item: + additionalProperties: false + type: object + properties: + access_api_key: + type: string + access_api_key_id: + type: string + active: + type: boolean + agent: + additionalProperties: true + type: object + properties: + id: + type: string + version: + type: string + required: + - id + - version + components: + items: + additionalProperties: false + type: object + properties: + id: + type: string + message: + type: string + status: + enum: + - STARTING + - CONFIGURING + - HEALTHY + - DEGRADED + - FAILED + - STOPPING + - STOPPED + type: string + type: + type: string + units: + items: + additionalProperties: false + type: object + properties: + id: + type: string + message: + type: string + payload: + additionalProperties: {} + type: object + status: + enum: + - STARTING + - CONFIGURING + - HEALTHY + - DEGRADED + - FAILED + - STOPPING + - STOPPED + type: string + type: + enum: + - input + - output + type: string + required: + - id + - type + - status + - message + type: array + required: + - id + - type + - status + - message + type: array + default_api_key: + type: string + default_api_key_history: + items: + additionalProperties: false + deprecated: true + type: object + properties: + id: + type: string + retired_at: + type: string + required: + - id + - retired_at + type: array + default_api_key_id: + type: string + enrolled_at: + type: string + id: + type: string + last_checkin: + type: string + last_checkin_message: + type: string + last_checkin_status: + enum: + - error + - online + - degraded + - updating + - starting + type: string + local_metadata: + additionalProperties: {} + type: object + metrics: + additionalProperties: false + type: object + properties: + cpu_avg: + type: number + memory_size_byte_avg: + type: number + namespaces: + items: + type: string + type: array + outputs: + additionalProperties: + additionalProperties: false + type: object + properties: + api_key_id: + type: string + to_retire_api_key_ids: + items: + additionalProperties: false + type: object + properties: + id: + type: string + retired_at: + type: string + required: + - id + - retired_at + type: array + type: + type: string + required: + - api_key_id + - type + type: object + packages: + items: + type: string + type: array + policy_id: + type: string + policy_revision: + nullable: true + type: number + sort: + items: + anyOf: + - type: number + - type: string + - enum: [] + nullable: true + type: array + status: + enum: + - offline + - error + - online + - inactive + - enrolling + - unenrolling + - unenrolled + - updating + - degraded + type: string + tags: + items: + type: string + type: array + type: + enum: + - PERMANENT + - EPHEMERAL + - TEMPORARY + type: string + unenrolled_at: + type: string + unenrollment_started_at: + type: string + unhealthy_reason: + items: + enum: + - input + - output + - other + type: string + nullable: true + type: array + upgrade_details: + additionalProperties: false + nullable: true type: object properties: action_id: @@ -34488,8 +36791,6 @@ paths: schema: $ref: '#/components/schemas/SLOs_409_response' description: Conflict - The SLO id already exists - servers: - - url: https://localhost:5601 summary: Create an SLO tags: - slo @@ -34529,8 +36830,6 @@ paths: schema: $ref: '#/components/schemas/SLOs_403_response' description: Unauthorized response - servers: - - url: https://localhost:5601 summary: Batch delete rollup and summary data tags: - slo @@ -48667,19 +50966,23 @@ components: properties: frequency: default: 1m - description: Configure how often the transform runs, default 1m + description: The interval between checks for changes in the source data. The minimum value is 1m and the maximum is 59m. The default value is 1 minute. example: 5m type: string preventInitialBackfill: default: false - description: Prevents the transform from backfilling data when it starts. + description: Start aggregating data from the time the SLO is created, instead of backfilling data from the beginning of the time window. example: true type: boolean syncDelay: default: 1m - description: The synch delay to apply to the transform. Default 1m + description: The time delay in minutes between the current time and the latest source data time. Increasing the value will delay any alerting. The default value is 1 minute. The minimum value is 1m and the maximum is 359m. It should always be greater then source index refresh interval. example: 5m type: string + syncField: + description: The date field that is used to identify new documents in the source. It is strongly recommended to use a field that contains the ingest timestamp. If you use a different field, you might need to set the delay such that it accounts for data transmission delays. When unspecified, we use the indicator timestamp field. + example: event.ingested + type: string title: Settings type: object SLOs_slo_definition_response: diff --git a/oas_docs/output/kibana.yaml b/oas_docs/output/kibana.yaml index 745ddad433106..3c56597469133 100644 --- a/oas_docs/output/kibana.yaml +++ b/oas_docs/output/kibana.yaml @@ -85,6 +85,7 @@ tags: description: Connector documentation url: https://www.elastic.co/guide/en/kibana/current/action-types.html x-displayName: Connectors + - name: Dashboards - name: Data streams - description: Data view APIs enable you to manage data views, formerly known as Kibana index patterns. name: data views @@ -7465,6 +7466,2316 @@ paths: summary: Get case tags tags: - cases + /api/dashboards/dashboard: + get: + description: This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. + operationId: get-dashboards-dashboard + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: The page number to return. Default is "1". + in: query + name: page + required: false + schema: + default: 1 + minimum: 1 + type: number + - description: The number of dashboards to display on each page (max 1000). Default is "20". + in: query + name: perPage + required: false + schema: + maximum: 1000 + minimum: 1 + type: number + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + items: + items: + additionalProperties: true + type: object + properties: + attributes: + additionalProperties: false + type: object + properties: + description: + default: '' + description: A short description. + type: string + timeRestore: + default: false + description: Whether to restore time upon viewing this dashboard + type: boolean + title: + description: A human-readable title for the dashboard + type: string + required: + - title + createdAt: + type: string + createdBy: + type: string + error: + additionalProperties: false + type: object + properties: + error: + type: string + message: + type: string + metadata: + additionalProperties: true + type: object + properties: {} + statusCode: + type: number + required: + - error + - message + - statusCode + id: + type: string + managed: + type: boolean + namespaces: + items: + type: string + type: array + originId: + type: string + references: + items: + additionalProperties: false + type: object + properties: + id: + type: string + name: + type: string + type: + type: string + required: + - name + - type + - id + type: array + type: + type: string + updatedAt: + type: string + updatedBy: + type: string + version: + type: string + required: + - id + - type + - attributes + - references + type: array + total: + type: number + required: + - items + - total + summary: Get a list of dashboards + tags: + - Dashboards + x-state: Technical Preview + /api/dashboards/dashboard/{id}: + delete: + description: This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. + operationId: delete-dashboards-dashboard-id + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: A unique identifier for the dashboard. + in: path + name: id + required: true + schema: + type: string + responses: {} + summary: Delete a dashboard + tags: + - Dashboards + x-state: Technical Preview + get: + description: This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. + operationId: get-dashboards-dashboard-id + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: A unique identifier for the dashboard. + in: path + name: id + required: true + schema: + type: string + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + item: + additionalProperties: true + type: object + properties: + attributes: + additionalProperties: false + type: object + properties: + controlGroupInput: + additionalProperties: false + type: object + properties: + autoApplySelections: + default: true + description: Show apply selections button in controls. + type: boolean + chainingSystem: + default: HIERARCHICAL + description: The chaining strategy for multiple controls. For example, "HIERARCHICAL" or "NONE". + enum: + - NONE + - HIERARCHICAL + type: string + controls: + default: [] + description: An array of control panels and their state in the control group. + items: + additionalProperties: true + type: object + properties: + controlConfig: + additionalProperties: {} + type: object + grow: + default: false + description: Expand width of the control panel to fit available space. + type: boolean + id: + description: The unique ID of the control. + type: string + order: + description: The order of the control panel in the control group. + type: number + type: + description: The type of the control panel. + type: string + width: + default: medium + description: Minimum width of the control panel in the control group. + enum: + - small + - medium + - large + type: string + required: + - type + - order + type: array + enhancements: + additionalProperties: {} + type: object + ignoreParentSettings: + additionalProperties: false + type: object + properties: + ignoreFilters: + default: false + description: Ignore global filters in controls. + type: boolean + ignoreQuery: + default: false + description: Ignore the global query bar in controls. + type: boolean + ignoreTimerange: + default: false + description: Ignore the global time range in controls. + type: boolean + ignoreValidations: + default: false + description: Ignore validations in controls. + type: boolean + labelPosition: + default: oneLine + description: Position of the labels for controls. For example, "oneLine", "twoLine". + enum: + - oneLine + - twoLine + type: string + required: + - ignoreParentSettings + description: + default: '' + description: A short description. + type: string + kibanaSavedObjectMeta: + additionalProperties: false + default: {} + description: A container for various metadata + type: object + properties: + searchSource: + additionalProperties: true + type: object + properties: + filter: + items: + additionalProperties: false + description: A filter for the search source. + type: object + properties: + $state: + additionalProperties: false + type: object + properties: + store: + description: Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState'). + enum: + - appState + - globalState + type: string + required: + - store + meta: + additionalProperties: true + type: object + properties: + alias: + nullable: true + type: string + controlledBy: + type: string + disabled: + type: boolean + field: + type: string + group: + type: string + index: + type: string + isMultiIndex: + type: boolean + key: + type: string + negate: + type: boolean + params: {} + type: + type: string + value: + type: string + required: + - params + query: + additionalProperties: {} + type: object + required: + - meta + type: array + query: + additionalProperties: false + type: object + properties: + language: + description: The query language such as KQL or Lucene. + type: string + query: + anyOf: + - description: A text-based query such as Kibana Query Language (KQL) or Lucene query language. + type: string + - additionalProperties: {} + type: object + required: + - query + - language + sort: + items: + additionalProperties: + anyOf: + - enum: + - asc + - desc + type: string + - additionalProperties: false + type: object + properties: + format: + type: string + order: + enum: + - asc + - desc + type: string + required: + - order + - additionalProperties: false + type: object + properties: + numeric_type: + enum: + - double + - long + - date + - date_nanos + type: string + order: + enum: + - asc + - desc + type: string + required: + - order + type: object + type: array + type: + type: string + options: + additionalProperties: false + type: object + properties: + hidePanelTitles: + default: false + description: Hide the panel titles in the dashboard. + type: boolean + syncColors: + default: true + description: Synchronize colors between related panels in the dashboard. + type: boolean + syncCursor: + default: true + description: Synchronize cursor position between related panels in the dashboard. + type: boolean + syncTooltips: + default: true + description: Synchronize tooltips between related panels in the dashboard. + type: boolean + useMargins: + default: true + description: Show margins between panels in the dashboard layout. + type: boolean + panels: + default: [] + items: + additionalProperties: false + type: object + properties: + gridData: + additionalProperties: false + type: object + properties: + h: + default: 15 + description: The height of the panel in grid units + minimum: 1 + type: number + i: + type: string + w: + default: 24 + description: The width of the panel in grid units + maximum: 48 + minimum: 1 + type: number + x: + description: The x coordinate of the panel in grid units + type: number + 'y': + description: The y coordinate of the panel in grid units + type: number + required: + - x + - 'y' + - i + id: + description: The saved object id for by reference panels + type: string + panelConfig: + additionalProperties: true + type: object + properties: + description: + description: The description of the panel + type: string + enhancements: + additionalProperties: {} + type: object + hidePanelTitles: + description: Set to true to hide the panel title in its container. + type: boolean + savedObjectId: + description: The unique id of the library item to construct the embeddable. + type: string + title: + description: The title of the panel + type: string + version: + description: The version of the embeddable in the panel. + type: string + panelIndex: + type: string + panelRefName: + type: string + title: + description: The title of the panel + type: string + type: + description: The embeddable type + type: string + version: + deprecated: true + description: The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type). + type: string + required: + - panelConfig + - type + - gridData + - panelIndex + type: array + refreshInterval: + additionalProperties: false + description: A container for various refresh interval settings + type: object + properties: + display: + deprecated: true + description: A human-readable string indicating the refresh frequency. No longer used. + type: string + pause: + description: Whether the refresh interval is set to be paused while viewing the dashboard. + type: boolean + section: + deprecated: true + description: No longer used. + type: number + value: + description: A numeric value indicating refresh frequency in milliseconds. + type: number + required: + - pause + - value + timeFrom: + description: An ISO string indicating when to restore time from + type: string + timeRestore: + default: false + description: Whether to restore time upon viewing this dashboard + type: boolean + timeTo: + description: An ISO string indicating when to restore time from + type: string + title: + description: A human-readable title for the dashboard + type: string + version: + deprecated: true + type: number + required: + - title + - options + createdAt: + type: string + createdBy: + type: string + error: + additionalProperties: false + type: object + properties: + error: + type: string + message: + type: string + metadata: + additionalProperties: true + type: object + properties: {} + statusCode: + type: number + required: + - error + - message + - statusCode + id: + type: string + managed: + type: boolean + namespaces: + items: + type: string + type: array + originId: + type: string + references: + items: + additionalProperties: false + type: object + properties: + id: + type: string + name: + type: string + type: + type: string + required: + - name + - type + - id + type: array + type: + type: string + updatedAt: + type: string + updatedBy: + type: string + version: + type: string + required: + - id + - type + - attributes + - references + meta: + additionalProperties: false + type: object + properties: + aliasPurpose: + enum: + - savedObjectConversion + - savedObjectImport + type: string + aliasTargetId: + type: string + outcome: + enum: + - exactMatch + - aliasMatch + - conflict + type: string + required: + - outcome + required: + - item + - meta + summary: Get a dashboard + tags: + - Dashboards + x-state: Technical Preview + post: + description: This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. + operationId: post-dashboards-dashboard-id + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: A unique identifier for the dashboard. + in: path + name: id + required: false + schema: + type: string + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + attributes: + additionalProperties: false + type: object + properties: + controlGroupInput: + additionalProperties: false + type: object + properties: + autoApplySelections: + default: true + description: Show apply selections button in controls. + type: boolean + chainingSystem: + default: HIERARCHICAL + description: The chaining strategy for multiple controls. For example, "HIERARCHICAL" or "NONE". + enum: + - NONE + - HIERARCHICAL + type: string + controls: + default: [] + description: An array of control panels and their state in the control group. + items: + additionalProperties: true + type: object + properties: + controlConfig: + additionalProperties: {} + type: object + grow: + default: false + description: Expand width of the control panel to fit available space. + type: boolean + id: + description: The unique ID of the control. + type: string + order: + description: The order of the control panel in the control group. + type: number + type: + description: The type of the control panel. + type: string + width: + default: medium + description: Minimum width of the control panel in the control group. + enum: + - small + - medium + - large + type: string + required: + - type + - order + type: array + enhancements: + additionalProperties: {} + type: object + ignoreParentSettings: + additionalProperties: false + type: object + properties: + ignoreFilters: + default: false + description: Ignore global filters in controls. + type: boolean + ignoreQuery: + default: false + description: Ignore the global query bar in controls. + type: boolean + ignoreTimerange: + default: false + description: Ignore the global time range in controls. + type: boolean + ignoreValidations: + default: false + description: Ignore validations in controls. + type: boolean + labelPosition: + default: oneLine + description: Position of the labels for controls. For example, "oneLine", "twoLine". + enum: + - oneLine + - twoLine + type: string + required: + - ignoreParentSettings + description: + default: '' + description: A short description. + type: string + kibanaSavedObjectMeta: + additionalProperties: false + default: {} + description: A container for various metadata + type: object + properties: + searchSource: + additionalProperties: true + type: object + properties: + filter: + items: + additionalProperties: false + description: A filter for the search source. + type: object + properties: + $state: + additionalProperties: false + type: object + properties: + store: + description: Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState'). + enum: + - appState + - globalState + type: string + required: + - store + meta: + additionalProperties: true + type: object + properties: + alias: + nullable: true + type: string + controlledBy: + type: string + disabled: + type: boolean + field: + type: string + group: + type: string + index: + type: string + isMultiIndex: + type: boolean + key: + type: string + negate: + type: boolean + params: {} + type: + type: string + value: + type: string + required: + - params + query: + additionalProperties: {} + type: object + required: + - meta + type: array + query: + additionalProperties: false + type: object + properties: + language: + description: The query language such as KQL or Lucene. + type: string + query: + anyOf: + - description: A text-based query such as Kibana Query Language (KQL) or Lucene query language. + type: string + - additionalProperties: {} + type: object + required: + - query + - language + sort: + items: + additionalProperties: + anyOf: + - enum: + - asc + - desc + type: string + - additionalProperties: false + type: object + properties: + format: + type: string + order: + enum: + - asc + - desc + type: string + required: + - order + - additionalProperties: false + type: object + properties: + numeric_type: + enum: + - double + - long + - date + - date_nanos + type: string + order: + enum: + - asc + - desc + type: string + required: + - order + type: object + type: array + type: + type: string + options: + additionalProperties: false + type: object + properties: + hidePanelTitles: + default: false + description: Hide the panel titles in the dashboard. + type: boolean + syncColors: + default: true + description: Synchronize colors between related panels in the dashboard. + type: boolean + syncCursor: + default: true + description: Synchronize cursor position between related panels in the dashboard. + type: boolean + syncTooltips: + default: true + description: Synchronize tooltips between related panels in the dashboard. + type: boolean + useMargins: + default: true + description: Show margins between panels in the dashboard layout. + type: boolean + panels: + default: [] + items: + additionalProperties: false + type: object + properties: + gridData: + additionalProperties: false + type: object + properties: + h: + default: 15 + description: The height of the panel in grid units + minimum: 1 + type: number + i: + description: The unique identifier of the panel + type: string + w: + default: 24 + description: The width of the panel in grid units + maximum: 48 + minimum: 1 + type: number + x: + description: The x coordinate of the panel in grid units + type: number + 'y': + description: The y coordinate of the panel in grid units + type: number + required: + - x + - 'y' + id: + description: The saved object id for by reference panels + type: string + panelConfig: + additionalProperties: true + type: object + properties: + description: + description: The description of the panel + type: string + enhancements: + additionalProperties: {} + type: object + hidePanelTitles: + description: Set to true to hide the panel title in its container. + type: boolean + savedObjectId: + description: The unique id of the library item to construct the embeddable. + type: string + title: + description: The title of the panel + type: string + version: + description: The version of the embeddable in the panel. + type: string + panelIndex: + description: The unique ID of the panel. + type: string + panelRefName: + type: string + title: + description: The title of the panel + type: string + type: + description: The embeddable type + type: string + version: + deprecated: true + description: The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type). + type: string + required: + - panelConfig + - type + - gridData + type: array + refreshInterval: + additionalProperties: false + description: A container for various refresh interval settings + type: object + properties: + display: + deprecated: true + description: A human-readable string indicating the refresh frequency. No longer used. + type: string + pause: + description: Whether the refresh interval is set to be paused while viewing the dashboard. + type: boolean + section: + deprecated: true + description: No longer used. + type: number + value: + description: A numeric value indicating refresh frequency in milliseconds. + type: number + required: + - pause + - value + timeFrom: + description: An ISO string indicating when to restore time from + type: string + timeRestore: + default: false + description: Whether to restore time upon viewing this dashboard + type: boolean + timeTo: + description: An ISO string indicating when to restore time from + type: string + title: + description: A human-readable title for the dashboard + type: string + version: + deprecated: true + type: number + required: + - title + - options + references: + items: + additionalProperties: false + type: object + properties: + id: + type: string + name: + type: string + type: + type: string + required: + - name + - type + - id + type: array + spaces: + items: + type: string + type: array + required: + - attributes + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + item: + additionalProperties: true + type: object + properties: + attributes: + additionalProperties: false + type: object + properties: + controlGroupInput: + additionalProperties: false + type: object + properties: + autoApplySelections: + default: true + description: Show apply selections button in controls. + type: boolean + chainingSystem: + default: HIERARCHICAL + description: The chaining strategy for multiple controls. For example, "HIERARCHICAL" or "NONE". + enum: + - NONE + - HIERARCHICAL + type: string + controls: + default: [] + description: An array of control panels and their state in the control group. + items: + additionalProperties: true + type: object + properties: + controlConfig: + additionalProperties: {} + type: object + grow: + default: false + description: Expand width of the control panel to fit available space. + type: boolean + id: + description: The unique ID of the control. + type: string + order: + description: The order of the control panel in the control group. + type: number + type: + description: The type of the control panel. + type: string + width: + default: medium + description: Minimum width of the control panel in the control group. + enum: + - small + - medium + - large + type: string + required: + - type + - order + type: array + enhancements: + additionalProperties: {} + type: object + ignoreParentSettings: + additionalProperties: false + type: object + properties: + ignoreFilters: + default: false + description: Ignore global filters in controls. + type: boolean + ignoreQuery: + default: false + description: Ignore the global query bar in controls. + type: boolean + ignoreTimerange: + default: false + description: Ignore the global time range in controls. + type: boolean + ignoreValidations: + default: false + description: Ignore validations in controls. + type: boolean + labelPosition: + default: oneLine + description: Position of the labels for controls. For example, "oneLine", "twoLine". + enum: + - oneLine + - twoLine + type: string + required: + - ignoreParentSettings + description: + default: '' + description: A short description. + type: string + kibanaSavedObjectMeta: + additionalProperties: false + default: {} + description: A container for various metadata + type: object + properties: + searchSource: + additionalProperties: true + type: object + properties: + filter: + items: + additionalProperties: false + description: A filter for the search source. + type: object + properties: + $state: + additionalProperties: false + type: object + properties: + store: + description: Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState'). + enum: + - appState + - globalState + type: string + required: + - store + meta: + additionalProperties: true + type: object + properties: + alias: + nullable: true + type: string + controlledBy: + type: string + disabled: + type: boolean + field: + type: string + group: + type: string + index: + type: string + isMultiIndex: + type: boolean + key: + type: string + negate: + type: boolean + params: {} + type: + type: string + value: + type: string + required: + - params + query: + additionalProperties: {} + type: object + required: + - meta + type: array + query: + additionalProperties: false + type: object + properties: + language: + description: The query language such as KQL or Lucene. + type: string + query: + anyOf: + - description: A text-based query such as Kibana Query Language (KQL) or Lucene query language. + type: string + - additionalProperties: {} + type: object + required: + - query + - language + sort: + items: + additionalProperties: + anyOf: + - enum: + - asc + - desc + type: string + - additionalProperties: false + type: object + properties: + format: + type: string + order: + enum: + - asc + - desc + type: string + required: + - order + - additionalProperties: false + type: object + properties: + numeric_type: + enum: + - double + - long + - date + - date_nanos + type: string + order: + enum: + - asc + - desc + type: string + required: + - order + type: object + type: array + type: + type: string + options: + additionalProperties: false + type: object + properties: + hidePanelTitles: + default: false + description: Hide the panel titles in the dashboard. + type: boolean + syncColors: + default: true + description: Synchronize colors between related panels in the dashboard. + type: boolean + syncCursor: + default: true + description: Synchronize cursor position between related panels in the dashboard. + type: boolean + syncTooltips: + default: true + description: Synchronize tooltips between related panels in the dashboard. + type: boolean + useMargins: + default: true + description: Show margins between panels in the dashboard layout. + type: boolean + panels: + default: [] + items: + additionalProperties: false + type: object + properties: + gridData: + additionalProperties: false + type: object + properties: + h: + default: 15 + description: The height of the panel in grid units + minimum: 1 + type: number + i: + type: string + w: + default: 24 + description: The width of the panel in grid units + maximum: 48 + minimum: 1 + type: number + x: + description: The x coordinate of the panel in grid units + type: number + 'y': + description: The y coordinate of the panel in grid units + type: number + required: + - x + - 'y' + - i + id: + description: The saved object id for by reference panels + type: string + panelConfig: + additionalProperties: true + type: object + properties: + description: + description: The description of the panel + type: string + enhancements: + additionalProperties: {} + type: object + hidePanelTitles: + description: Set to true to hide the panel title in its container. + type: boolean + savedObjectId: + description: The unique id of the library item to construct the embeddable. + type: string + title: + description: The title of the panel + type: string + version: + description: The version of the embeddable in the panel. + type: string + panelIndex: + type: string + panelRefName: + type: string + title: + description: The title of the panel + type: string + type: + description: The embeddable type + type: string + version: + deprecated: true + description: The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type). + type: string + required: + - panelConfig + - type + - gridData + - panelIndex + type: array + refreshInterval: + additionalProperties: false + description: A container for various refresh interval settings + type: object + properties: + display: + deprecated: true + description: A human-readable string indicating the refresh frequency. No longer used. + type: string + pause: + description: Whether the refresh interval is set to be paused while viewing the dashboard. + type: boolean + section: + deprecated: true + description: No longer used. + type: number + value: + description: A numeric value indicating refresh frequency in milliseconds. + type: number + required: + - pause + - value + timeFrom: + description: An ISO string indicating when to restore time from + type: string + timeRestore: + default: false + description: Whether to restore time upon viewing this dashboard + type: boolean + timeTo: + description: An ISO string indicating when to restore time from + type: string + title: + description: A human-readable title for the dashboard + type: string + version: + deprecated: true + type: number + required: + - title + - options + createdAt: + type: string + createdBy: + type: string + error: + additionalProperties: false + type: object + properties: + error: + type: string + message: + type: string + metadata: + additionalProperties: true + type: object + properties: {} + statusCode: + type: number + required: + - error + - message + - statusCode + id: + type: string + managed: + type: boolean + namespaces: + items: + type: string + type: array + originId: + type: string + references: + items: + additionalProperties: false + type: object + properties: + id: + type: string + name: + type: string + type: + type: string + required: + - name + - type + - id + type: array + type: + type: string + updatedAt: + type: string + updatedBy: + type: string + version: + type: string + required: + - id + - type + - attributes + - references + required: + - item + summary: Create a dashboard + tags: + - Dashboards + x-state: Technical Preview + put: + description: This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. + operationId: put-dashboards-dashboard-id + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - description: A unique identifier for the dashboard. + in: path + name: id + required: true + schema: + type: string + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + attributes: + additionalProperties: false + type: object + properties: + controlGroupInput: + additionalProperties: false + type: object + properties: + autoApplySelections: + default: true + description: Show apply selections button in controls. + type: boolean + chainingSystem: + default: HIERARCHICAL + description: The chaining strategy for multiple controls. For example, "HIERARCHICAL" or "NONE". + enum: + - NONE + - HIERARCHICAL + type: string + controls: + default: [] + description: An array of control panels and their state in the control group. + items: + additionalProperties: true + type: object + properties: + controlConfig: + additionalProperties: {} + type: object + grow: + default: false + description: Expand width of the control panel to fit available space. + type: boolean + id: + description: The unique ID of the control. + type: string + order: + description: The order of the control panel in the control group. + type: number + type: + description: The type of the control panel. + type: string + width: + default: medium + description: Minimum width of the control panel in the control group. + enum: + - small + - medium + - large + type: string + required: + - type + - order + type: array + enhancements: + additionalProperties: {} + type: object + ignoreParentSettings: + additionalProperties: false + type: object + properties: + ignoreFilters: + default: false + description: Ignore global filters in controls. + type: boolean + ignoreQuery: + default: false + description: Ignore the global query bar in controls. + type: boolean + ignoreTimerange: + default: false + description: Ignore the global time range in controls. + type: boolean + ignoreValidations: + default: false + description: Ignore validations in controls. + type: boolean + labelPosition: + default: oneLine + description: Position of the labels for controls. For example, "oneLine", "twoLine". + enum: + - oneLine + - twoLine + type: string + required: + - ignoreParentSettings + description: + default: '' + description: A short description. + type: string + kibanaSavedObjectMeta: + additionalProperties: false + default: {} + description: A container for various metadata + type: object + properties: + searchSource: + additionalProperties: true + type: object + properties: + filter: + items: + additionalProperties: false + description: A filter for the search source. + type: object + properties: + $state: + additionalProperties: false + type: object + properties: + store: + description: Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState'). + enum: + - appState + - globalState + type: string + required: + - store + meta: + additionalProperties: true + type: object + properties: + alias: + nullable: true + type: string + controlledBy: + type: string + disabled: + type: boolean + field: + type: string + group: + type: string + index: + type: string + isMultiIndex: + type: boolean + key: + type: string + negate: + type: boolean + params: {} + type: + type: string + value: + type: string + required: + - params + query: + additionalProperties: {} + type: object + required: + - meta + type: array + query: + additionalProperties: false + type: object + properties: + language: + description: The query language such as KQL or Lucene. + type: string + query: + anyOf: + - description: A text-based query such as Kibana Query Language (KQL) or Lucene query language. + type: string + - additionalProperties: {} + type: object + required: + - query + - language + sort: + items: + additionalProperties: + anyOf: + - enum: + - asc + - desc + type: string + - additionalProperties: false + type: object + properties: + format: + type: string + order: + enum: + - asc + - desc + type: string + required: + - order + - additionalProperties: false + type: object + properties: + numeric_type: + enum: + - double + - long + - date + - date_nanos + type: string + order: + enum: + - asc + - desc + type: string + required: + - order + type: object + type: array + type: + type: string + options: + additionalProperties: false + type: object + properties: + hidePanelTitles: + default: false + description: Hide the panel titles in the dashboard. + type: boolean + syncColors: + default: true + description: Synchronize colors between related panels in the dashboard. + type: boolean + syncCursor: + default: true + description: Synchronize cursor position between related panels in the dashboard. + type: boolean + syncTooltips: + default: true + description: Synchronize tooltips between related panels in the dashboard. + type: boolean + useMargins: + default: true + description: Show margins between panels in the dashboard layout. + type: boolean + panels: + default: [] + items: + additionalProperties: false + type: object + properties: + gridData: + additionalProperties: false + type: object + properties: + h: + default: 15 + description: The height of the panel in grid units + minimum: 1 + type: number + i: + description: The unique identifier of the panel + type: string + w: + default: 24 + description: The width of the panel in grid units + maximum: 48 + minimum: 1 + type: number + x: + description: The x coordinate of the panel in grid units + type: number + 'y': + description: The y coordinate of the panel in grid units + type: number + required: + - x + - 'y' + id: + description: The saved object id for by reference panels + type: string + panelConfig: + additionalProperties: true + type: object + properties: + description: + description: The description of the panel + type: string + enhancements: + additionalProperties: {} + type: object + hidePanelTitles: + description: Set to true to hide the panel title in its container. + type: boolean + savedObjectId: + description: The unique id of the library item to construct the embeddable. + type: string + title: + description: The title of the panel + type: string + version: + description: The version of the embeddable in the panel. + type: string + panelIndex: + description: The unique ID of the panel. + type: string + panelRefName: + type: string + title: + description: The title of the panel + type: string + type: + description: The embeddable type + type: string + version: + deprecated: true + description: The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type). + type: string + required: + - panelConfig + - type + - gridData + type: array + refreshInterval: + additionalProperties: false + description: A container for various refresh interval settings + type: object + properties: + display: + deprecated: true + description: A human-readable string indicating the refresh frequency. No longer used. + type: string + pause: + description: Whether the refresh interval is set to be paused while viewing the dashboard. + type: boolean + section: + deprecated: true + description: No longer used. + type: number + value: + description: A numeric value indicating refresh frequency in milliseconds. + type: number + required: + - pause + - value + timeFrom: + description: An ISO string indicating when to restore time from + type: string + timeRestore: + default: false + description: Whether to restore time upon viewing this dashboard + type: boolean + timeTo: + description: An ISO string indicating when to restore time from + type: string + title: + description: A human-readable title for the dashboard + type: string + version: + deprecated: true + type: number + required: + - title + - options + references: + items: + additionalProperties: false + type: object + properties: + id: + type: string + name: + type: string + type: + type: string + required: + - name + - type + - id + type: array + required: + - attributes + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + item: + additionalProperties: true + type: object + properties: + attributes: + additionalProperties: false + type: object + properties: + controlGroupInput: + additionalProperties: false + type: object + properties: + autoApplySelections: + default: true + description: Show apply selections button in controls. + type: boolean + chainingSystem: + default: HIERARCHICAL + description: The chaining strategy for multiple controls. For example, "HIERARCHICAL" or "NONE". + enum: + - NONE + - HIERARCHICAL + type: string + controls: + default: [] + description: An array of control panels and their state in the control group. + items: + additionalProperties: true + type: object + properties: + controlConfig: + additionalProperties: {} + type: object + grow: + default: false + description: Expand width of the control panel to fit available space. + type: boolean + id: + description: The unique ID of the control. + type: string + order: + description: The order of the control panel in the control group. + type: number + type: + description: The type of the control panel. + type: string + width: + default: medium + description: Minimum width of the control panel in the control group. + enum: + - small + - medium + - large + type: string + required: + - type + - order + type: array + enhancements: + additionalProperties: {} + type: object + ignoreParentSettings: + additionalProperties: false + type: object + properties: + ignoreFilters: + default: false + description: Ignore global filters in controls. + type: boolean + ignoreQuery: + default: false + description: Ignore the global query bar in controls. + type: boolean + ignoreTimerange: + default: false + description: Ignore the global time range in controls. + type: boolean + ignoreValidations: + default: false + description: Ignore validations in controls. + type: boolean + labelPosition: + default: oneLine + description: Position of the labels for controls. For example, "oneLine", "twoLine". + enum: + - oneLine + - twoLine + type: string + required: + - ignoreParentSettings + description: + default: '' + description: A short description. + type: string + kibanaSavedObjectMeta: + additionalProperties: false + default: {} + description: A container for various metadata + type: object + properties: + searchSource: + additionalProperties: true + type: object + properties: + filter: + items: + additionalProperties: false + description: A filter for the search source. + type: object + properties: + $state: + additionalProperties: false + type: object + properties: + store: + description: Denote whether a filter is specific to an application's context (e.g. 'appState') or whether it should be applied globally (e.g. 'globalState'). + enum: + - appState + - globalState + type: string + required: + - store + meta: + additionalProperties: true + type: object + properties: + alias: + nullable: true + type: string + controlledBy: + type: string + disabled: + type: boolean + field: + type: string + group: + type: string + index: + type: string + isMultiIndex: + type: boolean + key: + type: string + negate: + type: boolean + params: {} + type: + type: string + value: + type: string + required: + - params + query: + additionalProperties: {} + type: object + required: + - meta + type: array + query: + additionalProperties: false + type: object + properties: + language: + description: The query language such as KQL or Lucene. + type: string + query: + anyOf: + - description: A text-based query such as Kibana Query Language (KQL) or Lucene query language. + type: string + - additionalProperties: {} + type: object + required: + - query + - language + sort: + items: + additionalProperties: + anyOf: + - enum: + - asc + - desc + type: string + - additionalProperties: false + type: object + properties: + format: + type: string + order: + enum: + - asc + - desc + type: string + required: + - order + - additionalProperties: false + type: object + properties: + numeric_type: + enum: + - double + - long + - date + - date_nanos + type: string + order: + enum: + - asc + - desc + type: string + required: + - order + type: object + type: array + type: + type: string + options: + additionalProperties: false + type: object + properties: + hidePanelTitles: + default: false + description: Hide the panel titles in the dashboard. + type: boolean + syncColors: + default: true + description: Synchronize colors between related panels in the dashboard. + type: boolean + syncCursor: + default: true + description: Synchronize cursor position between related panels in the dashboard. + type: boolean + syncTooltips: + default: true + description: Synchronize tooltips between related panels in the dashboard. + type: boolean + useMargins: + default: true + description: Show margins between panels in the dashboard layout. + type: boolean + panels: + default: [] + items: + additionalProperties: false + type: object + properties: + gridData: + additionalProperties: false + type: object + properties: + h: + default: 15 + description: The height of the panel in grid units + minimum: 1 + type: number + i: + type: string + w: + default: 24 + description: The width of the panel in grid units + maximum: 48 + minimum: 1 + type: number + x: + description: The x coordinate of the panel in grid units + type: number + 'y': + description: The y coordinate of the panel in grid units + type: number + required: + - x + - 'y' + - i + id: + description: The saved object id for by reference panels + type: string + panelConfig: + additionalProperties: true + type: object + properties: + description: + description: The description of the panel + type: string + enhancements: + additionalProperties: {} + type: object + hidePanelTitles: + description: Set to true to hide the panel title in its container. + type: boolean + savedObjectId: + description: The unique id of the library item to construct the embeddable. + type: string + title: + description: The title of the panel + type: string + version: + description: The version of the embeddable in the panel. + type: string + panelIndex: + type: string + panelRefName: + type: string + title: + description: The title of the panel + type: string + type: + description: The embeddable type + type: string + version: + deprecated: true + description: The version was used to store Kibana version information from versions 7.3.0 -> 8.11.0. As of version 8.11.0, the versioning information is now per-embeddable-type and is stored on the embeddable's input. (panelConfig in this type). + type: string + required: + - panelConfig + - type + - gridData + - panelIndex + type: array + refreshInterval: + additionalProperties: false + description: A container for various refresh interval settings + type: object + properties: + display: + deprecated: true + description: A human-readable string indicating the refresh frequency. No longer used. + type: string + pause: + description: Whether the refresh interval is set to be paused while viewing the dashboard. + type: boolean + section: + deprecated: true + description: No longer used. + type: number + value: + description: A numeric value indicating refresh frequency in milliseconds. + type: number + required: + - pause + - value + timeFrom: + description: An ISO string indicating when to restore time from + type: string + timeRestore: + default: false + description: Whether to restore time upon viewing this dashboard + type: boolean + timeTo: + description: An ISO string indicating when to restore time from + type: string + title: + description: A human-readable title for the dashboard + type: string + version: + deprecated: true + type: number + required: + - title + - options + createdAt: + type: string + createdBy: + type: string + error: + additionalProperties: false + type: object + properties: + error: + type: string + message: + type: string + metadata: + additionalProperties: true + type: object + properties: {} + statusCode: + type: number + required: + - error + - message + - statusCode + id: + type: string + managed: + type: boolean + namespaces: + items: + type: string + type: array + originId: + type: string + references: + items: + additionalProperties: false + type: object + properties: + id: + type: string + name: + type: string + type: + type: string + required: + - name + - type + - id + type: array + type: + type: string + updatedAt: + type: string + updatedBy: + type: string + version: + type: string + required: + - id + - type + - attributes + - references + required: + - item + summary: Update an existing dashboard + tags: + - Dashboards + x-state: Technical Preview /api/data_views: get: operationId: getAllDataViewsDefault @@ -12489,8 +14800,6 @@ paths: maximum: 65353 minimum: 0 type: number - required: - - enabled monitoring_output_id: nullable: true type: string @@ -13020,8 +15329,6 @@ paths: maximum: 65353 minimum: 0 type: number - required: - - enabled monitoring_output_id: nullable: true type: string @@ -13202,8 +15509,6 @@ paths: maximum: 65353 minimum: 0 type: number - required: - - enabled monitoring_output_id: nullable: true type: string @@ -13755,8 +16060,6 @@ paths: maximum: 65353 minimum: 0 type: number - required: - - enabled monitoring_output_id: nullable: true type: string @@ -14288,8 +16591,6 @@ paths: maximum: 65353 minimum: 0 type: number - required: - - enabled monitoring_output_id: nullable: true type: string @@ -14818,8 +17119,6 @@ paths: maximum: 65353 minimum: 0 type: number - required: - - enabled monitoring_output_id: nullable: true type: string @@ -15000,8 +17299,6 @@ paths: maximum: 65353 minimum: 0 type: number - required: - - enabled monitoring_output_id: nullable: true type: string @@ -15553,8 +17850,6 @@ paths: maximum: 65353 minimum: 0 type: number - required: - - enabled monitoring_output_id: nullable: true type: string @@ -17096,6 +19391,7 @@ paths: type: array upgrade_details: additionalProperties: false + nullable: true type: object properties: action_id: @@ -17560,349 +19856,351 @@ paths: type: array upgrade_details: additionalProperties: false - type: object - properties: - action_id: - type: string - metadata: - additionalProperties: false - type: object - properties: - download_percent: - type: number - download_rate: - type: number - error_msg: - type: string - failed_state: - enum: - - UPG_REQUESTED - - UPG_SCHEDULED - - UPG_DOWNLOADING - - UPG_EXTRACTING - - UPG_REPLACING - - UPG_RESTARTING - - UPG_FAILED - - UPG_WATCHING - - UPG_ROLLBACK - type: string - retry_error_msg: - type: string - retry_until: - type: string - scheduled_at: - type: string - state: - enum: - - UPG_REQUESTED - - UPG_SCHEDULED - - UPG_DOWNLOADING - - UPG_EXTRACTING - - UPG_REPLACING - - UPG_RESTARTING - - UPG_FAILED - - UPG_WATCHING - - UPG_ROLLBACK - type: string - target_version: - type: string - required: - - target_version - - action_id - - state - upgrade_started_at: - nullable: true - type: string - upgraded_at: nullable: true - type: string - user_provided_metadata: - additionalProperties: {} - type: object - required: - - id - - packages - - type - - active - - enrolled_at - - local_metadata - required: - - item - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - required: - - message - summary: Get an agent - tags: - - Elastic Agents - put: - description: Update an agent by ID. - operationId: put-fleet-agents-agentid - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: path - name: agentId - required: true - schema: - type: string - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - tags: - items: - type: string - type: array - user_provided_metadata: - additionalProperties: {} - type: object - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: false - type: object - properties: - access_api_key: - type: string - access_api_key_id: - type: string - active: - type: boolean - agent: - additionalProperties: true - type: object - properties: - id: - type: string - version: - type: string - required: - - id - - version - components: - items: - additionalProperties: false - type: object - properties: - id: - type: string - message: - type: string - status: - enum: - - STARTING - - CONFIGURING - - HEALTHY - - DEGRADED - - FAILED - - STOPPING - - STOPPED - type: string - type: - type: string - units: - items: - additionalProperties: false - type: object - properties: - id: - type: string - message: - type: string - payload: - additionalProperties: {} - type: object - status: - enum: - - STARTING - - CONFIGURING - - HEALTHY - - DEGRADED - - FAILED - - STOPPING - - STOPPED - type: string - type: - enum: - - input - - output - type: string - required: - - id - - type - - status - - message - type: array - required: - - id - - type - - status - - message - type: array - default_api_key: - type: string - default_api_key_history: - items: - additionalProperties: false - deprecated: true - type: object - properties: - id: - type: string - retired_at: - type: string - required: - - id - - retired_at - type: array - default_api_key_id: - type: string - enrolled_at: - type: string - id: - type: string - last_checkin: - type: string - last_checkin_message: - type: string - last_checkin_status: - enum: - - error - - online - - degraded - - updating - - starting - type: string - local_metadata: - additionalProperties: {} - type: object - metrics: - additionalProperties: false - type: object - properties: - cpu_avg: - type: number - memory_size_byte_avg: - type: number - namespaces: - items: - type: string - type: array - outputs: - additionalProperties: - additionalProperties: false - type: object - properties: - api_key_id: - type: string - to_retire_api_key_ids: - items: - additionalProperties: false - type: object - properties: - id: - type: string - retired_at: - type: string - required: - - id - - retired_at - type: array - type: - type: string - required: - - api_key_id - - type - type: object - packages: - items: - type: string - type: array - policy_id: - type: string - policy_revision: - nullable: true - type: number - sort: - items: - anyOf: - - type: number - - type: string - - enum: [] - nullable: true - type: array - status: - enum: - - offline - - error - - online - - inactive - - enrolling - - unenrolling - - unenrolled - - updating - - degraded - type: string - tags: - items: - type: string - type: array - type: - enum: - - PERMANENT - - EPHEMERAL - - TEMPORARY - type: string - unenrolled_at: - type: string - unenrollment_started_at: - type: string - unhealthy_reason: - items: - enum: - - input - - output - - other - type: string - nullable: true - type: array - upgrade_details: - additionalProperties: false + type: object + properties: + action_id: + type: string + metadata: + additionalProperties: false + type: object + properties: + download_percent: + type: number + download_rate: + type: number + error_msg: + type: string + failed_state: + enum: + - UPG_REQUESTED + - UPG_SCHEDULED + - UPG_DOWNLOADING + - UPG_EXTRACTING + - UPG_REPLACING + - UPG_RESTARTING + - UPG_FAILED + - UPG_WATCHING + - UPG_ROLLBACK + type: string + retry_error_msg: + type: string + retry_until: + type: string + scheduled_at: + type: string + state: + enum: + - UPG_REQUESTED + - UPG_SCHEDULED + - UPG_DOWNLOADING + - UPG_EXTRACTING + - UPG_REPLACING + - UPG_RESTARTING + - UPG_FAILED + - UPG_WATCHING + - UPG_ROLLBACK + type: string + target_version: + type: string + required: + - target_version + - action_id + - state + upgrade_started_at: + nullable: true + type: string + upgraded_at: + nullable: true + type: string + user_provided_metadata: + additionalProperties: {} + type: object + required: + - id + - packages + - type + - active + - enrolled_at + - local_metadata + required: + - item + '400': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + error: + type: string + message: + type: string + statusCode: + type: number + required: + - message + summary: Get an agent + tags: + - Elastic Agents + put: + description: Update an agent by ID. + operationId: put-fleet-agents-agentid + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - in: path + name: agentId + required: true + schema: + type: string + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + tags: + items: + type: string + type: array + user_provided_metadata: + additionalProperties: {} + type: object + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + item: + additionalProperties: false + type: object + properties: + access_api_key: + type: string + access_api_key_id: + type: string + active: + type: boolean + agent: + additionalProperties: true + type: object + properties: + id: + type: string + version: + type: string + required: + - id + - version + components: + items: + additionalProperties: false + type: object + properties: + id: + type: string + message: + type: string + status: + enum: + - STARTING + - CONFIGURING + - HEALTHY + - DEGRADED + - FAILED + - STOPPING + - STOPPED + type: string + type: + type: string + units: + items: + additionalProperties: false + type: object + properties: + id: + type: string + message: + type: string + payload: + additionalProperties: {} + type: object + status: + enum: + - STARTING + - CONFIGURING + - HEALTHY + - DEGRADED + - FAILED + - STOPPING + - STOPPED + type: string + type: + enum: + - input + - output + type: string + required: + - id + - type + - status + - message + type: array + required: + - id + - type + - status + - message + type: array + default_api_key: + type: string + default_api_key_history: + items: + additionalProperties: false + deprecated: true + type: object + properties: + id: + type: string + retired_at: + type: string + required: + - id + - retired_at + type: array + default_api_key_id: + type: string + enrolled_at: + type: string + id: + type: string + last_checkin: + type: string + last_checkin_message: + type: string + last_checkin_status: + enum: + - error + - online + - degraded + - updating + - starting + type: string + local_metadata: + additionalProperties: {} + type: object + metrics: + additionalProperties: false + type: object + properties: + cpu_avg: + type: number + memory_size_byte_avg: + type: number + namespaces: + items: + type: string + type: array + outputs: + additionalProperties: + additionalProperties: false + type: object + properties: + api_key_id: + type: string + to_retire_api_key_ids: + items: + additionalProperties: false + type: object + properties: + id: + type: string + retired_at: + type: string + required: + - id + - retired_at + type: array + type: + type: string + required: + - api_key_id + - type + type: object + packages: + items: + type: string + type: array + policy_id: + type: string + policy_revision: + nullable: true + type: number + sort: + items: + anyOf: + - type: number + - type: string + - enum: [] + nullable: true + type: array + status: + enum: + - offline + - error + - online + - inactive + - enrolling + - unenrolling + - unenrolled + - updating + - degraded + type: string + tags: + items: + type: string + type: array + type: + enum: + - PERMANENT + - EPHEMERAL + - TEMPORARY + type: string + unenrolled_at: + type: string + unenrollment_started_at: + type: string + unhealthy_reason: + items: + enum: + - input + - output + - other + type: string + nullable: true + type: array + upgrade_details: + additionalProperties: false + nullable: true type: object properties: action_id: @@ -56371,19 +58669,23 @@ components: properties: frequency: default: 1m - description: Configure how often the transform runs, default 1m + description: The interval between checks for changes in the source data. The minimum value is 1m and the maximum is 59m. The default value is 1 minute. example: 5m type: string preventInitialBackfill: default: false - description: Prevents the transform from backfilling data when it starts. + description: Start aggregating data from the time the SLO is created, instead of backfilling data from the beginning of the time window. example: true type: boolean syncDelay: default: 1m - description: The synch delay to apply to the transform. Default 1m + description: The time delay in minutes between the current time and the latest source data time. Increasing the value will delay any alerting. The default value is 1 minute. The minimum value is 1m and the maximum is 359m. It should always be greater then source index refresh interval. example: 5m type: string + syncField: + description: The date field that is used to identify new documents in the source. It is strongly recommended to use a field that contains the ingest timestamp. If you use a different field, you might need to set the delay such that it accounts for data transmission delays. When unspecified, we use the indicator timestamp field. + example: event.ingested + type: string title: Settings type: object SLOs_slo_definition_response: diff --git a/oas_docs/overlays/kibana.overlays.serverless.yaml b/oas_docs/overlays/kibana.overlays.serverless.yaml index 1054f774fe11e..36efbe18e9403 100644 --- a/oas_docs/overlays/kibana.overlays.serverless.yaml +++ b/oas_docs/overlays/kibana.overlays.serverless.yaml @@ -14,7 +14,7 @@ actions: - url: https://{kibana_url} variables: kibana_url: - default: localhost:5601 + default: # Mark all operations as beta - target: "$.paths[*]['get','put','post','delete','options','head','patch','trace']" description: Add x-beta diff --git a/oas_docs/overlays/kibana.overlays.yaml b/oas_docs/overlays/kibana.overlays.yaml index ed41f56088bf8..666cba540a658 100644 --- a/oas_docs/overlays/kibana.overlays.yaml +++ b/oas_docs/overlays/kibana.overlays.yaml @@ -4,6 +4,17 @@ info: title: Overlays for the Kibana API document version: 0.0.1 actions: +# Clean up server definitions + - target: '$.servers.*' + description: Remove all servers so we can add our own. + remove: true + - target: '$.servers' + description: Add server into the now empty server array. + update: + - url: https://{kibana_url} + variables: + kibana_url: + default: localhost:5601 # Add an introduction to spaces - target: '$' description: Add an extra page about spaces diff --git a/oas_docs/package-lock.json b/oas_docs/package-lock.json index 27d9823c1e873..ab921922f0d15 100644 --- a/oas_docs/package-lock.json +++ b/oas_docs/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@redocly/cli": "^1.25.13", + "@redocly/cli": "^1.25.14", "bump-cli": "^2.8.4" } }, @@ -515,12 +515,12 @@ } }, "node_modules/@redocly/cli": { - "version": "1.25.14", - "resolved": "https://registry.npmjs.org/@redocly/cli/-/cli-1.25.14.tgz", - "integrity": "sha512-HRDOoN3YpFe4+2rWrL/uTqRUDqqyrRtj1MVHFJ0heKTfBLOFEEfXXUYExw7R6yoiY3+GnptR96wePeFpH1gheg==", + "version": "1.25.15", + "resolved": "https://registry.npmjs.org/@redocly/cli/-/cli-1.25.15.tgz", + "integrity": "sha512-ZD743CJX4FpMJvGNE9Cm3gNn8LNRzRjyrYNVPi1C4iIEtrFkr5Zq791qv6gUFehWns71svbVyzWD9ftVTdfqYg==", "license": "MIT", "dependencies": { - "@redocly/openapi-core": "1.25.14", + "@redocly/openapi-core": "1.25.15", "abort-controller": "^3.0.0", "chokidar": "^3.5.1", "colorette": "^1.2.0", @@ -550,18 +550,19 @@ } }, "node_modules/@redocly/config": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.16.0.tgz", - "integrity": "sha512-t9jnODbUcuANRSl/K4L9nb12V+U5acIHnVSl26NWrtSdDZVtoqUXk2yGFPZzohYf62cCfEQUT8ouJ3bhPfpnJg==" + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.17.1.tgz", + "integrity": "sha512-CEmvaJuG7pm2ylQg53emPmtgm4nW2nxBgwXzbVEHpGas/lGnMyN8Zlkgiz6rPw0unASg6VW3wlz27SOL5XFHYQ==", + "license": "MIT" }, "node_modules/@redocly/openapi-core": { - "version": "1.25.14", - "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.25.14.tgz", - "integrity": "sha512-B9ewI0KVC1yqyeoQzErVnV4kdnxaYfwRMctxk/YwJxZZc/nVZ3VOVE+r2kXIFaGbUgc4ZHFn+aE2qvzCRXTXHw==", + "version": "1.25.15", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.25.15.tgz", + "integrity": "sha512-/dpr5zpGj2t1Bf7EIXEboRZm1hsJZBQfv3Q1pkivtdAEg3if2khv+b9gY68aquC6cM/2aQY2kMLy8LlY2tn+Og==", "license": "MIT", "dependencies": { "@redocly/ajv": "^8.11.2", - "@redocly/config": "^0.16.0", + "@redocly/config": "^0.17.0", "colorette": "^1.2.0", "https-proxy-agent": "^7.0.4", "js-levenshtein": "^1.1.6", diff --git a/oas_docs/package.json b/oas_docs/package.json index f2b89bc6f506a..9510dc4d31dc7 100644 --- a/oas_docs/package.json +++ b/oas_docs/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "bump-cli": "^2.8.4", - "@redocly/cli": "^1.25.13" + "@redocly/cli": "^1.25.14" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" diff --git a/package.json b/package.json index 873dbff00d258..05f10169d5e81 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "@types/react": "~18.2.0", "@types/react-dom": "~18.2.0", "@xstate5/react/**/xstate": "^5.18.1", - "globby/fast-glob": "^3.2.11" + "globby/fast-glob": "^3.3.2" }, "dependencies": { "@appland/sql-parser": "^1.5.1", @@ -111,20 +111,20 @@ "@elastic/apm-rum": "^5.16.1", "@elastic/apm-rum-core": "^5.21.1", "@elastic/apm-rum-react": "^2.0.3", - "@elastic/charts": "68.0.2", + "@elastic/charts": "68.0.3", "@elastic/datemath": "5.0.3", "@elastic/ebt": "^1.1.1", "@elastic/ecs": "^8.11.1", "@elastic/elasticsearch": "^8.15.2", "@elastic/ems-client": "8.5.3", - "@elastic/eui": "98.0.0-borealis.1", - "@elastic/eui-theme-borealis": "0.0.3", + "@elastic/eui": "98.1.0-borealis.0", + "@elastic/eui-theme-borealis": "0.0.4", "@elastic/filesaver": "1.1.2", "@elastic/node-crypto": "^1.2.3", "@elastic/numeral": "^2.5.1", "@elastic/react-search-ui": "^1.20.2", "@elastic/react-search-ui-views": "^1.20.2", - "@elastic/request-converter": "^8.16.2", + "@elastic/request-converter": "^8.17.0", "@elastic/request-crypto": "^2.0.3", "@elastic/search-ui": "^1.20.2", "@elastic/search-ui-app-search-connector": "^1.20.2", @@ -191,6 +191,7 @@ "@kbn/apm-utils": "link:packages/kbn-apm-utils", "@kbn/app-link-test-plugin": "link:test/plugin_functional/plugins/app_link_test", "@kbn/application-usage-test-plugin": "link:x-pack/test/usage_collection/plugins/application_usage_test", + "@kbn/asset-inventory-plugin": "link:x-pack/plugins/asset_inventory", "@kbn/audit-log-plugin": "link:x-pack/test/security_api_integration/plugins/audit_log", "@kbn/avc-banner": "link:packages/kbn-avc-banner", "@kbn/banners-plugin": "link:x-pack/plugins/banners", @@ -459,7 +460,7 @@ "@kbn/discover-plugin": "link:src/plugins/discover", "@kbn/discover-shared-plugin": "link:src/plugins/discover_shared", "@kbn/discover-utils": "link:packages/kbn-discover-utils", - "@kbn/doc-links": "link:packages/kbn-doc-links", + "@kbn/doc-links": "link:src/platform/packages/shared/kbn-doc-links", "@kbn/dom-drag-drop": "link:packages/kbn-dom-drag-drop", "@kbn/ebt-tools": "link:packages/kbn-ebt-tools", "@kbn/ecs-data-quality-dashboard": "link:x-pack/packages/security-solution/ecs_data_quality_dashboard", @@ -758,6 +759,7 @@ "@kbn/resizable-layout-examples-plugin": "link:examples/resizable_layout_examples", "@kbn/resolver-test-plugin": "link:x-pack/test/plugin_functional/plugins/resolver_test", "@kbn/response-ops-feature-flag-service": "link:packages/response-ops/feature_flag_service", + "@kbn/response-ops-rule-form": "link:packages/response-ops/rule_form", "@kbn/response-ops-rule-params": "link:packages/response-ops/rule_params", "@kbn/response-stream-plugin": "link:examples/response_stream", "@kbn/rison": "link:packages/kbn-rison", @@ -1030,7 +1032,7 @@ "@langchain/google-vertexai": "^0.1.0", "@langchain/langgraph": "0.2.19", "@langchain/openai": "^0.3.11", - "@langtrase/trace-attributes": "^3.0.8", + "@langtrase/trace-attributes": "^7.5.0", "@launchdarkly/node-server-sdk": "^9.7.2", "@launchdarkly/openfeature-node-server": "^1.0.0", "@loaders.gl/core": "^3.4.7", @@ -1057,12 +1059,12 @@ "@reduxjs/toolkit": "1.9.7", "@slack/webhook": "^7.0.1", "@smithy/eventstream-codec": "^3.1.1", - "@smithy/eventstream-serde-node": "^3.0.3", + "@smithy/eventstream-serde-node": "^3.0.12", "@smithy/middleware-stack": "^3.0.10", "@smithy/node-http-handler": "^3.3.1", "@smithy/protocol-http": "^4.1.7", - "@smithy/signature-v4": "^3.1.1", - "@smithy/types": "^3.2.0", + "@smithy/signature-v4": "^4.2.3", + "@smithy/types": "^3.7.1", "@smithy/util-utf8": "^3.0.0", "@tanstack/react-query": "^4.29.12", "@tanstack/react-query-devtools": "^4.29.12", @@ -1081,13 +1083,13 @@ "@xyflow/react": "^12.3.5", "adm-zip": "^0.5.9", "ai": "^2.2.33", - "ajv": "^8.12.0", + "ajv": "^8.17.1", "ansi-regex": "^6.1.0", "antlr4": "^4.13.1-patch-1", "archiver": "^7.0.1", "async": "^3.2.3", - "aws4": "^1.12.0", - "axios": "^1.7.4", + "aws4": "^1.13.2", + "axios": "^1.7.9", "base64-js": "^1.3.1", "bitmap-sdf": "^1.0.3", "blurhash": "^2.0.1", @@ -1129,7 +1131,7 @@ "dotenv": "^16.4.5", "elastic-apm-node": "^4.8.1", "email-addresses": "^5.0.0", - "eventsource-parser": "^1.1.1", + "eventsource-parser": "^3.0.0", "execa": "^5.1.1", "expiry-js": "0.1.7", "exponential-backoff": "^3.1.1", @@ -1147,7 +1149,7 @@ "getos": "^3.1.0", "globby": "^11.1.0", "google-auth-library": "^9.10.0", - "gpt-tokenizer": "^2.1.2", + "gpt-tokenizer": "^2.6.2", "handlebars": "4.7.8", "he": "^1.2.0", "history": "^4.9.0", @@ -1175,7 +1177,7 @@ "jsts": "^1.6.2", "kea": "^2.6.0", "langchain": "^0.3.5", - "langsmith": "^0.2.3", + "langsmith": "^0.2.5", "launchdarkly-js-client-sdk": "^3.5.0", "load-json-file": "^6.2.0", "lodash": "^4.17.21", @@ -1204,7 +1206,7 @@ "nunjucks": "^3.2.4", "object-hash": "^1.3.1", "object-path-immutable": "^3.1.1", - "openai": "^4.68.0", + "openai": "^4.72.0", "openpgp": "5.10.1", "ora": "^4.0.4", "p-limit": "^3.0.1", @@ -1452,6 +1454,7 @@ "@kbn/ftr-common-functional-services": "link:packages/kbn-ftr-common-functional-services", "@kbn/ftr-common-functional-ui-services": "link:packages/kbn-ftr-common-functional-ui-services", "@kbn/ftr-screenshot-filename": "link:packages/kbn-ftr-screenshot-filename", + "@kbn/gen-ai-functional-testing": "link:packages/kbn-gen-ai-functional-testing", "@kbn/generate": "link:packages/kbn-generate", "@kbn/get-repo-files": "link:packages/kbn-get-repo-files", "@kbn/import-locator": "link:packages/kbn-import-locator", @@ -1514,8 +1517,8 @@ "@mswjs/http-middleware": "^0.10.1", "@octokit/rest": "^17.11.2", "@parcel/watcher": "^2.1.0", - "@playwright/test": "=1.46.0", - "@redocly/cli": "^1.25.13", + "@playwright/test": "1.49.0", + "@redocly/cli": "^1.25.14", "@statoscope/webpack-plugin": "^5.28.2", "@storybook/addon-a11y": "^6.5.16", "@storybook/addon-actions": "^6.5.16", @@ -1571,7 +1574,6 @@ "@types/eslint": "^8.44.2", "@types/express": "^4.17.21", "@types/extract-zip": "^1.6.2", - "@types/faker": "^5.1.5", "@types/fetch-mock": "^7.3.1", "@types/file-saver": "^2.0.0", "@types/flot": "^0.0.31", @@ -1591,7 +1593,7 @@ "@types/js-search": "^1.4.0", "@types/js-yaml": "^4.0.9", "@types/jsdom": "^20.0.1", - "@types/json-schema": "^7", + "@types/json-schema": "^7.0.15", "@types/json-stable-stringify": "^1.0.32", "@types/json5": "^2.2.0", "@types/jsonwebtoken": "^9.0.0", @@ -1626,7 +1628,7 @@ "@types/picomatch": "^2.3.0", "@types/pidusage": "^2.0.2", "@types/pixelmatch": "^5.2.4", - "@types/pngjs": "^3.4.0", + "@types/pngjs": "^6.0.5", "@types/prop-types": "^15.7.5", "@types/rbush": "^3.0.0", "@types/react": "~18.2.0", @@ -1693,7 +1695,7 @@ "buildkite-test-collector": "^1.7.0", "callsites": "^3.1.0", "chance": "1.0.18", - "chromedriver": "^131.0.0", + "chromedriver": "^131.0.1", "clarify": "^2.2.0", "clean-webpack-plugin": "^3.0.0", "cli-progress": "^3.12.0", @@ -1740,7 +1742,6 @@ "expect": "^29.7.0", "expose-loader": "^0.7.5", "express": "^4.21.1", - "faker": "^5.1.0", "fetch-mock": "^7.3.9", "file-loader": "^4.2.0", "find-cypress-specs": "^1.41.4", @@ -1792,8 +1793,8 @@ "native-hdr-histogram": "^1.0.0", "nock": "12.0.3", "null-loader": "^3.0.0", - "nyc": "^15.1.0", - "oboe": "^2.1.4", + "nyc": "^17.1.0", + "oboe": "^2.1.7", "openapi-types": "^12.1.3", "p-reflect": "2.1.0", "peggy": "^1.2.0", @@ -1802,9 +1803,9 @@ "pirates": "^4.0.1", "piscina": "^3.2.0", "pixelmatch": "^5.3.0", - "playwright": "=1.46.0", - "playwright-chromium": "=1.46.0", - "pngjs": "^3.4.0", + "playwright": "1.49.0", + "playwright-chromium": "1.49.0", + "pngjs": "^7.0.0", "postcss": "^8.4.31", "postcss-loader": "^4.2.0", "postcss-prefix-selector": "^1.16.0", @@ -1820,7 +1821,7 @@ "rxjs-marbles": "^7.0.1", "sass-embedded": "^1.78.0", "sass-loader": "^10.5.1", - "selenium-webdriver": "^4.26.0", + "selenium-webdriver": "^4.27.0", "sharp": "0.32.6", "simple-git": "^3.16.0", "sinon": "^7.4.2", @@ -1830,12 +1831,12 @@ "style-loader": "^1.1.3", "stylelint": "^14.9.1", "stylelint-scss": "^4.3.0", - "superagent": "^9.0.2", + "superagent": "^10.1.1", "supertest": "^7.0.0", "svgo": "^2.8.0", "swagger-jsdoc": "^6.2.8", "swagger-ui-express": "^5.0.1", - "table": "^6.8.1", + "table": "^6.8.2", "tape": "^5.0.1", "terser": "^5.36.0", "terser-webpack-plugin": "^4.2.3", @@ -1858,7 +1859,7 @@ "webpack-sources": "^1.4.1", "webpack-visualizer-plugin2": "^1.1.0", "xml-crypto": "^6.0.0", - "xmlbuilder": "13.0.2", + "xmlbuilder": "15.1.1", "yargs": "^15.4.1", "yarn-deduplicate": "^6.0.2", "zod-to-json-schema": "^3.23.0" diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/__snapshots__/loading_indicator.test.tsx.snap b/packages/core/chrome/core-chrome-browser-internal/src/ui/__snapshots__/loading_indicator.test.tsx.snap index b221e4e9a64ab..c8e702f228b20 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/ui/__snapshots__/loading_indicator.test.tsx.snap +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/__snapshots__/loading_indicator.test.tsx.snap @@ -1,31 +1,62 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`kbnLoadingIndicator is hidden by default 1`] = ` - + + + + `; exports[`kbnLoadingIndicator is visible when loadingCount is > 0 1`] = ` - + + + + `; exports[`kbnLoadingIndicator shows logo image when customLogo is set 1`] = ` - + + + + `; diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/collapsible_nav.test.tsx.snap b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/collapsible_nav.test.tsx.snap index 62b40f0d05e9b..167c919d6f498 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/collapsible_nav.test.tsx.snap +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/collapsible_nav.test.tsx.snap @@ -168,7 +168,7 @@ Array [ >
  • @@ -351,7 +351,7 @@ Array [
    @@ -464,7 +464,7 @@ Array [
    @@ -560,7 +560,7 @@ Array [
    @@ -858,7 +858,15 @@ exports[`CollapsibleNav renders the default nav 1`] = ` } - className="kbnCollapsibleNav" + css={ + Object { + "map": undefined, + "name": "1pvcuvk", + "next": undefined, + "styles": "@media (max-height: 240px){overflow-y:auto;}", + "toString": [Function], + } + } data-test-subj="collapsibleNav" id="collapsibe-nav" isOpen={false} @@ -1045,7 +1053,15 @@ exports[`CollapsibleNav renders the default nav 2`] = ` } - className="kbnCollapsibleNav" + css={ + Object { + "map": undefined, + "name": "1pvcuvk", + "next": undefined, + "styles": "@media (max-height: 240px){overflow-y:auto;}", + "toString": [Function], + } + } data-test-subj="collapsibleNav" id="collapsibe-nav" isOpen={false} diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/header.test.tsx.snap b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/header.test.tsx.snap index 3e5b746b31536..6596f7c69db24 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/header.test.tsx.snap +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/header.test.tsx.snap @@ -56,12 +56,11 @@ Array [ > ); diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.scss b/packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.scss deleted file mode 100644 index d12331d9c042d..0000000000000 --- a/packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.scss +++ /dev/null @@ -1,9 +0,0 @@ -.kbnLoadingIndicator-hidden { - visibility: hidden; - animation-play-state: paused; -} - -.euiHeaderSectionItem .euiButtonEmpty__text { - // stop global header buttons from jumping during loading state - display: flex; -} \ No newline at end of file diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.test.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.test.tsx index 1cdc7aa32533c..42bb1c718c88d 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.test.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.test.tsx @@ -16,7 +16,9 @@ import { LoadingIndicator } from './loading_indicator'; describe('kbnLoadingIndicator', () => { it('is hidden by default', () => { const wrapper = shallow(); - expect(wrapper.prop('data-test-subj')).toBe('globalLoadingIndicator-hidden'); + expect( + wrapper.findWhere((node) => node.prop('data-test-subj') === 'globalLoadingIndicator-hidden') + ).toHaveLength(1); expect(wrapper).toMatchSnapshot(); }); diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.tsx index 2c9d5f6b931d6..28b91a5714a03 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/loading_indicator.tsx @@ -7,6 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ +import { Global, css } from '@emotion/react'; import { EuiLoadingSpinner, EuiProgress, EuiIcon, EuiImage } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; @@ -14,8 +15,6 @@ import classNames from 'classnames'; import type { Subscription } from 'rxjs'; import type { HttpStart } from '@kbn/core-http-browser'; -import './loading_indicator.scss'; - export interface LoadingIndicatorProps { loadingCount$: ReturnType; showAsBar?: boolean; @@ -60,6 +59,12 @@ export class LoadingIndicator extends React.Component + return ( + <> + + {!this.props.showAsBar ? ( + logo + ) : ( + + )} + ); } } diff --git a/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap b/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap index 9fd84ce731847..52a55d3113173 100644 --- a/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap +++ b/packages/core/i18n/core-i18n-browser-internal/src/__snapshots__/i18n_service.test.tsx.snap @@ -144,6 +144,7 @@ exports[`#start() returns \`Context\` component 1`] = ` "euiFieldPassword.maskPassword": "Mask password", "euiFieldPassword.showPassword": "Show password as plain text. Note: this will visually expose your password on the screen.", "euiFieldSearch.clearSearchButtonLabel": "Clear search input", + "euiFieldValueSelectionFilter.buttonLabelHint": "Selection", "euiFilePicker.filesSelected": [Function], "euiFilePicker.promptText": "Select or drag and drop a file", "euiFilePicker.removeSelected": "Remove", diff --git a/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx b/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx index 732c43a0593c7..c48dffd8caa45 100644 --- a/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx +++ b/packages/core/i18n/core-i18n-browser-internal/src/i18n_eui_mapping.tsx @@ -1822,5 +1822,11 @@ export const getEuiContextMapping = (): EuiTokensObject => { defaultMessage: 'Select listbox', description: 'Accessible label for Super Selects without a visible label.', }), + 'euiFieldValueSelectionFilter.buttonLabelHint': i18n.translate( + 'core.euiFieldValueSelectionFilter.buttonLabelHint', + { + defaultMessage: 'Selection', + } + ), }; }; diff --git a/packages/kbn-alerting-types/search_strategy_types.ts b/packages/kbn-alerting-types/search_strategy_types.ts index 797ca82294b8a..9df72e4fa7886 100644 --- a/packages/kbn-alerting-types/search_strategy_types.ts +++ b/packages/kbn-alerting-types/search_strategy_types.ts @@ -8,7 +8,6 @@ */ import type { IEsSearchRequest, IEsSearchResponse } from '@kbn/search-types'; -import type { ValidFeatureId } from '@kbn/rule-data-utils'; import type { MappingRuntimeFields, QueryDslFieldAndFormat, @@ -18,7 +17,8 @@ import type { import type { Alert } from './alert_type'; export type RuleRegistrySearchRequest = IEsSearchRequest & { - featureIds: ValidFeatureId[]; + ruleTypeIds: string[]; + consumers?: string[]; fields?: QueryDslFieldAndFormat[]; query?: Pick; sort?: SortCombinations[]; diff --git a/packages/kbn-alerts-as-data-utils/src/schemas/generated/observability_threshold_schema.ts b/packages/kbn-alerts-as-data-utils/src/schemas/generated/observability_threshold_schema.ts new file mode 100644 index 0000000000000..2f08e082aebea --- /dev/null +++ b/packages/kbn-alerts-as-data-utils/src/schemas/generated/observability_threshold_schema.ts @@ -0,0 +1,90 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ +// ---------------------------------- WARNING ---------------------------------- +// this file was generated, and should not be edited by hand +// ---------------------------------- WARNING ---------------------------------- +import * as rt from 'io-ts'; +import { Either } from 'fp-ts/lib/Either'; +import { AlertSchema } from './alert_schema'; +import { EcsSchema } from './ecs_schema'; +const ISO_DATE_PATTERN = /^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$/; +export const IsoDateString = new rt.Type( + 'IsoDateString', + rt.string.is, + (input, context): Either => { + if (typeof input === 'string' && ISO_DATE_PATTERN.test(input)) { + return rt.success(input); + } else { + return rt.failure(input, context); + } + }, + rt.identity +); +export type IsoDateStringC = typeof IsoDateString; +export const schemaUnknown = rt.unknown; +export const schemaUnknownArray = rt.array(rt.unknown); +export const schemaString = rt.string; +export const schemaStringArray = rt.array(schemaString); +export const schemaNumber = rt.number; +export const schemaNumberArray = rt.array(schemaNumber); +export const schemaDate = rt.union([IsoDateString, schemaNumber]); +export const schemaDateArray = rt.array(schemaDate); +export const schemaDateRange = rt.partial({ + gte: schemaDate, + lte: schemaDate, +}); +export const schemaDateRangeArray = rt.array(schemaDateRange); +export const schemaStringOrNumber = rt.union([schemaString, schemaNumber]); +export const schemaStringOrNumberArray = rt.array(schemaStringOrNumber); +export const schemaBoolean = rt.boolean; +export const schemaBooleanArray = rt.array(schemaBoolean); +const schemaGeoPointCoords = rt.type({ + type: schemaString, + coordinates: schemaNumberArray, +}); +const schemaGeoPointString = schemaString; +const schemaGeoPointLatLon = rt.type({ + lat: schemaNumber, + lon: schemaNumber, +}); +const schemaGeoPointLocation = rt.type({ + location: schemaNumberArray, +}); +const schemaGeoPointLocationString = rt.type({ + location: schemaString, +}); +export const schemaGeoPoint = rt.union([ + schemaGeoPointCoords, + schemaGeoPointString, + schemaGeoPointLatLon, + schemaGeoPointLocation, + schemaGeoPointLocationString, +]); +export const schemaGeoPointArray = rt.array(schemaGeoPoint); +// prettier-ignore +const ObservabilityThresholdAlertRequired = rt.type({ +}); +// prettier-ignore +const ObservabilityThresholdAlertOptional = rt.partial({ + 'kibana.alert.context': schemaUnknown, + 'kibana.alert.evaluation.threshold': schemaStringOrNumber, + 'kibana.alert.evaluation.value': schemaStringOrNumber, + 'kibana.alert.evaluation.values': schemaStringOrNumberArray, + 'kibana.alert.group': rt.array( + rt.partial({ + field: schemaStringArray, + value: schemaStringArray, + }) + ), +}); + +// prettier-ignore +export const ObservabilityThresholdAlertSchema = rt.intersection([ObservabilityThresholdAlertRequired, ObservabilityThresholdAlertOptional, AlertSchema, EcsSchema]); +// prettier-ignore +export type ObservabilityThresholdAlert = rt.TypeOf; diff --git a/packages/kbn-alerts-grouping/src/components/alerts_grouping.test.tsx b/packages/kbn-alerts-grouping/src/components/alerts_grouping.test.tsx index 86ae0a54f9224..0137953b2313c 100644 --- a/packages/kbn-alerts-grouping/src/components/alerts_grouping.test.tsx +++ b/packages/kbn-alerts-grouping/src/components/alerts_grouping.test.tsx @@ -23,7 +23,8 @@ import { groupingSearchResponse } from '../mocks/grouping_query.mock'; import { useAlertsGroupingState } from '../contexts/alerts_grouping_context'; import { I18nProvider } from '@kbn/i18n-react'; import { - mockFeatureIds, + mockRuleTypeIds, + mockConsumers, mockDate, mockGroupingProps, mockGroupingId, @@ -146,7 +147,8 @@ describe('AlertsGrouping', () => { expect.objectContaining({ params: { aggregations: {}, - featureIds: mockFeatureIds, + ruleTypeIds: mockRuleTypeIds, + consumers: mockConsumers, groupByField: 'kibana.alert.rule.name', filters: [ { diff --git a/packages/kbn-alerts-grouping/src/components/alerts_grouping.tsx b/packages/kbn-alerts-grouping/src/components/alerts_grouping.tsx index d814d70903a5c..5ea010d442145 100644 --- a/packages/kbn-alerts-grouping/src/components/alerts_grouping.tsx +++ b/packages/kbn-alerts-grouping/src/components/alerts_grouping.tsx @@ -66,7 +66,7 @@ const AlertsGroupingInternal = ( const { groupingId, services, - featureIds, + ruleTypeIds, defaultGroupingOptions, defaultFilters, globalFilters, @@ -79,7 +79,7 @@ const AlertsGroupingInternal = ( const { grouping, updateGrouping } = useAlertsGroupingState(groupingId); const { dataView } = useAlertsDataView({ - featureIds, + ruleTypeIds, dataViewsService: dataViews, http, toasts: notifications.toasts, @@ -252,7 +252,7 @@ const typedMemo: (c: T) => T = memo; * * return ( * - * featureIds={[...]} + * ruleTypeIds={[...]} * globalQuery={{ query: ..., language: 'kql' }} * globalFilters={...} * from={...} diff --git a/packages/kbn-alerts-grouping/src/components/alerts_grouping_level.test.tsx b/packages/kbn-alerts-grouping/src/components/alerts_grouping_level.test.tsx index 5548c14fcf26f..b908b07caf7a1 100644 --- a/packages/kbn-alerts-grouping/src/components/alerts_grouping_level.test.tsx +++ b/packages/kbn-alerts-grouping/src/components/alerts_grouping_level.test.tsx @@ -55,6 +55,10 @@ const mockGroupingLevelProps: Omit = { describe('AlertsGroupingLevel', () => { let buildEsQuerySpy: jest.SpyInstance; + beforeEach(() => { + jest.clearAllMocks(); + }); + beforeAll(() => { buildEsQuerySpy = jest.spyOn(buildEsQueryModule, 'buildEsQuery'); }); @@ -119,4 +123,58 @@ describe('AlertsGroupingLevel', () => { Object.keys(groupingSearchResponse.aggregations) ); }); + + it('should calls useGetAlertsGroupAggregationsQuery with correct props', () => { + render( + + {() => } + + ); + + expect(mockUseGetAlertsGroupAggregationsQuery.mock.calls).toMatchInlineSnapshot(` + Array [ + Array [ + Object { + "enabled": true, + "http": Object { + "get": [MockFunction], + }, + "params": Object { + "aggregations": Object {}, + "consumers": Array [ + "stackAlerts", + ], + "filters": Array [ + Object { + "bool": Object { + "filter": Array [], + "must": Array [], + "must_not": Array [], + "should": Array [], + }, + }, + Object { + "range": Object { + "kibana.alert.time_range": Object { + "gte": "2020-07-07T08:20:18.966Z", + "lte": "2020-07-08T08:20:18.966Z", + }, + }, + }, + ], + "groupByField": "selectedGroup", + "pageIndex": 0, + "pageSize": 10, + "ruleTypeIds": Array [ + ".es-query", + ], + }, + "toasts": Object { + "addDanger": [MockFunction], + }, + }, + ], + ] + `); + }); }); diff --git a/packages/kbn-alerts-grouping/src/components/alerts_grouping_level.tsx b/packages/kbn-alerts-grouping/src/components/alerts_grouping_level.tsx index 7e620276d2e4d..02fd5d33e2379 100644 --- a/packages/kbn-alerts-grouping/src/components/alerts_grouping_level.tsx +++ b/packages/kbn-alerts-grouping/src/components/alerts_grouping_level.tsx @@ -46,7 +46,8 @@ const DEFAULT_FILTERS: Filter[] = []; const typedMemo: (c: T) => T = memo; export const AlertsGroupingLevel = typedMemo( ({ - featureIds, + ruleTypeIds, + consumers, defaultFilters = DEFAULT_FILTERS, from, getGrouping, @@ -86,7 +87,8 @@ export const AlertsGroupingLevel = typedMemo( const aggregationsQuery = useMemo(() => { return { - featureIds, + ruleTypeIds, + consumers, groupByField: selectedGroup, aggregations: getAggregationsByGroupingField(selectedGroup)?.reduce( (acc, val) => Object.assign(acc, val), @@ -107,12 +109,13 @@ export const AlertsGroupingLevel = typedMemo( pageSize, }; }, [ - featureIds, + consumers, filters, from, getAggregationsByGroupingField, pageIndex, pageSize, + ruleTypeIds, selectedGroup, to, ]); diff --git a/packages/kbn-alerts-grouping/src/mocks/grouping_props.mock.tsx b/packages/kbn-alerts-grouping/src/mocks/grouping_props.mock.tsx index 925a32fbd9de6..510c7c8fdb896 100644 --- a/packages/kbn-alerts-grouping/src/mocks/grouping_props.mock.tsx +++ b/packages/kbn-alerts-grouping/src/mocks/grouping_props.mock.tsx @@ -8,12 +8,12 @@ */ import React from 'react'; -import { AlertConsumers } from '@kbn/rule-data-utils'; import { AlertsGroupingProps } from '../types'; export const mockGroupingId = 'test'; -export const mockFeatureIds = [AlertConsumers.STACK_ALERTS]; +export const mockRuleTypeIds = ['.es-query']; +export const mockConsumers = ['stackAlerts']; export const mockDate = { from: '2020-07-07T08:20:18.966Z', @@ -30,7 +30,8 @@ export const mockOptions = [ export const mockGroupingProps: Omit = { ...mockDate, groupingId: mockGroupingId, - featureIds: mockFeatureIds, + ruleTypeIds: mockRuleTypeIds, + consumers: mockConsumers, defaultGroupingOptions: mockOptions, getAggregationsByGroupingField: () => [], getGroupStats: () => [{ title: 'Stat', component: }], diff --git a/packages/kbn-alerts-grouping/src/mocks/grouping_query.mock.ts b/packages/kbn-alerts-grouping/src/mocks/grouping_query.mock.ts index 8820f884928b7..486771e70a140 100644 --- a/packages/kbn-alerts-grouping/src/mocks/grouping_query.mock.ts +++ b/packages/kbn-alerts-grouping/src/mocks/grouping_query.mock.ts @@ -11,12 +11,12 @@ export const getQuery = ({ selectedGroup, uniqueValue, timeRange, - featureIds, + ruleTypeIds, }: { selectedGroup: string; uniqueValue: string; timeRange: { from: string; to: string }; - featureIds: string[]; + ruleTypeIds: string[]; }) => ({ _source: false, aggs: { @@ -52,7 +52,7 @@ export const getQuery = ({ }, }, }, - feature_ids: featureIds, + rule_type_ids: ruleTypeIds, query: { bool: { filter: [ diff --git a/packages/kbn-alerts-grouping/src/types.ts b/packages/kbn-alerts-grouping/src/types.ts index c6132e94e8729..f1eb9ef00fee8 100644 --- a/packages/kbn-alerts-grouping/src/types.ts +++ b/packages/kbn-alerts-grouping/src/types.ts @@ -8,7 +8,6 @@ */ import type { Filter, Query } from '@kbn/es-query'; -import { ValidFeatureId } from '@kbn/rule-data-utils'; import type { NotificationsStart } from '@kbn/core-notifications-browser'; import type { DataViewsServicePublic } from '@kbn/data-views-plugin/public/types'; import type { HttpSetup } from '@kbn/core-http-browser'; @@ -63,9 +62,13 @@ export interface AlertsGroupingProps< */ defaultGroupingOptions: GroupOption[]; /** - * The alerting feature ids this grouping covers + * The alerting rule type ids this grouping covers */ - featureIds: ValidFeatureId[]; + ruleTypeIds: string[]; + /** + * The alerting consumers this grouping covers + */ + consumers?: string[]; /** * Time filter start */ diff --git a/packages/kbn-alerts-ui-shared/index.ts b/packages/kbn-alerts-ui-shared/index.ts index a81942a5f956c..c579fa7ed74fd 100644 --- a/packages/kbn-alerts-ui-shared/index.ts +++ b/packages/kbn-alerts-ui-shared/index.ts @@ -19,3 +19,7 @@ export type { AlertsSearchBarProps } from './src/alerts_search_bar/types'; export * from './src/alert_fields_table'; export * from './src/alert_filter_controls/types'; export * from './src/common/types'; +export * from './src/check_action_type_enabled'; +export * from './src/action_variables'; + +export { useFetchFlappingSettings } from './src/common/hooks/use_fetch_flapping_settings'; diff --git a/packages/kbn-alerts-ui-shared/lib/README.md b/packages/kbn-alerts-ui-shared/lib/README.md new file mode 100644 index 0000000000000..3034f4804bd7c --- /dev/null +++ b/packages/kbn-alerts-ui-shared/lib/README.md @@ -0,0 +1 @@ +Export files in here that are only meant to be used by other KBN packages and not directly imported by plugins. This helps to keep bundle sizes efficient. diff --git a/packages/kbn-alerts-ui-shared/lib/index.ts b/packages/kbn-alerts-ui-shared/lib/index.ts new file mode 100644 index 0000000000000..808c936f18d27 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/lib/index.ts @@ -0,0 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +export * from '../src/common/type_registry'; +export * from '../src/rule_settings'; diff --git a/packages/kbn-alerts-ui-shared/src/action_variables/transforms.test.ts b/packages/kbn-alerts-ui-shared/src/action_variables/transforms.test.ts index d574aaf9592a9..8411ff911e284 100644 --- a/packages/kbn-alerts-ui-shared/src/action_variables/transforms.test.ts +++ b/packages/kbn-alerts-ui-shared/src/action_variables/transforms.test.ts @@ -9,7 +9,7 @@ import { ActionVariables, RuleType } from '@kbn/triggers-actions-ui-types'; import { transformActionVariables } from './transforms'; -import { ALERTING_FEATURE_ID } from '../rule_form'; +import { ALERTING_FEATURE_ID } from '../common/constants'; beforeEach(() => jest.resetAllMocks()); @@ -289,5 +289,6 @@ function getAlertType(actionVariables: ActionVariables): RuleType { producer: ALERTING_FEATURE_ID, minimumLicenseRequired: 'basic', enabledInLicense: true, + category: 'my-category', }; } diff --git a/packages/kbn-alerts-ui-shared/src/alert_filter_controls/alert_filter_controls.test.tsx b/packages/kbn-alerts-ui-shared/src/alert_filter_controls/alert_filter_controls.test.tsx index 3c314c62fc28c..6c35234b54006 100644 --- a/packages/kbn-alerts-ui-shared/src/alert_filter_controls/alert_filter_controls.test.tsx +++ b/packages/kbn-alerts-ui-shared/src/alert_filter_controls/alert_filter_controls.test.tsx @@ -10,7 +10,6 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; import { AlertFilterControls, AlertFilterControlsProps } from './alert_filter_controls'; -import { AlertConsumers } from '@kbn/rule-data-utils'; import { DEFAULT_CONTROLS } from './constants'; import { useAlertsDataView } from '../common/hooks/use_alerts_data_view'; import { FilterGroup } from './filter_group'; @@ -56,7 +55,7 @@ const ControlGroupRenderer = (() => ( describe('AlertFilterControls', () => { const props: AlertFilterControlsProps = { - featureIds: [AlertConsumers.STACK_ALERTS], + ruleTypeIds: ['.es-query'], defaultControls: DEFAULT_CONTROLS, dataViewSpec: { id: 'alerts-filters-dv', diff --git a/packages/kbn-alerts-ui-shared/src/alert_filter_controls/alert_filter_controls.tsx b/packages/kbn-alerts-ui-shared/src/alert_filter_controls/alert_filter_controls.tsx index e8e7e63859250..f64b02e2ee350 100644 --- a/packages/kbn-alerts-ui-shared/src/alert_filter_controls/alert_filter_controls.tsx +++ b/packages/kbn-alerts-ui-shared/src/alert_filter_controls/alert_filter_controls.tsx @@ -12,7 +12,6 @@ import React, { useCallback, useEffect, useState } from 'react'; import type { Filter } from '@kbn/es-query'; import { EuiFlexItem } from '@elastic/eui'; import type { DataViewSpec, DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; -import { AlertConsumers } from '@kbn/rule-data-utils'; import { HttpStart } from '@kbn/core-http-browser'; import { NotificationsStart } from '@kbn/core-notifications-browser'; import type { Storage } from '@kbn/kibana-utils-plugin/public'; @@ -24,12 +23,12 @@ import { FilterControlConfig } from './types'; export type AlertFilterControlsProps = Omit< ComponentProps, - 'dataViewId' | 'defaultControls' | 'featureIds' | 'Storage' + 'dataViewId' | 'defaultControls' | 'ruleTypeIds' | 'Storage' > & { /** - * The feature ids used to get the correct alert data view(s) + * The rule type ids used to get the correct alert data view(s) */ - featureIds?: AlertConsumers[]; + ruleTypeIds?: string[]; /** * An array of default control configurations */ @@ -57,7 +56,7 @@ export type AlertFilterControlsProps = Omit< * * { const { - featureIds = [AlertConsumers.STACK_ALERTS], + ruleTypeIds = [], defaultControls = DEFAULT_CONTROLS, dataViewSpec, onFiltersChange, @@ -96,7 +95,7 @@ export const AlertFilterControls = (props: AlertFilterControlsProps) => { } = props; const [loadingPageFilters, setLoadingPageFilters] = useState(true); const { dataView, isLoading: isLoadingDataView } = useAlertsDataView({ - featureIds, + ruleTypeIds, dataViewsService: dataViews, http, toasts, @@ -156,7 +155,7 @@ export const AlertFilterControls = (props: AlertFilterControlsProps) => { > = (props) => { ) => { const { - featureIds, dataViewId, onFiltersChange, timeRange, @@ -59,6 +58,7 @@ export const FilterGroup = (props: PropsWithChildren) => { maxControls = Infinity, ControlGroupRenderer, Storage, + ruleTypeIds, storageKey, } = props; @@ -80,8 +80,8 @@ export const FilterGroup = (props: PropsWithChildren) => { const [controlGroup, setControlGroup] = useState(); const localStoragePageFilterKey = useMemo( - () => storageKey ?? `${featureIds.join(',')}.${spaceId}.${URL_PARAM_KEY}`, - [featureIds, spaceId, storageKey] + () => storageKey ?? `${ruleTypeIds.join(',')}.${spaceId}.${URL_PARAM_KEY}`, + [ruleTypeIds, spaceId, storageKey] ); const currentFiltersRef = useRef(); diff --git a/packages/kbn-alerts-ui-shared/src/alert_filter_controls/types.ts b/packages/kbn-alerts-ui-shared/src/alert_filter_controls/types.ts index 19a76c76ff6f8..ed625897a418e 100644 --- a/packages/kbn-alerts-ui-shared/src/alert_filter_controls/types.ts +++ b/packages/kbn-alerts-ui-shared/src/alert_filter_controls/types.ts @@ -15,7 +15,6 @@ import type { ControlGroupRendererApi, } from '@kbn/controls-plugin/public'; import type { Storage } from '@kbn/kibana-utils-plugin/public'; -import { AlertConsumers } from '@kbn/rule-data-utils'; export type FilterUrlFormat = Record< string, @@ -46,7 +45,7 @@ export interface FilterGroupProps extends Pick ( + ); +}; diff --git a/packages/kbn-grid-layout/grid/grid_panel/grid_panel.test.tsx b/packages/kbn-grid-layout/grid/grid_panel/grid_panel.test.tsx new file mode 100644 index 0000000000000..2829a320abab4 --- /dev/null +++ b/packages/kbn-grid-layout/grid/grid_panel/grid_panel.test.tsx @@ -0,0 +1,68 @@ +/* + * 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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +import React from 'react'; +import { render, screen, fireEvent } from '@testing-library/react'; +import { GridPanel, GridPanelProps } from './grid_panel'; +import { gridLayoutStateManagerMock } from '../test_utils/mocks'; + +describe('GridPanel', () => { + const mockRenderPanelContents = jest.fn((panelId) =>
    Panel Content {panelId}
    ); + const mockInteractionStart = jest.fn(); + + const renderGridPanel = (propsOverrides: Partial = {}) => { + return render( + + ); + }; + afterEach(() => { + jest.clearAllMocks(); + }); + + it('renders panel contents correctly', () => { + renderGridPanel(); + expect(screen.getByText('Panel Content panel1')).toBeInTheDocument(); + }); + + describe('drag handle interaction', () => { + it('calls `drag` interactionStart on mouse down', () => { + renderGridPanel(); + const dragHandle = screen.getByRole('button', { name: /drag to move/i }); + fireEvent.mouseDown(dragHandle); + expect(mockInteractionStart).toHaveBeenCalledWith('drag', expect.any(Object)); + }); + it('calls `drop` interactionStart on mouse up', () => { + renderGridPanel(); + const dragHandle = screen.getByRole('button', { name: /drag to move/i }); + fireEvent.mouseUp(dragHandle); + expect(mockInteractionStart).toHaveBeenCalledWith('drop', expect.any(Object)); + }); + }); + describe('resize handle interaction', () => { + it('calls `resize` interactionStart on mouse down', () => { + renderGridPanel(); + const resizeHandle = screen.getByRole('button', { name: /resize/i }); + fireEvent.mouseDown(resizeHandle); + expect(mockInteractionStart).toHaveBeenCalledWith('resize', expect.any(Object)); + }); + it('calls `drop` interactionStart on mouse up', () => { + renderGridPanel(); + const resizeHandle = screen.getByRole('button', { name: /resize/i }); + fireEvent.mouseUp(resizeHandle); + expect(mockInteractionStart).toHaveBeenCalledWith('drop', expect.any(Object)); + }); + }); +}); diff --git a/packages/kbn-grid-layout/grid/grid_panel.tsx b/packages/kbn-grid-layout/grid/grid_panel/grid_panel.tsx similarity index 67% rename from packages/kbn-grid-layout/grid/grid_panel.tsx rename to packages/kbn-grid-layout/grid/grid_panel/grid_panel.tsx index 91f935f4507f1..e817f5fc3871b 100644 --- a/packages/kbn-grid-layout/grid/grid_panel.tsx +++ b/packages/kbn-grid-layout/grid/grid_panel/grid_panel.tsx @@ -10,39 +10,30 @@ import React, { forwardRef, useEffect, useMemo } from 'react'; import { combineLatest, skip } from 'rxjs'; -import { - EuiIcon, - EuiPanel, - euiFullHeight, - transparentize, - useEuiOverflowScroll, - useEuiTheme, -} from '@elastic/eui'; +import { EuiPanel, euiFullHeight, useEuiOverflowScroll } from '@elastic/eui'; import { css } from '@emotion/react'; import { euiThemeVars } from '@kbn/ui-theme'; - -import { GridLayoutStateManager, PanelInteractionEvent } from './types'; -import { getKeysInOrder } from './utils/resolve_grid_row'; - -export const GridPanel = forwardRef< - HTMLDivElement, - { - panelId: string; - rowIndex: number; - renderPanelContents: (panelId: string) => React.ReactNode; - interactionStart: ( - type: PanelInteractionEvent['type'] | 'drop', - e: React.MouseEvent - ) => void; - gridLayoutStateManager: GridLayoutStateManager; - } ->( +import { GridLayoutStateManager, PanelInteractionEvent } from '../types'; +import { getKeysInOrder } from '../utils/resolve_grid_row'; +import { DragHandle } from './drag_handle'; +import { ResizeHandle } from './resize_handle'; + +export interface GridPanelProps { + panelId: string; + rowIndex: number; + renderPanelContents: (panelId: string) => React.ReactNode; + interactionStart: ( + type: PanelInteractionEvent['type'] | 'drop', + e: React.MouseEvent + ) => void; + gridLayoutStateManager: GridLayoutStateManager; +} + +export const GridPanel = forwardRef( ( { panelId, rowIndex, renderPanelContents, interactionStart, gridLayoutStateManager }, panelRef ) => { - const { euiTheme } = useEuiTheme(); - /** Set initial styles based on state at mount to prevent styles from "blipping" */ const initialStyles = useMemo(() => { const initialPanel = gridLayoutStateManager.gridLayout$.getValue()[rowIndex].panels[panelId]; @@ -158,7 +149,7 @@ export const GridPanel = forwardRef< const panel = allPanels[panelId]; if (!ref || !panel) return; - const sortedKeys = getKeysInOrder(gridLayout[rowIndex]); + const sortedKeys = getKeysInOrder(gridLayout[rowIndex].panels); const currentPanelPosition = sortedKeys.indexOf(panelId); const sortedKeysBefore = sortedKeys.slice(0, currentPanelPosition); const responsiveGridRowStart = sortedKeysBefore.reduce( @@ -180,7 +171,6 @@ export const GridPanel = forwardRef< // eslint-disable-next-line react-hooks/exhaustive-deps [] ); - /** * Memoize panel contents to prevent unnecessary re-renders */ @@ -189,93 +179,29 @@ export const GridPanel = forwardRef< }, [panelId, renderPanelContents]); return ( - <> -
    - + + +
    - {/* drag handle */} -
    interactionStart('drag', e)} - onMouseUp={(e) => interactionStart('drop', e)} - > - -
    - {/* Resize handle */} -
    interactionStart('resize', e)} - onMouseUp={(e) => interactionStart('drop', e)} - css={css` - right: 0; - bottom: 0; - opacity: 0; - margin: -2px; - position: absolute; - width: ${euiThemeVars.euiSizeL}; - height: ${euiThemeVars.euiSizeL}; - transition: opacity 0.2s, border 0.2s; - border-radius: 7px 0 7px 0; - border-bottom: 2px solid ${euiThemeVars.euiColorSuccess}; - border-right: 2px solid ${euiThemeVars.euiColorSuccess}; - :hover { - opacity: 1; - background-color: ${transparentize(euiThemeVars.euiColorSuccess, 0.05)}; - cursor: se-resize; - } - .kbnGrid--static & { - opacity: 0 !important; - display: none; - } - `} - /> -
    - {panelContents} -
    - -
    - + {panelContents} +
    + +
    +
    ); } ); diff --git a/packages/kbn-grid-layout/grid/grid_panel/index.tsx b/packages/kbn-grid-layout/grid/grid_panel/index.tsx new file mode 100644 index 0000000000000..e286fc92fd9f7 --- /dev/null +++ b/packages/kbn-grid-layout/grid/grid_panel/index.tsx @@ -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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +export { GridPanel } from './grid_panel'; diff --git a/packages/kbn-grid-layout/grid/grid_panel/resize_handle.tsx b/packages/kbn-grid-layout/grid/grid_panel/resize_handle.tsx new file mode 100644 index 0000000000000..4c4a2d60ee5cb --- /dev/null +++ b/packages/kbn-grid-layout/grid/grid_panel/resize_handle.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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +import React from 'react'; + +import { transparentize } from '@elastic/eui'; +import { css } from '@emotion/react'; +import { euiThemeVars } from '@kbn/ui-theme'; +import { i18n } from '@kbn/i18n'; +import { PanelInteractionEvent } from '../types'; + +export const ResizeHandle = ({ + interactionStart, +}: { + interactionStart: ( + type: PanelInteractionEvent['type'] | 'drop', + e: React.MouseEvent + ) => void; +}) => { + return ( + +)); + +const runtimeSettings$ = new BehaviorSubject({ + ...gridSettings, + columnPixelWidth: 0, +}); + +export const gridLayoutStateManagerMock: GridLayoutStateManager = { + expandedPanelId$: new BehaviorSubject(undefined), + isMobileView$: new BehaviorSubject(false), + gridLayout$, + runtimeSettings$, + panelRefs: { current: [] }, + rowRefs: { current: [] }, + interactionEvent$: new BehaviorSubject(undefined), + activePanel$: new BehaviorSubject(undefined), + gridDimensions$: new BehaviorSubject({ width: 600, height: 900 }), +}; diff --git a/packages/kbn-grid-layout/grid/test_utils/sample_layout.ts b/packages/kbn-grid-layout/grid/test_utils/sample_layout.ts new file mode 100644 index 0000000000000..035a6f1dda2ee --- /dev/null +++ b/packages/kbn-grid-layout/grid/test_utils/sample_layout.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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +import { GridLayoutData } from '../types'; + +export const getSampleLayout = (): GridLayoutData => [ + { + title: 'Large section', + isCollapsed: false, + panels: { + panel1: { + id: 'panel1', + row: 0, + column: 0, + width: 12, + height: 6, + }, + panel2: { + id: 'panel2', + row: 6, + column: 0, + width: 8, + height: 4, + }, + panel3: { + id: 'panel3', + row: 6, + column: 8, + width: 12, + height: 4, + }, + panel4: { + id: 'panel4', + row: 10, + column: 0, + width: 48, + height: 4, + }, + panel5: { + id: 'panel5', + row: 0, + column: 12, + width: 36, + height: 6, + }, + panel6: { + id: 'panel6', + row: 6, + column: 24, + width: 24, + height: 4, + }, + panel7: { + id: 'panel7', + row: 6, + column: 20, + width: 4, + height: 2, + }, + panel8: { + id: 'panel8', + row: 8, + column: 20, + width: 4, + height: 2, + }, + }, + }, + { + title: 'Small section', + isCollapsed: false, + panels: { + panel9: { + id: 'panel9', + row: 0, + column: 0, + width: 12, + height: 16, + }, + }, + }, + { + title: 'Another small section', + isCollapsed: false, + panels: { + panel10: { + id: 'panel10', + row: 0, + column: 24, + width: 12, + height: 6, + }, + }, + }, +]; diff --git a/packages/kbn-grid-layout/grid/use_grid_layout_events.ts b/packages/kbn-grid-layout/grid/use_grid_layout_events.ts index 9a6d6d2303909..64cc8f482838e 100644 --- a/packages/kbn-grid-layout/grid/use_grid_layout_events.ts +++ b/packages/kbn-grid-layout/grid/use_grid_layout_events.ts @@ -87,6 +87,7 @@ export const useGridLayoutEvents = ({ bottom: mouseTargetPixel.y - interactionEvent.mouseOffsets.bottom, right: mouseTargetPixel.x - interactionEvent.mouseOffsets.right, }; + gridLayoutStateManager.activePanel$.next({ id: interactionEvent.id, position: previewRect }); // find the grid that the preview rect is over diff --git a/packages/kbn-grid-layout/grid/utils/resolve_grid_row.ts b/packages/kbn-grid-layout/grid/utils/resolve_grid_row.ts index 9a6f28d006e0a..38b778b5d0571 100644 --- a/packages/kbn-grid-layout/grid/utils/resolve_grid_row.ts +++ b/packages/kbn-grid-layout/grid/utils/resolve_grid_row.ts @@ -34,11 +34,11 @@ const getAllCollisionsWithPanel = ( return collidingPanels; }; -export const getKeysInOrder = (rowData: GridRowData, draggedId?: string): string[] => { - const panelKeys = Object.keys(rowData.panels); +export const getKeysInOrder = (panels: GridRowData['panels'], draggedId?: string): string[] => { + const panelKeys = Object.keys(panels); return panelKeys.sort((panelKeyA, panelKeyB) => { - const panelA = rowData.panels[panelKeyA]; - const panelB = rowData.panels[panelKeyB]; + const panelA = panels[panelKeyA]; + const panelB = panels[panelKeyB]; // sort by row first if (panelA.row > panelB.row) return 1; @@ -60,7 +60,7 @@ export const getKeysInOrder = (rowData: GridRowData, draggedId?: string): string const compactGridRow = (originalLayout: GridRowData) => { const nextRowData = { ...originalLayout, panels: { ...originalLayout.panels } }; // compact all vertical space. - const sortedKeysAfterMove = getKeysInOrder(nextRowData); + const sortedKeysAfterMove = getKeysInOrder(nextRowData.panels); for (const panelKey of sortedKeysAfterMove) { const panel = nextRowData.panels[panelKey]; // try moving panel up one row at a time until it collides @@ -90,7 +90,7 @@ export const resolveGridRow = ( // return nextRowData; // push all panels down if they collide with another panel - const sortedKeys = getKeysInOrder(nextRowData, dragRequest?.id); + const sortedKeys = getKeysInOrder(nextRowData.panels, dragRequest?.id); for (const key of sortedKeys) { const panel = nextRowData.panels[key]; diff --git a/packages/kbn-grid-layout/tsconfig.json b/packages/kbn-grid-layout/tsconfig.json index f0dd3232a42d5..bd16ae0f0adeb 100644 --- a/packages/kbn-grid-layout/tsconfig.json +++ b/packages/kbn-grid-layout/tsconfig.json @@ -2,12 +2,6 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", - "types": [ - "jest", - "node", - "react", - "@emotion/react/types/css-prop" - ] }, "include": [ "**/*.ts", diff --git a/packages/kbn-management/settings/setting_ids/index.ts b/packages/kbn-management/settings/setting_ids/index.ts index 9a7c95917878a..438e216ab8f32 100644 --- a/packages/kbn-management/settings/setting_ids/index.ts +++ b/packages/kbn-management/settings/setting_ids/index.ts @@ -87,8 +87,6 @@ export const DISCOVER_SHOW_MULTI_FIELDS_ID = 'discover:showMultiFields'; export const DISCOVER_SORT_DEFAULT_ORDER_ID = 'discover:sort:defaultOrder'; export const DOC_TABLE_HIDE_TIME_COLUMNS_ID = 'doc_table:hideTimeColumn'; export const DOC_TABLE_HIGHLIGHT_ID = 'doc_table:highlight'; -export const DOC_TABLE_LEGACY_ID = 'doc_table:legacy'; -export const TRUNCATE_MAX_HEIGHT_ID = 'truncate:maxHeight'; // Machine learning settings export const ML_ANOMALY_DETECTION_RESULTS_ENABLE_TIME_DEFAULTS_ID = diff --git a/packages/kbn-monaco/src/console/lexer_rules/nested_painless.ts b/packages/kbn-monaco/src/console/lexer_rules/nested_painless.ts new file mode 100644 index 0000000000000..8b4fcda56a64a --- /dev/null +++ b/packages/kbn-monaco/src/console/lexer_rules/nested_painless.ts @@ -0,0 +1,71 @@ +/* + * 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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +import { lexerRules as painlessLexerRules } from '../../painless/lexer_rules'; + +/* + * This rule is used inside json root to start a painless highlighting sequence + */ +export const buildPainlessStartRule = (painlessRoot: string = 'painless_root') => { + return [ + /("(?:[^"]*_)?script"|"inline"|"source")(\s*?)(:)(\s*?)(""")/, + [ + 'variable', + 'whitespace', + 'punctuation.colon', + 'whitespace', + { + token: 'punctuation', + next: `@${painlessRoot}`, + }, + ], + ]; +}; + +/* + * This function creates a group of rules needed for painless highlighting in console. + * It reuses the lexer rules from the "painless" language, but since not all rules are referenced in the root + * tokenizer and to avoid conflicts with existing console rules, only selected rules are used. + */ +export const buildPainlessRules = (painlessRoot: string = 'painless_root') => { + // eslint-disable-next-line @typescript-eslint/naming-convention + const { root, comment, string_dq, string_sq } = painlessLexerRules.tokenizer; + return { + [painlessRoot]: [ + // the rule to end painless highlighting and get back to the previous tokenizer state + [ + /"""/, + { + token: 'punctuation', + next: '@pop', + }, + ], + ...root, + ], + comment, + string_dq, + string_sq, + }; +}; + +/* + * These language attributes need to be added to the console language definition for painless tokenizer + * to work correctly. + */ +export const painlessLanguageAttributes = { + keywords: painlessLexerRules.keywords, + primitives: painlessLexerRules.primitives, + constants: painlessLexerRules.constants, + operators: painlessLexerRules.operators, + symbols: painlessLexerRules.symbols, + digits: painlessLexerRules.digits, + octaldigits: painlessLexerRules.octaldigits, + binarydigits: painlessLexerRules.binarydigits, + hexdigits: painlessLexerRules.hexdigits, +}; diff --git a/packages/kbn-monaco/src/console/lexer_rules/shared.ts b/packages/kbn-monaco/src/console/lexer_rules/shared.ts index 62c8a28d31c65..b508d5954a3f7 100644 --- a/packages/kbn-monaco/src/console/lexer_rules/shared.ts +++ b/packages/kbn-monaco/src/console/lexer_rules/shared.ts @@ -8,6 +8,11 @@ */ import { buildSqlRules, buildSqlStartRule, sqlLanguageAttributes } from './nested_sql'; +import { + buildPainlessRules, + buildPainlessStartRule, + painlessLanguageAttributes, +} from './nested_painless'; import { monaco } from '../../..'; import { globals } from '../../common/lexer_rules'; import { buildXjsonRules } from '../../xjson/lexer_rules/xjson'; @@ -16,11 +21,13 @@ export const consoleSharedLanguageConfiguration: monaco.languages.LanguageConfig brackets: [ ['{', '}'], ['[', ']'], + ['(', ')'], ['"""', '"""\n'], ], autoClosingPairs: [ { open: '{', close: '}' }, { open: '[', close: ']' }, + { open: '(', close: ')' }, { open: '"', close: '"' }, { open: '"""', close: '"""' }, ], @@ -100,10 +107,13 @@ xjsonRules.json_root = [ matchToken('variable.template', /("\${\w+}")/), // @ts-expect-error include a rule to start sql highlighting buildSqlStartRule(), + // @ts-expect-error include a rule to start painless highlighting + buildPainlessStartRule(), ...xjsonRules.json_root, ]; const sqlRules = buildSqlRules(); +const painlessRules = buildPainlessRules(); /* Lexer rules that are shared between the Console editor and the Console output panel. */ @@ -111,6 +121,8 @@ export const consoleSharedLexerRules: monaco.languages.IMonarchLanguage = { ...(globals as any), defaultToken: 'invalid', ...sqlLanguageAttributes, + ...painlessLanguageAttributes, + keywords: [...sqlLanguageAttributes.keywords, ...painlessLanguageAttributes.keywords], tokenizer: { root: [ // warning comment @@ -138,5 +150,7 @@ export const consoleSharedLexerRules: monaco.languages.IMonarchLanguage = { ...xjsonRules, // include sql rules ...sqlRules, + // include painless rules + ...painlessRules, }, }; diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 6f4f35cd72600..b1b4cb38d3f19 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -5,6 +5,7 @@ pageLoadAssetSize: aiops: 17680 alerting: 106936 apm: 64385 + assetInventory: 18478 banners: 17946 bfetch: 22837 canvas: 29355 diff --git a/packages/kbn-reporting/get_csv_panel_actions/panel_actions/get_csv_panel_action.test.ts b/packages/kbn-reporting/get_csv_panel_actions/panel_actions/get_csv_panel_action.test.ts index 6eaa3e933980b..fec671825a0b8 100644 --- a/packages/kbn-reporting/get_csv_panel_actions/panel_actions/get_csv_panel_action.test.ts +++ b/packages/kbn-reporting/get_csv_panel_actions/panel_actions/get_csv_panel_action.test.ts @@ -119,7 +119,6 @@ describe('GetCsvReportPanelAction', () => { core, apiClient, startServices$: mockStartServices$, - usesUiCapabilities: true, csvConfig, }); @@ -154,7 +153,6 @@ describe('GetCsvReportPanelAction', () => { core, apiClient, startServices$: mockStartServices$, - usesUiCapabilities: true, csvConfig, }); @@ -177,7 +175,6 @@ describe('GetCsvReportPanelAction', () => { core, apiClient, startServices$: mockStartServices$, - usesUiCapabilities: true, csvConfig, }); @@ -197,7 +194,6 @@ describe('GetCsvReportPanelAction', () => { core, apiClient, startServices$: mockStartServices$, - usesUiCapabilities: true, csvConfig, }); @@ -219,7 +215,6 @@ describe('GetCsvReportPanelAction', () => { core, apiClient, startServices$: mockStartServices$, - usesUiCapabilities: true, csvConfig, }); @@ -232,7 +227,6 @@ describe('GetCsvReportPanelAction', () => { core, apiClient, startServices$: mockStartServices$, - usesUiCapabilities: true, csvConfig, }); @@ -249,7 +243,6 @@ describe('GetCsvReportPanelAction', () => { core, apiClient, startServices$: mockStartServices$, - usesUiCapabilities: true, csvConfig, }); @@ -263,7 +256,6 @@ describe('GetCsvReportPanelAction', () => { core, apiClient, startServices$: mockStartServices$, - usesUiCapabilities: true, csvConfig, }); @@ -271,17 +263,5 @@ describe('GetCsvReportPanelAction', () => { expect(await plugin.isCompatible(context)).toEqual(true); }); - - it(`allows csv generation when license is valid and deprecated roles config is enabled`, async () => { - const plugin = new ReportingCsvPanelAction({ - core, - apiClient, - startServices$: mockStartServices$, - usesUiCapabilities: false, - csvConfig, - }); - - expect(await plugin.isCompatible(context)).toEqual(true); - }); }); }); diff --git a/packages/kbn-reporting/get_csv_panel_actions/panel_actions/get_csv_panel_action.tsx b/packages/kbn-reporting/get_csv_panel_actions/panel_actions/get_csv_panel_action.tsx index 65712496519f7..19c6a190485e1 100644 --- a/packages/kbn-reporting/get_csv_panel_actions/panel_actions/get_csv_panel_action.tsx +++ b/packages/kbn-reporting/get_csv_panel_actions/panel_actions/get_csv_panel_action.tsx @@ -72,7 +72,6 @@ interface Params { csvConfig: ClientConfigType['csv']; core: CoreSetup; startServices$: Observable; - usesUiCapabilities: boolean; } interface ExecutionParams { @@ -104,15 +103,13 @@ export class ReportingCsvPanelAction implements ActionDefinition; @@ -38,7 +37,6 @@ export interface ExportModalShareOpts { export interface ExportPanelShareOpts { apiClient: ReportingAPIClient; - usesUiCapabilities: boolean; license: ILicense; application: ApplicationStart; startServices$: Rx.Observable; diff --git a/packages/kbn-reporting/public/share/share_context_menu/register_csv_modal_reporting.tsx b/packages/kbn-reporting/public/share/share_context_menu/register_csv_modal_reporting.tsx index d0a4544c3b0e0..bbefe333b49aa 100644 --- a/packages/kbn-reporting/public/share/share_context_menu/register_csv_modal_reporting.tsx +++ b/packages/kbn-reporting/public/share/share_context_menu/register_csv_modal_reporting.tsx @@ -24,7 +24,6 @@ export const reportingCsvShareProvider = ({ apiClient, application, license, - usesUiCapabilities, startServices$, }: ExportModalShareOpts) => { const getShareMenuItems = ({ objectType, sharingData, toasts }: ShareContext) => { @@ -76,12 +75,7 @@ export const reportingCsvShareProvider = ({ const licenseHasCsvReporting = licenseCheck.showLinks; const licenseDisabled = !licenseCheck.enableLinks; - let capabilityHasCsvReporting = false; - if (usesUiCapabilities) { - capabilityHasCsvReporting = application.capabilities.discover?.generateCsv === true; - } else { - capabilityHasCsvReporting = true; // deprecated - } + const capabilityHasCsvReporting = application.capabilities.discover?.generateCsv === true; const generateReportingJobCSV = ({ intl }: { intl: InjectedIntl }) => { const decoratedJobParams = apiClient.getDecoratedJobParams(getJobParams()); diff --git a/packages/kbn-reporting/public/share/share_context_menu/register_pdf_png_modal_reporting.tsx b/packages/kbn-reporting/public/share/share_context_menu/register_pdf_png_modal_reporting.tsx index 54ced9511d103..c2d5a88de9ecd 100644 --- a/packages/kbn-reporting/public/share/share_context_menu/register_pdf_png_modal_reporting.tsx +++ b/packages/kbn-reporting/public/share/share_context_menu/register_pdf_png_modal_reporting.tsx @@ -46,7 +46,6 @@ export const reportingExportModalProvider = ({ apiClient, license, application, - usesUiCapabilities, startServices$, }: ExportModalShareOpts): ShareMenuProvider => { const getShareMenuItems = ({ @@ -64,18 +63,10 @@ export const reportingExportModalProvider = ({ const licenseHasScreenshotReporting = showLinks; const licenseDisabled = !enableLinks; - let capabilityHasDashboardScreenshotReporting = false; - let capabilityHasVisualizeScreenshotReporting = false; - if (usesUiCapabilities) { - capabilityHasDashboardScreenshotReporting = - application.capabilities.dashboard?.generateScreenshot === true; - capabilityHasVisualizeScreenshotReporting = - application.capabilities.visualize?.generateScreenshot === true; - } else { - // deprecated - capabilityHasDashboardScreenshotReporting = true; - capabilityHasVisualizeScreenshotReporting = true; - } + const capabilityHasDashboardScreenshotReporting = + application.capabilities.dashboard?.generateScreenshot === true; + const capabilityHasVisualizeScreenshotReporting = + application.capabilities.visualize?.generateScreenshot === true; if (!licenseHasScreenshotReporting) { return []; diff --git a/packages/kbn-reporting/public/types.ts b/packages/kbn-reporting/public/types.ts index e01a1b55b0a1f..756c5e23eb57b 100644 --- a/packages/kbn-reporting/public/types.ts +++ b/packages/kbn-reporting/public/types.ts @@ -36,7 +36,6 @@ export interface ClientConfigType { intervalErrorMultiplier: number; }; }; - roles: { enabled: boolean }; export_types: { pdf: { enabled: boolean }; png: { enabled: boolean }; diff --git a/packages/kbn-reporting/server/__snapshots__/config_schema.test.ts.snap b/packages/kbn-reporting/server/__snapshots__/config_schema.test.ts.snap index d52630ab6820c..ae361b65f9f2f 100644 --- a/packages/kbn-reporting/server/__snapshots__/config_schema.test.ts.snap +++ b/packages/kbn-reporting/server/__snapshots__/config_schema.test.ts.snap @@ -50,12 +50,6 @@ Object { "pollIntervalErrorMultiplier": 10, "timeout": "PT4M", }, - "roles": Object { - "allow": Array [ - "reporting_user", - ], - "enabled": true, - }, "statefulSettings": Object { "enabled": true, }, @@ -111,12 +105,6 @@ Object { "pollIntervalErrorMultiplier": 10, "timeout": "PT4M", }, - "roles": Object { - "allow": Array [ - "reporting_user", - ], - "enabled": true, - }, "statefulSettings": Object { "enabled": true, }, diff --git a/packages/kbn-reporting/server/config_schema.test.ts b/packages/kbn-reporting/server/config_schema.test.ts index 63ca79cf819c5..fd3d974ef55af 100644 --- a/packages/kbn-reporting/server/config_schema.test.ts +++ b/packages/kbn-reporting/server/config_schema.test.ts @@ -122,14 +122,4 @@ describe('Reporting Config Schema', () => { ConfigSchema.validate({ export_types: { csv: { enabled: true } } }, { dev: true }) ).not.toThrow(); }); - - describe('roles', () => { - it('should have roles enabled set to false for serverless by default', () => { - expect(ConfigSchema.validate({}, { serverless: true }).roles.enabled).toBe(false); - }); - - it('should have roles enabled set to true for non-serverless by default', () => { - expect(ConfigSchema.validate({}).roles.enabled).toBe(true); - }); - }); }); diff --git a/packages/kbn-reporting/server/config_schema.ts b/packages/kbn-reporting/server/config_schema.ts index e14bc30ab56f7..cf4b509fdc44b 100644 --- a/packages/kbn-reporting/server/config_schema.ts +++ b/packages/kbn-reporting/server/config_schema.ts @@ -94,16 +94,12 @@ const EncryptionKeySchema = schema.conditional( schema.string({ defaultValue: 'a'.repeat(32) }) ); -const RolesSchema = schema.object({ - enabled: offeringBasedSchema({ - serverless: schema.boolean({ defaultValue: false }), - traditional: schema.boolean({ defaultValue: true }), - }), // true: use ES API for access control (deprecated in 7.x). false: use Kibana API for application features (8.0) - allow: offeringBasedSchema({ - serverless: schema.arrayOf(schema.string(), { defaultValue: [] }), - traditional: schema.arrayOf(schema.string(), { defaultValue: ['reporting_user'] }), - }), -}); +const RolesSchema = schema.maybe( + schema.object({ + enabled: schema.boolean(), + allow: schema.arrayOf(schema.string()), + }) +); // unused as of 9.0 // Browser side polling: job completion notifier, management table auto-refresh // NOTE: can not use schema.duration, a bug prevents it being passed to the browser correctly diff --git a/packages/kbn-reporting/server/types.ts b/packages/kbn-reporting/server/types.ts index c2f05be15d69f..c1d1ea0ec3828 100644 --- a/packages/kbn-reporting/server/types.ts +++ b/packages/kbn-reporting/server/types.ts @@ -25,10 +25,6 @@ import type { ExportType } from './export_type'; export interface ReportingServerPluginSetup { registerExportTypes: (item: ExportType) => void; - /** - * Used to inform plugins if Reporting config is compatible with UI Capabilities / Application Sub-Feature Controls - */ - usesUiCapabilities: () => boolean; } // standard type for create job function of any ExportType implementation diff --git a/packages/kbn-doc-links/jest.config.js b/packages/kbn-rule-data-utils/jest.config.js similarity index 90% rename from packages/kbn-doc-links/jest.config.js rename to packages/kbn-rule-data-utils/jest.config.js index c2430a3758092..fd0feabd9f0ad 100644 --- a/packages/kbn-doc-links/jest.config.js +++ b/packages/kbn-rule-data-utils/jest.config.js @@ -10,5 +10,5 @@ module.exports = { preset: '@kbn/test', rootDir: '../..', - roots: ['/packages/kbn-doc-links'], + roots: ['/packages/kbn-rule-data-utils'], }; diff --git a/test/functional/apps/discover/classic/config.ts b/packages/kbn-rule-data-utils/src/alerts_as_data_rbac.test.ts similarity index 54% rename from test/functional/apps/discover/classic/config.ts rename to packages/kbn-rule-data-utils/src/alerts_as_data_rbac.test.ts index 941eec8ca621c..100b00a9acf60 100644 --- a/test/functional/apps/discover/classic/config.ts +++ b/packages/kbn-rule-data-utils/src/alerts_as_data_rbac.test.ts @@ -7,13 +7,16 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import { FtrConfigProviderContext } from '@kbn/test'; +import { isSiemRuleType } from './alerts_as_data_rbac'; -export default async function ({ readConfigFile }: FtrConfigProviderContext) { - const functionalConfig = await readConfigFile(require.resolve('../../../config.base.js')); +describe('alertsAsDataRbac', () => { + describe('isSiemRuleType', () => { + test('returns true for siem rule types', () => { + expect(isSiemRuleType('siem.esqlRuleType')).toBe(true); + }); - return { - ...functionalConfig.getAll(), - testFiles: [require.resolve('.')], - }; -} + test('returns false for NON siem rule types', () => { + expect(isSiemRuleType('apm.anomaly')).toBe(false); + }); + }); +}); diff --git a/packages/kbn-rule-data-utils/src/alerts_as_data_rbac.ts b/packages/kbn-rule-data-utils/src/alerts_as_data_rbac.ts index 7c97259421f22..32606abe31b7b 100644 --- a/packages/kbn-rule-data-utils/src/alerts_as_data_rbac.ts +++ b/packages/kbn-rule-data-utils/src/alerts_as_data_rbac.ts @@ -28,6 +28,8 @@ export const AlertConsumers = { STACK_ALERTS: 'stackAlerts', EXAMPLE: 'AlertingExample', MONITORING: 'monitoring', + ALERTS: 'alerts', + DISCOVER: 'discover', } as const; export type AlertConsumers = (typeof AlertConsumers)[keyof typeof AlertConsumers]; export type STATUS_VALUES = 'open' | 'acknowledged' | 'closed' | 'in-progress'; // TODO: remove 'in-progress' after migration to 'acknowledged' @@ -91,3 +93,9 @@ export const getEsQueryConfig = (params?: GetEsQueryConfigParamType): EsQueryCon }, {} as EsQueryConfig); return paramKeysWithValues; }; + +/** + * TODO: Remove when checks for specific rule type ids is not needed + *in the codebase. + */ +export const isSiemRuleType = (ruleTypeId: string) => ruleTypeId.startsWith('siem.'); diff --git a/packages/kbn-rule-data-utils/src/rule_types/o11y_rules.ts b/packages/kbn-rule-data-utils/src/rule_types/o11y_rules.ts index 5dae1c99b210f..5dc194659e881 100644 --- a/packages/kbn-rule-data-utils/src/rule_types/o11y_rules.ts +++ b/packages/kbn-rule-data-utils/src/rule_types/o11y_rules.ts @@ -8,11 +8,10 @@ */ export const OBSERVABILITY_THRESHOLD_RULE_TYPE_ID = 'observability.rules.custom_threshold'; -export const SLO_BURN_RATE_RULE_TYPE_ID = 'slo.rules.burnRate'; -export const METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID = 'metrics.alert.inventory.threshold'; -export const METRIC_THRESHOLD_ALERT_TYPE_ID = 'metrics.alert.threshold'; -export const LOG_THRESHOLD_ALERT_TYPE_ID = 'logs.alert.document.count'; +/** + * APM rule types + */ export enum ApmRuleType { ErrorCount = 'apm.error_rate', // ErrorRate was renamed to ErrorCount but the key is kept as `error_rate` for backwards-compat. @@ -21,5 +20,68 @@ export enum ApmRuleType { Anomaly = 'apm.anomaly', } +export const APM_RULE_TYPE_IDS = Object.values(ApmRuleType); + +/** + * Synthetics ryle types + */ + export const SYNTHETICS_STATUS_RULE = 'xpack.synthetics.alerts.monitorStatus'; export const SYNTHETICS_TLS_RULE = 'xpack.synthetics.alerts.tls'; + +export const SYNTHETICS_ALERT_RULE_TYPES = { + MONITOR_STATUS: SYNTHETICS_STATUS_RULE, + TLS: SYNTHETICS_TLS_RULE, +}; + +export const SYNTHETICS_RULE_TYPE_IDS = [SYNTHETICS_STATUS_RULE, SYNTHETICS_TLS_RULE]; + +/** + * SLO rule types + */ +export const SLO_BURN_RATE_RULE_TYPE_ID = 'slo.rules.burnRate'; +export const SLO_RULE_TYPE_IDS = [SLO_BURN_RATE_RULE_TYPE_ID]; + +/** + * Metrics rule types + */ +export const METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID = 'metrics.alert.inventory.threshold'; +export const METRIC_THRESHOLD_ALERT_TYPE_ID = 'metrics.alert.threshold'; + +/** + * Logs rule types + */ +export const LOG_THRESHOLD_ALERT_TYPE_ID = 'logs.alert.document.count'; +export const LOG_RULE_TYPE_IDS = [LOG_THRESHOLD_ALERT_TYPE_ID]; + +/** + * Uptime rule types + */ + +export const UPTIME_RULE_TYPE_IDS = [ + 'xpack.uptime.alerts.tls', + 'xpack.uptime.alerts.tlsCertificate', + 'xpack.uptime.alerts.monitorStatus', + 'xpack.uptime.alerts.durationAnomaly', +]; + +/** + * Infra rule types + */ + +export enum InfraRuleType { + MetricThreshold = METRIC_THRESHOLD_ALERT_TYPE_ID, + InventoryThreshold = METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID, +} + +export const INFRA_RULE_TYPE_IDS = Object.values(InfraRuleType); + +export const OBSERVABILITY_RULE_TYPE_IDS = [ + ...APM_RULE_TYPE_IDS, + ...SYNTHETICS_RULE_TYPE_IDS, + ...INFRA_RULE_TYPE_IDS, + ...UPTIME_RULE_TYPE_IDS, + ...LOG_RULE_TYPE_IDS, + ...SLO_RULE_TYPE_IDS, + OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, +]; diff --git a/packages/kbn-rule-data-utils/src/rule_types/stack_rules.ts b/packages/kbn-rule-data-utils/src/rule_types/stack_rules.ts index b5c6ed8213eff..fb34ed3e4df4b 100644 --- a/packages/kbn-rule-data-utils/src/rule_types/stack_rules.ts +++ b/packages/kbn-rule-data-utils/src/rule_types/stack_rules.ts @@ -10,3 +10,13 @@ export const STACK_ALERTS_FEATURE_ID = 'stackAlerts'; export const ES_QUERY_ID = '.es-query'; export const ML_ANOMALY_DETECTION_RULE_TYPE_ID = 'xpack.ml.anomaly_detection_alert'; + +/** + * These rule types are not the only stack rules. There are more. + * The variable holds all stack rule types that support multiple + * consumers aka the "Role visibility" UX dropdown. + */ +export const STACK_RULE_TYPE_IDS_SUPPORTED_BY_OBSERVABILITY = [ + ES_QUERY_ID, + ML_ANOMALY_DETECTION_RULE_TYPE_ID, +]; diff --git a/packages/kbn-scout/index.ts b/packages/kbn-scout/index.ts index 2cbf98d96a8e0..34a906fcf755d 100644 --- a/packages/kbn-scout/index.ts +++ b/packages/kbn-scout/index.ts @@ -16,4 +16,7 @@ export type { PageObjects, ScoutTestFixtures, ScoutWorkerFixtures, + EsArchiverFixture, } from './src/playwright'; + +export type { Client, KbnClient, KibanaUrl, SamlSessionManager, ToolingLog } from './src/types'; diff --git a/packages/kbn-scout/src/playwright/fixtures/index.ts b/packages/kbn-scout/src/playwright/fixtures/index.ts index 348b581005994..a17a592b5ada0 100644 --- a/packages/kbn-scout/src/playwright/fixtures/index.ts +++ b/packages/kbn-scout/src/playwright/fixtures/index.ts @@ -15,6 +15,7 @@ import { scoutTestFixtures } from './test'; export const scoutCoreFixtures = mergeTests(scoutWorkerFixtures, scoutTestFixtures); export type { + EsArchiverFixture, ScoutTestFixtures, ScoutWorkerFixtures, ScoutPage, diff --git a/packages/kbn-scout/src/playwright/fixtures/test/page.ts b/packages/kbn-scout/src/playwright/fixtures/test/page.ts index ffc309d37cbad..4cab61e4ffec5 100644 --- a/packages/kbn-scout/src/playwright/fixtures/test/page.ts +++ b/packages/kbn-scout/src/playwright/fixtures/test/page.ts @@ -9,13 +9,13 @@ import { Page, test as base } from '@playwright/test'; import { subj } from '@kbn/test-subj-selector'; -import { ScoutPage, KibanaUrl } from '../types'; +import { ScoutPage, KibanaUrl, ScoutTestFixtures, ScoutWorkerFixtures } from '../types'; /** * Instead of defining each method individually, we use a list of method names and loop through them, creating methods dynamically. * All methods must have 'selector: string' as the first argument */ -function extendPageWithTestSubject(page: Page) { +function extendPageWithTestSubject(page: Page): ScoutPage['testSubj'] { const methods: Array = [ 'check', 'click', @@ -28,10 +28,15 @@ function extendPageWithTestSubject(page: Page) { 'innerText', 'isChecked', 'isHidden', + 'isVisible', 'locator', + 'waitForSelector', ]; - const extendedMethods: Partial> = {}; + const extendedMethods: Partial> & { + typeWithDelay?: ScoutPage['testSubj']['typeWithDelay']; + clearInput?: ScoutPage['testSubj']['clearInput']; + } = {}; for (const method of methods) { extendedMethods[method] = (...args: any[]) => { @@ -41,7 +46,27 @@ function extendPageWithTestSubject(page: Page) { }; } - return extendedMethods as Record; + // custom method to types text into an input field character by character with a delay + extendedMethods.typeWithDelay = async ( + selector: string, + text: string, + options?: { delay: number } + ) => { + const { delay = 25 } = options || {}; + const testSubjSelector = subj(selector); + await page.locator(testSubjSelector).click(); + for (const char of text) { + await page.keyboard.insertText(char); + await page.waitForTimeout(delay); + } + }; + // custom method to clear an input field + extendedMethods.clearInput = async (selector: string) => { + const testSubjSelector = subj(selector); + await page.locator(testSubjSelector).fill(''); + }; + + return extendedMethods as ScoutPage['testSubj']; } /** @@ -70,14 +95,20 @@ function extendPageWithTestSubject(page: Page) { * await page.gotoApp('discover); * ``` */ -export const scoutPageFixture = base.extend<{ page: ScoutPage; kbnUrl: KibanaUrl }>({ - page: async ({ page, kbnUrl }, use) => { +export const scoutPageFixture = base.extend({ + page: async ( + { page, kbnUrl }: { page: Page; kbnUrl: KibanaUrl }, + use: (extendedPage: ScoutPage) => Promise + ) => { + const extendedPage = page as ScoutPage; // Extend page with '@kbn/test-subj-selector' support - page.testSubj = extendPageWithTestSubject(page); - + extendedPage.testSubj = extendPageWithTestSubject(page); // Method to navigate to specific Kibana apps - page.gotoApp = (appName: string) => page.goto(kbnUrl.app(appName)); + extendedPage.gotoApp = (appName: string) => page.goto(kbnUrl.app(appName)); + // Method to wait for global loading indicator to be hidden + extendedPage.waitForLoadingIndicatorHidden = () => + extendedPage.testSubj.waitForSelector('globalLoadingIndicator-hidden', { state: 'attached' }); - await use(page); + await use(extendedPage); }, }); diff --git a/packages/kbn-scout/src/playwright/fixtures/types/test_scope.ts b/packages/kbn-scout/src/playwright/fixtures/types/test_scope.ts index 2808381f0f6be..4ff7fc18cd6f2 100644 --- a/packages/kbn-scout/src/playwright/fixtures/types/test_scope.ts +++ b/packages/kbn-scout/src/playwright/fixtures/types/test_scope.ts @@ -22,8 +22,30 @@ export interface LoginFixture { loginAsPrivilegedUser: () => Promise; } +/** + * Extends the Playwright 'Page' interface with methods specific to Kibana. + * Reasons to use 'ReturnType' instead of Explicit Typings: + * - DRY Principle: automatically stays in sync with the Playwright API, reducing maintenance overhead. + * - Future-Proofing: If Playwright changes the return type of methods, these types will update accordingly. + * Recommendation: define Explicit Types as return types only if methods (e.g. 'typeWithDelay') + * have any additional logic or Kibana-specific behavior. + */ export type ScoutPage = Page & { + /** + * Navigates to the specified Kibana application. + * @param appName - The name of the Kibana app (e.g., 'discover', 'dashboard'). + * @param options - Additional navigation options, passed directly to Playwright's `goto` method. + * @returns A Promise resolving to a Playwright `Response` or `null`. + */ gotoApp: (appName: string, options?: Parameters[1]) => ReturnType; + /** + * Waits for the Kibana loading spinner indicator to disappear. + * @returns A Promise resolving when the indicator is hidden. + */ + waitForLoadingIndicatorHidden: () => ReturnType; + /** + * Simplified API to interact with elements using Kibana's 'data-test-subj' attribute. + */ testSubj: { check: (selector: string, options?: Parameters[1]) => ReturnType; click: (selector: string, options?: Parameters[1]) => ReturnType; @@ -59,9 +81,34 @@ export type ScoutPage = Page & { selector: string, options?: Parameters[1] ) => ReturnType; + isVisible: ( + selector: string, + options?: Parameters[1] + ) => ReturnType; locator: ( selector: string, options?: Parameters[1] ) => ReturnType; + waitForSelector: ( + selector: string, + options?: Parameters[1] + ) => ReturnType; + // custom methods + /** + * Types text into an input field character by character with a specified delay between each character. + * + * @param selector - The selector for the input element (supports 'data-test-subj' attributes). + * @param text - The text to type into the input field. + * @param options - Optional configuration object. + * @param options.delay - The delay in milliseconds between typing each character (default: 25ms). + * @returns A Promise that resolves once the text has been typed. + */ + typeWithDelay: (selector: string, text: string, options?: { delay: number }) => Promise; + /** + * Clears the input field by filling it with an empty string. + * @param selector The selector for the input element (supports 'data-test-subj' attributes). + * @returns A Promise that resolves once the text has been cleared. + */ + clearInput: (selector: string) => Promise; }; }; diff --git a/packages/kbn-scout/src/playwright/fixtures/types/worker_scope.ts b/packages/kbn-scout/src/playwright/fixtures/types/worker_scope.ts index c9424dc0f5970..20908a566abb2 100644 --- a/packages/kbn-scout/src/playwright/fixtures/types/worker_scope.ts +++ b/packages/kbn-scout/src/playwright/fixtures/types/worker_scope.ts @@ -12,23 +12,31 @@ import type { ToolingLog } from '@kbn/tooling-log'; import type { Client } from '@elastic/elasticsearch'; import { LoadActionPerfOptions } from '@kbn/es-archiver'; import { IndexStats } from '@kbn/es-archiver/src/lib/stats'; +import type { UiSettingValues } from '@kbn/test/src/kbn_client/kbn_client_ui_settings'; import { ScoutServerConfig } from '../../../types'; import { KibanaUrl } from '../../../common/services/kibana_url'; -interface EsArchiverFixture { +export interface EsArchiverFixture { loadIfNeeded: ( name: string, performance?: LoadActionPerfOptions | undefined ) => Promise>; } +export interface UiSettingsFixture { + set: (values: UiSettingValues) => Promise; + unset: (...values: string[]) => Promise; + setDefaultTime: ({ from, to }: { from: string; to: string }) => Promise; +} + export interface ScoutWorkerFixtures { log: ToolingLog; config: ScoutServerConfig; kbnUrl: KibanaUrl; esClient: Client; kbnClient: KbnClient; + uiSettings: UiSettingsFixture; esArchiver: EsArchiverFixture; samlAuth: SamlSessionManager; } diff --git a/packages/kbn-scout/src/playwright/fixtures/worker/core.ts b/packages/kbn-scout/src/playwright/fixtures/worker/core.ts new file mode 100644 index 0000000000000..359a779b05fc7 --- /dev/null +++ b/packages/kbn-scout/src/playwright/fixtures/worker/core.ts @@ -0,0 +1,84 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +import { test as base } from '@playwright/test'; + +import { LoadActionPerfOptions } from '@kbn/es-archiver'; +import { + createKbnUrl, + createEsArchiver, + createEsClient, + createKbnClient, + createLogger, + createSamlSessionManager, + createScoutConfig, +} from '../../../common/services'; +import { ScoutWorkerFixtures } from '../types/worker_scope'; +import { ScoutTestOptions } from '../../types'; + +export const coreWorkerFixtures = base.extend<{}, ScoutWorkerFixtures>({ + log: [ + ({}, use) => { + use(createLogger()); + }, + { scope: 'worker' }, + ], + + config: [ + ({ log }, use, testInfo) => { + const configName = 'local'; + const projectUse = testInfo.project.use as ScoutTestOptions; + const serversConfigDir = projectUse.serversConfigDir; + const configInstance = createScoutConfig(serversConfigDir, configName, log); + + use(configInstance); + }, + { scope: 'worker' }, + ], + + kbnUrl: [ + ({ config, log }, use) => { + use(createKbnUrl(config, log)); + }, + { scope: 'worker' }, + ], + + esClient: [ + ({ config, log }, use) => { + use(createEsClient(config, log)); + }, + { scope: 'worker' }, + ], + + kbnClient: [ + ({ log, config }, use) => { + use(createKbnClient(config, log)); + }, + { scope: 'worker' }, + ], + + esArchiver: [ + ({ log, esClient, kbnClient }, use) => { + const esArchiverInstance = createEsArchiver(esClient, kbnClient, log); + // to speedup test execution we only allow to ingest the data indexes and only if index doesn't exist + const loadIfNeeded = async (name: string, performance?: LoadActionPerfOptions | undefined) => + esArchiverInstance!.loadIfNeeded(name, performance); + + use({ loadIfNeeded }); + }, + { scope: 'worker' }, + ], + + samlAuth: [ + ({ log, config }, use) => { + use(createSamlSessionManager(config, log)); + }, + { scope: 'worker' }, + ], +}); diff --git a/packages/kbn-scout/src/playwright/fixtures/worker/index.ts b/packages/kbn-scout/src/playwright/fixtures/worker/index.ts index c61d9755c44db..cfc697bf03613 100644 --- a/packages/kbn-scout/src/playwright/fixtures/worker/index.ts +++ b/packages/kbn-scout/src/playwright/fixtures/worker/index.ts @@ -7,78 +7,8 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import { test as base } from '@playwright/test'; +import { mergeTests } from 'playwright/test'; +import { uiSettingsFixture } from './ui_settings'; +import { coreWorkerFixtures } from './core'; -import { LoadActionPerfOptions } from '@kbn/es-archiver'; -import { - createKbnUrl, - createEsArchiver, - createEsClient, - createKbnClient, - createLogger, - createSamlSessionManager, - createScoutConfig, -} from '../../../common/services'; -import { ScoutWorkerFixtures } from '../types/worker_scope'; -import { ScoutTestOptions } from '../../types'; - -export const scoutWorkerFixtures = base.extend<{}, ScoutWorkerFixtures>({ - log: [ - ({}, use) => { - use(createLogger()); - }, - { scope: 'worker' }, - ], - - config: [ - ({ log }, use, testInfo) => { - const configName = 'local'; - const projectUse = testInfo.project.use as ScoutTestOptions; - const serversConfigDir = projectUse.serversConfigDir; - const configInstance = createScoutConfig(serversConfigDir, configName, log); - - use(configInstance); - }, - { scope: 'worker' }, - ], - - kbnUrl: [ - ({ config, log }, use) => { - use(createKbnUrl(config, log)); - }, - { scope: 'worker' }, - ], - - esClient: [ - ({ config, log }, use) => { - use(createEsClient(config, log)); - }, - { scope: 'worker' }, - ], - - kbnClient: [ - ({ log, config }, use) => { - use(createKbnClient(config, log)); - }, - { scope: 'worker' }, - ], - - esArchiver: [ - ({ log, esClient, kbnClient }, use) => { - const esArchiverInstance = createEsArchiver(esClient, kbnClient, log); - // to speedup test execution we only allow to ingest the data indexes and only if index doesn't exist - const loadIfNeeded = async (name: string, performance?: LoadActionPerfOptions | undefined) => - esArchiverInstance!.loadIfNeeded(name, performance); - - use({ loadIfNeeded }); - }, - { scope: 'worker' }, - ], - - samlAuth: [ - ({ log, config }, use) => { - use(createSamlSessionManager(config, log)); - }, - { scope: 'worker' }, - ], -}); +export const scoutWorkerFixtures = mergeTests(coreWorkerFixtures, uiSettingsFixture); diff --git a/packages/kbn-scout/src/playwright/fixtures/worker/ui_settings.ts b/packages/kbn-scout/src/playwright/fixtures/worker/ui_settings.ts new file mode 100644 index 0000000000000..989f7ce436616 --- /dev/null +++ b/packages/kbn-scout/src/playwright/fixtures/worker/ui_settings.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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +import { test as base } from '@playwright/test'; +import { UiSettingValues } from '@kbn/test/src/kbn_client/kbn_client_ui_settings'; +import { ScoutWorkerFixtures } from '../types'; +import { isValidUTCDate, formatTime } from '../../utils'; + +export const uiSettingsFixture = base.extend<{}, ScoutWorkerFixtures>({ + uiSettings: [ + ({ kbnClient }, use) => { + const kbnClientUiSettings = { + set: async (values: UiSettingValues) => kbnClient.uiSettings.update(values), + + unset: async (...keys: string[]) => + Promise.all(keys.map((key) => kbnClient.uiSettings.unset(key))), + + setDefaultTime: async ({ from, to }: { from: string; to: string }) => { + const utcFrom = isValidUTCDate(from) ? from : formatTime(from); + const untcTo = isValidUTCDate(to) ? to : formatTime(to); + await kbnClient.uiSettings.update({ + 'timepicker:timeDefaults': `{ "from": "${utcFrom}", "to": "${untcTo}"}`, + }); + }, + }; + + use(kbnClientUiSettings); + }, + { scope: 'worker' }, + ], +}); diff --git a/packages/kbn-scout/src/playwright/index.ts b/packages/kbn-scout/src/playwright/index.ts index 66c80f0068f06..5294274c41bc5 100644 --- a/packages/kbn-scout/src/playwright/index.ts +++ b/packages/kbn-scout/src/playwright/index.ts @@ -19,4 +19,9 @@ export { expect } from './expect'; export type { ScoutPlaywrightOptions, ScoutTestOptions } from './types'; export type { PageObjects } from './page_objects'; -export type { ScoutTestFixtures, ScoutWorkerFixtures, ScoutPage } from './fixtures'; +export type { + ScoutTestFixtures, + ScoutWorkerFixtures, + ScoutPage, + EsArchiverFixture, +} from './fixtures'; diff --git a/packages/kbn-scout/src/playwright/page_objects/dashboard_app.ts b/packages/kbn-scout/src/playwright/page_objects/dashboard_app.ts new file mode 100644 index 0000000000000..367167c0304f2 --- /dev/null +++ b/packages/kbn-scout/src/playwright/page_objects/dashboard_app.ts @@ -0,0 +1,95 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +import { ScoutPage } from '../fixtures/types'; + +type CommonlyUsedTimeRange = + | 'Today' + | 'Last_15 minutes' + | 'Last_1 hour' + | 'Last_24 hours' + | 'Last_30 days' + | 'Last_90 days' + | 'Last_1 year'; + +export class DashboardApp { + constructor(private readonly page: ScoutPage) {} + + async goto() { + await this.page.gotoApp('dashboards'); + } + + async openNewDashboard() { + await this.page.testSubj.click('newItemButton'); + await this.page.testSubj.waitForSelector('emptyDashboardWidget', { state: 'visible' }); + } + + async saveDashboard(name: string) { + await this.page.testSubj.click('dashboardInteractiveSaveMenuItem'); + await this.page.testSubj.fill('savedObjectTitle', name); + await this.page.testSubj.click('confirmSaveSavedObjectButton'); + await this.page.testSubj.waitForSelector('confirmSaveSavedObjectButton', { state: 'hidden' }); + } + + async addPanelFromLibrary(...names: string[]) { + await this.page.testSubj.click('dashboardAddFromLibraryButton'); + for (let i = 0; i < names.length; i++) { + // clear search input after the first panel is added + if (i > 0) { + await this.page.testSubj.clearInput('savedObjectFinderSearchInput'); + } + await this.page.testSubj.typeWithDelay('savedObjectFinderSearchInput', names[i]); + await this.page.testSubj.click(`savedObjectTitle${names[i].replace(/ /g, '-')}`); + // wait for the panel to be added + await this.page.testSubj.waitForSelector( + `embeddablePanelHeading-${names[i].replace(/[- ]/g, '')}`, + { + state: 'visible', + } + ); + } + // close the flyout + await this.page.testSubj.click('euiFlyoutCloseButton'); + await this.page.testSubj.waitForSelector('euiFlyoutCloseButton', { state: 'hidden' }); + } + + async customizePanel(options: { + name: string; + customTimeRageCommonlyUsed?: { + value: CommonlyUsedTimeRange; + }; + }) { + await this.page.testSubj.hover(`embeddablePanelHeading-${options.name.replace(/ /g, '')}`); + await this.page.testSubj.click('embeddablePanelAction-ACTION_CUSTOMIZE_PANEL'); + if (options.customTimeRageCommonlyUsed) { + await this.page.testSubj.click('customizePanelShowCustomTimeRange'); + await this.page.testSubj.click( + 'customizePanelTimeRangeDatePicker > superDatePickerToggleQuickMenuButton' + ); + await this.page.testSubj.click( + `superDatePickerCommonlyUsed_${options.customTimeRageCommonlyUsed.value}` + ); + } + + await this.page.testSubj.click('saveCustomizePanelButton'); + await this.page.testSubj.waitForSelector('saveCustomizePanelButton', { state: 'hidden' }); + } + + async removePanel(name: string | 'embeddableError') { + const panelHeaderTestSubj = + name === 'embeddableError' ? name : `embeddablePanelHeading-${name.replace(/ /g, '')}`; + await this.page.testSubj.locator(panelHeaderTestSubj).scrollIntoViewIfNeeded(); + await this.page.testSubj.locator(panelHeaderTestSubj).hover(); + await this.page.testSubj.click('embeddablePanelToggleMenuIcon'); + await this.page.testSubj.click('embeddablePanelAction-deletePanel'); + await this.page.testSubj.waitForSelector(panelHeaderTestSubj, { + state: 'hidden', + }); + } +} diff --git a/packages/kbn-scout/src/playwright/page_objects/date_picker.ts b/packages/kbn-scout/src/playwright/page_objects/date_picker.ts index 08b724a956a3d..d5d26063fb0b0 100644 --- a/packages/kbn-scout/src/playwright/page_objects/date_picker.ts +++ b/packages/kbn-scout/src/playwright/page_objects/date_picker.ts @@ -13,8 +13,36 @@ import { expect } from '..'; export class DatePicker { constructor(private readonly page: ScoutPage) {} + private async showStartEndTimes() { + // This first await makes sure the superDatePicker has loaded before we check for the ShowDatesButton + await this.page.testSubj.waitForSelector('superDatePickerToggleQuickMenuButton', { + timeout: 10000, + }); + const isShowDateBtnVisible = await this.page.testSubj.isVisible( + 'superDatePickerShowDatesButton', + { + timeout: 5000, + } + ); + + if (isShowDateBtnVisible) { + await this.page.testSubj.click('superDatePickerShowDatesButton'); + } + + const isStartDatePopoverBtnVisible = await this.page.testSubj.isVisible( + 'superDatePickerstartDatePopoverButton', + { + timeout: 5000, + } + ); + + if (isStartDatePopoverBtnVisible) { + await this.page.testSubj.click('superDatePickerstartDatePopoverButton'); + } + } + async setAbsoluteRange({ from, to }: { from: string; to: string }) { - await this.page.testSubj.click('superDatePickerShowDatesButton'); + await this.showStartEndTimes(); // we start with end date await this.page.testSubj.click('superDatePickerendDatePopoverButton'); await this.page.testSubj.click('superDatePickerAbsoluteTab'); @@ -32,10 +60,14 @@ export class DatePicker { await this.page.testSubj.click('parseAbsoluteDateFormat'); await this.page.keyboard.press('Escape'); - await expect(this.page.testSubj.locator('superDatePickerstartDatePopoverButton')).toHaveText( - from - ); - await expect(this.page.testSubj.locator('superDatePickerendDatePopoverButton')).toHaveText(to); + await expect( + this.page.testSubj.locator('superDatePickerstartDatePopoverButton'), + `Date picker 'start date' should be set correctly` + ).toHaveText(from); + await expect( + this.page.testSubj.locator('superDatePickerendDatePopoverButton'), + `Date picker 'end date' should be set correctly` + ).toHaveText(to); await this.page.testSubj.click('querySubmitButton'); } } diff --git a/packages/kbn-scout/src/playwright/page_objects/discover_app.ts b/packages/kbn-scout/src/playwright/page_objects/discover_app.ts index e4abbf252ae31..bb82984359c79 100644 --- a/packages/kbn-scout/src/playwright/page_objects/discover_app.ts +++ b/packages/kbn-scout/src/playwright/page_objects/discover_app.ts @@ -15,4 +15,35 @@ export class DiscoverApp { async goto() { await this.page.gotoApp('discover'); } + + async selectDataView(name: string) { + const currentValue = await this.page.testSubj.innerText('*dataView-switch-link'); + if (currentValue === name) { + return; + } + await this.page.testSubj.click('*dataView-switch-link'); + await this.page.testSubj.waitForSelector('indexPattern-switcher'); + await this.page.testSubj.typeWithDelay('indexPattern-switcher--input', name); + await this.page.testSubj.locator('indexPattern-switcher').locator(`[title="${name}"]`).click(); + await this.page.testSubj.waitForSelector('indexPattern-switcher', { state: 'hidden' }); + await this.page.waitForLoadingIndicatorHidden(); + } + + async clickNewSearch() { + await this.page.testSubj.hover('discoverNewButton'); + await this.page.testSubj.click('discoverNewButton'); + await this.page.testSubj.hover('unifiedFieldListSidebar__toggle-collapse'); // cancel tooltips + } + + async saveSearch(name: string) { + await this.page.testSubj.click('discoverSaveButton'); + await this.page.testSubj.fill('savedObjectTitle', name); + await this.page.testSubj.click('confirmSaveSavedObjectButton'); + await this.page.testSubj.waitForSelector('savedObjectSaveModal', { state: 'hidden' }); + await this.page.waitForLoadingIndicatorHidden(); + } + + async waitForHistogramRendered() { + await this.page.testSubj.waitForSelector('unifiedHistogramRendered'); + } } diff --git a/packages/kbn-scout/src/playwright/page_objects/fiter_bar.ts b/packages/kbn-scout/src/playwright/page_objects/fiter_bar.ts new file mode 100644 index 0000000000000..6026e16b9edb3 --- /dev/null +++ b/packages/kbn-scout/src/playwright/page_objects/fiter_bar.ts @@ -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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +import { ScoutPage } from '../fixtures/types'; +import { expect } from '..'; + +interface FilterCreationOptions { + field: string; + operator: 'is' | 'is not' | 'is one of' | 'is not one of' | 'exists' | 'does not exist'; + value: string; +} + +interface FilterStateOptions { + field: string; + value: string; + enabled?: boolean; + pinned?: boolean; + negated?: boolean; +} + +export class FilterBar { + constructor(private readonly page: ScoutPage) {} + + async addFilter(options: FilterCreationOptions) { + await this.page.testSubj.click('addFilter'); + await this.page.testSubj.waitForSelector('addFilterPopover'); + // set field name + await this.page.testSubj.typeWithDelay( + 'filterFieldSuggestionList > comboBoxSearchInput', + options.field + ); + await this.page.click(`.euiFilterSelectItem[title="${options.field}"]`); + // set operator + await this.page.testSubj.typeWithDelay( + 'filterOperatorList > comboBoxSearchInput', + options.operator + ); + await this.page.click(`.euiFilterSelectItem[title="${options.operator}"]`); + // set value + await this.page.testSubj.locator('filterParams').locator('input').fill(options.value); + // save filter + await this.page.testSubj.click('saveFilter'); + + await expect( + this.page.testSubj.locator('^filter-badge'), + 'New filter badge should be displayed' + ).toBeVisible(); + } + + async hasFilter(options: FilterStateOptions) { + const testSubjLocator = [ + '~filter', + options.enabled !== undefined && `~filter-${options.enabled ? 'enabled' : 'disabled'}`, + options.field && `~filter-key-${options.field}`, + options.value && `~filter-value-${options.value}`, + options.pinned !== undefined && `~filter-${options.pinned ? 'pinned' : 'unpinned'}`, + options.negated !== undefined && (options.negated ? '~filter-negated' : ''), + ] + .filter(Boolean) + .join(' & '); + + return this.page.testSubj.isVisible(testSubjLocator, { strict: true }); + } +} diff --git a/packages/kbn-scout/src/playwright/page_objects/index.ts b/packages/kbn-scout/src/playwright/page_objects/index.ts index fb90dfea38ff8..19bc81da669a4 100644 --- a/packages/kbn-scout/src/playwright/page_objects/index.ts +++ b/packages/kbn-scout/src/playwright/page_objects/index.ts @@ -8,13 +8,17 @@ */ import { ScoutPage } from '../fixtures/types'; +import { DashboardApp } from './dashboard_app'; import { DatePicker } from './date_picker'; import { DiscoverApp } from './discover_app'; +import { FilterBar } from './fiter_bar'; import { createLazyPageObject } from './utils'; export interface PageObjects { datePicker: DatePicker; discover: DiscoverApp; + dashboard: DashboardApp; + filterBar: FilterBar; } /** @@ -26,7 +30,9 @@ export interface PageObjects { export function createCorePageObjects(page: ScoutPage): PageObjects { return { datePicker: createLazyPageObject(DatePicker, page), + dashboard: createLazyPageObject(DashboardApp, page), discover: createLazyPageObject(DiscoverApp, page), + filterBar: createLazyPageObject(FilterBar, page), // Add new page objects here }; } diff --git a/packages/kbn-scout/src/playwright/utils/index.ts b/packages/kbn-scout/src/playwright/utils/index.ts index 6100cffc2f2c8..4b6fcafcbcfa8 100644 --- a/packages/kbn-scout/src/playwright/utils/index.ts +++ b/packages/kbn-scout/src/playwright/utils/index.ts @@ -7,4 +7,14 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ +import moment from 'moment'; + export const serviceLoadedMsg = (name: string) => `scout service loaded: ${name}`; + +export const isValidUTCDate = (date: string): boolean => { + return !isNaN(Date.parse(date)) && new Date(date).toISOString() === date; +}; + +export function formatTime(date: string, fmt: string = 'MMM D, YYYY @ HH:mm:ss.SSS') { + return moment.utc(date, fmt).format(); +} diff --git a/packages/kbn-scout/src/servers/run_elasticsearch.ts b/packages/kbn-scout/src/servers/run_elasticsearch.ts index 5406f755f5d72..24c8a49da2d9a 100644 --- a/packages/kbn-scout/src/servers/run_elasticsearch.ts +++ b/packages/kbn-scout/src/servers/run_elasticsearch.ts @@ -12,8 +12,8 @@ import { resolve } from 'path'; import type { ToolingLog } from '@kbn/tooling-log'; import { REPO_ROOT } from '@kbn/repo-info'; import type { ArtifactLicense, ServerlessProjectType } from '@kbn/es'; -import { isServerlessProjectType, extractAndArchiveLogs } from '@kbn/es/src/utils'; -import { createTestEsCluster, esTestConfig } from '@kbn/test'; +import { isServerlessProjectType } from '@kbn/es/src/utils'; +import { createTestEsCluster, esTestConfig, cleanupElasticsearch } from '@kbn/test'; import { Config } from '../config'; interface RunElasticsearchOptions { @@ -82,8 +82,7 @@ export async function runElasticsearch( config, }); return async () => { - await node.cleanup(); - await extractAndArchiveLogs({ outputFolder: logsDir, log }); + await cleanupElasticsearch(node, config.serverless, logsDir, log); }; } diff --git a/packages/kbn-scout/src/types/index.ts b/packages/kbn-scout/src/types/index.ts index 811b63fb1aac3..024a00ec29e45 100644 --- a/packages/kbn-scout/src/types/index.ts +++ b/packages/kbn-scout/src/types/index.ts @@ -10,3 +10,4 @@ export * from './config'; export * from './cli'; export * from './servers'; +export * from './services'; diff --git a/packages/kbn-scout/src/types/services.d.ts b/packages/kbn-scout/src/types/services.d.ts new file mode 100644 index 0000000000000..2b653354043d9 --- /dev/null +++ b/packages/kbn-scout/src/types/services.d.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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +export type { KbnClient, SamlSessionManager } from '@kbn/test'; +export type { Client } from '@elastic/elasticsearch'; +export type { KibanaUrl } from '../common/services'; +export type { ToolingLog } from '@kbn/tooling-log'; diff --git a/packages/kbn-search-connectors/utils/to_alphanumeric.ts b/packages/kbn-search-connectors/utils/to_alphanumeric.ts index 78cfb18cbc9a5..a0404a209f64f 100644 --- a/packages/kbn-search-connectors/utils/to_alphanumeric.ts +++ b/packages/kbn-search-connectors/utils/to_alphanumeric.ts @@ -11,5 +11,5 @@ export const toAlphanumeric = (input: string) => input .trim() .replace(/[^a-zA-Z0-9]+/g, '-') // Replace all special/non-alphanumerical characters with dashes - .replace(/^[-]+|[-]+$/g, '') // Strip all leading and trailing dashes + .replace(/(^-+|(? { + describe('ES|QL query syntax', () => { + it.each([['incorrect syntax'], ['from test* metadata']])( + 'detects incorrect syntax in "%s"', + (esqlQuery) => { + const result = parseEsqlQuery(esqlQuery); + expect(result.errors.length).toEqual(1); + expect(result.errors[0].message.startsWith('SyntaxError:')).toBeTruthy(); + expect(parseEsqlQuery(esqlQuery)).toMatchObject({ + hasMetadataOperator: false, + isEsqlQueryAggregating: false, + }); + } + ); + + it.each([ + ['from test* metadata _id'], + [ + 'FROM kibana_sample_data_logs | STATS total_bytes = SUM(bytes) BY host | WHERE total_bytes > 200000 | SORT total_bytes DESC | LIMIT 10', + ], + [ + `from packetbeat* metadata + _id + | limit 100`, + ], + [ + `FROM kibana_sample_data_logs | + STATS total_bytes = SUM(bytes) BY host | + WHERE total_bytes > 200000 | + SORT total_bytes DESC | + LIMIT 10`, + ], + ])('parses correctly valid syntax in "%s"', (esqlQuery) => { + const result = parseEsqlQuery(esqlQuery); + expect(result.errors.length).toEqual(0); + expect(result).toMatchObject({ errors: [] }); + }); + }); + + describe('METADATA operator', () => { + it.each([ + ['from test*'], + ['from metadata*'], + ['from test* | keep metadata'], + ['from test* | eval x="metadata _id"'], + ])('detects when METADATA operator is missing in a NON aggregating query "%s"', (esqlQuery) => { + expect(parseEsqlQuery(esqlQuery)).toEqual({ + errors: [], + hasMetadataOperator: false, + isEsqlQueryAggregating: false, + }); + }); + + it.each([ + ['from test* metadata _id'], + ['from test* metadata _id, _index'], + ['from test* metadata _index, _id'], + ['from test* metadata _id '], + ['from test* metadata _id '], + ['from test* metadata _id | limit 10'], + [ + `from packetbeat* metadata + + _id + | limit 100`, + ], + ])('detects existin METADATA operator in a NON aggregating query "%s"', (esqlQuery) => + expect(parseEsqlQuery(esqlQuery)).toEqual({ + errors: [], + hasMetadataOperator: true, + isEsqlQueryAggregating: false, + }) + ); + + it('detects missing METADATA operator in an aggregating query "from test* | stats c = count(*) by fieldA"', () => + expect(parseEsqlQuery('from test* | stats c = count(*) by fieldA')).toEqual({ + errors: [], + hasMetadataOperator: false, + isEsqlQueryAggregating: true, + })); + }); + + describe('METADATA _id field for NON aggregating queries', () => { + it('detects missing METADATA "_id" field', () => { + expect(parseEsqlQuery('from test*')).toEqual({ + errors: [], + hasMetadataOperator: false, + isEsqlQueryAggregating: false, + }); + }); + + it('detects existing METADATA "_id" field', async () => { + expect(parseEsqlQuery('from test* metadata _id')).toEqual({ + errors: [], + hasMetadataOperator: true, + isEsqlQueryAggregating: false, + }); + }); + }); + + describe('METADATA _id field for aggregating queries', () => { + it('detects existing METADATA operator with missing "_id" field', () => { + expect( + parseEsqlQuery('from test* metadata someField | stats c = count(*) by fieldA') + ).toEqual({ errors: [], hasMetadataOperator: false, isEsqlQueryAggregating: true }); + }); + }); +}); diff --git a/packages/kbn-securitysolution-utils/src/esql/parse_esql_query.ts b/packages/kbn-securitysolution-utils/src/esql/parse_esql_query.ts new file mode 100644 index 0000000000000..2a62aed8873a0 --- /dev/null +++ b/packages/kbn-securitysolution-utils/src/esql/parse_esql_query.ts @@ -0,0 +1,71 @@ +/* + * 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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +import { type ESQLAstQueryExpression, parse, ESQLCommandOption, EditorError } from '@kbn/esql-ast'; +import { isColumnItem, isOptionItem } from '@kbn/esql-validation-autocomplete'; +import { isAggregatingQuery } from './compute_if_esql_query_aggregating'; + +export interface ParseEsqlQueryResult { + errors: EditorError[]; + isEsqlQueryAggregating: boolean; + hasMetadataOperator: boolean; +} + +/** + * check if esql query valid for Security rule: + * - if it's non aggregation query it must have metadata operator + */ +export const parseEsqlQuery = (query: string): ParseEsqlQueryResult => { + const { root, errors } = parse(query); + const isEsqlQueryAggregating = isAggregatingQuery(root); + + return { + errors, + isEsqlQueryAggregating, + hasMetadataOperator: computeHasMetadataOperator(root), + }; +}; + +/** + * checks whether query has metadata _id operator + */ +function computeHasMetadataOperator(astExpression: ESQLAstQueryExpression): boolean { + // Check whether the `from` command has `metadata` operator + const metadataOption = getMetadataOption(astExpression); + if (!metadataOption) { + return false; + } + + // Check whether the `metadata` operator has `_id` argument + const idColumnItem = metadataOption.args.find( + (fromArg) => isColumnItem(fromArg) && fromArg.name === '_id' + ); + if (!idColumnItem) { + return false; + } + + return true; +} + +function getMetadataOption(astExpression: ESQLAstQueryExpression): ESQLCommandOption | undefined { + const fromCommand = astExpression.commands.find((x) => x.name === 'from'); + + if (!fromCommand?.args) { + return undefined; + } + + // Check whether the `from` command has `metadata` operator + for (const fromArg of fromCommand.args) { + if (isOptionItem(fromArg) && fromArg.name === 'metadata') { + return fromArg; + } + } + + return undefined; +} diff --git a/packages/kbn-securitysolution-utils/tsconfig.json b/packages/kbn-securitysolution-utils/tsconfig.json index 5b9520c487e31..d45b0c973af87 100644 --- a/packages/kbn-securitysolution-utils/tsconfig.json +++ b/packages/kbn-securitysolution-utils/tsconfig.json @@ -13,7 +13,8 @@ "kbn_references": [ "@kbn/i18n", "@kbn/esql-utils", - "@kbn/esql-ast" + "@kbn/esql-ast", + "@kbn/esql-validation-autocomplete" ], "exclude": [ "target/**/*", diff --git a/packages/kbn-server-route-repository-client/src/create_observable_from_http_response.ts b/packages/kbn-server-route-repository-client/src/create_observable_from_http_response.ts index 1690244ca19a7..ccd0980617f86 100644 --- a/packages/kbn-server-route-repository-client/src/create_observable_from_http_response.ts +++ b/packages/kbn-server-route-repository-client/src/create_observable_from_http_response.ts @@ -37,10 +37,10 @@ export function createObservableFromHttpResponse( } return new Observable((subscriber) => { - const parser = createParser((event) => { - if (event.type === 'event') { + const parser = createParser({ + onEvent: (event) => { subscriber.next(event.data); - } + }, }); const readStream = async () => { diff --git a/packages/kbn-sse-utils-client/src/create_observable_from_http_response.ts b/packages/kbn-sse-utils-client/src/create_observable_from_http_response.ts index 814a528535c75..cf9ef8ee30a7b 100644 --- a/packages/kbn-sse-utils-client/src/create_observable_from_http_response.ts +++ b/packages/kbn-sse-utils-client/src/create_observable_from_http_response.ts @@ -29,8 +29,8 @@ export function createObservableFromHttpResponse((subscriber) => { - const parser = createParser((event) => { - if (event.type === 'event') + const parser = createParser({ + onEvent: (event) => { try { const data = JSON.parse(event.data); if (event.event === 'error') { @@ -48,6 +48,7 @@ export function createObservableFromHttpResponse { diff --git a/packages/kbn-sse-utils-server/index.ts b/packages/kbn-sse-utils-server/index.ts index ec2c60a2fe81b..bf2718738f4f7 100644 --- a/packages/kbn-sse-utils-server/index.ts +++ b/packages/kbn-sse-utils-server/index.ts @@ -8,3 +8,4 @@ */ export { observableIntoEventSourceStream } from './src/observable_into_event_source_stream'; +export { supertestToObservable } from './src/supertest_to_observable'; diff --git a/packages/kbn-sse-utils-server/src/supertest_to_observable.ts b/packages/kbn-sse-utils-server/src/supertest_to_observable.ts new file mode 100644 index 0000000000000..f2dfce24c1d1b --- /dev/null +++ b/packages/kbn-sse-utils-server/src/supertest_to_observable.ts @@ -0,0 +1,68 @@ +/* + * 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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +import type supertest from 'supertest'; +import { PassThrough } from 'stream'; +import { createParser } from 'eventsource-parser'; +import { Observable } from 'rxjs'; + +/** + * Convert a supertest response to an SSE observable. + * + * Note: the supertest response should *NOT* be awaited when using that utility, + * or at least not before calling it. + * + * @example + * ```ts + * const response = supertest + * .post(`/some/sse/endpoint`) + * .set('kbn-xsrf', 'kibana') + * .send({ + * some: 'thing' + * }); + * const events = supertestIntoObservable(response); + * ``` + */ +export function supertestToObservable(response: supertest.Test): Observable { + const stream = new PassThrough(); + response.pipe(stream); + + return new Observable((subscriber) => { + const parser = createParser({ + onEvent: (event) => { + subscriber.next(JSON.parse(event.data)); + }, + }); + + const readStream = async () => { + return new Promise((resolve, reject) => { + const decoder = new TextDecoder(); + + const processChunk = (value: BufferSource) => { + parser.feed(decoder.decode(value, { stream: true })); + }; + + stream.on('data', (chunk) => { + processChunk(chunk); + }); + + stream.on('end', () => resolve()); + stream.on('error', (err) => reject(err)); + }); + }; + + readStream() + .then(() => { + subscriber.complete(); + }) + .catch((error) => { + subscriber.error(error); + }); + }); +} diff --git a/packages/kbn-test-subj-selector/test_subj_selector.ts b/packages/kbn-test-subj-selector/test_subj_selector.ts index 6651873cab434..66d4c6c400668 100644 --- a/packages/kbn-test-subj-selector/test_subj_selector.ts +++ b/packages/kbn-test-subj-selector/test_subj_selector.ts @@ -22,6 +22,8 @@ function termToCssSelector(term: string) { return '[data-test-subj~="' + term.substring(1).replace(/\s/g, '') + '"]'; } else if (term.startsWith('*')) { return '[data-test-subj*="' + term.substring(1).replace(/\s/g, '') + '"]'; + } else if (term.startsWith('^')) { + return '[data-test-subj^="' + term.substring(1).replace(/\s/g, '') + '"]'; } else { return '[data-test-subj="' + term + '"]'; } @@ -40,25 +42,30 @@ function termToCssSelector(term: string) { * - prefixing a value with `*` will allow matching a `data-test-subj` attribute containing at least one occurrence of value within the string. * - example: `*foo` * - css equivalent: `[data-test-subj*="foo"]` - * - DOM match example:
    data-test-subj="bar-foo"
    + * - DOM match example:
    + * + * - prefixing a value with `^` will allow matching a `data-test-subj` attribute beginning with the specified value. + * - example: `^foo` + * - css equivalent: `[data-test-subj^="foo"]` + * - DOM match example:
    * * - prefixing a value with `~` will allow matching a `data-test-subj` attribute represented as a whitespace-separated list of words, one of which is exactly value * - example: `~foo` * - css equivalent: `[data-test-subj~="foo"]` - * - DOM match example:
    data-test-subj="foo bar"
    + * - DOM match example:
    * * - the `>` character is used between two values to indicate that the value on the right must match an element inside an element matched by the value on the left * - example: `foo > bar` * - css equivalent: `[data-test-subj=foo] [data-test-subj=bar]` * - DOM match example: - *
    data-test-subj="foo" - *
    data-test-subj="bar"
    + *
    + *
    *
    * * - the `&` character is used between two values to indicate that the value on both sides must both match the element * - example: `foo & bar` * - css equivalent: `[data-test-subj=foo][data-test-subj=bar]` - * - DOM match example:
    data-test-subj="foo bar"
    + * - DOM match example:
    */ export function subj(selector: string) { return selectorToTerms(selector) diff --git a/packages/kbn-test/index.ts b/packages/kbn-test/index.ts index bd196e27c8cb0..b5506cc804ad3 100644 --- a/packages/kbn-test/index.ts +++ b/packages/kbn-test/index.ts @@ -22,6 +22,7 @@ export { remapPluginPaths, getKibanaCliArg, getKibanaCliLoggers, + cleanupElasticsearch, } from './src/functional_tests/lib'; export { initLogsDir } from './src/functional_tests/lib'; diff --git a/packages/kbn-test/src/functional_tests/lib/index.ts b/packages/kbn-test/src/functional_tests/lib/index.ts index 23c6ec8331602..62275737f6d47 100644 --- a/packages/kbn-test/src/functional_tests/lib/index.ts +++ b/packages/kbn-test/src/functional_tests/lib/index.ts @@ -8,7 +8,7 @@ */ export { runKibanaServer } from './run_kibana_server'; -export { runElasticsearch } from './run_elasticsearch'; +export { runElasticsearch, cleanupElasticsearch } from './run_elasticsearch'; export * from './run_ftr'; export { parseRawFlags, diff --git a/packages/kbn-test/src/functional_tests/lib/run_elasticsearch.ts b/packages/kbn-test/src/functional_tests/lib/run_elasticsearch.ts index 964359cdb7ee5..6e082c7083b37 100644 --- a/packages/kbn-test/src/functional_tests/lib/run_elasticsearch.ts +++ b/packages/kbn-test/src/functional_tests/lib/run_elasticsearch.ts @@ -16,7 +16,7 @@ import { REPO_ROOT } from '@kbn/repo-info'; import type { ArtifactLicense, ServerlessProjectType } from '@kbn/es'; import { isServerlessProjectType, extractAndArchiveLogs } from '@kbn/es/src/utils'; import type { Config } from '../../functional_test_runner'; -import { createTestEsCluster, esTestConfig } from '../../es'; +import { ICluster, createTestEsCluster, esTestConfig } from '../../es'; interface RunElasticsearchOptions { log: ToolingLog; @@ -77,6 +77,19 @@ function getEsConfig({ }; } +export async function cleanupElasticsearch( + node: ICluster, + isServerless: boolean, + logsDir: string | undefined, + log: ToolingLog +): Promise { + await node.cleanup(); + + if (isServerless) { + await extractAndArchiveLogs({ outputFolder: logsDir, log }); + } +} + export async function runElasticsearch( options: RunElasticsearchOptions ): Promise<() => Promise> { @@ -91,8 +104,7 @@ export async function runElasticsearch( config, }); return async () => { - await node.cleanup(); - await extractAndArchiveLogs({ outputFolder: logsDir, log }); + await cleanupElasticsearch(node, config.serverless, logsDir, log); }; } diff --git a/packages/kbn-test/src/kbn_client/kbn_client_requester_error.ts b/packages/kbn-test/src/kbn_client/kbn_client_requester_error.ts index 265f2a60b02f5..f44bf2bcc53ed 100644 --- a/packages/kbn-test/src/kbn_client/kbn_client_requester_error.ts +++ b/packages/kbn-test/src/kbn_client/kbn_client_requester_error.ts @@ -18,6 +18,7 @@ export class KbnClientRequesterError extends Error { } function clean(error: Error): AxiosError { const _ = AxiosError.from(error); + delete _.cause; delete _.config; delete _.request; delete _.response; diff --git a/packages/kbn-triggers-actions-ui-types/rule_types.ts b/packages/kbn-triggers-actions-ui-types/rule_types.ts index 2029c98fb0e5c..1d7f8e823b260 100644 --- a/packages/kbn-triggers-actions-ui-types/rule_types.ts +++ b/packages/kbn-triggers-actions-ui-types/rule_types.ts @@ -25,6 +25,7 @@ export interface RuleType< | 'ruleTaskTimeout' | 'defaultScheduleInterval' | 'doesSetRecoveryContext' + | 'category' > { actionVariables: ActionVariables; authorizedConsumers: Record; @@ -34,3 +35,7 @@ export interface RuleType< } export type RuleTypeIndex = Map; + +export type RuleTypeWithDescription = RuleType & { description?: string }; + +export type RuleTypeIndexWithDescriptions = Map; diff --git a/packages/kbn-unified-data-table/src/components/data_table.tsx b/packages/kbn-unified-data-table/src/components/data_table.tsx index 7d57188dd1010..7f4297404c4e5 100644 --- a/packages/kbn-unified-data-table/src/components/data_table.tsx +++ b/packages/kbn-unified-data-table/src/components/data_table.tsx @@ -1155,8 +1155,6 @@ export const UnifiedDataTable = ({ /> ) : ( ); expect(component.html()).toMatchInlineSnapshot( - `"
    _index
    test
    _score
    1
    "` + `"
    extension
    .gz
    _index
    test
    _score
    1
    "` ); }); }); diff --git a/packages/kbn-unified-doc-viewer/README.md b/packages/kbn-unified-doc-viewer/README.md index 825f6eee9f910..ea808e3fd4fe4 100644 --- a/packages/kbn-unified-doc-viewer/README.md +++ b/packages/kbn-unified-doc-viewer/README.md @@ -2,10 +2,6 @@ This package contains components and services for the unified doc viewer component. -Discover (Classic view → Expanded document) - -![image](https://github.com/elastic/kibana/assets/1178348/a0a360bf-2697-4427-a32e-c728f06f5a7e) - Discover (Document explorer → Toggle dialog with details) ![image](https://github.com/elastic/kibana/assets/1178348/c9c11587-c53f-4bcd-8d48-aaceb64981ea) diff --git a/packages/kbn-unified-doc-viewer/src/services/types.ts b/packages/kbn-unified-doc-viewer/src/services/types.ts index 04d88ba256a37..9c4d06f21b1cf 100644 --- a/packages/kbn-unified-doc-viewer/src/services/types.ts +++ b/packages/kbn-unified-doc-viewer/src/services/types.ts @@ -7,13 +7,9 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import type { DataView, DataViewField } from '@kbn/data-views-plugin/public'; +import type { DataView } from '@kbn/data-views-plugin/public'; import type { AggregateQuery, Query } from '@kbn/es-query'; -import type { - DataTableRecord, - DataTableColumnsMeta, - IgnoredReason, -} from '@kbn/discover-utils/types'; +import type { DataTableRecord, DataTableColumnsMeta } from '@kbn/discover-utils/types'; import { DocViewsRegistry } from './doc_views_registry'; export interface FieldMapping { @@ -77,23 +73,3 @@ interface ComponentDocViewInput extends BaseDocViewInput { export type DocView = ComponentDocViewInput | RenderDocViewInput; export type DocViewFactory = () => DocView; - -export interface FieldRecordLegacy { - action: { - isActive: boolean; - onFilter?: DocViewFilterFn; - onToggleColumn: ((field: string) => void) | undefined; - flattenedField: unknown; - }; - field: { - displayName: string; - field: string; - scripted: boolean; - fieldType?: string; - fieldMapping?: DataViewField; - }; - value: { - formattedValue: string; - ignored?: IgnoredReason; - }; -} diff --git a/packages/kbn-unified-doc-viewer/src/types.ts b/packages/kbn-unified-doc-viewer/src/types.ts index 01d59ff970d85..8a80382add748 100644 --- a/packages/kbn-unified-doc-viewer/src/types.ts +++ b/packages/kbn-unified-doc-viewer/src/types.ts @@ -12,5 +12,4 @@ export type { DocViewFilterFn, DocViewRenderFn, DocViewRenderProps, - FieldRecordLegacy, } from './services/types'; diff --git a/packages/kbn-unified-doc-viewer/types.ts b/packages/kbn-unified-doc-viewer/types.ts index 50fc73909e1db..aae317c8f8fba 100644 --- a/packages/kbn-unified-doc-viewer/types.ts +++ b/packages/kbn-unified-doc-viewer/types.ts @@ -8,4 +8,4 @@ */ export type { ElasticRequestState } from '.'; -export type { DocViewFilterFn, DocViewRenderProps, FieldRecordLegacy } from './src/types'; +export type { DocViewFilterFn, DocViewRenderProps } from './src/types'; diff --git a/packages/kbn-visualization-ui-components/components/field_picker/field_picker.test.tsx b/packages/kbn-visualization-ui-components/components/field_picker/field_picker.test.tsx index 6cdcfaaa8d0ad..a19de192662c2 100644 --- a/packages/kbn-visualization-ui-components/components/field_picker/field_picker.test.tsx +++ b/packages/kbn-visualization-ui-components/components/field_picker/field_picker.test.tsx @@ -10,15 +10,15 @@ import React from 'react'; import { FieldPicker, FieldPickerProps } from './field_picker'; import { render, screen } from '@testing-library/react'; -import faker from 'faker'; +import { faker } from '@faker-js/faker'; import userEvent from '@testing-library/user-event'; import { DataType, FieldOptionValue } from './types'; const generateFieldWithLabelOfLength = (length: number) => ({ - label: faker.random.alpha({ count: length }), + label: faker.string.alpha(length), value: { type: 'field' as const, - field: faker.random.alpha({ count: length }), + field: faker.string.alpha(length), dataType: 'date' as DataType, operationType: 'count', }, diff --git a/packages/presentation/presentation_publishing/interfaces/fetch/publishes_unified_search.ts b/packages/presentation/presentation_publishing/interfaces/fetch/publishes_unified_search.ts index 332a47e039e01..aec8c33715c0f 100644 --- a/packages/presentation/presentation_publishing/interfaces/fetch/publishes_unified_search.ts +++ b/packages/presentation/presentation_publishing/interfaces/fetch/publishes_unified_search.ts @@ -32,6 +32,7 @@ export interface PublishesFilters { export type PublishesUnifiedSearch = PublishesTimeRange & PublishesFilters & { isCompatibleWithUnifiedSearch?: () => boolean; + canEditUnifiedSearch?: () => boolean; query$: PublishingSubject; }; diff --git a/packages/response-ops/rule_form/README.md b/packages/response-ops/rule_form/README.md new file mode 100644 index 0000000000000..5196cc65ceedd --- /dev/null +++ b/packages/response-ops/rule_form/README.md @@ -0,0 +1,3 @@ +# @kbn/response-ops-rule-form + +This package contains all components necessary to render the forms for creating and editing rules. diff --git a/packages/response-ops/rule_form/index.ts b/packages/response-ops/rule_form/index.ts new file mode 100644 index 0000000000000..9a654f12bba7b --- /dev/null +++ b/packages/response-ops/rule_form/index.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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +export * from './src/types'; +export * from './src/rule_type_modal'; + +export { RuleForm } from './src/rule_form'; + +export { + fetchUiConfig, + createRule, + updateRule, + type CreateRuleBody, + UPDATE_FIELDS_WITH_ACTIONS, + transformCreateRuleBody, + transformUpdateRuleBody, + resolveRule, +} from './src/common/apis'; + +export { CREATE_RULE_ROUTE, EDIT_RULE_ROUTE } from './src/constants'; + +export { + RuleActionsNotifyWhen, + RuleActionsAlertsFilter, + RuleActionsAlertsFilterTimeframe, +} from './src/rule_actions'; diff --git a/packages/response-ops/rule_form/jest.config.js b/packages/response-ops/rule_form/jest.config.js new file mode 100644 index 0000000000000..babc1df67680c --- /dev/null +++ b/packages/response-ops/rule_form/jest.config.js @@ -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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../..', + roots: ['/packages/response-ops/rule_form'], + setupFilesAfterEnv: ['/packages/response-ops/rule_form/setup_tests.ts'], +}; diff --git a/packages/response-ops/rule_form/kibana.jsonc b/packages/response-ops/rule_form/kibana.jsonc new file mode 100644 index 0000000000000..e8538a088a557 --- /dev/null +++ b/packages/response-ops/rule_form/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-browser", + "id": "@kbn/response-ops-rule-form", + "owner": "@elastic/response-ops" +} diff --git a/packages/response-ops/rule_form/package.json b/packages/response-ops/rule_form/package.json new file mode 100644 index 0000000000000..c3a412a09c9bb --- /dev/null +++ b/packages/response-ops/rule_form/package.json @@ -0,0 +1,6 @@ +{ + "name": "@kbn/response-ops-rule-form", + "private": true, + "version": "1.0.0", + "license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0" +} \ No newline at end of file diff --git a/packages/response-ops/rule_form/setup_tests.ts b/packages/response-ops/rule_form/setup_tests.ts new file mode 100644 index 0000000000000..5ebc6d3dac1ca --- /dev/null +++ b/packages/response-ops/rule_form/setup_tests.ts @@ -0,0 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +// eslint-disable-next-line import/no-extraneous-dependencies +import '@testing-library/jest-dom'; diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/create_rule/create_rule.test.ts b/packages/response-ops/rule_form/src/common/apis/create_rule/create_rule.test.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/apis/create_rule/create_rule.test.ts rename to packages/response-ops/rule_form/src/common/apis/create_rule/create_rule.test.ts diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/create_rule/create_rule.ts b/packages/response-ops/rule_form/src/common/apis/create_rule/create_rule.ts similarity index 94% rename from packages/kbn-alerts-ui-shared/src/common/apis/create_rule/create_rule.ts rename to packages/response-ops/rule_form/src/common/apis/create_rule/create_rule.ts index 46bbdba958ff0..571bb0712f6aa 100644 --- a/packages/kbn-alerts-ui-shared/src/common/apis/create_rule/create_rule.ts +++ b/packages/response-ops/rule_form/src/common/apis/create_rule/create_rule.ts @@ -11,7 +11,7 @@ import type { HttpSetup } from '@kbn/core/public'; import type { AsApiContract } from '@kbn/actions-types'; import type { Rule } from '../../types'; import { CreateRuleBody, transformCreateRuleBody } from '.'; -import { BASE_ALERTING_API_PATH } from '../../constants'; +import { BASE_ALERTING_API_PATH } from '../../../constants'; import { transformRule } from '../../transformations'; export async function createRule({ diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/create_rule/index.ts b/packages/response-ops/rule_form/src/common/apis/create_rule/index.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/apis/create_rule/index.ts rename to packages/response-ops/rule_form/src/common/apis/create_rule/index.ts diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/create_rule/transform_create_rule_body.test.ts b/packages/response-ops/rule_form/src/common/apis/create_rule/transform_create_rule_body.test.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/apis/create_rule/transform_create_rule_body.test.ts rename to packages/response-ops/rule_form/src/common/apis/create_rule/transform_create_rule_body.test.ts diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/create_rule/transform_create_rule_body.ts b/packages/response-ops/rule_form/src/common/apis/create_rule/transform_create_rule_body.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/apis/create_rule/transform_create_rule_body.ts rename to packages/response-ops/rule_form/src/common/apis/create_rule/transform_create_rule_body.ts diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/create_rule/types.ts b/packages/response-ops/rule_form/src/common/apis/create_rule/types.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/apis/create_rule/types.ts rename to packages/response-ops/rule_form/src/common/apis/create_rule/types.ts diff --git a/packages/response-ops/rule_form/src/common/apis/fetch_rule_types.ts b/packages/response-ops/rule_form/src/common/apis/fetch_rule_types.ts new file mode 100644 index 0000000000000..bf2da123b8cf5 --- /dev/null +++ b/packages/response-ops/rule_form/src/common/apis/fetch_rule_types.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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +import { HttpSetup } from '@kbn/core/public'; +import type { AsApiContract, RewriteRequestCase } from '@kbn/actions-types'; +import type { RuleType } from '@kbn/triggers-actions-ui-types'; +import { BASE_ALERTING_API_PATH } from '../../constants'; + +const rewriteResponseRes = (results: Array>): RuleType[] => { + return results.map((item) => rewriteBodyReq(item)); +}; + +const rewriteBodyReq: RewriteRequestCase = ({ + enabled_in_license: enabledInLicense, + recovery_action_group: recoveryActionGroup, + action_groups: actionGroups, + default_action_group_id: defaultActionGroupId, + minimum_license_required: minimumLicenseRequired, + action_variables: actionVariables, + authorized_consumers: authorizedConsumers, + rule_task_timeout: ruleTaskTimeout, + does_set_recovery_context: doesSetRecoveryContext, + default_schedule_interval: defaultScheduleInterval, + has_alerts_mappings: hasAlertsMappings, + has_fields_for_a_a_d: hasFieldsForAAD, + ...rest +}: AsApiContract) => ({ + enabledInLicense, + recoveryActionGroup, + actionGroups, + defaultActionGroupId, + minimumLicenseRequired, + actionVariables, + authorizedConsumers, + ruleTaskTimeout, + doesSetRecoveryContext, + defaultScheduleInterval, + hasAlertsMappings, + hasFieldsForAAD, + ...rest, +}); + +export async function fetchRuleTypes({ http }: { http: HttpSetup }): Promise { + const res = await http.get>>>( + `${BASE_ALERTING_API_PATH}/rule_types` + ); + return rewriteResponseRes(res); +} diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/fetch_ui_config/fetch_ui_config.test.ts b/packages/response-ops/rule_form/src/common/apis/fetch_ui_config/fetch_ui_config.test.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/apis/fetch_ui_config/fetch_ui_config.test.ts rename to packages/response-ops/rule_form/src/common/apis/fetch_ui_config/fetch_ui_config.test.ts diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/fetch_ui_config/fetch_ui_config.ts b/packages/response-ops/rule_form/src/common/apis/fetch_ui_config/fetch_ui_config.ts similarity index 91% rename from packages/kbn-alerts-ui-shared/src/common/apis/fetch_ui_config/fetch_ui_config.ts rename to packages/response-ops/rule_form/src/common/apis/fetch_ui_config/fetch_ui_config.ts index 89bc5e0bbe5fe..0e33bd0c6497a 100644 --- a/packages/kbn-alerts-ui-shared/src/common/apis/fetch_ui_config/fetch_ui_config.ts +++ b/packages/response-ops/rule_form/src/common/apis/fetch_ui_config/fetch_ui_config.ts @@ -8,7 +8,7 @@ */ import type { HttpStart } from '@kbn/core-http-browser'; -import { BASE_TRIGGERS_ACTIONS_UI_API_PATH } from '../../constants'; +import { BASE_TRIGGERS_ACTIONS_UI_API_PATH } from '../../../constants'; import { UiConfig } from '.'; export const fetchUiConfig = async ({ http }: { http: HttpStart }): Promise => { diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/fetch_ui_config/index.ts b/packages/response-ops/rule_form/src/common/apis/fetch_ui_config/index.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/apis/fetch_ui_config/index.ts rename to packages/response-ops/rule_form/src/common/apis/fetch_ui_config/index.ts diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/fetch_ui_config/types.ts b/packages/response-ops/rule_form/src/common/apis/fetch_ui_config/types.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/apis/fetch_ui_config/types.ts rename to packages/response-ops/rule_form/src/common/apis/fetch_ui_config/types.ts diff --git a/packages/response-ops/rule_form/src/common/apis/index.ts b/packages/response-ops/rule_form/src/common/apis/index.ts new file mode 100644 index 0000000000000..58b53aa6aee43 --- /dev/null +++ b/packages/response-ops/rule_form/src/common/apis/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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +export * from './create_rule'; +export * from './fetch_ui_config'; +export * from './resolve_rule'; +export * from './update_rule'; diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/resolve_rule/index.ts b/packages/response-ops/rule_form/src/common/apis/resolve_rule/index.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/apis/resolve_rule/index.ts rename to packages/response-ops/rule_form/src/common/apis/resolve_rule/index.ts diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/resolve_rule/resolve_rule.test.ts b/packages/response-ops/rule_form/src/common/apis/resolve_rule/resolve_rule.test.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/apis/resolve_rule/resolve_rule.test.ts rename to packages/response-ops/rule_form/src/common/apis/resolve_rule/resolve_rule.test.ts diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/resolve_rule/resolve_rule.ts b/packages/response-ops/rule_form/src/common/apis/resolve_rule/resolve_rule.ts similarity index 93% rename from packages/kbn-alerts-ui-shared/src/common/apis/resolve_rule/resolve_rule.ts rename to packages/response-ops/rule_form/src/common/apis/resolve_rule/resolve_rule.ts index 6446d27136ee1..9d9141eae9765 100644 --- a/packages/kbn-alerts-ui-shared/src/common/apis/resolve_rule/resolve_rule.ts +++ b/packages/response-ops/rule_form/src/common/apis/resolve_rule/resolve_rule.ts @@ -9,7 +9,7 @@ import { HttpSetup } from '@kbn/core-http-browser'; import { AsApiContract } from '@kbn/actions-types'; -import { INTERNAL_BASE_ALERTING_API_PATH } from '../../constants'; +import { INTERNAL_BASE_ALERTING_API_PATH } from '../../../constants'; import { transformResolvedRule } from '../../transformations'; import { ResolvedRule } from '../../types'; diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/index.ts b/packages/response-ops/rule_form/src/common/apis/update_rule/index.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/apis/update_rule/index.ts rename to packages/response-ops/rule_form/src/common/apis/update_rule/index.ts diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/transform_update_rule_body.test.ts b/packages/response-ops/rule_form/src/common/apis/update_rule/transform_update_rule_body.test.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/apis/update_rule/transform_update_rule_body.test.ts rename to packages/response-ops/rule_form/src/common/apis/update_rule/transform_update_rule_body.test.ts diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/transform_update_rule_body.ts b/packages/response-ops/rule_form/src/common/apis/update_rule/transform_update_rule_body.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/apis/update_rule/transform_update_rule_body.ts rename to packages/response-ops/rule_form/src/common/apis/update_rule/transform_update_rule_body.ts diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/types.ts b/packages/response-ops/rule_form/src/common/apis/update_rule/types.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/apis/update_rule/types.ts rename to packages/response-ops/rule_form/src/common/apis/update_rule/types.ts diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/update_rule.test.ts b/packages/response-ops/rule_form/src/common/apis/update_rule/update_rule.test.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/apis/update_rule/update_rule.test.ts rename to packages/response-ops/rule_form/src/common/apis/update_rule/update_rule.test.ts diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/update_rule.ts b/packages/response-ops/rule_form/src/common/apis/update_rule/update_rule.ts similarity index 96% rename from packages/kbn-alerts-ui-shared/src/common/apis/update_rule/update_rule.ts rename to packages/response-ops/rule_form/src/common/apis/update_rule/update_rule.ts index d5fd360a0c949..413a23e5fb279 100644 --- a/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/update_rule.ts +++ b/packages/response-ops/rule_form/src/common/apis/update_rule/update_rule.ts @@ -11,7 +11,7 @@ import { HttpSetup } from '@kbn/core/public'; import { pick } from 'lodash'; import { AsApiContract } from '@kbn/actions-types'; import { UpdateRuleBody } from './types'; -import { BASE_ALERTING_API_PATH } from '../../constants'; +import { BASE_ALERTING_API_PATH } from '../../../constants'; import { transformUpdateRuleBody } from './transform_update_rule_body'; import { transformRule } from '../../transformations'; import { Rule } from '../../types'; diff --git a/packages/response-ops/rule_form/src/common/hooks/index.ts b/packages/response-ops/rule_form/src/common/hooks/index.ts new file mode 100644 index 0000000000000..57a70045552a8 --- /dev/null +++ b/packages/response-ops/rule_form/src/common/hooks/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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +export * from './use_create_rule'; +export * from './use_load_connector_types'; +export * from './use_load_connectors'; +export * from './use_load_ui_config'; +export * from './use_resolve_rule'; +export * from './use_update_rule'; diff --git a/packages/kbn-alerts-ui-shared/src/common/hooks/use_create_rule.test.tsx b/packages/response-ops/rule_form/src/common/hooks/use_create_rule.test.tsx similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/hooks/use_create_rule.test.tsx rename to packages/response-ops/rule_form/src/common/hooks/use_create_rule.test.tsx diff --git a/packages/kbn-alerts-ui-shared/src/common/hooks/use_create_rule.ts b/packages/response-ops/rule_form/src/common/hooks/use_create_rule.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/hooks/use_create_rule.ts rename to packages/response-ops/rule_form/src/common/hooks/use_create_rule.ts diff --git a/packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connector_types.test.tsx b/packages/response-ops/rule_form/src/common/hooks/use_load_connector_types.test.tsx similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connector_types.test.tsx rename to packages/response-ops/rule_form/src/common/hooks/use_load_connector_types.test.tsx diff --git a/packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connector_types.ts b/packages/response-ops/rule_form/src/common/hooks/use_load_connector_types.ts similarity index 92% rename from packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connector_types.ts rename to packages/response-ops/rule_form/src/common/hooks/use_load_connector_types.ts index a72315c19e798..950f77346ef68 100644 --- a/packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connector_types.ts +++ b/packages/response-ops/rule_form/src/common/hooks/use_load_connector_types.ts @@ -9,7 +9,7 @@ import { useQuery } from '@tanstack/react-query'; import type { HttpStart } from '@kbn/core-http-browser'; -import { fetchConnectorTypes } from '../apis'; +import { fetchConnectorTypes } from '@kbn/alerts-ui-shared/src/common/apis/fetch_connector_types'; export interface UseLoadConnectorTypesProps { http: HttpStart; diff --git a/packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connectors.test.tsx b/packages/response-ops/rule_form/src/common/hooks/use_load_connectors.test.tsx similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connectors.test.tsx rename to packages/response-ops/rule_form/src/common/hooks/use_load_connectors.test.tsx diff --git a/packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connectors.ts b/packages/response-ops/rule_form/src/common/hooks/use_load_connectors.ts similarity index 93% rename from packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connectors.ts rename to packages/response-ops/rule_form/src/common/hooks/use_load_connectors.ts index 8c93881762b1a..d6e77b5b42571 100644 --- a/packages/kbn-alerts-ui-shared/src/common/hooks/use_load_connectors.ts +++ b/packages/response-ops/rule_form/src/common/hooks/use_load_connectors.ts @@ -9,7 +9,7 @@ import { useQuery } from '@tanstack/react-query'; import type { HttpStart } from '@kbn/core-http-browser'; -import { fetchConnectors } from '../apis'; +import { fetchConnectors } from '@kbn/alerts-ui-shared/src/common/apis/fetch_connectors'; export interface UseLoadConnectorsProps { http: HttpStart; diff --git a/packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_type_aad_template_fields.test.tsx b/packages/response-ops/rule_form/src/common/hooks/use_load_rule_type_aad_template_fields.test.tsx similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_type_aad_template_fields.test.tsx rename to packages/response-ops/rule_form/src/common/hooks/use_load_rule_type_aad_template_fields.test.tsx diff --git a/packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_type_aad_template_fields.ts b/packages/response-ops/rule_form/src/common/hooks/use_load_rule_type_aad_template_fields.ts similarity index 91% rename from packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_type_aad_template_fields.ts rename to packages/response-ops/rule_form/src/common/hooks/use_load_rule_type_aad_template_fields.ts index c9dbc6c75ff35..90c98d3c8153d 100644 --- a/packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_type_aad_template_fields.ts +++ b/packages/response-ops/rule_form/src/common/hooks/use_load_rule_type_aad_template_fields.ts @@ -11,7 +11,10 @@ import { EcsFlat } from '@elastic/ecs'; import { ActionVariable } from '@kbn/alerting-types'; import type { HttpStart } from '@kbn/core-http-browser'; import { useQuery } from '@tanstack/react-query'; -import { fetchRuleTypeAadTemplateFields, getDescription } from '../apis'; +import { + fetchRuleTypeAadTemplateFields, + getDescription, +} from '@kbn/alerts-ui-shared/src/common/apis'; export interface UseLoadRuleTypeAadTemplateFieldProps { http: HttpStart; @@ -23,7 +26,7 @@ export interface UseLoadRuleTypeAadTemplateFieldProps { export const useLoadRuleTypeAadTemplateField = (props: UseLoadRuleTypeAadTemplateFieldProps) => { const { http, ruleTypeId, enabled, cacheTime } = props; - const queryFn = () => { + const queryFn = async () => { if (!ruleTypeId) { return; } diff --git a/packages/kbn-alerts-ui-shared/src/common/hooks/use_load_ui_config.ts b/packages/response-ops/rule_form/src/common/hooks/use_load_ui_config.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/hooks/use_load_ui_config.ts rename to packages/response-ops/rule_form/src/common/hooks/use_load_ui_config.ts diff --git a/packages/kbn-alerts-ui-shared/src/common/hooks/use_resolve_rule.test.tsx b/packages/response-ops/rule_form/src/common/hooks/use_resolve_rule.test.tsx similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/hooks/use_resolve_rule.test.tsx rename to packages/response-ops/rule_form/src/common/hooks/use_resolve_rule.test.tsx diff --git a/packages/kbn-alerts-ui-shared/src/common/hooks/use_resolve_rule.ts b/packages/response-ops/rule_form/src/common/hooks/use_resolve_rule.ts similarity index 97% rename from packages/kbn-alerts-ui-shared/src/common/hooks/use_resolve_rule.ts rename to packages/response-ops/rule_form/src/common/hooks/use_resolve_rule.ts index 95c3ca6baad02..ea480b4039e86 100644 --- a/packages/kbn-alerts-ui-shared/src/common/hooks/use_resolve_rule.ts +++ b/packages/response-ops/rule_form/src/common/hooks/use_resolve_rule.ts @@ -10,7 +10,7 @@ import { useQuery } from '@tanstack/react-query'; import type { HttpStart } from '@kbn/core-http-browser'; import { resolveRule } from '../apis/resolve_rule'; -import { RuleFormData } from '../../rule_form'; +import { RuleFormData } from '../../types'; export interface UseResolveProps { http: HttpStart; diff --git a/packages/kbn-alerts-ui-shared/src/common/hooks/use_update_rule.test.tsx b/packages/response-ops/rule_form/src/common/hooks/use_update_rule.test.tsx similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/hooks/use_update_rule.test.tsx rename to packages/response-ops/rule_form/src/common/hooks/use_update_rule.test.tsx diff --git a/packages/kbn-alerts-ui-shared/src/common/hooks/use_update_rule.ts b/packages/response-ops/rule_form/src/common/hooks/use_update_rule.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/common/hooks/use_update_rule.ts rename to packages/response-ops/rule_form/src/common/hooks/use_update_rule.ts diff --git a/packages/kbn-alerts-ui-shared/src/common/i18n.ts b/packages/response-ops/rule_form/src/common/i18n.ts similarity index 53% rename from packages/kbn-alerts-ui-shared/src/common/i18n.ts rename to packages/response-ops/rule_form/src/common/i18n.ts index 754ab78e12249..9cb100485ebbc 100644 --- a/packages/kbn-alerts-ui-shared/src/common/i18n.ts +++ b/packages/response-ops/rule_form/src/common/i18n.ts @@ -10,37 +10,37 @@ import { i18n } from '@kbn/i18n'; export const PRODUCER_DISPLAY_NAMES = { - apm: i18n.translate('alertsUIShared.producerDisplayNames.apm', { + apm: i18n.translate('responseOpsRuleForm.producerDisplayNames.apm', { defaultMessage: 'APM and User Experience', }), - uptime: i18n.translate('alertsUIShared.producerDisplayNames.uptime', { + uptime: i18n.translate('responseOpsRuleForm.producerDisplayNames.uptime', { defaultMessage: 'Synthetics and Uptime', }), - stackAlerts: i18n.translate('alertsUIShared.producerDisplayNames.stackAlerts', { + stackAlerts: i18n.translate('responseOpsRuleForm.producerDisplayNames.stackAlerts', { defaultMessage: 'Stack Alerts', }), - metrics: i18n.translate('alertsUIShared.producerDisplayNames.metrics', { + metrics: i18n.translate('responseOpsRuleForm.producerDisplayNames.metrics', { defaultMessage: 'Metrics', }), - logs: i18n.translate('alertsUIShared.producerDisplayNames.logs', { + logs: i18n.translate('responseOpsRuleForm.producerDisplayNames.logs', { defaultMessage: 'Logs', }), - siem: i18n.translate('alertsUIShared.producerDisplayNames.siem', { + siem: i18n.translate('responseOpsRuleForm.producerDisplayNames.siem', { defaultMessage: 'Security', }), - observability: i18n.translate('alertsUIShared.producerDisplayNames.observability', { + observability: i18n.translate('responseOpsRuleForm.producerDisplayNames.observability', { defaultMessage: 'Observability', }), - ml: i18n.translate('alertsUIShared.producerDisplayNames.ml', { + ml: i18n.translate('responseOpsRuleForm.producerDisplayNames.ml', { defaultMessage: 'Machine Learning', }), - slo: i18n.translate('alertsUIShared.producerDisplayNames.slo', { + slo: i18n.translate('responseOpsRuleForm.producerDisplayNames.slo', { defaultMessage: 'SLOs', }), - infrastructure: i18n.translate('alertsUIShared.producerDisplayNames.infrastructure', { + infrastructure: i18n.translate('responseOpsRuleForm.producerDisplayNames.infrastructure', { defaultMessage: 'Infrastructure', }), - monitoring: i18n.translate('alertsUIShared.producerDisplayNames.monitoring', { + monitoring: i18n.translate('responseOpsRuleForm.producerDisplayNames.monitoring', { defaultMessage: 'Stack Monitoring', }), }; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/index.ts b/packages/response-ops/rule_form/src/common/index.ts similarity index 93% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/index.ts rename to packages/response-ops/rule_form/src/common/index.ts index f250421b5e716..34d385a3f5d62 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/index.ts +++ b/packages/response-ops/rule_form/src/common/index.ts @@ -7,4 +7,4 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -export * from './rule_actions'; +export * from './types'; diff --git a/packages/kbn-alerts-ui-shared/src/common/test_utils/actions_test_utils.ts b/packages/response-ops/rule_form/src/common/test_utils/actions_test_utils.ts similarity index 91% rename from packages/kbn-alerts-ui-shared/src/common/test_utils/actions_test_utils.ts rename to packages/response-ops/rule_form/src/common/test_utils/actions_test_utils.ts index 01f88ab1e01b4..1551541013064 100644 --- a/packages/kbn-alerts-ui-shared/src/common/test_utils/actions_test_utils.ts +++ b/packages/response-ops/rule_form/src/common/test_utils/actions_test_utils.ts @@ -9,8 +9,13 @@ import { ActionType } from '@kbn/actions-types'; import { RuleSystemAction } from '@kbn/alerting-types'; -import { ActionConnector, ActionTypeModel, GenericValidationResult, RuleAction } from '../types'; -import { actionTypeRegistryMock } from './action_type_registry.mock'; +import { + ActionConnector, + ActionTypeModel, + GenericValidationResult, + RuleAction, +} from '@kbn/alerts-ui-shared'; +import { actionTypeRegistryMock } from '@kbn/alerts-ui-shared/src/common/test_utils/action_type_registry.mock'; export const getConnector = ( id: string, diff --git a/packages/response-ops/rule_form/src/common/transformations/index.ts b/packages/response-ops/rule_form/src/common/transformations/index.ts new file mode 100644 index 0000000000000..2f0fd7d84539b --- /dev/null +++ b/packages/response-ops/rule_form/src/common/transformations/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +export * from './transform_rule'; diff --git a/packages/kbn-alerts-ui-shared/src/common/transformations/transform_rule.ts b/packages/response-ops/rule_form/src/common/transformations/transform_rule.ts similarity index 95% rename from packages/kbn-alerts-ui-shared/src/common/transformations/transform_rule.ts rename to packages/response-ops/rule_form/src/common/transformations/transform_rule.ts index b04e98887f2e5..d1f11c4109ed1 100644 --- a/packages/kbn-alerts-ui-shared/src/common/transformations/transform_rule.ts +++ b/packages/response-ops/rule_form/src/common/transformations/transform_rule.ts @@ -9,8 +9,8 @@ import { AsApiContract, RewriteRequestCase } from '@kbn/actions-types'; import { RuleExecutionStatus, RuleLastRun } from '@kbn/alerting-types'; -import type { ResolvedRule, RuleUiAction, Rule } from '..'; -import { transformAction } from '.'; +import { transformAction } from '@kbn/alerts-ui-shared/src/common/transformations'; +import type { ResolvedRule, Rule, RuleUiAction } from '..'; const transformExecutionStatus: RewriteRequestCase = ({ last_execution_date: lastExecutionDate, diff --git a/packages/response-ops/rule_form/src/common/types/index.ts b/packages/response-ops/rule_form/src/common/types/index.ts new file mode 100644 index 0000000000000..a9486c387724a --- /dev/null +++ b/packages/response-ops/rule_form/src/common/types/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +export * from '@kbn/alerts-ui-shared/src/common/types/rule_types'; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/constants.ts b/packages/response-ops/rule_form/src/constants/index.ts similarity index 84% rename from packages/kbn-alerts-ui-shared/src/rule_form/constants.ts rename to packages/response-ops/rule_form/src/constants/index.ts index a3748eeabe697..78718f7e11de1 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/constants.ts +++ b/packages/response-ops/rule_form/src/constants/index.ts @@ -7,15 +7,20 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ +import { RuleNotifyWhen } from '@kbn/alerting-types'; import { + AlertConsumers, ES_QUERY_ID, - OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, ML_ANOMALY_DETECTION_RULE_TYPE_ID, + OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, RuleCreationValidConsumer, - AlertConsumers, } from '@kbn/rule-data-utils'; -import { RuleNotifyWhen } from '@kbn/alerting-types'; -import { RuleFormData } from './types'; +import { RuleFormData } from '../types'; + +export * from './routes'; +export * from './rule_flapping'; + +export const VIEW_LICENSE_OPTIONS_LINK = 'https://www.elastic.co/subscriptions'; export const DEFAULT_RULE_INTERVAL = '1m'; @@ -67,5 +72,5 @@ export const DEFAULT_VALID_CONSUMERS: RuleCreationValidConsumer[] = [ 'alerts', ]; -export const createRuleRoute = '/rule/create/:ruleTypeId' as const; -export const editRuleRoute = '/rule/edit/:id' as const; +export const CREATE_RULE_ROUTE = '/rule/create/:ruleTypeId' as const; +export const EDIT_RULE_ROUTE = '/rule/edit/:id' as const; diff --git a/packages/response-ops/rule_form/src/constants/routes.ts b/packages/response-ops/rule_form/src/constants/routes.ts new file mode 100644 index 0000000000000..a447f83c13ef2 --- /dev/null +++ b/packages/response-ops/rule_form/src/constants/routes.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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +export const BASE_ALERTING_API_PATH = '/api/alerting'; +export const INTERNAL_BASE_ALERTING_API_PATH = '/internal/alerting'; +export const BASE_TRIGGERS_ACTIONS_UI_API_PATH = '/internal/triggers_actions_ui'; diff --git a/packages/response-ops/rule_form/src/constants/rule_flapping.ts b/packages/response-ops/rule_form/src/constants/rule_flapping.ts new file mode 100644 index 0000000000000..542bb055fd431 --- /dev/null +++ b/packages/response-ops/rule_form/src/constants/rule_flapping.ts @@ -0,0 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +// Feature flag for frontend rule specific flapping in rule flyout +export const IS_RULE_SPECIFIC_FLAPPING_ENABLED = true; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/create_rule_form.tsx b/packages/response-ops/rule_form/src/create_rule_form.tsx similarity index 99% rename from packages/kbn-alerts-ui-shared/src/rule_form/create_rule_form.tsx rename to packages/response-ops/rule_form/src/create_rule_form.tsx index b0d95a7d5c2c9..d7ba545935495 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/create_rule_form.tsx +++ b/packages/response-ops/rule_form/src/create_rule_form.tsx @@ -14,7 +14,7 @@ import { type RuleCreationValidConsumer } from '@kbn/rule-data-utils'; import type { RuleFormData, RuleFormPlugins } from './types'; import { DEFAULT_VALID_CONSUMERS, getDefaultFormData } from './constants'; import { RuleFormStateProvider } from './rule_form_state'; -import { useCreateRule } from '../common/hooks'; +import { useCreateRule } from './common/hooks'; import { RulePage } from './rule_page'; import { RuleFormCircuitBreakerError, diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/edit_rule_form.tsx b/packages/response-ops/rule_form/src/edit_rule_form.tsx similarity index 99% rename from packages/kbn-alerts-ui-shared/src/rule_form/edit_rule_form.tsx rename to packages/response-ops/rule_form/src/edit_rule_form.tsx index ace31d1b7b6fb..7350a42475b69 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/edit_rule_form.tsx +++ b/packages/response-ops/rule_form/src/edit_rule_form.tsx @@ -12,7 +12,7 @@ import { EuiLoadingElastic } from '@elastic/eui'; import { toMountPoint } from '@kbn/react-kibana-mount'; import type { RuleFormData, RuleFormPlugins } from './types'; import { RuleFormStateProvider } from './rule_form_state'; -import { useUpdateRule } from '../common/hooks'; +import { useUpdateRule } from './common/hooks'; import { RulePage } from './rule_page'; import { RuleFormHealthCheckError } from './rule_form_errors/rule_form_health_check_error'; import { useLoadDependencies } from './hooks/use_load_dependencies'; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/hooks/index.ts b/packages/response-ops/rule_form/src/hooks/index.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/rule_form/hooks/index.ts rename to packages/response-ops/rule_form/src/hooks/index.ts diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/hooks/use_load_dependencies.test.tsx b/packages/response-ops/rule_form/src/hooks/use_load_dependencies.test.tsx similarity index 88% rename from packages/kbn-alerts-ui-shared/src/rule_form/hooks/use_load_dependencies.test.tsx rename to packages/response-ops/rule_form/src/hooks/use_load_dependencies.test.tsx index 3dd6a6a3cee11..227240efbf8e7 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/hooks/use_load_dependencies.test.tsx +++ b/packages/response-ops/rule_form/src/hooks/use_load_dependencies.test.tsx @@ -14,52 +14,56 @@ import type { HttpStart } from '@kbn/core-http-browser'; import type { ToastsStart } from '@kbn/core-notifications-browser'; import { useLoadDependencies } from './use_load_dependencies'; -import { RuleTypeRegistryContract } from '../../common'; +import type { RuleTypeRegistryContract } from '../common/types'; import { ApplicationStart } from '@kbn/core-application-browser'; -jest.mock('../../common/hooks/use_load_ui_config', () => ({ +jest.mock('../common/hooks/use_load_ui_config', () => ({ useLoadUiConfig: jest.fn(), })); -jest.mock('../../common/hooks/use_health_check', () => ({ +jest.mock('@kbn/alerts-ui-shared/src/common/hooks/use_health_check', () => ({ useHealthCheck: jest.fn(), })); -jest.mock('../../common/hooks/use_resolve_rule', () => ({ +jest.mock('../common/hooks/use_resolve_rule', () => ({ useResolveRule: jest.fn(), })); -jest.mock('../../common/hooks/use_load_rule_types_query', () => ({ +jest.mock('@kbn/alerts-ui-shared/src/common/hooks/use_load_rule_types_query', () => ({ useLoadRuleTypesQuery: jest.fn(), })); -jest.mock('../../common/hooks/use_load_connectors', () => ({ +jest.mock('../common/hooks/use_load_connectors', () => ({ useLoadConnectors: jest.fn(), })); -jest.mock('../../common/hooks/use_load_connector_types', () => ({ +jest.mock('../common/hooks/use_load_connector_types', () => ({ useLoadConnectorTypes: jest.fn(), })); -jest.mock('../../common/hooks/use_load_rule_type_aad_template_fields', () => ({ +jest.mock('../common/hooks/use_load_rule_type_aad_template_fields', () => ({ useLoadRuleTypeAadTemplateField: jest.fn(), })); -jest.mock('../../common/hooks/use_fetch_flapping_settings', () => ({ +jest.mock('@kbn/alerts-ui-shared/src/common/hooks/use_fetch_flapping_settings', () => ({ useFetchFlappingSettings: jest.fn(), })); -const { useLoadUiConfig } = jest.requireMock('../../common/hooks/use_load_ui_config'); -const { useHealthCheck } = jest.requireMock('../../common/hooks/use_health_check'); -const { useResolveRule } = jest.requireMock('../../common/hooks/use_resolve_rule'); -const { useLoadConnectors } = jest.requireMock('../../common/hooks/use_load_connectors'); -const { useLoadConnectorTypes } = jest.requireMock('../../common/hooks/use_load_connector_types'); +const { useLoadUiConfig } = jest.requireMock('../common/hooks/use_load_ui_config'); +const { useHealthCheck } = jest.requireMock( + '@kbn/alerts-ui-shared/src/common/hooks/use_health_check' +); +const { useResolveRule } = jest.requireMock('../common/hooks/use_resolve_rule'); +const { useLoadConnectors } = jest.requireMock('../common/hooks/use_load_connectors'); +const { useLoadConnectorTypes } = jest.requireMock('../common/hooks/use_load_connector_types'); const { useLoadRuleTypeAadTemplateField } = jest.requireMock( - '../../common/hooks/use_load_rule_type_aad_template_fields' + '../common/hooks/use_load_rule_type_aad_template_fields' +); +const { useLoadRuleTypesQuery } = jest.requireMock( + '@kbn/alerts-ui-shared/src/common/hooks/use_load_rule_types_query' ); -const { useLoadRuleTypesQuery } = jest.requireMock('../../common/hooks/use_load_rule_types_query'); const { useFetchFlappingSettings } = jest.requireMock( - '../../common/hooks/use_fetch_flapping_settings' + '@kbn/alerts-ui-shared/src/common/hooks/use_fetch_flapping_settings' ); const uiConfigMock = { diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/hooks/use_load_dependencies.ts b/packages/response-ops/rule_form/src/hooks/use_load_dependencies.ts similarity index 92% rename from packages/kbn-alerts-ui-shared/src/rule_form/hooks/use_load_dependencies.ts rename to packages/response-ops/rule_form/src/hooks/use_load_dependencies.ts index b4a7d3bb777b0..1cd734f9c837a 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/hooks/use_load_dependencies.ts +++ b/packages/response-ops/rule_form/src/hooks/use_load_dependencies.ts @@ -7,23 +7,25 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import { HttpStart } from '@kbn/core-http-browser'; +import type { HttpStart } from '@kbn/core-http-browser'; import type { ToastsStart } from '@kbn/core-notifications-browser'; -import { ApplicationStart } from '@kbn/core-application-browser'; +import type { ApplicationStart } from '@kbn/core-application-browser'; import { RuleCreationValidConsumer } from '@kbn/rule-data-utils'; import { useMemo } from 'react'; import { useHealthCheck, + useLoadRuleTypesQuery, + useFetchFlappingSettings, +} from '@kbn/alerts-ui-shared'; +import { useLoadConnectors, useLoadConnectorTypes, - useLoadRuleTypesQuery, useLoadUiConfig, useResolveRule, -} from '../../common/hooks'; -import { RuleTypeRegistryContract } from '../../common'; -import { useFetchFlappingSettings } from '../../common/hooks/use_fetch_flapping_settings'; -import { IS_RULE_SPECIFIC_FLAPPING_ENABLED } from '../../common/constants/rule_flapping'; -import { useLoadRuleTypeAadTemplateField } from '../../common/hooks/use_load_rule_type_aad_template_fields'; +} from '../common/hooks'; +import type { RuleTypeRegistryContract } from '../common/types'; +import { IS_RULE_SPECIFIC_FLAPPING_ENABLED } from '../constants'; +import { useLoadRuleTypeAadTemplateField } from '../common/hooks/use_load_rule_type_aad_template_fields'; export interface UseLoadDependencies { http: HttpStart; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/hooks/use_rule_form_dispatch.ts b/packages/response-ops/rule_form/src/hooks/use_rule_form_dispatch.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/rule_form/hooks/use_rule_form_dispatch.ts rename to packages/response-ops/rule_form/src/hooks/use_rule_form_dispatch.ts diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/hooks/use_rule_form_state.ts b/packages/response-ops/rule_form/src/hooks/use_rule_form_state.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/rule_form/hooks/use_rule_form_state.ts rename to packages/response-ops/rule_form/src/hooks/use_rule_form_state.ts diff --git a/packages/response-ops/rule_form/src/rule_actions/index.ts b/packages/response-ops/rule_form/src/rule_actions/index.ts new file mode 100644 index 0000000000000..6269ff1b48fbd --- /dev/null +++ b/packages/response-ops/rule_form/src/rule_actions/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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +export * from './rule_actions'; +export * from './rule_actions_notify_when'; +export * from './rule_actions_alerts_filter'; +export * from './rule_actions_alerts_filter_timeframe'; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions.test.tsx b/packages/response-ops/rule_form/src/rule_actions/rule_actions.test.tsx similarity index 96% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions.test.tsx rename to packages/response-ops/rule_form/src/rule_actions/rule_actions.test.tsx index 9560d933060f6..e172405e3695b 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions.test.tsx +++ b/packages/response-ops/rule_form/src/rule_actions/rule_actions.test.tsx @@ -17,11 +17,11 @@ import { getSystemAction, getConnector, getActionTypeModel, -} from '../../common/test_utils/actions_test_utils'; +} from '../common/test_utils/actions_test_utils'; import userEvent from '@testing-library/user-event'; -import { ActionConnector, ActionTypeModel } from '../../common/types'; +import type { ActionConnector, ActionTypeModel } from '@kbn/alerts-ui-shared'; +import { TypeRegistry } from '@kbn/alerts-ui-shared/lib'; import { RuleActionsItemProps } from './rule_actions_item'; -import { TypeRegistry } from '../../common/type_registry'; const http = httpServiceMock.createStartContract(); @@ -84,7 +84,7 @@ jest.mock('uuid', () => ({ v4: jest.fn().mockReturnValue('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'), })); -jest.mock('../../common/hooks', () => ({ +jest.mock('../common/hooks', () => ({ useLoadConnectors: jest.fn(), useLoadConnectorTypes: jest.fn(), useLoadRuleTypeAadTemplateField: jest.fn(), @@ -96,7 +96,7 @@ const mockValidate = jest.fn().mockResolvedValue({ const { useRuleFormState, useRuleFormDispatch } = jest.requireMock('../hooks'); const { useLoadConnectors, useLoadConnectorTypes, useLoadRuleTypeAadTemplateField } = - jest.requireMock('../../common/hooks'); + jest.requireMock('../common/hooks'); const mockConnectors = [getConnector('1')]; const mockConnectorTypes = [ diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions.tsx b/packages/response-ops/rule_form/src/rule_actions/rule_actions.tsx similarity index 97% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions.tsx rename to packages/response-ops/rule_form/src/rule_actions/rule_actions.tsx index 47588b487be6d..2479c07edfb5f 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions.tsx +++ b/packages/response-ops/rule_form/src/rule_actions/rule_actions.tsx @@ -11,10 +11,11 @@ import React, { useCallback, useMemo, useState } from 'react'; import { EuiButton, EuiSpacer, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { v4 as uuidv4 } from 'uuid'; import { RuleSystemAction } from '@kbn/alerting-types'; +import { ActionConnector } from '@kbn/alerts-ui-shared'; import { ADD_ACTION_TEXT } from '../translations'; import { RuleActionsConnectorsModal } from './rule_actions_connectors_modal'; import { useRuleFormDispatch, useRuleFormState } from '../hooks'; -import { ActionConnector, RuleAction, RuleFormParamsErrors } from '../../common/types'; +import { RuleAction, RuleFormParamsErrors } from '../common/types'; import { DEFAULT_FREQUENCY, MULTI_CONSUMER_RULE_TYPE_IDS } from '../constants'; import { RuleActionsItem } from './rule_actions_item'; import { RuleActionsSystemActionsItem } from './rule_actions_system_actions_item'; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_alerts_filter.test.tsx b/packages/response-ops/rule_form/src/rule_actions/rule_actions_alerts_filter.test.tsx similarity index 94% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_alerts_filter.test.tsx rename to packages/response-ops/rule_form/src/rule_actions/rule_actions_alerts_filter.test.tsx index 9b7502add4045..947508751fe9f 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_alerts_filter.test.tsx +++ b/packages/response-ops/rule_form/src/rule_actions/rule_actions_alerts_filter.test.tsx @@ -12,8 +12,8 @@ import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { httpServiceMock } from '@kbn/core/public/mocks'; import { FilterStateStore } from '@kbn/es-query'; -import { AlertsSearchBarProps, AlertsSearchBar } from '../../alerts_search_bar'; -import { getAction } from '../../common/test_utils/actions_test_utils'; +import { AlertsSearchBarProps, AlertsSearchBar } from '@kbn/alerts-ui-shared'; +import { getAction } from '../common/test_utils/actions_test_utils'; import { RuleActionsAlertsFilter } from './rule_actions_alerts_filter'; const http = httpServiceMock.createStartContract(); @@ -22,7 +22,7 @@ jest.mock('../hooks', () => ({ useRuleFormState: jest.fn(), })); -jest.mock('../../alerts_search_bar', () => ({ +jest.mock('@kbn/alerts-ui-shared', () => ({ AlertsSearchBar: jest.fn(), })); @@ -107,7 +107,7 @@ describe('ruleActionsAlertsFilter', () => { action={getAction('1')} onChange={mockOnChange} appName="stackAlerts" - featureIds={['stackAlerts']} + ruleTypeId=".es-query" /> ); @@ -120,7 +120,7 @@ describe('ruleActionsAlertsFilter', () => { action={getAction('1')} onChange={mockOnChange} appName="stackAlerts" - featureIds={['stackAlerts']} + ruleTypeId=".es-query" /> ); @@ -142,7 +142,7 @@ describe('ruleActionsAlertsFilter', () => { })} onChange={mockOnChange} appName="stackAlerts" - featureIds={['stackAlerts']} + ruleTypeId=".es-query" /> ); @@ -164,7 +164,7 @@ describe('ruleActionsAlertsFilter', () => { })} onChange={mockOnChange} appName="stackAlerts" - featureIds={['stackAlerts']} + ruleTypeId=".es-query" /> ); @@ -241,7 +241,6 @@ describe('ruleActionsAlertsFilter', () => { })} onChange={mockOnChange} appName="stackAlerts" - featureIds={['stackAlerts']} /> ); diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_alerts_filter.tsx b/packages/response-ops/rule_form/src/rule_actions/rule_actions_alerts_filter.tsx similarity index 88% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_alerts_filter.tsx rename to packages/response-ops/rule_form/src/rule_actions/rule_actions_alerts_filter.tsx index a5bbacc74d7a5..1fb4806b2aff8 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_alerts_filter.tsx +++ b/packages/response-ops/rule_form/src/rule_actions/rule_actions_alerts_filter.tsx @@ -7,17 +7,16 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import React, { useCallback, useEffect, useMemo, useState } from 'react'; -import { ValidFeatureId } from '@kbn/rule-data-utils'; +import { EuiSpacer, EuiSwitch } from '@elastic/eui'; +import type { AlertsFilter } from '@kbn/alerting-types'; +import { AlertsSearchBar, type AlertsSearchBarProps } from '@kbn/alerts-ui-shared'; import { Filter } from '@kbn/es-query'; import { i18n } from '@kbn/i18n'; -import { EuiSwitch, EuiSpacer } from '@elastic/eui'; -import type { AlertsFilter } from '@kbn/alerting-types'; import deepEqual from 'fast-deep-equal'; +import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { useRuleFormState } from '../hooks'; -import { RuleAction } from '../../common'; +import type { RuleAction } from '../types'; import { RuleFormPlugins } from '../types'; -import { AlertsSearchBar, AlertsSearchBarProps } from '../../alerts_search_bar'; const DEFAULT_QUERY = { kql: '', filters: [] }; @@ -25,7 +24,6 @@ export interface RuleActionsAlertsFilterProps { action: RuleAction; onChange: (update?: AlertsFilter['query']) => void; appName: string; - featureIds: ValidFeatureId[]; ruleTypeId?: string; plugins?: { http: RuleFormPlugins['http']; @@ -39,7 +37,6 @@ export const RuleActionsAlertsFilter = ({ action, onChange, appName, - featureIds, ruleTypeId, plugins: propsPlugins, }: RuleActionsAlertsFilterProps) => { @@ -101,11 +98,13 @@ export const RuleActionsAlertsFilter = ({ [updateQuery] ); + const ruleTypeIds = useMemo(() => (ruleTypeId != null ? [ruleTypeId] : []), [ruleTypeId]); + return ( <> { async function setup(timeframe?: AlertsFilterTimeframe) { diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_alerts_filter_timeframe.tsx b/packages/response-ops/rule_form/src/rule_actions/rule_actions_alerts_filter_timeframe.tsx similarity index 94% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_alerts_filter_timeframe.tsx rename to packages/response-ops/rule_form/src/rule_actions/rule_actions_alerts_filter_timeframe.tsx index 2c37b7de470e4..79c0287adabc1 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_alerts_filter_timeframe.tsx +++ b/packages/response-ops/rule_form/src/rule_actions/rule_actions_alerts_filter_timeframe.tsx @@ -23,8 +23,8 @@ import { } from '@elastic/eui'; import deepEqual from 'fast-deep-equal'; import { ISO_WEEKDAYS, type IsoWeekday, type AlertsFilterTimeframe } from '@kbn/alerting-types'; -import { I18N_WEEKDAY_OPTIONS_DDD } from '../../common/constants'; -import { RuleAction } from '../../common'; +import { I18N_WEEKDAY_OPTIONS_DDD } from '@kbn/alerts-ui-shared/src/common/constants'; +import type { RuleAction } from '../types'; export interface RuleActionsAlertsFilterTimeframeProps { action: RuleAction; @@ -159,7 +159,7 @@ export const RuleActionsAlertsFilterTimeframe: React.FC ({ useRuleFormState: jest.fn(), @@ -195,6 +195,92 @@ describe('ruleActionsConnectorsModal', () => { expect(screen.queryByText('connector2')).not.toBeInTheDocument(); }); + test('should not render connector filter if hideInUi is true', async () => { + const actionTypeRegistry = new TypeRegistry(); + actionTypeRegistry.register( + getActionTypeModel('1', { + id: 'actionType-1', + subtype: [ + { id: 'actionType-1', name: 'connector-1' }, + { id: 'actionType-2', name: 'connector-2' }, + ], + }) + ); + actionTypeRegistry.register( + getActionTypeModel('2', { + id: 'actionType-2', + hideInUi: true, + subtype: [ + { id: 'actionType-1', name: 'connector-1' }, + { id: 'actionType-2', name: 'connector-2' }, + ], + }) + ); + useRuleFormState.mockReturnValue({ + plugins: { + actionTypeRegistry, + }, + formData: { + actions: [], + }, + connectors: mockConnectors, + connectorTypes: mockActionTypes, + }); + + render( + + ); + const filterButtonGroup = screen.getByTestId('ruleActionsConnectorsModalFilterButtonGroup'); + expect(within(filterButtonGroup).getByText('actionType: 1')).toBeInTheDocument(); + expect(within(filterButtonGroup).queryByText('actionType: 2')).not.toBeInTheDocument(); + expect(within(filterButtonGroup).getByText('All')).toBeInTheDocument(); + + expect(screen.getAllByTestId('ruleActionsConnectorsModalFilterButton').length).toEqual(2); + }); + + test('should display connectors if hideInUi is true and it has subtype', async () => { + const actionTypeRegistry = new TypeRegistry(); + actionTypeRegistry.register( + getActionTypeModel('1', { + id: 'actionType-1', + subtype: [ + { id: 'actionType-1', name: 'connector-1' }, + { id: 'actionType-2', name: 'connector-2' }, + ], + }) + ); + actionTypeRegistry.register( + getActionTypeModel('2', { + id: 'actionType-2', + hideInUi: true, + subtype: [ + { id: 'actionType-1', name: 'connector-1' }, + { id: 'actionType-2', name: 'connector-2' }, + ], + }) + ); + useRuleFormState.mockReturnValue({ + plugins: { + actionTypeRegistry, + }, + formData: { + actions: [], + }, + connectors: mockConnectors, + connectorTypes: mockActionTypes, + }); + + render( + + ); + const filterButtonGroup = screen.getByTestId('ruleActionsConnectorsModalFilterButtonGroup'); + + await userEvent.click(within(filterButtonGroup).getByText('actionType: 1')); + expect(screen.getAllByTestId('ruleActionsConnectorsModalCard').length).toEqual(2); + expect(screen.getByText('connector-1')).toBeInTheDocument(); + expect(screen.getByText('connector-2')).toBeInTheDocument(); + }); + test('should not render connector if actionsParamsField doesnt exist', () => { const actionTypeRegistry = new TypeRegistry(); actionTypeRegistry.register(getActionTypeModel('1', { id: 'actionType-1' })); diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_connectors_modal.tsx b/packages/response-ops/rule_form/src/rule_actions/rule_actions_connectors_modal.tsx similarity index 90% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_connectors_modal.tsx rename to packages/response-ops/rule_form/src/rule_actions/rule_actions_connectors_modal.tsx index 82496d9578ff0..d411e468a8a83 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_connectors_modal.tsx +++ b/packages/response-ops/rule_form/src/rule_actions/rule_actions_connectors_modal.tsx @@ -7,30 +7,30 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import React, { useState, useCallback, useMemo, Suspense } from 'react'; import { + EuiButton, + EuiCard, + EuiEmptyPrompt, + EuiFacetButton, + EuiFacetGroup, + EuiFieldSearch, EuiFlexGroup, EuiFlexItem, + EuiHorizontalRule, + EuiIcon, + EuiLoadingSpinner, EuiModal, - EuiModalHeader, - EuiFieldSearch, - EuiFacetButton, EuiModalBody, - EuiHorizontalRule, + EuiModalHeader, EuiModalHeaderTitle, - useEuiTheme, - EuiEmptyPrompt, - EuiFacetGroup, - EuiCard, - EuiIcon, - EuiText, EuiSpacer, - useCurrentEuiBreakpoint, - EuiButton, - EuiLoadingSpinner, + EuiText, EuiToolTip, + useCurrentEuiBreakpoint, + useEuiTheme, } from '@elastic/eui'; -import { ActionConnector } from '../../common'; +import { ActionConnector, checkActionFormActionTypeEnabled } from '@kbn/alerts-ui-shared'; +import React, { Suspense, useCallback, useMemo, useState } from 'react'; import { useRuleFormState } from '../hooks'; import { ACTION_TYPE_MODAL_EMPTY_TEXT, @@ -40,7 +40,6 @@ import { MODAL_SEARCH_CLEAR_FILTERS_TEXT, MODAL_SEARCH_PLACEHOLDER, } from '../translations'; -import { checkActionFormActionTypeEnabled } from '../utils/check_action_type_enabled'; type ConnectorsMap = Record; @@ -78,9 +77,7 @@ export const RuleActionsConnectorsModal = (props: RuleActionsConnectorsModalProp if (!actionType) { return false; } - if (actionTypeModel.hideInUi) { - return false; - } + if (!actionTypeModel.actionParamsFields) { return false; } @@ -93,6 +90,7 @@ export const RuleActionsConnectorsModal = (props: RuleActionsConnectorsModalProp if (!actionType.enabledInConfig && !checkEnabledResult.isEnabled) { return false; } + return true; }); }, [connectors, connectorTypes, preconfiguredConnectors, actionTypeRegistry]); @@ -120,29 +118,43 @@ export const RuleActionsConnectorsModal = (props: RuleActionsConnectorsModalProp const connectorsMap: ConnectorsMap | null = useMemo(() => { return availableConnectors.reduce((result, { actionTypeId }) => { - if (result[actionTypeId]) { - result[actionTypeId].total += 1; + const actionTypeModel = actionTypeRegistry.get(actionTypeId); + const subtype = actionTypeModel.subtype; + + const shownActionTypeId = actionTypeModel.hideInUi + ? subtype?.filter((type) => type.id !== actionTypeId)[0].id + : undefined; + + const currentActionTypeId = shownActionTypeId ? shownActionTypeId : actionTypeId; + + if (result[currentActionTypeId]) { + result[currentActionTypeId].total += 1; } else { - result[actionTypeId] = { - actionTypeId, + result[currentActionTypeId] = { + actionTypeId: currentActionTypeId, total: 1, - name: connectorTypes.find(({ id }) => actionTypeId === id)?.name || '', + name: connectorTypes.find(({ id }) => id === currentActionTypeId)?.name || '', }; } + return result; }, {}); - }, [availableConnectors, connectorTypes]); + }, [availableConnectors, connectorTypes, actionTypeRegistry]); const filteredConnectors = useMemo(() => { return availableConnectors .filter(({ actionTypeId }) => { + const subtype = actionTypeRegistry.get(actionTypeId).subtype?.map((type) => type.id); + if (selectedConnectorType === 'all' || selectedConnectorType === '') { return true; } - if (selectedConnectorType === actionTypeId) { - return true; + + if (subtype?.includes(selectedConnectorType)) { + return subtype.includes(actionTypeId); } - return false; + + return selectedConnectorType === actionTypeId; }) .filter(({ actionTypeId, name }) => { const trimmedSearchValue = searchValue.trim().toLocaleLowerCase(); diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_item.test.tsx b/packages/response-ops/rule_form/src/rule_actions/rule_actions_item.test.tsx similarity index 96% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_item.test.tsx rename to packages/response-ops/rule_form/src/rule_actions/rule_actions_item.test.tsx index fb162cd606406..a26f5c08ba515 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_item.test.tsx +++ b/packages/response-ops/rule_form/src/rule_actions/rule_actions_item.test.tsx @@ -10,14 +10,14 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; import { RuleType } from '@kbn/alerting-types'; -import { ActionTypeModel, RuleTypeModel } from '../../common'; -import { TypeRegistry } from '../../common/type_registry'; +import type { ActionTypeModel, RuleTypeModel } from '@kbn/alerts-ui-shared'; +import { TypeRegistry } from '@kbn/alerts-ui-shared/lib'; import { getAction, getActionType, getActionTypeModel, getConnector, -} from '../../common/test_utils/actions_test_utils'; +} from '../common/test_utils/actions_test_utils'; import { RuleActionsItem } from './rule_actions_item'; import userEvent from '@testing-library/user-event'; @@ -93,7 +93,7 @@ jest.mock('../validation/validate_params_for_warnings', () => ({ validateParamsForWarnings: jest.fn(), })); -jest.mock('../../action_variables/get_available_action_variables', () => ({ +jest.mock('@kbn/alerts-ui-shared/src/action_variables/get_available_action_variables', () => ({ getAvailableActionVariables: jest.fn(), })); @@ -149,7 +149,7 @@ const { validateParamsForWarnings } = jest.requireMock( ); const { getAvailableActionVariables } = jest.requireMock( - '../../action_variables/get_available_action_variables' + '@kbn/alerts-ui-shared/src/action_variables/get_available_action_variables' ); const mockConnectors = [getConnector('1', { id: 'action-1' })]; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_item.tsx b/packages/response-ops/rule_form/src/rule_actions/rule_actions_item.tsx similarity index 96% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_item.tsx rename to packages/response-ops/rule_form/src/rule_actions/rule_actions_item.tsx index 9bf6cac970b19..d3a77b21c1379 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_item.tsx +++ b/packages/response-ops/rule_form/src/rule_actions/rule_actions_item.tsx @@ -36,12 +36,16 @@ import { RuleActionParam, RuleActionParams, } from '@kbn/alerting-types'; +import { + ActionConnector, + checkActionFormActionTypeEnabled, + getAvailableActionVariables, +} from '@kbn/alerts-ui-shared'; import { isEmpty, some } from 'lodash'; import { css } from '@emotion/react'; import { SavedObjectAttribute } from '@kbn/core/types'; import { useRuleFormDispatch, useRuleFormState } from '../hooks'; -import { ActionConnector, RuleFormParamsErrors } from '../../common/types'; -import { getAvailableActionVariables } from '../../action_variables'; +import { RuleFormParamsErrors } from '../common/types'; import { validateAction, validateParamsForWarnings } from '../validation'; import { RuleActionsSettings } from './rule_actions_settings'; @@ -55,14 +59,16 @@ import { TECH_PREVIEW_DESCRIPTION, TECH_PREVIEW_LABEL, } from '../translations'; -import { checkActionFormActionTypeEnabled } from '../utils/check_action_type_enabled'; -const SUMMARY_GROUP_TITLE = i18n.translate('alertsUIShared.ruleActionsItem.summaryGroupTitle', { - defaultMessage: 'Summary of alerts', -}); +const SUMMARY_GROUP_TITLE = i18n.translate( + 'responseOpsRuleForm.ruleActionsItem.summaryGroupTitle', + { + defaultMessage: 'Summary of alerts', + } +); const RUN_WHEN_GROUP_TITLE = (groupName: string) => - i18n.translate('alertsUIShared.ruleActionsItem.runWhenGroupTitle', { + i18n.translate('responseOpsRuleForm.ruleActionsItem.runWhenGroupTitle', { defaultMessage: 'Run when {groupName}', values: { groupName, @@ -70,7 +76,7 @@ const RUN_WHEN_GROUP_TITLE = (groupName: string) => }); const ACTION_TITLE = (connector: ActionConnector) => - i18n.translate('alertsUIShared.ruleActionsItem.existingAlertActionTypeEditTitle', { + i18n.translate('responseOpsRuleForm.ruleActionsItem.existingAlertActionTypeEditTitle', { defaultMessage: '{actionConnectorName}', values: { actionConnectorName: `${connector.name} ${ @@ -510,7 +516,6 @@ export const RuleActionsItem = (props: RuleActionsItemProps) => { {tab === SETTINGS_TAB && ( setUseDefaultMessage(true)} onNotifyWhenChange={onNotifyWhenChange} onActionGroupChange={onActionGroupChange} @@ -675,7 +680,7 @@ export const RuleActionsItem = (props: RuleActionsItemProps) => { marginRight: euiTheme.size.l, }} aria-label={i18n.translate( - 'alertsUIShared.ruleActionsSystemActionsItem.deleteActionAriaLabel', + 'responseOpsRuleForm.ruleActionsSystemActionsItem.deleteActionAriaLabel', { defaultMessage: 'delete action', } diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_message.test.tsx b/packages/response-ops/rule_form/src/rule_actions/rule_actions_message.test.tsx similarity index 98% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_message.test.tsx rename to packages/response-ops/rule_form/src/rule_actions/rule_actions_message.test.tsx index d2c064cba2aad..f3ceafd98a72e 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_message.test.tsx +++ b/packages/response-ops/rule_form/src/rule_actions/rule_actions_message.test.tsx @@ -11,15 +11,15 @@ import React, { lazy } from 'react'; import { render, screen, waitFor } from '@testing-library/react'; import { RuleActionsMessage } from './rule_actions_message'; import { RuleType } from '@kbn/alerting-types'; -import { ActionParamsProps, ActionTypeModel, RuleTypeModel } from '../../common'; -import { TypeRegistry } from '../../common/type_registry'; +import type { ActionParamsProps, ActionTypeModel, RuleTypeModel } from '@kbn/alerts-ui-shared'; +import { TypeRegistry } from '@kbn/alerts-ui-shared/lib'; import { getAction, getActionType, getActionTypeModel, getConnector, getSystemAction, -} from '../../common/test_utils/actions_test_utils'; +} from '../common/test_utils/actions_test_utils'; import userEvent from '@testing-library/user-event'; jest.mock('../hooks', () => ({ diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_message.tsx b/packages/response-ops/rule_form/src/rule_actions/rule_actions_message.tsx similarity index 97% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_message.tsx rename to packages/response-ops/rule_form/src/rule_actions/rule_actions_message.tsx index e828f0bb22cf8..039e3d79258b7 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_message.tsx +++ b/packages/response-ops/rule_form/src/rule_actions/rule_actions_message.tsx @@ -17,8 +17,9 @@ import { EuiSwitch, } from '@elastic/eui'; import { ActionVariable, RuleActionParam } from '@kbn/alerting-types'; +import { ActionConnector, ActionConnectorMode } from '@kbn/alerts-ui-shared'; import { useRuleFormState } from '../hooks'; -import { ActionConnector, ActionConnectorMode, RuleAction, RuleUiAction } from '../../common'; +import { RuleAction, RuleUiAction } from '../common'; import { getSelectedActionGroup } from '../utils'; import { ACTION_USE_AAD_TEMPLATE_FIELDS_LABEL } from '../translations'; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_notify_when.test.tsx b/packages/response-ops/rule_form/src/rule_actions/rule_actions_notify_when.test.tsx similarity index 100% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_notify_when.test.tsx rename to packages/response-ops/rule_form/src/rule_actions/rule_actions_notify_when.test.tsx diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_notify_when.tsx b/packages/response-ops/rule_form/src/rule_actions/rule_actions_notify_when.tsx similarity index 88% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_notify_when.tsx rename to packages/response-ops/rule_form/src/rule_actions/rule_actions_notify_when.tsx index d3695ba28a8db..cdd1a51e646c2 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_notify_when.tsx +++ b/packages/response-ops/rule_form/src/rule_actions/rule_actions_notify_when.tsx @@ -38,12 +38,15 @@ import { pipe } from 'fp-ts/lib/pipeable'; import { DEFAULT_FREQUENCY } from '../constants'; import { getTimeOptions } from '../utils'; -const FOR_EACH_ALERT = i18n.translate('alertsUIShared.actiActionsonNotifyWhen.forEachOption', { +const FOR_EACH_ALERT = i18n.translate('responseOpsRuleForm.actiActionsonNotifyWhen.forEachOption', { defaultMessage: 'For each alert', }); -const SUMMARY_OF_ALERTS = i18n.translate('alertsUIShared.actiActionsonNotifyWhen.summaryOption', { - defaultMessage: 'Summary of alerts', -}); +const SUMMARY_OF_ALERTS = i18n.translate( + 'responseOpsRuleForm.actiActionsonNotifyWhen.summaryOption', + { + defaultMessage: 'Summary of alerts', + } +); export interface NotifyWhenSelectOptions { isSummaryOption?: boolean; @@ -58,7 +61,7 @@ export const NOTIFY_WHEN_OPTIONS: NotifyWhenSelectOptions[] = [ value: { value: 'onActionGroupChange', inputDisplay: i18n.translate( - 'alertsUIShared.ruleActionsNotifyWhen.onActionGroupChange.display', + 'responseOpsRuleForm.ruleActionsNotifyWhen.onActionGroupChange.display', { defaultMessage: 'On status changes', } @@ -69,14 +72,14 @@ export const NOTIFY_WHEN_OPTIONS: NotifyWhenSelectOptions[] = [

    @@ -89,23 +92,26 @@ export const NOTIFY_WHEN_OPTIONS: NotifyWhenSelectOptions[] = [ isForEachAlertOption: true, value: { value: 'onActiveAlert', - inputDisplay: i18n.translate('alertsUIShared.ruleActionsNotifyWhen.onActiveAlert.display', { - defaultMessage: 'On check intervals', - }), + inputDisplay: i18n.translate( + 'responseOpsRuleForm.ruleActionsNotifyWhen.onActiveAlert.display', + { + defaultMessage: 'On check intervals', + } + ), 'data-test-subj': 'onActiveAlert', dropdownDisplay: ( <>

    @@ -119,7 +125,7 @@ export const NOTIFY_WHEN_OPTIONS: NotifyWhenSelectOptions[] = [ value: { value: 'onThrottleInterval', inputDisplay: i18n.translate( - 'alertsUIShared.ruleActionsNotifyWhen.onThrottleInterval.display', + 'responseOpsRuleForm.ruleActionsNotifyWhen.onThrottleInterval.display', { defaultMessage: 'On custom action intervals', } @@ -130,14 +136,14 @@ export const NOTIFY_WHEN_OPTIONS: NotifyWhenSelectOptions[] = [

    @@ -290,7 +296,7 @@ export const RuleActionsNotifyWhen = ({ anchorPosition="downLeft" aria-label={frequency.summary ? SUMMARY_OF_ALERTS : FOR_EACH_ALERT} aria-roledescription={i18n.translate( - 'alertsUIShared.ruleActionsNotifyWhen.summaryOrRulePerSelectRoleDescription', + 'responseOpsRuleForm.ruleActionsNotifyWhen.summaryOrRulePerSelectRoleDescription', { defaultMessage: 'Action frequency type select' } )} button={ @@ -311,7 +317,7 @@ export const RuleActionsNotifyWhen = ({ return ( @@ -338,7 +344,7 @@ export const RuleActionsNotifyWhen = ({ name="throttle" data-test-subj="throttleInput" prepend={i18n.translate( - 'alertsUIShared.ruleActionsNotifyWhen.frequencyNotifyWhen.label', + 'responseOpsRuleForm.ruleActionsNotifyWhen.frequencyNotifyWhen.label', { defaultMessage: 'Run every', } @@ -380,7 +386,7 @@ export const RuleActionsNotifyWhen = ({ {i18n.translate( - 'alertsUIShared.ruleActionsNotifyWhen.notifyWhenThrottleWarning', + 'responseOpsRuleForm.ruleActionsNotifyWhen.notifyWhenThrottleWarning', { defaultMessage: "Custom action intervals cannot be shorter than the rule's check interval", diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_settings.test.tsx b/packages/response-ops/rule_form/src/rule_actions/rule_actions_settings.test.tsx similarity index 91% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_settings.test.tsx rename to packages/response-ops/rule_form/src/rule_actions/rule_actions_settings.test.tsx index a9b9a5b9cc454..ce2976ff08cf5 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_settings.test.tsx +++ b/packages/response-ops/rule_form/src/rule_actions/rule_actions_settings.test.tsx @@ -10,8 +10,8 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; import { RuleActionsSettings } from './rule_actions_settings'; -import { getAction } from '../../common/test_utils/actions_test_utils'; -import { RuleTypeModel } from '../../common'; +import { getAction } from '../common/test_utils/actions_test_utils'; +import { RuleTypeModel } from '../common'; import { RuleType } from '@kbn/alerting-types'; import userEvent from '@testing-library/user-event'; import type { RuleActionsNotifyWhenProps } from './rule_actions_notify_when'; @@ -168,7 +168,6 @@ describe('ruleActionsSettings', () => { render( { render( { notifyWhen: 'onActionGroupChange', }, })} - producerId="stackAlerts" onUseDefaultMessageChange={mockOnUseDefaultMessageChange} onNotifyWhenChange={mockOnNotifyWhenChange} onActionGroupChange={mockOnActionGroupChange} @@ -261,7 +258,6 @@ describe('ruleActionsSettings', () => { notifyWhen: 'onActionGroupChange', }, })} - producerId="stackAlerts" onUseDefaultMessageChange={mockOnUseDefaultMessageChange} onNotifyWhenChange={mockOnNotifyWhenChange} onActionGroupChange={mockOnActionGroupChange} @@ -278,7 +274,6 @@ describe('ruleActionsSettings', () => { render( { render( { render( { render( { render( { expect(screen.queryByText('filter query error')).toBeInTheDocument(); }); + + test('should show the rule actions filter for siem rule types', () => { + useRuleFormState.mockReturnValue({ + plugins: { + settings: {}, + }, + formData: { + consumer: 'siem', + schedule: { interval: '5h' }, + }, + selectedRuleType: { + /** + * With the current configuration + * hasFieldsForAad will return false + * and we are testing the isSiemRuleType(ruleTypeId) + * branch of the code + */ + ...ruleType, + id: 'siem.esqlRuleType', + hasFieldsForAAD: false, + }, + selectedRuleTypeModel: ruleModel, + }); + + render( + + ); + + expect(screen.queryByText('RuleActionsAlertsFilter')).toBeInTheDocument(); + }); }); diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_settings.tsx b/packages/response-ops/rule_form/src/rule_actions/rule_actions_settings.tsx similarity index 94% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_settings.tsx rename to packages/response-ops/rule_form/src/rule_actions/rule_actions_settings.tsx index 4d748b8530cb5..5f12271cc20cb 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_settings.tsx +++ b/packages/response-ops/rule_form/src/rule_actions/rule_actions_settings.tsx @@ -16,9 +16,9 @@ import { RecoveredActionGroup, RuleActionFrequency, } from '@kbn/alerting-types'; -import { AlertConsumers, ValidFeatureId } from '@kbn/rule-data-utils'; +import { isSiemRuleType } from '@kbn/rule-data-utils'; import { useRuleFormState } from '../hooks'; -import { RuleAction, RuleTypeWithDescription } from '../../common'; +import { RuleAction, RuleTypeWithDescription } from '../common'; import { getActionGroups, getDurationNumberInItsUnit, @@ -63,13 +63,13 @@ const getMinimumThrottleWarnings = ({ }; const ACTION_GROUP_NOT_SUPPORTED = (actionGroupName: string) => - i18n.translate('alertsUIShared.ruleActionsSetting.actionGroupNotSupported', { + i18n.translate('responseOpsRuleForm.ruleActionsSetting.actionGroupNotSupported', { defaultMessage: '{actionGroupName} (Not Currently Supported)', values: { actionGroupName }, }); const ACTION_GROUP_RUN_WHEN = i18n.translate( - 'alertsUIShared.ruleActionsSetting.actionGroupRunWhen', + 'responseOpsRuleForm.ruleActionsSetting.actionGroupRunWhen', { defaultMessage: 'Run when', } @@ -120,7 +120,6 @@ const actionGroupDisplay = ({ export interface RuleActionsSettingsProps { action: RuleAction; - producerId: string; onUseDefaultMessageChange: () => void; onNotifyWhenChange: (frequency: RuleActionFrequency) => void; onActionGroupChange: (group: string) => void; @@ -131,7 +130,6 @@ export interface RuleActionsSettingsProps { export const RuleActionsSettings = (props: RuleActionsSettingsProps) => { const { action, - producerId, onUseDefaultMessageChange, onNotifyWhenChange, onActionGroupChange, @@ -190,12 +188,14 @@ export const RuleActionsSettings = (props: RuleActionsSettingsProps) => { minimumActionThrottleUnit, }); + const ruleTypeId = selectedRuleType.id; + const showActionAlertsFilter = hasFieldsForAad({ ruleType: selectedRuleType, consumer, validConsumers, - }) || producerId === AlertConsumers.SIEM; + }) || isSiemRuleType(ruleTypeId); return ( @@ -258,9 +258,8 @@ export const RuleActionsSettings = (props: RuleActionsSettingsProps) => { diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_system_actions_item.test.tsx b/packages/response-ops/rule_form/src/rule_actions/rule_actions_system_actions_item.test.tsx similarity index 98% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_system_actions_item.test.tsx rename to packages/response-ops/rule_form/src/rule_actions/rule_actions_system_actions_item.test.tsx index c94062e320a8d..f6e76538eba97 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_system_actions_item.test.tsx +++ b/packages/response-ops/rule_form/src/rule_actions/rule_actions_system_actions_item.test.tsx @@ -11,14 +11,14 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; import { RuleType } from '@kbn/alerting-types'; import userEvent from '@testing-library/user-event'; -import { TypeRegistry } from '../../common/type_registry'; +import type { ActionTypeModel } from '@kbn/alerts-ui-shared'; +import { TypeRegistry } from '@kbn/alerts-ui-shared/lib'; import { getAction, getActionType, getActionTypeModel, getConnector, -} from '../../common/test_utils/actions_test_utils'; -import { ActionTypeModel } from '../../common'; +} from '../common/test_utils/actions_test_utils'; import { RuleActionsMessageProps } from './rule_actions_message'; import { RuleActionsSystemActionsItem } from './rule_actions_system_actions_item'; import { I18nProvider } from '@kbn/i18n-react'; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_system_actions_item.tsx b/packages/response-ops/rule_form/src/rule_actions/rule_actions_system_actions_item.tsx similarity index 97% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_system_actions_item.tsx rename to packages/response-ops/rule_form/src/rule_actions/rule_actions_system_actions_item.tsx index 7432aa4c4343d..4ed0305ec6e8d 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_actions/rule_actions_system_actions_item.tsx +++ b/packages/response-ops/rule_form/src/rule_actions/rule_actions_system_actions_item.tsx @@ -7,9 +7,6 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ -import React, { Suspense, useCallback, useMemo, useState } from 'react'; -import { i18n } from '@kbn/i18n'; -import { isEmpty, some } from 'lodash'; import { EuiAccordion, EuiBadge, @@ -24,25 +21,29 @@ import { useEuiBackgroundColor, useEuiTheme, } from '@elastic/eui'; +import { css } from '@emotion/react'; import { RuleActionParam, RuleSystemAction } from '@kbn/alerting-types'; +import { + getAvailableActionVariables, + IsDisabledResult, + IsEnabledResult, + checkActionFormActionTypeEnabled, + ActionConnector, +} from '@kbn/alerts-ui-shared'; import { SavedObjectAttribute } from '@kbn/core/types'; -import { css } from '@emotion/react'; +import { i18n } from '@kbn/i18n'; +import { isEmpty, some } from 'lodash'; +import React, { Suspense, useCallback, useMemo, useState } from 'react'; import { useRuleFormDispatch, useRuleFormState } from '../hooks'; -import { ActionConnector, RuleFormParamsErrors } from '../../common'; +import { RuleFormParamsErrors } from '../common'; import { ACTION_ERROR_TOOLTIP, ACTION_WARNING_TITLE, TECH_PREVIEW_DESCRIPTION, TECH_PREVIEW_LABEL, } from '../translations'; -import { RuleActionsMessage } from './rule_actions_message'; import { validateParamsForWarnings } from '../validation'; -import { getAvailableActionVariables } from '../../action_variables'; -import { - IsDisabledResult, - IsEnabledResult, - checkActionFormActionTypeEnabled, -} from '../utils/check_action_type_enabled'; +import { RuleActionsMessage } from './rule_actions_message'; interface RuleActionsSystemActionsItemProps { action: RuleSystemAction; @@ -252,7 +253,7 @@ export const RuleActionsSystemActionsItem = (props: RuleActionsSystemActionsItem marginRight: euiTheme.size.l, }} aria-label={i18n.translate( - 'alertsUIShared.ruleActionsSystemActionsItem.deleteActionAriaLabel', + 'responseOpsRuleForm.ruleActionsSystemActionsItem.deleteActionAriaLabel', { defaultMessage: 'delete action', } diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/index.ts b/packages/response-ops/rule_form/src/rule_definition/index.ts similarity index 100% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/index.ts rename to packages/response-ops/rule_form/src/rule_definition/index.ts diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_alert_delay.test.tsx b/packages/response-ops/rule_form/src/rule_definition/rule_alert_delay.test.tsx similarity index 100% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_alert_delay.test.tsx rename to packages/response-ops/rule_form/src/rule_definition/rule_alert_delay.test.tsx diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_alert_delay.tsx b/packages/response-ops/rule_form/src/rule_definition/rule_alert_delay.tsx similarity index 100% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_alert_delay.tsx rename to packages/response-ops/rule_form/src/rule_definition/rule_alert_delay.tsx diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_consumer_selection.test.tsx b/packages/response-ops/rule_form/src/rule_definition/rule_consumer_selection.test.tsx similarity index 100% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_consumer_selection.test.tsx rename to packages/response-ops/rule_form/src/rule_definition/rule_consumer_selection.test.tsx diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_consumer_selection.tsx b/packages/response-ops/rule_form/src/rule_definition/rule_consumer_selection.tsx similarity index 100% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_consumer_selection.tsx rename to packages/response-ops/rule_form/src/rule_definition/rule_consumer_selection.tsx diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_definition.test.tsx b/packages/response-ops/rule_form/src/rule_definition/rule_definition.test.tsx similarity index 92% rename from packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_definition.test.tsx rename to packages/response-ops/rule_form/src/rule_definition/rule_definition.test.tsx index f45d1d0ae00fc..9ee39ca93f1be 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_definition.test.tsx +++ b/packages/response-ops/rule_form/src/rule_definition/rule_definition.test.tsx @@ -18,8 +18,8 @@ import type { DocLinksStart } from '@kbn/core-doc-links-browser'; import { RuleDefinition } from './rule_definition'; import { RuleType } from '@kbn/alerting-types'; -import { RuleTypeModel } from '../../common/types'; -import { RuleSettingsFlappingFormProps } from '../../rule_settings/rule_settings_flapping_form'; +import { RuleTypeModel } from '../common/types'; +import { RuleSettingsFlappingFormProps } from '@kbn/alerts-ui-shared/src/rule_settings/rule_settings_flapping_form'; import { ALERT_FLAPPING_DETECTION_TITLE } from '../translations'; import userEvent from '@testing-library/user-event'; import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; @@ -29,11 +29,11 @@ jest.mock('../hooks', () => ({ useRuleFormDispatch: jest.fn(), })); -jest.mock('../../common/constants/rule_flapping', () => ({ +jest.mock('../constants/rule_flapping', () => ({ IS_RULE_SPECIFIC_FLAPPING_ENABLED: true, })); -jest.mock('../../rule_settings/rule_settings_flapping_form', () => ({ +jest.mock('@kbn/alerts-ui-shared/src/rule_settings/rule_settings_flapping_form', () => ({ RuleSettingsFlappingForm: (props: RuleSettingsFlappingFormProps) => (
    `; - diff --git a/src/plugins/chart_expressions/expression_legacy_metric/public/components/metric_value.tsx b/src/plugins/chart_expressions/expression_legacy_metric/public/components/metric_value.tsx index e338d1779a10b..8199a2ec1f842 100644 --- a/src/plugins/chart_expressions/expression_legacy_metric/public/components/metric_value.tsx +++ b/src/plugins/chart_expressions/expression_legacy_metric/public/components/metric_value.tsx @@ -74,7 +74,7 @@ export const MetricVisValue = (props: MetricVisValueProps) => { if (onFilter) { return ( - - - - - - first - - - - - - - - - - - middle - - - - - - - - - - - - - - last - - - - - - - - - -`; - -exports[`TableHeader without time column renders correctly 1`] = ` - - - - - first - - - - - - - - - - - middle - - - - - - - - - - - - - - last - - - - - - - - - -`; diff --git a/src/plugins/discover/public/components/doc_table/components/table_header/helpers.tsx b/src/plugins/discover/public/components/doc_table/components/table_header/helpers.tsx deleted file mode 100644 index 6640164d76d50..0000000000000 --- a/src/plugins/discover/public/components/doc_table/components/table_header/helpers.tsx +++ /dev/null @@ -1,86 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { i18n } from '@kbn/i18n'; -import type { DataView } from '@kbn/data-views-plugin/public'; - -export interface ColumnProps { - name: string; - displayName: string; - isSortable: boolean; - isRemoveable: boolean; - colLeftIdx: number; - colRightIdx: number; -} - -/** - * Returns properties necessary to display the time column - * If it's an DataView with timefield, the time column is - * prepended, not moveable and removeable - * @param timeFieldName - */ -export function getTimeColumn(timeFieldName: string): ColumnProps { - return { - name: timeFieldName, - displayName: timeFieldName, - isSortable: true, - isRemoveable: false, - colLeftIdx: -1, - colRightIdx: -1, - }; -} -/** - * A given array of column names returns an array of properties - * necessary to display the columns. If the given dataView - * has a timefield, a time column is prepended - * @param columns - * @param dataView - * @param hideTimeField - * @param isShortDots - */ -export function getDisplayedColumns( - columns: string[], - dataView: DataView, - hideTimeField: boolean, - isShortDots: boolean -) { - if (!Array.isArray(columns) || typeof dataView !== 'object' || !dataView.getFieldByName) { - return []; - } - - const columnProps = - columns.length === 0 - ? [ - { - name: '__document__', - displayName: i18n.translate('discover.docTable.tableHeader.documentHeader', { - defaultMessage: 'Document', - }), - isSortable: false, - isRemoveable: false, - colLeftIdx: -1, - colRightIdx: -1, - }, - ] - : columns.map((column, idx) => { - const field = dataView.getFieldByName(column); - return { - name: column, - displayName: field?.displayName ?? column, - isSortable: !!(field && field.sortable), - isRemoveable: column !== '_source' || columns.length > 1, - colLeftIdx: idx - 1 < 0 ? -1 : idx - 1, - colRightIdx: idx + 1 >= columns.length ? -1 : idx + 1, - }; - }); - - return !hideTimeField && dataView.timeFieldName - ? [getTimeColumn(dataView.timeFieldName), ...columnProps] - : columnProps; -} diff --git a/src/plugins/discover/public/components/doc_table/components/table_header/score_sort_warning.tsx b/src/plugins/discover/public/components/doc_table/components/table_header/score_sort_warning.tsx deleted file mode 100644 index 188a92ea98579..0000000000000 --- a/src/plugins/discover/public/components/doc_table/components/table_header/score_sort_warning.tsx +++ /dev/null @@ -1,20 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React from 'react'; -import { EuiIconTip } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; - -export function DocViewTableScoreSortWarning() { - const tooltipContent = i18n.translate('discover.docViews.table.scoreSortWarningTooltip', { - defaultMessage: 'In order to retrieve values for _score, you must sort by it.', - }); - - return ; -} diff --git a/src/plugins/discover/public/components/doc_table/components/table_header/table_header.test.tsx b/src/plugins/discover/public/components/doc_table/components/table_header/table_header.test.tsx deleted file mode 100644 index 7aa3988444388..0000000000000 --- a/src/plugins/discover/public/components/doc_table/components/table_header/table_header.test.tsx +++ /dev/null @@ -1,223 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React from 'react'; -import { mountWithIntl } from '@kbn/test-jest-helpers'; -import type { DataView, DataViewField } from '@kbn/data-views-plugin/public'; -import type { SortOrder } from '@kbn/saved-search-plugin/public'; -import { TableHeader } from './table_header'; -import { findTestSubject } from '@elastic/eui/lib/test'; -import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; -import { DOC_HIDE_TIME_COLUMN_SETTING } from '@kbn/discover-utils'; -import { FORMATS_UI_SETTINGS } from '@kbn/field-formats-plugin/common'; - -const defaultUiSettings = { - get: (key: string) => { - if (key === DOC_HIDE_TIME_COLUMN_SETTING) { - return false; - } else if (key === FORMATS_UI_SETTINGS.SHORT_DOTS_ENABLE) { - return false; - } - }, -}; - -function getMockDataView() { - return { - id: 'test', - title: 'Test', - timeFieldName: 'time', - fields: [], - isTimeNanosBased: () => false, - getFieldByName: (name: string) => { - if (name === 'test1') { - return { - name, - displayName: name, - type: 'string', - aggregatable: false, - searchable: true, - sortable: true, - } as DataViewField; - } else { - return { - name, - displayName: name, - type: 'string', - aggregatable: false, - searchable: true, - sortable: false, - } as DataViewField; - } - }, - } as unknown as DataView; -} - -function getMockProps(props = {}) { - const defaultProps = { - dataView: getMockDataView(), - hideTimeColumn: false, - columns: ['first', 'middle', 'last'], - defaultSortOrder: 'desc', - sortOrder: [['time', 'asc']] as SortOrder[], - isShortDots: true, - onRemoveColumn: jest.fn(), - onChangeSortOrder: jest.fn(), - onMoveColumn: jest.fn(), - onPageNext: jest.fn(), - onPagePrevious: jest.fn(), - }; - - return Object.assign({}, defaultProps, props); -} - -describe('TableHeader with time column', () => { - const props = getMockProps(); - - const wrapper = mountWithIntl( - - - - - -
    -
    - ); - - test('renders correctly', () => { - const docTableHeader = findTestSubject(wrapper, 'docTableHeader'); - expect(docTableHeader.getDOMNode()).toMatchSnapshot(); - }); - - test('time column is sortable with button, cycling sort direction', () => { - findTestSubject(wrapper, 'docTableHeaderFieldSort_time').simulate('click'); - expect(props.onChangeSortOrder).toHaveBeenCalledWith([['time', 'desc']]); - }); - - test('time column is not removeable, no button displayed', () => { - const removeButton = findTestSubject(wrapper, 'docTableRemoveHeader-time'); - expect(removeButton.length).toBe(0); - }); - - test('time column is not moveable, no button displayed', () => { - const moveButtonLeft = findTestSubject(wrapper, 'docTableMoveLeftHeader-time'); - expect(moveButtonLeft.length).toBe(0); - const moveButtonRight = findTestSubject(wrapper, 'docTableMoveRightHeader-time'); - expect(moveButtonRight.length).toBe(0); - }); - - test('first column is removeable', () => { - const removeButton = findTestSubject(wrapper, 'docTableRemoveHeader-first'); - expect(removeButton.length).toBe(1); - removeButton.simulate('click'); - expect(props.onRemoveColumn).toHaveBeenCalledWith('first'); - }); - - test('first column is not moveable to the left', () => { - const moveButtonLeft = findTestSubject(wrapper, 'docTableMoveLeftHeader-first'); - expect(moveButtonLeft.length).toBe(0); - }); - - test('first column is moveable to the right', () => { - const moveButtonRight = findTestSubject(wrapper, 'docTableMoveRightHeader-first'); - expect(moveButtonRight.length).toBe(1); - moveButtonRight.simulate('click'); - expect(props.onMoveColumn).toHaveBeenCalledWith('first', 1); - }); - - test('middle column is moveable to the left', () => { - const moveButtonLeft = findTestSubject(wrapper, 'docTableMoveLeftHeader-middle'); - expect(moveButtonLeft.length).toBe(1); - moveButtonLeft.simulate('click'); - expect(props.onMoveColumn).toHaveBeenCalledWith('middle', 0); - }); - - test('middle column is moveable to the right', () => { - const moveButtonRight = findTestSubject(wrapper, 'docTableMoveRightHeader-middle'); - expect(moveButtonRight.length).toBe(1); - moveButtonRight.simulate('click'); - expect(props.onMoveColumn).toHaveBeenCalledWith('middle', 2); - }); - - test('last column moveable to the left', () => { - const moveButtonLeft = findTestSubject(wrapper, 'docTableMoveLeftHeader-last'); - expect(moveButtonLeft.length).toBe(1); - moveButtonLeft.simulate('click'); - expect(props.onMoveColumn).toHaveBeenCalledWith('last', 1); - }); -}); - -describe('TableHeader without time column', () => { - const props = getMockProps({ hideTimeColumn: true }); - - const wrapper = mountWithIntl( - { - if (key === DOC_HIDE_TIME_COLUMN_SETTING) { - return true; - } - }, - }, - }} - > - - - - -
    -
    - ); - - test('renders correctly', () => { - const docTableHeader = findTestSubject(wrapper, 'docTableHeader'); - expect(docTableHeader.getDOMNode()).toMatchSnapshot(); - }); - - test('first column is removeable', () => { - const removeButton = findTestSubject(wrapper, 'docTableRemoveHeader-first'); - expect(removeButton.length).toBe(1); - removeButton.simulate('click'); - expect(props.onRemoveColumn).toHaveBeenCalledWith('first'); - }); - - test('first column is not moveable to the left', () => { - const moveButtonLeft = findTestSubject(wrapper, 'docTableMoveLeftHeader-first'); - expect(moveButtonLeft.length).toBe(0); - }); - - test('first column is moveable to the right', () => { - const moveButtonRight = findTestSubject(wrapper, 'docTableMoveRightHeader-first'); - expect(moveButtonRight.length).toBe(1); - moveButtonRight.simulate('click'); - expect(props.onMoveColumn).toHaveBeenCalledWith('first', 1); - }); - - test('middle column is moveable to the left', () => { - const moveButtonLeft = findTestSubject(wrapper, 'docTableMoveLeftHeader-middle'); - expect(moveButtonLeft.length).toBe(1); - moveButtonLeft.simulate('click'); - expect(props.onMoveColumn).toHaveBeenCalledWith('middle', 0); - }); - - test('middle column is moveable to the right', () => { - const moveButtonRight = findTestSubject(wrapper, 'docTableMoveRightHeader-middle'); - expect(moveButtonRight.length).toBe(1); - moveButtonRight.simulate('click'); - expect(props.onMoveColumn).toHaveBeenCalledWith('middle', 2); - }); - - test('last column moveable to the left', () => { - const moveButtonLeft = findTestSubject(wrapper, 'docTableMoveLeftHeader-last'); - expect(moveButtonLeft.length).toBe(1); - moveButtonLeft.simulate('click'); - expect(props.onMoveColumn).toHaveBeenCalledWith('last', 1); - }); -}); diff --git a/src/plugins/discover/public/components/doc_table/components/table_header/table_header.tsx b/src/plugins/discover/public/components/doc_table/components/table_header/table_header.tsx deleted file mode 100644 index 04583c893841f..0000000000000 --- a/src/plugins/discover/public/components/doc_table/components/table_header/table_header.tsx +++ /dev/null @@ -1,71 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React, { useMemo } from 'react'; -import type { DataView } from '@kbn/data-views-plugin/public'; -import { FORMATS_UI_SETTINGS } from '@kbn/field-formats-plugin/common'; -import type { SortOrder } from '@kbn/saved-search-plugin/public'; -import { DOC_HIDE_TIME_COLUMN_SETTING, SORT_DEFAULT_ORDER_SETTING } from '@kbn/discover-utils'; -import { TableHeaderColumn } from './table_header_column'; -import { getDisplayedColumns } from './helpers'; -import { getDefaultSort } from '../../../../utils/sorting'; -import { useDiscoverServices } from '../../../../hooks/use_discover_services'; - -interface Props { - columns: string[]; - dataView: DataView; - onChangeSortOrder?: (sortOrder: SortOrder[]) => void; - onMoveColumn?: (name: string, index: number) => void; - onRemoveColumn?: (name: string) => void; - sortOrder: SortOrder[]; -} - -export function TableHeader({ - columns, - dataView, - onChangeSortOrder, - onMoveColumn, - onRemoveColumn, - sortOrder, -}: Props) { - const { uiSettings } = useDiscoverServices(); - const [defaultSortOrder, hideTimeColumn, isShortDots] = useMemo( - () => [ - uiSettings.get(SORT_DEFAULT_ORDER_SETTING, 'desc'), - uiSettings.get(DOC_HIDE_TIME_COLUMN_SETTING, false), - uiSettings.get(FORMATS_UI_SETTINGS.SHORT_DOTS_ENABLE), - ], - [uiSettings] - ); - const displayedColumns = getDisplayedColumns(columns, dataView, hideTimeColumn, isShortDots); - - return ( - - - {displayedColumns.map((col, index) => { - return ( - - ); - })} - - ); -} diff --git a/src/plugins/discover/public/components/doc_table/components/table_header/table_header_column.tsx b/src/plugins/discover/public/components/doc_table/components/table_header/table_header_column.tsx deleted file mode 100644 index cbb1cb598f2c5..0000000000000 --- a/src/plugins/discover/public/components/doc_table/components/table_header/table_header_column.tsx +++ /dev/null @@ -1,234 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React from 'react'; -import { i18n } from '@kbn/i18n'; -import { EuiButtonIcon, EuiToolTip, EuiIconTip } from '@elastic/eui'; -import type { SortOrder } from '@kbn/saved-search-plugin/public'; -import { DocViewTableScoreSortWarning } from './score_sort_warning'; - -interface Props { - colLeftIdx: number; // idx of the column to the left, -1 if moving is not possible - colRightIdx: number; // idx of the column to the right, -1 if moving is not possible - displayName?: string; - isRemoveable: boolean; - isSortable: boolean; - isTimeColumn: boolean; - customLabel?: string; - name: string; - onChangeSortOrder?: (sortOrder: SortOrder[]) => void; - onMoveColumn?: (name: string, idx: number) => void; - onRemoveColumn?: (name: string) => void; - sortOrder: SortOrder[]; -} - -interface IconProps { - iconType: string; - color: 'primary' | 'text'; -} - -interface IconButtonProps { - active: boolean; - ariaLabel: string; - className: string; - iconProps: IconProps; - onClick: () => void | undefined; - testSubject: string; - tooltip: string; -} - -const sortDirectionToIcon: Record = { - desc: { iconType: 'sortDown', color: 'primary' }, - asc: { iconType: 'sortUp', color: 'primary' }, - '': { iconType: 'sortable', color: 'text' }, -}; - -const ICON_BUTTON_STYLE = { width: 12, height: 12 }; - -export function TableHeaderColumn({ - colLeftIdx, - colRightIdx, - displayName, - isRemoveable, - isSortable, - isTimeColumn, - customLabel, - name, - onChangeSortOrder, - onMoveColumn, - onRemoveColumn, - sortOrder, -}: Props) { - const [, sortDirection = ''] = sortOrder.find((sortPair) => name === sortPair[0]) || []; - const curSortWithoutCol = sortOrder.filter((pair) => pair[0] !== name); - const curColSort = sortOrder.find((pair) => pair[0] === name); - const curColSortDir = (curColSort && curColSort[1]) || ''; - - const fieldName = customLabel ?? displayName; - const timeAriaLabel = i18n.translate( - 'discover.docTable.tableHeader.timeFieldIconTooltipAriaLabel', - { - defaultMessage: '{timeFieldName} - this field represents the time that events occurred.', - values: { timeFieldName: fieldName }, - } - ); - const timeTooltip = i18n.translate('discover.docTable.tableHeader.timeFieldIconTooltip', { - defaultMessage: 'This field represents the time that events occurred.', - }); - - // If this is the _score column, and _score is not one of the columns inside the sort, show a - // warning that the _score will not be retrieved from Elasticsearch - const showScoreSortWarning = name === '_score' && !curColSort; - - const handleChangeSortOrder = () => { - if (!onChangeSortOrder) return; - - // Cycle goes Unsorted -> Asc -> Desc -> Unsorted - if (curColSort === undefined) { - onChangeSortOrder([...curSortWithoutCol, [name, 'asc']]); - } else if (curColSortDir === 'asc') { - onChangeSortOrder([...curSortWithoutCol, [name, 'desc']]); - } else if (curColSortDir === 'desc' && curSortWithoutCol.length === 0) { - // If we're at the end of the cycle and this is the only existing sort, we switch - // back to ascending sort instead of removing it. - onChangeSortOrder([[name, 'asc']]); - } else { - onChangeSortOrder(curSortWithoutCol); - } - }; - - const getSortButtonAriaLabel = () => { - const sortAscendingMessage = i18n.translate( - 'discover.docTable.tableHeader.sortByColumnAscendingAriaLabel', - { - defaultMessage: 'Sort {columnName} ascending', - values: { columnName: name }, - } - ); - const sortDescendingMessage = i18n.translate( - 'discover.docTable.tableHeader.sortByColumnDescendingAriaLabel', - { - defaultMessage: 'Sort {columnName} descending', - values: { columnName: name }, - } - ); - const stopSortingMessage = i18n.translate( - 'discover.docTable.tableHeader.sortByColumnUnsortedAriaLabel', - { - defaultMessage: 'Stop sorting on {columnName}', - values: { columnName: name }, - } - ); - - if (curColSort === undefined) { - return sortAscendingMessage; - } else if (sortDirection === 'asc') { - return sortDescendingMessage; - } else if (sortDirection === 'desc' && curSortWithoutCol.length === 0) { - return sortAscendingMessage; - } else { - return stopSortingMessage; - } - }; - - // action buttons displayed on the right side of the column name - const buttons: IconButtonProps[] = [ - // Sort Button - { - active: isSortable && typeof onChangeSortOrder === 'function', - ariaLabel: getSortButtonAriaLabel(), - className: !sortDirection ? 'kbnDocTableHeader__sortChange' : '', - iconProps: sortDirectionToIcon[sortDirection], - onClick: handleChangeSortOrder, - testSubject: `docTableHeaderFieldSort_${name}`, - tooltip: getSortButtonAriaLabel(), - }, - // Remove Button - { - active: isRemoveable && typeof onRemoveColumn === 'function', - ariaLabel: i18n.translate('discover.docTable.tableHeader.removeColumnButtonAriaLabel', { - defaultMessage: 'Remove {columnName} column', - values: { columnName: name }, - }), - className: 'kbnDocTableHeader__move', - iconProps: { iconType: 'cross', color: 'text' }, - onClick: () => onRemoveColumn && onRemoveColumn(name), - testSubject: `docTableRemoveHeader-${name}`, - tooltip: i18n.translate('discover.docTable.tableHeader.removeColumnButtonTooltip', { - defaultMessage: 'Remove Column', - }), - }, - // Move Left Button - { - active: colLeftIdx >= 0 && typeof onMoveColumn === 'function', - ariaLabel: i18n.translate('discover.docTable.tableHeader.moveColumnLeftButtonAriaLabel', { - defaultMessage: 'Move {columnName} column to the left', - values: { columnName: name }, - }), - className: 'kbnDocTableHeader__move', - iconProps: { iconType: 'sortLeft', color: 'text' }, - onClick: () => onMoveColumn && onMoveColumn(name, colLeftIdx), - testSubject: `docTableMoveLeftHeader-${name}`, - tooltip: i18n.translate('discover.docTable.tableHeader.moveColumnLeftButtonTooltip', { - defaultMessage: 'Move column to the left', - }), - }, - // Move Right Button - { - active: colRightIdx >= 0 && typeof onMoveColumn === 'function', - ariaLabel: i18n.translate('discover.docTable.tableHeader.moveColumnRightButtonAriaLabel', { - defaultMessage: 'Move {columnName} column to the right', - values: { columnName: name }, - }), - className: 'kbnDocTableHeader__move', - iconProps: { iconType: 'sortRight', color: 'text' }, - onClick: () => onMoveColumn && onMoveColumn(name, colRightIdx), - testSubject: `docTableMoveRightHeader-${name}`, - tooltip: i18n.translate('discover.docTable.tableHeader.moveColumnRightButtonTooltip', { - defaultMessage: 'Move column to the right', - }), - }, - ]; - - return ( - - - {showScoreSortWarning && } - {fieldName} - {isTimeColumn && ( - - )} - {buttons - .filter((button) => button.active) - .map((button, idx) => ( - - - - ))} - - - ); -} diff --git a/src/plugins/discover/public/components/doc_table/components/table_row.test.tsx b/src/plugins/discover/public/components/doc_table/components/table_row.test.tsx deleted file mode 100644 index 3452da4abc57e..0000000000000 --- a/src/plugins/discover/public/components/doc_table/components/table_row.test.tsx +++ /dev/null @@ -1,141 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React from 'react'; -import { mountWithIntl, findTestSubject } from '@kbn/test-jest-helpers'; -import { TableRow, TableRowProps } from './table_row'; -import { createFilterManagerMock } from '@kbn/data-plugin/public/query/filter_manager/filter_manager.mock'; -import { dataViewWithTimefieldMock } from '../../../__mocks__/data_view_with_timefield'; -import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; -import { discoverServiceMock } from '../../../__mocks__/services'; - -import { DOC_HIDE_TIME_COLUMN_SETTING, MAX_DOC_FIELDS_DISPLAYED } from '@kbn/discover-utils'; -import { buildDataTableRecord } from '@kbn/discover-utils'; -import type { EsHitRecord } from '@kbn/discover-utils/types'; - -jest.mock('../utils/row_formatter', () => { - const originalModule = jest.requireActual('../utils/row_formatter'); - return { - ...originalModule, - formatRow: () => { - return mocked_document_cell; - }, - }; -}); - -const mountComponent = (props: TableRowProps) => { - return mountWithIntl( - { - if (key === DOC_HIDE_TIME_COLUMN_SETTING) { - return true; - } else if (key === MAX_DOC_FIELDS_DISPLAYED) { - return 100; - } - }, - }, - }} - > - - - - -
    -
    - ); -}; - -const mockHit = { - _index: 'mock_index', - _id: '1', - _score: 1, - _type: '_doc', - fields: [ - { - timestamp: '2020-20-01T12:12:12.123', - }, - ], - _source: { message: 'mock_message', bytes: 20 }, -} as unknown as EsHitRecord; - -const mockFilterManager = createFilterManagerMock(); - -describe('Doc table row component', () => { - const mockInlineFilter = jest.fn(); - const defaultProps = { - columns: ['_source'], - filter: mockInlineFilter, - dataView: dataViewWithTimefieldMock, - row: buildDataTableRecord(mockHit, dataViewWithTimefieldMock), - useNewFieldsApi: true, - filterManager: mockFilterManager, - addBasePath: (path: string) => path, - } as unknown as TableRowProps; - - it('should render __document__ column', () => { - const component = mountComponent({ ...defaultProps, columns: [] }); - const docTableField = findTestSubject(component, 'docTableField'); - expect(docTableField.first().text()).toBe('mocked_document_cell'); - }); - - it('should render message, _index and bytes fields', () => { - const component = mountComponent({ ...defaultProps, columns: ['message', '_index', 'bytes'] }); - - const fields = findTestSubject(component, 'docTableField'); - expect(fields.first().text()).toBe('mock_message'); - expect(fields.last().text()).toBe('20'); - expect(fields.length).toBe(3); - }); - - it('should apply filter when pressed', () => { - const component = mountComponent({ ...defaultProps, columns: ['bytes'] }); - - const fields = findTestSubject(component, 'docTableField'); - expect(fields.first().text()).toBe('20'); - - const filterInButton = findTestSubject(component, 'docTableCellFilter'); - filterInButton.simulate('click'); - expect(mockInlineFilter).toHaveBeenCalledWith( - dataViewWithTimefieldMock.getFieldByName('bytes'), - 20, - '+' - ); - }); - - describe('details row', () => { - it('should be empty by default', () => { - const component = mountComponent(defaultProps); - expect(findTestSubject(component, 'docViewerRowDetailsTitle').exists()).toBeFalsy(); - }); - - it('should expand the detail row when the toggle arrow is clicked', () => { - const component = mountComponent(defaultProps); - const toggleButton = findTestSubject(component, 'docTableExpandToggleColumn'); - - expect(findTestSubject(component, 'docViewerRowDetailsTitle').exists()).toBeFalsy(); - toggleButton.simulate('click'); - expect(findTestSubject(component, 'docViewerRowDetailsTitle').exists()).toBeTruthy(); - }); - - it('should hide the single/surrounding views for ES|QL mode', () => { - const props = { - ...defaultProps, - isEsqlMode: true, - }; - const component = mountComponent(props); - const toggleButton = findTestSubject(component, 'docTableExpandToggleColumn'); - toggleButton.simulate('click'); - expect(findTestSubject(component, 'docViewerRowDetailsTitle').text()).toBe('Expanded result'); - expect(findTestSubject(component, 'docTableRowAction').length).toBeFalsy(); - }); - }); -}); diff --git a/src/plugins/discover/public/components/doc_table/components/table_row.tsx b/src/plugins/discover/public/components/doc_table/components/table_row.tsx deleted file mode 100644 index 40a3a81499a1d..0000000000000 --- a/src/plugins/discover/public/components/doc_table/components/table_row.tsx +++ /dev/null @@ -1,239 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React, { Fragment, useCallback, useMemo, useState } from 'react'; -import classNames from 'classnames'; -import { i18n } from '@kbn/i18n'; -import { EuiButtonEmpty, EuiIcon } from '@elastic/eui'; -import { DataView } from '@kbn/data-views-plugin/public'; -import { Filter } from '@kbn/es-query'; -import type { - DataTableRecord, - EsHitRecord, - ShouldShowFieldInTableHandler, -} from '@kbn/discover-utils/types'; -import { formatFieldValue } from '@kbn/discover-utils'; -import { DOC_HIDE_TIME_COLUMN_SETTING, MAX_DOC_FIELDS_DISPLAYED } from '@kbn/discover-utils'; -import type { DocViewFilterFn } from '@kbn/unified-doc-viewer/types'; -import { UnifiedDocViewer } from '@kbn/unified-doc-viewer-plugin/public'; -import { TableCell } from './table_row/table_cell'; -import { formatRow, formatTopLevelObject } from '../utils/row_formatter'; -import { TableRowDetails } from './table_row_details'; -import { useDiscoverServices } from '../../../hooks/use_discover_services'; - -export type DocTableRow = EsHitRecord & { - isAnchor?: boolean; -}; - -export interface TableRowProps { - columns: string[]; - filter?: DocViewFilterFn; - filters?: Filter[]; - isEsqlMode?: boolean; - savedSearchId?: string; - row: DataTableRecord; - rows: DataTableRecord[]; - dataView: DataView; - useNewFieldsApi: boolean; - shouldShowFieldHandler: ShouldShowFieldInTableHandler; - onAddColumn?: (column: string) => void; - onRemoveColumn?: (column: string) => void; -} - -export const TableRow = ({ - filters, - isEsqlMode, - columns, - filter, - savedSearchId, - row, - rows, - dataView, - useNewFieldsApi, - shouldShowFieldHandler, - onAddColumn, - onRemoveColumn, -}: TableRowProps) => { - const { uiSettings, fieldFormats } = useDiscoverServices(); - const [maxEntries, hideTimeColumn] = useMemo( - () => [ - uiSettings.get(MAX_DOC_FIELDS_DISPLAYED), - uiSettings.get(DOC_HIDE_TIME_COLUMN_SETTING, false), - ], - [uiSettings] - ); - const [open, setOpen] = useState(false); - const docTableRowClassName = classNames('kbnDocTable__row', { - 'kbnDocTable__row--highlight': row.isAnchor, - }); - const anchorDocTableRowSubj = row.isAnchor ? ' docTableAnchorRow' : ''; - - const mapping = useMemo(() => dataView.fields.getByName, [dataView]); - - // toggle display of the rows details, a full list of the fields from each row - const toggleRow = () => setOpen((prevOpen) => !prevOpen); - - /** - * Fill an element with the value of a field - */ - const displayField = (fieldName: string) => { - // If we're formatting the _source column, don't use the regular field formatter, - // but our Discover mechanism to format a hit in a better human-readable way. - if (fieldName === '_source') { - return formatRow(row, dataView, shouldShowFieldHandler, maxEntries, fieldFormats); - } - - const formattedField = formatFieldValue( - row.flattened[fieldName], - row.raw, - fieldFormats, - dataView, - mapping(fieldName) - ); - - return ( - // formatFieldValue always returns sanitized HTML - // eslint-disable-next-line react/no-danger -
    - ); - }; - const inlineFilter = useCallback( - (column: string, type: '+' | '-') => { - const field = dataView.fields.getByName(column); - filter?.(field!, row.flattened[column], type); - }, - [filter, dataView.fields, row.flattened] - ); - - const rowCells = [ - - - {open ? ( - - ) : ( - - )} - - , - ]; - - if (dataView.timeFieldName && !hideTimeColumn) { - rowCells.push( - - ); - } - - if (columns.length === 0 && useNewFieldsApi) { - const formatted = formatRow(row, dataView, shouldShowFieldHandler, maxEntries, fieldFormats); - - rowCells.push( - - ); - } else { - columns.forEach(function (column: string, index) { - const cellKey = `${column}-${index}`; - if (useNewFieldsApi && !mapping(column) && row.raw.fields && !row.raw.fields[column]) { - const innerColumns = Object.fromEntries( - Object.entries(row.raw.fields).filter(([key]) => { - return key.indexOf(`${column}.`) === 0; - }) - ); - - rowCells.push( - - ); - } else { - // Check whether the field is defined as filterable in the mapping and does - // NOT have ignored values in it to determine whether we want to allow filtering. - // We should improve this and show a helpful tooltip why the filter buttons are not - // there/disabled when there are ignored values. - const isFilterable = Boolean( - mapping(column)?.filterable && - typeof filter === 'function' && - !row.raw._ignored?.includes(column) - ); - rowCells.push( - - ); - } - }); - } - - return ( - - - {rowCells} - - - {open && ( - - - - )} - - - ); -}; diff --git a/src/plugins/discover/public/components/doc_table/components/table_row/__snapshots__/table_cell.test.tsx.snap b/src/plugins/discover/public/components/doc_table/components/table_row/__snapshots__/table_cell.test.tsx.snap deleted file mode 100644 index b4f03267ec810..0000000000000 --- a/src/plugins/discover/public/components/doc_table/components/table_row/__snapshots__/table_cell.test.tsx.snap +++ /dev/null @@ -1,369 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Doc table cell component renders a cell with filter buttons if it is filterable 1`] = ` - - formatted content - - } - inlineFilter={[Function]} - sourcefield={false} - timefield={true} -> - - - formatted content - - - - - - - - - - , - "ctr": 2, - "insertionPoint": undefined, - "isSpeedy": false, - "key": "css", - "nonce": undefined, - "prepend": undefined, - "tags": Array [ - , - , - ], - }, - } - } - isStringTag={true} - serialized={ - Object { - "map": undefined, - "name": "jcaat8-euiToolTipAnchor-inlineBlock", - "next": undefined, - "styles": "*[disabled]{pointer-events:none;};label:euiToolTipAnchor;;;display:inline-block;label:inlineBlock;;;", - "toString": [Function], - } - } - /> - - - - - - - - - - - - - , - "ctr": 2, - "insertionPoint": undefined, - "isSpeedy": false, - "key": "css", - "nonce": undefined, - "prepend": undefined, - "tags": Array [ - , - , - ], - }, - } - } - isStringTag={true} - serialized={ - Object { - "map": undefined, - "name": "jcaat8-euiToolTipAnchor-inlineBlock", - "next": undefined, - "styles": "*[disabled]{pointer-events:none;};label:euiToolTipAnchor;;;display:inline-block;label:inlineBlock;;;", - "toString": [Function], - } - } - /> - - - - - - - - - - -`; - -exports[`Doc table cell component renders a cell without filter buttons if it is not filterable 1`] = ` - - formatted content - - } - inlineFilter={[Function]} - sourcefield={false} - timefield={true} -> - - - formatted content - - - - -`; - -exports[`Doc table cell component renders a field that is neither a timefield or sourcefield 1`] = ` - - formatted content - - } - inlineFilter={[Function]} - sourcefield={false} - timefield={false} -> - - - formatted content - - - - -`; - -exports[`Doc table cell component renders a sourcefield 1`] = ` - - formatted content - - } - inlineFilter={[Function]} - sourcefield={true} - timefield={false} -> - - - formatted content - - - - -`; diff --git a/src/plugins/discover/public/components/doc_table/components/table_row/_cell.scss b/src/plugins/discover/public/components/doc_table/components/table_row/_cell.scss deleted file mode 100644 index 2e643c195208c..0000000000000 --- a/src/plugins/discover/public/components/doc_table/components/table_row/_cell.scss +++ /dev/null @@ -1,47 +0,0 @@ -.kbnDocTableCell__dataField { - white-space: pre-wrap; -} - -.kbnDocTableCell__toggleDetails { - padding: $euiSizeXS 0 0 0 !important; -} - -/** - * Fixes time column width in Firefox after toggle display of the rows details. - * Described issue - https://github.com/elastic/kibana/pull/104361#issuecomment-894271241 - */ -.kbnDocTableCell--extraWidth { - width: 1%; -} - -.kbnDocTableCell__filter { - position: absolute; - white-space: nowrap; - right: 0; -} - -.kbnDocTableCell__filterButton { - font-size: $euiFontSizeXS; - padding: $euiSizeXS; -} - -/** - * 1. Align icon with text in cell. - * 2. Use opacity to make this element accessible to screen readers and keyboard. - * 3. Show on focus to enable keyboard accessibility. - */ - -.kbnDocTableRowFilterButton { - appearance: none; - background-color: $euiColorEmptyShade; - border: none; - padding: 0 $euiSizeXS; - font-size: $euiFontSizeS; - line-height: 1; /* 1 */ - display: inline-block; - opacity: 0; /* 2 */ - - &:focus { - opacity: 1; /* 3 */ - } -} diff --git a/src/plugins/discover/public/components/doc_table/components/table_row/_details.scss b/src/plugins/discover/public/components/doc_table/components/table_row/_details.scss deleted file mode 100644 index cc6ccfe9fd29f..0000000000000 --- a/src/plugins/discover/public/components/doc_table/components/table_row/_details.scss +++ /dev/null @@ -1,24 +0,0 @@ -/** - * 1. Visually align the actions with the tabs. We can improve this by using flexbox instead, at a later point. - */ -.kbnDocTableDetails__actions { - float: right; - padding-top: $euiSizeS; /* 1 */ -} - -// Overwrite the border on the bootstrap table -.kbnDocTableDetails__row { - - > td { - // Offsets negative margins from an inner flex group - padding: $euiSizeL !important; - - tr:hover td { - background: tintOrShade($euiColorLightestShade, 50%, 20%); - } - } - - td { - border-top: none !important; - } -} diff --git a/src/plugins/discover/public/components/doc_table/components/table_row/_index.scss b/src/plugins/discover/public/components/doc_table/components/table_row/_index.scss deleted file mode 100644 index c7ccdaa39ff65..0000000000000 --- a/src/plugins/discover/public/components/doc_table/components/table_row/_index.scss +++ /dev/null @@ -1,3 +0,0 @@ -@import 'cell'; -@import 'details'; -@import 'open'; diff --git a/src/plugins/discover/public/components/doc_table/components/table_row/_open.scss b/src/plugins/discover/public/components/doc_table/components/table_row/_open.scss deleted file mode 100644 index 659481e0968b5..0000000000000 --- a/src/plugins/discover/public/components/doc_table/components/table_row/_open.scss +++ /dev/null @@ -1,14 +0,0 @@ -/** - * 1. When switching between open and closed, the toggle changes size - * slightly which is a problem because it forces the entire table to - * re-render which is SLOW. - */ - -.kbnDocTableOpen__button { - appearance: none; - background-color: transparent; - padding: 0; - border: none; - width: 14px; /* 1 */ - height: 14px; -} diff --git a/src/plugins/discover/public/components/doc_table/components/table_row/table_cell.test.tsx b/src/plugins/discover/public/components/doc_table/components/table_row/table_cell.test.tsx deleted file mode 100644 index ed8d05d87949a..0000000000000 --- a/src/plugins/discover/public/components/doc_table/components/table_row/table_cell.test.tsx +++ /dev/null @@ -1,65 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React from 'react'; -import { mount } from 'enzyme'; -import { CellProps, TableCell } from './table_cell'; - -const mountComponent = (props: Omit) => { - return mount( {}} />); -}; - -describe('Doc table cell component', () => { - test('renders a cell without filter buttons if it is not filterable', () => { - const component = mountComponent({ - filterable: false, - column: 'foo', - timefield: true, - sourcefield: false, - formatted: formatted content, - }); - expect(component).toMatchSnapshot(); - }); - - it('renders a cell with filter buttons if it is filterable', () => { - expect( - mountComponent({ - filterable: true, - column: 'foo', - timefield: true, - sourcefield: false, - formatted: formatted content, - }) - ).toMatchSnapshot(); - }); - - it('renders a sourcefield', () => { - expect( - mountComponent({ - filterable: false, - column: 'foo', - timefield: false, - sourcefield: true, - formatted: formatted content, - }) - ).toMatchSnapshot(); - }); - - it('renders a field that is neither a timefield or sourcefield', () => { - expect( - mountComponent({ - filterable: false, - column: 'foo', - timefield: false, - sourcefield: false, - formatted: formatted content, - }) - ).toMatchSnapshot(); - }); -}); diff --git a/src/plugins/discover/public/components/doc_table/components/table_row/table_cell.tsx b/src/plugins/discover/public/components/doc_table/components/table_row/table_cell.tsx deleted file mode 100644 index 83f60dd50587c..0000000000000 --- a/src/plugins/discover/public/components/doc_table/components/table_row/table_cell.tsx +++ /dev/null @@ -1,43 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React from 'react'; -import classNames from 'classnames'; -import { TableCellActions } from './table_cell_actions'; -export interface CellProps { - timefield: boolean; - sourcefield?: boolean; - formatted: JSX.Element; - filterable: boolean; - column: string; - inlineFilter: (column: string, type: '+' | '-') => void; -} - -export const TableCell = (props: CellProps) => { - const classes = classNames({ - ['eui-textNoWrap kbnDocTableCell--extraWidth']: props.timefield, - ['eui-textBreakAll eui-textBreakWord']: props.sourcefield, - ['kbnDocTableCell__dataField eui-textBreakAll eui-textBreakWord']: - !props.timefield && !props.sourcefield, - }); - - const handleFilterFor = () => props.inlineFilter(props.column, '+'); - const handleFilterOut = () => props.inlineFilter(props.column, '-'); - - return ( - - {props.formatted} - {props.filterable ? ( - - ) : ( - - )} - - ); -}; diff --git a/src/plugins/discover/public/components/doc_table/components/table_row/table_cell_actions.tsx b/src/plugins/discover/public/components/doc_table/components/table_row/table_cell_actions.tsx deleted file mode 100644 index cc096bd1cafd5..0000000000000 --- a/src/plugins/discover/public/components/doc_table/components/table_row/table_cell_actions.tsx +++ /dev/null @@ -1,61 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React from 'react'; -import { EuiIcon, EuiToolTip } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; - -interface TableCellActionsProps { - handleFilterFor: () => void; - handleFilterOut: () => void; -} - -export const TableCellActions = ({ handleFilterFor, handleFilterOut }: TableCellActionsProps) => { - return ( - - - - - - - - - - ); -}; diff --git a/src/plugins/discover/public/components/doc_table/components/table_row_details.tsx b/src/plugins/discover/public/components/doc_table/components/table_row_details.tsx deleted file mode 100644 index eefb0f638935f..0000000000000 --- a/src/plugins/discover/public/components/doc_table/components/table_row_details.tsx +++ /dev/null @@ -1,127 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React from 'react'; -import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiButtonEmpty, EuiTitle } from '@elastic/eui'; -import { FormattedMessage } from '@kbn/i18n-react'; -import type { DataView } from '@kbn/data-views-plugin/public'; -import type { Filter } from '@kbn/es-query'; -import { useNavigationProps } from '../../../hooks/use_navigation_props'; - -interface TableRowDetailsProps { - children: JSX.Element; - colLength: number; - rowIndex: string | undefined; - rowId: string | undefined; - columns: string[]; - isTimeBased: boolean; - dataView: DataView; - filters?: Filter[]; - savedSearchId?: string; - isEsqlMode?: boolean; -} - -export const TableRowDetails = ({ - colLength, - isTimeBased, - children, - dataView, - rowIndex, - rowId, - columns, - filters, - savedSearchId, - isEsqlMode, -}: TableRowDetailsProps) => { - const { singleDocHref, contextViewHref, onOpenSingleDoc, onOpenContextView } = useNavigationProps( - { - dataView, - rowIndex, - rowId, - columns, - filters, - savedSearchId, - } - ); - - return ( - - - - - - - - - -

    - {isEsqlMode && ( - - )} - {!isEsqlMode && ( - - )} -

    -
    -
    -
    -
    - {!isEsqlMode && ( - - - - {isTimeBased && ( - /* eslint-disable-next-line @elastic/eui/href-or-on-click */ - - - - )} - - - {/* eslint-disable-next-line @elastic/eui/href-or-on-click */} - - - - - - - )} -
    -
    {children}
    - - ); -}; diff --git a/src/plugins/discover/public/components/doc_table/create_doc_table_embeddable.tsx b/src/plugins/discover/public/components/doc_table/create_doc_table_embeddable.tsx deleted file mode 100644 index 9d12c2fba3377..0000000000000 --- a/src/plugins/discover/public/components/doc_table/create_doc_table_embeddable.tsx +++ /dev/null @@ -1,38 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React from 'react'; -import { DocTableEmbeddable, DocTableEmbeddableProps } from './doc_table_embeddable'; - -export function DiscoverDocTableEmbeddable(renderProps: DocTableEmbeddableProps) { - return ( - - ); -} diff --git a/src/plugins/discover/public/components/doc_table/doc_table_context.tsx b/src/plugins/discover/public/components/doc_table/doc_table_context.tsx deleted file mode 100644 index c1e685d1d8048..0000000000000 --- a/src/plugins/discover/public/components/doc_table/doc_table_context.tsx +++ /dev/null @@ -1,34 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React, { Fragment } from 'react'; -import './index.scss'; -import { SkipBottomButton } from '../../application/main/components/skip_bottom_button'; -import { DocTableProps, DocTableRenderProps, DocTableWrapper } from './doc_table_wrapper'; - -const DocTableWrapperMemoized = React.memo(DocTableWrapper); - -const renderDocTable = (tableProps: DocTableRenderProps) => { - return ( - - - - {tableProps.renderHeader()} - {tableProps.renderRows(tableProps.rows)} -
    - - ​ - -
    - ); -}; - -export const DocTableContext = (props: DocTableProps) => { - return ; -}; diff --git a/src/plugins/discover/public/components/doc_table/doc_table_embeddable.tsx b/src/plugins/discover/public/components/doc_table/doc_table_embeddable.tsx deleted file mode 100644 index 1c1274a739f1c..0000000000000 --- a/src/plugins/discover/public/components/doc_table/doc_table_embeddable.tsx +++ /dev/null @@ -1,141 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React, { memo, useCallback, useMemo, useRef } from 'react'; -import './index.scss'; -import { FormattedMessage } from '@kbn/i18n-react'; -import { EuiText } from '@elastic/eui'; -import { usePager } from '@kbn/discover-utils'; -import type { SearchResponseWarning } from '@kbn/search-response-warnings'; -import { - ToolBarPagination, - MAX_ROWS_PER_PAGE_OPTION, -} from './components/pager/tool_bar_pagination'; -import { DocTableProps, DocTableRenderProps, DocTableWrapper } from './doc_table_wrapper'; -import { SavedSearchEmbeddableBase } from '../../embeddable/components/saved_search_embeddable_base'; - -export interface DocTableEmbeddableProps extends Omit { - totalHitCount?: number; - rowsPerPageState?: number; - sampleSizeState: number; - interceptedWarnings?: SearchResponseWarning[]; - onUpdateRowsPerPage?: (rowsPerPage?: number) => void; -} - -export type DocTableEmbeddableSearchProps = Omit< - DocTableEmbeddableProps, - 'sampleSizeState' | 'isEsqlMode' ->; - -const DocTableWrapperMemoized = memo(DocTableWrapper); - -export const DocTableEmbeddable = (props: DocTableEmbeddableProps) => { - const onUpdateRowsPerPage = props.onUpdateRowsPerPage; - const tableWrapperRef = useRef(null); - const { - curPageIndex, - pageSize, - totalPages, - startIndex, - hasNextPage, - changePageIndex, - changePageSize, - } = usePager({ - initialPageSize: - typeof props.rowsPerPageState === 'number' && props.rowsPerPageState > 0 - ? Math.min(props.rowsPerPageState, MAX_ROWS_PER_PAGE_OPTION) - : 50, - totalItems: props.rows.length, - }); - const showPagination = totalPages !== 0; - - const scrollTop = useCallback(() => { - if (tableWrapperRef.current) { - tableWrapperRef.current.scrollTo(0, 0); - } - }, []); - - const pageOfItems = useMemo( - () => props.rows.slice(startIndex, pageSize + startIndex), - [pageSize, startIndex, props.rows] - ); - - const onPageChange = useCallback( - (page: number) => { - scrollTop(); - changePageIndex(page); - }, - [changePageIndex, scrollTop] - ); - - const onPageSizeChange = useCallback( - (size: number) => { - scrollTop(); - changePageSize(size); - onUpdateRowsPerPage?.(size); // to update `rowsPerPage` input param for the embeddable - }, - [changePageSize, scrollTop, onUpdateRowsPerPage] - ); - - const shouldShowLimitedResultsWarning = useMemo( - () => !hasNextPage && props.totalHitCount && props.rows.length < props.totalHitCount, - [hasNextPage, props.rows.length, props.totalHitCount] - ); - - const renderDocTable = useCallback( - (renderProps: DocTableRenderProps) => { - return ( -
    - - {renderProps.renderHeader()} - {renderProps.renderRows(pageOfItems)} -
    -
    - ); - }, - [pageOfItems] - ); - - return ( - - - - ) : undefined - } - append={ - showPagination ? ( - - ) : undefined - } - > - - - ); -}; diff --git a/src/plugins/discover/public/components/doc_table/doc_table_infinite.tsx b/src/plugins/discover/public/components/doc_table/doc_table_infinite.tsx deleted file mode 100644 index 5a667ea6f70d4..0000000000000 --- a/src/plugins/discover/public/components/doc_table/doc_table_infinite.tsx +++ /dev/null @@ -1,155 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React, { Fragment, memo, useCallback, useEffect, useRef, useState } from 'react'; -import './index.scss'; -import { FormattedMessage } from '@kbn/i18n-react'; -import { debounce } from 'lodash'; -import { EuiButtonEmpty } from '@elastic/eui'; -import { DocTableProps, DocTableRenderProps, DocTableWrapper } from './doc_table_wrapper'; -import { SkipBottomButton } from '../../application/main/components/skip_bottom_button'; -import { shouldLoadNextDocPatch } from './utils/should_load_next_doc_patch'; -import { useDiscoverServices } from '../../hooks/use_discover_services'; -import { getAllowedSampleSize } from '../../utils/get_allowed_sample_size'; -import { useAppStateSelector } from '../../application/main/state_management/discover_app_state_container'; - -const FOOTER_PADDING = { padding: 0 }; - -const DocTableWrapperMemoized = memo(DocTableWrapper); - -interface DocTableInfiniteContentProps extends DocTableRenderProps { - limit: number; - onSetMaxLimit: () => void; - onBackToTop: () => void; -} - -const DocTableInfiniteContent = ({ - rows, - columnLength, - limit, - onSkipBottomButtonClick, - renderHeader, - renderRows, - onSetMaxLimit, - onBackToTop, -}: DocTableInfiniteContentProps) => { - const { uiSettings } = useDiscoverServices(); - const sampleSize = useAppStateSelector((state) => - getAllowedSampleSize(state.sampleSize, uiSettings) - ); - - const onSkipBottomButton = useCallback(() => { - onSetMaxLimit(); - onSkipBottomButtonClick(); - }, [onSetMaxLimit, onSkipBottomButtonClick]); - - return ( - - - - {renderHeader()} - {renderRows(rows.slice(0, limit))} - - - - - -
    - {rows.length === sampleSize ? ( -
    - - - - -
    - ) : ( - - ​ - - )} -
    -
    - ); -}; - -export const DocTableInfinite = (props: DocTableProps) => { - const tableWrapperRef = useRef(null); - const [limit, setLimit] = useState(50); - - /** - * depending on which version of Discover is displayed, different elements are scrolling - * and have therefore to be considered for calculation of infinite scrolling - */ - useEffect(() => { - // After mounting table wrapper should be initialized - const scrollDiv = tableWrapperRef.current as HTMLDivElement; - const scrollMobileElem = document.documentElement; - - const scheduleCheck = debounce(() => { - const isMobileView = document.getElementsByClassName('dscSidebar__mobile').length > 0; - - const usedScrollDiv = isMobileView ? scrollMobileElem : scrollDiv; - if (shouldLoadNextDocPatch(usedScrollDiv)) { - setLimit((prevLimit) => prevLimit + 50); - } - }, 50); - - scrollDiv.addEventListener('scroll', scheduleCheck); - window.addEventListener('scroll', scheduleCheck); - - scheduleCheck(); - - return () => { - scrollDiv.removeEventListener('scroll', scheduleCheck); - window.removeEventListener('scroll', scheduleCheck); - }; - }, []); - - const onBackToTop = useCallback(() => { - const isMobileView = document.getElementsByClassName('dscSidebar__mobile').length > 0; - const focusElem = document.querySelector('.dscSkipButton') as HTMLElement; - focusElem.focus(); - - // Only the desktop one needs to target a specific container - if (!isMobileView && tableWrapperRef.current) { - tableWrapperRef.current.scrollTo(0, 0); - } else if (window) { - window.scrollTo(0, 0); - } - }, []); - - const setMaxLimit = useCallback(() => setLimit(props.rows.length), [props.rows.length]); - - const renderDocTable = useCallback( - (tableProps: DocTableRenderProps) => ( - - ), - [limit, onBackToTop, setMaxLimit] - ); - - return ; -}; diff --git a/src/plugins/discover/public/components/doc_table/doc_table_wrapper.test.tsx b/src/plugins/discover/public/components/doc_table/doc_table_wrapper.test.tsx deleted file mode 100644 index fbbe460320cdb..0000000000000 --- a/src/plugins/discover/public/components/doc_table/doc_table_wrapper.test.tsx +++ /dev/null @@ -1,81 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React from 'react'; -import { EuiIcon, EuiLoadingSpinner } from '@elastic/eui'; -import { findTestSubject, mountWithIntl } from '@kbn/test-jest-helpers'; -import { dataViewMock } from '@kbn/discover-utils/src/__mocks__'; -import { DocTableWrapper, DocTableWrapperProps } from './doc_table_wrapper'; -import { discoverServiceMock } from '../../__mocks__/services'; -import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; -import { buildDataTableRecord } from '@kbn/discover-utils'; -import type { EsHitRecord } from '@kbn/discover-utils/types'; - -describe('Doc table component', () => { - const mountComponent = (customProps?: Partial) => { - const props = { - columns: ['_source'], - dataView: dataViewMock, - rows: [ - { - _index: 'mock_index', - _id: '1', - _score: 1, - fields: [ - { - timestamp: '2020-20-01T12:12:12.123', - }, - ], - _source: { message: 'mock_message', bytes: 20 }, - } as EsHitRecord, - ].map((row) => buildDataTableRecord(row, dataViewMock)), - sort: [['order_date', 'desc']], - isLoading: false, - searchDescription: '', - onAddColumn: () => {}, - onFilter: () => {}, - onMoveColumn: () => {}, - onRemoveColumn: () => {}, - onSort: () => {}, - useNewFieldsApi: true, - dataTestSubj: 'discoverDocTable', - render: () => { - return
    mock
    ; - }, - ...(customProps || {}), - }; - - return mountWithIntl( - - - - ); - }; - - it('should render infinite table correctly', () => { - const component = mountComponent(); - expect(findTestSubject(component, 'discoverDocTable').exists()).toBeTruthy(); - expect(findTestSubject(component, 'docTable').exists()).toBeTruthy(); - expect(component.find('.kbnDocTable__error').exists()).toBeFalsy(); - }); - - it('should render error fallback if rows array is empty', () => { - const component = mountComponent({ rows: [], isLoading: false }); - expect(findTestSubject(component, 'discoverDocTable').exists()).toBeTruthy(); - expect(findTestSubject(component, 'docTable').exists()).toBeFalsy(); - expect(component.find('.kbnDocTable__error').find(EuiIcon).exists()).toBeTruthy(); - }); - - it('should render loading indicator', () => { - const component = mountComponent({ rows: [], isLoading: true }); - expect(findTestSubject(component, 'discoverDocTable').exists()).toBeTruthy(); - expect(findTestSubject(component, 'docTable').exists()).toBeFalsy(); - expect(component.find('.kbnDocTable__error').find(EuiLoadingSpinner).exists()).toBeTruthy(); - }); -}); diff --git a/src/plugins/discover/public/components/doc_table/doc_table_wrapper.tsx b/src/plugins/discover/public/components/doc_table/doc_table_wrapper.tsx deleted file mode 100644 index b9fb8b6681e20..0000000000000 --- a/src/plugins/discover/public/components/doc_table/doc_table_wrapper.tsx +++ /dev/null @@ -1,253 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React, { forwardRef, useCallback, useMemo } from 'react'; -import { EuiIcon, EuiLoadingSpinner, EuiSpacer, EuiText } from '@elastic/eui'; -import type { DataView, DataViewField } from '@kbn/data-views-plugin/public'; -import type { SortOrder } from '@kbn/saved-search-plugin/public'; -import { FormattedMessage } from '@kbn/i18n-react'; -import { Filter } from '@kbn/es-query'; -import type { DataTableRecord } from '@kbn/discover-utils/types'; -import { SHOW_MULTIFIELDS, getShouldShowFieldHandler } from '@kbn/discover-utils'; -import type { DocViewFilterFn } from '@kbn/unified-doc-viewer/types'; -import { TableHeader } from './components/table_header/table_header'; -import { TableRow } from './components/table_row'; -import { useDiscoverServices } from '../../hooks/use_discover_services'; - -export interface DocTableProps { - /** - * Rows of classic table - */ - rows: DataTableRecord[]; - /** - * Columns of classic table - */ - columns: string[]; - /** - * Current DataView - */ - dataView: DataView; - /** - * Current sorting - */ - sort: string[][]; - /** - * New fields api switch - */ - useNewFieldsApi: boolean; - /** - * Current search description - */ - searchDescription?: string; - /** - * Current shared item title - */ - sharedItemTitle?: string; - /** - * Current data test subject - */ - dataTestSubj: string; - /** - * Loading state - */ - isLoading: boolean; - /** - * Filters applied by embeddalbe - */ - filters?: Filter[]; - /** - * Flag which identifies if Discover operates - * in ES|QL mode - */ - isEsqlMode?: boolean; - /** - * Saved search id - */ - savedSearchId?: string; - /** - * Filter callback - */ - onFilter?: DocViewFilterFn; - /** - * Sorting callback - */ - onSort?: (sort: string[][]) => void; - /** - * Add columns callback - */ - onAddColumn?: (column: string) => void; - /** - * Reordering column callback - */ - onMoveColumn?: (columns: string, newIdx: number) => void; - /** - * Remove column callback - */ - onRemoveColumn?: (column: string) => void; -} - -export interface DocTableRenderProps { - columnLength: number; - rows: DataTableRecord[]; - renderRows: (row: DataTableRecord[]) => JSX.Element[]; - renderHeader: () => JSX.Element; - onSkipBottomButtonClick: () => void; -} - -export interface DocTableWrapperProps extends DocTableProps { - /** - * Renders Doc table content - */ - render: (params: DocTableRenderProps) => JSX.Element; -} - -const wait = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms)); - -export const DocTableWrapper = forwardRef( - ( - { - render, - columns, - filters, - isEsqlMode, - savedSearchId, - rows, - dataView, - onSort, - onAddColumn, - onMoveColumn, - onRemoveColumn, - sort, - onFilter, - useNewFieldsApi, - searchDescription, - sharedItemTitle, - dataTestSubj, - isLoading, - }: DocTableWrapperProps, - ref - ) => { - const { uiSettings } = useDiscoverServices(); - const showMultiFields = useMemo(() => uiSettings.get(SHOW_MULTIFIELDS, false), [uiSettings]); - - const onSkipBottomButtonClick = useCallback(async () => { - // delay scrolling to after the rows have been rendered - const bottomMarker = document.getElementById('discoverBottomMarker'); - - while (rows.length !== document.getElementsByClassName('kbnDocTable__row').length) { - await wait(50); - } - bottomMarker!.focus(); - await wait(50); - bottomMarker!.blur(); - }, [rows]); - - const shouldShowFieldHandler = useMemo( - () => - getShouldShowFieldHandler( - dataView.fields.map((field: DataViewField) => field.name), - dataView, - showMultiFields - ), - [dataView, showMultiFields] - ); - - const renderHeader = useCallback( - () => ( - - ), - [columns, dataView, onMoveColumn, onRemoveColumn, onSort, sort] - ); - - const renderRows = useCallback( - (rowsToRender: DataTableRecord[]) => { - return rowsToRender.map((current) => ( - - )); - }, - [ - columns, - filters, - savedSearchId, - onFilter, - dataView, - useNewFieldsApi, - shouldShowFieldHandler, - onAddColumn, - onRemoveColumn, - isEsqlMode, - rows, - ] - ); - - return ( -
    } - > - {rows.length !== 0 && - render({ - columnLength: columns.length, - rows, - onSkipBottomButtonClick, - renderHeader, - renderRows, - })} - {!rows.length && ( -
    - - {isLoading ? ( - <> - - - - - ) : ( - <> - - - - - )} - -
    - )} -
    - ); - } -); diff --git a/src/plugins/discover/public/components/doc_table/index.scss b/src/plugins/discover/public/components/doc_table/index.scss deleted file mode 100644 index 3663d807851c4..0000000000000 --- a/src/plugins/discover/public/components/doc_table/index.scss +++ /dev/null @@ -1,2 +0,0 @@ -@import 'doc_table'; -@import 'components/index'; diff --git a/src/plugins/discover/public/components/doc_table/utils/row_formatter.scss b/src/plugins/discover/public/components/doc_table/utils/row_formatter.scss deleted file mode 100644 index ede39feed30b6..0000000000000 --- a/src/plugins/discover/public/components/doc_table/utils/row_formatter.scss +++ /dev/null @@ -1,7 +0,0 @@ -// Special handling for images coming from the image field formatter -// See discover_grid.scss for more explanation on those values -.rowFormatter__value img { - vertical-align: middle; - max-height: lineHeightFromBaseline(2) !important; - max-width: ($euiSizeXXL * 12.5) !important; -} diff --git a/src/plugins/discover/public/components/doc_table/utils/row_formatter.test.ts b/src/plugins/discover/public/components/doc_table/utils/row_formatter.test.ts deleted file mode 100644 index d7cb720b78814..0000000000000 --- a/src/plugins/discover/public/components/doc_table/utils/row_formatter.test.ts +++ /dev/null @@ -1,313 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import ReactDOM from 'react-dom/server'; -import { formatRow, formatTopLevelObject } from './row_formatter'; -import { DataView } from '@kbn/data-views-plugin/public'; -import { fieldFormatsMock } from '@kbn/field-formats-plugin/common/mocks'; -import { DiscoverServices } from '../../../build_services'; -import { stubbedSavedObjectIndexPattern } from '@kbn/data-plugin/common/stubs'; -import { buildDataTableRecord } from '@kbn/discover-utils'; - -describe('Row formatter', () => { - let services: DiscoverServices; - - const createIndexPattern = () => { - const id = 'my-index'; - const { - type, - version, - attributes: { timeFieldName, fields, title }, - } = stubbedSavedObjectIndexPattern(id); - - return new DataView({ - spec: { id, type, version, timeFieldName, fields: JSON.parse(fields), title }, - fieldFormats: fieldFormatsMock, - shortDotsEnable: false, - metaFields: ['_id', '_type', '_score'], - }); - }; - - const dataView = createIndexPattern(); - const rawHit = { - _id: 'a', - _index: 'foo', - _score: 1, - _source: { - foo: 'bar', - number: 42, - hello: '

    World

    ', - also: 'with "quotes" or \'single quotes\'', - }, - }; - const hit = buildDataTableRecord(rawHit, dataView); - - const shouldShowField = (fieldName: string) => - dataView.fields.getAll().some((fld) => fld.name === fieldName); - - beforeEach(() => { - services = { - fieldFormats: { - getDefaultInstance: jest.fn(() => ({ convert: (value: unknown) => value })), - getFormatterForField: jest.fn(() => ({ convert: (value: unknown) => value })), - }, - } as unknown as DiscoverServices; - }); - - it('formats document properly', () => { - expect(formatRow(hit, dataView, shouldShowField, 100, services.fieldFormats)) - .toMatchInlineSnapshot(` - World", - "hello", - ], - Array [ - "number", - 42, - "number", - ], - Array [ - "_id", - "a", - "_id", - ], - Array [ - "_score", - 1, - "_score", - ], - ] - } - /> - `); - }); - - it('limits number of rendered items', () => { - services = { - uiSettings: { - get: () => 1, - }, - fieldFormats: { - getDefaultInstance: jest.fn(() => ({ convert: (value: unknown) => value })), - getFormatterForField: jest.fn(() => ({ convert: (value: unknown) => value })), - }, - } as unknown as DiscoverServices; - expect(formatRow(hit, dataView, () => false, 1, services.fieldFormats)).toMatchInlineSnapshot(` - - `); - }); - - it('formats document with highlighted fields first', () => { - const highLightHit = buildDataTableRecord( - { ...rawHit, highlight: { number: ['42'] } }, - dataView - ); - - expect(formatRow(highLightHit, dataView, shouldShowField, 100, services.fieldFormats)) - .toMatchInlineSnapshot(` - World", - "hello", - ], - Array [ - "_id", - "a", - "_id", - ], - Array [ - "_score", - 1, - "_score", - ], - ] - } - /> - `); - }); - - it('formats top level objects using formatter', () => { - dataView.getFieldByName = jest.fn().mockReturnValue({ - name: 'subfield', - }); - dataView.getFormatterForField = jest.fn().mockReturnValue({ - convert: () => 'formatted', - }); - expect( - formatTopLevelObject( - { - fields: { - 'object.value': [5, 10], - }, - }, - { - 'object.value': [5, 10], - getByName: jest.fn(), - }, - dataView, - 100 - ) - ).toMatchInlineSnapshot(` - - `); - }); - - it('formats top level objects in alphabetical order', () => { - dataView.getFieldByName = jest.fn().mockReturnValue({ - name: 'subfield', - }); - dataView.getFormatterForField = jest.fn().mockReturnValue({ - convert: () => 'formatted', - }); - const formatted = ReactDOM.renderToStaticMarkup( - formatTopLevelObject( - { fields: { 'a.zzz': [100], 'a.ccc': [50] } }, - { 'a.zzz': [100], 'a.ccc': [50], getByName: jest.fn() }, - dataView, - 100 - ) - ); - expect(formatted.indexOf('
    a.ccc:
    ')).toBeLessThan(formatted.indexOf('
    a.zzz:
    ')); - }); - - it('formats top level objects with subfields and highlights', () => { - dataView.getFieldByName = jest.fn().mockReturnValue({ - name: 'subfield', - }); - dataView.getFormatterForField = jest.fn().mockReturnValue({ - convert: () => 'formatted', - }); - expect( - formatTopLevelObject( - { - fields: { - 'object.value': [5, 10], - 'object.keys': ['a', 'b'], - }, - highlight: { - 'object.keys': 'a', - }, - }, - { - 'object.value': [5, 10], - 'object.keys': ['a', 'b'], - getByName: jest.fn(), - }, - dataView, - 100 - ) - ).toMatchInlineSnapshot(` - - `); - }); - - it('formats top level objects, converting unknown fields to string', () => { - dataView.getFieldByName = jest.fn(); - dataView.getFormatterForField = jest.fn(); - expect( - formatTopLevelObject( - { - fields: { - 'object.value': [5, 10], - }, - }, - { - 'object.value': [5, 10], - getByName: jest.fn(), - }, - dataView, - 100 - ) - ).toMatchInlineSnapshot(` - - `); - }); -}); diff --git a/src/plugins/discover/public/components/doc_table/utils/row_formatter.tsx b/src/plugins/discover/public/components/doc_table/utils/row_formatter.tsx deleted file mode 100644 index ec33f5c16be09..0000000000000 --- a/src/plugins/discover/public/components/doc_table/utils/row_formatter.tsx +++ /dev/null @@ -1,87 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React, { Fragment } from 'react'; -import type { DataView } from '@kbn/data-views-plugin/public'; -import { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; -import type { - DataTableRecord, - ShouldShowFieldInTableHandler, - FormattedHit, -} from '@kbn/discover-utils/types'; -import { formatHit } from '@kbn/discover-utils'; - -import './row_formatter.scss'; - -interface Props { - defPairs: FormattedHit; -} -const TemplateComponent = ({ defPairs }: Props) => { - return ( -
    - {defPairs.map((pair, idx) => ( - -
    - {pair[0]} - {!!pair[1] && ':'} -
    -
    {' '} - - ))} -
    - ); -}; - -export const formatRow = ( - hit: DataTableRecord, - dataView: DataView, - shouldShowFieldHandler: ShouldShowFieldInTableHandler, - maxEntries: number, - fieldFormats: FieldFormatsStart -) => { - const pairs = formatHit(hit, dataView, shouldShowFieldHandler, maxEntries, fieldFormats); - return ; -}; - -export const formatTopLevelObject = ( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - row: Record, - // eslint-disable-next-line @typescript-eslint/no-explicit-any - fields: Record, - dataView: DataView, - maxEntries: number -) => { - const highlights = row.highlight ?? {}; - const highlightPairs: FormattedHit = []; - const sourcePairs: FormattedHit = []; - const sorted = Object.entries(fields).sort(([keyA], [keyB]) => keyA.localeCompare(keyB)); - sorted.forEach(([key, values]) => { - const field = dataView.getFieldByName(key); - const displayKey = fields.getByName ? fields.getByName(key)?.displayName : undefined; - const formatter = field - ? dataView.getFormatterForField(field) - : { convert: (v: unknown, ..._: unknown[]) => String(v) }; - if (!values.map) return; - const formatted = values - .map((val: unknown) => - formatter.convert(val, 'html', { - field, - hit: row, - }) - ) - .join(', '); - const pairs = highlights[key] ? highlightPairs : sourcePairs; - pairs.push([displayKey ? displayKey : key, formatted, key]); - }); - return ; -}; diff --git a/src/plugins/discover/public/components/doc_table/utils/should_load_next_doc_patch.test.ts b/src/plugins/discover/public/components/doc_table/utils/should_load_next_doc_patch.test.ts deleted file mode 100644 index 25d5ef59c5f4e..0000000000000 --- a/src/plugins/discover/public/components/doc_table/utils/should_load_next_doc_patch.test.ts +++ /dev/null @@ -1,42 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { shouldLoadNextDocPatch } from './should_load_next_doc_patch'; - -describe('shouldLoadNextDocPatch', () => { - test('next patch should not be loaded', () => { - const scrollingDomEl = { - scrollHeight: 500, - scrollTop: 100, - clientHeight: 100, - } as HTMLElement; - - expect(shouldLoadNextDocPatch(scrollingDomEl)).toBeFalsy(); - }); - - test('next patch should be loaded', () => { - const scrollingDomEl = { - scrollHeight: 500, - scrollTop: 350, - clientHeight: 100, - } as HTMLElement; - - expect(shouldLoadNextDocPatch(scrollingDomEl)).toBeTruthy(); - }); - - test("next patch should be loaded even there's a decimal scroll height", () => { - const scrollingDomEl = { - scrollHeight: 500, - scrollTop: 350.34234234, - clientHeight: 100, - } as HTMLElement; - - expect(shouldLoadNextDocPatch(scrollingDomEl)).toBeTruthy(); - }); -}); diff --git a/src/plugins/discover/public/components/doc_table/utils/should_load_next_doc_patch.ts b/src/plugins/discover/public/components/doc_table/utils/should_load_next_doc_patch.ts deleted file mode 100644 index cfb4f93a2adb5..0000000000000 --- a/src/plugins/discover/public/components/doc_table/utils/should_load_next_doc_patch.ts +++ /dev/null @@ -1,27 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -// use a buffer to start rendering more documents before the user completely scrolles down -const verticalScrollBuffer = 100; - -/** - * Helper function to determine if the next patch of 50 documents should be loaded - */ -export function shouldLoadNextDocPatch(domEl: HTMLElement) { - // the height of the scrolling div, including content not visible on the screen due to overflow. - const scrollHeight = domEl.scrollHeight; - // the number of pixels that the div is is scrolled vertically - const scrollTop = domEl.scrollTop; - // the inner height of the scrolling div, excluding content that's visible on the screen - const clientHeight = domEl.clientHeight; - - const consumedHeight = scrollTop + clientHeight; - const remainingHeight = scrollHeight - consumedHeight; - return remainingHeight < verticalScrollBuffer; -} diff --git a/src/plugins/discover/public/components/view_mode_toggle/view_mode_toggle.tsx b/src/plugins/discover/public/components/view_mode_toggle/view_mode_toggle.tsx index 43960f98ea2b8..5b77a184d9253 100644 --- a/src/plugins/discover/public/components/view_mode_toggle/view_mode_toggle.tsx +++ b/src/plugins/discover/public/components/view_mode_toggle/view_mode_toggle.tsx @@ -11,7 +11,7 @@ import React, { useMemo, useEffect, useState, type ReactElement, useCallback } f import { EuiFlexGroup, EuiFlexItem, EuiTab, EuiTabs, useEuiTheme } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { css } from '@emotion/react'; -import { isLegacyTableEnabled, SHOW_FIELD_STATISTICS } from '@kbn/discover-utils'; +import { SHOW_FIELD_STATISTICS } from '@kbn/discover-utils'; import type { DataView } from '@kbn/data-views-plugin/common'; import useMountedState from 'react-use/lib/useMountedState'; import { VIEW_MODE } from '../../../common/constants'; @@ -42,10 +42,6 @@ export const DocumentViewModeToggle = ({ dataVisualizer: dataVisualizerService, aiops: aiopsService, } = useDiscoverServices(); - const isLegacy = useMemo( - () => isLegacyTableEnabled({ uiSettings, isEsqlMode }), - [uiSettings, isEsqlMode] - ); const [showPatternAnalysisTab, setShowPatternAnalysisTab] = useState(null); const showFieldStatisticsTab = useMemo( @@ -93,7 +89,7 @@ export const DocumentViewModeToggle = ({ } }, [showPatternAnalysisTab, viewMode, setDiscoverViewMode]); - const includesNormalTabsStyle = viewMode === VIEW_MODE.AGGREGATED_LEVEL || isLegacy; + const includesNormalTabsStyle = viewMode === VIEW_MODE.AGGREGATED_LEVEL; const containerPadding = includesNormalTabsStyle ? euiTheme.size.s : 0; const containerCss = css` diff --git a/src/plugins/discover/public/embeddable/__mocks__/get_mocked_api.ts b/src/plugins/discover/public/embeddable/__mocks__/get_mocked_api.ts index fdc9cba8a5bfa..592cf3d80faef 100644 --- a/src/plugins/discover/public/embeddable/__mocks__/get_mocked_api.ts +++ b/src/plugins/discover/public/embeddable/__mocks__/get_mocked_api.ts @@ -8,7 +8,7 @@ */ import { BehaviorSubject } from 'rxjs'; - +import type { Adapters } from '@kbn/inspector-plugin/common'; import { SearchSource } from '@kbn/data-plugin/common'; import type { DataView } from '@kbn/data-views-plugin/common'; import { DataTableRecord } from '@kbn/discover-utils'; @@ -58,6 +58,7 @@ export const getMockedSearchApi = ({ rows: new BehaviorSubject([]), totalHitCount: new BehaviorSubject(0), columnsMeta: new BehaviorSubject | undefined>(undefined), + inspectorAdapters: new BehaviorSubject({}), }, }; }; diff --git a/src/plugins/discover/public/embeddable/components/saved_search_embeddable_base.tsx b/src/plugins/discover/public/embeddable/components/saved_search_embeddable_base.tsx index deea7aa43c9fc..f723ae1ea7495 100644 --- a/src/plugins/discover/public/embeddable/components/saved_search_embeddable_base.tsx +++ b/src/plugins/discover/public/embeddable/components/saved_search_embeddable_base.tsx @@ -69,7 +69,7 @@ export const SavedSearchEmbeddableBase: FC )} - {children} + {children} {Boolean(append) && {append}} diff --git a/src/plugins/discover/public/embeddable/components/search_embeddable_grid_component.tsx b/src/plugins/discover/public/embeddable/components/search_embeddable_grid_component.tsx index 9c7a54054d265..8375e72aa34de 100644 --- a/src/plugins/discover/public/embeddable/components/search_embeddable_grid_component.tsx +++ b/src/plugins/discover/public/embeddable/components/search_embeddable_grid_component.tsx @@ -15,7 +15,6 @@ import { DOC_HIDE_TIME_COLUMN_SETTING, SEARCH_FIELDS_FROM_SOURCE, SORT_DEFAULT_ORDER_SETTING, - isLegacyTableEnabled, } from '@kbn/discover-utils'; import { FetchContext, @@ -28,7 +27,6 @@ import { DataGridDensity, DataLoadingState, useColumns } from '@kbn/unified-data import { DocViewFilterFn } from '@kbn/unified-doc-viewer/types'; import { DiscoverGridSettings } from '@kbn/saved-search-plugin/common'; import useObservable from 'react-use/lib/useObservable'; -import { DiscoverDocTableEmbeddable } from '../../components/doc_table/create_doc_table_embeddable'; import { useDiscoverServices } from '../../hooks/use_discover_services'; import { getSortForEmbeddable } from '../../utils'; import { getAllowedSampleSize, getMaxAllowedSampleSize } from '../../utils/get_allowed_sample_size'; @@ -53,7 +51,6 @@ interface SavedSearchEmbeddableComponentProps { stateManager: SearchEmbeddableStateManager; } -const DiscoverDocTableEmbeddableMemoized = React.memo(DiscoverDocTableEmbeddable); const DiscoverGridEmbeddableMemoized = React.memo(DiscoverGridEmbeddable); export function SearchEmbeddableGridComponent({ @@ -105,14 +102,6 @@ export function SearchEmbeddableGridComponent({ ); const isEsql = useMemo(() => isEsqlMode(savedSearch), [savedSearch]); - const useLegacyTable = useMemo( - () => - isLegacyTableEnabled({ - uiSettings: discoverServices.uiSettings, - isEsqlMode: isEsql, - }), - [discoverServices, isEsql] - ); const sort = useMemo(() => { return getSortForEmbeddable(savedSearch.sort, dataView, discoverServices.uiSettings, isEsql); @@ -233,19 +222,6 @@ export function SearchEmbeddableGridComponent({ useNewFieldsApi, }; - if (useLegacyTable) { - return ( - - ); - } - return ( searchEmbeddable.stateManager.inspectorAdapters.getValue(), }, { ...titleComparators, diff --git a/src/plugins/discover/public/embeddable/initialize_fetch.test.ts b/src/plugins/discover/public/embeddable/initialize_fetch.test.ts index 6fa66115da6e0..061a934dfa2b5 100644 --- a/src/plugins/discover/public/embeddable/initialize_fetch.test.ts +++ b/src/plugins/discover/public/embeddable/initialize_fetch.test.ts @@ -69,6 +69,7 @@ describe('initialize fetch', () => { ].map((hit) => buildDataTableRecord(hit, dataViewMock)) ); expect(stateManager.totalHitCount.getValue()).toEqual(2); + expect(stateManager.inspectorAdapters.getValue().requests).toBeDefined(); }); it('should catch and emit error', async () => { diff --git a/src/plugins/discover/public/embeddable/initialize_fetch.ts b/src/plugins/discover/public/embeddable/initialize_fetch.ts index b502ea94bd371..9ef2a3c167272 100644 --- a/src/plugins/discover/public/embeddable/initialize_fetch.ts +++ b/src/plugins/discover/public/embeddable/initialize_fetch.ts @@ -90,7 +90,7 @@ export function initializeFetch({ stateManager: SearchEmbeddableStateManager; discoverServices: DiscoverServices; }) { - const requestAdapter = new RequestAdapter(); + const inspectorAdapters = { requests: new RequestAdapter() }; let abortController: AbortController | undefined; const fetchSubscription = combineLatest([fetch$(api), api.savedSearch$, api.dataViews]) @@ -127,7 +127,7 @@ export function initializeFetch({ const searchSourceQuery = savedSearch.searchSource.getField('query'); // Log request to inspector - requestAdapter.reset(); + inspectorAdapters.requests.reset(); try { api.dataLoading.next(true); @@ -156,7 +156,7 @@ export function initializeFetch({ filters: fetchContext.filters, dataView, abortSignal: currentAbortController.signal, - inspectorAdapters: discoverServices.inspector, + inspectorAdapters, data: discoverServices.data, expressions: discoverServices.expressions, profilesManager: discoverServices.profilesManager, @@ -181,9 +181,9 @@ export function initializeFetch({ abortSignal: currentAbortController.signal, sessionId: searchSessionId, inspector: { - adapter: requestAdapter, - title: i18n.translate('discover.embeddable.inspectorRequestDataTitle', { - defaultMessage: 'Data', + adapter: inspectorAdapters.requests, + title: i18n.translate('discover.embeddable.inspectorTableRequestTitle', { + defaultMessage: 'Table', }), description: i18n.translate('discover.embeddable.inspectorRequestDescription', { defaultMessage: @@ -195,7 +195,7 @@ export function initializeFetch({ }) ); const interceptedWarnings: SearchResponseWarning[] = []; - discoverServices.data.search.showWarnings(requestAdapter, (warning) => { + discoverServices.data.search.showWarnings(inspectorAdapters.requests, (warning) => { interceptedWarnings.push(warning); return true; // suppress the default behaviour }); @@ -225,6 +225,8 @@ export function initializeFetch({ stateManager.rows.next(next.rows ?? []); stateManager.totalHitCount.next(next.hitCount); + stateManager.inspectorAdapters.next(inspectorAdapters); + api.fetchWarnings$.next(next.warnings ?? []); api.fetchContext$.next(next.fetchContext); if (Object.hasOwn(next, 'columnsMeta')) { diff --git a/src/plugins/discover/public/embeddable/initialize_search_embeddable_api.tsx b/src/plugins/discover/public/embeddable/initialize_search_embeddable_api.tsx index 650d2e95852bb..f5ff51930096f 100644 --- a/src/plugins/discover/public/embeddable/initialize_search_embeddable_api.tsx +++ b/src/plugins/discover/public/embeddable/initialize_search_embeddable_api.tsx @@ -10,7 +10,7 @@ import { pick } from 'lodash'; import deepEqual from 'react-fast-compare'; import { BehaviorSubject, combineLatest, map, Observable, skip } from 'rxjs'; - +import type { Adapters } from '@kbn/inspector-plugin/common'; import { ISearchSource, SerializedSearchSourceFields } from '@kbn/data-plugin/common'; import { DataView } from '@kbn/data-views-plugin/common'; import { DataTableRecord } from '@kbn/discover-utils/types'; @@ -110,10 +110,13 @@ export const initializeSearchEmbeddableApi = async ( searchSource.getField('query') ); + const canEditUnifiedSearch = () => false; + /** This is the state that has to be fetched */ const rows$ = new BehaviorSubject([]); const columnsMeta$ = new BehaviorSubject(undefined); const totalHitCount$ = new BehaviorSubject(undefined); + const inspectorAdapters$ = new BehaviorSubject({}); /** * The state manager is used to modify the state of the saved search - this should never be @@ -132,6 +135,7 @@ export const initializeSearchEmbeddableApi = async ( totalHitCount: totalHitCount$, viewMode: savedSearchViewMode$, density: density$, + inspectorAdapters: inspectorAdapters$, }; /** The saved search should be the source of truth for all state */ @@ -189,6 +193,7 @@ export const initializeSearchEmbeddableApi = async ( setFilters, query$, setQuery, + canEditUnifiedSearch, }, stateManager, comparators: { diff --git a/src/plugins/discover/public/embeddable/types.ts b/src/plugins/discover/public/embeddable/types.ts index 64cf5a390da3a..94d0b10cc3f64 100644 --- a/src/plugins/discover/public/embeddable/types.ts +++ b/src/plugins/discover/public/embeddable/types.ts @@ -9,6 +9,7 @@ import { DataTableRecord } from '@kbn/discover-utils/types'; import type { DefaultEmbeddableApi } from '@kbn/embeddable-plugin/public'; +import { HasInspectorAdapters } from '@kbn/inspector-plugin/public'; import { EmbeddableApiContext, HasEditCapabilities, @@ -47,6 +48,7 @@ export type SearchEmbeddableState = Pick< rows: DataTableRecord[]; columnsMeta: DataTableColumnsMeta | undefined; totalHitCount: number | undefined; + inspectorAdapters: Record; }; export type SearchEmbeddableStateManager = { @@ -55,7 +57,7 @@ export type SearchEmbeddableStateManager = { export type SearchEmbeddableSerializedAttributes = Omit< SearchEmbeddableState, - 'rows' | 'columnsMeta' | 'totalHitCount' | 'searchSource' + 'rows' | 'columnsMeta' | 'totalHitCount' | 'searchSource' | 'inspectorAdapters' > & Pick; @@ -98,6 +100,7 @@ export type SearchEmbeddableApi = DefaultEmbeddableApi< PublishesWritableUnifiedSearch & HasInPlaceLibraryTransforms & HasTimeRange & + HasInspectorAdapters & Partial; export interface PublishesSavedSearch { diff --git a/src/plugins/discover/public/plugin.tsx b/src/plugins/discover/public/plugin.tsx index 0ee80da03a7d1..e29922d05f2c0 100644 --- a/src/plugins/discover/public/plugin.tsx +++ b/src/plugins/discover/public/plugin.tsx @@ -21,14 +21,13 @@ import { import { DEFAULT_APP_CATEGORIES } from '@kbn/core/public'; import { ENABLE_ESQL } from '@kbn/esql-utils'; import { setStateToKbnUrl } from '@kbn/kibana-utils-plugin/public'; -import { SEARCH_EMBEDDABLE_TYPE, TRUNCATE_MAX_HEIGHT } from '@kbn/discover-utils'; +import { SEARCH_EMBEDDABLE_TYPE } from '@kbn/discover-utils'; import { SavedSearchAttributes, SavedSearchType } from '@kbn/saved-search-plugin/common'; import { i18n } from '@kbn/i18n'; import { PLUGIN_ID } from '../common'; import { registerFeature } from './register_feature'; import { buildServices, UrlTracker } from './build_services'; import { ViewSavedSearchAction } from './embeddable/actions/view_saved_search_action'; -import { injectTruncateStyles } from './utils/truncate_styles'; import { initializeKbnUrlTracking } from './utils/initialize_kbn_url_tracking'; import { DiscoverContextAppLocator, @@ -285,7 +284,6 @@ export class DiscoverPlugin plugins.uiActions.addTriggerAction('CONTEXT_MENU_TRIGGER', viewSavedSearchAction); plugins.uiActions.registerTrigger(SEARCH_EMBEDDABLE_CELL_ACTIONS_TRIGGER); plugins.uiActions.registerTrigger(DISCOVER_CELL_ACTIONS_TRIGGER); - injectTruncateStyles(core.uiSettings.get(TRUNCATE_MAX_HEIGHT)); const isEsqlEnabled = core.uiSettings.get(ENABLE_ESQL); diff --git a/src/plugins/discover/public/utils/truncate_styles.ts b/src/plugins/discover/public/utils/truncate_styles.ts deleted file mode 100644 index 953144c4b90c3..0000000000000 --- a/src/plugins/discover/public/utils/truncate_styles.ts +++ /dev/null @@ -1,48 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import createCache from '@emotion/cache'; -import { cache } from '@emotion/css'; -import { serializeStyles } from '@emotion/serialize'; - -/** - * The following emotion cache management was introduced here - * https://ntsim.uk/posts/how-to-update-or-remove-global-styles-in-emotion/ - */ -const TRUNCATE_GRADIENT_HEIGHT = 15; -const globalThemeCache = createCache({ key: 'truncation' }); - -const buildStylesheet = (maxHeight: number) => { - if (!maxHeight) { - return [ - ` - .dscTruncateByHeight { - max-height: none; - }`, - ]; - } - return [ - ` - .dscTruncateByHeight { - overflow: hidden; - max-height: ${maxHeight}px !important; - } - .dscTruncateByHeight:before { - top: ${maxHeight - TRUNCATE_GRADIENT_HEIGHT}px; - } - `, - ]; -}; - -export const injectTruncateStyles = (maxHeight: number) => { - const serialized = serializeStyles(buildStylesheet(maxHeight), cache.registered); - if (!globalThemeCache.inserted[serialized.name]) { - globalThemeCache.insert('', serialized, globalThemeCache.sheet, true); - } -}; diff --git a/src/plugins/discover/server/ui_settings.ts b/src/plugins/discover/server/ui_settings.ts index 9d0905b27bfad..7dd84c9728696 100644 --- a/src/plugins/discover/server/ui_settings.ts +++ b/src/plugins/discover/server/ui_settings.ts @@ -23,13 +23,10 @@ import { CONTEXT_DEFAULT_SIZE_SETTING, CONTEXT_STEP_SETTING, CONTEXT_TIE_BREAKER_FIELDS_SETTING, - DOC_TABLE_LEGACY, MODIFY_COLUMNS_ON_SWITCH, SEARCH_FIELDS_FROM_SOURCE, MAX_DOC_FIELDS_DISPLAYED, SHOW_MULTIFIELDS, - TRUNCATE_MAX_HEIGHT, - TRUNCATE_MAX_HEIGHT_DEFAULT_VALUE, SHOW_FIELD_STATISTICS, ROW_HEIGHT_OPTION, } from '@kbn/discover-utils'; @@ -183,42 +180,6 @@ export const getUiSettings: ( category: ['discover'], schema: schema.arrayOf(schema.string()), }, - [DOC_TABLE_LEGACY]: { - name: i18n.translate('discover.advancedSettings.disableDocumentExplorer', { - defaultMessage: 'Document Explorer or classic view', - }), - value: false, - description: i18n.translate('discover.advancedSettings.disableDocumentExplorerDescription', { - defaultMessage: - 'To use the new {documentExplorerDocs} instead of the classic view, turn off this option. ' + - 'The Document Explorer offers better data sorting, resizable columns, and a full screen view.', - values: { - documentExplorerDocs: - `` + - i18n.translate('discover.advancedSettings.documentExplorerLinkText', { - defaultMessage: 'Document Explorer', - }) + - '', - }, - }), - requiresPageReload: true, - category: ['discover'], - schema: schema.boolean(), - metric: { - type: METRIC_TYPE.CLICK, - name: 'discover:useLegacyDataGrid', - }, - deprecation: { - message: i18n.translate( - 'discover.advancedSettings.discover.disableDocumentExplorerDeprecation', - { - defaultMessage: 'This setting is deprecated and will be removed in Kibana 9.0.', - } - ), - docLinksKey: 'discoverSettings', - }, - }, [MODIFY_COLUMNS_ON_SWITCH]: { name: i18n.translate('discover.advancedSettings.discover.modifyColumnsOnSwitchTitle', { defaultMessage: 'Modify columns when changing data views', @@ -316,23 +277,4 @@ export const getUiSettings: ( }), schema: schema.number({ min: -1 }), }, - [TRUNCATE_MAX_HEIGHT]: { - name: i18n.translate('discover.advancedSettings.params.maxCellHeightTitle', { - defaultMessage: 'Maximum cell height in the classic table', - }), - value: TRUNCATE_MAX_HEIGHT_DEFAULT_VALUE, - category: ['discover'], - description: i18n.translate('discover.advancedSettings.params.maxCellHeightText', { - defaultMessage: - 'The maximum height that a cell in a table should occupy. Set to 0 to disable truncation.', - }), - schema: schema.number({ min: 0 }), - requiresPageReload: true, - deprecation: { - message: i18n.translate('discover.advancedSettings.discover.maxCellHeightDeprecation', { - defaultMessage: 'This setting is deprecated and will be removed in Kibana 9.0.', - }), - docLinksKey: 'discoverSettings', - }, - }, }); diff --git a/src/plugins/es_ui_shared/static/forms/docs/examples/dynamic_fields.mdx b/src/plugins/es_ui_shared/static/forms/docs/examples/dynamic_fields.mdx index 82516423424f6..e48e5192f189e 100644 --- a/src/plugins/es_ui_shared/static/forms/docs/examples/dynamic_fields.mdx +++ b/src/plugins/es_ui_shared/static/forms/docs/examples/dynamic_fields.mdx @@ -65,7 +65,7 @@ export const DynamicFields = () => { onClick={() => removeItem(item.id)} iconType="minusInCircle" aria-label="Remove item" - style={{ marginTop: '28px' }} + css={{ marginTop: '28px' }} /> @@ -155,7 +155,7 @@ export const DynamicFieldsValidation = () => { onClick={() => removeItem(item.id)} iconType="minusInCircle" aria-label="Remove item" - style={{ marginTop: '28px' }} + css={{ marginTop: '28px' }} /> @@ -218,7 +218,7 @@ export const DynamicFieldsReorder = () => { return ( -
    +
    @@ -245,7 +245,7 @@ export const DynamicFieldsReorder = () => { onClick={() => removeItem(item.id)} iconType="minusInCircle" aria-label="Remove item" - style={{ marginTop: '28px' }} + css={{ marginTop: '28px' }} /> @@ -273,4 +273,4 @@ export const DynamicFieldsReorder = () => { ); }; -``` \ No newline at end of file +``` diff --git a/src/plugins/es_ui_shared/static/forms/docs/examples/fields_composition.mdx b/src/plugins/es_ui_shared/static/forms/docs/examples/fields_composition.mdx index 7e7cce5e81332..0851440400814 100644 --- a/src/plugins/es_ui_shared/static/forms/docs/examples/fields_composition.mdx +++ b/src/plugins/es_ui_shared/static/forms/docs/examples/fields_composition.mdx @@ -7,8 +7,8 @@ tags: ['forms', 'kibana', 'dev'] date: 2021-04-14 --- -If your form does not have a fix set of fields (single interface) and you need to add/remove fields dynamically, you can leverage the power of field composition with the form lib. It let's you swap fields in your form whenever needed. Any field that **is not in the DOM** is automatically cleared when unmounting and its value won't be returned in the form data. -If you _do_ need to keep a field value, but hide the field in the UI, then you need to use CSS (`
    ...
    `) +If your form does not have a fix set of fields (single interface) and you need to add/remove fields dynamically, you can leverage the power of field composition with the form lib. It let's you swap fields in your form whenever needed. Any field that **is not in the DOM** is automatically cleared when unmounting and its value won't be returned in the form data. +If you _do_ need to keep a field value, but hide the field in the UI, then you need to use CSS (`
    ...
    `) Imagine you're building an app that lets people buy a car online. You want to build a form that lets the user select the model of the car (`sedan`, `golf cart`, `clown mobile`), and based on their selection you'll show a different form for configuring the selected model's options. diff --git a/src/plugins/es_ui_shared/static/forms/docs/examples/serializers_deserializers.mdx b/src/plugins/es_ui_shared/static/forms/docs/examples/serializers_deserializers.mdx index dd3b402e85e3f..3ab849d262db2 100644 --- a/src/plugins/es_ui_shared/static/forms/docs/examples/serializers_deserializers.mdx +++ b/src/plugins/es_ui_shared/static/forms/docs/examples/serializers_deserializers.mdx @@ -90,7 +90,7 @@ export const SerializersAndDeserializers = () => { {/* We don't remove it from the DOM as we would lose the value entered in the field. */} -
    +
    diff --git a/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/__stories__/use_array_complex.tsx b/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/__stories__/use_array_complex.tsx index f920eb91ea3cc..b777ecd4a85b8 100644 --- a/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/__stories__/use_array_complex.tsx +++ b/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/__stories__/use_array_complex.tsx @@ -43,7 +43,7 @@ const percentageOptions = [ { value: 'percentage_config_1', inputDisplay: ( - + Percentage 1 ), @@ -51,7 +51,7 @@ const percentageOptions = [ { value: 'percentage_config_2', inputDisplay: ( - + Percentage 2 ), @@ -59,7 +59,7 @@ const percentageOptions = [ { value: 'percentage_config_3', inputDisplay: ( - + Percentage 3 ), @@ -70,7 +70,7 @@ const valueOptions = [ { value: 'value_config_1', inputDisplay: ( - + Value 1 ), @@ -78,7 +78,7 @@ const valueOptions = [ { value: 'value_config_2', inputDisplay: ( - + Value 2 ), @@ -86,7 +86,7 @@ const valueOptions = [ { value: 'value_config_3', inputDisplay: ( - + Value 3 ), @@ -188,7 +188,7 @@ const ProcessorsConfigurator: FC<{ ruleType: string }> = ({ ruleType }) => { component={TextField} componentProps={{ euiFieldProps: { - style: { + css: { maxWidth: '180px', }, }, @@ -303,7 +303,7 @@ const percentageOptions = [ { value: 'percentage_config_1', inputDisplay: ( - + Percentage 1 ), @@ -311,7 +311,7 @@ const percentageOptions = [ { value: 'percentage_config_2', inputDisplay: ( - + Percentage 2 ), @@ -319,7 +319,7 @@ const percentageOptions = [ { value: 'percentage_config_3', inputDisplay: ( - + Percentage 3 ), @@ -330,7 +330,7 @@ const valueOptions = [ { value: 'value_config_1', inputDisplay: ( - + Value 1 ), @@ -338,7 +338,7 @@ const valueOptions = [ { value: 'value_config_2', inputDisplay: ( - + Value 2 ), @@ -346,7 +346,7 @@ const valueOptions = [ { value: 'value_config_3', inputDisplay: ( - + Value 3 ), @@ -448,7 +448,7 @@ const ProcessorsConfigurator: FC<{ ruleType: string }> = ({ ruleType }) => { component={TextField} componentProps={{ euiFieldProps: { - style: { + css: { maxWidth: '180px', }, }, diff --git a/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/__stories__/use_array_dynamic_data.tsx b/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/__stories__/use_array_dynamic_data.tsx index 83beef1fc8387..098919fb96c2a 100644 --- a/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/__stories__/use_array_dynamic_data.tsx +++ b/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/__stories__/use_array_dynamic_data.tsx @@ -46,7 +46,7 @@ const percentageOptions = [ { value: 'percentage_config_1', inputDisplay: ( - + Percentage 1 ), @@ -54,7 +54,7 @@ const percentageOptions = [ { value: 'percentage_config_2', inputDisplay: ( - + Percentage 2 ), @@ -62,7 +62,7 @@ const percentageOptions = [ { value: 'percentage_config_3', inputDisplay: ( - + Percentage 3 ), @@ -73,7 +73,7 @@ const valueOptions = [ { value: 'value_config_1', inputDisplay: ( - + Value 1 ), @@ -81,7 +81,7 @@ const valueOptions = [ { value: 'value_config_2', inputDisplay: ( - + Value 2 ), @@ -89,7 +89,7 @@ const valueOptions = [ { value: 'value_config_3', inputDisplay: ( - + Value 3 ), @@ -223,7 +223,7 @@ const ProcessorsConfigurator: FC<{ ruleType: string }> = ({ ruleType }) => { component={TextField} componentProps={{ euiFieldProps: { - style: { + css: { maxWidth: '180px', }, }, @@ -384,7 +384,7 @@ const percentageOptions = [ { value: 'percentage_config_1', inputDisplay: ( - + Percentage 1 ), @@ -392,7 +392,7 @@ const percentageOptions = [ { value: 'percentage_config_2', inputDisplay: ( - + Percentage 2 ), @@ -400,7 +400,7 @@ const percentageOptions = [ { value: 'percentage_config_3', inputDisplay: ( - + Percentage 3 ), @@ -411,7 +411,7 @@ const valueOptions = [ { value: 'value_config_1', inputDisplay: ( - + Value 1 ), @@ -419,7 +419,7 @@ const valueOptions = [ { value: 'value_config_2', inputDisplay: ( - + Value 2 ), @@ -427,7 +427,7 @@ const valueOptions = [ { value: 'value_config_3', inputDisplay: ( - + Value 3 ), @@ -561,7 +561,7 @@ const ProcessorsConfigurator: FC<{ ruleType: string }> = ({ ruleType }) => { component={TextField} componentProps={{ euiFieldProps: { - style: { + css: { maxWidth: '180px', }, }, diff --git a/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/__stories__/use_array_reorder.tsx b/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/__stories__/use_array_reorder.tsx index fb56fded77e3a..807412a33a92b 100644 --- a/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/__stories__/use_array_reorder.tsx +++ b/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/__stories__/use_array_reorder.tsx @@ -87,7 +87,7 @@ export function Reorder() {
    @@ -214,7 +214,7 @@ const MyFormComponent = () => {
    diff --git a/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/__stories__/use_field_field_types.tsx b/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/__stories__/use_field_field_types.tsx index c24df488ce8a0..18b4cf2fd1d48 100644 --- a/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/__stories__/use_field_field_types.tsx +++ b/src/plugins/es_ui_shared/static/forms/hook_form_lib/components/__stories__/use_field_field_types.tsx @@ -98,7 +98,7 @@ const getPropsForType = (type: FieldType) => { { value: 'warning', inputDisplay: ( - + Warning ), @@ -107,7 +107,7 @@ const getPropsForType = (type: FieldType) => { { value: 'minor', inputDisplay: ( - + Minor ), @@ -115,7 +115,7 @@ const getPropsForType = (type: FieldType) => { { value: 'critical', inputDisplay: ( - + Critical ), diff --git a/src/plugins/esql_datagrid/public/create_datagrid.tsx b/src/plugins/esql_datagrid/public/create_datagrid.tsx index 7df7d84fb8080..4c281519edfb8 100644 --- a/src/plugins/esql_datagrid/public/create_datagrid.tsx +++ b/src/plugins/esql_datagrid/public/create_datagrid.tsx @@ -44,7 +44,7 @@ export const ESQLDataGrid = (props: ESQLDataGridProps) => { }, []); const getWrapper = (children: JSX.Element) => { - return props.fullHeight ?
    {children}
    : <>{children}; + return props.fullHeight ?
    {children}
    : <>{children}; }; const deps = value?.[0]; diff --git a/src/plugins/expression_error/public/components/error/error.tsx b/src/plugins/expression_error/public/components/error/error.tsx index fac0ee484fb06..93e10470c320e 100644 --- a/src/plugins/expression_error/public/components/error/error.tsx +++ b/src/plugins/expression_error/public/components/error/error.tsx @@ -40,14 +40,14 @@ export const Error: FC = ({ payload, onClose }) => { return (

    {message ? strings.getDescription() : ''}

    {message && ( -

    +

    {message}

    )} diff --git a/src/plugins/expression_error/public/components/error/show_debugging.tsx b/src/plugins/expression_error/public/components/error/show_debugging.tsx index ddb9cbeea7a19..49ef1acb90d3d 100644 --- a/src/plugins/expression_error/public/components/error/show_debugging.tsx +++ b/src/plugins/expression_error/public/components/error/show_debugging.tsx @@ -24,7 +24,7 @@ export const ShowDebugging: FC = ({ payload }) => { See Details {expanded && ( -
    +
    )} diff --git a/src/plugins/expression_repeat_image/public/components/repeat_image_component.tsx b/src/plugins/expression_repeat_image/public/components/repeat_image_component.tsx index bdc28e714cd8f..82b21e60c8453 100644 --- a/src/plugins/expression_repeat_image/public/components/repeat_image_component.tsx +++ b/src/plugins/expression_repeat_image/public/components/repeat_image_component.tsx @@ -94,7 +94,7 @@ export function RepeatImageComponent({ } return ( -
    +
    {imagesToRender}
    ); diff --git a/src/plugins/expressions/public/react_expression_renderer/react_expression_renderer.tsx b/src/plugins/expressions/public/react_expression_renderer/react_expression_renderer.tsx index 32c7d85fa5695..eb9bc34d40b3e 100644 --- a/src/plugins/expressions/public/react_expression_renderer/react_expression_renderer.tsx +++ b/src/plugins/expressions/public/react_expression_renderer/react_expression_renderer.tsx @@ -61,7 +61,7 @@ export function ReactExpressionRenderer({
    {isEmpty && } {isLoading && ( - + )} {!isLoading && error && renderError?.(error.message, error)}
    diff --git a/src/plugins/guided_onboarding/public/components/guide_button_popover.tsx b/src/plugins/guided_onboarding/public/components/guide_button_popover.tsx index 4fa03569756a4..fccfaef00e77f 100644 --- a/src/plugins/guided_onboarding/public/components/guide_button_popover.tsx +++ b/src/plugins/guided_onboarding/public/components/guide_button_popover.tsx @@ -51,7 +51,7 @@ export const GuideButtonPopover = ({ )} - + {description &&

    {description}

    }
    diff --git a/src/plugins/home/public/application/components/recently_accessed.js b/src/plugins/home/public/application/components/recently_accessed.js index e873b5eda5996..be9d8d0ac1923 100644 --- a/src/plugins/home/public/application/components/recently_accessed.js +++ b/src/plugins/home/public/application/components/recently_accessed.js @@ -58,7 +58,7 @@ export class RecentlyAccessed extends Component { for (let i = NUM_LONG_LINKS; i < this.props.recentlyAccessed.length; i++) { dropdownLinks.push(
  • diff --git a/src/plugins/home/public/application/components/tutorial/__snapshots__/instruction_set.test.js.snap b/src/plugins/home/public/application/components/tutorial/__snapshots__/instruction_set.test.js.snap index 5235392121ab0..b11a936807c9f 100644 --- a/src/plugins/home/public/application/components/tutorial/__snapshots__/instruction_set.test.js.snap +++ b/src/plugins/home/public/application/components/tutorial/__snapshots__/instruction_set.test.js.snap @@ -7,7 +7,7 @@ exports[`render 1`] = ` paddingSize="none" > - {this.renderTabs()} + {this.renderTabs()} {this.renderHeader()} diff --git a/src/plugins/image_embeddable/public/components/image_editor/image_editor_flyout.tsx b/src/plugins/image_embeddable/public/components/image_editor/image_editor_flyout.tsx index 1a5ee3bc64e1d..0a680e317dc72 100644 --- a/src/plugins/image_embeddable/public/components/image_editor/image_editor_flyout.tsx +++ b/src/plugins/image_embeddable/public/components/image_editor/image_editor_flyout.tsx @@ -205,7 +205,7 @@ export function ImageEditorFlyout(props: ImageEditorFlyoutProps) { } /> -

    +

    setIsFilePickerOpen(true)} data-test-subj="imageEmbeddableEditorSelectFiles" diff --git a/src/plugins/image_embeddable/public/components/image_viewer/image_viewer.tsx b/src/plugins/image_embeddable/public/components/image_viewer/image_viewer.tsx index 4eb8edc0a0695..ff4b2233a97d3 100644 --- a/src/plugins/image_embeddable/public/components/image_viewer/image_viewer.tsx +++ b/src/plugins/image_embeddable/public/components/image_viewer/image_viewer.tsx @@ -126,7 +126,7 @@ export function ImageViewer({ )} {onClear && ( { } return ( - + {controlComponent} ); diff --git a/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_table/__snapshots__/cluster_view.test.tsx.snap b/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_table/__snapshots__/cluster_view.test.tsx.snap index e063ccea48cc2..42b8d1a99c1dc 100644 --- a/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_table/__snapshots__/cluster_view.test.tsx.snap +++ b/src/plugins/inspector/public/views/requests/components/details/clusters_view/clusters_table/__snapshots__/cluster_view.test.tsx.snap @@ -2,13 +2,13 @@ exports[`render partial should display callout when request timed out 1`] = ` + {clusterDetails.timed_out ? ( - + {host} diff --git a/src/plugins/interactive_setup/public/enrollment_token_form.tsx b/src/plugins/interactive_setup/public/enrollment_token_form.tsx index 65765291fb79a..3cfc7d3fe33a2 100644 --- a/src/plugins/interactive_setup/public/enrollment_token_form.tsx +++ b/src/plugins/interactive_setup/public/enrollment_token_form.tsx @@ -184,7 +184,7 @@ const EnrollmentTokenDetails: FunctionComponent = ( defaultMessage="Connect to" /> - + {token.adr[0]} diff --git a/src/plugins/interactive_setup/public/single_chars_field.tsx b/src/plugins/interactive_setup/public/single_chars_field.tsx index 27bb6ce3e60a0..13af3f1f7ba3f 100644 --- a/src/plugins/interactive_setup/public/single_chars_field.tsx +++ b/src/plugins/interactive_setup/public/single_chars_field.tsx @@ -73,13 +73,13 @@ export const SingleCharsField: FunctionComponent = ({ ); } children.push( - + { inputRefs.current[i] = el; @@ -125,7 +125,7 @@ export const SingleCharsField: FunctionComponent = ({ }} maxLength={1} isInvalid={isInvalid} - style={{ textAlign: 'center' }} + css={{ textAlign: 'center' }} aria-label={i18n.translate('interactiveSetup.singleCharsField.digitLabel', { defaultMessage: 'Digit {index}', values: { index: i + 1 }, diff --git a/src/plugins/kibana_react/public/page_template/no_data_page/action_cards/action_cards.tsx b/src/plugins/kibana_react/public/page_template/no_data_page/action_cards/action_cards.tsx index 3631ae86e1ec3..228e6d5f8cb15 100644 --- a/src/plugins/kibana_react/public/page_template/no_data_page/action_cards/action_cards.tsx +++ b/src/plugins/kibana_react/public/page_template/no_data_page/action_cards/action_cards.tsx @@ -23,7 +23,7 @@ export const ActionCards = ({ actionCards }: ActionCardsProps) => { )); return ( - + {cards} ); diff --git a/src/plugins/kibana_react/public/page_template/no_data_page/no_data_card/__snapshots__/elastic_agent_card.test.tsx.snap b/src/plugins/kibana_react/public/page_template/no_data_page/no_data_card/__snapshots__/elastic_agent_card.test.tsx.snap index 9782a4cf1da65..fdee5059e7876 100644 --- a/src/plugins/kibana_react/public/page_template/no_data_page/no_data_card/__snapshots__/elastic_agent_card.test.tsx.snap +++ b/src/plugins/kibana_react/public/page_template/no_data_page/no_data_card/__snapshots__/elastic_agent_card.test.tsx.snap @@ -27,8 +27,7 @@ exports[`ElasticAgentCard props button 1`] = ` image={ } @@ -78,8 +78,7 @@ exports[`ElasticAgentCard props category 1`] = ` image={ } @@ -129,8 +129,7 @@ exports[`ElasticAgentCard props href 1`] = ` image={ } @@ -185,8 +185,7 @@ exports[`ElasticAgentCard props recommended 1`] = ` image={ } @@ -236,8 +236,7 @@ exports[`ElasticAgentCard renders 1`] = ` image={ } diff --git a/src/plugins/kibana_react/public/page_template/no_data_page/no_data_card/elastic_agent_card.tsx b/src/plugins/kibana_react/public/page_template/no_data_page/no_data_card/elastic_agent_card.tsx index c4849e814edd4..1c8169ac5a732 100644 --- a/src/plugins/kibana_react/public/page_template/no_data_page/no_data_card/elastic_agent_card.tsx +++ b/src/plugins/kibana_react/public/page_template/no_data_page/no_data_card/elastic_agent_card.tsx @@ -43,7 +43,7 @@ export const ElasticAgentCard: FunctionComponent = ({ const image = ( = { type: 'keyword', _meta: { description: 'Non-default value of setting.' }, }, - 'truncate:maxHeight': { - type: 'long', - _meta: { description: 'Non-default value of setting.' }, - }, 'timepicker:timeDefaults': { type: 'keyword', _meta: { description: 'Non-default value of setting.' }, @@ -424,10 +420,6 @@ export const stackManagementSchema: MakeSchemaFrom = { type: 'boolean', _meta: { description: 'Non-default value of setting.' }, }, - 'doc_table:legacy': { - type: 'boolean', - _meta: { description: 'Non-default value of setting.' }, - }, 'discover:modifyColumnsOnSwitch': { type: 'boolean', _meta: { description: 'Non-default value of setting.' }, diff --git a/src/plugins/kibana_usage_collection/server/collectors/management/types.ts b/src/plugins/kibana_usage_collection/server/collectors/management/types.ts index 9796436007357..4c6f17a85914c 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/management/types.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/management/types.ts @@ -30,7 +30,6 @@ export interface UsageStats { 'autocomplete:valueSuggestionMethod': string; 'search:timeout': number; 'visualization:visualize:legacyHeatmapChartsLibrary': boolean; - 'doc_table:legacy': boolean; 'discover:modifyColumnsOnSwitch': boolean; 'discover:searchFieldsFromSource': boolean; 'discover:showFieldStatistics': boolean; @@ -101,7 +100,6 @@ export interface UsageStats { 'fileUpload:maxFileSize': string; 'ml:anomalyDetection:results:enableTimeDefaults': boolean; 'ml:anomalyDetection:results:timeDefaults': string; - 'truncate:maxHeight': number; 'timepicker:timeDefaults': string; 'timepicker:refreshIntervalDefaults': string; 'timepicker:quickRanges': string; diff --git a/src/plugins/presentation_panel/public/panel_component/_presentation_panel.scss b/src/plugins/presentation_panel/public/panel_component/_presentation_panel.scss index 86f9e8d378e5a..a205501c0d08f 100644 --- a/src/plugins/presentation_panel/public/panel_component/_presentation_panel.scss +++ b/src/plugins/presentation_panel/public/panel_component/_presentation_panel.scss @@ -54,7 +54,7 @@ } .embPanel__title { - @include euiTitle('xxxs'); + @include euiTitle('xxs'); overflow: hidden; line-height: 1.5; flex-grow: 1; @@ -80,7 +80,7 @@ .embPanel__titleText { @include euiTextTruncate; - font-weight: $euiFontWeightBold; + font-weight: $euiFontWeightSemiBold; } .embPanel__placeholderTitleText { diff --git a/src/plugins/presentation_panel/public/panel_component/panel_header/presentation_panel_hover_actions.tsx b/src/plugins/presentation_panel/public/panel_component/panel_header/presentation_panel_hover_actions.tsx index b29563713d365..7954a7f7dfc65 100644 --- a/src/plugins/presentation_panel/public/panel_component/panel_header/presentation_panel_hover_actions.tsx +++ b/src/plugins/presentation_panel/public/panel_component/panel_header/presentation_panel_hover_actions.tsx @@ -393,7 +393,7 @@ export const PresentationPanelHoverActions = ({ notification.execute({ embeddable: api, trigger: panelNotificationTrigger }) } diff --git a/src/plugins/presentation_panel/public/panel_component/panel_header/use_presentation_panel_header_actions.tsx b/src/plugins/presentation_panel/public/panel_component/panel_header/use_presentation_panel_header_actions.tsx index b48a4eca7ae1f..795fd6b566a9b 100644 --- a/src/plugins/presentation_panel/public/panel_component/panel_header/use_presentation_panel_header_actions.tsx +++ b/src/plugins/presentation_panel/public/panel_component/panel_header/use_presentation_panel_header_actions.tsx @@ -167,7 +167,7 @@ export const usePresentationPanelHeaderActions = < notification.execute({ embeddable: api, trigger: panelNotificationTrigger }) } diff --git a/src/plugins/presentation_util/public/components/labs/environment_switch.tsx b/src/plugins/presentation_util/public/components/labs/environment_switch.tsx index 94e71fe432fc5..d8727b4e2dbae 100644 --- a/src/plugins/presentation_util/public/components/labs/environment_switch.tsx +++ b/src/plugins/presentation_util/public/components/labs/environment_switch.tsx @@ -44,13 +44,13 @@ export const EnvironmentSwitch = ({ env, isChecked, onChange, name }: Props) => const canSet = env === 'kibana' ? canSetAdvancedSettings : true; return ( - + @@ -63,7 +63,7 @@ export const EnvironmentSwitch = ({ env, isChecked, onChange, name }: Props) => compressed /> - + diff --git a/src/plugins/presentation_util/public/components/labs/labs_beaker_button.tsx b/src/plugins/presentation_util/public/components/labs/labs_beaker_button.tsx index 1d454050963d9..8da1fe97455a6 100644 --- a/src/plugins/presentation_util/public/components/labs/labs_beaker_button.tsx +++ b/src/plugins/presentation_util/public/components/labs/labs_beaker_button.tsx @@ -34,7 +34,7 @@ export const LabsBeakerButton = ({ solutions, ...props }: Props) => { {overrideCount > 0 ? ( - + {overrideCount} ) : null} diff --git a/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx b/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx index 4e29f34dedb73..575f13b66b59a 100644 --- a/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx +++ b/src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx @@ -326,7 +326,7 @@ export class FlyoutClass extends Component< ), render: (list: any[]) => { return ( -

      +
        {take(list, 3).map((obj, key) => (
      • {obj.title}
      • ))} diff --git a/src/plugins/telemetry/schema/oss_plugins.json b/src/plugins/telemetry/schema/oss_plugins.json index fe0f599dd6ca1..35e0242b57624 100644 --- a/src/plugins/telemetry/schema/oss_plugins.json +++ b/src/plugins/telemetry/schema/oss_plugins.json @@ -10492,12 +10492,6 @@ "description": "Non-default value of setting." } }, - "truncate:maxHeight": { - "type": "long", - "_meta": { - "description": "Non-default value of setting." - } - }, "timepicker:timeDefaults": { "type": "keyword", "_meta": { @@ -10765,12 +10759,6 @@ "description": "Non-default value of setting." } }, - "doc_table:legacy": { - "type": "boolean", - "_meta": { - "description": "Non-default value of setting." - } - }, "discover:modifyColumnsOnSwitch": { "type": "boolean", "_meta": { diff --git a/src/plugins/ui_actions_enhanced/public/components/action_wizard/action_wizard.tsx b/src/plugins/ui_actions_enhanced/public/components/action_wizard/action_wizard.tsx index db3a0b8845420..009016a63a906 100644 --- a/src/plugins/ui_actions_enhanced/public/components/action_wizard/action_wizard.tsx +++ b/src/plugins/ui_actions_enhanced/public/components/action_wizard/action_wizard.tsx @@ -187,7 +187,7 @@ const TriggerPicker: React.FC = ({ ), }} - style={{ maxWidth: `80%` }} + css={{ maxWidth: `80%` }} > {triggers.map((trigger) => ( diff --git a/src/plugins/ui_actions_enhanced/public/components/action_wizard/test_data.tsx b/src/plugins/ui_actions_enhanced/public/components/action_wizard/test_data.tsx index cfe7784ec99fd..7b48712ff7d64 100644 --- a/src/plugins/ui_actions_enhanced/public/components/action_wizard/test_data.tsx +++ b/src/plugins/ui_actions_enhanced/public/components/action_wizard/test_data.tsx @@ -263,7 +263,7 @@ export function Demo({ getTriggerInfo={mockGetTriggerInfo} triggers={[VALUE_CLICK_TRIGGER, APPLY_FILTER_TRIGGER, SELECT_RANGE_TRIGGER]} /> -
        +

        Action Factory Id: {state.currentActionFactory?.id}
        Action Factory Config: {JSON.stringify(state.config)}
        diff --git a/src/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/drilldown_table/drilldown_table.tsx b/src/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/drilldown_table/drilldown_table.tsx index 1859067212cb9..17c9aa98aa6e1 100644 --- a/src/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/drilldown_table/drilldown_table.tsx +++ b/src/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/drilldown_table/drilldown_table.tsx @@ -81,7 +81,7 @@ export const DrilldownTable: React.FC = ({ title={drilldown.error} aria-label={drilldown.error} data-test-subj={`drilldownError-${drilldown.id}`} - style={{ marginLeft: '4px' }} /* a bit of spacing from text */ + css={{ marginLeft: '4px' }} /* a bit of spacing from text */ /> )} diff --git a/src/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/drilldown_template_table/drilldown_template_table.tsx b/src/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/drilldown_template_table/drilldown_template_table.tsx index c918dbdef215a..cb23fa2d576d8 100644 --- a/src/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/drilldown_template_table/drilldown_template_table.tsx +++ b/src/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/drilldown_template_table/drilldown_template_table.tsx @@ -58,8 +58,8 @@ export const DrilldownTemplateTable: React.FC = ({ name: txtNameColumnTitle, sortable: true, render: (omit, item: DrilldownTemplateTableItem) => ( -
        -
        {item.name}
        +
        +
        {item.name}
        {item.description} diff --git a/src/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/flyout_frame/flyout_frame.tsx b/src/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/flyout_frame/flyout_frame.tsx index 246cf5d7362ba..23633a52be35d 100644 --- a/src/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/flyout_frame/flyout_frame.tsx +++ b/src/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/flyout_frame/flyout_frame.tsx @@ -45,7 +45,7 @@ export const FlyoutFrame: FC> = ({ {onBack && ( -
        +
        > = ({ )} {!!children && ( - + {tooltip ? ( {children} diff --git a/src/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/trigger_picker/trigger_picker.tsx b/src/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/trigger_picker/trigger_picker.tsx index 35bdcbe4d2c9f..1c4653b3e8630 100644 --- a/src/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/trigger_picker/trigger_picker.tsx +++ b/src/plugins/ui_actions_enhanced/public/drilldowns/drilldown_manager/components/trigger_picker/trigger_picker.tsx @@ -74,7 +74,7 @@ export const TriggerPicker: React.FC = ({ ), }} - style={{ maxWidth: `80%` }} + css={{ maxWidth: `80%` }} > {items.map((trigger) => ( data-test-subj="urlDrilldownAdditionalOptions" > - + { diff --git a/src/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/components/variable_popover/index.tsx b/src/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/components/variable_popover/index.tsx index 656ff07623dc5..e308969881429 100644 --- a/src/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/components/variable_popover/index.tsx +++ b/src/plugins/ui_actions_enhanced/public/drilldowns/url_drilldown/components/variable_popover/index.tsx @@ -74,7 +74,7 @@ export const VariablePopover: React.FC = ({ variables, onSelect, variable }} > {(list, search) => ( -
        +
        {search} {list} {variablesHelpLink && ( diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_source/get_height.test.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_source/get_height.test.tsx index 5e97ff9cc55da..a3f70c2badc0c 100644 --- a/src/plugins/unified_doc_viewer/public/components/doc_viewer_source/get_height.test.tsx +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_source/get_height.test.tsx @@ -32,31 +32,17 @@ describe('getHeight', () => { test('when using document explorer, returning the available height in the flyout', () => { const monacoMock = getMonacoMock(500, 0); - const height = getHeight(monacoMock, true, DEFAULT_MARGIN_BOTTOM); + const height = getHeight(monacoMock, DEFAULT_MARGIN_BOTTOM); expect(height).toBe(484); - const heightCustom = getHeight(monacoMock, true, 80); + const heightCustom = getHeight(monacoMock, 80); expect(heightCustom).toBe(420); }); test('when using document explorer, returning the available height in the flyout has a minimun guarenteed height', () => { const monacoMock = getMonacoMock(500); - const height = getHeight(monacoMock, true, DEFAULT_MARGIN_BOTTOM); + const height = getHeight(monacoMock, DEFAULT_MARGIN_BOTTOM); expect(height).toBe(400); }); - - test('when using classic table, its displayed inline without scrolling', () => { - const monacoMock = getMonacoMock(100); - - const height = getHeight(monacoMock, false, DEFAULT_MARGIN_BOTTOM); - expect(height).toBe(1020); - }); - - test('when using classic table, limited height > 500 lines to allow scrolling', () => { - const monacoMock = getMonacoMock(1000); - - const height = getHeight(monacoMock, false, DEFAULT_MARGIN_BOTTOM); - expect(height).toBe(5020); - }); }); diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_source/get_height.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_source/get_height.tsx index 514c994e5d423..68619b6048338 100644 --- a/src/plugins/unified_doc_viewer/public/components/doc_viewer_source/get_height.tsx +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_source/get_height.tsx @@ -8,7 +8,7 @@ */ import { monaco } from '@kbn/monaco'; -import { MAX_LINES_CLASSIC_TABLE, MIN_HEIGHT } from './source'; +import { MIN_HEIGHT } from './source'; // Displayed margin of the tab content to the window bottom export const DEFAULT_MARGIN_BOTTOM = 16; @@ -28,7 +28,6 @@ export function getTabContentAvailableHeight( export function getHeight( editor: monaco.editor.IStandaloneCodeEditor, - useDocExplorer: boolean, decreaseAvailableHeightBy: number ) { const editorElement = editor?.getDomNode(); @@ -36,17 +35,6 @@ export function getHeight( return 0; } - let result; - if (useDocExplorer) { - result = getTabContentAvailableHeight(editorElement, decreaseAvailableHeightBy); - } else { - // takes care of the classic table, display a maximum of 500 lines - // why not display it all? Due to performance issues when the browser needs to render it all - const lineHeight = editor.getOption(monaco.editor.EditorOption.lineHeight); - const lineCount = editor.getModel()?.getLineCount() || 1; - const displayedLineCount = - lineCount > MAX_LINES_CLASSIC_TABLE ? MAX_LINES_CLASSIC_TABLE : lineCount; - result = editor.getTopForLineNumber(displayedLineCount + 1) + lineHeight; - } + const result = getTabContentAvailableHeight(editorElement, decreaseAvailableHeightBy); return Math.max(result, MIN_HEIGHT); } diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_source/source.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_source/source.tsx index 5b4ba36cd03f1..3bd1137cabccf 100644 --- a/src/plugins/unified_doc_viewer/public/components/doc_viewer_source/source.tsx +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_source/source.tsx @@ -17,7 +17,7 @@ import { i18n } from '@kbn/i18n'; import type { DataView } from '@kbn/data-views-plugin/public'; import type { DataTableRecord } from '@kbn/discover-utils/types'; import { ElasticRequestState } from '@kbn/unified-doc-viewer'; -import { isLegacyTableEnabled, SEARCH_FIELDS_FROM_SOURCE } from '@kbn/discover-utils'; +import { SEARCH_FIELDS_FROM_SOURCE } from '@kbn/discover-utils'; import { omit } from 'lodash'; import { getUnifiedDocViewerServices } from '../../plugin'; import { useEsDocSearch } from '../../hooks'; @@ -36,9 +36,6 @@ interface SourceViewerProps { onRefresh: () => void; } -// Ihe number of lines displayed without scrolling used for classic table, which renders the component -// inline limitation was necessary to enable virtualized scrolling, which improves performance -export const MAX_LINES_CLASSIC_TABLE = 500; // Minimum height for the source content to guarantee minimum space when the flyout is scrollable. export const MIN_HEIGHT = 400; @@ -57,10 +54,6 @@ export const DocViewerSource = ({ const [jsonValue, setJsonValue] = useState(''); const { uiSettings } = getUnifiedDocViewerServices(); const useNewFieldsApi = !uiSettings.get(SEARCH_FIELDS_FROM_SOURCE); - const useDocExplorer = !isLegacyTableEnabled({ - uiSettings, - isEsqlMode: Array.isArray(textBasedHits), - }); const [requestState, hit] = useEsDocSearch({ id, index, @@ -75,9 +68,7 @@ export const DocViewerSource = ({ } }, [requestState, hit]); - // setting editor height - // - classic view: based on lines height and count to stretch and fit its content - // - explorer: to fill the available space of the document flyout + // setting editor height to fill the available space of the document flyout useEffect(() => { if (!editor) { return; @@ -88,11 +79,7 @@ export const DocViewerSource = ({ return; } - const height = getHeight( - editor, - useDocExplorer, - decreaseAvailableHeightBy ?? DEFAULT_MARGIN_BOTTOM - ); + const height = getHeight(editor, decreaseAvailableHeightBy ?? DEFAULT_MARGIN_BOTTOM); if (height === 0) { return; } @@ -102,7 +89,7 @@ export const DocViewerSource = ({ } else { setEditorHeight(height); } - }, [editor, jsonValue, useDocExplorer, setEditorHeight, decreaseAvailableHeightBy]); + }, [editor, jsonValue, setEditorHeight, decreaseAvailableHeightBy]); const loadingState = (
        diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table.test.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table.test.tsx deleted file mode 100644 index 43f2d21eb8fd1..0000000000000 --- a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table.test.tsx +++ /dev/null @@ -1,452 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React from 'react'; -import { mountWithIntl } from '@kbn/test-jest-helpers'; -import { findTestSubject } from '@elastic/eui/lib/test'; -import { DocViewerLegacyTable } from './table'; -import type { DataView } from '@kbn/data-views-plugin/public'; -import type { DocViewRenderProps } from '@kbn/unified-doc-viewer/types'; -import { buildDataTableRecord } from '@kbn/discover-utils'; -import { setUnifiedDocViewerServices } from '../../../plugin'; -import type { UnifiedDocViewerServices } from '../../../types'; - -const services = { - uiSettings: { - get: (key: string) => { - if (key === 'discover:showMultiFields') { - return true; - } - }, - }, - fieldFormats: { - getDefaultInstance: jest.fn(() => ({ convert: (value: unknown) => value })), - getFormatterForField: jest.fn(() => ({ convert: (value: unknown) => value })), - }, -}; - -const dataView = { - fields: { - getAll: () => [ - { - name: '_index', - type: 'string', - scripted: false, - filterable: true, - }, - { - name: 'message', - type: 'string', - scripted: false, - filterable: false, - }, - { - name: 'extension', - type: 'string', - scripted: false, - filterable: true, - }, - { - name: 'bytes', - type: 'number', - scripted: false, - filterable: true, - }, - { - name: 'scripted', - type: 'number', - scripted: true, - filterable: false, - }, - ], - }, - metaFields: ['_index', '_score'], - getFormatterForField: jest.fn(() => ({ convert: (value: unknown) => value })), -} as unknown as DataView; - -dataView.fields.getByName = (name: string) => { - return dataView.fields.getAll().find((field) => field.name === name); -}; - -const mountComponent = ( - props: DocViewRenderProps, - overrides?: Partial -) => { - setUnifiedDocViewerServices({ ...services, ...overrides } as UnifiedDocViewerServices); - return mountWithIntl(); -}; - -describe('DocViewTable at Discover', () => { - // At Discover's main view, all buttons are rendered - // check for existence of action buttons and warnings - - const hit = buildDataTableRecord( - { - _index: 'logstash-2014.09.09', - _id: 'id123', - _score: 1, - _source: { - message: - 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. \ - Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus \ - et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, \ - ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. \ - Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, \ - rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. \ - Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. \ - Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestibulum volutpat pretium libero. Cras id dui. Aenean ut', - extension: 'html', - not_mapped: 'yes', - bytes: 100, - objectArray: [{ foo: true }], - relatedContent: { - test: 1, - }, - scripted: 123, - _underscore: 123, - }, - }, - dataView - ); - - const props = { - hit, - columns: ['extension'], - dataView, - filter: jest.fn(), - onAddColumn: jest.fn(), - onRemoveColumn: jest.fn(), - }; - const component = mountComponent(props); - [ - { - _property: '_index', - addInclusiveFilterButton: true, - noMappingWarning: false, - toggleColumnButton: true, - underscoreWarning: false, - }, - { - _property: 'message', - addInclusiveFilterButton: false, - noMappingWarning: false, - toggleColumnButton: true, - underscoreWarning: false, - }, - { - _property: '_underscore', - addInclusiveFilterButton: false, - noMappingWarning: false, - toggleColumnButton: true, - underScoreWarning: true, - }, - { - _property: 'scripted', - addInclusiveFilterButton: false, - noMappingWarning: false, - toggleColumnButton: true, - underScoreWarning: false, - }, - { - _property: 'not_mapped', - addInclusiveFilterButton: false, - noMappingWarning: true, - toggleColumnButton: true, - underScoreWarning: false, - }, - ].forEach((check) => { - const rowComponent = findTestSubject(component, `tableDocViewRow-${check._property}`); - - it(`renders row for ${check._property}`, () => { - expect(rowComponent.length).toBe(1); - }); - - (['addInclusiveFilterButton', 'toggleColumnButton', 'underscoreWarning'] as const).forEach( - (element) => { - const elementExist = check[element]; - - if (typeof elementExist === 'boolean') { - const btn = findTestSubject(rowComponent, element, '^='); - - it(`renders ${element} for '${check._property}' correctly`, () => { - const disabled = btn.length ? btn.props().disabled : true; - const clickAble = btn.length && !disabled ? true : false; - expect(clickAble).toBe(elementExist); - }); - } - } - ); - }); -}); - -describe('DocViewTable at Discover Context', () => { - // here no toggleColumnButtons are rendered - const hit = buildDataTableRecord( - { - _index: 'logstash-2014.09.09', - _id: 'id123', - _score: 1, - _source: { - message: - 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. \ - Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus \ - et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, \ - ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. \ - Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, \ - rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. \ - Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. \ - Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestibulum volutpat pretium libero. Cras id dui. Aenean ut', - }, - }, - dataView - ); - const props = { - hit, - columns: ['extension'], - dataView, - filter: jest.fn(), - }; - - const component = mountComponent(props); - - it(`renders no toggleColumnButton`, () => { - const foundLength = findTestSubject(component, 'toggleColumnButtons').length; - expect(foundLength).toBe(0); - }); - - it(`renders addInclusiveFilterButton`, () => { - const row = findTestSubject(component, `tableDocViewRow-_index`); - const btn = findTestSubject(row, 'addInclusiveFilterButton'); - expect(btn.length).toBe(1); - btn.simulate('click'); - expect(props.filter).toBeCalled(); - }); -}); - -describe('DocViewTable at Discover Doc', () => { - const hit = buildDataTableRecord( - { - _index: 'logstash-2014.09.09', - _score: 1, - _id: 'id123', - _source: { - extension: 'html', - not_mapped: 'yes', - }, - }, - dataView - ); - // here no action buttons are rendered - const props = { - hit, - dataView, - hideActionsColumn: true, - }; - const component = mountComponent(props); - const foundLength = findTestSubject(component, 'addInclusiveFilterButton').length; - - it(`renders no action buttons`, () => { - expect(foundLength).toBe(0); - }); -}); - -describe('DocViewTable at Discover Doc with Fields API', () => { - const dataViewCommerce = { - fields: { - getAll: () => [ - { - name: '_index', - type: 'string', - scripted: false, - filterable: true, - }, - { - name: 'category', - type: 'string', - scripted: false, - filterable: true, - }, - { - name: 'category.keyword', - displayName: 'category.keyword', - type: 'string', - scripted: false, - filterable: true, - spec: { - subType: { - multi: { - parent: 'category', - }, - }, - }, - }, - { - name: 'customer_first_name', - type: 'string', - scripted: false, - filterable: true, - }, - { - name: 'customer_first_name.keyword', - displayName: 'customer_first_name.keyword', - type: 'string', - scripted: false, - filterable: false, - spec: { - subType: { - multi: { - parent: 'customer_first_name', - }, - }, - }, - }, - { - name: 'customer_first_name.nickname', - displayName: 'customer_first_name.nickname', - type: 'string', - scripted: false, - filterable: false, - spec: { - subType: { - multi: { - parent: 'customer_first_name', - }, - }, - }, - }, - { - name: 'city', - displayName: 'city', - type: 'keyword', - isMapped: true, - readFromDocValues: true, - searchable: true, - shortDotsEnable: false, - scripted: false, - filterable: false, - }, - { - name: 'city.raw', - displayName: 'city.raw', - type: 'string', - isMapped: true, - spec: { - subType: { - multi: { - parent: 'city', - }, - }, - }, - shortDotsEnable: false, - scripted: false, - filterable: false, - }, - ], - }, - metaFields: ['_index', '_type', '_score', '_id'], - getFormatterForField: jest.fn(() => ({ convert: (value: unknown) => value })), - } as unknown as DataView; - - dataViewCommerce.fields.getByName = (name: string) => { - return dataViewCommerce.fields.getAll().find((field) => field.name === name); - }; - - const fieldsHit = buildDataTableRecord( - { - _index: 'logstash-2014.09.09', - _id: 'id123', - _score: 1.0, - fields: { - category: "Women's Clothing", - 'category.keyword': "Women's Clothing", - customer_first_name: 'Betty', - 'customer_first_name.keyword': 'Betty', - 'customer_first_name.nickname': 'Betsy', - 'city.raw': 'Los Angeles', - }, - }, - dataView - ); - const props = { - hit: fieldsHit, - columns: ['Document'], - dataView: dataViewCommerce, - filter: jest.fn(), - onAddColumn: jest.fn(), - onRemoveColumn: jest.fn(), - }; - - it('renders multifield rows if showMultiFields flag is set', () => { - const component = mountComponent(props); - - const categoryKeywordRow = findTestSubject(component, 'tableDocViewRow-category.keyword'); - expect(categoryKeywordRow.length).toBe(1); - - expect(findTestSubject(component, 'tableDocViewRow-customer_first_name.keyword').length).toBe( - 1 - ); - expect(findTestSubject(component, 'tableDocViewRow-customer_first_name.nickname').length).toBe( - 1 - ); - - expect( - findTestSubject(component, 'tableDocViewRow-category.keyword-multifieldBadge').length - ).toBe(1); - - expect( - findTestSubject(component, 'tableDocViewRow-customer_first_name.keyword-multifieldBadge') - .length - ).toBe(1); - - expect( - findTestSubject(component, 'tableDocViewRow-customer_first_name.nickname-multifieldBadge') - .length - ).toBe(1); - - expect(findTestSubject(component, 'tableDocViewRow-city.raw').length).toBe(1); - }); - - it('does not render multifield rows if showMultiFields flag is not set', () => { - const overridedServices = { - uiSettings: { - get: (key: string) => { - if (key === 'discover:showMultiFields') { - return false; - } - }, - }, - } as unknown as UnifiedDocViewerServices; - const component = mountComponent(props, overridedServices); - - const categoryKeywordRow = findTestSubject(component, 'tableDocViewRow-category.keyword'); - expect(categoryKeywordRow.length).toBe(0); - - expect(findTestSubject(component, 'tableDocViewRow-customer_first_name.keyword').length).toBe( - 0 - ); - - expect(findTestSubject(component, 'tableDocViewRow-customer_first_name.nickname').length).toBe( - 0 - ); - - expect( - findTestSubject(component, 'tableDocViewRow-customer_first_name.keyword-multifieldBadge') - .length - ).toBe(0); - - expect(findTestSubject(component, 'tableDocViewRow-customer_first_name').length).toBe(1); - expect( - findTestSubject(component, 'tableDocViewRow-customer_first_name.nickname-multifieldBadge') - .length - ).toBe(0); - - expect(findTestSubject(component, 'tableDocViewRow-city').length).toBe(0); - expect(findTestSubject(component, 'tableDocViewRow-city.raw').length).toBe(1); - }); -}); diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table.tsx deleted file mode 100644 index e834bef5d664e..0000000000000 --- a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table.tsx +++ /dev/null @@ -1,123 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import '../table.scss'; -import React, { useCallback, useMemo } from 'react'; -import { EuiInMemoryTable } from '@elastic/eui'; -import { getFieldIconType } from '@kbn/field-utils/src/utils/get_field_icon_type'; -import { - SHOW_MULTIFIELDS, - formatFieldValue, - getIgnoredReason, - getShouldShowFieldHandler, - isNestedFieldParent, -} from '@kbn/discover-utils'; -import type { DocViewRenderProps, FieldRecordLegacy } from '@kbn/unified-doc-viewer/types'; -import { getUnifiedDocViewerServices } from '../../../plugin'; -import { ACTIONS_COLUMN, MAIN_COLUMNS } from './table_columns'; - -export const DocViewerLegacyTable = ({ - columns, - hit, - dataView, - hideActionsColumn, - filter, - onAddColumn, - onRemoveColumn, -}: DocViewRenderProps) => { - const { fieldFormats, uiSettings } = getUnifiedDocViewerServices(); - const showMultiFields = useMemo(() => uiSettings.get(SHOW_MULTIFIELDS), [uiSettings]); - - const mapping = useCallback((name: string) => dataView.fields.getByName(name), [dataView.fields]); - const tableColumns = useMemo(() => { - return !hideActionsColumn ? [ACTIONS_COLUMN, ...MAIN_COLUMNS] : MAIN_COLUMNS; - }, [hideActionsColumn]); - - const onToggleColumn = useMemo(() => { - if (!onRemoveColumn || !onAddColumn || !columns) { - return undefined; - } - return (field: string) => { - if (columns.includes(field)) { - onRemoveColumn(field); - } else { - onAddColumn(field); - } - }; - }, [onRemoveColumn, onAddColumn, columns]); - - const onSetRowProps = useCallback(({ field: { field } }: FieldRecordLegacy) => { - return { - key: field, - className: 'kbnDocViewer__tableRow', - 'data-test-subj': `tableDocViewRow-${field}`, - }; - }, []); - - const shouldShowFieldHandler = useMemo( - () => getShouldShowFieldHandler(Object.keys(hit.flattened), dataView, showMultiFields), - [hit.flattened, dataView, showMultiFields] - ); - - const items: FieldRecordLegacy[] = Object.keys(hit.flattened) - .filter(shouldShowFieldHandler) - .sort((fieldA, fieldB) => { - const mappingA = mapping(fieldA); - const mappingB = mapping(fieldB); - const nameA = !mappingA || !mappingA.displayName ? fieldA : mappingA.displayName; - const nameB = !mappingB || !mappingB.displayName ? fieldB : mappingB.displayName; - return nameA.localeCompare(nameB); - }) - .map((field) => { - const fieldMapping = mapping(field); - const displayName = fieldMapping?.displayName ?? field; - const fieldType = isNestedFieldParent(field, dataView) - ? 'nested' - : fieldMapping - ? getFieldIconType(fieldMapping) - : undefined; - const ignored = getIgnoredReason(fieldMapping ?? field, hit.raw._ignored); - return { - action: { - onToggleColumn, - onFilter: filter, - isActive: !!columns?.includes(field), - flattenedField: hit.flattened[field], - }, - field: { - field, - displayName, - fieldMapping, - fieldType, - scripted: Boolean(fieldMapping?.scripted), - }, - value: { - formattedValue: formatFieldValue( - hit.flattened[field], - hit.raw, - fieldFormats, - dataView, - fieldMapping - ), - ignored, - }, - }; - }); - - return ( - - ); -}; diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table_cell_actions.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table_cell_actions.tsx deleted file mode 100644 index c63c8c1ae70e9..0000000000000 --- a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table_cell_actions.tsx +++ /dev/null @@ -1,67 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React from 'react'; -import type { DataViewField } from '@kbn/data-views-plugin/public'; -import type { DocViewFilterFn } from '@kbn/unified-doc-viewer/types'; -import { DocViewTableRowBtnFilterRemove } from './table_row_btn_filter_remove'; -import { DocViewTableRowBtnFilterExists } from './table_row_btn_filter_exists'; -import { DocViewTableRowBtnToggleColumn } from './table_row_btn_toggle_column'; -import { DocViewTableRowBtnFilterAdd } from './table_row_btn_filter_add'; - -interface TableActionsProps { - field: string; - isActive: boolean; - flattenedField: unknown; - fieldMapping?: DataViewField; - onFilter: DocViewFilterFn; - onToggleColumn: ((field: string) => void) | undefined; - ignoredValue: boolean; -} - -export const TableActions = ({ - isActive, - field, - fieldMapping, - flattenedField, - onToggleColumn, - onFilter, - ignoredValue, -}: TableActionsProps) => { - return ( -
        - {onFilter && ( - onFilter(fieldMapping, flattenedField, '+')} - /> - )} - {onFilter && ( - onFilter(fieldMapping, flattenedField, '-')} - /> - )} - {onToggleColumn && ( - onToggleColumn(field)} - /> - )} - {onFilter && ( - onFilter('_exists_', field, '+')} - scripted={fieldMapping && fieldMapping.scripted} - /> - )} -
        - ); -}; diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table_columns.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table_columns.tsx deleted file mode 100644 index 3b510f6130229..0000000000000 --- a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table_columns.tsx +++ /dev/null @@ -1,115 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { EuiBasicTableColumn, EuiText } from '@elastic/eui'; -import React from 'react'; -import { FormattedMessage } from '@kbn/i18n-react'; -import type { FieldRecordLegacy } from '@kbn/unified-doc-viewer/types'; -import { FieldName } from '@kbn/unified-doc-viewer'; -import { TableActions } from './table_cell_actions'; -import { TableFieldValue } from '../table_cell_value'; - -export const ACTIONS_COLUMN: EuiBasicTableColumn = { - field: 'action', - className: 'kbnDocViewer__tableActionsCell', - width: '108px', - mobileOptions: { header: false }, - name: ( - - - - - - ), - render: ( - { flattenedField, isActive, onFilter, onToggleColumn }: FieldRecordLegacy['action'], - { field: { field, fieldMapping }, value: { ignored } }: FieldRecordLegacy - ) => { - return ( - - ); - }, -}; -export const MAIN_COLUMNS: Array> = [ - { - field: 'field', - className: 'kbnDocViewer__tableFieldNameCell', - mobileOptions: { header: false }, - width: '30%', - name: ( - - - - - - ), - render: ({ - field, - fieldType, - displayName, - fieldMapping, - scripted, - }: FieldRecordLegacy['field']) => { - return field ? ( - - ) : ( -   - ); - }, - }, - { - field: 'value', - className: 'kbnDocViewer__tableValueCell', - mobileOptions: { header: false }, - name: ( - - - - - - ), - render: ( - { formattedValue, ignored }: FieldRecordLegacy['value'], - { field: { field }, action: { flattenedField } }: FieldRecordLegacy - ) => { - return ( - - ); - }, - }, -]; diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table_row_btn_filter_add.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table_row_btn_filter_add.tsx deleted file mode 100644 index 12e3196cac1c9..0000000000000 --- a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table_row_btn_filter_add.tsx +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the "Elastic License - * 2.0", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React from 'react'; -import { FormattedMessage } from '@kbn/i18n-react'; -import { EuiToolTip, EuiButtonIcon } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; - -export interface Props { - onClick: () => void; - disabled: boolean; -} - -export function DocViewTableRowBtnFilterAdd({ onClick, disabled = false }: Props) { - const tooltipContent = disabled ? ( - - ) : ( - - ); - - return ( - - - - ); -} diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table_row_btn_filter_exists.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table_row_btn_filter_exists.tsx deleted file mode 100644 index 2685b4b7b8e69..0000000000000 --- a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table_row_btn_filter_exists.tsx +++ /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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React from 'react'; -import { FormattedMessage } from '@kbn/i18n-react'; -import { EuiToolTip, EuiButtonIcon } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; - -export interface Props { - onClick: () => void; - disabled?: boolean; - scripted?: boolean; -} - -export function DocViewTableRowBtnFilterExists({ - onClick, - disabled = false, - scripted = false, -}: Props) { - const tooltipContent = disabled ? ( - scripted ? ( - - ) : ( - - ) - ) : ( - - ); - - return ( - - - - ); -} diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table_row_btn_filter_remove.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table_row_btn_filter_remove.tsx deleted file mode 100644 index c9073fc9831c6..0000000000000 --- a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table_row_btn_filter_remove.tsx +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the "Elastic License - * 2.0", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React from 'react'; -import { FormattedMessage } from '@kbn/i18n-react'; -import { i18n } from '@kbn/i18n'; -import { EuiToolTip, EuiButtonIcon } from '@elastic/eui'; - -export interface Props { - onClick: () => void; - disabled?: boolean; -} - -export function DocViewTableRowBtnFilterRemove({ onClick, disabled = false }: Props) { - const tooltipContent = disabled ? ( - - ) : ( - - ); - - return ( - - - - ); -} diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table_row_btn_toggle_column.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table_row_btn_toggle_column.tsx deleted file mode 100644 index 9f999248cf269..0000000000000 --- a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/legacy/table_row_btn_toggle_column.tsx +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the "Elastic License - * 2.0", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import React from 'react'; -import { FormattedMessage } from '@kbn/i18n-react'; -import { i18n } from '@kbn/i18n'; -import { EuiToolTip, EuiButtonIcon } from '@elastic/eui'; - -export interface Props { - active: boolean; - disabled?: boolean; - onClick: () => void; - fieldname: string; -} - -export function DocViewTableRowBtnToggleColumn({ - onClick, - active, - disabled = false, - fieldname = '', -}: Props) { - if (disabled) { - return ( - - ); - } - return ( - - } - > - - - ); -} diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table.scss b/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table.scss index 64e700c73fca5..348c8c9784ad8 100644 --- a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table.scss +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table.scss @@ -1,59 +1,3 @@ -.kbnDocViewer { - .euiTableRowCell { - vertical-align: top; - } -} - -.kbnDocViewer__tableRow { - font-size: $euiFontSizeXS; - font-family: $euiCodeFontFamily; - - // set min-width for each column except actions - .euiTableRowCell:nth-child(n+2) { - min-width: $euiSizeM * 9; - } - - .kbnDocViewer__buttons { - // Show all icons if one is focused, - &:focus-within { - .kbnDocViewer__actionButton { - opacity: 1; - } - } - } - - &:hover { - .kbnDocViewer__actionButton { - opacity: 1; - } - } - - .kbnDocViewer__actionButton { - @include euiBreakpoint('m', 'l', 'xl') { - opacity: 0; - } - - &:focus { - opacity: 1; - } - } -} - -.kbnDocViewer__tableActionsCell, -.kbnDocViewer__tableFieldNameCell { - .euiTableCellContent { - align-items: flex-start; - padding: $euiSizeXS; - } -} - -.kbnDocViewer__tableValueCell { - .euiTableCellContent { - flex-direction: column; - align-items: flex-start; - } -} - .kbnDocViewer__value { word-break: break-all; word-wrap: break-word; diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table.tsx index 16976d43e58f9..632652100069d 100644 --- a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table.tsx +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table.tsx @@ -497,7 +497,7 @@ export const DocViewerTable = ({ {rows.length === 0 ? ( - +

        { - if (key === TRUNCATE_MAX_HEIGHT) { - return mockTruncateMaxHeightSetting ?? TRUNCATE_MAX_HEIGHT_DEFAULT_VALUE; - } - return; -}) as IUiSettingsClient['get']; - setUnifiedDocViewerServices(mockUnifiedDocViewerServices); let mockScrollHeight = 0; @@ -35,7 +21,6 @@ jest.spyOn(HTMLElement.prototype, 'scrollHeight', 'get').mockImplementation(() = describe('TableFieldValue', () => { afterEach(() => { mockScrollHeight = 0; - mockTruncateMaxHeightSetting = undefined; }); it('should render correctly', async () => { @@ -121,97 +106,4 @@ describe('TableFieldValue', () => { expect(valueElement.getAttribute('css')).toBeNull(); expect(valueElement.classList.contains('kbnDocViewer__value--truncated')).toBe(false); }); - - it('should truncate a long value in legacy table correctly', async () => { - mockScrollHeight = 1000; - - const value = 'long value'.repeat(300); - render( - - ); - - expect(screen.getByText(value)).toBeInTheDocument(); - - let toggleButton = screen.getByTestId('toggleLongFieldValue-message'); - expect(toggleButton).toBeInTheDocument(); - expect(toggleButton.getAttribute('aria-expanded')).toBe('false'); - - let valueElement = screen.getByTestId('tableDocViewRow-message-value'); - expect(valueElement.getAttribute('css')).toBeDefined(); - expect(valueElement.classList.contains('kbnDocViewer__value--truncated')).toBe(true); - - toggleButton.click(); - - toggleButton = screen.getByTestId('toggleLongFieldValue-message'); - expect(toggleButton).toBeInTheDocument(); - expect(toggleButton.getAttribute('aria-expanded')).toBe('true'); - - valueElement = screen.getByTestId('tableDocViewRow-message-value'); - expect(valueElement.getAttribute('css')).toBeNull(); - expect(valueElement.classList.contains('kbnDocViewer__value--truncated')).toBe(false); - - toggleButton.click(); - - toggleButton = screen.getByTestId('toggleLongFieldValue-message'); - expect(toggleButton).toBeInTheDocument(); - expect(toggleButton.getAttribute('aria-expanded')).toBe('false'); - - valueElement = screen.getByTestId('tableDocViewRow-message-value'); - expect(valueElement.getAttribute('css')).toBeDefined(); - expect(valueElement.classList.contains('kbnDocViewer__value--truncated')).toBe(true); - }); - - it('should not truncate a long value in legacy table if limit is not reached', async () => { - mockScrollHeight = 112; - - const value = 'long value'.repeat(300); - render( - - ); - - expect(screen.getByText(value)).toBeInTheDocument(); - expect(screen.queryByTestId('toggleLongFieldValue-message')).toBeNull(); - - const valueElement = screen.getByTestId('tableDocViewRow-message-value'); - expect(valueElement.getAttribute('css')).toBeNull(); - expect(valueElement.classList.contains('kbnDocViewer__value--truncated')).toBe(false); - }); - - it('should not truncate a long value in legacy table if setting is 0', async () => { - mockScrollHeight = 1000; - mockTruncateMaxHeightSetting = 0; - - const value = 'long value'.repeat(300); - render( - - ); - - expect(screen.getByText(value)).toBeInTheDocument(); - expect(screen.queryByTestId('toggleLongFieldValue-message')).toBeNull(); - - const valueElement = screen.getByTestId('tableDocViewRow-message-value'); - expect(valueElement.getAttribute('css')).toBeNull(); - expect(valueElement.classList.contains('kbnDocViewer__value--truncated')).toBe(false); - }); }); diff --git a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table_cell_value.tsx b/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table_cell_value.tsx index 3afe935307ab2..556f671e67cbd 100644 --- a/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table_cell_value.tsx +++ b/src/plugins/unified_doc_viewer/public/components/doc_viewer_table/table_cell_value.tsx @@ -21,9 +21,7 @@ import { import classnames from 'classnames'; import React, { Fragment, useCallback, useState } from 'react'; import { i18n } from '@kbn/i18n'; -import { IgnoredReason, TRUNCATE_MAX_HEIGHT } from '@kbn/discover-utils'; -import { FieldRecordLegacy } from '@kbn/unified-doc-viewer/types'; -import { getUnifiedDocViewerServices } from '../../plugin'; +import { IgnoredReason } from '@kbn/discover-utils'; const DOC_VIEWER_DEFAULT_TRUNCATE_MAX_HEIGHT = 110; @@ -96,14 +94,14 @@ const IgnoreWarning: React.FC = React.memo(({ rawValue, reas ); }); -type TableFieldValueProps = Pick & { - formattedValue: FieldRecordLegacy['value']['formattedValue']; +interface TableFieldValueProps { + field: string; + formattedValue: string; rawValue: unknown; ignoreReason?: IgnoredReason; isDetails?: boolean; // true when inside EuiDataGrid cell popover - isLegacy?: boolean; // true when inside legacy table isHighlighted?: boolean; // whether it's matching a search term -}; +} export const TableFieldValue = ({ formattedValue, @@ -111,14 +109,10 @@ export const TableFieldValue = ({ rawValue, ignoreReason, isDetails, - isLegacy, isHighlighted, }: TableFieldValueProps) => { const { euiTheme } = useEuiTheme(); - const { uiSettings } = getUnifiedDocViewerServices(); - const truncationHeight = isLegacy - ? uiSettings.get(TRUNCATE_MAX_HEIGHT) - : DOC_VIEWER_DEFAULT_TRUNCATE_MAX_HEIGHT; + const truncationHeight = DOC_VIEWER_DEFAULT_TRUNCATE_MAX_HEIGHT; const [containerRef, setContainerRef] = useState(null); useResizeObserver(containerRef); diff --git a/src/plugins/unified_doc_viewer/public/plugin.tsx b/src/plugins/unified_doc_viewer/public/plugin.tsx index 41db23a52591c..4806d5fce0918 100644 --- a/src/plugins/unified_doc_viewer/public/plugin.tsx +++ b/src/plugins/unified_doc_viewer/public/plugin.tsx @@ -9,7 +9,6 @@ import React from 'react'; import type { CoreSetup, Plugin } from '@kbn/core/public'; -import { isLegacyTableEnabled } from '@kbn/discover-utils'; import { i18n } from '@kbn/i18n'; import { DocViewsRegistry } from '@kbn/unified-doc-viewer'; import { EuiDelayRender, EuiSkeletonText } from '@elastic/eui'; @@ -31,9 +30,6 @@ const fallback = ( ); -const LazyDocViewerLegacyTable = dynamic(() => import('./components/doc_viewer_table/legacy'), { - fallback, -}); const LazyDocViewerTable = dynamic(() => import('./components/doc_viewer_table'), { fallback }); const LazySourceViewer = dynamic(() => import('./components/doc_viewer_source'), { fallback }); @@ -65,17 +61,7 @@ export class UnifiedDocViewerPublicPlugin }), order: 10, component: (props) => { - const { textBasedHits } = props; - const { uiSettings } = getUnifiedDocViewerServices(); - - const LazyDocView = isLegacyTableEnabled({ - uiSettings, - isEsqlMode: Array.isArray(textBasedHits), - }) - ? LazyDocViewerLegacyTable - : LazyDocViewerTable; - - return ; + return ; }, }); diff --git a/src/plugins/unified_search/public/filter_bar/filter_editor/filter_editor.tsx b/src/plugins/unified_search/public/filter_bar/filter_editor/filter_editor.tsx index cc602efa61422..425624c3e194d 100644 --- a/src/plugins/unified_search/public/filter_bar/filter_editor/filter_editor.tsx +++ b/src/plugins/unified_search/public/filter_bar/filter_editor/filter_editor.tsx @@ -280,7 +280,7 @@ class FilterEditorComponent extends Component { diff --git a/src/plugins/unified_search/public/filter_bar/filter_item/filter_item.tsx b/src/plugins/unified_search/public/filter_bar/filter_item/filter_item.tsx index 19ba668092466..9c8e7b074149f 100644 --- a/src/plugins/unified_search/public/filter_bar/filter_item/filter_item.tsx +++ b/src/plugins/unified_search/public/filter_bar/filter_item/filter_item.tsx @@ -388,7 +388,7 @@ function FilterItemComponent(props: FilterItemProps) { ) : ( +

        ); diff --git a/src/plugins/unified_search/public/query_string_input/filter_editor_wrapper.tsx b/src/plugins/unified_search/public/query_string_input/filter_editor_wrapper.tsx index 319d3b0f49846..16ef016ff4006 100644 --- a/src/plugins/unified_search/public/query_string_input/filter_editor_wrapper.tsx +++ b/src/plugins/unified_search/public/query_string_input/filter_editor_wrapper.tsx @@ -105,7 +105,7 @@ export const FilterEditorWrapper = React.memo(function FilterEditorWrapper({ } return ( -
        +
        {newFilter && ( -

        {strings.getNoDataPopoverContent()}

        +

        {strings.getNoDataPopoverContent()}

        } minWidth={300} diff --git a/src/plugins/unified_search/public/query_string_input/query_bar_top_row.tsx b/src/plugins/unified_search/public/query_string_input/query_bar_top_row.tsx index 4d4db4438d74d..d6bab939c1efc 100644 --- a/src/plugins/unified_search/public/query_string_input/query_bar_top_row.tsx +++ b/src/plugins/unified_search/public/query_string_input/query_bar_top_row.tsx @@ -628,7 +628,7 @@ export const QueryBarTopRow = React.memo( function renderDataViewsPicker() { if (props.dataViewPickerComponentProps && !Boolean(isQueryLangSelected)) { return ( - + + + + ); + if (isQueryLangSelected || (!filterButtonGroup && !queryInput)) { + return null; + } return ( - - {!renderFilterMenuOnly() && renderFilterButtonGroup()} - {shouldRenderQueryInput() && ( - - - - )} - + + + {filterButtonGroup} + {queryInput} + + ); } @@ -787,12 +797,7 @@ export const QueryBarTopRow = React.memo( adHocDataview={props.indexPatterns?.[0]} /> )} - - {!isQueryLangSelected ? renderQueryInput() : null} - + {renderQueryInput()} {props.renderQueryInputAppend?.()} {shouldShowDatePickerAsBadge() && props.filterBar} {renderUpdateButton()} diff --git a/src/plugins/unified_search/public/query_string_input/query_string_input.tsx b/src/plugins/unified_search/public/query_string_input/query_string_input.tsx index 2e3b0fab0a161..2e76341ae6071 100644 --- a/src/plugins/unified_search/public/query_string_input/query_string_input.tsx +++ b/src/plugins/unified_search/public/query_string_input/query_string_input.tsx @@ -808,7 +808,7 @@ export default class QueryStringInputUI extends PureComponent
        -
        +

        - + {props.children} diff --git a/src/plugins/vis_types/timeseries/public/application/components/aggs/percentile_ui.js b/src/plugins/vis_types/timeseries/public/application/components/aggs/percentile_ui.js index f30dfce37e5c6..7a93aa271b5d5 100644 --- a/src/plugins/vis_types/timeseries/public/application/components/aggs/percentile_ui.js +++ b/src/plugins/vis_types/timeseries/public/application/components/aggs/percentile_ui.js @@ -122,7 +122,7 @@ export class Percentiles extends Component { {/* If the series is grouped by, then these colors are not respected, no need to display the color picker */} {!isGroupedBy && !['table', 'metric', 'markdown'].includes(panel.type) && ( - + -

        +
        {i18n.translate('visTypeTimeseries.indexPatternSelect.switchModePopover.title', { defaultMessage: 'Data view mode', diff --git a/src/plugins/vis_types/timeseries/public/application/visualizations/views/timeseries/decorators/__snapshots__/area_decorator.test.js.snap b/src/plugins/vis_types/timeseries/public/application/visualizations/views/timeseries/decorators/__snapshots__/area_decorator.test.js.snap index 7ded8e2254aa9..18ce44a9fb7ec 100644 --- a/src/plugins/vis_types/timeseries/public/application/visualizations/views/timeseries/decorators/__snapshots__/area_decorator.test.js.snap +++ b/src/plugins/vis_types/timeseries/public/application/visualizations/views/timeseries/decorators/__snapshots__/area_decorator.test.js.snap @@ -18,7 +18,7 @@ exports[`src/legacy/core_plugins/metrics/public/visualizations/views/timeseries/ "radius": 1, "stroke": "rgb(0, 156, 224)", "strokeWidth": 5, - "visible": false, + "visible": "never", }, } } diff --git a/src/plugins/vis_types/timeseries/public/application/visualizations/views/timeseries/utils/__snapshots__/series_styles.test.js.snap b/src/plugins/vis_types/timeseries/public/application/visualizations/views/timeseries/utils/__snapshots__/series_styles.test.js.snap index 054ca0f0d8193..28bfd0c698307 100644 --- a/src/plugins/vis_types/timeseries/public/application/visualizations/views/timeseries/utils/__snapshots__/series_styles.test.js.snap +++ b/src/plugins/vis_types/timeseries/public/application/visualizations/views/timeseries/utils/__snapshots__/series_styles.test.js.snap @@ -17,7 +17,7 @@ Object { "radius": 1, "stroke": "rgb(224, 0, 221)", "strokeWidth": 1, - "visible": true, + "visible": "always", }, }, "curve": 7, @@ -41,7 +41,7 @@ Object { "radius": 0.5, "stroke": "#000", "strokeWidth": 5, - "visible": false, + "visible": "never", }, }, "curve": 9, diff --git a/src/plugins/vis_types/timeseries/public/application/visualizations/views/timeseries/utils/series_styles.js b/src/plugins/vis_types/timeseries/public/application/visualizations/views/timeseries/utils/series_styles.js index 0da1e8e474b50..6bfbbb7bfb287 100644 --- a/src/plugins/vis_types/timeseries/public/application/visualizations/views/timeseries/utils/series_styles.js +++ b/src/plugins/vis_types/timeseries/public/application/visualizations/views/timeseries/utils/series_styles.js @@ -27,7 +27,7 @@ export const getAreaStyles = ({ points, lines, color }) => ({ radius: points.radius || 0.5, stroke: color || DEFAULT_COLOR, strokeWidth: points.lineWidth || 5, - visible: points.lineWidth > 0 && Boolean(points.show), + visible: points.lineWidth > 0 && Boolean(points.show) ? 'always' : 'never', }, }, curve: lines.steps ? CurveType.CURVE_STEP_AFTER : CurveType.LINEAR, diff --git a/src/plugins/visualizations/public/components/visualization_missed_saved_object_error.tsx b/src/plugins/visualizations/public/components/visualization_missed_saved_object_error.tsx index d4124ca216d04..e0be21c3272e4 100644 --- a/src/plugins/visualizations/public/components/visualization_missed_saved_object_error.tsx +++ b/src/plugins/visualizations/public/components/visualization_missed_saved_object_error.tsx @@ -49,7 +49,7 @@ export const VisualizationMissedSavedObjectError = ({ path: '/kibana/indexPatterns/create', })} data-test-subj="configuration-failure-reconfigure-indexpatterns" - style={{ width: '100%' }} + css={{ width: '100%' }} > {i18n.translate('visualizations.missedDataView.dataViewReconfigure', { defaultMessage: `Recreate it in the data view management page`, diff --git a/src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx b/src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx index 4993c0168313a..71338e96ea145 100644 --- a/src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx +++ b/src/plugins/visualizations/public/embeddable/visualize_embeddable.tsx @@ -472,7 +472,7 @@ export const getVisualizeEmbeddableFactory: (deps: { return (
        {/* Replicate the loading state for the expression renderer to avoid FOUC */} - + {isLoading && } {!isLoading && error && ( { + const canReadClipboard = await browser.checkBrowserPermission('clipboard-read'); + + await PageObjects.console.clearEditorText(); + await PageObjects.console.enterText('GET _search\n'); + + // Add a kbn request + // pressEnter + await PageObjects.console.enterText('GET kbn:/api/spaces/space'); + // Make sure to select the es and kbn request + await PageObjects.console.selectAllRequests(); + + await PageObjects.console.clickContextMenu(); + await PageObjects.console.clickCopyAsButton(); + + let resultToast = await toasts.getElementByIndex(1); + let toastText = await resultToast.getVisibleText(); + + expect(toastText).to.be('Requests copied to clipboard as curl'); + + // Check if the clipboard has the curl request + if (canReadClipboard) { + const clipboardText = await browser.getClipboardValue(); + expect(clipboardText).to.contain('curl -X GET'); + } + + // Wait until async operation is done + await PageObjects.common.sleep(1000); + + // Focus editor once again + await PageObjects.console.focusInputEditor(); + + // Try to copy as javascript + await PageObjects.console.clickContextMenu(); + await PageObjects.console.changeLanguageAndCopy('javascript'); + + resultToast = await toasts.getElementByIndex(2); + toastText = await resultToast.getVisibleText(); + + expect(toastText).to.be('Kibana requests can only be copied as curl'); + + // Since we tried to copy as javascript, the clipboard should still have + // the curl request + if (canReadClipboard) { + const clipboardText = await browser.getClipboardValue(); + expect(clipboardText).to.contain('curl -X GET'); + } + }); + it.skip('allows to change default language', async () => { await PageObjects.console.clickContextMenu(); diff --git a/test/functional/apps/context/classic/_discover_navigation.ts b/test/functional/apps/context/classic/_discover_navigation.ts deleted file mode 100644 index 476a4bfac9e18..0000000000000 --- a/test/functional/apps/context/classic/_discover_navigation.ts +++ /dev/null @@ -1,168 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../../ftr_provider_context'; - -const TEST_COLUMN_NAMES = ['@message']; -const TEST_FILTER_COLUMN_NAMES = [ - ['extension', 'jpg', 'extension.raw'], - ['geo.src', 'IN', 'geo.src'], -]; - -export default function ({ getService, getPageObjects }: FtrProviderContext) { - const retry = getService('retry'); - const docTable = getService('docTable'); - const filterBar = getService('filterBar'); - const { common, discover, timePicker, dashboard, context, header, unifiedFieldList } = - getPageObjects([ - 'common', - 'discover', - 'timePicker', - 'dashboard', - 'context', - 'header', - 'unifiedFieldList', - ]); - const testSubjects = getService('testSubjects'); - const dashboardAddPanel = getService('dashboardAddPanel'); - const browser = getService('browser'); - const kibanaServer = getService('kibanaServer'); - - describe('context link in discover classic', () => { - before(async () => { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - await kibanaServer.uiSettings.update({ - 'doc_table:legacy': true, - defaultIndex: 'logstash-*', - }); - await common.navigateToApp('discover'); - await header.waitUntilLoadingHasFinished(); - for (const columnName of TEST_COLUMN_NAMES) { - await unifiedFieldList.clickFieldListItemAdd(columnName); - } - - for (const [columnName, value] of TEST_FILTER_COLUMN_NAMES) { - await unifiedFieldList.clickFieldListItem(columnName); - await unifiedFieldList.clickFieldListPlusFilter(columnName, value); - } - }); - after(async () => { - await kibanaServer.uiSettings.replace({}); - }); - - it('should open the context view with the same columns', async () => { - const columnNames = await docTable.getHeaderFields(); - expect(columnNames).to.eql(['@timestamp', ...TEST_COLUMN_NAMES]); - }); - - it('should open the context view with the selected document as anchor and allows selecting next anchor', async () => { - /** - * Helper function to get the first timestamp of the document table - * @param isAnchorRow - determins if just the anchor row of context should be selected - */ - const getTimestamp = async (isAnchorRow: boolean = false) => { - const contextFields = await docTable.getFields({ isAnchorRow }); - return contextFields[0][0]; - }; - // get the timestamp of the first row - - const firstDiscoverTimestamp = await getTimestamp(); - - // check the anchor timestamp in the context view - await retry.waitFor('selected document timestamp matches anchor timestamp ', async () => { - // navigate to the context view - await docTable.clickRowToggle({ rowIndex: 0 }); - const rowActions = await docTable.getRowActions({ rowIndex: 0 }); - await rowActions[0].click(); - await context.waitUntilContextLoadingHasFinished(); - const anchorTimestamp = await getTimestamp(true); - return anchorTimestamp === firstDiscoverTimestamp; - }); - - await retry.waitFor('next anchor timestamp matches previous anchor timestamp', async () => { - // get the timestamp of the first row - const firstContextTimestamp = await getTimestamp(false); - await docTable.clickRowToggle({ rowIndex: 0 }); - const rowActions = await docTable.getRowActions({ rowIndex: 0 }); - await rowActions[0].click(); - await context.waitUntilContextLoadingHasFinished(); - const anchorTimestamp = await getTimestamp(true); - return anchorTimestamp === firstContextTimestamp; - }); - }); - - it('should open the context view with the filters disabled', async () => { - let disabledFilterCounter = 0; - for (const [_, value, columnId] of TEST_FILTER_COLUMN_NAMES) { - if (await filterBar.hasFilter(columnId, value, false)) { - disabledFilterCounter++; - } - } - expect(disabledFilterCounter).to.be(TEST_FILTER_COLUMN_NAMES.length); - }); - - // bugfix: https://github.com/elastic/kibana/issues/92099 - it('should navigate to the first document and then back to discover', async () => { - await context.waitUntilContextLoadingHasFinished(); - - // navigate to the doc view - await docTable.clickRowToggle({ rowIndex: 0 }); - - // click the open action - await retry.try(async () => { - const rowActions = await docTable.getRowActions({ rowIndex: 0 }); - if (!rowActions.length) { - throw new Error('row actions empty, trying again'); - } - await rowActions[1].click(); - }); - - const hasDocHit = await testSubjects.exists('doc-hit'); - expect(hasDocHit).to.be(true); - - await testSubjects.click('~breadcrumb & ~first'); - await discover.waitForDiscoverAppOnScreen(); - await discover.waitForDocTableLoadingComplete(); - }); - - it('navigates to doc view from embeddable', async () => { - await common.navigateToApp('discover'); - await discover.saveSearch('my classic search'); - await header.waitUntilLoadingHasFinished(); - - await dashboard.navigateToApp(); - await dashboard.gotoDashboardLandingPage(); - await dashboard.clickNewDashboard(); - - await dashboardAddPanel.addSavedSearch('my classic search'); - await header.waitUntilLoadingHasFinished(); - - await docTable.clickRowToggle({ rowIndex: 0 }); - const rowActions = await docTable.getRowActions({ rowIndex: 0 }); - await rowActions[1].click(); - await common.sleep(250); - - // close popup - const alert = await browser.getAlert(); - await alert?.accept(); - if (await testSubjects.exists('confirmModalConfirmButton')) { - await testSubjects.click('confirmModalConfirmButton'); - } - - await retry.waitFor('navigate to doc view', async () => { - const currentUrl = await browser.getCurrentUrl(); - return currentUrl.includes('#/doc'); - }); - await retry.waitFor('doc view being rendered', async () => { - return await discover.isShowingDocViewer(); - }); - }); - }); -} diff --git a/test/functional/apps/context/classic/_filters.ts b/test/functional/apps/context/classic/_filters.ts deleted file mode 100644 index fd2ce16982f31..0000000000000 --- a/test/functional/apps/context/classic/_filters.ts +++ /dev/null @@ -1,69 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { FtrProviderContext } from '../../../ftr_provider_context'; - -const TEST_INDEX_PATTERN = 'logstash-*'; -const TEST_ANCHOR_ID = 'AU_x3_BrGFA8no6QjjaI'; -const TEST_ANCHOR_FILTER_FIELD = 'geo.src'; -const TEST_ANCHOR_FILTER_VALUE = 'IN'; -const TEST_COLUMN_NAMES = ['extension', 'geo.src']; - -export default function ({ getService, getPageObjects }: FtrProviderContext) { - const docTable = getService('docTable'); - const filterBar = getService('filterBar'); - const retry = getService('retry'); - const kibanaServer = getService('kibanaServer'); - - const PageObjects = getPageObjects(['common', 'context']); - - describe('context filters', function contextSize() { - before(async function () { - await kibanaServer.uiSettings.update({ 'doc_table:legacy': true }); - }); - - after(async function () { - await kibanaServer.uiSettings.replace({}); - }); - - beforeEach(async function () { - await PageObjects.context.navigateTo(TEST_INDEX_PATTERN, TEST_ANCHOR_ID, { - columns: TEST_COLUMN_NAMES, - }); - }); - - it('inclusive filter should be addable via expanded doc table rows', async function () { - await retry.waitFor(`filter ${TEST_ANCHOR_FILTER_FIELD} in filterbar`, async () => { - await docTable.toggleRowExpanded({ isAnchorRow: true }); - const anchorDetailsRow = await docTable.getAnchorDetailsRow(); - await docTable.addInclusiveFilter(anchorDetailsRow, TEST_ANCHOR_FILTER_FIELD); - await PageObjects.context.waitUntilContextLoadingHasFinished(); - - return await filterBar.hasFilter(TEST_ANCHOR_FILTER_FIELD, TEST_ANCHOR_FILTER_VALUE, true); - }); - await retry.waitFor(`filter matching docs in docTable`, async () => { - const fields = await docTable.getFields(); - return fields - .map((row) => row[2]) - .every((fieldContent) => fieldContent === TEST_ANCHOR_FILTER_VALUE); - }); - }); - - it('filter for presence should be addable via expanded doc table rows', async function () { - await docTable.toggleRowExpanded({ isAnchorRow: true }); - - await retry.waitFor('an exists filter in the filterbar', async () => { - const anchorDetailsRow = await docTable.getAnchorDetailsRow(); - await docTable.addExistsFilter(anchorDetailsRow, TEST_ANCHOR_FILTER_FIELD); - await PageObjects.context.waitUntilContextLoadingHasFinished(); - return await filterBar.hasFilter(TEST_ANCHOR_FILTER_FIELD, 'exists', true); - }); - }); - }); -} diff --git a/test/functional/apps/context/index.ts b/test/functional/apps/context/index.ts index 2cfc8cf855a2d..5cccbf163a8fb 100644 --- a/test/functional/apps/context/index.ts +++ b/test/functional/apps/context/index.ts @@ -33,9 +33,7 @@ export default function ({ getService, getPageObjects, loadTestFile }: FtrProvid loadTestFile(require.resolve('./_context_accessibility')); loadTestFile(require.resolve('./_context_navigation')); loadTestFile(require.resolve('./_discover_navigation')); - loadTestFile(require.resolve('./classic/_discover_navigation')); loadTestFile(require.resolve('./_filters')); - loadTestFile(require.resolve('./classic/_filters')); loadTestFile(require.resolve('./_size')); loadTestFile(require.resolve('./_date_nanos')); loadTestFile(require.resolve('./_date_nanos_custom_timestamp')); diff --git a/test/functional/apps/dashboard/group1/embeddable_data_grid.ts b/test/functional/apps/dashboard/group1/embeddable_data_grid.ts index 07eb00d5817be..014d1dd15ed4f 100644 --- a/test/functional/apps/dashboard/group1/embeddable_data_grid.ts +++ b/test/functional/apps/dashboard/group1/embeddable_data_grid.ts @@ -30,7 +30,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ); await kibanaServer.uiSettings.replace({ defaultIndex: '0bf35f60-3dc9-11e8-8660-4d65aa086b3c', - 'doc_table:legacy': false, }); await dashboard.navigateToApp(); await filterBar.ensureFieldEditorModalIsClosed(); diff --git a/test/functional/apps/dashboard/group2/dashboard_filter_bar.ts b/test/functional/apps/dashboard/group2/dashboard_filter_bar.ts index e1935a0839966..c80ee8e844cfa 100644 --- a/test/functional/apps/dashboard/group2/dashboard_filter_bar.ts +++ b/test/functional/apps/dashboard/group2/dashboard_filter_bar.ts @@ -23,12 +23,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const browser = getService('browser'); const queryBar = getService('queryBar'); const security = getService('security'); - const { dashboard, discover, header, timePicker } = getPageObjects([ - 'dashboard', - 'discover', - 'header', - 'timePicker', - ]); + const { dashboard, header, timePicker } = getPageObjects(['dashboard', 'header', 'timePicker']); describe('dashboard filter bar', () => { before(async () => { @@ -201,12 +196,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('are added when a cell magnifying glass is clicked', async function () { await dashboardAddPanel.addSavedSearch('Rendering-Test:-saved-search'); await dashboard.waitForRenderComplete(); - const isLegacyDefault = await discover.useLegacyTable(); - if (isLegacyDefault) { - await testSubjects.click('docTableCellFilter'); - } else { - await dataGrid.clickCellFilterForButtonExcludingControlColumns(1, 1); - } + await dataGrid.clickCellFilterForButtonExcludingControlColumns(1, 1); const filterCount = await filterBar.getFilterCount(); expect(filterCount).to.equal(1); }); diff --git a/test/functional/apps/dashboard/group3/dashboard_time_picker.ts b/test/functional/apps/dashboard/group3/dashboard_time_picker.ts index 2e5d4217909f0..a1fb468a9dd28 100644 --- a/test/functional/apps/dashboard/group3/dashboard_time_picker.ts +++ b/test/functional/apps/dashboard/group3/dashboard_time_picker.ts @@ -13,16 +13,10 @@ import { PIE_CHART_VIS_NAME } from '../../../page_objects/dashboard_page'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const dashboardExpect = getService('dashboardExpect'); const pieChart = getService('pieChart'); const elasticChart = getService('elasticChart'); const dashboardVisualizations = getService('dashboardVisualizations'); - const { dashboard, header, timePicker, discover } = getPageObjects([ - 'dashboard', - 'header', - 'timePicker', - 'discover', - ]); + const { dashboard, header, timePicker } = getPageObjects(['dashboard', 'header', 'timePicker']); const browser = getService('browser'); const log = getService('log'); const kibanaServer = getService('kibanaServer'); @@ -59,28 +53,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { fields: ['bytes', 'agent'], }); - const isLegacyDefault = await discover.useLegacyTable(); - if (isLegacyDefault) { - await dashboardExpect.docTableFieldCount(150); + const docCount = await dataGrid.getDocCount(); + expect(docCount).to.above(10); - // Set to time range with no data - await timePicker.setAbsoluteRange( - 'Jan 1, 2000 @ 00:00:00.000', - 'Jan 1, 2000 @ 01:00:00.000' - ); - await dashboardExpect.docTableFieldCount(0); - } else { - const docCount = await dataGrid.getDocCount(); - expect(docCount).to.above(10); - - // Set to time range with no data - await timePicker.setAbsoluteRange( - 'Jan 1, 2000 @ 00:00:00.000', - 'Jan 1, 2000 @ 01:00:00.000' - ); - const noResults = await dataGrid.hasNoResults(); - expect(noResults).to.be.ok(); - } + // Set to time range with no data + await timePicker.setAbsoluteRange('Jan 1, 2000 @ 00:00:00.000', 'Jan 1, 2000 @ 01:00:00.000'); + const noResults = await dataGrid.hasNoResults(); + expect(noResults).to.be.ok(); }); it('Timepicker start, end, interval values are set by url', async () => { diff --git a/test/functional/apps/discover/classic/_classic_table_doc_navigation.ts b/test/functional/apps/discover/classic/_classic_table_doc_navigation.ts deleted file mode 100644 index c56ecc020f2bf..0000000000000 --- a/test/functional/apps/discover/classic/_classic_table_doc_navigation.ts +++ /dev/null @@ -1,75 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import expect from '@kbn/expect'; - -import { FtrProviderContext } from '../ftr_provider_context'; - -export default function ({ getService, getPageObjects }: FtrProviderContext) { - const docTable = getService('docTable'); - const filterBar = getService('filterBar'); - const testSubjects = getService('testSubjects'); - const { common, discover, timePicker } = getPageObjects(['common', 'discover', 'timePicker']); - const esArchiver = getService('esArchiver'); - const retry = getService('retry'); - const kibanaServer = getService('kibanaServer'); - - describe('classic table doc link', function contextSize() { - before(async () => { - await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); - await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - await kibanaServer.uiSettings.update({ - defaultIndex: 'logstash-*', - 'doc_table:legacy': true, - 'discover:searchFieldsFromSource': true, - }); - }); - after(async () => { - await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover'); - await kibanaServer.uiSettings.replace({}); - }); - - beforeEach(async function () { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - await common.navigateToApp('discover'); - await discover.waitForDocTableLoadingComplete(); - }); - - it('should open the doc view of the selected document', async function () { - // navigate to the doc view - await docTable.clickRowToggle({ rowIndex: 0 }); - - // click the open action - await retry.try(async () => { - const rowActions = await docTable.getRowActions({ rowIndex: 0 }); - if (!rowActions.length) { - throw new Error('row actions empty, trying again'); - } - await rowActions[1].click(); - }); - - await retry.waitFor('hit loaded', async () => { - const hasDocHit = await testSubjects.exists('doc-hit'); - return !!hasDocHit; - }); - }); - - it('should create an exists filter from the doc view of the selected document', async function () { - await discover.waitUntilSearchingHasFinished(); - - await docTable.toggleRowExpanded(); - const detailsRow = await docTable.getDetailsRow(); - await docTable.addExistsFilter(detailsRow, '@timestamp'); - - const hasExistsFilter = await filterBar.hasFilter('@timestamp', 'exists', true, false, false); - expect(hasExistsFilter).to.be(true); - }); - }); -} diff --git a/test/functional/apps/discover/classic/_discover_fields_api.ts b/test/functional/apps/discover/classic/_discover_fields_api.ts deleted file mode 100644 index e0fe867a25c8b..0000000000000 --- a/test/functional/apps/discover/classic/_discover_fields_api.ts +++ /dev/null @@ -1,98 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import expect from '@kbn/expect'; -import { FtrProviderContext } from '../ftr_provider_context'; - -export default function ({ getService, getPageObjects }: FtrProviderContext) { - const log = getService('log'); - const retry = getService('retry'); - const esArchiver = getService('esArchiver'); - const kibanaServer = getService('kibanaServer'); - const { common, discover, timePicker, settings, unifiedFieldList } = getPageObjects([ - 'common', - 'discover', - 'timePicker', - 'settings', - 'unifiedFieldList', - ]); - const defaultSettings = { - defaultIndex: 'logstash-*', - 'discover:searchFieldsFromSource': false, - 'doc_table:legacy': true, - }; - describe('discover uses fields API test', function describeIndexTests() { - before(async function () { - log.debug('load kibana index with default index pattern'); - await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); - await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); - await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); - await kibanaServer.uiSettings.replace(defaultSettings); - await common.navigateToApp('discover'); - await timePicker.setDefaultAbsoluteRange(); - }); - - after(async () => { - await kibanaServer.uiSettings.replace({}); - }); - - it('should correctly display documents', async function () { - log.debug('check if Document title exists in the grid'); - expect(await discover.getDocHeader()).to.have.string('Document'); - const rowData = await discover.getDocTableIndex(1); - log.debug('check the newest doc timestamp in UTC (check diff timezone in last test)'); - expect(rowData.startsWith('Sep 22, 2015 @ 23:50:13.253')).to.be.ok(); - const expectedHitCount = '14,004'; - await retry.try(async function () { - expect(await discover.getHitCount()).to.be(expectedHitCount); - }); - }); - - it('adding a column removes a default column', async function () { - await unifiedFieldList.clickFieldListItemAdd('_score'); - expect(await discover.getDocHeader()).to.have.string('_score'); - expect(await discover.getDocHeader()).not.to.have.string('Document'); - }); - - it('removing a column adds a default column', async function () { - await unifiedFieldList.clickFieldListItemRemove('_score'); - expect(await discover.getDocHeader()).not.to.have.string('_score'); - expect(await discover.getDocHeader()).to.have.string('Document'); - }); - - it('displays _source viewer in doc viewer', async function () { - await discover.clickDocTableRowToggle(0); - await discover.isShowingDocViewer(); - await discover.clickDocViewerTab('doc_view_source'); - await discover.expectSourceViewerToExist(); - }); - - it('switches to _source column when fields API is no longer used', async function () { - await settings.navigateTo(); - await settings.clickKibanaSettings(); - await settings.toggleAdvancedSettingCheckbox('discover:searchFieldsFromSource'); - - await common.navigateToApp('discover'); - await timePicker.setDefaultAbsoluteRange(); - - expect(await discover.getDocHeader()).to.have.string('_source'); - }); - - it('switches to Document column when fields API is used', async function () { - await settings.navigateTo(); - await settings.clickKibanaSettings(); - await settings.toggleAdvancedSettingCheckbox('discover:searchFieldsFromSource'); - - await common.navigateToApp('discover'); - await timePicker.setDefaultAbsoluteRange(); - - expect(await discover.getDocHeader()).to.have.string('Document'); - }); - }); -} diff --git a/test/functional/apps/discover/classic/_doc_table.ts b/test/functional/apps/discover/classic/_doc_table.ts deleted file mode 100644 index 5c765a6b2ef21..0000000000000 --- a/test/functional/apps/discover/classic/_doc_table.ts +++ /dev/null @@ -1,309 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import expect from '@kbn/expect'; -import { FtrProviderContext } from '../ftr_provider_context'; - -export default function ({ getService, getPageObjects }: FtrProviderContext) { - const browser = getService('browser'); - const log = getService('log'); - const retry = getService('retry'); - const esArchiver = getService('esArchiver'); - const kibanaServer = getService('kibanaServer'); - const docTable = getService('docTable'); - const queryBar = getService('queryBar'); - const find = getService('find'); - const { common, discover, header, timePicker, unifiedFieldList } = getPageObjects([ - 'common', - 'discover', - 'header', - 'timePicker', - 'unifiedFieldList', - ]); - const defaultSettings = { - defaultIndex: 'logstash-*', - hideAnnouncements: true, - 'doc_table:legacy': true, - }; - const testSubjects = getService('testSubjects'); - - describe('discover doc table', function describeIndexTests() { - const rowsHardLimit = 500; - - before(async function () { - log.debug('load kibana index with default index pattern'); - await kibanaServer.savedObjects.cleanStandardList(); - await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); - - // and load a set of makelogs data - await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); - await kibanaServer.uiSettings.replace(defaultSettings); - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - log.debug('discover doc table'); - await common.navigateToApp('discover'); - }); - - after(async function () { - await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover.json'); - await kibanaServer.savedObjects.cleanStandardList(); - await kibanaServer.uiSettings.replace({}); - }); - - it('should show records by default', async function () { - // with the default range the number of hits is ~14000 - const rows = await discover.getDocTableRows(); - expect(rows.length).to.be.greaterThan(0); - }); - - it('should refresh the table content when changing time window', async function () { - const initialRows = await discover.getDocTableRows(); - - const fromTime = 'Sep 20, 2015 @ 23:00:00.000'; - const toTime = 'Sep 20, 2015 @ 23:14:00.000'; - - await timePicker.setAbsoluteRange(fromTime, toTime); - await discover.waitUntilSearchingHasFinished(); - - const finalRows = await discover.getDocTableRows(); - expect(finalRows.length).to.be.below(initialRows.length); - await timePicker.setDefaultAbsoluteRange(); - }); - - describe('classic table in window 900x700', function () { - before(async () => { - await browser.setWindowSize(900, 700); - await common.navigateToApp('discover'); - await discover.waitUntilSearchingHasFinished(); - }); - - it('should load more rows when scrolling down the document table', async function () { - const initialRows = await testSubjects.findAll('docTableRow'); - await testSubjects.scrollIntoView('discoverBackToTop'); - // now count the rows - await retry.waitFor('next batch of documents to be displayed', async () => { - const actual = await testSubjects.findAll('docTableRow'); - log.debug(`initial doc nr: ${initialRows.length}, actual doc nr: ${actual.length}`); - return actual.length > initialRows.length; - }); - }); - }); - - describe('classic table in window 600x700', function () { - before(async () => { - await browser.setWindowSize(600, 700); - await common.navigateToApp('discover'); - await discover.waitUntilSearchingHasFinished(); - }); - - it('should load more rows when scrolling down the document table', async function () { - const initialRows = await testSubjects.findAll('docTableRow'); - await testSubjects.scrollIntoView('discoverBackToTop'); - // now count the rows - await retry.waitFor('next batch of documents to be displayed', async () => { - const actual = await testSubjects.findAll('docTableRow'); - log.debug(`initial doc nr: ${initialRows.length}, actual doc nr: ${actual.length}`); - return actual.length > initialRows.length; - }); - }); - }); - - describe('legacy', function () { - before(async () => { - await common.navigateToApp('discover'); - await discover.waitUntilSearchingHasFinished(); - }); - after(async () => { - await kibanaServer.uiSettings.replace({}); - }); - it(`should load up to ${rowsHardLimit} rows when scrolling at the end of the table`, async function () { - const initialRows = await testSubjects.findAll('docTableRow'); - // click the Skip to the end of the table - await discover.skipToEndOfDocTable(); - // now count the rows - const finalRows = await testSubjects.findAll('docTableRow'); - expect(finalRows.length).to.be.above(initialRows.length); - expect(finalRows.length).to.be(rowsHardLimit); - await discover.backToTop(); - }); - - it('should go the end and back to top of the classic table when using the accessible buttons', async function () { - // click the Skip to the end of the table - await discover.skipToEndOfDocTable(); - // now check the footer text content - const footer = await discover.getDocTableFooter(); - expect(await footer.getVisibleText()).to.have.string(rowsHardLimit); - await discover.backToTop(); - // check that the skip to end of the table button now has focus - const skipButton = await testSubjects.find('discoverSkipTableButton'); - const activeElement = await find.activeElement(); - const activeElementText = await activeElement.getVisibleText(); - const skipButtonText = await skipButton.getVisibleText(); - expect(skipButtonText === activeElementText).to.be(true); - }); - - describe('expand a document row', function () { - const rowToInspect = 1; - beforeEach(async function () { - // close the toggle if open - const details = await docTable.getDetailsRows(); - if (details.length) { - await docTable.clickRowToggle({ isAnchorRow: false, rowIndex: rowToInspect - 1 }); - } - }); - - it('should expand the detail row when the toggle arrow is clicked', async function () { - await retry.try(async function () { - await docTable.clickRowToggle({ isAnchorRow: false, rowIndex: rowToInspect - 1 }); - const detailsEl = await docTable.getDetailsRows(); - const defaultMessageEl = await detailsEl[0].findByTestSubject( - 'docViewerRowDetailsTitle' - ); - expect(defaultMessageEl).to.be.ok(); - }); - }); - - it('should show the detail panel actions', async function () { - await retry.try(async function () { - await docTable.clickRowToggle({ isAnchorRow: false, rowIndex: rowToInspect - 1 }); - // const detailsEl = await discover.getDocTableRowDetails(rowToInspect); - const [surroundingActionEl, singleActionEl] = await docTable.getRowActions({ - isAnchorRow: false, - rowIndex: rowToInspect - 1, - }); - expect(surroundingActionEl).to.be.ok(); - expect(singleActionEl).to.be.ok(); - // TODO: test something more meaninful here? - }); - }); - - it('should not close the detail panel actions when data is re-requested', async function () { - await retry.try(async function () { - const nrOfFetches = await discover.getNrOfFetches(); - await docTable.clickRowToggle({ isAnchorRow: false, rowIndex: rowToInspect - 1 }); - const detailsEl = await docTable.getDetailsRows(); - const defaultMessageEl = await detailsEl[0].findByTestSubject( - 'docViewerRowDetailsTitle' - ); - expect(defaultMessageEl).to.be.ok(); - await queryBar.submitQuery(); - const nrOfFetchesResubmit = await discover.getNrOfFetches(); - expect(nrOfFetchesResubmit).to.be.above(nrOfFetches); - const defaultMessageElResubmit = await detailsEl[0].findByTestSubject( - 'docViewerRowDetailsTitle' - ); - - expect(defaultMessageElResubmit).to.be.ok(); - }); - }); - - it('should show allow toggling columns from the expanded document', async function () { - await discover.clickNewSearchButton(); - await retry.try(async function () { - await docTable.clickRowToggle({ isAnchorRow: false, rowIndex: rowToInspect - 1 }); - - // add columns - const fields = ['_id', '_index', 'agent']; - for (const field of fields) { - await testSubjects.click(`toggleColumnButton-${field}`); - await testSubjects.click(`tableDocViewRow-${field}`); // to suppress the appeared tooltip - } - - const headerWithFields = await docTable.getHeaderFields(); - expect(headerWithFields.join(' ')).to.contain(fields.join(' ')); - - // remove columns - for (const field of fields) { - await testSubjects.click(`toggleColumnButton-${field}`); - await testSubjects.click(`tableDocViewRow-${field}`); - } - - const headerWithoutFields = await docTable.getHeaderFields(); - expect(headerWithoutFields.join(' ')).not.to.contain(fields.join(' ')); - }); - }); - }); - - describe('add and remove columns', function () { - const extraColumns = ['phpmemory', 'ip']; - const expectedFieldLength: Record = { - phpmemory: 1, - ip: 4, - }; - afterEach(async function () { - for (const column of extraColumns) { - await unifiedFieldList.clickFieldListItemRemove(column); - await header.waitUntilLoadingHasFinished(); - } - }); - - it('should add more columns to the table', async function () { - for (const column of extraColumns) { - await unifiedFieldList.clearFieldSearchInput(); - await unifiedFieldList.findFieldByName(column); - await unifiedFieldList.waitUntilFieldlistHasCountOfFields(expectedFieldLength[column]); - await retry.waitFor('field to appear', async function () { - return await testSubjects.exists(`field-${column}`); - }); - await unifiedFieldList.clickFieldListItemAdd(column); - await header.waitUntilLoadingHasFinished(); - // test the header now - const docHeader = await find.byCssSelector('thead > tr:nth-child(1)'); - const docHeaderText = await docHeader.getVisibleText(); - expect(docHeaderText).to.have.string(column); - } - }); - - it('should remove columns from the table', async function () { - for (const column of extraColumns) { - await unifiedFieldList.clearFieldSearchInput(); - await unifiedFieldList.findFieldByName(column); - await unifiedFieldList.waitUntilFieldlistHasCountOfFields(expectedFieldLength[column]); - await unifiedFieldList.clickFieldListItemAdd(column); - await header.waitUntilLoadingHasFinished(); - } - // remove the second column - await unifiedFieldList.clickFieldListItemRemove(extraColumns[1]); - await header.waitUntilLoadingHasFinished(); - // test that the second column is no longer there - const docHeader = await find.byCssSelector('thead > tr:nth-child(1)'); - expect(await docHeader.getVisibleText()).to.not.have.string(extraColumns[1]); - }); - }); - - it('should make the document table scrollable', async function () { - await unifiedFieldList.clearFieldSearchInput(); - const dscTableWrapper = await find.byCssSelector('.kbnDocTableWrapper'); - const fieldNames = await unifiedFieldList.getAllFieldNames(); - const clientHeight = await dscTableWrapper.getAttribute('clientHeight'); - let fieldCounter = 0; - const checkScrollable = async () => { - const scrollWidth = await dscTableWrapper.getAttribute('scrollWidth'); - const clientWidth = await dscTableWrapper.getAttribute('clientWidth'); - log.debug(`scrollWidth: ${scrollWidth}, clientWidth: ${clientWidth}`); - return Number(scrollWidth) > Number(clientWidth); - }; - const addColumn = async () => { - await unifiedFieldList.clickFieldListItemAdd(fieldNames[fieldCounter++]); - }; - - await addColumn(); - const isScrollable = await checkScrollable(); - expect(isScrollable).to.be(false); - - await retry.waitForWithTimeout('container to be scrollable', 60 * 1000, async () => { - await addColumn(); - return await checkScrollable(); - }); - // so now we need to check if the horizontal scrollbar is displayed - const newClientHeight = await dscTableWrapper.getAttribute('clientHeight'); - expect(Number(clientHeight)).to.be.above(Number(newClientHeight)); - }); - }); - }); -} diff --git a/test/functional/apps/discover/classic/_doc_table_newline.ts b/test/functional/apps/discover/classic/_doc_table_newline.ts deleted file mode 100644 index 3c2b426a2dbe4..0000000000000 --- a/test/functional/apps/discover/classic/_doc_table_newline.ts +++ /dev/null @@ -1,56 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { FtrProviderContext } from '../ftr_provider_context'; - -export default function ({ getService, getPageObjects }: FtrProviderContext) { - const esArchiver = getService('esArchiver'); - const kibanaServer = getService('kibanaServer'); - const { common, unifiedFieldList } = getPageObjects(['common', 'unifiedFieldList']); - const find = getService('find'); - const log = getService('log'); - const retry = getService('retry'); - const security = getService('security'); - - describe('discover doc table newline handling', function describeIndexTests() { - before(async function () { - await security.testUser.setRoles(['kibana_admin', 'kibana_message_with_newline']); - await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/message_with_newline'); - await kibanaServer.importExport.load( - 'test/functional/fixtures/kbn_archiver/message_with_newline.json' - ); - await kibanaServer.uiSettings.replace({ - defaultIndex: 'newline-test', - 'doc_table:legacy': true, - }); - await common.navigateToApp('discover'); - }); - - after(async () => { - await security.testUser.restoreDefaults(); - await esArchiver.unload('test/functional/fixtures/es_archiver/message_with_newline'); - await kibanaServer.savedObjects.cleanStandardList(); - await kibanaServer.uiSettings.replace({}); - }); - - it('should break text on newlines', async function () { - await unifiedFieldList.clickFieldListItemToggle('message'); - const dscTableRows = await find.allByCssSelector('.kbnDocTable__row'); - - await retry.waitFor('height of multi-line content > single-line content', async () => { - const heightWithoutNewline = await dscTableRows[0].getAttribute('clientHeight'); - const heightWithNewline = await dscTableRows[1].getAttribute('clientHeight'); - log.debug(`Without newlines: ${heightWithoutNewline}, With newlines: ${heightWithNewline}`); - - await common.sleep(10000); - return Number(heightWithNewline) > Number(heightWithoutNewline); - }); - }); - }); -} diff --git a/test/functional/apps/discover/classic/_esql_grid.ts b/test/functional/apps/discover/classic/_esql_grid.ts deleted file mode 100644 index 94dcabdba4efc..0000000000000 --- a/test/functional/apps/discover/classic/_esql_grid.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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { FtrProviderContext } from '../ftr_provider_context'; - -export default function ({ getService, getPageObjects }: FtrProviderContext) { - const esArchiver = getService('esArchiver'); - const kibanaServer = getService('kibanaServer'); - const testSubjects = getService('testSubjects'); - const security = getService('security'); - const dataGrid = getService('dataGrid'); - const dashboardAddPanel = getService('dashboardAddPanel'); - const dashboardPanelActions = getService('dashboardPanelActions'); - const { common, discover, dashboard, header, timePicker } = getPageObjects([ - 'common', - 'discover', - 'dashboard', - 'header', - 'timePicker', - ]); - - const defaultSettings = { - defaultIndex: 'logstash-*', - 'doc_table:legacy': true, - }; - - describe('discover esql grid with legacy setting', function () { - before(async () => { - await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader']); - await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); - await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); - await kibanaServer.uiSettings.replace(defaultSettings); - await common.navigateToApp('discover'); - await timePicker.setDefaultAbsoluteRange(); - }); - - after(async () => { - await kibanaServer.savedObjects.cleanStandardList(); - await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover'); - await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional'); - await kibanaServer.uiSettings.replace({}); - }); - - it('should render esql view correctly', async function () { - const savedSearchESQL = 'testESQLWithLegacySetting'; - await header.waitUntilLoadingHasFinished(); - await discover.waitUntilSearchingHasFinished(); - - await testSubjects.existOrFail('docTableHeader'); - await testSubjects.missingOrFail('euiDataGridBody'); - - await discover.selectTextBaseLang(); - - await header.waitUntilLoadingHasFinished(); - await discover.waitUntilSearchingHasFinished(); - - await testSubjects.missingOrFail('docTableHeader'); - await testSubjects.existOrFail('euiDataGridBody'); - - await dataGrid.clickRowToggle({ rowIndex: 0 }); - - await testSubjects.existOrFail('docViewerFlyout'); - - await discover.saveSearch(savedSearchESQL); - - await common.navigateToApp('dashboard'); - await dashboard.clickNewDashboard(); - await timePicker.setDefaultAbsoluteRange(); - await dashboardAddPanel.clickOpenAddPanel(); - await dashboardAddPanel.addSavedSearch(savedSearchESQL); - await header.waitUntilLoadingHasFinished(); - - await testSubjects.missingOrFail('docTableHeader'); - await testSubjects.existOrFail('euiDataGridBody'); - - await dataGrid.clickRowToggle({ rowIndex: 0 }); - - await testSubjects.existOrFail('docViewerFlyout'); - - await dashboardPanelActions.removePanelByTitle(savedSearchESQL); - - await dashboardAddPanel.addSavedSearch('A Saved Search'); - - await header.waitUntilLoadingHasFinished(); - await testSubjects.existOrFail('docTableHeader'); - await testSubjects.missingOrFail('euiDataGridBody'); - }); - }); -} diff --git a/test/functional/apps/discover/classic/_field_data.ts b/test/functional/apps/discover/classic/_field_data.ts deleted file mode 100644 index 2ebd49bb24ae2..0000000000000 --- a/test/functional/apps/discover/classic/_field_data.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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import expect from '@kbn/expect'; - -import { FtrProviderContext } from '../ftr_provider_context'; - -export default function ({ getService, getPageObjects }: FtrProviderContext) { - const retry = getService('retry'); - const esArchiver = getService('esArchiver'); - const kibanaServer = getService('kibanaServer'); - const { common, timePicker } = getPageObjects(['common', 'timePicker']); - const find = getService('find'); - const testSubjects = getService('testSubjects'); - - describe('discover tab', function describeIndexTests() { - this.tags('includeFirefox'); - before(async function () { - await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); - await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); - await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); - await kibanaServer.uiSettings.replace({ - defaultIndex: 'logstash-*', - 'discover:searchFieldsFromSource': true, - 'doc_table:legacy': true, - }); - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - await common.navigateToApp('discover'); - }); - - after(async function () { - await kibanaServer.uiSettings.replace({}); - }); - - it('doc view should show @timestamp and _source columns', async function () { - const expectedHeader = '@timestamp\n_source'; - const docHeader = await find.byCssSelector('thead > tr:nth-child(1)'); - const docHeaderText = await docHeader.getVisibleText(); - expect(docHeaderText).to.be(expectedHeader); - }); - - it('doc view should sort ascending', async function () { - const expectedTimeStamp = 'Sep 20, 2015 @ 00:00:00.000'; - await testSubjects.click('docTableHeaderFieldSort_@timestamp'); - - // we don't technically need this sleep here because the tryForTime will retry and the - // results will match on the 2nd or 3rd attempt, but that debug output is huge in this - // case and it can be avoided with just a few seconds sleep. - await common.sleep(2000); - await retry.try(async function tryingForTime() { - const row = await find.byCssSelector(`tr.kbnDocTable__row:nth-child(1)`); - const rowData = await row.getVisibleText(); - expect(rowData.startsWith(expectedTimeStamp)).to.be.ok(); - }); - }); - }); -} diff --git a/test/functional/apps/discover/classic/_field_data_with_fields_api.ts b/test/functional/apps/discover/classic/_field_data_with_fields_api.ts deleted file mode 100644 index 4932ba3e24348..0000000000000 --- a/test/functional/apps/discover/classic/_field_data_with_fields_api.ts +++ /dev/null @@ -1,56 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import expect from '@kbn/expect'; - -import { FtrProviderContext } from '../ftr_provider_context'; - -export default function ({ getService, getPageObjects }: FtrProviderContext) { - const retry = getService('retry'); - const kibanaServer = getService('kibanaServer'); - const { common, timePicker } = getPageObjects(['common', 'timePicker']); - const find = getService('find'); - const esArchiver = getService('esArchiver'); - const testSubjects = getService('testSubjects'); - - describe('discover tab with new fields API', function describeIndexTests() { - before(async function () { - await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); - await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); - await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); - await kibanaServer.uiSettings.replace({ - defaultIndex: 'logstash-*', - 'discover:searchFieldsFromSource': false, - 'doc_table:legacy': true, - }); - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - await common.navigateToApp('discover'); - }); - - after(async function () { - await kibanaServer.uiSettings.replace({}); - }); - - it('doc view should sort ascending', async function () { - const expectedTimeStamp = 'Sep 20, 2015 @ 00:00:00.000'; - await testSubjects.click('docTableHeaderFieldSort_@timestamp'); - - // we don't technically need this sleep here because the tryForTime will retry and the - // results will match on the 2nd or 3rd attempt, but that debug output is huge in this - // case and it can be avoided with just a few seconds sleep. - await common.sleep(2000); - await retry.try(async function tryingForTime() { - const row = await find.byCssSelector(`tr.kbnDocTable__row:nth-child(1)`); - const rowData = await row.getVisibleText(); - - expect(rowData.startsWith(expectedTimeStamp)).to.be.ok(); - }); - }); - }); -} diff --git a/test/functional/apps/discover/classic/_hide_announcements.ts b/test/functional/apps/discover/classic/_hide_announcements.ts deleted file mode 100644 index df7fcbb628136..0000000000000 --- a/test/functional/apps/discover/classic/_hide_announcements.ts +++ /dev/null @@ -1,49 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import expect from '@kbn/expect'; -import { FtrProviderContext } from '../ftr_provider_context'; - -export default function ({ getService, getPageObjects }: FtrProviderContext) { - const esArchiver = getService('esArchiver'); - const { common, discover, timePicker } = getPageObjects(['common', 'discover', 'timePicker']); - const kibanaServer = getService('kibanaServer'); - const testSubjects = getService('testSubjects'); - const browser = getService('browser'); - - describe('test hide announcements', function () { - before(async function () { - await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); - await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); - await kibanaServer.uiSettings.replace({ - defaultIndex: 'logstash-*', - 'doc_table:legacy': true, - }); - await common.navigateToApp('discover'); - await timePicker.setDefaultAbsoluteRange(); - }); - - after(async () => { - await kibanaServer.uiSettings.replace({}); - }); - - it('should display try document explorer button', async function () { - await discover.selectIndexPattern('logstash-*'); - const tourButtonExists = await testSubjects.exists('tryDocumentExplorerButton'); - expect(tourButtonExists).to.be(true); - }); - - it('should not display try document explorer button', async function () { - await kibanaServer.uiSettings.update({ hideAnnouncements: true }); - await browser.refresh(); - const tourButtonExists = await testSubjects.exists('tryDocumentExplorerButton'); - expect(tourButtonExists).to.be(false); - }); - }); -} diff --git a/test/functional/apps/discover/classic/index.ts b/test/functional/apps/discover/classic/index.ts deleted file mode 100644 index fce8963d19082..0000000000000 --- a/test/functional/apps/discover/classic/index.ts +++ /dev/null @@ -1,34 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { FtrProviderContext } from '../ftr_provider_context'; - -export default function ({ getService, loadTestFile }: FtrProviderContext) { - const esArchiver = getService('esArchiver'); - const browser = getService('browser'); - - describe('discover/classic', function () { - before(async function () { - await browser.setWindowSize(1300, 800); - }); - - after(async function unloadMakelogs() { - await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional'); - }); - - loadTestFile(require.resolve('./_discover_fields_api')); - loadTestFile(require.resolve('./_doc_table')); - loadTestFile(require.resolve('./_doc_table_newline')); - loadTestFile(require.resolve('./_field_data')); - loadTestFile(require.resolve('./_field_data_with_fields_api')); - loadTestFile(require.resolve('./_classic_table_doc_navigation')); - loadTestFile(require.resolve('./_hide_announcements')); - loadTestFile(require.resolve('./_esql_grid')); - }); -} diff --git a/test/functional/apps/discover/group1/_date_nanos_mixed.ts b/test/functional/apps/discover/group1/_date_nanos_mixed.ts index 7162d01bb96cc..a30c4a316351c 100644 --- a/test/functional/apps/discover/group1/_date_nanos_mixed.ts +++ b/test/functional/apps/discover/group1/_date_nanos_mixed.ts @@ -45,14 +45,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('shows a list of records of indices with date & date_nanos fields in the right order', async function () { - const isLegacy = await discover.useLegacyTable(); const rowData1 = await discover.getDocTableIndex(1); expect(rowData1).to.contain('Jan 1, 2019 @ 12:10:30.124000000'); - const rowData2 = await discover.getDocTableIndex(isLegacy ? 3 : 2); + const rowData2 = await discover.getDocTableIndex(2); expect(rowData2).to.contain('Jan 1, 2019 @ 12:10:30.123498765'); - const rowData3 = await discover.getDocTableIndex(isLegacy ? 5 : 3); + const rowData3 = await discover.getDocTableIndex(3); expect(rowData3).to.contain('Jan 1, 2019 @ 12:10:30.123456789'); - const rowData4 = await discover.getDocTableIndex(isLegacy ? 7 : 4); + const rowData4 = await discover.getDocTableIndex(4); expect(rowData4).to.contain('Jan 1, 2019 @ 12:10:30.123000000'); }); }); diff --git a/test/functional/apps/discover/group2_data_grid3/_data_grid_density.ts b/test/functional/apps/discover/group2_data_grid3/_data_grid_density.ts index b50cd7e16cf01..e801b40a80036 100644 --- a/test/functional/apps/discover/group2_data_grid3/_data_grid_density.ts +++ b/test/functional/apps/discover/group2_data_grid3/_data_grid_density.ts @@ -52,9 +52,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await dataGrid.changeDensityValue('Normal'); // toggle the popover - // Right now changing the density closes the popover (see packages/kbn-unified-data-table/src/components/data_table.tsx:1144) - // When that workaround is removed we will need to uncomment this next line - // await dataGrid.clickGridSettings(); + await dataGrid.clickGridSettings(); await dataGrid.clickGridSettings(); expect(await dataGrid.getCurrentDensityValue()).to.be('Normal'); }); @@ -62,7 +60,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should persist the density selection after reloading the page', async () => { await dataGrid.clickGridSettings(); await dataGrid.changeDensityValue('Expanded'); - await dataGrid.clickGridSettings(); expect(await dataGrid.getCurrentDensityValue()).to.be('Expanded'); await browser.refresh(); diff --git a/test/functional/apps/discover/group6/_sidebar.ts b/test/functional/apps/discover/group6/_sidebar.ts index a88623bb58d12..01adcb7a0a907 100644 --- a/test/functional/apps/discover/group6/_sidebar.ts +++ b/test/functional/apps/discover/group6/_sidebar.ts @@ -28,10 +28,27 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const filterBar = getService('filterBar'); const fieldEditor = getService('fieldEditor'); const dataViews = getService('dataViews'); + const queryBar = getService('queryBar'); const retry = getService('retry'); const dataGrid = getService('dataGrid'); + const log = getService('log'); const INITIAL_FIELD_LIST_SUMMARY = '48 available fields. 5 empty fields. 4 meta fields.'; + const expectFieldListDescription = async (expectedNumber: string) => { + return await retry.try(async () => { + await discover.waitUntilSearchingHasFinished(); + await unifiedFieldList.waitUntilSidebarHasLoaded(); + const ariaDescription = await unifiedFieldList.getSidebarAriaDescription(); + if (ariaDescription !== expectedNumber) { + log.warning( + `Expected Sidebar Aria Description: ${expectedNumber}, got: ${ariaDescription}` + ); + await queryBar.submitQuery(); + } + expect(ariaDescription).to.be(expectedNumber); + }); + }; + describe('discover sidebar', function describeIndexTests() { before(async function () { await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); @@ -65,35 +82,21 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await unifiedFieldList.waitUntilSidebarHasLoaded(); await unifiedFieldList.openSidebarFieldFilter(); - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await testSubjects.click('typeFilter-keyword'); - - await retry.waitFor('first updates', async () => { - return ( - (await unifiedFieldList.getSidebarAriaDescription()) === - '6 available fields. 1 empty field. 3 meta fields.' - ); - }); + // first update + await expectFieldListDescription('6 available fields. 1 empty field. 3 meta fields.'); await testSubjects.click('typeFilter-number'); - await retry.waitFor('second updates', async () => { - return ( - (await unifiedFieldList.getSidebarAriaDescription()) === - '10 available fields. 3 empty fields. 4 meta fields.' - ); - }); + // second update + await expectFieldListDescription('10 available fields. 3 empty fields. 4 meta fields.'); await testSubjects.click('fieldListFiltersFieldTypeFilterClearAll'); - await retry.waitFor('reset', async () => { - return ( - (await unifiedFieldList.getSidebarAriaDescription()) === INITIAL_FIELD_LIST_SUMMARY - ); - }); + // reset + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); }); it('should show filters by type in ES|QL view', async function () { @@ -114,18 +117,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { options = await find.allByCssSelector('[data-test-subj*="typeFilter"]'); expect(options).to.have.length(6); - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - '76 available fields. 6 empty fields.' - ); - + await expectFieldListDescription('76 available fields. 6 empty fields.'); await testSubjects.click('typeFilter-number'); - - await retry.waitFor('updates', async () => { - return ( - (await unifiedFieldList.getSidebarAriaDescription()) === - '4 available fields. 2 empty fields.' - ); - }); + await expectFieldListDescription('4 available fields. 2 empty fields.'); }); it('should show empty fields in ES|QL view', async function () { @@ -138,52 +132,29 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await header.waitUntilLoadingHasFinished(); await unifiedFieldList.waitUntilSidebarHasLoaded(); await unifiedFieldList.openSidebarFieldFilter(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - '2 selected fields. 1 available field. 1 empty field.' - ); + await expectFieldListDescription('2 selected fields. 1 available field. 1 empty field.'); }); }); describe('search', function () { beforeEach(async () => { - await header.waitUntilLoadingHasFinished(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); }); afterEach(async () => { const fieldSearch = await testSubjects.find('clearSearchButton'); await fieldSearch.click(); - await retry.waitFor('reset', async () => { - return ( - (await unifiedFieldList.getSidebarAriaDescription()) === INITIAL_FIELD_LIST_SUMMARY - ); - }); + // reset + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); }); it('should be able to search by string', async function () { await unifiedFieldList.findFieldByName('i'); - await retry.waitFor('first updates', async () => { - return ( - (await unifiedFieldList.getSidebarAriaDescription()) === - '28 available fields. 2 empty fields. 3 meta fields.' - ); - }); - + await expectFieldListDescription('28 available fields. 2 empty fields. 3 meta fields.'); await unifiedFieldList.findFieldByName('p'); - - await retry.waitFor('second updates', async () => { - return ( - (await unifiedFieldList.getSidebarAriaDescription()) === - '4 available fields. 0 meta fields.' - ); - }); + await expectFieldListDescription('4 available fields. 0 meta fields.'); expect((await unifiedFieldList.getSidebarSectionFieldNames('available')).join(', ')).to.be( 'clientip, ip, relatedContent.og:description, relatedContent.twitter:description' @@ -192,13 +163,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should be able to search by wildcard', async function () { await unifiedFieldList.findFieldByName('relatedContent*image'); - - await retry.waitFor('updates', async () => { - return ( - (await unifiedFieldList.getSidebarAriaDescription()) === - '2 available fields. 0 meta fields.' - ); - }); + await expectFieldListDescription('2 available fields. 0 meta fields.'); expect((await unifiedFieldList.getSidebarSectionFieldNames('available')).join(', ')).to.be( 'relatedContent.og:image, relatedContent.twitter:image' @@ -208,12 +173,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should be able to search with spaces as wildcard', async function () { await unifiedFieldList.findFieldByName('relatedContent image'); - await retry.waitFor('updates', async () => { - return ( - (await unifiedFieldList.getSidebarAriaDescription()) === - '4 available fields. 0 meta fields.' - ); - }); + await expectFieldListDescription('4 available fields. 0 meta fields.'); expect((await unifiedFieldList.getSidebarSectionFieldNames('available')).join(', ')).to.be( 'relatedContent.og:image, relatedContent.og:image:height, relatedContent.og:image:width, relatedContent.twitter:image' @@ -222,13 +182,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should be able to search with fuzzy search (1 typo)', async function () { await unifiedFieldList.findFieldByName('rel4tedContent.art'); - - await retry.waitFor('updates', async () => { - return ( - (await unifiedFieldList.getSidebarAriaDescription()) === - '4 available fields. 0 meta fields.' - ); - }); + await expectFieldListDescription('4 available fields. 0 meta fields.'); expect((await unifiedFieldList.getSidebarSectionFieldNames('available')).join(', ')).to.be( 'relatedContent.article:modified_time, relatedContent.article:published_time, relatedContent.article:section, relatedContent.article:tag' @@ -243,9 +197,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); // expect no changes in the list - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); }); }); @@ -345,10 +297,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect((await unifiedFieldList.getSidebarSectionFieldNames('meta')).join(', ')).to.be( '_id, _ignored, _index, _score' ); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); }); it('should show field list groups excluding subfields when searched from source', async function () { @@ -387,7 +336,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'relatedContent' ); - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( + await expectFieldListDescription( '48 available fields. 1 unmapped field. 5 empty fields. 4 meta fields.' ); }); @@ -406,7 +355,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(availableFields.includes('extension')).to.be(true); expect(availableFields.includes('@message')).to.be(true); - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( + await expectFieldListDescription( '2 selected fields. 2 popular fields. 48 available fields. 5 empty fields. 4 meta fields.' ); @@ -426,52 +375,35 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { '@message, _id, extension' ); - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( + await expectFieldListDescription( '3 selected fields. 3 popular fields. 48 available fields. 5 empty fields. 4 meta fields.' ); // verify popular fields were persisted await browser.refresh(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( + await expectFieldListDescription( '3 selected fields. 3 popular fields. 48 available fields. 5 empty fields. 4 meta fields.' ); }); it('should show selected and available fields in ES|QL mode', async function () { - await unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await discover.selectTextBaseLang(); await monacoEditor.setCodeEditorValue('from logstash-* | limit 10000'); await testSubjects.click('querySubmitButton'); - await header.waitUntilLoadingHasFinished(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - '76 available fields. 6 empty fields.' - ); + await expectFieldListDescription('76 available fields. 6 empty fields.'); await unifiedFieldList.clickFieldListItemRemove('extension'); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - '76 available fields. 6 empty fields.' - ); + await expectFieldListDescription('76 available fields. 6 empty fields.'); const testQuery = `from logstash-* | limit 10 | stats countB = count(bytes) by geo.dest | sort countB`; await monacoEditor.setCodeEditorValue(testQuery); await testSubjects.click('querySubmitButton'); - await header.waitUntilLoadingHasFinished(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - '2 selected fields. 2 available fields.' - ); + await expectFieldListDescription('2 selected fields. 2 available fields.'); expect((await unifiedFieldList.getSidebarSectionFieldNames('selected')).join(', ')).to.be( 'countB, geo.dest' ); @@ -480,12 +412,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await unifiedSearch.switchDataView('discover-dataView-switch-link', 'logstash-*'); - await header.waitUntilLoadingHasFinished(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - '48 available fields. 5 empty fields. 4 meta fields.' - ); + await expectFieldListDescription('48 available fields. 5 empty fields. 4 meta fields.'); }); it('should work correctly for a data view for a missing index', async function () { @@ -494,20 +421,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'test/functional/fixtures/kbn_archiver/index_pattern_without_timefield' ); await browser.refresh(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await dataViews.switchToAndValidate('with-timefield'); - await header.waitUntilLoadingHasFinished(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - '0 available fields. 0 meta fields.' - ); + await expectFieldListDescription('0 available fields. 0 meta fields.'); await testSubjects.missingOrFail( `${unifiedFieldList.getSidebarSectionSelector('available')}-fetchWarning` ); @@ -517,12 +435,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await dataViews.switchToAndValidate('logstash-*'); - await header.waitUntilLoadingHasFinished(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await kibanaServer.importExport.unload( 'test/functional/fixtures/kbn_archiver/index_pattern_without_timefield' ); @@ -537,41 +450,22 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ); await browser.refresh(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await dataViews.switchToAndValidate('without-timefield'); - await header.waitUntilLoadingHasFinished(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - '6 available fields. 4 meta fields.' - ); + await expectFieldListDescription('6 available fields. 4 meta fields.'); await dataViews.switchToAndValidate('with-timefield'); - await header.waitUntilLoadingHasFinished(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - '0 available fields. 7 empty fields. 4 meta fields.' - ); + await expectFieldListDescription('0 available fields. 7 empty fields. 4 meta fields.'); await testSubjects.existOrFail( `${unifiedFieldList.getSidebarSectionSelector('available')}NoFieldsCallout-noFieldsMatch` ); await dataViews.switchToAndValidate('logstash-*'); - await header.waitUntilLoadingHasFinished(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await kibanaServer.importExport.unload( 'test/functional/fixtures/kbn_archiver/index_pattern_without_timefield' @@ -583,11 +477,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should work when filters change', async () => { - await header.waitUntilLoadingHasFinished(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await unifiedFieldList.clickFieldListItem('extension'); expect(await testSubjects.getVisibleText('dscFieldStats-topValues')).to.be( @@ -595,12 +485,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ); await filterBar.addFilter({ field: 'extension', operation: 'is', value: 'jpg' }); - await header.waitUntilLoadingHasFinished(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); // check that the filter was passed down to the sidebar await unifiedFieldList.clickFieldListItem('extension'); @@ -614,29 +500,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ); await browser.refresh(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await dataViews.switchToAndValidate('indices-stats*'); - await header.waitUntilLoadingHasFinished(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - '6873 available fields. 4 meta fields.' - ); + await expectFieldListDescription('6873 available fields. 4 meta fields.'); await dataViews.switchToAndValidate('logstash-*'); - await header.waitUntilLoadingHasFinished(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await kibanaServer.importExport.unload( 'test/functional/fixtures/kbn_archiver/many_fields_data_view' @@ -650,12 +522,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { adHoc: true, hasTimeField: true, }); - await discover.waitUntilSearchingHasFinished(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await discover.addRuntimeField( '_bytes-runtimefield', @@ -666,12 +534,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { return !(await testSubjects.exists('fieldEditor')); }); - await header.waitUntilLoadingHasFinished(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - '49 available fields. 5 empty fields. 4 meta fields.' - ); + await expectFieldListDescription('49 available fields. 5 empty fields. 4 meta fields.'); let allFields = await unifiedFieldList.getAllFieldNames(); expect(allFields.includes('_bytes-runtimefield')).to.be(true); @@ -685,23 +548,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { return !(await testSubjects.exists('fieldEditor')); }); - await header.waitUntilLoadingHasFinished(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - '49 available fields. 5 empty fields. 4 meta fields.' - ); + await expectFieldListDescription('49 available fields. 5 empty fields. 4 meta fields.'); allFields = await unifiedFieldList.getAllFieldNames(); expect(allFields.includes('_bytes-runtimefield2')).to.be(true); expect(allFields.includes('_bytes-runtimefield')).to.be(false); await discover.removeField('_bytes-runtimefield'); - await header.waitUntilLoadingHasFinished(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); allFields = await unifiedFieldList.getAllFieldNames(); expect(allFields.includes('_bytes-runtimefield2')).to.be(false); @@ -709,11 +562,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should render even when retrieving documents failed with an error', async () => { - await header.waitUntilLoadingHasFinished(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await discover.addRuntimeField('_invalid-runtimefield', `emit(‘’);`); @@ -725,9 +574,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await unifiedFieldList.waitUntilSidebarHasLoaded(); // check that the sidebar is rendered - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - '49 available fields. 5 empty fields. 4 meta fields.' - ); + await expectFieldListDescription('49 available fields. 5 empty fields. 4 meta fields.'); let allFields = await unifiedFieldList.getAllFieldNames(); expect(allFields.includes('_invalid-runtimefield')).to.be(true); @@ -754,20 +601,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ); await browser.refresh(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await dataViews.switchToAndValidate('with-timefield'); - await header.waitUntilLoadingHasFinished(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - '0 available fields. 7 empty fields. 4 meta fields.' - ); + await expectFieldListDescription('0 available fields. 7 empty fields. 4 meta fields.'); await testSubjects.existOrFail( `${unifiedFieldList.getSidebarSectionSelector('available')}NoFieldsCallout-noFieldsMatch` ); @@ -777,12 +615,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'Sep 23, 2019 @ 00:00:00.000' ); - await header.waitUntilLoadingHasFinished(); - await unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await unifiedFieldList.getSidebarAriaDescription()).to.be( - '7 available fields. 4 meta fields.' - ); + await expectFieldListDescription('7 available fields. 4 meta fields.'); await kibanaServer.importExport.unload( 'test/functional/fixtures/kbn_archiver/index_pattern_without_timefield' diff --git a/test/functional/apps/discover/group6/_time_field_column.ts b/test/functional/apps/discover/group6/_time_field_column.ts index 5965b7765e182..9e5ce3f94a459 100644 --- a/test/functional/apps/discover/group6/_time_field_column.ts +++ b/test/functional/apps/discover/group6/_time_field_column.ts @@ -34,7 +34,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const dataViews = getService('dataViews'); const testSubjects = getService('testSubjects'); const security = getService('security'); - const docTable = getService('docTable'); const defaultSettings = { defaultIndex: 'logstash-*', hideAnnouncements: true, @@ -228,7 +227,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await timePicker.setDefaultAbsoluteRangeViaUiSettings(); await kibanaServer.uiSettings.update({ ...defaultSettings, - 'doc_table:legacy': false, 'doc_table:hideTimeColumn': hideTimeFieldColumnSetting, }); await common.navigateToApp('discover'); @@ -319,103 +317,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); }); }); - - // These tests are skipped as they take a lot of time to run. Temporary unskip them to validate current functionality if necessary. - describe.skip('legacy table', () => { - beforeEach(async () => { - await kibanaServer.uiSettings.update({ - ...defaultSettings, - 'doc_table:hideTimeColumn': hideTimeFieldColumnSetting, - 'doc_table:legacy': true, - }); - await common.navigateToApp('discover'); - await discover.waitUntilSearchingHasFinished(); - }); - - it('should render initial columns correctly', async () => { - // no columns - await discover.loadSavedSearch(`${SEARCH_NO_COLUMNS}${savedSearchSuffix}`); - await discover.waitUntilSearchingHasFinished(); - expect(await docTable.getHeaderFields()).to.eql( - hideTimeFieldColumnSetting ? ['Summary'] : ['@timestamp', 'Summary'] - ); - - await discover.loadSavedSearch(`${SEARCH_NO_COLUMNS}${savedSearchSuffix}-`); - await discover.waitUntilSearchingHasFinished(); - expect(await docTable.getHeaderFields()).to.eql(['Summary']); - - await discover.loadSavedSearch(`${SEARCH_NO_COLUMNS}${savedSearchSuffix}ESQL`); - await discover.waitUntilSearchingHasFinished(); - expect(await dataGrid.getHeaderFields()).to.eql( - hideTimeFieldColumnSetting ? ['Summary'] : ['@timestamp', 'Summary'] - ); - - await discover.loadSavedSearch(`${SEARCH_NO_COLUMNS}${savedSearchSuffix}ESQLdrop`); - await discover.waitUntilSearchingHasFinished(); - expect(await dataGrid.getHeaderFields()).to.eql(['Summary']); - - // only @timestamp is selected - await discover.loadSavedSearch(`${SEARCH_WITH_ONLY_TIMESTAMP}${savedSearchSuffix}`); - await discover.waitUntilSearchingHasFinished(); - expect(await docTable.getHeaderFields()).to.eql( - hideTimeFieldColumnSetting ? ['@timestamp'] : ['@timestamp', '@timestamp'] - ); - - await discover.loadSavedSearch(`${SEARCH_WITH_ONLY_TIMESTAMP}${savedSearchSuffix}-`); - await discover.waitUntilSearchingHasFinished(); - expect(await docTable.getHeaderFields()).to.eql(['@timestamp']); - - await discover.loadSavedSearch(`${SEARCH_WITH_ONLY_TIMESTAMP}${savedSearchSuffix}ESQL`); - await discover.waitUntilSearchingHasFinished(); - expect(await dataGrid.getHeaderFields()).to.eql( - hideTimeFieldColumnSetting ? ['@timestamp'] : ['@timestamp', 'Summary'] - ); - }); - - it('should render selected columns correctly', async () => { - // with selected columns - await discover.loadSavedSearch(`${SEARCH_WITH_SELECTED_COLUMNS}${savedSearchSuffix}`); - await discover.waitUntilSearchingHasFinished(); - expect(await docTable.getHeaderFields()).to.eql( - hideTimeFieldColumnSetting - ? ['bytes', 'extension'] - : ['@timestamp', 'bytes', 'extension'] - ); - - await discover.loadSavedSearch(`${SEARCH_WITH_SELECTED_COLUMNS}${savedSearchSuffix}-`); - await discover.waitUntilSearchingHasFinished(); - expect(await docTable.getHeaderFields()).to.eql(['bytes', 'extension']); - - await discover.loadSavedSearch( - `${SEARCH_WITH_SELECTED_COLUMNS}${savedSearchSuffix}ESQL` - ); - await discover.waitUntilSearchingHasFinished(); - expect(await dataGrid.getHeaderFields()).to.eql(['bytes', 'extension']); - - // with selected columns and @timestamp - await discover.loadSavedSearch( - `${SEARCH_WITH_SELECTED_COLUMNS_AND_TIMESTAMP}${savedSearchSuffix}` - ); - await discover.waitUntilSearchingHasFinished(); - expect(await docTable.getHeaderFields()).to.eql( - hideTimeFieldColumnSetting - ? ['bytes', 'extension', '@timestamp'] - : ['@timestamp', 'bytes', 'extension', '@timestamp'] - ); - - await discover.loadSavedSearch( - `${SEARCH_WITH_SELECTED_COLUMNS_AND_TIMESTAMP}${savedSearchSuffix}-` - ); - await discover.waitUntilSearchingHasFinished(); - expect(await docTable.getHeaderFields()).to.eql(['bytes', 'extension', '@timestamp']); - - await discover.loadSavedSearch( - `${SEARCH_WITH_SELECTED_COLUMNS_AND_TIMESTAMP}${savedSearchSuffix}ESQL` - ); - await discover.waitUntilSearchingHasFinished(); - expect(await dataGrid.getHeaderFields()).to.eql(['bytes', 'extension', '@timestamp']); - }); - }); }); }); }); diff --git a/test/functional/apps/discover/group6/_view_mode_toggle.ts b/test/functional/apps/discover/group6/_view_mode_toggle.ts index 2591716c87d00..4ff5339b80847 100644 --- a/test/functional/apps/discover/group6/_view_mode_toggle.ts +++ b/test/functional/apps/discover/group6/_view_mode_toggle.ts @@ -33,102 +33,75 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader']); await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); + await timePicker.setDefaultAbsoluteRangeViaUiSettings(); + await kibanaServer.uiSettings.update(defaultSettings); + await common.navigateToApp('discover'); + await discover.waitUntilSearchingHasFinished(); }); after(async () => { await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover'); await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional'); await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.uiSettings.replace({}); }); - [true, false].forEach((useLegacyTable) => { - describe(`isLegacy: ${useLegacyTable}`, function () { - before(async function () { - await timePicker.setDefaultAbsoluteRangeViaUiSettings(); - await kibanaServer.uiSettings.update({ - ...defaultSettings, - 'doc_table:legacy': useLegacyTable, - }); - await common.navigateToApp('discover'); - await discover.waitUntilSearchingHasFinished(); - }); - - after(async () => { - await kibanaServer.uiSettings.replace({}); - }); - - it('should show Documents tab', async () => { - await testSubjects.existOrFail('dscViewModeToggle'); - - if (!useLegacyTable) { - await testSubjects.existOrFail('unifiedDataTableToolbar'); - } - - const documentsTab = await testSubjects.find('dscViewModeDocumentButton'); - expect(await documentsTab.getAttribute('aria-selected')).to.be('true'); - }); - - it('should show legacy Document Explorer info callout', async () => { - if (useLegacyTable) { - await testSubjects.existOrFail('dscDocumentExplorerLegacyCallout'); - } else { - await testSubjects.missingOrFail('dscDocumentExplorerLegacyCallout'); - } - }); - - it('should show an error callout', async () => { - await queryBar.setQuery('@message::'); // invalid - await queryBar.submitQuery(); - await header.waitUntilLoadingHasFinished(); - - await discover.showsErrorCallout(); - - await queryBar.clearQuery(); - await queryBar.submitQuery(); - await header.waitUntilLoadingHasFinished(); - - await testSubjects.missingOrFail('discoverErrorCalloutTitle'); - }); - - describe('Patterns tab (basic license)', function () { - this.tags('skipFIPS'); - - it('should not show', async function () { - await testSubjects.missingOrFail('dscViewModePatternAnalysisButton'); - }); - }); - - it('should not show Field Statistics tab', async () => { - await testSubjects.existOrFail('dscViewModeToggle'); - }); - - it('should not show view mode toggle for ES|QL searches', async () => { - await testSubjects.click('dscViewModeDocumentButton'); - - await retry.try(async () => { - const documentsTab = await testSubjects.find('dscViewModeDocumentButton'); - expect(await documentsTab.getAttribute('aria-selected')).to.be('true'); - }); - - await testSubjects.existOrFail('dscViewModeToggle'); - - await discover.selectTextBaseLang(); - - await testSubjects.missingOrFail('dscViewModeToggle'); - await testSubjects.existOrFail('discoverQueryTotalHits'); - - if (!useLegacyTable) { - await testSubjects.existOrFail('unifiedDataTableToolbar'); - } - }); - - it('should show ES|QL columns callout', async () => { - await testSubjects.missingOrFail('dscSelectedColumnsCallout'); - await unifiedFieldList.clickFieldListItemAdd('extension'); - await header.waitUntilLoadingHasFinished(); - await testSubjects.existOrFail('dscSelectedColumnsCallout'); - }); + it('should show Documents tab', async () => { + await testSubjects.existOrFail('dscViewModeToggle'); + await testSubjects.existOrFail('unifiedDataTableToolbar'); + + const documentsTab = await testSubjects.find('dscViewModeDocumentButton'); + expect(await documentsTab.getAttribute('aria-selected')).to.be('true'); + }); + + it('should show an error callout', async () => { + await queryBar.setQuery('@message::'); // invalid + await queryBar.submitQuery(); + await header.waitUntilLoadingHasFinished(); + + await discover.showsErrorCallout(); + + await queryBar.clearQuery(); + await queryBar.submitQuery(); + await header.waitUntilLoadingHasFinished(); + + await testSubjects.missingOrFail('discoverErrorCalloutTitle'); + }); + + describe('Patterns tab (basic license)', function () { + this.tags('skipFIPS'); + + it('should not show', async function () { + await testSubjects.missingOrFail('dscViewModePatternAnalysisButton'); + }); + }); + + it('should not show Field Statistics tab', async () => { + await testSubjects.existOrFail('dscViewModeToggle'); + }); + + it('should not show view mode toggle for ES|QL searches', async () => { + await testSubjects.click('dscViewModeDocumentButton'); + + await retry.try(async () => { + const documentsTab = await testSubjects.find('dscViewModeDocumentButton'); + expect(await documentsTab.getAttribute('aria-selected')).to.be('true'); }); + + await testSubjects.existOrFail('dscViewModeToggle'); + + await discover.selectTextBaseLang(); + + await testSubjects.missingOrFail('dscViewModeToggle'); + await testSubjects.existOrFail('discoverQueryTotalHits'); + await testSubjects.existOrFail('unifiedDataTableToolbar'); + }); + + it('should show ES|QL columns callout', async () => { + await testSubjects.missingOrFail('dscSelectedColumnsCallout'); + await unifiedFieldList.clickFieldListItemAdd('extension'); + await header.waitUntilLoadingHasFinished(); + await testSubjects.existOrFail('dscSelectedColumnsCallout'); }); }); } diff --git a/test/functional/apps/discover/group7/_runtime_fields_editor.ts b/test/functional/apps/discover/group7/_runtime_fields_editor.ts index ab8711c362b77..e93e73650b464 100644 --- a/test/functional/apps/discover/group7/_runtime_fields_editor.ts +++ b/test/functional/apps/discover/group7/_runtime_fields_editor.ts @@ -234,17 +234,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { // navigate to doc view const fieldName = '_runtimefield-doc-view'; await createRuntimeField(fieldName); - const table = await discover.getDocTable(); - const useLegacyTable = await discover.useLegacyTable(); - await table.clickRowToggle(); + await dataGrid.clickRowToggle(); // click the open action await retry.try(async () => { - const rowActions = await table.getRowActions({ rowIndex: 0 }); + const rowActions = await dataGrid.getRowActions({ rowIndex: 0 }); if (!rowActions.length) { throw new Error('row actions empty, trying again'); } - const idxToClick = useLegacyTable ? 1 : 0; + const idxToClick = 0; await rowActions[idxToClick].click(); }); diff --git a/test/functional/apps/discover/group8/_hide_announcements.ts b/test/functional/apps/discover/group8/_hide_announcements.ts deleted file mode 100644 index 9dc11f9eefcac..0000000000000 --- a/test/functional/apps/discover/group8/_hide_announcements.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the "Elastic License - * 2.0", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import expect from '@kbn/expect'; -import { FtrProviderContext } from '../ftr_provider_context'; - -export default function ({ getService, getPageObjects }: FtrProviderContext) { - const esArchiver = getService('esArchiver'); - const { common, discover, timePicker } = getPageObjects(['common', 'discover', 'timePicker']); - const kibanaServer = getService('kibanaServer'); - const testSubjects = getService('testSubjects'); - const browser = getService('browser'); - const security = getService('security'); - - describe('test hide announcements', function () { - before(async function () { - await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader']); - await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); - await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); - await kibanaServer.uiSettings.replace({ - defaultIndex: 'logstash-*', - 'doc_table:legacy': true, - }); - await common.navigateToApp('discover'); - await timePicker.setDefaultAbsoluteRange(); - }); - - after(async () => { - await kibanaServer.uiSettings.replace({}); - }); - - it('should display callout', async function () { - await discover.selectIndexPattern('logstash-*'); - const calloutExists = await testSubjects.exists('dscDocumentExplorerLegacyCallout'); - expect(calloutExists).to.be(true); - }); - - it('should not display callout', async function () { - await kibanaServer.uiSettings.update({ hideAnnouncements: true }); - await browser.refresh(); - const calloutExists = await testSubjects.exists('dscDocumentExplorerLegacyCallout'); - expect(calloutExists).to.be(false); - }); - }); -} diff --git a/test/functional/apps/discover/group8/index.ts b/test/functional/apps/discover/group8/index.ts index 14b544e2c2015..46d5040fee298 100644 --- a/test/functional/apps/discover/group8/index.ts +++ b/test/functional/apps/discover/group8/index.ts @@ -23,7 +23,6 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { }); loadTestFile(require.resolve('./_default_route')); - loadTestFile(require.resolve('./_hide_announcements')); loadTestFile(require.resolve('./_flyouts')); }); } diff --git a/test/functional/apps/management/data_views/_scripted_fields.ts b/test/functional/apps/management/data_views/_scripted_fields.ts index f86ae72aa5047..df51514425a24 100644 --- a/test/functional/apps/management/data_views/_scripted_fields.ts +++ b/test/functional/apps/management/data_views/_scripted_fields.ts @@ -387,14 +387,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await testSubjects.click('docTableHeaderFieldSort_@timestamp'); await PageObjects.header.waitUntilLoadingHasFinished(); await retry.try(async function () { - const rowData = await PageObjects.discover.getDocTableIndexLegacy(1); + const rowData = await PageObjects.discover.getDocTableIndex(1); expect(rowData).to.be('updateExpectedResultHere\ntrue'); }); await testSubjects.click(`docTableHeaderFieldSort_${scriptedPainlessFieldName2}`); await PageObjects.header.waitUntilLoadingHasFinished(); await retry.try(async function () { - const rowData = await PageObjects.discover.getDocTableIndexLegacy(1); + const rowData = await PageObjects.discover.getDocTableIndex(1); expect(rowData).to.be('updateExpectedResultHere\nfalse'); }); }); @@ -469,14 +469,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await testSubjects.click('docTableHeaderFieldSort_@timestamp'); await PageObjects.header.waitUntilLoadingHasFinished(); await retry.try(async function () { - const rowData = await PageObjects.discover.getDocTableIndexLegacy(1); + const rowData = await PageObjects.discover.getDocTableIndex(1); expect(rowData).to.be('updateExpectedResultHere\n2015-09-18 07:00'); }); await testSubjects.click(`docTableHeaderFieldSort_${scriptedPainlessFieldName2}`); await PageObjects.header.waitUntilLoadingHasFinished(); await retry.try(async function () { - const rowData = await PageObjects.discover.getDocTableIndexLegacy(1); + const rowData = await PageObjects.discover.getDocTableIndex(1); expect(rowData).to.be('updateExpectedResultHere\n2015-09-18 07:00'); }); }); diff --git a/test/functional/apps/management/data_views/_scripted_fields_classic_table.ts b/test/functional/apps/management/data_views/_scripted_fields_classic_table.ts deleted file mode 100644 index 4f3d30222e496..0000000000000 --- a/test/functional/apps/management/data_views/_scripted_fields_classic_table.ts +++ /dev/null @@ -1,463 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -// Tests for 4 scripted fields; -// 1. Painless (number type) -// 2. Painless (string type) -// 3. Painless (boolean type) -// 4. Painless (date type) -// -// Each of these scripted fields has 4 tests (12 tests total); -// 1. Create scripted field -// 2. See the expected value of the scripted field in Discover doc view -// 3. Filter in Discover by the scripted field -// 4. Visualize with aggregation on the scripted field by clicking unifiedFieldList.clickFieldListItemVisualize - -import expect from '@kbn/expect'; -import { FtrProviderContext } from '../../../ftr_provider_context'; - -export default function ({ getService, getPageObjects }: FtrProviderContext) { - const kibanaServer = getService('kibanaServer'); - const log = getService('log'); - const browser = getService('browser'); - const retry = getService('retry'); - const testSubjects = getService('testSubjects'); - const filterBar = getService('filterBar'); - const docTable = getService('docTable'); - const PageObjects = getPageObjects([ - 'common', - 'header', - 'settings', - 'visualize', - 'discover', - 'timePicker', - 'unifiedFieldList', - ]); - - describe('scripted fields', function () { - this.tags(['skipFirefox']); - - before(async function () { - await browser.setWindowSize(1200, 800); - await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); - await kibanaServer.uiSettings.replace({}); - await kibanaServer.uiSettings.update({ - 'doc_table:legacy': true, - }); - }); - - after(async function afterAll() { - await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover'); - await kibanaServer.uiSettings.replace({}); - }); - - it('should not allow saving of invalid scripts', async function () { - await PageObjects.settings.navigateTo(); - await PageObjects.settings.clickKibanaIndexPatterns(); - await PageObjects.settings.clickIndexPatternLogstash(); - await PageObjects.settings.clickScriptedFieldsTab(); - await PageObjects.settings.clickAddScriptedField(); - await PageObjects.settings.setScriptedFieldName('doomedScriptedField'); - await PageObjects.settings.setScriptedFieldScript(`i n v a l i d s c r i p t`); - await PageObjects.settings.clickSaveScriptedField(); - await retry.try(async () => { - const invalidScriptErrorExists = await testSubjects.exists('invalidScriptError'); - expect(invalidScriptErrorExists).to.be(true); - }); - }); - - describe('testing regression for issue #33251', function describeIndexTests() { - const scriptedPainlessFieldName = 'ram_Pain_reg'; - - it('should create and edit scripted field', async function () { - await PageObjects.settings.navigateTo(); - await PageObjects.settings.clickKibanaIndexPatterns(); - await PageObjects.settings.clickIndexPatternLogstash(); - const startingCount = parseInt(await PageObjects.settings.getScriptedFieldsTabCount(), 10); - await PageObjects.settings.clickScriptedFieldsTab(); - await log.debug('add scripted field'); - const script = `1`; - await PageObjects.settings.addScriptedField( - scriptedPainlessFieldName, - 'painless', - 'number', - null, - '1', - script - ); - await retry.try(async function () { - expect(parseInt(await PageObjects.settings.getScriptedFieldsTabCount(), 10)).to.be( - startingCount + 1 - ); - }); - - for (let i = 0; i < 3; i++) { - await PageObjects.settings.editScriptedField(scriptedPainlessFieldName); - const fieldSaveButton = await testSubjects.exists('fieldSaveButton'); - expect(fieldSaveButton).to.be(true); - await PageObjects.settings.clickSaveScriptedField(); - } - }); - }); - - describe('creating and using Painless numeric scripted fields', function describeIndexTests() { - const scriptedPainlessFieldName = 'ram_Pain1'; - - it('should create scripted field', async function () { - await PageObjects.settings.navigateTo(); - await PageObjects.settings.clickKibanaIndexPatterns(); - await PageObjects.settings.clickIndexPatternLogstash(); - const startingCount = parseInt(await PageObjects.settings.getScriptedFieldsTabCount(), 10); - await PageObjects.settings.clickScriptedFieldsTab(); - await log.debug('add scripted field'); - const script = `if (doc['machine.ram'].size() == 0) return -1; - else return doc['machine.ram'].value / (1024 * 1024 * 1024); - `; - await PageObjects.settings.addScriptedField( - scriptedPainlessFieldName, - 'painless', - 'number', - null, - '100', - script - ); - await retry.try(async function () { - expect(parseInt(await PageObjects.settings.getScriptedFieldsTabCount(), 10)).to.be( - startingCount + 1 - ); - }); - }); - - it('should see scripted field value in Discover', async function () { - const fromTime = 'Sep 17, 2015 @ 06:31:44.000'; - const toTime = 'Sep 18, 2015 @ 18:31:44.000'; - await PageObjects.common.navigateToApp('discover'); - await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime); - - await retry.try(async function () { - await PageObjects.unifiedFieldList.clickFieldListItemAdd(scriptedPainlessFieldName); - }); - await PageObjects.header.waitUntilLoadingHasFinished(); - - await retry.try(async function () { - const rowData = await PageObjects.discover.getDocTableIndexLegacy(1); - expect(rowData).to.be('Sep 18, 2015 @ 18:20:57.916\n18'); - }); - }); - - // add a test to sort numeric scripted field - it('should sort scripted field value in Discover', async function () { - await testSubjects.click(`docTableHeaderFieldSort_${scriptedPainlessFieldName}`); - // after the first click on the scripted field, it becomes secondary sort after time. - // click on the timestamp twice to make it be the secondary sort key. - await testSubjects.click('docTableHeaderFieldSort_@timestamp'); - await testSubjects.click('docTableHeaderFieldSort_@timestamp'); - await PageObjects.header.waitUntilLoadingHasFinished(); - await retry.try(async function () { - const rowData = await PageObjects.discover.getDocTableIndexLegacy(1); - expect(rowData).to.be('Sep 17, 2015 @ 10:53:14.181\n-1'); - }); - - await testSubjects.click(`docTableHeaderFieldSort_${scriptedPainlessFieldName}`); - await PageObjects.header.waitUntilLoadingHasFinished(); - await retry.try(async function () { - const rowData = await PageObjects.discover.getDocTableIndexLegacy(1); - expect(rowData).to.be('Sep 17, 2015 @ 06:32:29.479\n20'); - }); - }); - - it('should filter by scripted field value in Discover', async function () { - await PageObjects.unifiedFieldList.clickFieldListItem(scriptedPainlessFieldName); - await log.debug('filter by the first value (14) in the expanded scripted field list'); - await PageObjects.unifiedFieldList.clickFieldListPlusFilter( - scriptedPainlessFieldName, - '14' - ); - await PageObjects.header.waitUntilLoadingHasFinished(); - - await retry.try(async function () { - expect(await PageObjects.discover.getHitCount()).to.be('31'); - }); - }); - - it('should visualize scripted field in vertical bar chart', async function () { - await filterBar.removeAllFilters(); - await PageObjects.unifiedFieldList.clickFieldListItemVisualize(scriptedPainlessFieldName); - await PageObjects.header.waitUntilLoadingHasFinished(); - // verify Lens opens a visualization - expect(await testSubjects.getVisibleTextAll('lns-dimensionTrigger')).to.contain( - '@timestamp', - 'Median of ram_Pain1' - ); - }); - }); - - describe('creating and using Painless string scripted fields', function describeIndexTests() { - const scriptedPainlessFieldName2 = 'painString'; - - it('should create scripted field', async function () { - await PageObjects.settings.navigateTo(); - await PageObjects.settings.clickKibanaIndexPatterns(); - await PageObjects.settings.clickIndexPatternLogstash(); - const startingCount = parseInt(await PageObjects.settings.getScriptedFieldsTabCount(), 10); - await PageObjects.settings.clickScriptedFieldsTab(); - await log.debug('add scripted field'); - await PageObjects.settings.addScriptedField( - scriptedPainlessFieldName2, - 'painless', - 'string', - null, - '1', - "if (doc['response.raw'].value == '200') { return 'good'} else { return 'bad'}" - ); - await retry.try(async function () { - expect(parseInt(await PageObjects.settings.getScriptedFieldsTabCount(), 10)).to.be( - startingCount + 1 - ); - }); - }); - - it('should see scripted field value in Discover', async function () { - const fromTime = 'Sep 17, 2015 @ 06:31:44.000'; - const toTime = 'Sep 18, 2015 @ 18:31:44.000'; - await PageObjects.common.navigateToApp('discover'); - await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime); - - await retry.try(async function () { - await PageObjects.unifiedFieldList.clickFieldListItemAdd(scriptedPainlessFieldName2); - }); - await PageObjects.header.waitUntilLoadingHasFinished(); - - await retry.try(async function () { - const rowData = await PageObjects.discover.getDocTableIndexLegacy(1); - expect(rowData).to.be('Sep 18, 2015 @ 18:20:57.916\ngood'); - }); - }); - - // add a test to sort string scripted field - it('should sort scripted field value in Discover', async function () { - await testSubjects.click(`docTableHeaderFieldSort_${scriptedPainlessFieldName2}`); - // after the first click on the scripted field, it becomes secondary sort after time. - // click on the timestamp twice to make it be the secondary sort key. - await testSubjects.click('docTableHeaderFieldSort_@timestamp'); - await testSubjects.click('docTableHeaderFieldSort_@timestamp'); - await PageObjects.header.waitUntilLoadingHasFinished(); - await retry.try(async function () { - const rowData = await PageObjects.discover.getDocTableIndexLegacy(1); - expect(rowData).to.be('Sep 17, 2015 @ 09:48:40.594\nbad'); - }); - - await testSubjects.click(`docTableHeaderFieldSort_${scriptedPainlessFieldName2}`); - await PageObjects.header.waitUntilLoadingHasFinished(); - await retry.try(async function () { - const rowData = await PageObjects.discover.getDocTableIndexLegacy(1); - expect(rowData).to.be('Sep 17, 2015 @ 06:32:29.479\ngood'); - }); - }); - - it('should filter by scripted field value in Discover', async function () { - await PageObjects.unifiedFieldList.clickFieldListItem(scriptedPainlessFieldName2); - await log.debug('filter by "bad" in the expanded scripted field list'); - await PageObjects.unifiedFieldList.clickFieldListPlusFilter( - scriptedPainlessFieldName2, - 'bad' - ); - await PageObjects.header.waitUntilLoadingHasFinished(); - - await retry.try(async function () { - expect(await PageObjects.discover.getHitCount()).to.be('27'); - }); - await filterBar.removeAllFilters(); - }); - - it('should visualize scripted field in vertical bar chart', async function () { - await PageObjects.unifiedFieldList.clickFieldListItemVisualize(scriptedPainlessFieldName2); - await PageObjects.header.waitUntilLoadingHasFinished(); - // verify Lens opens a visualization - expect(await testSubjects.getVisibleTextAll('lns-dimensionTrigger')).to.contain( - 'Top 5 values of painString' - ); - }); - }); - - describe('creating and using Painless boolean scripted fields', function describeIndexTests() { - const scriptedPainlessFieldName2 = 'painBool'; - - it('should create scripted field', async function () { - await PageObjects.settings.navigateTo(); - await PageObjects.settings.clickKibanaIndexPatterns(); - await PageObjects.settings.clickIndexPatternLogstash(); - const startingCount = parseInt(await PageObjects.settings.getScriptedFieldsTabCount(), 10); - await PageObjects.settings.clickScriptedFieldsTab(); - await log.debug('add scripted field'); - await PageObjects.settings.addScriptedField( - scriptedPainlessFieldName2, - 'painless', - 'boolean', - null, - '1', - "doc['response.raw'].value == '200'" - ); - await retry.try(async function () { - expect(parseInt(await PageObjects.settings.getScriptedFieldsTabCount(), 10)).to.be( - startingCount + 1 - ); - }); - }); - - it('should see scripted field value in Discover', async function () { - const fromTime = 'Sep 17, 2015 @ 06:31:44.000'; - const toTime = 'Sep 18, 2015 @ 18:31:44.000'; - await PageObjects.common.navigateToApp('discover'); - await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime); - - await retry.try(async function () { - await PageObjects.unifiedFieldList.clickFieldListItemAdd(scriptedPainlessFieldName2); - }); - await PageObjects.header.waitUntilLoadingHasFinished(); - - await retry.try(async function () { - const rowData = await PageObjects.discover.getDocTableIndexLegacy(1); - expect(rowData).to.be('Sep 18, 2015 @ 18:20:57.916\ntrue'); - }); - }); - - it('should filter by scripted field value in Discover', async function () { - await PageObjects.unifiedFieldList.clickFieldListItem(scriptedPainlessFieldName2); - await log.debug('filter by "true" in the expanded scripted field list'); - await PageObjects.unifiedFieldList.clickFieldListPlusFilter( - scriptedPainlessFieldName2, - 'true' - ); - await PageObjects.header.waitUntilLoadingHasFinished(); - - await retry.try(async function () { - expect(await PageObjects.discover.getHitCount()).to.be('359'); - }); - await filterBar.removeAllFilters(); - }); - - // add a test to sort boolean - // existing bug: https://github.com/elastic/kibana/issues/75519 hence the issue is skipped. - it.skip('should sort scripted field value in Discover', async function () { - await testSubjects.click(`docTableHeaderFieldSort_${scriptedPainlessFieldName2}`); - // after the first click on the scripted field, it becomes secondary sort after time. - // click on the timestamp twice to make it be the secondary sort key. - await testSubjects.click('docTableHeaderFieldSort_@timestamp'); - await testSubjects.click('docTableHeaderFieldSort_@timestamp'); - await PageObjects.header.waitUntilLoadingHasFinished(); - await retry.try(async function () { - const rowData = await PageObjects.discover.getDocTableIndexLegacy(1); - expect(rowData).to.be('updateExpectedResultHere\ntrue'); - }); - - await testSubjects.click(`docTableHeaderFieldSort_${scriptedPainlessFieldName2}`); - await PageObjects.header.waitUntilLoadingHasFinished(); - await retry.try(async function () { - const rowData = await PageObjects.discover.getDocTableIndexLegacy(1); - expect(rowData).to.be('updateExpectedResultHere\nfalse'); - }); - }); - - it('should visualize scripted field in vertical bar chart', async function () { - await PageObjects.unifiedFieldList.clickFieldListItemVisualize(scriptedPainlessFieldName2); - await PageObjects.header.waitUntilLoadingHasFinished(); - // verify Lens opens a visualization - expect(await testSubjects.getVisibleTextAll('lns-dimensionTrigger')).to.contain( - 'Top 5 values of painBool' - ); - }); - }); - - describe('creating and using Painless date scripted fields', function describeIndexTests() { - const scriptedPainlessFieldName2 = 'painDate'; - - it('should create scripted field', async function () { - await PageObjects.settings.navigateTo(); - await PageObjects.settings.clickKibanaIndexPatterns(); - await PageObjects.settings.clickIndexPatternLogstash(); - const startingCount = parseInt(await PageObjects.settings.getScriptedFieldsTabCount(), 10); - await PageObjects.settings.clickScriptedFieldsTab(); - await log.debug('add scripted field'); - await PageObjects.settings.addScriptedField( - scriptedPainlessFieldName2, - 'painless', - 'date', - { format: 'date', datePattern: 'YYYY-MM-DD HH:00' }, - '1', - "doc['utc_time'].value.toEpochMilli() + (1000) * 60 * 60" - ); - await retry.try(async function () { - expect(parseInt(await PageObjects.settings.getScriptedFieldsTabCount(), 10)).to.be( - startingCount + 1 - ); - }); - }); - - it('should see scripted field value in Discover', async function () { - const fromTime = 'Sep 17, 2015 @ 19:22:00.000'; - const toTime = 'Sep 18, 2015 @ 07:00:00.000'; - await PageObjects.common.navigateToApp('discover'); - await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime); - - await retry.try(async function () { - await PageObjects.unifiedFieldList.clickFieldListItemAdd(scriptedPainlessFieldName2); - }); - await PageObjects.header.waitUntilLoadingHasFinished(); - - await retry.try(async function () { - const rowData = await PageObjects.discover.getDocTableIndexLegacy(1); - expect(rowData).to.be('Sep 18, 2015 @ 06:52:55.953\n2015-09-18 07:00'); - }); - }); - - // add a test to sort date scripted field - // https://github.com/elastic/kibana/issues/75711 - it.skip('should sort scripted field value in Discover', async function () { - await testSubjects.click(`docTableHeaderFieldSort_${scriptedPainlessFieldName2}`); - // after the first click on the scripted field, it becomes secondary sort after time. - // click on the timestamp twice to make it be the secondary sort key. - await testSubjects.click('docTableHeaderFieldSort_@timestamp'); - await testSubjects.click('docTableHeaderFieldSort_@timestamp'); - await PageObjects.header.waitUntilLoadingHasFinished(); - await retry.try(async function () { - const rowData = await PageObjects.discover.getDocTableIndexLegacy(1); - expect(rowData).to.be('updateExpectedResultHere\n2015-09-18 07:00'); - }); - - await testSubjects.click(`docTableHeaderFieldSort_${scriptedPainlessFieldName2}`); - await PageObjects.header.waitUntilLoadingHasFinished(); - await retry.try(async function () { - const rowData = await PageObjects.discover.getDocTableIndexLegacy(1); - expect(rowData).to.be('updateExpectedResultHere\n2015-09-18 07:00'); - }); - }); - - it('should filter by scripted field value in Discover', async function () { - await PageObjects.header.waitUntilLoadingHasFinished(); - await docTable.toggleRowExpanded(); - const firstRow = await docTable.getDetailsRow(); - await docTable.addInclusiveFilter(firstRow, scriptedPainlessFieldName2); - await PageObjects.header.waitUntilLoadingHasFinished(); - - await retry.try(async function () { - expect(await PageObjects.discover.getHitCount()).to.be('1'); - }); - await filterBar.removeAllFilters(); - }); - - it('should visualize scripted field in vertical bar chart', async function () { - await PageObjects.unifiedFieldList.clickFieldListItemVisualize(scriptedPainlessFieldName2); - await PageObjects.header.waitUntilLoadingHasFinished(); - // verify Lens opens a visualization - expect(await testSubjects.getVisibleTextAll('lns-dimensionTrigger')).to.contain('painDate'); - }); - }); - }); -} diff --git a/test/functional/apps/management/index.ts b/test/functional/apps/management/index.ts index 2300543f06d51..962aa41bd8ba3 100644 --- a/test/functional/apps/management/index.ts +++ b/test/functional/apps/management/index.ts @@ -31,7 +31,6 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./_mgmt_import_saved_objects')); loadTestFile(require.resolve('./data_views/_index_patterns_empty')); loadTestFile(require.resolve('./data_views/_scripted_fields')); - loadTestFile(require.resolve('./data_views/_scripted_fields_classic_table')); loadTestFile(require.resolve('./data_views/_runtime_fields')); loadTestFile(require.resolve('./data_views/_runtime_fields_composite')); loadTestFile(require.resolve('./data_views/_field_formatter')); diff --git a/test/functional/firefox/discover.config.ts b/test/functional/firefox/discover.config.ts index 7012a3bccad16..9c4c689f0e8ca 100644 --- a/test/functional/firefox/discover.config.ts +++ b/test/functional/firefox/discover.config.ts @@ -18,7 +18,6 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { ...baseConfig.getAll(), testFiles: [ - require.resolve('../apps/discover/classic'), require.resolve('../apps/discover/esql'), require.resolve('../apps/discover/group1'), require.resolve('../apps/discover/group2_data_grid1'), diff --git a/test/functional/page_objects/console_page.ts b/test/functional/page_objects/console_page.ts index a80f3426e256e..30a4b27c3f037 100644 --- a/test/functional/page_objects/console_page.ts +++ b/test/functional/page_objects/console_page.ts @@ -52,6 +52,13 @@ export class ConsolePageObject extends FtrService { await textArea.clearValueWithKeyboard(); } + public async focusInputEditor() { + const outputEditor = await this.testSubjects.find('consoleMonacoEditor'); + // Simply clicking on the editor doesn't focus it, so we need to click + // on the margin view overlays + await (await outputEditor.findByClassName('margin-view-overlays')).click(); + } + public async focusOutputEditor() { const outputEditor = await this.testSubjects.find('consoleMonacoOutput'); // Simply clicking on the output editor doesn't focus it, so we need to click diff --git a/test/functional/page_objects/dashboard_page.ts b/test/functional/page_objects/dashboard_page.ts index 2a263e9aa8ca7..c9ba5b0c5fa88 100644 --- a/test/functional/page_objects/dashboard_page.ts +++ b/test/functional/page_objects/dashboard_page.ts @@ -49,7 +49,6 @@ export class DashboardPageObject extends FtrService { private readonly common = this.ctx.getPageObject('common'); private readonly header = this.ctx.getPageObject('header'); private readonly visualize = this.ctx.getPageObject('visualize'); - private readonly discover = this.ctx.getPageObject('discover'); private readonly appsMenu = this.ctx.getService('appsMenu'); private readonly toasts = this.ctx.getService('toasts'); @@ -271,22 +270,12 @@ export class DashboardPageObject extends FtrService { */ public async expectToolbarPaginationDisplayed() { - const isLegacyDefault = await this.discover.useLegacyTable(); - if (isLegacyDefault) { - const subjects = [ - 'pagination-button-previous', - 'pagination-button-next', - 'toolBarTotalDocsText', - ]; - await Promise.all(subjects.map(async (subj) => await this.testSubjects.existOrFail(subj))); - } else { - const subjects = ['pagination-button-previous', 'pagination-button-next']; + const subjects = ['pagination-button-previous', 'pagination-button-next']; - await Promise.all(subjects.map(async (subj) => await this.testSubjects.existOrFail(subj))); - const paginationListExists = await this.find.existsByCssSelector('.euiPagination__list'); - if (!paginationListExists) { - throw new Error(`expected discover data grid pagination list to exist`); - } + await Promise.all(subjects.map(async (subj) => await this.testSubjects.existOrFail(subj))); + const paginationListExists = await this.find.existsByCssSelector('.euiPagination__list'); + if (!paginationListExists) { + throw new Error(`expected discover data grid pagination list to exist`); } } diff --git a/test/functional/page_objects/discover_page.ts b/test/functional/page_objects/discover_page.ts index 13289ae9b8aa5..1f5945ff379f3 100644 --- a/test/functional/page_objects/discover_page.ts +++ b/test/functional/page_objects/discover_page.ts @@ -22,10 +22,8 @@ export class DiscoverPageObject extends FtrService { private readonly browser = this.ctx.getService('browser'); private readonly globalNav = this.ctx.getService('globalNav'); private readonly elasticChart = this.ctx.getService('elasticChart'); - private readonly docTable = this.ctx.getService('docTable'); private readonly config = this.ctx.getService('config'); private readonly dataGrid = this.ctx.getService('dataGrid'); - private readonly kibanaServer = this.ctx.getService('kibanaServer'); private readonly fieldEditor = this.ctx.getService('fieldEditor'); private readonly queryBar = this.ctx.getService('queryBar'); private readonly savedObjectsFinder = this.ctx.getService('savedObjectsFinder'); @@ -42,15 +40,6 @@ export class DiscoverPageObject extends FtrService { return await this.testSubjects.getAttribute('unifiedHistogramChart', 'data-time-range'); } - public async getDocTable() { - const isLegacyDefault = await this.useLegacyTable(); - if (isLegacyDefault) { - return this.docTable; - } else { - return this.dataGrid; - } - } - public async saveSearch( searchName: string, saveAsNew?: boolean, @@ -117,12 +106,7 @@ export class DiscoverPageObject extends FtrService { } public async getColumnHeaders() { - const isLegacy = await this.useLegacyTable(); - if (isLegacy) { - return await this.docTable.getHeaderFields('embeddedSavedSearchDocTable'); - } - const table = await this.getDocTable(); - return await table.getHeaderFields(); + return await this.dataGrid.getHeaderFields(); } public async openLoadSavedSearchPanel() { @@ -361,28 +345,16 @@ export class DiscoverPageObject extends FtrService { } public async getDocHeader() { - const table = await this.getDocTable(); - const docHeader = await table.getHeaders(); + const docHeader = await this.dataGrid.getHeaders(); return docHeader.join(); } public async getDocTableRows() { await this.header.waitUntilLoadingHasFinished(); - const table = await this.getDocTable(); - return await table.getBodyRows(); - } - - public async useLegacyTable() { - return (await this.kibanaServer.uiSettings.get('doc_table:legacy')) === true; + return await this.dataGrid.getBodyRows(); } public async getDocTableIndex(index: number, visibleText = false) { - const isLegacyDefault = await this.useLegacyTable(); - if (isLegacyDefault) { - const row = await this.find.byCssSelector(`tr.kbnDocTable__row:nth-child(${index})`); - return await row.getVisibleText(); - } - const row = await this.dataGrid.getRow({ rowIndex: index - 1 }); const result = await Promise.all( row.map(async (cell) => { @@ -398,21 +370,10 @@ export class DiscoverPageObject extends FtrService { return result.slice(await this.dataGrid.getControlColumnsCount()).join(' '); } - public async getDocTableIndexLegacy(index: number) { - const row = await this.find.byCssSelector(`tr.kbnDocTable__row:nth-child(${index})`); - return await row.getVisibleText(); - } - public async getDocTableField(index: number, cellIdx: number = -1) { - const isLegacyDefault = await this.useLegacyTable(); - const usedDefaultCellIdx = isLegacyDefault ? 0 : await this.dataGrid.getControlColumnsCount(); + const usedDefaultCellIdx = await this.dataGrid.getControlColumnsCount(); const usedCellIdx = cellIdx === -1 ? usedDefaultCellIdx : cellIdx; - if (isLegacyDefault) { - const fields = await this.find.allByCssSelector( - `tr.kbnDocTable__row:nth-child(${index}) [data-test-subj='docTableField']` - ); - return await fields[usedCellIdx].getVisibleText(); - } + await this.testSubjects.click('dataGridFullScreenButton'); const row = await this.dataGrid.getRow({ rowIndex: index - 1 }); const result = await Promise.all(row.map(async (cell) => (await cell.getVisibleText()).trim())); @@ -420,33 +381,6 @@ export class DiscoverPageObject extends FtrService { return result[usedCellIdx]; } - public async clickDocTableRowToggle(rowIndex: number = 0) { - const docTable = await this.getDocTable(); - await docTable.clickRowToggle({ rowIndex }); - } - - public async skipToEndOfDocTable() { - // add the focus to the button to make it appear - const skipButton = await this.testSubjects.find('discoverSkipTableButton'); - // force focus on it, to make it interactable - await skipButton.focus(); - // now click it! - return skipButton.click(); - } - - /** - * When scrolling down the legacy table there's a link to scroll up - * So this is done by this function - */ - public async backToTop() { - const skipButton = await this.testSubjects.find('discoverBackToTop'); - return skipButton.click(); - } - - public async getDocTableFooter() { - return await this.testSubjects.find('discoverDocTableFooter'); - } - public isShowingDocViewer() { return this.dataGrid.isShowingDocViewer(); } @@ -478,7 +412,7 @@ export class DiscoverPageObject extends FtrService { } public async getMarks() { - const table = await this.docTable.getTable(); + const table = await this.dataGrid.getTable(); const marks = await table.findAllByTagName('mark'); return await Promise.all(marks.map((mark) => mark.getVisibleText())); } @@ -573,10 +507,6 @@ export class DiscoverPageObject extends FtrService { } public async clickFieldSort(field: string, text = 'Sort New-Old') { - const isLegacyDefault = await this.useLegacyTable(); - if (isLegacyDefault) { - return await this.testSubjects.click(`docTableHeaderFieldSort_${field}`); - } return await this.dataGrid.clickDocSortAsc(field, text); } @@ -608,13 +538,7 @@ export class DiscoverPageObject extends FtrService { } public async removeHeaderColumn(name: string) { - const isLegacyDefault = await this.useLegacyTable(); - if (isLegacyDefault) { - await this.testSubjects.moveMouseTo(`docTableHeader-${name}`); - await this.testSubjects.click(`docTableRemoveHeader-${name}`); - } else { - await this.dataGrid.clickRemoveColumn(name); - } + await this.dataGrid.clickRemoveColumn(name); } public async waitForChartLoadingComplete(renderCount: number) { diff --git a/test/functional/services/dashboard/expectations.ts b/test/functional/services/dashboard/expectations.ts index 414a44b24df97..ec43f1ec80120 100644 --- a/test/functional/services/dashboard/expectations.ts +++ b/test/functional/services/dashboard/expectations.ts @@ -81,14 +81,6 @@ export class DashboardExpectService extends FtrService { }); } - async docTableFieldCount(expectedCount: number) { - this.log.debug(`DashboardExpect.docTableFieldCount(${expectedCount})`); - await this.retry.try(async () => { - const docTableCells = await this.testSubjects.findAll('docTableField', this.findTimeout); - expect(docTableCells.length).to.be(expectedCount); - }); - } - async fieldSuggestions(expectedFields: string[]) { this.log.debug(`DashboardExpect.fieldSuggestions(${expectedFields})`); const fields = await this.filterBar.getFilterEditorFields(); diff --git a/test/functional/services/data_grid.ts b/test/functional/services/data_grid.ts index 3b17a31d624b6..4500bc5b97154 100644 --- a/test/functional/services/data_grid.ts +++ b/test/functional/services/data_grid.ts @@ -499,14 +499,6 @@ export class DataGridService extends FtrService { return await detailsRow.findAllByTestSubject('~docTableRowAction'); } - public async getAnchorDetailsRow(): Promise { - const table = await this.getTable(); - - return await table.findByCssSelector( - '[data-test-subj~="docTableAnchorRow"] + [data-test-subj~="docTableDetailsRow"]' - ); - } - public async openColMenuByField(field: string) { await this.retry.waitFor('header cell action being displayed', async () => { // to prevent flakiness @@ -671,24 +663,6 @@ export class DataGridService extends FtrService { await sampleSizeInput.type(String(newValue)); } - public async getDetailsRow(): Promise { - const detailRows = await this.getDetailsRows(); - return detailRows[0]; - } - - public async getTableDocViewRow( - detailsRow: WebElementWrapper, - fieldName: string - ): Promise { - return await detailsRow.findByTestSubject(`~tableDocViewRow-${fieldName}`); - } - - public async getRemoveInclusiveFilterButton( - tableDocViewRow: WebElementWrapper - ): Promise { - return await tableDocViewRow.findByTestSubject(`~removeInclusiveFilterButton`); - } - public async showFieldCellActionInFlyout(fieldName: string, actionName: string): Promise { const cellSelector = ['addFilterForValueButton', 'addFilterOutValueButton'].includes(actionName) ? `tableDocViewRow-${fieldName}-value` diff --git a/test/functional/services/doc_table.ts b/test/functional/services/doc_table.ts deleted file mode 100644 index 0ca243b7b412b..0000000000000 --- a/test/functional/services/doc_table.ts +++ /dev/null @@ -1,176 +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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public - * License v3.0 only", or the "Server Side Public License, v 1". - */ - -import { WebElementWrapper } from '@kbn/ftr-common-functional-ui-services'; -import { FtrService } from '../ftr_provider_context'; - -interface SelectOptions { - isAnchorRow?: boolean; - rowIndex?: number; -} - -export class DocTableService extends FtrService { - private readonly testSubjects = this.ctx.getService('testSubjects'); - private readonly retry = this.ctx.getService('retry'); - private readonly header = this.ctx.getPageObject('header'); - - public async getTable(selector?: string) { - return await this.testSubjects.find(selector ? selector : 'docTable'); - } - - public async getRowsText() { - const table = await this.getTable(); - const $ = await table.parseDomContent(); - return $.findTestSubjects('~docTableRow') - .toArray() - .map((row: any) => $(row).text().trim()); - } - - public async getBodyRows(): Promise { - const table = await this.getTable(); - return await table.findAllByTestSubject('~docTableRow'); - } - - public async getAnchorRow(): Promise { - const table = await this.getTable(); - return await table.findByTestSubject('~docTableAnchorRow'); - } - - public async getRow({ - isAnchorRow = false, - rowIndex = 0, - }: SelectOptions = {}): Promise { - return isAnchorRow ? await this.getAnchorRow() : (await this.getBodyRows())[rowIndex]; - } - - public async getDetailsRow(): Promise { - const table = await this.getTable(); - return await table.findByCssSelector('[data-test-subj~="docTableDetailsRow"]'); - } - - public async getAnchorDetailsRow(): Promise { - const table = await this.getTable(); - return await table.findByCssSelector( - '[data-test-subj~="docTableAnchorRow"] + [data-test-subj~="docTableDetailsRow"]' - ); - } - - public async clickRowToggle( - options: SelectOptions = { isAnchorRow: false, rowIndex: 0 } - ): Promise { - const row = await this.getRow(options); - const toggle = await row.findByTestSubject('~docTableExpandToggleColumn'); - await toggle.click(); - } - - public async getDetailsRows(): Promise { - const table = await this.getTable(); - return await table.findAllByCssSelector( - '[data-test-subj~="docTableRow"] + [data-test-subj~="docTableDetailsRow"]' - ); - } - - public async getRowActions({ isAnchorRow = false, rowIndex = 0 }: SelectOptions = {}): Promise< - WebElementWrapper[] - > { - const detailsRow = isAnchorRow - ? await this.getAnchorDetailsRow() - : (await this.getDetailsRows())[rowIndex]; - return await detailsRow.findAllByTestSubject('~docTableRowAction'); - } - - public async getFields(options: { isAnchorRow: boolean } = { isAnchorRow: false }) { - const table = await this.getTable(); - const $ = await table.parseDomContent(); - const rowLocator = options.isAnchorRow ? '~docTableAnchorRow' : '~docTableRow'; - const rows = $.findTestSubjects(rowLocator).toArray(); - return rows.map((row: any) => - $(row) - .find('[data-test-subj~="docTableField"]') - .toArray() - .map((field: any) => $(field).text()) - ); - } - - public async getHeaderFields(selector?: string): Promise { - const table = await this.getTable(selector); - const $ = await table.parseDomContent(); - return $.findTestSubjects('~docTableHeaderField') - .toArray() - .map((field: any) => $(field).text().trim()); - } - - public async getHeaders(selector?: string): Promise { - return this.getHeaderFields(selector); - } - - public async getTableDocViewRow( - detailsRow: WebElementWrapper, - fieldName: string - ): Promise { - return await detailsRow.findByTestSubject(`~tableDocViewRow-${fieldName}`); - } - - public async getAddInclusiveFilterButton( - tableDocViewRow: WebElementWrapper - ): Promise { - return await tableDocViewRow.findByTestSubject(`~addInclusiveFilterButton`); - } - - public async addInclusiveFilter(detailsRow: WebElementWrapper, fieldName: string): Promise { - const tableDocViewRow = await this.getTableDocViewRow(detailsRow, fieldName); - const addInclusiveFilterButton = await this.getAddInclusiveFilterButton(tableDocViewRow); - await addInclusiveFilterButton.click(); - await this.header.awaitGlobalLoadingIndicatorHidden(); - } - - public async getRemoveInclusiveFilterButton( - tableDocViewRow: WebElementWrapper - ): Promise { - return await tableDocViewRow.findByTestSubject(`~removeInclusiveFilterButton`); - } - - public async removeInclusiveFilter( - detailsRow: WebElementWrapper, - fieldName: string - ): Promise { - const tableDocViewRow = await this.getTableDocViewRow(detailsRow, fieldName); - const addInclusiveFilterButton = await this.getRemoveInclusiveFilterButton(tableDocViewRow); - await addInclusiveFilterButton.click(); - await this.header.awaitGlobalLoadingIndicatorHidden(); - } - - public async getAddExistsFilterButton( - tableDocViewRow: WebElementWrapper - ): Promise { - return await tableDocViewRow.findByTestSubject(`~addExistsFilterButton`); - } - - public async addExistsFilter(detailsRow: WebElementWrapper, fieldName: string): Promise { - const tableDocViewRow = await this.getTableDocViewRow(detailsRow, fieldName); - const addInclusiveFilterButton = await this.getAddExistsFilterButton(tableDocViewRow); - await addInclusiveFilterButton.click(); - await this.header.awaitGlobalLoadingIndicatorHidden(); - } - - public async toggleRowExpanded({ - isAnchorRow = false, - rowIndex = 0, - }: SelectOptions = {}): Promise { - await this.clickRowToggle({ isAnchorRow, rowIndex }); - await this.header.awaitGlobalLoadingIndicatorHidden(); - return await this.retry.try(async () => { - const row = isAnchorRow ? await this.getAnchorRow() : (await this.getBodyRows())[rowIndex]; - const detailsRow = await row.findByXpath( - './following-sibling::*[@data-test-subj="docTableDetailsRow"]' - ); - return detailsRow.findByTestSubject('~docViewer'); - }); - } -} diff --git a/test/functional/services/index.ts b/test/functional/services/index.ts index 77df85ef3e565..ccdc8cfec3957 100644 --- a/test/functional/services/index.ts +++ b/test/functional/services/index.ts @@ -30,7 +30,6 @@ import { DashboardDrilldownPanelActionsProvider, DashboardDrilldownsManageProvider, } from './dashboard'; -import { DocTableService } from './doc_table'; import { EmbeddingService } from './embedding'; import { FilterBarService } from './filter_bar'; import { FlyoutService } from './flyout'; @@ -62,7 +61,6 @@ export const services = { ...commonFunctionalUIServices, filterBar: FilterBarService, queryBar: QueryBarService, - docTable: DocTableService, png: PngService, screenshots: ScreenshotsService, snapshots: SnapshotsService, diff --git a/test/plugin_functional/plugins/core_plugin_deprecations/server/plugin.ts b/test/plugin_functional/plugins/core_plugin_deprecations/server/plugin.ts index 0a7a15f0c62e2..2afd1e13d040c 100644 --- a/test/plugin_functional/plugins/core_plugin_deprecations/server/plugin.ts +++ b/test/plugin_functional/plugins/core_plugin_deprecations/server/plugin.ts @@ -18,7 +18,11 @@ async function getDeprecations({ savedObjectsClient, }: GetDeprecationsContext): Promise { const deprecations: DeprecationsDetails[] = []; - const { total } = await savedObjectsClient.find({ type: 'test-deprecations-plugin', perPage: 1 }); + const { total } = await savedObjectsClient.find({ + type: 'test-deprecations-plugin', + perPage: 1, + namespaces: ['*'], + }); deprecations.push({ title: 'CorePluginDeprecationsPlugin plugin is deprecated', diff --git a/test/plugin_functional/test_suites/core_plugins/rendering.ts b/test/plugin_functional/test_suites/core_plugins/rendering.ts index 7305824696aec..87b8fe406263b 100644 --- a/test/plugin_functional/test_suites/core_plugins/rendering.ts +++ b/test/plugin_functional/test_suites/core_plugins/rendering.ts @@ -320,8 +320,6 @@ export default function ({ getService }: PluginFunctionalProviderContext) { * NOTE: The Reporting plugin is currently disabled in functional tests (see test/functional/config.base.js). * It will be re-enabled once #102552 is completed. */ - // 'xpack.reporting.roles.allow (array)', - // 'xpack.reporting.roles.enabled (boolean)', // 'xpack.reporting.poll.jobCompletionNotifier.interval (number)', // 'xpack.reporting.poll.jobCompletionNotifier.intervalErrorMultiplier (number)', // 'xpack.reporting.poll.jobsRefresh.interval (number)', @@ -354,6 +352,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) { 'xpack.upgrade_assistant.featureSet.migrateSystemIndices (boolean?)', 'xpack.upgrade_assistant.featureSet.mlSnapshots (boolean?)', 'xpack.upgrade_assistant.featureSet.reindexCorrectiveActions (boolean?)', + 'xpack.upgrade_assistant.featureSet.migrateDataStreams (boolean?)', 'xpack.upgrade_assistant.ui.enabled (boolean?)', 'xpack.observability.unsafe.alertDetails.metrics.enabled (boolean?)', 'xpack.observability.unsafe.alertDetails.logs.enabled (boolean?)', diff --git a/tsconfig.base.json b/tsconfig.base.json index ed8b402e2d179..85eaafc729e61 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -96,6 +96,8 @@ "@kbn/app-link-test-plugin/*": ["test/plugin_functional/plugins/app_link_test/*"], "@kbn/application-usage-test-plugin": ["x-pack/test/usage_collection/plugins/application_usage_test"], "@kbn/application-usage-test-plugin/*": ["x-pack/test/usage_collection/plugins/application_usage_test/*"], + "@kbn/asset-inventory-plugin": ["x-pack/plugins/asset_inventory"], + "@kbn/asset-inventory-plugin/*": ["x-pack/plugins/asset_inventory/*"], "@kbn/audit-log-plugin": ["x-pack/test/security_api_integration/plugins/audit_log"], "@kbn/audit-log-plugin/*": ["x-pack/test/security_api_integration/plugins/audit_log/*"], "@kbn/avc-banner": ["packages/kbn-avc-banner"], @@ -784,8 +786,8 @@ "@kbn/discover-shared-plugin/*": ["src/plugins/discover_shared/*"], "@kbn/discover-utils": ["packages/kbn-discover-utils"], "@kbn/discover-utils/*": ["packages/kbn-discover-utils/*"], - "@kbn/doc-links": ["packages/kbn-doc-links"], - "@kbn/doc-links/*": ["packages/kbn-doc-links/*"], + "@kbn/doc-links": ["src/platform/packages/shared/kbn-doc-links"], + "@kbn/doc-links/*": ["src/platform/packages/shared/kbn-doc-links/*"], "@kbn/docs-utils": ["packages/kbn-docs-utils"], "@kbn/docs-utils/*": ["packages/kbn-docs-utils/*"], "@kbn/dom-drag-drop": ["packages/kbn-dom-drag-drop"], @@ -980,6 +982,8 @@ "@kbn/ftr-screenshot-filename/*": ["packages/kbn-ftr-screenshot-filename/*"], "@kbn/functional-with-es-ssl-cases-test-plugin": ["x-pack/test/functional_with_es_ssl/plugins/cases"], "@kbn/functional-with-es-ssl-cases-test-plugin/*": ["x-pack/test/functional_with_es_ssl/plugins/cases/*"], + "@kbn/gen-ai-functional-testing": ["packages/kbn-gen-ai-functional-testing"], + "@kbn/gen-ai-functional-testing/*": ["packages/kbn-gen-ai-functional-testing/*"], "@kbn/gen-ai-streaming-response-example-plugin": ["x-pack/examples/gen_ai_streaming_response_example"], "@kbn/gen-ai-streaming-response-example-plugin/*": ["x-pack/examples/gen_ai_streaming_response_example/*"], "@kbn/generate": ["packages/kbn-generate"], @@ -1480,6 +1484,8 @@ "@kbn/resolver-test-plugin/*": ["x-pack/test/plugin_functional/plugins/resolver_test/*"], "@kbn/response-ops-feature-flag-service": ["packages/response-ops/feature_flag_service"], "@kbn/response-ops-feature-flag-service/*": ["packages/response-ops/feature_flag_service/*"], + "@kbn/response-ops-rule-form": ["packages/response-ops/rule_form"], + "@kbn/response-ops-rule-form/*": ["packages/response-ops/rule_form/*"], "@kbn/response-ops-rule-params": ["packages/response-ops/rule_params"], "@kbn/response-ops-rule-params/*": ["packages/response-ops/rule_params/*"], "@kbn/response-stream-plugin": ["examples/response_stream"], diff --git a/versions.json b/versions.json index 67e0a6ac49320..30b013e25cd2b 100644 --- a/versions.json +++ b/versions.json @@ -29,7 +29,7 @@ "previousMajor": true }, { - "version": "7.17.26", + "version": "7.17.27", "branch": "7.17" } ] diff --git a/x-pack/examples/alerting_example/server/plugin.ts b/x-pack/examples/alerting_example/server/plugin.ts index 43b3bc82c4416..bf79d564222db 100644 --- a/x-pack/examples/alerting_example/server/plugin.ts +++ b/x-pack/examples/alerting_example/server/plugin.ts @@ -9,9 +9,10 @@ import { Plugin, CoreSetup } from '@kbn/core/server'; import { i18n } from '@kbn/i18n'; // import directly to support examples functional tests (@kbn-test/src/functional_tests/lib/babel_register_for_test_plugins.js) import { DEFAULT_APP_CATEGORIES } from '@kbn/core-application-common'; -import { PluginSetupContract as AlertingSetup } from '@kbn/alerting-plugin/server'; +import { AlertingServerSetup } from '@kbn/alerting-plugin/server'; import { FeaturesPluginSetup } from '@kbn/features-plugin/server'; +import { ALERTING_FEATURE_ID } from '@kbn/alerting-plugin/common'; import { KibanaFeatureScope } from '@kbn/features-plugin/common'; import { ruleType as alwaysFiringRule } from './rule_types/always_firing'; import { ruleType as peopleInSpaceRule } from './rule_types/astros'; @@ -22,7 +23,7 @@ import { ALERTING_EXAMPLE_APP_ID } from '../common/constants'; // this plugin's dependencies export interface AlertingExampleDeps { - alerting: AlertingSetup; + alerting: AlertingServerSetup; features: FeaturesPluginSetup; } @@ -43,15 +44,54 @@ export class AlertingExamplePlugin implements Plugin ( ( { id: 'observabilityCases', configurationId: 'observabilityCases', alertsTableConfigurationRegistry, - featureIds: [ - AlertConsumers.INFRASTRUCTURE, - AlertConsumers.APM, - AlertConsumers.OBSERVABILITY, - AlertConsumers.LOGS, - ], + ruleTypeIds: ['.es-query'], query: { bool: { filter: [], diff --git a/x-pack/examples/triggers_actions_ui_example/server/plugin.ts b/x-pack/examples/triggers_actions_ui_example/server/plugin.ts index 6d55bbb2cb55d..6bf6c1fd1442e 100644 --- a/x-pack/examples/triggers_actions_ui_example/server/plugin.ts +++ b/x-pack/examples/triggers_actions_ui_example/server/plugin.ts @@ -8,7 +8,7 @@ import { Plugin, CoreSetup } from '@kbn/core/server'; import { PluginSetupContract as ActionsSetup } from '@kbn/actions-plugin/server'; -import { PluginSetupContract as AlertingSetup } from '@kbn/alerting-plugin/server'; +import { AlertingServerSetup } from '@kbn/alerting-plugin/server'; import { getConnectorType as getSystemLogExampleConnectorType, @@ -17,7 +17,7 @@ import { // this plugin's dependencies export interface TriggersActionsUiExampleDeps { - alerting: AlertingSetup; + alerting: AlertingServerSetup; actions: ActionsSetup; } export class TriggersActionsUiExamplePlugin diff --git a/x-pack/examples/triggers_actions_ui_example/tsconfig.json b/x-pack/examples/triggers_actions_ui_example/tsconfig.json index 601f23edd2647..d0622a4c64965 100644 --- a/x-pack/examples/triggers_actions_ui_example/tsconfig.json +++ b/x-pack/examples/triggers_actions_ui_example/tsconfig.json @@ -19,7 +19,6 @@ "@kbn/alerting-plugin", "@kbn/triggers-actions-ui-plugin", "@kbn/developer-examples-plugin", - "@kbn/rule-data-utils", "@kbn/data-plugin", "@kbn/i18n-react", "@kbn/shared-ux-router", @@ -29,8 +28,8 @@ "@kbn/charts-plugin", "@kbn/data-views-plugin", "@kbn/unified-search-plugin", - "@kbn/alerts-ui-shared", "@kbn/data-view-editor-plugin", "@kbn/react-kibana-context-render", + "@kbn/response-ops-rule-form", ] } diff --git a/x-pack/packages/kbn-cloud-security-posture/common/constants.ts b/x-pack/packages/kbn-cloud-security-posture/common/constants.ts index a24d676dc6f88..9112dba4b9a4f 100644 --- a/x-pack/packages/kbn-cloud-security-posture/common/constants.ts +++ b/x-pack/packages/kbn-cloud-security-posture/common/constants.ts @@ -47,3 +47,8 @@ export const VULNERABILITIES_SEVERITY: Record = { CRITICAL: 'CRITICAL', UNKNOWN: 'UNKNOWN', }; + +export const MISCONFIGURATION_STATUS: Record = { + PASSED: 'passed', + FAILED: 'failed', +}; diff --git a/x-pack/packages/kbn-cloud-security-posture/common/index.ts b/x-pack/packages/kbn-cloud-security-posture/common/index.ts index d5ee781c39b20..4065f7ca331a9 100644 --- a/x-pack/packages/kbn-cloud-security-posture/common/index.ts +++ b/x-pack/packages/kbn-cloud-security-posture/common/index.ts @@ -28,7 +28,9 @@ export * from './constants'; export { extractErrorMessage, buildMutedRulesFilter, - buildEntityFlyoutPreviewQuery, + buildGenericEntityFlyoutPreviewQuery, + buildMisconfigurationEntityFlyoutPreviewQuery, + buildVulnerabilityEntityFlyoutPreviewQuery, } from './utils/helpers'; export { getAbbreviatedNumber } from './utils/get_abbreviated_number'; export { UiMetricService } from './utils/ui_metrics'; diff --git a/x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.test.ts b/x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.test.ts index 04cb76f4441c5..6b85d2ead28fe 100644 --- a/x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.test.ts +++ b/x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.test.ts @@ -9,8 +9,10 @@ import { extractErrorMessage, defaultErrorMessage, buildMutedRulesFilter, - buildEntityFlyoutPreviewQuery, buildEntityAlertsQuery, + buildGenericEntityFlyoutPreviewQuery, + buildMisconfigurationEntityFlyoutPreviewQuery, + buildVulnerabilityEntityFlyoutPreviewQuery, } from './helpers'; const fallbackMessage = 'thisIsAFallBackMessage'; @@ -145,7 +147,7 @@ describe('test helper methods', () => { }); }); - describe('buildEntityFlyoutPreviewQueryTest', () => { + describe('buildGenericEntityFlyoutPreviewQuery', () => { it('should return the correct query when given field and query', () => { const field = 'host.name'; const query = 'exampleHost'; @@ -162,10 +164,10 @@ describe('test helper methods', () => { }, }; - expect(buildEntityFlyoutPreviewQuery(field, query)).toEqual(expectedQuery); + expect(buildGenericEntityFlyoutPreviewQuery(field, query)).toEqual(expectedQuery); }); - it('should return the correct query when given field and empty query', () => { + it('should return the correct query when given field and empty query and empty status', () => { const field = 'host.name'; const expectedQuery = { bool: { @@ -180,12 +182,143 @@ describe('test helper methods', () => { }, }; - expect(buildEntityFlyoutPreviewQuery(field)).toEqual(expectedQuery); + expect(buildGenericEntityFlyoutPreviewQuery(field)).toEqual(expectedQuery); + }); + + it('should return the correct query when given field and queryValue and status but empty queryField', () => { + const field = 'host.name'; + const query = 'exampleHost'; + const status = 'pass'; + const expectedQuery = { + bool: { + filter: [ + { + bool: { + should: [{ term: { 'host.name': 'exampleHost' } }], + minimum_should_match: 1, + }, + }, + ], + }, + }; + + expect(buildGenericEntityFlyoutPreviewQuery(field, query, status)).toEqual(expectedQuery); + }); + + it('should return the correct query when given field and queryValue and queryField but empty status', () => { + const field = 'host.name'; + const query = 'exampleHost'; + const emptyStatus = undefined; + const queryField = 'some.field'; + const expectedQuery = { + bool: { + filter: [ + { + bool: { + should: [{ term: { 'host.name': 'exampleHost' } }], + minimum_should_match: 1, + }, + }, + ], + }, + }; + + expect(buildGenericEntityFlyoutPreviewQuery(field, query, emptyStatus, queryField)).toEqual( + expectedQuery + ); + }); + + it('should return the correct query when given all the parameters', () => { + const field = 'host.name'; + const query = 'exampleHost'; + const emptyStatus = 'some.status'; + const queryField = 'some.field'; + const expectedQuery = { + bool: { + filter: [ + { + bool: { + should: [{ term: { 'host.name': 'exampleHost' } }], + minimum_should_match: 1, + }, + }, + { + bool: { + should: [{ term: { 'some.field': 'some.status' } }], + minimum_should_match: 1, + }, + }, + ], + }, + }; + + expect(buildGenericEntityFlyoutPreviewQuery(field, query, emptyStatus, queryField)).toEqual( + expectedQuery + ); + }); + }); + + describe('buildMisconfigurationEntityFlyoutPreviewQuery', () => { + it('should return the correct query when given field, queryValue, status and queryType Misconfiguration', () => { + const field = 'host.name'; + const queryValue = 'exampleHost'; + const status = 'pass'; + const expectedQuery = { + bool: { + filter: [ + { + bool: { + should: [{ term: { 'host.name': 'exampleHost' } }], + minimum_should_match: 1, + }, + }, + { + bool: { + should: [{ term: { 'result.evaluation': 'pass' } }], + minimum_should_match: 1, + }, + }, + ], + }, + }; + + expect(buildMisconfigurationEntityFlyoutPreviewQuery(field, queryValue, status)).toEqual( + expectedQuery + ); + }); + }); + describe('buildVulnerabilityEntityFlyoutPreviewQuery', () => { + it('should return the correct query when given field, queryValue, status and queryType Vulnerability', () => { + const field = 'host.name'; + const queryValue = 'exampleHost'; + const status = 'low'; + const expectedQuery = { + bool: { + filter: [ + { + bool: { + should: [{ term: { 'host.name': 'exampleHost' } }], + minimum_should_match: 1, + }, + }, + { + bool: { + should: [{ term: { 'vulnerability.severity': 'low' } }], + minimum_should_match: 1, + }, + }, + ], + }, + }; + + expect(buildVulnerabilityEntityFlyoutPreviewQuery(field, queryValue, status)).toEqual( + expectedQuery + ); }); }); describe('buildEntityAlertsQuery', () => { - const getExpectedAlertsQuery = (size?: number) => { + const getExpectedAlertsQuery = (size?: number, severity?: string) => { return { size: size || 0, _source: false, @@ -202,20 +335,30 @@ describe('test helper methods', () => { filter: [ { bool: { - must: [], - filter: [ + should: [ { - match_phrase: { - 'host.name': { - query: 'exampleHost', - }, + term: { + 'host.name': 'exampleHost', }, }, ], - should: [], - must_not: [], + minimum_should_match: 1, }, }, + severity + ? { + bool: { + should: [ + { + term: { + 'kibana.alert.severity': 'low', + }, + }, + ], + minimum_should_match: 1, + }, + } + : undefined, { range: { '@timestamp': { @@ -229,7 +372,7 @@ describe('test helper methods', () => { 'kibana.alert.workflow_status': ['open', 'acknowledged'], }, }, - ], + ].filter(Boolean), }, }, }; @@ -256,5 +399,18 @@ describe('test helper methods', () => { expect(buildEntityAlertsQuery(field, to, from, query)).toEqual(getExpectedAlertsQuery(size)); }); + + it('should return the correct query when given severity query', () => { + const field = 'host.name'; + const query = 'exampleHost'; + const to = 'Tomorrow'; + const from = 'Today'; + const size = undefined; + const severity = 'low'; + + expect(buildEntityAlertsQuery(field, to, from, query, size, severity)).toEqual( + getExpectedAlertsQuery(size, 'low') + ); + }); }); }); diff --git a/x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.ts b/x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.ts index bd531fa63804f..ac2e27b70878f 100644 --- a/x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.ts +++ b/x-pack/packages/kbn-cloud-security-posture/common/utils/helpers.ts @@ -43,7 +43,12 @@ export const buildMutedRulesFilter = ( return mutedRulesFilterQuery; }; -export const buildEntityFlyoutPreviewQuery = (field: string, queryValue?: string) => { +export const buildGenericEntityFlyoutPreviewQuery = ( + field: string, + queryValue?: string, + status?: string, + queryField?: string +) => { return { bool: { filter: [ @@ -59,17 +64,52 @@ export const buildEntityFlyoutPreviewQuery = (field: string, queryValue?: string minimum_should_match: 1, }, }, - ], + status && queryField + ? { + bool: { + should: [ + { + term: { + [queryField]: status, + }, + }, + ], + minimum_should_match: 1, + }, + } + : undefined, + ].filter(Boolean), }, }; }; +// Higher-order function for Misconfiguration +export const buildMisconfigurationEntityFlyoutPreviewQuery = ( + field: string, + queryValue?: string, + status?: string +) => { + const queryField = 'result.evaluation'; + return buildGenericEntityFlyoutPreviewQuery(field, queryValue, status, queryField); +}; + +// Higher-order function for Vulnerability +export const buildVulnerabilityEntityFlyoutPreviewQuery = ( + field: string, + queryValue?: string, + status?: string +) => { + const queryField = 'vulnerability.severity'; + return buildGenericEntityFlyoutPreviewQuery(field, queryValue, status, queryField); +}; + export const buildEntityAlertsQuery = ( field: string, to: string, from: string, queryValue?: string, - size?: number + size?: number, + severity?: string ) => { return { size: size || 0, @@ -87,20 +127,30 @@ export const buildEntityAlertsQuery = ( filter: [ { bool: { - must: [], - filter: [ + should: [ { - match_phrase: { - [field]: { - query: queryValue, - }, + term: { + [field]: `${queryValue || ''}`, }, }, ], - should: [], - must_not: [], + minimum_should_match: 1, }, }, + severity + ? { + bool: { + should: [ + { + term: { + 'kibana.alert.severity': severity, + }, + }, + ], + minimum_should_match: 1, + }, + } + : undefined, { range: { '@timestamp': { @@ -114,7 +164,7 @@ export const buildEntityAlertsQuery = ( 'kibana.alert.workflow_status': ['open', 'acknowledged'], }, }, - ], + ].filter(Boolean), }, }, }; diff --git a/x-pack/packages/kbn-cloud-security-posture/graph/src/components/edge/default_edge.tsx b/x-pack/packages/kbn-cloud-security-posture/graph/src/components/edge/default_edge.tsx index 898e12b5b4c01..6826c47b270ce 100644 --- a/x-pack/packages/kbn-cloud-security-posture/graph/src/components/edge/default_edge.tsx +++ b/x-pack/packages/kbn-cloud-security-posture/graph/src/components/edge/default_edge.tsx @@ -49,6 +49,8 @@ export function DefaultEdge({ path={edgePath} style={{ stroke: euiTheme.colors[color], + }} + css={{ strokeDasharray: '2,2', }} markerEnd={ diff --git a/x-pack/packages/kbn-cloud-security-posture/graph/src/components/edge/styles.tsx b/x-pack/packages/kbn-cloud-security-posture/graph/src/components/edge/styles.tsx index 58ecea3bc3bea..5a3e2f8b72b21 100644 --- a/x-pack/packages/kbn-cloud-security-posture/graph/src/components/edge/styles.tsx +++ b/x-pack/packages/kbn-cloud-security-posture/graph/src/components/edge/styles.tsx @@ -128,7 +128,7 @@ export const SvgDefsMarker = () => { const { euiTheme } = useEuiTheme(); return ( - + diff --git a/x-pack/packages/kbn-cloud-security-posture/graph/src/components/node/edge_group_node.tsx b/x-pack/packages/kbn-cloud-security-posture/graph/src/components/node/edge_group_node.tsx index 97b8928c421e1..a3dd064d16ab7 100644 --- a/x-pack/packages/kbn-cloud-security-posture/graph/src/components/node/edge_group_node.tsx +++ b/x-pack/packages/kbn-cloud-security-posture/graph/src/components/node/edge_group_node.tsx @@ -16,7 +16,7 @@ export const EdgeGroupNode: React.FC = memo((props: NodeProps) => { <> { return (
        diff --git a/x-pack/packages/kbn-cloud-security-posture/public/src/constants/component_constants.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/constants/component_constants.ts index d4d436e981cc4..3e22fdea80666 100644 --- a/x-pack/packages/kbn-cloud-security-posture/public/src/constants/component_constants.ts +++ b/x-pack/packages/kbn-cloud-security-posture/public/src/constants/component_constants.ts @@ -11,3 +11,6 @@ export const statusColors = { failed: euiThemeVars.euiColorVis9, unknown: euiThemeVars.euiColorLightShade, }; + +export const HOST_NAME = 'host.name'; +export const USER_NAME = 'user.name'; diff --git a/x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_has_misconfigurations.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_has_misconfigurations.ts index 9b126332b567b..c8e36898fed16 100644 --- a/x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_has_misconfigurations.ts +++ b/x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_has_misconfigurations.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { buildEntityFlyoutPreviewQuery } from '@kbn/cloud-security-posture-common'; +import { buildGenericEntityFlyoutPreviewQuery } from '@kbn/cloud-security-posture-common'; import { useMisconfigurationPreview } from './use_misconfiguration_preview'; export const useHasMisconfigurations = (field: 'host.name' | 'user.name', value: string) => { const { data } = useMisconfigurationPreview({ - query: buildEntityFlyoutPreviewQuery(field, value), + query: buildGenericEntityFlyoutPreviewQuery(field, value), sort: [], enabled: true, pageSize: 1, diff --git a/x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_has_vulnerabilities.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_has_vulnerabilities.ts index 336892ee888af..ae7e951ce9313 100644 --- a/x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_has_vulnerabilities.ts +++ b/x-pack/packages/kbn-cloud-security-posture/public/src/hooks/use_has_vulnerabilities.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { buildEntityFlyoutPreviewQuery } from '@kbn/cloud-security-posture-common'; +import { buildGenericEntityFlyoutPreviewQuery } from '@kbn/cloud-security-posture-common'; import { useVulnerabilitiesPreview } from './use_vulnerabilities_preview'; import { hasVulnerabilitiesData } from '../utils/vulnerability_helpers'; export const useHasVulnerabilities = (field: 'host.name' | 'user.name', value: string) => { const { data: vulnerabilitiesData } = useVulnerabilitiesPreview({ - query: buildEntityFlyoutPreviewQuery(field, value), + query: buildGenericEntityFlyoutPreviewQuery(field, value), sort: [], enabled: true, pageSize: 1, diff --git a/x-pack/packages/kbn-cloud-security-posture/public/src/types.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/types.ts index 493e58519bd91..2c7be37de50dd 100644 --- a/x-pack/packages/kbn-cloud-security-posture/public/src/types.ts +++ b/x-pack/packages/kbn-cloud-security-posture/public/src/types.ts @@ -58,7 +58,7 @@ export interface CspClientPluginStartDeps { export interface CspBaseEsQuery { query?: { bool: { - filter: estypes.QueryDslQueryContainer[]; + filter: Array | undefined; }; }; } diff --git a/x-pack/packages/kbn-cloud-security-posture/public/src/utils/vulnerability_helpers.test.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/utils/vulnerability_helpers.test.ts index 898f9990a1a96..e2503b7a38a2c 100644 --- a/x-pack/packages/kbn-cloud-security-posture/public/src/utils/vulnerability_helpers.test.ts +++ b/x-pack/packages/kbn-cloud-security-posture/public/src/utils/vulnerability_helpers.test.ts @@ -10,6 +10,7 @@ import { getVulnerabilityStats } from './vulnerability_helpers'; import { i18n } from '@kbn/i18n'; describe('getVulnerabilitiesAggregationCount', () => { + const mockFilterFunction = jest.fn(); it('should return empty array when all severity count is 0', () => { const result = getVulnerabilityStats({ critical: 0, high: 0, medium: 0, low: 0, none: 0 }); expect(result).toEqual([]); @@ -17,8 +18,12 @@ describe('getVulnerabilitiesAggregationCount', () => { it('should return stats for low, medium, high, and critical vulnerabilities', () => { const result = getVulnerabilityStats({ critical: 1, high: 2, medium: 3, low: 4, none: 5 }); + const resultWithoutFunctions = result.map((item) => { + const { filter, reset, ...rest } = item; + return rest; + }); - expect(result).toEqual([ + expect(resultWithoutFunctions).toEqual([ { key: i18n.translate( 'xpack.securitySolution.flyout.right.insights.vulnerabilities.noneVulnerabilitiesText', @@ -28,6 +33,7 @@ describe('getVulnerabilitiesAggregationCount', () => { ), count: 5, color: '#aaa', + isCurrentFilter: false, }, { key: i18n.translate( @@ -38,6 +44,7 @@ describe('getVulnerabilitiesAggregationCount', () => { ), count: 4, color: euiThemeVars.euiColorVis0, + isCurrentFilter: false, }, { key: i18n.translate( @@ -48,6 +55,7 @@ describe('getVulnerabilitiesAggregationCount', () => { ), count: 3, color: euiThemeVars.euiColorVis5_behindText, + isCurrentFilter: false, }, { key: i18n.translate( @@ -58,6 +66,7 @@ describe('getVulnerabilitiesAggregationCount', () => { ), count: 2, color: euiThemeVars.euiColorVis9_behindText, + isCurrentFilter: false, }, { key: i18n.translate( @@ -68,7 +77,43 @@ describe('getVulnerabilitiesAggregationCount', () => { ), count: 1, color: euiThemeVars.euiColorDanger, + isCurrentFilter: false, }, ]); }); + + it('should return correct stats with correct onClick functions', () => { + const result = getVulnerabilityStats( + { critical: 1, high: 2, medium: 3, low: 4, none: 5 }, + mockFilterFunction + ); + const event = { stopPropagation: jest.fn() } as unknown as React.MouseEvent< + SVGElement, + MouseEvent + >; + result[1].filter?.(); + expect(mockFilterFunction).toHaveBeenCalledWith('LOW'); + result[1].reset?.(event); + expect(mockFilterFunction).toHaveBeenCalledWith(''); + }); + + it('should identify correct currentFilter', () => { + const currentFilter = 'LOW'; + const result = getVulnerabilityStats( + { critical: 1, high: 2, medium: 3, low: 4, none: 5 }, + mockFilterFunction, + currentFilter + ); + + // Make sure that Low is set to Current Filter + expect(result[1].isCurrentFilter).toBe(true); + expect(result[1].key).toBe('Low'); + + // Make sure only Low is set as Current Filter and no other severity + result.forEach((item) => { + if (item.key !== 'Low') { + expect(item.isCurrentFilter).toBe(false); + } + }); + }); }); diff --git a/x-pack/packages/kbn-cloud-security-posture/public/src/utils/vulnerability_helpers.ts b/x-pack/packages/kbn-cloud-security-posture/public/src/utils/vulnerability_helpers.ts index c8782daf35308..e1bec795ad444 100644 --- a/x-pack/packages/kbn-cloud-security-posture/public/src/utils/vulnerability_helpers.ts +++ b/x-pack/packages/kbn-cloud-security-posture/public/src/utils/vulnerability_helpers.ts @@ -14,6 +14,9 @@ interface VulnerabilitiesDistributionBarProps { key: string; count: number; color: string; + isCurrentFilter?: boolean; + filter?: () => void; + reset?: (event: any) => void; } interface VulnerabilityCounts { @@ -30,7 +33,9 @@ export const hasVulnerabilitiesData = (counts: VulnerabilityCounts): boolean => }; export const getVulnerabilityStats = ( - counts: VulnerabilityCounts + counts: VulnerabilityCounts, + filterFunction?: (filter: string) => void, + currentFilter?: string ): VulnerabilitiesDistributionBarProps[] => { const vulnerabilityStats: VulnerabilitiesDistributionBarProps[] = []; @@ -50,6 +55,14 @@ export const getVulnerabilityStats = ( ), count: counts.none, color: getSeverityStatusColor(VULNERABILITIES_SEVERITY.UNKNOWN), + filter: () => { + filterFunction?.(VULNERABILITIES_SEVERITY.UNKNOWN); + }, + isCurrentFilter: currentFilter === VULNERABILITIES_SEVERITY.UNKNOWN, + reset: (event: React.MouseEvent) => { + filterFunction?.(''); + event?.stopPropagation(); + }, }); if (counts.low > 0) vulnerabilityStats.push({ @@ -61,6 +74,14 @@ export const getVulnerabilityStats = ( ), count: counts.low, color: getSeverityStatusColor(VULNERABILITIES_SEVERITY.LOW), + filter: () => { + filterFunction?.(VULNERABILITIES_SEVERITY.LOW); + }, + isCurrentFilter: currentFilter === VULNERABILITIES_SEVERITY.LOW, + reset: (event: React.MouseEvent) => { + filterFunction?.(''); + event?.stopPropagation(); + }, }); if (counts.medium > 0) @@ -73,6 +94,14 @@ export const getVulnerabilityStats = ( ), count: counts.medium, color: getSeverityStatusColor(VULNERABILITIES_SEVERITY.MEDIUM), + filter: () => { + filterFunction?.(VULNERABILITIES_SEVERITY.MEDIUM); + }, + isCurrentFilter: currentFilter === VULNERABILITIES_SEVERITY.MEDIUM, + reset: (event: React.MouseEvent) => { + filterFunction?.(''); + event?.stopPropagation(); + }, }); if (counts.high > 0) vulnerabilityStats.push({ @@ -84,6 +113,14 @@ export const getVulnerabilityStats = ( ), count: counts.high, color: getSeverityStatusColor(VULNERABILITIES_SEVERITY.HIGH), + filter: () => { + filterFunction?.(VULNERABILITIES_SEVERITY.HIGH); + }, + isCurrentFilter: currentFilter === VULNERABILITIES_SEVERITY.HIGH, + reset: (event: React.MouseEvent) => { + filterFunction?.(''); + event?.stopPropagation(); + }, }); if (counts.critical > 0) vulnerabilityStats.push({ @@ -95,6 +132,14 @@ export const getVulnerabilityStats = ( ), count: counts.critical, color: getSeverityStatusColor(VULNERABILITIES_SEVERITY.CRITICAL), + filter: () => { + filterFunction?.(VULNERABILITIES_SEVERITY.CRITICAL); + }, + isCurrentFilter: currentFilter === VULNERABILITIES_SEVERITY.CRITICAL, + reset: (event: React.MouseEvent) => { + filterFunction?.(''); + event?.stopPropagation(); + }, }); return vulnerabilityStats; diff --git a/x-pack/packages/kbn-entities-schema/src/schema/entity.ts b/x-pack/packages/kbn-entities-schema/src/schema/entity.ts index 5df10e11bb7ed..c24da00d7724e 100644 --- a/x-pack/packages/kbn-entities-schema/src/schema/entity.ts +++ b/x-pack/packages/kbn-entities-schema/src/schema/entity.ts @@ -25,8 +25,9 @@ export interface MetadataRecord { export interface EntityV2 { 'entity.id': string; - 'entity.last_seen_timestamp': string; 'entity.type': string; + 'entity.display_name': string; + 'entity.last_seen_timestamp'?: string; [metadata: string]: any; } diff --git a/x-pack/packages/kbn-slo-schema/src/schema/indicators.ts b/x-pack/packages/kbn-slo-schema/src/schema/indicators.ts index 6c3149c3c35e1..f246d36382c8f 100644 --- a/x-pack/packages/kbn-slo-schema/src/schema/indicators.ts +++ b/x-pack/packages/kbn-slo-schema/src/schema/indicators.ts @@ -11,26 +11,31 @@ import { allOrAnyString } from './common'; const kqlQuerySchema = t.string; const filtersSchema = t.array( - t.type({ - meta: t.partial({ - alias: t.union([t.string, t.null]), - disabled: t.boolean, - negate: t.boolean, - // controlledBy is there to identify who owns the filter - controlledBy: t.string, - // allows grouping of filters - group: t.string, - // index and type are optional only because when you create a new filter, there are no defaults - index: t.string, - isMultiIndex: t.boolean, - type: t.string, - key: t.string, - field: t.string, - params: t.any, - value: t.string, + t.intersection([ + t.type({ + meta: t.partial({ + alias: t.union([t.string, t.null]), + disabled: t.boolean, + negate: t.boolean, + // controlledBy is there to identify who owns the filter + controlledBy: t.string, + // allows grouping of filters + group: t.string, + // index and type are optional only because when you create a new filter, there are no defaults + index: t.string, + isMultiIndex: t.boolean, + type: t.string, + key: t.string, + field: t.string, + params: t.any, + value: t.string, + }), + query: t.record(t.string, t.any), + }), + t.partial({ + $state: t.any, }), - query: t.record(t.string, t.any), - }) + ]) ); const kqlWithFiltersSchema = t.type({ diff --git a/x-pack/packages/kbn-slo-schema/src/schema/slo.ts b/x-pack/packages/kbn-slo-schema/src/schema/slo.ts index 0576f1cf328eb..c292d355b4867 100644 --- a/x-pack/packages/kbn-slo-schema/src/schema/slo.ts +++ b/x-pack/packages/kbn-slo-schema/src/schema/slo.ts @@ -27,16 +27,26 @@ const objectiveSchema = t.intersection([ t.partial({ timesliceTarget: t.number, timesliceWindow: durationType }), ]); -const settingsSchema = t.type({ +const settingsSchema = t.intersection([ + t.type({ + syncDelay: durationType, + frequency: durationType, + preventInitialBackfill: t.boolean, + }), + t.partial({ syncField: t.union([t.string, t.null]) }), +]); + +const groupBySchema = allOrAnyStringOrArray; + +const optionalSettingsSchema = t.partial({ syncDelay: durationType, frequency: durationType, preventInitialBackfill: t.boolean, + syncField: t.union([t.string, t.null]), }); -const groupBySchema = allOrAnyStringOrArray; - -const optionalSettingsSchema = t.partial({ ...settingsSchema.props }); const tagsSchema = t.array(t.string); + // id cannot contain special characters and spaces const sloIdSchema = new t.Type( 'sloIdSchema', diff --git a/x-pack/packages/ml/trained_models_utils/src/constants/trained_models.ts b/x-pack/packages/ml/trained_models_utils/src/constants/trained_models.ts index c2eb7d0ed8ef3..630fbe089cdc2 100644 --- a/x-pack/packages/ml/trained_models_utils/src/constants/trained_models.ts +++ b/x-pack/packages/ml/trained_models_utils/src/constants/trained_models.ts @@ -5,6 +5,7 @@ * 2.0. */ +import type { InferenceInferenceEndpointInfo } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { i18n } from '@kbn/i18n'; export const ELSER_MODEL_ID = '.elser_model_2'; @@ -308,14 +309,7 @@ export type InferenceServiceSettings = }; }; -export type InferenceAPIConfigResponse = { - // Refers to a deployment id - inference_id: string; - task_type: 'sparse_embedding' | 'text_embedding'; - task_settings: { - model?: string; - }; -} & InferenceServiceSettings; +export type InferenceAPIConfigResponse = InferenceInferenceEndpointInfo & InferenceServiceSettings; export function isLocalModel( model: InferenceServiceSettings diff --git a/x-pack/packages/observability/alert_details/src/hooks/use_alerts_history.test.tsx b/x-pack/packages/observability/alert_details/src/hooks/use_alerts_history.test.tsx index 82ced89354006..2707a0cecd185 100644 --- a/x-pack/packages/observability/alert_details/src/hooks/use_alerts_history.test.tsx +++ b/x-pack/packages/observability/alert_details/src/hooks/use_alerts_history.test.tsx @@ -5,10 +5,9 @@ * 2.0. */ import React from 'react'; -import { HttpSetup } from '@kbn/core-http-browser'; -import { AlertConsumers } from '@kbn/rule-data-utils'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { act, renderHook } from '@testing-library/react-hooks'; +import { httpServiceMock } from '@kbn/core-http-browser-mocks'; import { type UseAlertsHistory, useAlertsHistory, @@ -25,6 +24,11 @@ const queryClient = new QueryClient({ queries: { retry: false, cacheTime: 0 }, }, }); + +const mockServices = { + http: httpServiceMock.createStartContract(), +}; + const wrapper = ({ children }: any) => ( {children} ); @@ -34,7 +38,7 @@ describe('useAlertsHistory', () => { const end = '2023-05-10T00:00:00.000Z'; const ruleId = 'cfd36e60-ef22-11ed-91eb-b7893acacfe2'; - afterEach(() => { + beforeEach(() => { jest.clearAllMocks(); }); @@ -44,7 +48,7 @@ describe('useAlertsHistory', () => { () => useAlertsHistory({ http, - featureIds: [AlertConsumers.APM], + ruleTypeIds: ['apm'], ruleId, dateRange: { from: start, to: end }, }), @@ -61,16 +65,13 @@ describe('useAlertsHistory', () => { }); it('returns no data when API error', async () => { - const http = { - post: jest.fn().mockImplementation(() => { - throw new Error('ES error'); - }), - } as unknown as HttpSetup; + mockServices.http.post.mockRejectedValueOnce(new Error('ES error')); + const { result, waitFor } = renderHook( () => useAlertsHistory({ - http, - featureIds: [AlertConsumers.APM], + ...mockServices, + ruleTypeIds: ['apm'], ruleId, dateRange: { from: start, to: end }, }), @@ -87,54 +88,53 @@ describe('useAlertsHistory', () => { }); it('returns the alert history chart data', async () => { - const http = { - post: jest.fn().mockResolvedValue({ - hits: { total: { value: 32, relation: 'eq' }, max_score: null, hits: [] }, - aggregations: { - avgTimeToRecoverUS: { doc_count: 28, recoveryTime: { value: 134959464.2857143 } }, - histogramTriggeredAlerts: { - buckets: [ - { key_as_string: '2023-04-10T00:00:00.000Z', key: 1681084800000, doc_count: 0 }, - { key_as_string: '2023-04-11T00:00:00.000Z', key: 1681171200000, doc_count: 0 }, - { key_as_string: '2023-04-12T00:00:00.000Z', key: 1681257600000, doc_count: 0 }, - { key_as_string: '2023-04-13T00:00:00.000Z', key: 1681344000000, doc_count: 0 }, - { key_as_string: '2023-04-14T00:00:00.000Z', key: 1681430400000, doc_count: 0 }, - { key_as_string: '2023-04-15T00:00:00.000Z', key: 1681516800000, doc_count: 0 }, - { key_as_string: '2023-04-16T00:00:00.000Z', key: 1681603200000, doc_count: 0 }, - { key_as_string: '2023-04-17T00:00:00.000Z', key: 1681689600000, doc_count: 0 }, - { key_as_string: '2023-04-18T00:00:00.000Z', key: 1681776000000, doc_count: 0 }, - { key_as_string: '2023-04-19T00:00:00.000Z', key: 1681862400000, doc_count: 0 }, - { key_as_string: '2023-04-20T00:00:00.000Z', key: 1681948800000, doc_count: 0 }, - { key_as_string: '2023-04-21T00:00:00.000Z', key: 1682035200000, doc_count: 0 }, - { key_as_string: '2023-04-22T00:00:00.000Z', key: 1682121600000, doc_count: 0 }, - { key_as_string: '2023-04-23T00:00:00.000Z', key: 1682208000000, doc_count: 0 }, - { key_as_string: '2023-04-24T00:00:00.000Z', key: 1682294400000, doc_count: 0 }, - { key_as_string: '2023-04-25T00:00:00.000Z', key: 1682380800000, doc_count: 0 }, - { key_as_string: '2023-04-26T00:00:00.000Z', key: 1682467200000, doc_count: 0 }, - { key_as_string: '2023-04-27T00:00:00.000Z', key: 1682553600000, doc_count: 0 }, - { key_as_string: '2023-04-28T00:00:00.000Z', key: 1682640000000, doc_count: 0 }, - { key_as_string: '2023-04-29T00:00:00.000Z', key: 1682726400000, doc_count: 0 }, - { key_as_string: '2023-04-30T00:00:00.000Z', key: 1682812800000, doc_count: 0 }, - { key_as_string: '2023-05-01T00:00:00.000Z', key: 1682899200000, doc_count: 0 }, - { key_as_string: '2023-05-02T00:00:00.000Z', key: 1682985600000, doc_count: 0 }, - { key_as_string: '2023-05-03T00:00:00.000Z', key: 1683072000000, doc_count: 0 }, - { key_as_string: '2023-05-04T00:00:00.000Z', key: 1683158400000, doc_count: 0 }, - { key_as_string: '2023-05-05T00:00:00.000Z', key: 1683244800000, doc_count: 0 }, - { key_as_string: '2023-05-06T00:00:00.000Z', key: 1683331200000, doc_count: 0 }, - { key_as_string: '2023-05-07T00:00:00.000Z', key: 1683417600000, doc_count: 0 }, - { key_as_string: '2023-05-08T00:00:00.000Z', key: 1683504000000, doc_count: 0 }, - { key_as_string: '2023-05-09T00:00:00.000Z', key: 1683590400000, doc_count: 0 }, - { key_as_string: '2023-05-10T00:00:00.000Z', key: 1683676800000, doc_count: 32 }, - ], - }, + mockServices.http.post.mockResolvedValueOnce({ + hits: { total: { value: 32, relation: 'eq' }, max_score: null, hits: [] }, + aggregations: { + avgTimeToRecoverUS: { doc_count: 28, recoveryTime: { value: 134959464.2857143 } }, + histogramTriggeredAlerts: { + buckets: [ + { key_as_string: '2023-04-10T00:00:00.000Z', key: 1681084800000, doc_count: 0 }, + { key_as_string: '2023-04-11T00:00:00.000Z', key: 1681171200000, doc_count: 0 }, + { key_as_string: '2023-04-12T00:00:00.000Z', key: 1681257600000, doc_count: 0 }, + { key_as_string: '2023-04-13T00:00:00.000Z', key: 1681344000000, doc_count: 0 }, + { key_as_string: '2023-04-14T00:00:00.000Z', key: 1681430400000, doc_count: 0 }, + { key_as_string: '2023-04-15T00:00:00.000Z', key: 1681516800000, doc_count: 0 }, + { key_as_string: '2023-04-16T00:00:00.000Z', key: 1681603200000, doc_count: 0 }, + { key_as_string: '2023-04-17T00:00:00.000Z', key: 1681689600000, doc_count: 0 }, + { key_as_string: '2023-04-18T00:00:00.000Z', key: 1681776000000, doc_count: 0 }, + { key_as_string: '2023-04-19T00:00:00.000Z', key: 1681862400000, doc_count: 0 }, + { key_as_string: '2023-04-20T00:00:00.000Z', key: 1681948800000, doc_count: 0 }, + { key_as_string: '2023-04-21T00:00:00.000Z', key: 1682035200000, doc_count: 0 }, + { key_as_string: '2023-04-22T00:00:00.000Z', key: 1682121600000, doc_count: 0 }, + { key_as_string: '2023-04-23T00:00:00.000Z', key: 1682208000000, doc_count: 0 }, + { key_as_string: '2023-04-24T00:00:00.000Z', key: 1682294400000, doc_count: 0 }, + { key_as_string: '2023-04-25T00:00:00.000Z', key: 1682380800000, doc_count: 0 }, + { key_as_string: '2023-04-26T00:00:00.000Z', key: 1682467200000, doc_count: 0 }, + { key_as_string: '2023-04-27T00:00:00.000Z', key: 1682553600000, doc_count: 0 }, + { key_as_string: '2023-04-28T00:00:00.000Z', key: 1682640000000, doc_count: 0 }, + { key_as_string: '2023-04-29T00:00:00.000Z', key: 1682726400000, doc_count: 0 }, + { key_as_string: '2023-04-30T00:00:00.000Z', key: 1682812800000, doc_count: 0 }, + { key_as_string: '2023-05-01T00:00:00.000Z', key: 1682899200000, doc_count: 0 }, + { key_as_string: '2023-05-02T00:00:00.000Z', key: 1682985600000, doc_count: 0 }, + { key_as_string: '2023-05-03T00:00:00.000Z', key: 1683072000000, doc_count: 0 }, + { key_as_string: '2023-05-04T00:00:00.000Z', key: 1683158400000, doc_count: 0 }, + { key_as_string: '2023-05-05T00:00:00.000Z', key: 1683244800000, doc_count: 0 }, + { key_as_string: '2023-05-06T00:00:00.000Z', key: 1683331200000, doc_count: 0 }, + { key_as_string: '2023-05-07T00:00:00.000Z', key: 1683417600000, doc_count: 0 }, + { key_as_string: '2023-05-08T00:00:00.000Z', key: 1683504000000, doc_count: 0 }, + { key_as_string: '2023-05-09T00:00:00.000Z', key: 1683590400000, doc_count: 0 }, + { key_as_string: '2023-05-10T00:00:00.000Z', key: 1683676800000, doc_count: 32 }, + ], }, - }), - } as unknown as HttpSetup; + }, + }); + const { result, waitFor } = renderHook( () => useAlertsHistory({ - http, - featureIds: [AlertConsumers.APM], + ...mockServices, + ruleTypeIds: ['apm'], ruleId, dateRange: { from: start, to: end }, }), @@ -155,26 +155,24 @@ describe('useAlertsHistory', () => { it('calls http post including instanceId query', async () => { const controller = new AbortController(); const signal = controller.signal; - const mockedHttpPost = jest.fn(); - const http = { - post: mockedHttpPost.mockResolvedValue({ - hits: { total: { value: 32, relation: 'eq' }, max_score: null, hits: [] }, - aggregations: { - avgTimeToRecoverUS: { doc_count: 28, recoveryTime: { value: 134959464.2857143 } }, - histogramTriggeredAlerts: { - buckets: [ - { key_as_string: '2023-04-10T00:00:00.000Z', key: 1681084800000, doc_count: 0 }, - ], - }, + mockServices.http.post.mockResolvedValueOnce({ + hits: { total: { value: 32, relation: 'eq' }, max_score: null, hits: [] }, + aggregations: { + avgTimeToRecoverUS: { doc_count: 28, recoveryTime: { value: 134959464.2857143 } }, + histogramTriggeredAlerts: { + buckets: [ + { key_as_string: '2023-04-10T00:00:00.000Z', key: 1681084800000, doc_count: 0 }, + ], }, - }), - } as unknown as HttpSetup; + }, + }); const { result, waitFor } = renderHook( () => useAlertsHistory({ - http, - featureIds: [AlertConsumers.APM], + ...mockServices, + ruleTypeIds: ['apm'], + consumers: ['foo'], ruleId, dateRange: { from: start, to: end }, instanceId: 'instance-1', @@ -187,9 +185,10 @@ describe('useAlertsHistory', () => { await act(async () => { await waitFor(() => result.current.isSuccess); }); - expect(mockedHttpPost).toBeCalledWith('/internal/rac/alerts/find', { + + expect(mockServices.http.post).toBeCalledWith('/internal/rac/alerts/find', { body: - '{"size":0,"feature_ids":["apm"],"query":{"bool":{"must":[' + + '{"size":0,"rule_type_ids":["apm"],"consumers":["foo"],"query":{"bool":{"must":[' + '{"term":{"kibana.alert.rule.uuid":"cfd36e60-ef22-11ed-91eb-b7893acacfe2"}},' + '{"term":{"kibana.alert.instance.id":"instance-1"}},' + '{"range":{"kibana.alert.time_range":{"from":"2023-04-10T00:00:00.000Z","to":"2023-05-10T00:00:00.000Z"}}}]}},' + @@ -204,26 +203,23 @@ describe('useAlertsHistory', () => { it('calls http post without * instanceId query', async () => { const controller = new AbortController(); const signal = controller.signal; - const mockedHttpPost = jest.fn(); - const http = { - post: mockedHttpPost.mockResolvedValue({ - hits: { total: { value: 32, relation: 'eq' }, max_score: null, hits: [] }, - aggregations: { - avgTimeToRecoverUS: { doc_count: 28, recoveryTime: { value: 134959464.2857143 } }, - histogramTriggeredAlerts: { - buckets: [ - { key_as_string: '2023-04-10T00:00:00.000Z', key: 1681084800000, doc_count: 0 }, - ], - }, + mockServices.http.post.mockResolvedValueOnce({ + hits: { total: { value: 32, relation: 'eq' }, max_score: null, hits: [] }, + aggregations: { + avgTimeToRecoverUS: { doc_count: 28, recoveryTime: { value: 134959464.2857143 } }, + histogramTriggeredAlerts: { + buckets: [ + { key_as_string: '2023-04-10T00:00:00.000Z', key: 1681084800000, doc_count: 0 }, + ], }, - }), - } as unknown as HttpSetup; + }, + }); const { result, waitFor } = renderHook( () => useAlertsHistory({ - http, - featureIds: [AlertConsumers.APM], + ...mockServices, + ruleTypeIds: ['apm'], ruleId, dateRange: { from: start, to: end }, instanceId: '*', @@ -236,9 +232,10 @@ describe('useAlertsHistory', () => { await act(async () => { await waitFor(() => result.current.isSuccess); }); - expect(mockedHttpPost).toBeCalledWith('/internal/rac/alerts/find', { + + expect(mockServices.http.post).toBeCalledWith('/internal/rac/alerts/find', { body: - '{"size":0,"feature_ids":["apm"],"query":{"bool":{"must":[' + + '{"size":0,"rule_type_ids":["apm"],"query":{"bool":{"must":[' + '{"term":{"kibana.alert.rule.uuid":"cfd36e60-ef22-11ed-91eb-b7893acacfe2"}},' + '{"range":{"kibana.alert.time_range":{"from":"2023-04-10T00:00:00.000Z","to":"2023-05-10T00:00:00.000Z"}}}]}},' + '"aggs":{"histogramTriggeredAlerts":{"date_histogram":{"field":"kibana.alert.start","fixed_interval":"1d",' + diff --git a/x-pack/packages/observability/alert_details/src/hooks/use_alerts_history.ts b/x-pack/packages/observability/alert_details/src/hooks/use_alerts_history.ts index 193acb63f845b..d045fab2e635b 100644 --- a/x-pack/packages/observability/alert_details/src/hooks/use_alerts_history.ts +++ b/x-pack/packages/observability/alert_details/src/hooks/use_alerts_history.ts @@ -14,14 +14,14 @@ import { ALERT_START, ALERT_STATUS, ALERT_TIME_RANGE, - ValidFeatureId, } from '@kbn/rule-data-utils'; import { BASE_RAC_ALERTS_API_PATH } from '@kbn/rule-registry-plugin/common'; import { useQuery } from '@tanstack/react-query'; export interface Props { http: HttpSetup | undefined; - featureIds: ValidFeatureId[]; + ruleTypeIds: string[]; + consumers?: string[]; ruleId: string; dateRange: { from: string; @@ -49,13 +49,15 @@ export const EMPTY_ALERTS_HISTORY = { }; export function useAlertsHistory({ - featureIds, + ruleTypeIds, + consumers, ruleId, dateRange, http, instanceId, }: Props): UseAlertsHistory { - const enabled = !!featureIds.length; + const enabled = !!ruleTypeIds.length; + const { isInitialLoading, isLoading, isError, isSuccess, isRefetching, data } = useQuery({ queryKey: ['useAlertsHistory'], queryFn: async ({ signal }) => { @@ -63,7 +65,8 @@ export function useAlertsHistory({ throw new Error('Http client is missing'); } return fetchTriggeredAlertsHistory({ - featureIds, + ruleTypeIds, + consumers, http, ruleId, dateRange, @@ -74,6 +77,7 @@ export function useAlertsHistory({ refetchOnWindowFocus: false, enabled, }); + return { data: isInitialLoading ? EMPTY_ALERTS_HISTORY : data ?? EMPTY_ALERTS_HISTORY, isLoading: enabled && (isInitialLoading || isLoading || isRefetching), @@ -101,14 +105,16 @@ interface AggsESResponse { } export async function fetchTriggeredAlertsHistory({ - featureIds, + ruleTypeIds, + consumers, http, ruleId, dateRange, signal, instanceId, }: { - featureIds: ValidFeatureId[]; + ruleTypeIds: string[]; + consumers?: string[]; http: HttpSetup; ruleId: string; dateRange: { @@ -123,7 +129,8 @@ export async function fetchTriggeredAlertsHistory({ signal, body: JSON.stringify({ size: 0, - feature_ids: featureIds, + rule_type_ids: ruleTypeIds, + consumers, query: { bool: { must: [ diff --git a/x-pack/packages/observability/alert_details/tsconfig.json b/x-pack/packages/observability/alert_details/tsconfig.json index a349651fdff7e..d1b4c3fb2ce23 100644 --- a/x-pack/packages/observability/alert_details/tsconfig.json +++ b/x-pack/packages/observability/alert_details/tsconfig.json @@ -17,9 +17,9 @@ ], "kbn_references": [ "@kbn/i18n", - "@kbn/core-http-browser", "@kbn/rule-data-utils", "@kbn/core", - "@kbn/rule-registry-plugin" + "@kbn/rule-registry-plugin", + "@kbn/core-http-browser-mocks" ] } diff --git a/x-pack/packages/security-solution/distribution_bar/src/distribution_bar.tsx b/x-pack/packages/security-solution/distribution_bar/src/distribution_bar.tsx index c4395ba1d13d1..0942cace23267 100644 --- a/x-pack/packages/security-solution/distribution_bar/src/distribution_bar.tsx +++ b/x-pack/packages/security-solution/distribution_bar/src/distribution_bar.tsx @@ -12,7 +12,15 @@ import { css } from '@emotion/react'; /** DistributionBar component props */ export interface DistributionBarProps { /** distribution data points */ - stats: Array<{ key: string; count: number; color: string; label?: React.ReactNode }>; + stats: Array<{ + key: string; + count: number; + color: string; + label?: React.ReactNode; + isCurrentFilter?: boolean; + filter?: () => void; + reset?: (event: React.MouseEvent) => void; + }>; /** hide the label above the bar at first render */ hideLastTooltip?: boolean; /** data-test-subj used for querying the component in tests */ @@ -156,7 +164,19 @@ export const DistributionBar: React.FC = React.memo(functi const prettyNumber = numeral(stat.count).format('0,0a'); return ( -
        +
        { + if (event.key === 'Enter' || event.key === ' ') { + stat.filter?.(); + } + }} + tabIndex={0} + role="button" + >
        = React.memo(functi {stat.label ? stat.label : stat.key} + {stat.isCurrentFilter ? ( + + + + ) : undefined} diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_context/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_context/index.test.tsx index a82bf7d6c432b..7fbab73c1025a 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_context/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_context/index.test.tsx @@ -7,7 +7,7 @@ import { Theme } from '@elastic/charts'; import { notificationServiceMock } from '@kbn/core-notifications-browser-mocks'; -import { renderHook } from '@testing-library/react-hooks'; +import { renderHook } from '@testing-library/react'; import React, { FC, PropsWithChildren } from 'react'; import { DataQualityProvider, useDataQualityContext } from '.'; @@ -78,9 +78,7 @@ describe('DataQualityContext', () => { }); test('it throws an error when useDataQualityContext hook is used without a DataQualityContext', () => { - const { result } = renderHook(useDataQualityContext); - - expect(result.error).toEqual( + expect(() => renderHook(useDataQualityContext)).toThrow( new Error('useDataQualityContext must be used within a DataQualityProvider') ); }); diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_historical_results/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_historical_results/index.test.tsx index 36a1a24192e99..19ab082c03477 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_historical_results/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_historical_results/index.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { act, renderHook } from '@testing-library/react-hooks'; +import { renderHook, act } from '@testing-library/react'; import { mockHistoricalResult } from '../../../../../mock/historical_results/mock_historical_results_response'; import { TestDataQualityProviders } from '../../../../../mock/test_providers/test_providers'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_ilm_explain/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_ilm_explain/index.test.tsx index 93309af1bc0e3..0929278e3429a 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_ilm_explain/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_ilm_explain/index.test.tsx @@ -5,13 +5,13 @@ * 2.0. */ -import { renderHook } from '@testing-library/react-hooks'; +import { waitFor, renderHook } from '@testing-library/react'; import React from 'react'; import { DataQualityProvider } from '../../../../../data_quality_context'; import { mockIlmExplain } from '../../../../../mock/ilm_explain/mock_ilm_explain'; import { ERROR_LOADING_ILM_EXPLAIN } from '../../../../../translations'; -import { useIlmExplain, UseIlmExplain } from '.'; +import { useIlmExplain } from '.'; import { notificationServiceMock } from '@kbn/core-notifications-browser-mocks'; import { Theme } from '@elastic/charts'; @@ -23,60 +23,62 @@ const mockTelemetryEvents = { reportDataQualityCheckAllCompleted: mockReportDataQualityCheckAllClicked, }; const { toasts } = notificationServiceMock.createSetupContract(); -const ContextWrapper: React.FC<{ children: React.ReactNode; isILMAvailable: boolean }> = ({ +const ContextWrapper: React.FC> = ({ children, isILMAvailable = true, -}) => ( - true)} - endDate={null} - formatBytes={jest.fn()} - formatNumber={jest.fn()} - isAssistantEnabled={true} - lastChecked={'2023-03-28T22:27:28.159Z'} - openCreateCaseFlyout={jest.fn()} - patterns={['auditbeat-*']} - setLastChecked={jest.fn()} - startDate={null} - theme={{ - background: { - color: '#000', - }, - }} - baseTheme={ - { +}) => { + return ( + true)} + endDate={null} + formatBytes={jest.fn()} + formatNumber={jest.fn()} + isAssistantEnabled={true} + lastChecked={'2023-03-28T22:27:28.159Z'} + openCreateCaseFlyout={jest.fn()} + patterns={['auditbeat-*']} + setLastChecked={jest.fn()} + startDate={null} + theme={{ background: { color: '#000', }, - } as Theme - } - ilmPhases={['hot', 'warm', 'unmanaged']} - selectedIlmPhaseOptions={[ - { - label: 'Hot', - value: 'hot', - }, - { - label: 'Warm', - value: 'warm', - }, - { - label: 'Unmanaged', - value: 'unmanaged', - }, - ]} - setSelectedIlmPhaseOptions={jest.fn()} - defaultStartTime={'now-7d'} - defaultEndTime={'now'} - > - {children} - -); + }} + baseTheme={ + { + background: { + color: '#000', + }, + } as Theme + } + ilmPhases={['hot', 'warm', 'unmanaged']} + selectedIlmPhaseOptions={[ + { + label: 'Hot', + value: 'hot', + }, + { + label: 'Warm', + value: 'warm', + }, + { + label: 'Unmanaged', + value: 'unmanaged', + }, + ]} + setSelectedIlmPhaseOptions={jest.fn()} + defaultStartTime={'now-7d'} + defaultEndTime={'now'} + > + {children} + + ); +}; const pattern = 'packetbeat-*'; @@ -86,125 +88,107 @@ describe('useIlmExplain', () => { }); describe('successful response from the ilm api', () => { - let ilmExplainResult: UseIlmExplain | undefined; - - beforeEach(async () => { + function setup() { mockHttpFetch.mockResolvedValue(mockIlmExplain); - - const { result, waitForNextUpdate } = renderHook(() => useIlmExplain(pattern), { + return renderHook(() => useIlmExplain(pattern), { wrapper: ContextWrapper, }); - await waitForNextUpdate(); - ilmExplainResult = await result.current; - }); + } test('it returns the expected ilmExplain map', async () => { - expect(ilmExplainResult?.ilmExplain).toEqual(mockIlmExplain); + const { result } = setup(); + await waitFor(() => { + expect(result.current.loading).toBe(false); + expect(result.current.ilmExplain).toEqual(mockIlmExplain); + }); }); test('it returns loading: false, because the data has loaded', async () => { - expect(ilmExplainResult?.loading).toBe(false); + const { result } = setup(); + + await waitFor(() => { + expect(result.current.loading).toBe(true); + }); + + await waitFor(() => { + expect(result.current.loading).toBe(false); + }); }); test('it returns a null error, because no errors occurred', async () => { - expect(ilmExplainResult?.error).toBeNull(); + const { result } = setup(); + await waitFor(() => { + expect(result.current.loading).toBe(false); + expect(result.current.error).toBeNull(); + }); }); }); describe('skip ilm api when isILMAvailable is false', () => { - let ilmExplainResult: UseIlmExplain | undefined; - - beforeEach(async () => { - const { result, waitForNextUpdate } = renderHook(() => useIlmExplain(pattern), { - wrapper: ({ children }: React.PropsWithChildren<{}>) => ( - true)} - endDate={null} - formatBytes={jest.fn()} - formatNumber={jest.fn()} - isAssistantEnabled={true} - lastChecked={'2023-03-28T22:27:28.159Z'} - openCreateCaseFlyout={jest.fn()} - patterns={['auditbeat-*']} - setLastChecked={jest.fn()} - startDate={null} - theme={{ - background: { - color: '#000', - }, - }} - baseTheme={ - { - background: { - color: '#000', - }, - } as Theme - } - ilmPhases={['hot', 'warm', 'unmanaged']} - selectedIlmPhaseOptions={[ - { - label: 'Hot', - value: 'hot', - }, - { - label: 'Warm', - value: 'warm', - }, - { - label: 'Unmanaged', - value: 'unmanaged', - }, - ]} - setSelectedIlmPhaseOptions={jest.fn()} - defaultStartTime={'now-7d'} - defaultEndTime={'now'} - > - {children} - - ), + function setup() { + mockHttpFetch.mockResolvedValue(mockIlmExplain); + return renderHook(() => useIlmExplain(pattern), { + wrapper: (props) => , }); - await waitForNextUpdate(); - ilmExplainResult = await result.current; - }); + } test('it returns the expected ilmExplain map', async () => { - expect(ilmExplainResult?.ilmExplain).toEqual(null); + const { result } = setup(); + await waitFor(() => { + expect(result.current.loading).toBe(false); + expect(result.current.ilmExplain).toEqual(null); + }); }); test('it returns loading: false, because the request is aborted', async () => { - expect(ilmExplainResult?.loading).toBe(false); + const { result } = setup(); + + await waitFor(() => { + expect(result.current.loading).toBe(true); + }); + + await waitFor(() => { + expect(result.current.loading).toBe(false); + }); }); }); describe('fetch rejects with an error', () => { - let ilmExplainResult: UseIlmExplain | undefined; const errorMessage = 'simulated error'; - - beforeEach(async () => { + function setup() { mockHttpFetch.mockRejectedValue(new Error(errorMessage)); - - const { result, waitForNextUpdate } = renderHook(() => useIlmExplain(pattern), { + return renderHook(() => useIlmExplain(pattern), { wrapper: ContextWrapper, }); - await waitForNextUpdate(); - ilmExplainResult = await result.current; - }); + } test('it returns a null ilmExplain, because an error occurred', async () => { - expect(ilmExplainResult?.ilmExplain).toBeNull(); + const { result } = setup(); + + await waitFor(() => { + expect(result.current.loading).toBe(false); + expect(result.current.ilmExplain).toBeNull(); + }); }); test('it returns loading: false, because data loading reached a terminal state', async () => { - expect(ilmExplainResult?.loading).toBe(false); + const { result } = setup(); + + await waitFor(() => { + expect(result.current.loading).toBe(true); + }); + + await waitFor(() => { + expect(result.current.loading).toBe(false); + }); }); test('it returns the expected error', async () => { - expect(ilmExplainResult?.error).toEqual(ERROR_LOADING_ILM_EXPLAIN(errorMessage)); + const { result } = setup(); + await waitFor(() => { + expect(result.current.loading).toBe(false); + expect(result.current.error).toEqual(ERROR_LOADING_ILM_EXPLAIN(errorMessage)); + }); }); }); }); diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_stats/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_stats/index.test.tsx index ae4ee9a7bd2c4..0e65d0ccf2e1b 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_stats/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/hooks/use_stats/index.test.tsx @@ -5,12 +5,12 @@ * 2.0. */ -import { renderHook } from '@testing-library/react-hooks'; +import { waitFor, renderHook } from '@testing-library/react'; import React, { FC, PropsWithChildren } from 'react'; import { DataQualityProvider } from '../../../../../data_quality_context'; import { ERROR_LOADING_STATS } from '../../../../../translations'; -import { useStats, UseStats } from '.'; +import { useStats } from '.'; import { notificationServiceMock } from '@kbn/core-notifications-browser-mocks'; import { Theme } from '@elastic/charts'; import { mockStatsAuditbeatIndex } from '../../../../../mock/stats/mock_stats_auditbeat_index'; @@ -24,63 +24,14 @@ const mockTelemetryEvents = { }; const { toasts } = notificationServiceMock.createSetupContract(); -const ContextWrapper: FC> = ({ children }) => ( +const ContextWrapper: FC> = ({ + children, + isILMAvailable = true, +}) => ( true)} - endDate={null} - formatBytes={jest.fn()} - formatNumber={jest.fn()} - isAssistantEnabled={true} - lastChecked={'2023-03-28T22:27:28.159Z'} - openCreateCaseFlyout={jest.fn()} - patterns={['auditbeat-*']} - setLastChecked={jest.fn()} - startDate={null} - theme={{ - background: { - color: '#000', - }, - }} - baseTheme={ - { - background: { - color: '#000', - }, - } as Theme - } - ilmPhases={['hot', 'warm', 'unmanaged']} - selectedIlmPhaseOptions={[ - { - label: 'Hot', - value: 'hot', - }, - { - label: 'Warm', - value: 'warm', - }, - { - label: 'Unmanaged', - value: 'unmanaged', - }, - ]} - setSelectedIlmPhaseOptions={jest.fn()} - defaultStartTime={'now-7d'} - defaultEndTime={'now'} - > - {children} - -); - -const ContextWrapperILMNotAvailable: FC> = ({ children }) => ( - true)} @@ -141,79 +92,113 @@ describe('useStats', () => { }); describe('query with date range when ILM is not available', () => { - const queryParams = { - isILMAvailable: false, - startDate, - endDate, - }; - - beforeEach(async () => { + test('it calls the stats api with the expected params', async () => { mockHttpFetch.mockResolvedValue(mockStatsAuditbeatIndex); - const { waitForNextUpdate } = renderHook(() => useStats({ pattern, startDate, endDate }), { - wrapper: ContextWrapperILMNotAvailable, + const queryParams = { + isILMAvailable: false, + startDate, + endDate, + }; + + renderHook(() => useStats({ pattern, startDate, endDate }), { + wrapper: ({ children }) => ( + {children} + ), + }); + + await waitFor(() => { + expect(mockHttpFetch.mock.calls[0][1].query).toEqual(queryParams); }); - await waitForNextUpdate(); - }); - test(`it calls the stats api with the expected params`, async () => { - expect(mockHttpFetch.mock.calls[0][1].query).toEqual(queryParams); }); }); describe('successful response from the stats api', () => { - let statsResult: UseStats | undefined; - - beforeEach(async () => { + function setup() { mockHttpFetch.mockResolvedValue(mockStatsAuditbeatIndex); - - const { result, waitForNextUpdate } = renderHook(() => useStats(params), { + const { result } = renderHook(() => useStats(params), { wrapper: ContextWrapper, }); - await waitForNextUpdate(); - statsResult = await result.current; - }); + + return result; + } test('it returns the expected stats', async () => { - expect(statsResult?.stats).toEqual(mockStatsAuditbeatIndex); + const result = setup(); + await waitFor(() => { + expect(result.current.loading).toBe(false); + expect(result.current.stats).toEqual(mockStatsAuditbeatIndex); + }); }); test('it returns loading: false, because the data has loaded', async () => { - expect(statsResult?.loading).toBe(false); + const result = setup(); + + await waitFor(() => { + expect(result.current.loading).toBe(true); + }); + + await waitFor(() => { + expect(result.current.loading).toBe(false); + }); }); test('it returns a null error, because no errors occurred', async () => { - expect(statsResult?.error).toBeNull(); + const result = setup(); + await waitFor(() => { + expect(result.current.loading).toBe(false); + expect(result.current.error).toBeNull(); + }); }); - test(`it calls the stats api with the expected params`, async () => { - expect(mockHttpFetch.mock.calls[0][1].query).toEqual({ isILMAvailable: true }); + test('it calls the stats api with the expected params', async () => { + setup(); + await waitFor(() => { + expect(mockHttpFetch.mock.calls[0][1].query).toEqual({ isILMAvailable: true }); + }); }); }); describe('fetch rejects with an error', () => { - let statsResult: UseStats | undefined; const errorMessage = 'simulated error'; - beforeEach(async () => { + function setup() { mockHttpFetch.mockRejectedValue(new Error(errorMessage)); - const { result, waitForNextUpdate } = renderHook(() => useStats(params), { + const { result } = renderHook(() => useStats(params), { wrapper: ContextWrapper, }); - await waitForNextUpdate(); - statsResult = await result.current; - }); + + return result; + } test('it returns null stats, because an error occurred', async () => { - expect(statsResult?.stats).toBeNull(); + const result = setup(); + await waitFor(() => { + expect(result.current.loading).toBe(false); + expect(result.current.stats).toBeNull(); + }); }); test('it returns loading: false, because data loading reached a terminal state', async () => { - expect(statsResult?.loading).toBe(false); + const result = setup(); + + await waitFor(() => { + expect(result.current.loading).toBe(true); + }); + + await waitFor(() => { + expect(result.current.loading).toBe(false); + }); }); test('it returns the expected error', async () => { - expect(statsResult?.error).toEqual(ERROR_LOADING_STATS(errorMessage)); + const result = setup(); + + await waitFor(() => { + expect(result.current.loading).toBe(false); + expect(result.current.error).toEqual(ERROR_LOADING_STATS(errorMessage)); + }); }); }); }); diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/hooks/use_current_window_width/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/hooks/use_current_window_width/index.test.tsx index ffbeb191e5582..1a6d6da746835 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/hooks/use_current_window_width/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/data_quality_details/indices_details/pattern/index_check_flyout/hooks/use_current_window_width/index.test.tsx @@ -5,10 +5,8 @@ * 2.0. */ -import { renderHook, act } from '@testing-library/react-hooks'; - import { useCurrentWindowWidth } from '.'; -import { fireEvent } from '@testing-library/react'; +import { fireEvent, renderHook, act } from '@testing-library/react'; describe('useCurrentWidthWidth', () => { beforeEach(() => { @@ -20,7 +18,6 @@ describe('useCurrentWidthWidth', () => { }); it('return current window width', () => { const { result } = renderHook(() => useCurrentWindowWidth()); - expect(result.error).toBeUndefined(); expect(result.current).toBe(window.innerWidth); }); diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_abort_controller_ref/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_abort_controller_ref/index.test.tsx index 98e617ca3a909..2d52c30541e3f 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_abort_controller_ref/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_abort_controller_ref/index.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { renderHook } from '@testing-library/react-hooks'; +import { renderHook } from '@testing-library/react'; import { useAbortControllerRef } from '.'; describe('useAbortControllerRef', () => { diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_indices_check/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_indices_check/index.test.tsx index f16803936794d..aef164ed71654 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_indices_check/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_indices_check/index.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { act, renderHook } from '@testing-library/react-hooks'; +import { act, waitFor, renderHook } from '@testing-library/react'; import { useIndicesCheck } from '.'; @@ -82,9 +82,7 @@ describe('useIndicesCheck', () => { describe('when checkIndex completes', () => { it('should set correct data', async () => { - const { result, waitFor } = renderHook(() => - useIndicesCheck({ onCheckCompleted: jest.fn() }) - ); + const { result } = renderHook(() => useIndicesCheck({ onCheckCompleted: jest.fn() })); const httpFetchMock = jest.fn((route) => { if (route.startsWith('/internal/ecs_data_quality_dashboard/mappings')) { @@ -124,9 +122,7 @@ describe('useIndicesCheck', () => { describe('errors', () => { describe('when mappings request errors', () => { it('should set mappingsError', async () => { - const { result, waitFor } = renderHook(() => - useIndicesCheck({ onCheckCompleted: jest.fn() }) - ); + const { result } = renderHook(() => useIndicesCheck({ onCheckCompleted: jest.fn() })); const httpFetchMock = jest.fn((route) => { if (route.startsWith('/internal/ecs_data_quality_dashboard/mappings')) { @@ -160,9 +156,7 @@ describe('useIndicesCheck', () => { describe('when unallowed values request errors', () => { it('should set unallowedValuesError', async () => { - const { result, waitFor } = renderHook(() => - useIndicesCheck({ onCheckCompleted: jest.fn() }) - ); + const { result } = renderHook(() => useIndicesCheck({ onCheckCompleted: jest.fn() })); const httpFetchMock = jest.fn((route) => { if (route.startsWith('/internal/ecs_data_quality_dashboard/mappings')) { @@ -232,9 +226,7 @@ describe('useIndicesCheck', () => { onStart?.(); }); - const { result, waitFor } = renderHook(() => - useIndicesCheck({ onCheckCompleted: jest.fn() }) - ); + const { result } = renderHook(() => useIndicesCheck({ onCheckCompleted: jest.fn() })); act(() => result.current.checkIndex({ @@ -257,7 +249,7 @@ describe('useIndicesCheck', () => { }); describe('when mappings are loading', () => { - it('it should set isLoadingMappings to true', () => { + it('it should set isLoadingMappings to true', async () => { const { checkIndexSpy } = getSpies(); checkIndexSpy.mockImplementation(async ({ onStart, onLoadMappingsStart }) => { @@ -265,9 +257,7 @@ describe('useIndicesCheck', () => { onLoadMappingsStart?.(); }); - const { result, waitFor } = renderHook(() => - useIndicesCheck({ onCheckCompleted: jest.fn() }) - ); + const { result } = renderHook(() => useIndicesCheck({ onCheckCompleted: jest.fn() })); act(() => result.current.checkIndex({ @@ -280,7 +270,7 @@ describe('useIndicesCheck', () => { }) ); - waitFor(() => + await waitFor(() => expect(result.current.checkState['auditbeat-custom-index-1']).toEqual({ ...getInitialCheckStateValue(), isChecking: true, diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_is_mounted_ref/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_is_mounted_ref/index.test.tsx index f32beafe61efe..e49d0f7b3323f 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_is_mounted_ref/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_is_mounted_ref/index.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { act, renderHook } from '@testing-library/react-hooks'; +import { renderHook, act } from '@testing-library/react'; import { useIsMountedRef } from '.'; diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_results_rollup/hooks/use_stored_pattern_results/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_results_rollup/hooks/use_stored_pattern_results/index.test.tsx index 5f90890eea693..9642838371ea2 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_results_rollup/hooks/use_stored_pattern_results/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_results_rollup/hooks/use_stored_pattern_results/index.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { renderHook } from '@testing-library/react-hooks'; +import { renderHook, waitFor } from '@testing-library/react'; import { notificationServiceMock } from '@kbn/core-notifications-browser-mocks'; import { getHistoricalResultStub } from '../../../../stub/get_historical_result_stub'; @@ -57,7 +57,7 @@ describe('useStoredPatternResults', () => { return Promise.reject(new Error('Invalid path')); }); - const { result, waitFor } = renderHook(() => + const { result } = renderHook(() => useStoredPatternResults({ patterns, toasts: mockToasts, @@ -68,7 +68,7 @@ describe('useStoredPatternResults', () => { }) ); - await waitFor(() => result.current.length > 0); + await waitFor(() => expect(result.current.length).toBeGreaterThan(0)); expect(httpFetch).toHaveBeenCalledTimes(2); @@ -141,7 +141,7 @@ describe('useStoredPatternResults', () => { return Promise.reject(new Error('Invalid path')); }); - const { result, waitFor } = renderHook(() => + const { result } = renderHook(() => useStoredPatternResults({ patterns, toasts: mockToasts, @@ -152,7 +152,7 @@ describe('useStoredPatternResults', () => { }) ); - await waitFor(() => result.current.length > 0); + await waitFor(() => expect(result.current.length).toBeGreaterThan(0)); expect(httpFetch).toHaveBeenCalledTimes(2); diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_results_rollup/index.test.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_results_rollup/index.test.tsx index 7dc74731d66dd..21e342b120109 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_results_rollup/index.test.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality_panel/hooks/use_results_rollup/index.test.tsx @@ -9,7 +9,7 @@ // so when tests are run in different timezones, the results are consistent process.env.TZ = 'UTC'; -import { renderHook, act } from '@testing-library/react-hooks'; +import { renderHook, act } from '@testing-library/react'; import { notificationServiceMock } from '@kbn/core-notifications-browser-mocks'; import type { TelemetryEvents } from '../../types'; diff --git a/x-pack/packages/security-solution/features/src/security/kibana_features.ts b/x-pack/packages/security-solution/features/src/security/kibana_features.ts index 2fb6b11988797..458b8f6fd1f1f 100644 --- a/x-pack/packages/security-solution/features/src/security/kibana_features.ts +++ b/x-pack/packages/security-solution/features/src/security/kibana_features.ts @@ -41,6 +41,11 @@ const SECURITY_RULE_TYPES = [ NEW_TERMS_RULE_TYPE_ID, ]; +const alertingFeatures = SECURITY_RULE_TYPES.map((ruleTypeId) => ({ + ruleTypeId, + consumers: [SERVER_APP_ID], +})); + export const getSecurityBaseKibanaFeature = ({ savedObjects, }: SecurityFeatureParams): BaseKibanaFeatureConfig => ({ @@ -59,7 +64,7 @@ export const getSecurityBaseKibanaFeature = ({ management: { insightsAndAlerting: ['triggersActions'], }, - alerting: SECURITY_RULE_TYPES, + alerting: alertingFeatures, description: i18n.translate( 'securitySolutionPackages.features.featureRegistry.securityGroupDescription', { @@ -87,12 +92,8 @@ export const getSecurityBaseKibanaFeature = ({ read: [], }, alerting: { - rule: { - all: SECURITY_RULE_TYPES, - }, - alert: { - all: SECURITY_RULE_TYPES, - }, + rule: { all: alertingFeatures }, + alert: { all: alertingFeatures }, }, management: { insightsAndAlerting: ['triggersActions'], @@ -109,10 +110,10 @@ export const getSecurityBaseKibanaFeature = ({ }, alerting: { rule: { - read: SECURITY_RULE_TYPES, + read: alertingFeatures, }, alert: { - all: SECURITY_RULE_TYPES, + all: alertingFeatures, }, }, management: { diff --git a/x-pack/packages/security-solution/navigation/src/links.test.tsx b/x-pack/packages/security-solution/navigation/src/links.test.tsx index 8c9bd983e837e..59c2ab3188931 100644 --- a/x-pack/packages/security-solution/navigation/src/links.test.tsx +++ b/x-pack/packages/security-solution/navigation/src/links.test.tsx @@ -5,8 +5,7 @@ * 2.0. */ import React from 'react'; -import { renderHook } from '@testing-library/react-hooks'; -import { render } from '@testing-library/react'; +import { render, renderHook } from '@testing-library/react'; import { useGetLinkUrl, useGetLinkProps, diff --git a/x-pack/packages/security-solution/navigation/src/navigation.test.ts b/x-pack/packages/security-solution/navigation/src/navigation.test.ts index a4290563476ea..bf5013a977fff 100644 --- a/x-pack/packages/security-solution/navigation/src/navigation.test.ts +++ b/x-pack/packages/security-solution/navigation/src/navigation.test.ts @@ -6,8 +6,7 @@ */ import { useGetAppUrl, useNavigateTo } from './navigation'; import { mockGetUrlForApp, mockNavigateToApp, mockNavigateToUrl } from '../mocks/context'; -import { renderHook } from '@testing-library/react-hooks'; -import { fireEvent } from '@testing-library/react'; +import { fireEvent, renderHook } from '@testing-library/react'; jest.mock('./context'); diff --git a/x-pack/packages/security/authorization_core/src/actions/alerting.test.ts b/x-pack/packages/security/authorization_core/src/actions/alerting.test.ts index 1db1030da510a..8f3d48a91005c 100644 --- a/x-pack/packages/security/authorization_core/src/actions/alerting.test.ts +++ b/x-pack/packages/security/authorization_core/src/actions/alerting.test.ts @@ -51,21 +51,3 @@ describe('#get', () => { ); }); }); - -test('#isValid', () => { - const alertingActions = new AlertingActions(); - expect(alertingActions.isValid('alerting:foo-ruleType/consumer/alertingType/bar-operation')).toBe( - true - ); - - expect( - alertingActions.isValid('api:alerting:foo-ruleType/consumer/alertingType/bar-operation') - ).toBe(false); - expect(alertingActions.isValid('api:foo-ruleType/consumer/alertingType/bar-operation')).toBe( - false - ); - - expect(alertingActions.isValid('alerting_foo-ruleType/consumer/alertingType/bar-operation')).toBe( - false - ); -}); diff --git a/x-pack/packages/security/authorization_core/src/actions/alerting.ts b/x-pack/packages/security/authorization_core/src/actions/alerting.ts index 18abac73ef8b7..c1de9a1c65d21 100644 --- a/x-pack/packages/security/authorization_core/src/actions/alerting.ts +++ b/x-pack/packages/security/authorization_core/src/actions/alerting.ts @@ -40,12 +40,4 @@ export class AlertingActions implements AlertingActionsType { return `${this.prefix}${ruleTypeId}/${consumer}/${alertingEntity}/${operation}`; } - - /** - * Checks if the action is a valid alerting action. - * @param action The action string to check. - */ - public isValid(action: string) { - return action.startsWith(this.prefix); - } } diff --git a/x-pack/packages/security/authorization_core/src/privileges/feature_privilege_builder/alerting.test.ts b/x-pack/packages/security/authorization_core/src/privileges/feature_privilege_builder/alerting.test.ts index db4aae642a56f..c5af930cce4f5 100644 --- a/x-pack/packages/security/authorization_core/src/privileges/feature_privilege_builder/alerting.test.ts +++ b/x-pack/packages/security/authorization_core/src/privileges/feature_privilege_builder/alerting.test.ts @@ -28,7 +28,6 @@ describe(`feature_privilege_builder`, () => { read: [], }, }, - savedObject: { all: [], read: [], @@ -59,10 +58,9 @@ describe(`feature_privilege_builder`, () => { alerting: { rule: { all: [], - read: ['alert-type'], + read: [{ ruleTypeId: 'alert-type', consumers: ['my-consumer'] }], }, }, - savedObject: { all: [], read: [], @@ -83,15 +81,15 @@ describe(`feature_privilege_builder`, () => { expect(alertingFeaturePrivileges.getActions(privilege, feature)).toMatchInlineSnapshot(` Array [ - "alerting:alert-type/my-feature/rule/get", - "alerting:alert-type/my-feature/rule/getRuleState", - "alerting:alert-type/my-feature/rule/getAlertSummary", - "alerting:alert-type/my-feature/rule/getExecutionLog", - "alerting:alert-type/my-feature/rule/getActionErrorLog", - "alerting:alert-type/my-feature/rule/find", - "alerting:alert-type/my-feature/rule/getRuleExecutionKPI", - "alerting:alert-type/my-feature/rule/getBackfill", - "alerting:alert-type/my-feature/rule/findBackfill", + "alerting:alert-type/my-consumer/rule/get", + "alerting:alert-type/my-consumer/rule/getRuleState", + "alerting:alert-type/my-consumer/rule/getAlertSummary", + "alerting:alert-type/my-consumer/rule/getExecutionLog", + "alerting:alert-type/my-consumer/rule/getActionErrorLog", + "alerting:alert-type/my-consumer/rule/find", + "alerting:alert-type/my-consumer/rule/getRuleExecutionKPI", + "alerting:alert-type/my-consumer/rule/getBackfill", + "alerting:alert-type/my-consumer/rule/findBackfill", ] `); }); @@ -104,10 +102,9 @@ describe(`feature_privilege_builder`, () => { alerting: { alert: { all: [], - read: ['alert-type'], + read: [{ ruleTypeId: 'alert-type', consumers: ['my-consumer'] }], }, }, - savedObject: { all: [], read: [], @@ -128,10 +125,10 @@ describe(`feature_privilege_builder`, () => { expect(alertingFeaturePrivileges.getActions(privilege, feature)).toMatchInlineSnapshot(` Array [ - "alerting:alert-type/my-feature/alert/get", - "alerting:alert-type/my-feature/alert/find", - "alerting:alert-type/my-feature/alert/getAuthorizedAlertsIndices", - "alerting:alert-type/my-feature/alert/getAlertSummary", + "alerting:alert-type/my-consumer/alert/get", + "alerting:alert-type/my-consumer/alert/find", + "alerting:alert-type/my-consumer/alert/getAuthorizedAlertsIndices", + "alerting:alert-type/my-consumer/alert/getAlertSummary", ] `); }); @@ -144,14 +141,13 @@ describe(`feature_privilege_builder`, () => { alerting: { rule: { all: [], - read: ['alert-type'], + read: [{ ruleTypeId: 'alert-type', consumers: ['my-consumer'] }], }, alert: { all: [], - read: ['alert-type'], + read: [{ ruleTypeId: 'alert-type', consumers: ['my-consumer'] }], }, }, - savedObject: { all: [], read: [], @@ -172,19 +168,19 @@ describe(`feature_privilege_builder`, () => { expect(alertingFeaturePrivileges.getActions(privilege, feature)).toMatchInlineSnapshot(` Array [ - "alerting:alert-type/my-feature/rule/get", - "alerting:alert-type/my-feature/rule/getRuleState", - "alerting:alert-type/my-feature/rule/getAlertSummary", - "alerting:alert-type/my-feature/rule/getExecutionLog", - "alerting:alert-type/my-feature/rule/getActionErrorLog", - "alerting:alert-type/my-feature/rule/find", - "alerting:alert-type/my-feature/rule/getRuleExecutionKPI", - "alerting:alert-type/my-feature/rule/getBackfill", - "alerting:alert-type/my-feature/rule/findBackfill", - "alerting:alert-type/my-feature/alert/get", - "alerting:alert-type/my-feature/alert/find", - "alerting:alert-type/my-feature/alert/getAuthorizedAlertsIndices", - "alerting:alert-type/my-feature/alert/getAlertSummary", + "alerting:alert-type/my-consumer/rule/get", + "alerting:alert-type/my-consumer/rule/getRuleState", + "alerting:alert-type/my-consumer/rule/getAlertSummary", + "alerting:alert-type/my-consumer/rule/getExecutionLog", + "alerting:alert-type/my-consumer/rule/getActionErrorLog", + "alerting:alert-type/my-consumer/rule/find", + "alerting:alert-type/my-consumer/rule/getRuleExecutionKPI", + "alerting:alert-type/my-consumer/rule/getBackfill", + "alerting:alert-type/my-consumer/rule/findBackfill", + "alerting:alert-type/my-consumer/alert/get", + "alerting:alert-type/my-consumer/alert/find", + "alerting:alert-type/my-consumer/alert/getAuthorizedAlertsIndices", + "alerting:alert-type/my-consumer/alert/getAlertSummary", ] `); }); @@ -196,7 +192,7 @@ describe(`feature_privilege_builder`, () => { const privilege: FeatureKibanaPrivileges = { alerting: { rule: { - all: ['alert-type'], + all: [{ ruleTypeId: 'alert-type', consumers: ['my-consumer'] }], read: [], }, }, @@ -221,34 +217,34 @@ describe(`feature_privilege_builder`, () => { expect(alertingFeaturePrivileges.getActions(privilege, feature)).toMatchInlineSnapshot(` Array [ - "alerting:alert-type/my-feature/rule/get", - "alerting:alert-type/my-feature/rule/getRuleState", - "alerting:alert-type/my-feature/rule/getAlertSummary", - "alerting:alert-type/my-feature/rule/getExecutionLog", - "alerting:alert-type/my-feature/rule/getActionErrorLog", - "alerting:alert-type/my-feature/rule/find", - "alerting:alert-type/my-feature/rule/getRuleExecutionKPI", - "alerting:alert-type/my-feature/rule/getBackfill", - "alerting:alert-type/my-feature/rule/findBackfill", - "alerting:alert-type/my-feature/rule/create", - "alerting:alert-type/my-feature/rule/delete", - "alerting:alert-type/my-feature/rule/update", - "alerting:alert-type/my-feature/rule/updateApiKey", - "alerting:alert-type/my-feature/rule/enable", - "alerting:alert-type/my-feature/rule/disable", - "alerting:alert-type/my-feature/rule/muteAll", - "alerting:alert-type/my-feature/rule/unmuteAll", - "alerting:alert-type/my-feature/rule/muteAlert", - "alerting:alert-type/my-feature/rule/unmuteAlert", - "alerting:alert-type/my-feature/rule/snooze", - "alerting:alert-type/my-feature/rule/bulkEdit", - "alerting:alert-type/my-feature/rule/bulkDelete", - "alerting:alert-type/my-feature/rule/bulkEnable", - "alerting:alert-type/my-feature/rule/bulkDisable", - "alerting:alert-type/my-feature/rule/unsnooze", - "alerting:alert-type/my-feature/rule/runSoon", - "alerting:alert-type/my-feature/rule/scheduleBackfill", - "alerting:alert-type/my-feature/rule/deleteBackfill", + "alerting:alert-type/my-consumer/rule/get", + "alerting:alert-type/my-consumer/rule/getRuleState", + "alerting:alert-type/my-consumer/rule/getAlertSummary", + "alerting:alert-type/my-consumer/rule/getExecutionLog", + "alerting:alert-type/my-consumer/rule/getActionErrorLog", + "alerting:alert-type/my-consumer/rule/find", + "alerting:alert-type/my-consumer/rule/getRuleExecutionKPI", + "alerting:alert-type/my-consumer/rule/getBackfill", + "alerting:alert-type/my-consumer/rule/findBackfill", + "alerting:alert-type/my-consumer/rule/create", + "alerting:alert-type/my-consumer/rule/delete", + "alerting:alert-type/my-consumer/rule/update", + "alerting:alert-type/my-consumer/rule/updateApiKey", + "alerting:alert-type/my-consumer/rule/enable", + "alerting:alert-type/my-consumer/rule/disable", + "alerting:alert-type/my-consumer/rule/muteAll", + "alerting:alert-type/my-consumer/rule/unmuteAll", + "alerting:alert-type/my-consumer/rule/muteAlert", + "alerting:alert-type/my-consumer/rule/unmuteAlert", + "alerting:alert-type/my-consumer/rule/snooze", + "alerting:alert-type/my-consumer/rule/bulkEdit", + "alerting:alert-type/my-consumer/rule/bulkDelete", + "alerting:alert-type/my-consumer/rule/bulkEnable", + "alerting:alert-type/my-consumer/rule/bulkDisable", + "alerting:alert-type/my-consumer/rule/unsnooze", + "alerting:alert-type/my-consumer/rule/runSoon", + "alerting:alert-type/my-consumer/rule/scheduleBackfill", + "alerting:alert-type/my-consumer/rule/deleteBackfill", ] `); }); @@ -260,11 +256,10 @@ describe(`feature_privilege_builder`, () => { const privilege: FeatureKibanaPrivileges = { alerting: { alert: { - all: ['alert-type'], + all: [{ ruleTypeId: 'alert-type', consumers: ['my-consumer'] }], read: [], }, }, - savedObject: { all: [], read: [], @@ -285,11 +280,11 @@ describe(`feature_privilege_builder`, () => { expect(alertingFeaturePrivileges.getActions(privilege, feature)).toMatchInlineSnapshot(` Array [ - "alerting:alert-type/my-feature/alert/get", - "alerting:alert-type/my-feature/alert/find", - "alerting:alert-type/my-feature/alert/getAuthorizedAlertsIndices", - "alerting:alert-type/my-feature/alert/getAlertSummary", - "alerting:alert-type/my-feature/alert/update", + "alerting:alert-type/my-consumer/alert/get", + "alerting:alert-type/my-consumer/alert/find", + "alerting:alert-type/my-consumer/alert/getAuthorizedAlertsIndices", + "alerting:alert-type/my-consumer/alert/getAlertSummary", + "alerting:alert-type/my-consumer/alert/update", ] `); }); @@ -301,15 +296,14 @@ describe(`feature_privilege_builder`, () => { const privilege: FeatureKibanaPrivileges = { alerting: { rule: { - all: ['alert-type'], + all: [{ ruleTypeId: 'alert-type', consumers: ['my-consumer'] }], read: [], }, alert: { - all: ['alert-type'], + all: [{ ruleTypeId: 'alert-type', consumers: ['my-consumer'] }], read: [], }, }, - savedObject: { all: [], read: [], @@ -330,39 +324,39 @@ describe(`feature_privilege_builder`, () => { expect(alertingFeaturePrivileges.getActions(privilege, feature)).toMatchInlineSnapshot(` Array [ - "alerting:alert-type/my-feature/rule/get", - "alerting:alert-type/my-feature/rule/getRuleState", - "alerting:alert-type/my-feature/rule/getAlertSummary", - "alerting:alert-type/my-feature/rule/getExecutionLog", - "alerting:alert-type/my-feature/rule/getActionErrorLog", - "alerting:alert-type/my-feature/rule/find", - "alerting:alert-type/my-feature/rule/getRuleExecutionKPI", - "alerting:alert-type/my-feature/rule/getBackfill", - "alerting:alert-type/my-feature/rule/findBackfill", - "alerting:alert-type/my-feature/rule/create", - "alerting:alert-type/my-feature/rule/delete", - "alerting:alert-type/my-feature/rule/update", - "alerting:alert-type/my-feature/rule/updateApiKey", - "alerting:alert-type/my-feature/rule/enable", - "alerting:alert-type/my-feature/rule/disable", - "alerting:alert-type/my-feature/rule/muteAll", - "alerting:alert-type/my-feature/rule/unmuteAll", - "alerting:alert-type/my-feature/rule/muteAlert", - "alerting:alert-type/my-feature/rule/unmuteAlert", - "alerting:alert-type/my-feature/rule/snooze", - "alerting:alert-type/my-feature/rule/bulkEdit", - "alerting:alert-type/my-feature/rule/bulkDelete", - "alerting:alert-type/my-feature/rule/bulkEnable", - "alerting:alert-type/my-feature/rule/bulkDisable", - "alerting:alert-type/my-feature/rule/unsnooze", - "alerting:alert-type/my-feature/rule/runSoon", - "alerting:alert-type/my-feature/rule/scheduleBackfill", - "alerting:alert-type/my-feature/rule/deleteBackfill", - "alerting:alert-type/my-feature/alert/get", - "alerting:alert-type/my-feature/alert/find", - "alerting:alert-type/my-feature/alert/getAuthorizedAlertsIndices", - "alerting:alert-type/my-feature/alert/getAlertSummary", - "alerting:alert-type/my-feature/alert/update", + "alerting:alert-type/my-consumer/rule/get", + "alerting:alert-type/my-consumer/rule/getRuleState", + "alerting:alert-type/my-consumer/rule/getAlertSummary", + "alerting:alert-type/my-consumer/rule/getExecutionLog", + "alerting:alert-type/my-consumer/rule/getActionErrorLog", + "alerting:alert-type/my-consumer/rule/find", + "alerting:alert-type/my-consumer/rule/getRuleExecutionKPI", + "alerting:alert-type/my-consumer/rule/getBackfill", + "alerting:alert-type/my-consumer/rule/findBackfill", + "alerting:alert-type/my-consumer/rule/create", + "alerting:alert-type/my-consumer/rule/delete", + "alerting:alert-type/my-consumer/rule/update", + "alerting:alert-type/my-consumer/rule/updateApiKey", + "alerting:alert-type/my-consumer/rule/enable", + "alerting:alert-type/my-consumer/rule/disable", + "alerting:alert-type/my-consumer/rule/muteAll", + "alerting:alert-type/my-consumer/rule/unmuteAll", + "alerting:alert-type/my-consumer/rule/muteAlert", + "alerting:alert-type/my-consumer/rule/unmuteAlert", + "alerting:alert-type/my-consumer/rule/snooze", + "alerting:alert-type/my-consumer/rule/bulkEdit", + "alerting:alert-type/my-consumer/rule/bulkDelete", + "alerting:alert-type/my-consumer/rule/bulkEnable", + "alerting:alert-type/my-consumer/rule/bulkDisable", + "alerting:alert-type/my-consumer/rule/unsnooze", + "alerting:alert-type/my-consumer/rule/runSoon", + "alerting:alert-type/my-consumer/rule/scheduleBackfill", + "alerting:alert-type/my-consumer/rule/deleteBackfill", + "alerting:alert-type/my-consumer/alert/get", + "alerting:alert-type/my-consumer/alert/find", + "alerting:alert-type/my-consumer/alert/getAuthorizedAlertsIndices", + "alerting:alert-type/my-consumer/alert/getAlertSummary", + "alerting:alert-type/my-consumer/alert/update", ] `); }); @@ -374,11 +368,10 @@ describe(`feature_privilege_builder`, () => { const privilege: FeatureKibanaPrivileges = { alerting: { rule: { - all: ['alert-type'], - read: ['readonly-alert-type'], + all: [{ ruleTypeId: 'alert-type', consumers: ['my-consumer'] }], + read: [{ ruleTypeId: 'readonly-alert-type', consumers: ['my-consumer'] }], }, }, - savedObject: { all: [], read: [], @@ -399,43 +392,43 @@ describe(`feature_privilege_builder`, () => { expect(alertingFeaturePrivileges.getActions(privilege, feature)).toMatchInlineSnapshot(` Array [ - "alerting:alert-type/my-feature/rule/get", - "alerting:alert-type/my-feature/rule/getRuleState", - "alerting:alert-type/my-feature/rule/getAlertSummary", - "alerting:alert-type/my-feature/rule/getExecutionLog", - "alerting:alert-type/my-feature/rule/getActionErrorLog", - "alerting:alert-type/my-feature/rule/find", - "alerting:alert-type/my-feature/rule/getRuleExecutionKPI", - "alerting:alert-type/my-feature/rule/getBackfill", - "alerting:alert-type/my-feature/rule/findBackfill", - "alerting:alert-type/my-feature/rule/create", - "alerting:alert-type/my-feature/rule/delete", - "alerting:alert-type/my-feature/rule/update", - "alerting:alert-type/my-feature/rule/updateApiKey", - "alerting:alert-type/my-feature/rule/enable", - "alerting:alert-type/my-feature/rule/disable", - "alerting:alert-type/my-feature/rule/muteAll", - "alerting:alert-type/my-feature/rule/unmuteAll", - "alerting:alert-type/my-feature/rule/muteAlert", - "alerting:alert-type/my-feature/rule/unmuteAlert", - "alerting:alert-type/my-feature/rule/snooze", - "alerting:alert-type/my-feature/rule/bulkEdit", - "alerting:alert-type/my-feature/rule/bulkDelete", - "alerting:alert-type/my-feature/rule/bulkEnable", - "alerting:alert-type/my-feature/rule/bulkDisable", - "alerting:alert-type/my-feature/rule/unsnooze", - "alerting:alert-type/my-feature/rule/runSoon", - "alerting:alert-type/my-feature/rule/scheduleBackfill", - "alerting:alert-type/my-feature/rule/deleteBackfill", - "alerting:readonly-alert-type/my-feature/rule/get", - "alerting:readonly-alert-type/my-feature/rule/getRuleState", - "alerting:readonly-alert-type/my-feature/rule/getAlertSummary", - "alerting:readonly-alert-type/my-feature/rule/getExecutionLog", - "alerting:readonly-alert-type/my-feature/rule/getActionErrorLog", - "alerting:readonly-alert-type/my-feature/rule/find", - "alerting:readonly-alert-type/my-feature/rule/getRuleExecutionKPI", - "alerting:readonly-alert-type/my-feature/rule/getBackfill", - "alerting:readonly-alert-type/my-feature/rule/findBackfill", + "alerting:alert-type/my-consumer/rule/get", + "alerting:alert-type/my-consumer/rule/getRuleState", + "alerting:alert-type/my-consumer/rule/getAlertSummary", + "alerting:alert-type/my-consumer/rule/getExecutionLog", + "alerting:alert-type/my-consumer/rule/getActionErrorLog", + "alerting:alert-type/my-consumer/rule/find", + "alerting:alert-type/my-consumer/rule/getRuleExecutionKPI", + "alerting:alert-type/my-consumer/rule/getBackfill", + "alerting:alert-type/my-consumer/rule/findBackfill", + "alerting:alert-type/my-consumer/rule/create", + "alerting:alert-type/my-consumer/rule/delete", + "alerting:alert-type/my-consumer/rule/update", + "alerting:alert-type/my-consumer/rule/updateApiKey", + "alerting:alert-type/my-consumer/rule/enable", + "alerting:alert-type/my-consumer/rule/disable", + "alerting:alert-type/my-consumer/rule/muteAll", + "alerting:alert-type/my-consumer/rule/unmuteAll", + "alerting:alert-type/my-consumer/rule/muteAlert", + "alerting:alert-type/my-consumer/rule/unmuteAlert", + "alerting:alert-type/my-consumer/rule/snooze", + "alerting:alert-type/my-consumer/rule/bulkEdit", + "alerting:alert-type/my-consumer/rule/bulkDelete", + "alerting:alert-type/my-consumer/rule/bulkEnable", + "alerting:alert-type/my-consumer/rule/bulkDisable", + "alerting:alert-type/my-consumer/rule/unsnooze", + "alerting:alert-type/my-consumer/rule/runSoon", + "alerting:alert-type/my-consumer/rule/scheduleBackfill", + "alerting:alert-type/my-consumer/rule/deleteBackfill", + "alerting:readonly-alert-type/my-consumer/rule/get", + "alerting:readonly-alert-type/my-consumer/rule/getRuleState", + "alerting:readonly-alert-type/my-consumer/rule/getAlertSummary", + "alerting:readonly-alert-type/my-consumer/rule/getExecutionLog", + "alerting:readonly-alert-type/my-consumer/rule/getActionErrorLog", + "alerting:readonly-alert-type/my-consumer/rule/find", + "alerting:readonly-alert-type/my-consumer/rule/getRuleExecutionKPI", + "alerting:readonly-alert-type/my-consumer/rule/getBackfill", + "alerting:readonly-alert-type/my-consumer/rule/findBackfill", ] `); }); @@ -447,8 +440,8 @@ describe(`feature_privilege_builder`, () => { const privilege: FeatureKibanaPrivileges = { alerting: { alert: { - all: ['alert-type'], - read: ['readonly-alert-type'], + all: [{ ruleTypeId: 'alert-type', consumers: ['my-consumer'] }], + read: [{ ruleTypeId: 'readonly-alert-type', consumers: ['my-consumer'] }], }, }, @@ -472,15 +465,15 @@ describe(`feature_privilege_builder`, () => { expect(alertingFeaturePrivileges.getActions(privilege, feature)).toMatchInlineSnapshot(` Array [ - "alerting:alert-type/my-feature/alert/get", - "alerting:alert-type/my-feature/alert/find", - "alerting:alert-type/my-feature/alert/getAuthorizedAlertsIndices", - "alerting:alert-type/my-feature/alert/getAlertSummary", - "alerting:alert-type/my-feature/alert/update", - "alerting:readonly-alert-type/my-feature/alert/get", - "alerting:readonly-alert-type/my-feature/alert/find", - "alerting:readonly-alert-type/my-feature/alert/getAuthorizedAlertsIndices", - "alerting:readonly-alert-type/my-feature/alert/getAlertSummary", + "alerting:alert-type/my-consumer/alert/get", + "alerting:alert-type/my-consumer/alert/find", + "alerting:alert-type/my-consumer/alert/getAuthorizedAlertsIndices", + "alerting:alert-type/my-consumer/alert/getAlertSummary", + "alerting:alert-type/my-consumer/alert/update", + "alerting:readonly-alert-type/my-consumer/alert/get", + "alerting:readonly-alert-type/my-consumer/alert/find", + "alerting:readonly-alert-type/my-consumer/alert/getAuthorizedAlertsIndices", + "alerting:readonly-alert-type/my-consumer/alert/getAlertSummary", ] `); }); @@ -492,12 +485,128 @@ describe(`feature_privilege_builder`, () => { const privilege: FeatureKibanaPrivileges = { alerting: { rule: { - all: ['alert-type'], - read: ['readonly-alert-type'], + all: [{ ruleTypeId: 'alert-type', consumers: ['my-consumer'] }], + read: [{ ruleTypeId: 'readonly-alert-type', consumers: ['my-consumer'] }], + }, + alert: { + all: [{ ruleTypeId: 'another-alert-type', consumers: ['my-consumer'] }], + read: [{ ruleTypeId: 'readonly-alert-type', consumers: ['my-consumer'] }], + }, + }, + + savedObject: { + all: [], + read: [], + }, + ui: [], + }; + + const feature = new KibanaFeature({ + id: 'my-feature', + name: 'my-feature', + app: [], + category: { id: 'foo', label: 'foo' }, + privileges: { + all: privilege, + read: privilege, + }, + }); + + expect(alertingFeaturePrivileges.getActions(privilege, feature)).toMatchInlineSnapshot(` + Array [ + "alerting:alert-type/my-consumer/rule/get", + "alerting:alert-type/my-consumer/rule/getRuleState", + "alerting:alert-type/my-consumer/rule/getAlertSummary", + "alerting:alert-type/my-consumer/rule/getExecutionLog", + "alerting:alert-type/my-consumer/rule/getActionErrorLog", + "alerting:alert-type/my-consumer/rule/find", + "alerting:alert-type/my-consumer/rule/getRuleExecutionKPI", + "alerting:alert-type/my-consumer/rule/getBackfill", + "alerting:alert-type/my-consumer/rule/findBackfill", + "alerting:alert-type/my-consumer/rule/create", + "alerting:alert-type/my-consumer/rule/delete", + "alerting:alert-type/my-consumer/rule/update", + "alerting:alert-type/my-consumer/rule/updateApiKey", + "alerting:alert-type/my-consumer/rule/enable", + "alerting:alert-type/my-consumer/rule/disable", + "alerting:alert-type/my-consumer/rule/muteAll", + "alerting:alert-type/my-consumer/rule/unmuteAll", + "alerting:alert-type/my-consumer/rule/muteAlert", + "alerting:alert-type/my-consumer/rule/unmuteAlert", + "alerting:alert-type/my-consumer/rule/snooze", + "alerting:alert-type/my-consumer/rule/bulkEdit", + "alerting:alert-type/my-consumer/rule/bulkDelete", + "alerting:alert-type/my-consumer/rule/bulkEnable", + "alerting:alert-type/my-consumer/rule/bulkDisable", + "alerting:alert-type/my-consumer/rule/unsnooze", + "alerting:alert-type/my-consumer/rule/runSoon", + "alerting:alert-type/my-consumer/rule/scheduleBackfill", + "alerting:alert-type/my-consumer/rule/deleteBackfill", + "alerting:readonly-alert-type/my-consumer/rule/get", + "alerting:readonly-alert-type/my-consumer/rule/getRuleState", + "alerting:readonly-alert-type/my-consumer/rule/getAlertSummary", + "alerting:readonly-alert-type/my-consumer/rule/getExecutionLog", + "alerting:readonly-alert-type/my-consumer/rule/getActionErrorLog", + "alerting:readonly-alert-type/my-consumer/rule/find", + "alerting:readonly-alert-type/my-consumer/rule/getRuleExecutionKPI", + "alerting:readonly-alert-type/my-consumer/rule/getBackfill", + "alerting:readonly-alert-type/my-consumer/rule/findBackfill", + "alerting:another-alert-type/my-consumer/alert/get", + "alerting:another-alert-type/my-consumer/alert/find", + "alerting:another-alert-type/my-consumer/alert/getAuthorizedAlertsIndices", + "alerting:another-alert-type/my-consumer/alert/getAlertSummary", + "alerting:another-alert-type/my-consumer/alert/update", + "alerting:readonly-alert-type/my-consumer/alert/get", + "alerting:readonly-alert-type/my-consumer/alert/find", + "alerting:readonly-alert-type/my-consumer/alert/getAuthorizedAlertsIndices", + "alerting:readonly-alert-type/my-consumer/alert/getAlertSummary", + ] + `); + }); + + test('handles multiple rule types and consumers correctly', () => { + const actions = new Actions(); + const alertingFeaturePrivileges = new FeaturePrivilegeAlertingBuilder(actions); + + const privilege: FeatureKibanaPrivileges = { + alerting: { + rule: { + all: [ + { ruleTypeId: 'alert-type-1', consumers: ['my-consumer-1', 'my-consumer-2'] }, + { ruleTypeId: 'alert-type-2', consumers: ['my-consumer-3'] }, + ], + read: [ + { + ruleTypeId: 'readonly-alert-type-1', + consumers: ['my-read-consumer-1', 'my-read-consumer-2'], + }, + { + ruleTypeId: 'readonly-alert-type-2', + consumers: ['my-read-consumer-3', 'my-read-consumer-4'], + }, + ], }, alert: { - all: ['another-alert-type'], - read: ['readonly-alert-type'], + all: [ + { + ruleTypeId: 'another-alert-type-1', + consumers: ['my-consumer-another-1', 'my-consumer-another-2'], + }, + { + ruleTypeId: 'another-alert-type-2', + consumers: ['my-consumer-another-3', 'my-consumer-another-1'], + }, + ], + read: [ + { + ruleTypeId: 'readonly-another-alert-type-1', + consumers: ['my-read-other-consumer-1', 'my-read-other-consumer-2'], + }, + { + ruleTypeId: 'readonly-another-alert-type-2', + consumers: ['my-read-other-consumer-3', 'my-read-other-consumer-4'], + }, + ], }, }, @@ -521,52 +630,162 @@ describe(`feature_privilege_builder`, () => { expect(alertingFeaturePrivileges.getActions(privilege, feature)).toMatchInlineSnapshot(` Array [ - "alerting:alert-type/my-feature/rule/get", - "alerting:alert-type/my-feature/rule/getRuleState", - "alerting:alert-type/my-feature/rule/getAlertSummary", - "alerting:alert-type/my-feature/rule/getExecutionLog", - "alerting:alert-type/my-feature/rule/getActionErrorLog", - "alerting:alert-type/my-feature/rule/find", - "alerting:alert-type/my-feature/rule/getRuleExecutionKPI", - "alerting:alert-type/my-feature/rule/getBackfill", - "alerting:alert-type/my-feature/rule/findBackfill", - "alerting:alert-type/my-feature/rule/create", - "alerting:alert-type/my-feature/rule/delete", - "alerting:alert-type/my-feature/rule/update", - "alerting:alert-type/my-feature/rule/updateApiKey", - "alerting:alert-type/my-feature/rule/enable", - "alerting:alert-type/my-feature/rule/disable", - "alerting:alert-type/my-feature/rule/muteAll", - "alerting:alert-type/my-feature/rule/unmuteAll", - "alerting:alert-type/my-feature/rule/muteAlert", - "alerting:alert-type/my-feature/rule/unmuteAlert", - "alerting:alert-type/my-feature/rule/snooze", - "alerting:alert-type/my-feature/rule/bulkEdit", - "alerting:alert-type/my-feature/rule/bulkDelete", - "alerting:alert-type/my-feature/rule/bulkEnable", - "alerting:alert-type/my-feature/rule/bulkDisable", - "alerting:alert-type/my-feature/rule/unsnooze", - "alerting:alert-type/my-feature/rule/runSoon", - "alerting:alert-type/my-feature/rule/scheduleBackfill", - "alerting:alert-type/my-feature/rule/deleteBackfill", - "alerting:readonly-alert-type/my-feature/rule/get", - "alerting:readonly-alert-type/my-feature/rule/getRuleState", - "alerting:readonly-alert-type/my-feature/rule/getAlertSummary", - "alerting:readonly-alert-type/my-feature/rule/getExecutionLog", - "alerting:readonly-alert-type/my-feature/rule/getActionErrorLog", - "alerting:readonly-alert-type/my-feature/rule/find", - "alerting:readonly-alert-type/my-feature/rule/getRuleExecutionKPI", - "alerting:readonly-alert-type/my-feature/rule/getBackfill", - "alerting:readonly-alert-type/my-feature/rule/findBackfill", - "alerting:another-alert-type/my-feature/alert/get", - "alerting:another-alert-type/my-feature/alert/find", - "alerting:another-alert-type/my-feature/alert/getAuthorizedAlertsIndices", - "alerting:another-alert-type/my-feature/alert/getAlertSummary", - "alerting:another-alert-type/my-feature/alert/update", - "alerting:readonly-alert-type/my-feature/alert/get", - "alerting:readonly-alert-type/my-feature/alert/find", - "alerting:readonly-alert-type/my-feature/alert/getAuthorizedAlertsIndices", - "alerting:readonly-alert-type/my-feature/alert/getAlertSummary", + "alerting:alert-type-1/my-consumer-1/rule/get", + "alerting:alert-type-1/my-consumer-1/rule/getRuleState", + "alerting:alert-type-1/my-consumer-1/rule/getAlertSummary", + "alerting:alert-type-1/my-consumer-1/rule/getExecutionLog", + "alerting:alert-type-1/my-consumer-1/rule/getActionErrorLog", + "alerting:alert-type-1/my-consumer-1/rule/find", + "alerting:alert-type-1/my-consumer-1/rule/getRuleExecutionKPI", + "alerting:alert-type-1/my-consumer-1/rule/getBackfill", + "alerting:alert-type-1/my-consumer-1/rule/findBackfill", + "alerting:alert-type-1/my-consumer-1/rule/create", + "alerting:alert-type-1/my-consumer-1/rule/delete", + "alerting:alert-type-1/my-consumer-1/rule/update", + "alerting:alert-type-1/my-consumer-1/rule/updateApiKey", + "alerting:alert-type-1/my-consumer-1/rule/enable", + "alerting:alert-type-1/my-consumer-1/rule/disable", + "alerting:alert-type-1/my-consumer-1/rule/muteAll", + "alerting:alert-type-1/my-consumer-1/rule/unmuteAll", + "alerting:alert-type-1/my-consumer-1/rule/muteAlert", + "alerting:alert-type-1/my-consumer-1/rule/unmuteAlert", + "alerting:alert-type-1/my-consumer-1/rule/snooze", + "alerting:alert-type-1/my-consumer-1/rule/bulkEdit", + "alerting:alert-type-1/my-consumer-1/rule/bulkDelete", + "alerting:alert-type-1/my-consumer-1/rule/bulkEnable", + "alerting:alert-type-1/my-consumer-1/rule/bulkDisable", + "alerting:alert-type-1/my-consumer-1/rule/unsnooze", + "alerting:alert-type-1/my-consumer-1/rule/runSoon", + "alerting:alert-type-1/my-consumer-1/rule/scheduleBackfill", + "alerting:alert-type-1/my-consumer-1/rule/deleteBackfill", + "alerting:alert-type-1/my-consumer-2/rule/get", + "alerting:alert-type-1/my-consumer-2/rule/getRuleState", + "alerting:alert-type-1/my-consumer-2/rule/getAlertSummary", + "alerting:alert-type-1/my-consumer-2/rule/getExecutionLog", + "alerting:alert-type-1/my-consumer-2/rule/getActionErrorLog", + "alerting:alert-type-1/my-consumer-2/rule/find", + "alerting:alert-type-1/my-consumer-2/rule/getRuleExecutionKPI", + "alerting:alert-type-1/my-consumer-2/rule/getBackfill", + "alerting:alert-type-1/my-consumer-2/rule/findBackfill", + "alerting:alert-type-1/my-consumer-2/rule/create", + "alerting:alert-type-1/my-consumer-2/rule/delete", + "alerting:alert-type-1/my-consumer-2/rule/update", + "alerting:alert-type-1/my-consumer-2/rule/updateApiKey", + "alerting:alert-type-1/my-consumer-2/rule/enable", + "alerting:alert-type-1/my-consumer-2/rule/disable", + "alerting:alert-type-1/my-consumer-2/rule/muteAll", + "alerting:alert-type-1/my-consumer-2/rule/unmuteAll", + "alerting:alert-type-1/my-consumer-2/rule/muteAlert", + "alerting:alert-type-1/my-consumer-2/rule/unmuteAlert", + "alerting:alert-type-1/my-consumer-2/rule/snooze", + "alerting:alert-type-1/my-consumer-2/rule/bulkEdit", + "alerting:alert-type-1/my-consumer-2/rule/bulkDelete", + "alerting:alert-type-1/my-consumer-2/rule/bulkEnable", + "alerting:alert-type-1/my-consumer-2/rule/bulkDisable", + "alerting:alert-type-1/my-consumer-2/rule/unsnooze", + "alerting:alert-type-1/my-consumer-2/rule/runSoon", + "alerting:alert-type-1/my-consumer-2/rule/scheduleBackfill", + "alerting:alert-type-1/my-consumer-2/rule/deleteBackfill", + "alerting:alert-type-2/my-consumer-3/rule/get", + "alerting:alert-type-2/my-consumer-3/rule/getRuleState", + "alerting:alert-type-2/my-consumer-3/rule/getAlertSummary", + "alerting:alert-type-2/my-consumer-3/rule/getExecutionLog", + "alerting:alert-type-2/my-consumer-3/rule/getActionErrorLog", + "alerting:alert-type-2/my-consumer-3/rule/find", + "alerting:alert-type-2/my-consumer-3/rule/getRuleExecutionKPI", + "alerting:alert-type-2/my-consumer-3/rule/getBackfill", + "alerting:alert-type-2/my-consumer-3/rule/findBackfill", + "alerting:alert-type-2/my-consumer-3/rule/create", + "alerting:alert-type-2/my-consumer-3/rule/delete", + "alerting:alert-type-2/my-consumer-3/rule/update", + "alerting:alert-type-2/my-consumer-3/rule/updateApiKey", + "alerting:alert-type-2/my-consumer-3/rule/enable", + "alerting:alert-type-2/my-consumer-3/rule/disable", + "alerting:alert-type-2/my-consumer-3/rule/muteAll", + "alerting:alert-type-2/my-consumer-3/rule/unmuteAll", + "alerting:alert-type-2/my-consumer-3/rule/muteAlert", + "alerting:alert-type-2/my-consumer-3/rule/unmuteAlert", + "alerting:alert-type-2/my-consumer-3/rule/snooze", + "alerting:alert-type-2/my-consumer-3/rule/bulkEdit", + "alerting:alert-type-2/my-consumer-3/rule/bulkDelete", + "alerting:alert-type-2/my-consumer-3/rule/bulkEnable", + "alerting:alert-type-2/my-consumer-3/rule/bulkDisable", + "alerting:alert-type-2/my-consumer-3/rule/unsnooze", + "alerting:alert-type-2/my-consumer-3/rule/runSoon", + "alerting:alert-type-2/my-consumer-3/rule/scheduleBackfill", + "alerting:alert-type-2/my-consumer-3/rule/deleteBackfill", + "alerting:readonly-alert-type-1/my-read-consumer-1/rule/get", + "alerting:readonly-alert-type-1/my-read-consumer-1/rule/getRuleState", + "alerting:readonly-alert-type-1/my-read-consumer-1/rule/getAlertSummary", + "alerting:readonly-alert-type-1/my-read-consumer-1/rule/getExecutionLog", + "alerting:readonly-alert-type-1/my-read-consumer-1/rule/getActionErrorLog", + "alerting:readonly-alert-type-1/my-read-consumer-1/rule/find", + "alerting:readonly-alert-type-1/my-read-consumer-1/rule/getRuleExecutionKPI", + "alerting:readonly-alert-type-1/my-read-consumer-1/rule/getBackfill", + "alerting:readonly-alert-type-1/my-read-consumer-1/rule/findBackfill", + "alerting:readonly-alert-type-1/my-read-consumer-2/rule/get", + "alerting:readonly-alert-type-1/my-read-consumer-2/rule/getRuleState", + "alerting:readonly-alert-type-1/my-read-consumer-2/rule/getAlertSummary", + "alerting:readonly-alert-type-1/my-read-consumer-2/rule/getExecutionLog", + "alerting:readonly-alert-type-1/my-read-consumer-2/rule/getActionErrorLog", + "alerting:readonly-alert-type-1/my-read-consumer-2/rule/find", + "alerting:readonly-alert-type-1/my-read-consumer-2/rule/getRuleExecutionKPI", + "alerting:readonly-alert-type-1/my-read-consumer-2/rule/getBackfill", + "alerting:readonly-alert-type-1/my-read-consumer-2/rule/findBackfill", + "alerting:readonly-alert-type-2/my-read-consumer-3/rule/get", + "alerting:readonly-alert-type-2/my-read-consumer-3/rule/getRuleState", + "alerting:readonly-alert-type-2/my-read-consumer-3/rule/getAlertSummary", + "alerting:readonly-alert-type-2/my-read-consumer-3/rule/getExecutionLog", + "alerting:readonly-alert-type-2/my-read-consumer-3/rule/getActionErrorLog", + "alerting:readonly-alert-type-2/my-read-consumer-3/rule/find", + "alerting:readonly-alert-type-2/my-read-consumer-3/rule/getRuleExecutionKPI", + "alerting:readonly-alert-type-2/my-read-consumer-3/rule/getBackfill", + "alerting:readonly-alert-type-2/my-read-consumer-3/rule/findBackfill", + "alerting:readonly-alert-type-2/my-read-consumer-4/rule/get", + "alerting:readonly-alert-type-2/my-read-consumer-4/rule/getRuleState", + "alerting:readonly-alert-type-2/my-read-consumer-4/rule/getAlertSummary", + "alerting:readonly-alert-type-2/my-read-consumer-4/rule/getExecutionLog", + "alerting:readonly-alert-type-2/my-read-consumer-4/rule/getActionErrorLog", + "alerting:readonly-alert-type-2/my-read-consumer-4/rule/find", + "alerting:readonly-alert-type-2/my-read-consumer-4/rule/getRuleExecutionKPI", + "alerting:readonly-alert-type-2/my-read-consumer-4/rule/getBackfill", + "alerting:readonly-alert-type-2/my-read-consumer-4/rule/findBackfill", + "alerting:another-alert-type-1/my-consumer-another-1/alert/get", + "alerting:another-alert-type-1/my-consumer-another-1/alert/find", + "alerting:another-alert-type-1/my-consumer-another-1/alert/getAuthorizedAlertsIndices", + "alerting:another-alert-type-1/my-consumer-another-1/alert/getAlertSummary", + "alerting:another-alert-type-1/my-consumer-another-1/alert/update", + "alerting:another-alert-type-1/my-consumer-another-2/alert/get", + "alerting:another-alert-type-1/my-consumer-another-2/alert/find", + "alerting:another-alert-type-1/my-consumer-another-2/alert/getAuthorizedAlertsIndices", + "alerting:another-alert-type-1/my-consumer-another-2/alert/getAlertSummary", + "alerting:another-alert-type-1/my-consumer-another-2/alert/update", + "alerting:another-alert-type-2/my-consumer-another-3/alert/get", + "alerting:another-alert-type-2/my-consumer-another-3/alert/find", + "alerting:another-alert-type-2/my-consumer-another-3/alert/getAuthorizedAlertsIndices", + "alerting:another-alert-type-2/my-consumer-another-3/alert/getAlertSummary", + "alerting:another-alert-type-2/my-consumer-another-3/alert/update", + "alerting:another-alert-type-2/my-consumer-another-1/alert/get", + "alerting:another-alert-type-2/my-consumer-another-1/alert/find", + "alerting:another-alert-type-2/my-consumer-another-1/alert/getAuthorizedAlertsIndices", + "alerting:another-alert-type-2/my-consumer-another-1/alert/getAlertSummary", + "alerting:another-alert-type-2/my-consumer-another-1/alert/update", + "alerting:readonly-another-alert-type-1/my-read-other-consumer-1/alert/get", + "alerting:readonly-another-alert-type-1/my-read-other-consumer-1/alert/find", + "alerting:readonly-another-alert-type-1/my-read-other-consumer-1/alert/getAuthorizedAlertsIndices", + "alerting:readonly-another-alert-type-1/my-read-other-consumer-1/alert/getAlertSummary", + "alerting:readonly-another-alert-type-1/my-read-other-consumer-2/alert/get", + "alerting:readonly-another-alert-type-1/my-read-other-consumer-2/alert/find", + "alerting:readonly-another-alert-type-1/my-read-other-consumer-2/alert/getAuthorizedAlertsIndices", + "alerting:readonly-another-alert-type-1/my-read-other-consumer-2/alert/getAlertSummary", + "alerting:readonly-another-alert-type-2/my-read-other-consumer-3/alert/get", + "alerting:readonly-another-alert-type-2/my-read-other-consumer-3/alert/find", + "alerting:readonly-another-alert-type-2/my-read-other-consumer-3/alert/getAuthorizedAlertsIndices", + "alerting:readonly-another-alert-type-2/my-read-other-consumer-3/alert/getAlertSummary", + "alerting:readonly-another-alert-type-2/my-read-other-consumer-4/alert/get", + "alerting:readonly-another-alert-type-2/my-read-other-consumer-4/alert/find", + "alerting:readonly-another-alert-type-2/my-read-other-consumer-4/alert/getAuthorizedAlertsIndices", + "alerting:readonly-another-alert-type-2/my-read-other-consumer-4/alert/getAlertSummary", ] `); }); diff --git a/x-pack/packages/security/authorization_core/src/privileges/feature_privilege_builder/alerting.ts b/x-pack/packages/security/authorization_core/src/privileges/feature_privilege_builder/alerting.ts index c0b7fa2ea8ab7..65c330b94c462 100644 --- a/x-pack/packages/security/authorization_core/src/privileges/feature_privilege_builder/alerting.ts +++ b/x-pack/packages/security/authorization_core/src/privileges/feature_privilege_builder/alerting.ts @@ -7,6 +7,7 @@ import { get, uniq } from 'lodash'; +import type { AlertingKibanaPrivilege } from '@kbn/features-plugin/common/alerting_kibana_privilege'; import type { FeatureKibanaPrivileges, KibanaFeature } from '@kbn/features-plugin/server'; import { BaseFeaturePrivilegeBuilder } from './feature_privilege_builder'; @@ -67,13 +68,14 @@ export class FeaturePrivilegeAlertingBuilder extends BaseFeaturePrivilegeBuilder ): string[] { const getAlertingPrivilege = ( operations: string[], - privilegedTypes: readonly string[], - alertingEntity: string, - consumer: string + privileges: AlertingKibanaPrivilege, + alertingEntity: string ) => - privilegedTypes.flatMap((type) => - operations.map((operation) => - this.actions.alerting.get(type, consumer, alertingEntity, operation) + privileges.flatMap(({ ruleTypeId, consumers }) => + consumers.flatMap((consumer) => + operations.map((operation) => + this.actions.alerting.get(ruleTypeId, consumer, alertingEntity, operation) + ) ) ); @@ -82,8 +84,8 @@ export class FeaturePrivilegeAlertingBuilder extends BaseFeaturePrivilegeBuilder const read = get(privilegeDefinition.alerting, `${entity}.read`) ?? []; return uniq([ - ...getAlertingPrivilege(allOperations[entity], all, entity, feature.id), - ...getAlertingPrivilege(readOperations[entity], read, entity, feature.id), + ...getAlertingPrivilege(allOperations[entity], all, entity), + ...getAlertingPrivilege(readOperations[entity], read, entity), ]); }; diff --git a/x-pack/packages/security/authorization_core/src/privileges/privileges.test.ts b/x-pack/packages/security/authorization_core/src/privileges/privileges.test.ts index 6af21d5357a72..22fb86f601b3a 100644 --- a/x-pack/packages/security/authorization_core/src/privileges/privileges.test.ts +++ b/x-pack/packages/security/authorization_core/src/privileges/privileges.test.ts @@ -481,7 +481,7 @@ describe('features', () => { name: 'Feature Alpha', app: [], category: { id: 'alpha', label: 'alpha' }, - alerting: ['rule-type-1'], + alerting: [{ ruleTypeId: 'rule-type-1', consumers: ['alpha'] }], privileges: { all: { savedObject: { @@ -491,7 +491,7 @@ describe('features', () => { ui: ['all-alpha-ui'], app: ['all-alpha-app'], api: ['all-alpha-api'], - alerting: { rule: { all: ['rule-type-1'] } }, + alerting: { rule: { all: [{ ruleTypeId: 'rule-type-1', consumers: ['alpha'] }] } }, replacedBy: [{ feature: 'beta', privileges: ['all'] }], }, read: { @@ -514,7 +514,7 @@ describe('features', () => { name: 'Feature Beta', app: [], category: { id: 'beta', label: 'beta' }, - alerting: ['rule-type-1'], + alerting: [{ ruleTypeId: 'rule-type-1', consumers: ['beta'] }], privileges: { all: { savedObject: { @@ -524,7 +524,7 @@ describe('features', () => { ui: ['all-beta-ui'], app: ['all-beta-app'], api: ['all-beta-api'], - alerting: { rule: { all: ['rule-type-1'] } }, + alerting: { rule: { all: [{ ruleTypeId: 'rule-type-1', consumers: ['beta'] }] } }, }, read: { savedObject: { @@ -604,13 +604,8 @@ describe('features', () => { ...alertingOperations.map((operation) => actions.alerting.get('rule-type-1', 'alpha', 'rule', operation) ), - // To maintain compatibility with the new UI capabilities and new alerting entities that are - // feature specific: all.replacedBy: [{ feature: 'beta', privileges: ['all'] }] actions.ui.get('navLinks', 'all-beta-app'), actions.ui.get('beta', 'all-beta-ui'), - ...alertingOperations.map((operation) => - actions.alerting.get('rule-type-1', 'beta', 'rule', operation) - ), ]; const expectedReadPrivileges = [ diff --git a/x-pack/packages/security/authorization_core/src/privileges/privileges.ts b/x-pack/packages/security/authorization_core/src/privileges/privileges.ts index b81eaba5fa54d..f266b2b9a7085 100644 --- a/x-pack/packages/security/authorization_core/src/privileges/privileges.ts +++ b/x-pack/packages/security/authorization_core/src/privileges/privileges.ts @@ -94,17 +94,15 @@ export function privilegesFactory( // If a privilege is configured with `replacedBy`, it's part of the deprecated feature and // should be complemented with the subset of actions from the referenced privileges to // maintain backward compatibility. Namely, deprecated privileges should grant the same UI - // capabilities and alerting actions as the privileges that replace them, so that the - // client-side code can safely use only non-deprecated UI capabilities and users can still - // access previously created alerting rules and alerts. + // capabilities as the privileges that replace them, so that the client-side code can safely + // use only non-deprecated UI capabilities. const replacedBy = getReplacedByForPrivilege(privilegeId, privilege); if (replacedBy) { composablePrivileges.push({ featureId: feature.id, privilegeId, references: replacedBy, - actionsFilter: (action) => - actions.ui.isValid(action) || actions.alerting.isValid(action), + actionsFilter: (action) => actions.ui.isValid(action), }); } }; diff --git a/x-pack/plugins/actions/server/actions_client/actions_client.mock.ts b/x-pack/plugins/actions/server/actions_client/actions_client.mock.ts index 433e3850cae2a..9834765487a80 100644 --- a/x-pack/plugins/actions/server/actions_client/actions_client.mock.ts +++ b/x-pack/plugins/actions/server/actions_client/actions_client.mock.ts @@ -22,7 +22,6 @@ const createActionsClientMock = () => { getBulk: jest.fn(), getOAuthAccessToken: jest.fn(), execute: jest.fn(), - ephemeralEnqueuedExecution: jest.fn(), bulkEnqueueExecution: jest.fn(), listTypes: jest.fn(), isActionTypeEnabled: jest.fn(), diff --git a/x-pack/plugins/actions/server/actions_client/actions_client.test.ts b/x-pack/plugins/actions/server/actions_client/actions_client.test.ts index 99bcbf15ecfb9..b977f8fb97cd3 100644 --- a/x-pack/plugins/actions/server/actions_client/actions_client.test.ts +++ b/x-pack/plugins/actions/server/actions_client/actions_client.test.ts @@ -79,7 +79,6 @@ const unsecuredSavedObjectsClient = savedObjectsClientMock.create(); const scopedClusterClient = elasticsearchServiceMock.createScopedClusterClient(); const actionExecutor = actionExecutorMock.create(); const authorization = actionsAuthorizationMock.create(); -const ephemeralExecutionEnqueuer = jest.fn(); const bulkExecutionEnqueuer = jest.fn(); const request = httpServerMock.createKibanaRequest(); const auditLogger = auditLoggerMock.create(); @@ -138,7 +137,6 @@ beforeEach(() => { kibanaIndices, inMemoryConnectors: [], actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -613,7 +611,6 @@ describe('create()', () => { kibanaIndices, inMemoryConnectors: [], actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -739,7 +736,6 @@ describe('create()', () => { ], actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -801,7 +797,6 @@ describe('create()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -862,7 +857,6 @@ describe('get()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -899,7 +893,6 @@ describe('get()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -956,7 +949,6 @@ describe('get()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -999,7 +991,6 @@ describe('get()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -1121,7 +1112,6 @@ describe('get()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -1165,7 +1155,6 @@ describe('get()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -1199,7 +1188,6 @@ describe('get()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -1270,7 +1258,6 @@ describe('getBulk()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -1408,7 +1395,6 @@ describe('getBulk()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -1503,7 +1489,6 @@ describe('getBulk()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -1577,7 +1562,6 @@ describe('getBulk()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -1662,7 +1646,6 @@ describe('getOAuthAccessToken()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -2097,7 +2080,6 @@ describe('delete()', () => { }, ], actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -2133,7 +2115,6 @@ describe('delete()', () => { }, ], actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -2653,7 +2634,6 @@ describe('update()', () => { }, ], actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -2696,7 +2676,6 @@ describe('update()', () => { }, ], actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -2782,7 +2761,6 @@ describe('execute()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -2845,7 +2823,6 @@ describe('execute()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -2907,7 +2884,6 @@ describe('execute()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -3180,7 +3156,6 @@ describe('isPreconfigured()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -3230,7 +3205,6 @@ describe('isPreconfigured()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -3282,7 +3256,6 @@ describe('isSystemAction()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -3332,7 +3305,6 @@ describe('isSystemAction()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, diff --git a/x-pack/plugins/actions/server/actions_client/actions_client.ts b/x-pack/plugins/actions/server/actions_client/actions_client.ts index 5c563fbd6aa82..e39cf8712894f 100644 --- a/x-pack/plugins/actions/server/actions_client/actions_client.ts +++ b/x-pack/plugins/actions/server/actions_client/actions_client.ts @@ -18,7 +18,6 @@ import { Logger, } from '@kbn/core/server'; import { AuditLogger } from '@kbn/security-plugin/server'; -import { RunNowResult } from '@kbn/task-manager-plugin/server'; import { IEventLogClient } from '@kbn/event-log-plugin/server'; import { KueryNode } from '@kbn/es-query'; import { Connector, ConnectorWithExtraFindData } from '../application/connector/types'; @@ -46,7 +45,6 @@ import { } from '../types'; import { PreconfiguredActionDisabledModificationError } from '../lib/errors/preconfigured_action_disabled_modification'; import { - ExecutionEnqueuer, ExecuteOptions as EnqueueExecutionOptions, BulkExecutionEnqueuer, ExecutionResponse, @@ -92,7 +90,6 @@ export interface ConstructorOptions { unsecuredSavedObjectsClient: SavedObjectsClientContract; inMemoryConnectors: InMemoryConnector[]; actionExecutor: ActionExecutorContract; - ephemeralExecutionEnqueuer: ExecutionEnqueuer; bulkExecutionEnqueuer: BulkExecutionEnqueuer; request: KibanaRequest; authorization: ActionsAuthorization; @@ -112,7 +109,6 @@ export interface ActionsClientContext { actionExecutor: ActionExecutorContract; request: KibanaRequest; authorization: ActionsAuthorization; - ephemeralExecutionEnqueuer: ExecutionEnqueuer; bulkExecutionEnqueuer: BulkExecutionEnqueuer; auditLogger?: AuditLogger; usageCounter?: UsageCounter; @@ -131,7 +127,6 @@ export class ActionsClient { unsecuredSavedObjectsClient, inMemoryConnectors, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization, @@ -148,7 +143,6 @@ export class ActionsClient { kibanaIndices, inMemoryConnectors, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization, @@ -504,18 +498,6 @@ export class ActionsClient { return this.context.bulkExecutionEnqueuer(this.context.unsecuredSavedObjectsClient, options); } - public async ephemeralEnqueuedExecution(options: EnqueueExecutionOptions): Promise { - await this.context.authorization.ensureAuthorized({ - operation: 'execute', - actionTypeId: options.actionTypeId, - }); - - return this.context.ephemeralExecutionEnqueuer( - this.context.unsecuredSavedObjectsClient, - options - ); - } - public async listTypes({ featureId, includeSystemActionTypes = false, diff --git a/x-pack/plugins/actions/server/actions_client/actions_client_hooks.test.ts b/x-pack/plugins/actions/server/actions_client/actions_client_hooks.test.ts index 7a1a0fb5e3d91..303254a66ea19 100644 --- a/x-pack/plugins/actions/server/actions_client/actions_client_hooks.test.ts +++ b/x-pack/plugins/actions/server/actions_client/actions_client_hooks.test.ts @@ -38,7 +38,6 @@ const unsecuredSavedObjectsClient = savedObjectsClientMock.create(); const scopedClusterClient = elasticsearchServiceMock.createScopedClusterClient(); const actionExecutor = actionExecutorMock.create(); const authorization = actionsAuthorizationMock.create(); -const ephemeralExecutionEnqueuer = jest.fn(); const bulkExecutionEnqueuer = jest.fn(); const request = httpServerMock.createKibanaRequest(); const auditLogger = auditLoggerMock.create(); @@ -131,7 +130,6 @@ beforeEach(() => { kibanaIndices, inMemoryConnectors: [], actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, diff --git a/x-pack/plugins/actions/server/application/connector/methods/get_all/get_all.test.ts b/x-pack/plugins/actions/server/application/connector/methods/get_all/get_all.test.ts index 0f86a8e582e34..5ff37776cf2dc 100644 --- a/x-pack/plugins/actions/server/application/connector/methods/get_all/get_all.test.ts +++ b/x-pack/plugins/actions/server/application/connector/methods/get_all/get_all.test.ts @@ -52,7 +52,6 @@ const unsecuredSavedObjectsClient = savedObjectsClientMock.create(); const scopedClusterClient = elasticsearchServiceMock.createScopedClusterClient(); const actionExecutor = actionExecutorMock.create(); const authorization = actionsAuthorizationMock.create(); -const ephemeralExecutionEnqueuer = jest.fn(); const bulkExecutionEnqueuer = jest.fn(); const request = httpServerMock.createKibanaRequest(); const auditLogger = auditLoggerMock.create(); @@ -78,7 +77,6 @@ describe('getAll()', () => { kibanaIndices, inMemoryConnectors: [], actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -134,7 +132,6 @@ describe('getAll()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -279,7 +276,6 @@ describe('getAll()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -382,7 +378,6 @@ describe('getAll()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -487,7 +482,6 @@ describe('getAll()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -579,7 +573,6 @@ describe('getAll()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -613,7 +606,6 @@ describe('getAll()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, @@ -690,7 +682,6 @@ describe('getAll()', () => { scopedClusterClient, kibanaIndices, actionExecutor, - ephemeralExecutionEnqueuer, bulkExecutionEnqueuer, request, authorization: authorization as unknown as ActionsAuthorization, diff --git a/x-pack/plugins/actions/server/application/connector/methods/list_types/list_types.test.ts b/x-pack/plugins/actions/server/application/connector/methods/list_types/list_types.test.ts index 9ff5e05d45506..056d535ce438b 100644 --- a/x-pack/plugins/actions/server/application/connector/methods/list_types/list_types.test.ts +++ b/x-pack/plugins/actions/server/application/connector/methods/list_types/list_types.test.ts @@ -60,7 +60,6 @@ describe('listTypes()', () => { unsecuredSavedObjectsClient: savedObjectsClientMock.create(), inMemoryConnectors: [], actionExecutor: actionExecutorMock.create(), - ephemeralExecutionEnqueuer: jest.fn(), bulkExecutionEnqueuer: jest.fn(), request: httpServerMock.createKibanaRequest(), authorization: actionsAuthorizationMock.create() as unknown as ActionsAuthorization, diff --git a/x-pack/plugins/actions/server/create_execute_function.ts b/x-pack/plugins/actions/server/create_execute_function.ts index a92bff9719559..539ada46a094a 100644 --- a/x-pack/plugins/actions/server/create_execute_function.ts +++ b/x-pack/plugins/actions/server/create_execute_function.ts @@ -6,13 +6,8 @@ */ import { SavedObjectsBulkResponse, SavedObjectsClientContract, Logger } from '@kbn/core/server'; -import { RunNowResult, TaskManagerStartContract } from '@kbn/task-manager-plugin/server'; -import { - RawAction, - ActionTypeRegistryContract, - InMemoryConnector, - ActionTaskExecutorParams, -} from './types'; +import { TaskManagerStartContract } from '@kbn/task-manager-plugin/server'; +import { RawAction, ActionTypeRegistryContract, InMemoryConnector } from './types'; import { ACTION_TASK_PARAMS_SAVED_OBJECT_TYPE } from './constants/saved_objects'; import { ExecuteOptions as ActionExecutorOptions } from './lib/action_executor'; import { extractSavedObjectReferences, isSavedObjectExecutionSource } from './lib'; @@ -215,43 +210,6 @@ export function createBulkExecutionEnqueuerFunction({ }; } -export function createEphemeralExecutionEnqueuerFunction({ - taskManager, - actionTypeRegistry, - inMemoryConnectors, - logger, -}: CreateExecuteFunctionOptions): ExecutionEnqueuer { - return async function execute( - unsecuredSavedObjectsClient: SavedObjectsClientContract, - { id, params, spaceId, source, consumer, apiKey, executionId }: ExecuteOptions - ): Promise { - const { connector } = await getConnector(unsecuredSavedObjectsClient, inMemoryConnectors, id); - - validateConnector({ id, connector, actionTypeRegistry }); - - const taskParams: ActionTaskExecutorParams = { - spaceId, - taskParams: { - actionId: id, - consumer, - // Saved Objects won't allow us to enforce unknown rather than any - // eslint-disable-next-line @typescript-eslint/no-explicit-any - params: params as Record, - ...(apiKey ? { apiKey } : {}), - ...(executionId ? { executionId } : {}), - }, - ...executionSourceAsSavedObjectReferences(source), - }; - - return taskManager.ephemeralRunNow({ - taskType: `actions:${connector.actionTypeId}`, - params: taskParams, - state: {}, - scope: ['actions'], - }); - }; -} - function validateConnector({ id, connector, @@ -287,21 +245,6 @@ function executionSourceAsSavedObjectReferences(executionSource: ActionExecutorO : {}; } -async function getConnector( - unsecuredSavedObjectsClient: SavedObjectsClientContract, - inMemoryConnectors: InMemoryConnector[], - actionId: string -): Promise<{ connector: InMemoryConnector | RawAction; isInMemory: boolean }> { - const inMemoryAction = inMemoryConnectors.find((action) => action.id === actionId); - - if (inMemoryAction) { - return { connector: inMemoryAction, isInMemory: true }; - } - - const { attributes } = await unsecuredSavedObjectsClient.get('action', actionId); - return { connector: attributes, isInMemory: false }; -} - async function getConnectors( unsecuredSavedObjectsClient: SavedObjectsClientContract, inMemoryConnectors: InMemoryConnector[], diff --git a/x-pack/plugins/actions/server/lib/action_executor.ts b/x-pack/plugins/actions/server/lib/action_executor.ts index b0f9db0ef700c..799fdb80f39af 100644 --- a/x-pack/plugins/actions/server/lib/action_executor.ts +++ b/x-pack/plugins/actions/server/lib/action_executor.ts @@ -82,7 +82,6 @@ export interface ExecuteOptions { actionId: string; consumer?: string; executionId?: string; - isEphemeral?: boolean; params: Record; relatedSavedObjects?: RelatedSavedObjects; request: KibanaRequest; @@ -133,7 +132,6 @@ export class ActionExecutor { actionId, consumer, executionId, - isEphemeral, request, params, relatedSavedObjects, @@ -175,7 +173,6 @@ export class ActionExecutor { }, executeLabel: `execute_action`, executionId, - isEphemeral, namespace, params, relatedSavedObjects, @@ -367,7 +364,6 @@ export class ActionExecutor { checkCanExecuteFn, executeLabel, executionId, - isEphemeral, namespace, params, relatedSavedObjects, @@ -512,7 +508,6 @@ export class ActionExecutor { params: validatedParams, config: validatedConfig, secrets: validatedSecrets, - isEphemeral, taskInfo, configurationUtilities, logger, diff --git a/x-pack/plugins/actions/server/lib/task_runner_factory.test.ts b/x-pack/plugins/actions/server/lib/task_runner_factory.test.ts index 9733b56638d77..0dc2b2f3f5c9a 100644 --- a/x-pack/plugins/actions/server/lib/task_runner_factory.test.ts +++ b/x-pack/plugins/actions/server/lib/task_runner_factory.test.ts @@ -35,7 +35,6 @@ import { SavedObjectsErrorHelpers } from '@kbn/core-saved-objects-server'; const executeParamsFields = [ 'actionId', - 'isEphemeral', 'params', 'relatedSavedObjects', 'executionId', @@ -173,7 +172,6 @@ describe('Task Runner Factory', () => { const [executeParams] = mockedActionExecutor.execute.mock.calls[0]; expect(pick(executeParams, executeParamsFields)).toEqual({ actionId: '2', - isEphemeral: false, params: { baz: true }, relatedSavedObjects: [], executionId: '123abc', @@ -233,7 +231,6 @@ describe('Task Runner Factory', () => { const [executeParams] = mockedActionExecutor.execute.mock.calls[0]; expect(pick(executeParams, executeParamsFields)).toEqual({ actionId: '9', - isEphemeral: false, params: { baz: true }, executionId: '123abc', relatedSavedObjects: [], @@ -289,7 +286,6 @@ describe('Task Runner Factory', () => { expect(pick(executeParams, [...executeParamsFields, 'consumer'])).toEqual({ actionId: '2', consumer: 'test-consumer', - isEphemeral: false, params: { baz: true }, relatedSavedObjects: [], executionId: '123abc', @@ -346,7 +342,6 @@ describe('Task Runner Factory', () => { expect(pick(executeParams, [...executeParamsFields, 'consumer'])).toEqual({ actionId: '2', consumer: 'test-consumer', - isEphemeral: false, params: { baz: true }, relatedSavedObjects: [], executionId: '123abc', @@ -407,7 +402,6 @@ describe('Task Runner Factory', () => { expect(pick(executeParams, [...executeParamsFields, 'consumer'])).toEqual({ actionId: '2', consumer: 'test-consumer', - isEphemeral: false, params: { baz: true }, relatedSavedObjects: [], executionId: '123abc', @@ -569,7 +563,6 @@ describe('Task Runner Factory', () => { const [executeParams] = mockedActionExecutor.execute.mock.calls[0]; expect(pick(executeParams, executeParamsFields)).toEqual({ actionId: '2', - isEphemeral: false, params: { baz: true }, executionId: '123abc', relatedSavedObjects: [], @@ -627,7 +620,6 @@ describe('Task Runner Factory', () => { const [executeParams] = mockedActionExecutor.execute.mock.calls[0]; expect(pick(executeParams, executeParamsFields)).toEqual({ actionId: '2', - isEphemeral: false, params: { baz: true }, executionId: '123abc', relatedSavedObjects: [ @@ -680,7 +672,6 @@ describe('Task Runner Factory', () => { const [executeParams] = mockedActionExecutor.execute.mock.calls[0]; expect(pick(executeParams, executeParamsFields)).toEqual({ actionId: '2', - isEphemeral: false, params: { baz: true }, executionId: '123abc', relatedSavedObjects: [ @@ -739,7 +730,6 @@ describe('Task Runner Factory', () => { const [executeParams] = mockedActionExecutor.execute.mock.calls[0]; expect(pick(executeParams, executeParamsFields)).toEqual({ actionId: '2', - isEphemeral: false, params: { baz: true }, request: { headers: { @@ -785,7 +775,6 @@ describe('Task Runner Factory', () => { const [executeParams] = mockedActionExecutor.execute.mock.calls[0]; expect(pick(executeParams, executeParamsFields)).toEqual({ actionId: '2', - isEphemeral: false, params: { baz: true }, executionId: '123abc', relatedSavedObjects: [], diff --git a/x-pack/plugins/actions/server/lib/task_runner_factory.ts b/x-pack/plugins/actions/server/lib/task_runner_factory.ts index cf1f9eed87c32..b718a32a2e4ad 100644 --- a/x-pack/plugins/actions/server/lib/task_runner_factory.ts +++ b/x-pack/plugins/actions/server/lib/task_runner_factory.ts @@ -32,7 +32,6 @@ import { ActionTaskParams, ActionTypeExecutorResult, ActionTypeRegistryContract, - isPersistedActionTask, SpaceIdToNamespaceFunction, } from '../types'; import { ACTION_TASK_PARAMS_SAVED_OBJECT_TYPE } from '../constants/saved_objects'; @@ -128,7 +127,6 @@ export class TaskRunnerFactory { executorResult = await actionExecutor.execute({ params, actionId: actionId as string, - isEphemeral: !isPersistedActionTask(actionTaskExecutorParams), request, taskInfo, executionId, @@ -209,19 +207,17 @@ export class TaskRunnerFactory { }, cleanup: async () => { // Cleanup action_task_params object now that we're done with it - if (isPersistedActionTask(actionTaskExecutorParams)) { - try { - await savedObjectsRepository.delete( - ACTION_TASK_PARAMS_SAVED_OBJECT_TYPE, - actionTaskExecutorParams.actionTaskParamsId, - { refresh: false, namespace: spaceIdToNamespace(actionTaskExecutorParams.spaceId) } - ); - } catch (e) { - // Log error only, we shouldn't fail the task because of an error here (if ever there's retry logic) - logger.error( - `Failed to cleanup ${ACTION_TASK_PARAMS_SAVED_OBJECT_TYPE} object [id="${actionTaskExecutorParams.actionTaskParamsId}"]: ${e.message}` - ); - } + try { + await savedObjectsRepository.delete( + ACTION_TASK_PARAMS_SAVED_OBJECT_TYPE, + actionTaskExecutorParams.actionTaskParamsId, + { refresh: false, namespace: spaceIdToNamespace(actionTaskExecutorParams.spaceId) } + ); + } catch (e) { + // Log error only, we shouldn't fail the task because of an error here (if ever there's retry logic) + logger.error( + `Failed to cleanup ${ACTION_TASK_PARAMS_SAVED_OBJECT_TYPE} object [id="${actionTaskExecutorParams.actionTaskParamsId}"]: ${e.message}` + ); } }, }; @@ -252,45 +248,41 @@ async function getActionTaskParams( ): Promise { const { spaceId } = executorParams; const namespace = spaceIdToNamespace(spaceId); - if (isPersistedActionTask(executorParams)) { - try { - const actionTask = - await encryptedSavedObjectsClient.getDecryptedAsInternalUser( - ACTION_TASK_PARAMS_SAVED_OBJECT_TYPE, - executorParams.actionTaskParamsId, - { namespace } - ); - const { - attributes: { relatedSavedObjects }, - references, - } = actionTask; + try { + const actionTask = + await encryptedSavedObjectsClient.getDecryptedAsInternalUser( + ACTION_TASK_PARAMS_SAVED_OBJECT_TYPE, + executorParams.actionTaskParamsId, + { namespace } + ); + const { + attributes: { relatedSavedObjects }, + references, + } = actionTask; - const { actionId, relatedSavedObjects: injectedRelatedSavedObjects } = - injectSavedObjectReferences(references, relatedSavedObjects as RelatedSavedObjects); + const { actionId, relatedSavedObjects: injectedRelatedSavedObjects } = + injectSavedObjectReferences(references, relatedSavedObjects as RelatedSavedObjects); - return { - ...actionTask, - attributes: { - ...actionTask.attributes, - ...(actionId ? { actionId } : {}), - ...(relatedSavedObjects ? { relatedSavedObjects: injectedRelatedSavedObjects } : {}), - }, - }; - } catch (e) { - const errorSource = SavedObjectsErrorHelpers.isNotFoundError(e) - ? TaskErrorSource.USER - : TaskErrorSource.FRAMEWORK; - logger.error( - `Failed to load action task params ${executorParams.actionTaskParamsId}: ${e.message}`, - { tags: ['connector-run-failed', `${errorSource}-error`] } - ); - if (SavedObjectsErrorHelpers.isNotFoundError(e)) { - throw createRetryableError(createTaskRunError(e, errorSource), true); - } + return { + ...actionTask, + attributes: { + ...actionTask.attributes, + ...(actionId ? { actionId } : {}), + ...(relatedSavedObjects ? { relatedSavedObjects: injectedRelatedSavedObjects } : {}), + }, + }; + } catch (e) { + const errorSource = SavedObjectsErrorHelpers.isNotFoundError(e) + ? TaskErrorSource.USER + : TaskErrorSource.FRAMEWORK; + logger.error( + `Failed to load action task params ${executorParams.actionTaskParamsId}: ${e.message}`, + { tags: ['connector-run-failed', `${errorSource}-error`] } + ); + if (SavedObjectsErrorHelpers.isNotFoundError(e)) { throw createRetryableError(createTaskRunError(e, errorSource), true); } - } else { - return { attributes: executorParams.taskParams, references: executorParams.references ?? [] }; + throw createRetryableError(createTaskRunError(e, errorSource), true); } } diff --git a/x-pack/plugins/actions/server/plugin.ts b/x-pack/plugins/actions/server/plugin.ts index edfd7606950c1..012f602398e64 100644 --- a/x-pack/plugins/actions/server/plugin.ts +++ b/x-pack/plugins/actions/server/plugin.ts @@ -48,10 +48,7 @@ import { resolveCustomHosts } from './lib/custom_host_settings'; import { events } from './lib/event_based_telemetry'; import { ActionsClient } from './actions_client/actions_client'; import { ActionTypeRegistry } from './action_type_registry'; -import { - createEphemeralExecutionEnqueuerFunction, - createBulkExecutionEnqueuerFunction, -} from './create_execute_function'; +import { createBulkExecutionEnqueuerFunction } from './create_execute_function'; import { registerActionsUsageCollector } from './usage'; import { ActionExecutor, @@ -480,14 +477,6 @@ export class ActionsPlugin implements Plugin; @@ -238,27 +236,11 @@ export interface ActionTaskParams extends SavedObjectAttributes { source?: string; } -interface PersistedActionTaskExecutorParams { +export interface ActionTaskExecutorParams { spaceId: string; actionTaskParamsId: string; } -interface EphemeralActionTaskExecutorParams { - spaceId: string; - taskParams: ActionTaskParams; - references?: SavedObjectReference[]; -} - -export type ActionTaskExecutorParams = - | PersistedActionTaskExecutorParams - | EphemeralActionTaskExecutorParams; - -export function isPersistedActionTask( - actionTask: ActionTaskExecutorParams -): actionTask is PersistedActionTaskExecutorParams { - return typeof (actionTask as PersistedActionTaskExecutorParams).actionTaskParamsId === 'string'; -} - export interface ProxySettings { proxyUrl: string; proxyBypassHosts: Set | undefined; diff --git a/x-pack/plugins/aiops/public/components/log_categorization/log_categorization_for_embeddable/log_categorization_for_discover.tsx b/x-pack/plugins/aiops/public/components/log_categorization/log_categorization_for_embeddable/log_categorization_for_discover.tsx index 5bf415c5ccfc9..f4c25eafa5da4 100644 --- a/x-pack/plugins/aiops/public/components/log_categorization/log_categorization_for_embeddable/log_categorization_for_discover.tsx +++ b/x-pack/plugins/aiops/public/components/log_categorization/log_categorization_for_embeddable/log_categorization_for_discover.tsx @@ -401,9 +401,6 @@ export const LogCategorizationDiscover: FC = ( ); const style = css({ overflowY: 'auto', - '.kbnDocTableWrapper': { - overflowX: 'hidden', - }, }); const actions = getActions(false); diff --git a/x-pack/plugins/alerting/common/routes/rule/apis/aggregate/schemas/v1.ts b/x-pack/plugins/alerting/common/routes/rule/apis/aggregate/schemas/v1.ts index 95f07bf3f7bda..57a9499779add 100644 --- a/x-pack/plugins/alerting/common/routes/rule/apis/aggregate/schemas/v1.ts +++ b/x-pack/plugins/alerting/common/routes/rule/apis/aggregate/schemas/v1.ts @@ -24,7 +24,8 @@ export const aggregateRulesRequestBodySchema = schema.object({ ) ), filter: schema.maybe(schema.string()), - filter_consumers: schema.maybe(schema.arrayOf(schema.string())), + rule_type_ids: schema.maybe(schema.arrayOf(schema.string())), + consumers: schema.maybe(schema.arrayOf(schema.string())), }); export const aggregateRulesResponseBodySchema = schema.object({ diff --git a/x-pack/plugins/alerting/common/routes/rule/apis/bulk_untrack_by_query/schemas/v1.ts b/x-pack/plugins/alerting/common/routes/rule/apis/bulk_untrack_by_query/schemas/v1.ts index 62cc67360b162..26e5283cede13 100644 --- a/x-pack/plugins/alerting/common/routes/rule/apis/bulk_untrack_by_query/schemas/v1.ts +++ b/x-pack/plugins/alerting/common/routes/rule/apis/bulk_untrack_by_query/schemas/v1.ts @@ -9,5 +9,5 @@ import { schema } from '@kbn/config-schema'; export const bulkUntrackByQueryBodySchema = schema.object({ query: schema.arrayOf(schema.any()), - feature_ids: schema.arrayOf(schema.string()), + rule_type_ids: schema.arrayOf(schema.string()), }); diff --git a/x-pack/plugins/alerting/common/routes/rule/apis/find/index.ts b/x-pack/plugins/alerting/common/routes/rule/apis/find/index.ts index 7722521d2b707..b8ebef499e7e0 100644 --- a/x-pack/plugins/alerting/common/routes/rule/apis/find/index.ts +++ b/x-pack/plugins/alerting/common/routes/rule/apis/find/index.ts @@ -8,8 +8,13 @@ export { findRulesRequestQuerySchema } from './schemas/latest'; export type { FindRulesRequestQuery, FindRulesResponse } from './types/latest'; -export { findRulesRequestQuerySchema as findRulesRequestQuerySchemaV1 } from './schemas/v1'; +export { + findRulesRequestQuerySchema as findRulesRequestQuerySchemaV1, + findRulesInternalRequestBodySchema as findRulesInternalRequestBodySchemaV1, +} from './schemas/v1'; + export type { FindRulesRequestQuery as FindRulesRequestQueryV1, + FindRulesInternalRequestBody as FindRulesInternalRequestBodyV1, FindRulesResponse as FindRulesResponseV1, } from './types/latest'; diff --git a/x-pack/plugins/alerting/common/routes/rule/apis/find/schemas/v1.ts b/x-pack/plugins/alerting/common/routes/rule/apis/find/schemas/v1.ts index 1dece949a9556..06ebfdbacc54d 100644 --- a/x-pack/plugins/alerting/common/routes/rule/apis/find/schemas/v1.ts +++ b/x-pack/plugins/alerting/common/routes/rule/apis/find/schemas/v1.ts @@ -103,3 +103,35 @@ export const findRulesRequestQuerySchema = schema.object({ ) ), }); + +export const findRulesInternalRequestBodySchema = schema.object({ + per_page: schema.number({ + defaultValue: 10, + min: 0, + }), + page: schema.number({ + defaultValue: 1, + min: 1, + }), + search: schema.maybe(schema.string()), + default_search_operator: schema.oneOf([schema.literal('OR'), schema.literal('AND')], { + defaultValue: 'OR', + }), + search_fields: schema.maybe(schema.oneOf([schema.arrayOf(schema.string()), schema.string()])), + sort_field: schema.maybe(schema.string()), + sort_order: schema.maybe(schema.oneOf([schema.literal('asc'), schema.literal('desc')])), + has_reference: schema.maybe( + // use nullable as maybe is currently broken + // in config-schema + schema.nullable( + schema.object({ + type: schema.string(), + id: schema.string(), + }) + ) + ), + fields: schema.maybe(schema.arrayOf(schema.string())), + filter: schema.maybe(schema.string()), + rule_type_ids: schema.maybe(schema.arrayOf(schema.string())), + consumers: schema.maybe(schema.arrayOf(schema.string())), +}); diff --git a/x-pack/plugins/alerting/common/routes/rule/apis/find/types/v1.ts b/x-pack/plugins/alerting/common/routes/rule/apis/find/types/v1.ts index 271e791282f43..e09b4871eabc9 100644 --- a/x-pack/plugins/alerting/common/routes/rule/apis/find/types/v1.ts +++ b/x-pack/plugins/alerting/common/routes/rule/apis/find/types/v1.ts @@ -7,9 +7,10 @@ import type { TypeOf } from '@kbn/config-schema'; import { RuleParamsV1, RuleResponseV1 } from '../../../response'; -import { findRulesRequestQuerySchemaV1 } from '..'; +import { findRulesRequestQuerySchemaV1, findRulesInternalRequestBodySchemaV1 } from '..'; export type FindRulesRequestQuery = TypeOf; +export type FindRulesInternalRequestBody = TypeOf; export interface FindRulesResponse { body: { diff --git a/x-pack/plugins/alerting/public/pages/maintenance_windows/components/create_maintenance_windows_form.tsx b/x-pack/plugins/alerting/public/pages/maintenance_windows/components/create_maintenance_windows_form.tsx index 7f3c25eeaf55d..04bab61eb5c6f 100644 --- a/x-pack/plugins/alerting/public/pages/maintenance_windows/components/create_maintenance_windows_form.tsx +++ b/x-pack/plugins/alerting/public/pages/maintenance_windows/components/create_maintenance_windows_form.tsx @@ -31,7 +31,6 @@ import { } from '@elastic/eui'; import { TIMEZONE_OPTIONS as UI_TIMEZONE_OPTIONS } from '@kbn/core-ui-settings-common'; import { DEFAULT_APP_CATEGORIES } from '@kbn/core-application-common'; -import type { ValidFeatureId } from '@kbn/rule-data-utils'; import type { Filter } from '@kbn/es-query'; import type { IHttpFetchError } from '@kbn/core-http-browser'; import type { KibanaServerError } from '@kbn/kibana-utils-plugin/public'; @@ -73,7 +72,10 @@ const useDefaultTimezone = () => { } return { defaultTimezone: kibanaTz, isBrowser: false }; }; -const TIMEZONE_OPTIONS = UI_TIMEZONE_OPTIONS.map((n) => ({ label: n })) ?? [{ label: 'UTC' }]; + +const TIMEZONE_OPTIONS = UI_TIMEZONE_OPTIONS.map((timezoneOption) => ({ + label: timezoneOption, +})) ?? [{ label: 'UTC' }]; export const CreateMaintenanceWindowForm = React.memo((props) => { const { onCancel, onSuccess, initialValue, maintenanceWindowId } = props; @@ -203,6 +205,7 @@ export const CreateMaintenanceWindowForm = React.memo ruleType.category))]; }, [validRuleTypes]); - const featureIds = useMemo(() => { + const ruleTypeIds = useMemo(() => { if (!Array.isArray(validRuleTypes) || !Array.isArray(categoryIds) || !mounted) { return []; } - const featureIdsSet = new Set(); + const uniqueRuleTypeIds = new Set(); validRuleTypes.forEach((ruleType) => { if (categoryIds.includes(ruleType.category)) { - featureIdsSet.add(ruleType.producer as ValidFeatureId); + uniqueRuleTypeIds.add(ruleType.id); } }); - return [...featureIdsSet]; + return [...uniqueRuleTypeIds]; }, [validRuleTypes, categoryIds, mounted]); const onCategoryIdsChange = useCallback( @@ -476,7 +479,7 @@ export const CreateMaintenanceWindowForm = React.memo {() => ( { it('renders correctly', () => { appMockRenderer.render( { it('should hide the search bar if isEnabled is false', () => { appMockRenderer.render( { it('should render loading if isLoading is true', () => { appMockRenderer.render( { const { - featureIds, + ruleTypeIds, query, filters, errors = [], @@ -76,7 +75,7 @@ export const MaintenanceWindowScopedQuery = React.memo( { + const features = featuresPluginMock.createStart(); + const securityPluginStart = securityMock.createStart(); + const alertingAuthorizationClientFactoryParams: jest.Mocked = + { + ruleTypeRegistry: ruleTypeRegistryMock.create(), + getSpace: jest.fn(), + getSpaceId: jest.fn(), + features, + }; -const securityPluginSetup = securityMock.createSetup(); -const securityPluginStart = securityMock.createStart(); + beforeEach(() => { + jest.clearAllMocks(); + }); -const alertingAuthorizationClientFactoryParams: jest.Mocked = - { - ruleTypeRegistry: ruleTypeRegistryMock.create(), - getSpace: jest.fn(), - getSpaceId: jest.fn(), - features, - }; + it('creates an alerting authorization client with proper constructor arguments when security is enabled', async () => { + const factory = new AlertingAuthorizationClientFactory(); -beforeEach(() => { - jest.resetAllMocks(); -}); + factory.initialize({ + securityPluginStart, + ...alertingAuthorizationClientFactoryParams, + }); + + const request = mockRouter.createKibanaRequest(); + + await factory.create(request); -test('creates an alerting authorization client with proper constructor arguments when security is enabled', async () => { - const factory = new AlertingAuthorizationClientFactory(); - factory.initialize({ - securityPluginSetup, - securityPluginStart, - ...alertingAuthorizationClientFactoryParams, + const { AlertingAuthorization } = jest.requireMock('./authorization/alerting_authorization'); + expect(AlertingAuthorization.create).toHaveBeenCalledWith({ + request, + authorization: securityPluginStart.authz, + ruleTypeRegistry: alertingAuthorizationClientFactoryParams.ruleTypeRegistry, + features: alertingAuthorizationClientFactoryParams.features, + getSpace: expect.any(Function), + getSpaceId: expect.any(Function), + }); }); - const request = mockRouter.createKibanaRequest(); - factory.create(request); + it('creates an alerting authorization client with proper constructor arguments', async () => { + const factory = new AlertingAuthorizationClientFactory(); + factory.initialize(alertingAuthorizationClientFactoryParams); + const request = mockRouter.createKibanaRequest(); - const { AlertingAuthorization } = jest.requireMock('./authorization/alerting_authorization'); - expect(AlertingAuthorization).toHaveBeenCalledWith({ - request, - authorization: securityPluginStart.authz, - ruleTypeRegistry: alertingAuthorizationClientFactoryParams.ruleTypeRegistry, - features: alertingAuthorizationClientFactoryParams.features, - getSpace: expect.any(Function), - getSpaceId: expect.any(Function), + await factory.create(request); + + const { AlertingAuthorization } = jest.requireMock('./authorization/alerting_authorization'); + expect(AlertingAuthorization.create).toHaveBeenCalledWith({ + request, + ruleTypeRegistry: alertingAuthorizationClientFactoryParams.ruleTypeRegistry, + features: alertingAuthorizationClientFactoryParams.features, + getSpace: expect.any(Function), + getSpaceId: expect.any(Function), + }); }); -}); -test('creates an alerting authorization client with proper constructor arguments', async () => { - const factory = new AlertingAuthorizationClientFactory(); - factory.initialize(alertingAuthorizationClientFactoryParams); - const request = mockRouter.createKibanaRequest(); + it('throws when trying to initialize again and it is already initialized', async () => { + const factory = new AlertingAuthorizationClientFactory(); + factory.initialize(alertingAuthorizationClientFactoryParams); + + expect(() => + factory.initialize(alertingAuthorizationClientFactoryParams) + ).toThrowErrorMatchingInlineSnapshot( + `"AlertingAuthorizationClientFactory already initialized"` + ); + }); - factory.create(request); + it('throws when trying to create an instance and the factory is not initialized', async () => { + const request = mockRouter.createKibanaRequest(); + const factory = new AlertingAuthorizationClientFactory(); - const { AlertingAuthorization } = jest.requireMock('./authorization/alerting_authorization'); - expect(AlertingAuthorization).toHaveBeenCalledWith({ - request, - ruleTypeRegistry: alertingAuthorizationClientFactoryParams.ruleTypeRegistry, - features: alertingAuthorizationClientFactoryParams.features, - getSpace: expect.any(Function), - getSpaceId: expect.any(Function), + await expect(() => factory.create(request)).rejects.toThrowErrorMatchingInlineSnapshot( + `"AlertingAuthorizationClientFactory must be initialized before calling create"` + ); }); }); diff --git a/x-pack/plugins/alerting/server/alerting_authorization_client_factory.ts b/x-pack/plugins/alerting/server/alerting_authorization_client_factory.ts index ca366a6cee0e4..8c5a772501f2b 100644 --- a/x-pack/plugins/alerting/server/alerting_authorization_client_factory.ts +++ b/x-pack/plugins/alerting/server/alerting_authorization_client_factory.ts @@ -6,7 +6,7 @@ */ import { KibanaRequest } from '@kbn/core/server'; -import { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin/server'; +import { SecurityPluginStart } from '@kbn/security-plugin/server'; import { FeaturesPluginStart } from '@kbn/features-plugin/server'; import { Space } from '@kbn/spaces-plugin/server'; import { AlertingAuthorization } from './authorization/alerting_authorization'; @@ -14,7 +14,6 @@ import { RuleTypeRegistry } from './types'; export interface AlertingAuthorizationClientFactoryOpts { ruleTypeRegistry: RuleTypeRegistry; - securityPluginSetup?: SecurityPluginSetup; securityPluginStart?: SecurityPluginStart; getSpace: (request: KibanaRequest) => Promise; getSpaceId: (request: KibanaRequest) => string; @@ -23,33 +22,39 @@ export interface AlertingAuthorizationClientFactoryOpts { export class AlertingAuthorizationClientFactory { private isInitialized = false; - private ruleTypeRegistry!: RuleTypeRegistry; - private securityPluginStart?: SecurityPluginStart; - private features!: FeaturesPluginStart; - private getSpace!: (request: KibanaRequest) => Promise; - private getSpaceId!: (request: KibanaRequest) => string; + // The reason this is protected is because we'll get type collisions otherwise because we're using a type guard assert + // to ensure the options member is instantiated before using it in various places + // See for more info: https://stackoverflow.com/questions/66206180/typescript-typeguard-attribut-with-method + protected options?: AlertingAuthorizationClientFactoryOpts; public initialize(options: AlertingAuthorizationClientFactoryOpts) { if (this.isInitialized) { throw new Error('AlertingAuthorizationClientFactory already initialized'); } this.isInitialized = true; - this.getSpace = options.getSpace; - this.ruleTypeRegistry = options.ruleTypeRegistry; - this.securityPluginStart = options.securityPluginStart; - this.features = options.features; - this.getSpaceId = options.getSpaceId; + this.options = options; } - public create(request: KibanaRequest): AlertingAuthorization { - const { securityPluginStart, features } = this; - return new AlertingAuthorization({ - authorization: securityPluginStart?.authz, + public async create(request: KibanaRequest): Promise { + this.validateInitialization(); + + return AlertingAuthorization.create({ + authorization: this.options.securityPluginStart?.authz, request, - getSpace: this.getSpace, - getSpaceId: this.getSpaceId, - ruleTypeRegistry: this.ruleTypeRegistry, - features: features!, + getSpace: this.options.getSpace, + getSpaceId: this.options.getSpaceId, + ruleTypeRegistry: this.options.ruleTypeRegistry, + features: this.options.features, }); } + + private validateInitialization(): asserts this is this & { + options: AlertingAuthorizationClientFactoryOpts; + } { + if (!this.isInitialized || this.options == null) { + throw new Error( + 'AlertingAuthorizationClientFactory must be initialized before calling create' + ); + } + } } diff --git a/x-pack/plugins/alerting/server/alerts_service/lib/set_alerts_to_untracked.test.ts b/x-pack/plugins/alerting/server/alerts_service/lib/set_alerts_to_untracked.test.ts index 54376012aa767..003673f9fdb92 100644 --- a/x-pack/plugins/alerting/server/alerts_service/lib/set_alerts_to_untracked.test.ts +++ b/x-pack/plugins/alerting/server/alerts_service/lib/set_alerts_to_untracked.test.ts @@ -15,10 +15,8 @@ import { setAlertsToUntracked } from './set_alerts_to_untracked'; let clusterClient: ElasticsearchClientMock; let logger: ReturnType<(typeof loggingSystemMock)['createLogger']>; -const getAuthorizedRuleTypesMock = jest.fn(); - +const getAllAuthorizedRuleTypesFindOperationMock = jest.fn(); const getAlertIndicesAliasMock = jest.fn(); - const ensureAuthorizedMock = jest.fn(); describe('setAlertsToUntracked()', () => { @@ -362,11 +360,16 @@ describe('setAlertsToUntracked()', () => { }); test('should untrack by query', async () => { - getAuthorizedRuleTypesMock.mockResolvedValue([ - { - id: 'test-rule-type', - }, - ]); + getAllAuthorizedRuleTypesFindOperationMock.mockResolvedValue( + new Map([ + [ + 'test-rule-type', + { + id: 'test-rule-type', + }, + ], + ]) + ); getAlertIndicesAliasMock.mockResolvedValue(['test-alert-index']); clusterClient.search.mockResponseOnce({ @@ -441,9 +444,9 @@ describe('setAlertsToUntracked()', () => { }, }, ], - featureIds: ['o11y'], + ruleTypeIds: ['my-rule-type-id'], spaceId: 'default', - getAuthorizedRuleTypes: getAuthorizedRuleTypesMock, + getAllAuthorizedRuleTypesFindOperation: getAllAuthorizedRuleTypesFindOperationMock, getAlertIndicesAlias: getAlertIndicesAliasMock, ensureAuthorized: ensureAuthorizedMock, logger, @@ -527,11 +530,16 @@ describe('setAlertsToUntracked()', () => { }); test('should return an empty array if the search returns zero results', async () => { - getAuthorizedRuleTypesMock.mockResolvedValue([ - { - id: 'test-rule-type', - }, - ]); + getAllAuthorizedRuleTypesFindOperationMock.mockResolvedValue( + new Map([ + [ + 'test-rule-type', + { + id: 'test-rule-type', + }, + ], + ]) + ); getAlertIndicesAliasMock.mockResolvedValue(['test-alert-index']); clusterClient.search.mockResponseOnce({ @@ -575,9 +583,9 @@ describe('setAlertsToUntracked()', () => { }, }, ], - featureIds: ['o11y'], + ruleTypeIds: ['my-rule-type-id'], spaceId: 'default', - getAuthorizedRuleTypes: getAuthorizedRuleTypesMock, + getAllAuthorizedRuleTypesFindOperation: getAllAuthorizedRuleTypesFindOperationMock, getAlertIndicesAlias: getAlertIndicesAliasMock, ensureAuthorized: ensureAuthorizedMock, logger, diff --git a/x-pack/plugins/alerting/server/alerts_service/lib/set_alerts_to_untracked.ts b/x-pack/plugins/alerting/server/alerts_service/lib/set_alerts_to_untracked.ts index ed0c2cb21e06b..89c8d671de6a0 100644 --- a/x-pack/plugins/alerting/server/alerts_service/lib/set_alerts_to_untracked.ts +++ b/x-pack/plugins/alerting/server/alerts_service/lib/set_alerts_to_untracked.ts @@ -21,8 +21,8 @@ import { AlertStatus, } from '@kbn/rule-data-utils'; import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { AlertingAuthorizationEntity } from '../../authorization/alerting_authorization'; import type { RulesClientContext } from '../../rules_client'; +import { AlertingAuthorizationEntity } from '../../authorization/types'; type EnsureAuthorized = (opts: { ruleTypeId: string; consumer: string }) => Promise; @@ -32,9 +32,9 @@ export interface SetAlertsToUntrackedParams { alertUuids?: string[]; query?: QueryDslQueryContainer[]; spaceId?: RulesClientContext['spaceId']; - featureIds?: string[]; + ruleTypeIds?: string[]; isUsingQuery?: boolean; - getAuthorizedRuleTypes?: RulesClientContext['authorization']['getAuthorizedRuleTypes']; + getAllAuthorizedRuleTypesFindOperation?: RulesClientContext['authorization']['getAllAuthorizedRuleTypesFindOperation']; getAlertIndicesAlias?: RulesClientContext['getAlertIndicesAlias']; ensureAuthorized?: EnsureAuthorized; } @@ -155,21 +155,26 @@ const ensureAuthorizedToUntrack = async (params: SetAlertsToUntrackedParamsWithD }; const getAuthorizedAlertsIndices = async ({ - featureIds, - getAuthorizedRuleTypes, + ruleTypeIds, + getAllAuthorizedRuleTypesFindOperation, getAlertIndicesAlias, spaceId, logger, }: SetAlertsToUntrackedParamsWithDep) => { try { - const authorizedRuleTypes = - (await getAuthorizedRuleTypes?.(AlertingAuthorizationEntity.Alert, new Set(featureIds))) || - []; - const indices = getAlertIndicesAlias?.( - authorizedRuleTypes.map((art: { id: string }) => art.id), - spaceId - ); - return indices; + const authorizedRuleTypes = await getAllAuthorizedRuleTypesFindOperation?.({ + authorizationEntity: AlertingAuthorizationEntity.Alert, + ruleTypeIds, + }); + + if (authorizedRuleTypes) { + return getAlertIndicesAlias?.( + Array.from(authorizedRuleTypes.keys()).map((id) => id), + spaceId + ); + } + + return []; } catch (error) { const errMessage = `Failed to get authorized rule types to untrack alerts by query: ${error}`; logger.error(errMessage); diff --git a/x-pack/plugins/alerting/server/application/backfill/methods/find/find_backfill.test.ts b/x-pack/plugins/alerting/server/application/backfill/methods/find/find_backfill.test.ts index dab9d5f38f036..ade1a1f35b59e 100644 --- a/x-pack/plugins/alerting/server/application/backfill/methods/find/find_backfill.test.ts +++ b/x-pack/plugins/alerting/server/application/backfill/methods/find/find_backfill.test.ts @@ -241,12 +241,15 @@ describe('findBackfill()', () => { test('should successfully find backfill with no filter', async () => { const result = await rulesClient.findBackfill({ page: 1, perPage: 10 }); - expect(authorization.getFindAuthorizationFilter).toHaveBeenCalledWith('rule', { - fieldNames: { - consumer: 'ad_hoc_run_params.attributes.rule.consumer', - ruleTypeId: 'ad_hoc_run_params.attributes.rule.alertTypeId', + expect(authorization.getFindAuthorizationFilter).toHaveBeenCalledWith({ + authorizationEntity: 'rule', + filterOpts: { + fieldNames: { + consumer: 'ad_hoc_run_params.attributes.rule.consumer', + ruleTypeId: 'ad_hoc_run_params.attributes.rule.alertTypeId', + }, + type: 'kql', }, - type: 'kql', }); expect(unsecuredSavedObjectsClient.find).toHaveBeenCalledWith({ @@ -286,12 +289,15 @@ describe('findBackfill()', () => { test('should successfully find backfill with rule id', async () => { const result = await rulesClient.findBackfill({ page: 1, perPage: 10, ruleIds: 'abc' }); - expect(authorization.getFindAuthorizationFilter).toHaveBeenCalledWith('rule', { - fieldNames: { - consumer: 'ad_hoc_run_params.attributes.rule.consumer', - ruleTypeId: 'ad_hoc_run_params.attributes.rule.alertTypeId', + expect(authorization.getFindAuthorizationFilter).toHaveBeenCalledWith({ + authorizationEntity: 'rule', + filterOpts: { + fieldNames: { + consumer: 'ad_hoc_run_params.attributes.rule.consumer', + ruleTypeId: 'ad_hoc_run_params.attributes.rule.alertTypeId', + }, + type: 'kql', }, - type: 'kql', }); expect(unsecuredSavedObjectsClient.find).toHaveBeenCalledWith({ @@ -336,12 +342,15 @@ describe('findBackfill()', () => { start: '2024-03-29T02:07:55Z', }); - expect(authorization.getFindAuthorizationFilter).toHaveBeenCalledWith('rule', { - fieldNames: { - consumer: 'ad_hoc_run_params.attributes.rule.consumer', - ruleTypeId: 'ad_hoc_run_params.attributes.rule.alertTypeId', + expect(authorization.getFindAuthorizationFilter).toHaveBeenCalledWith({ + authorizationEntity: 'rule', + filterOpts: { + fieldNames: { + consumer: 'ad_hoc_run_params.attributes.rule.consumer', + ruleTypeId: 'ad_hoc_run_params.attributes.rule.alertTypeId', + }, + type: 'kql', }, - type: 'kql', }); expect(unsecuredSavedObjectsClient.find).toHaveBeenCalledWith({ @@ -400,12 +409,15 @@ describe('findBackfill()', () => { end: '2024-03-29T02:07:55Z', }); - expect(authorization.getFindAuthorizationFilter).toHaveBeenCalledWith('rule', { - fieldNames: { - consumer: 'ad_hoc_run_params.attributes.rule.consumer', - ruleTypeId: 'ad_hoc_run_params.attributes.rule.alertTypeId', + expect(authorization.getFindAuthorizationFilter).toHaveBeenCalledWith({ + authorizationEntity: 'rule', + filterOpts: { + fieldNames: { + consumer: 'ad_hoc_run_params.attributes.rule.consumer', + ruleTypeId: 'ad_hoc_run_params.attributes.rule.alertTypeId', + }, + type: 'kql', }, - type: 'kql', }); expect(unsecuredSavedObjectsClient.find).toHaveBeenCalledWith({ @@ -465,12 +477,15 @@ describe('findBackfill()', () => { end: '2024-03-29T02:07:55Z', }); - expect(authorization.getFindAuthorizationFilter).toHaveBeenCalledWith('rule', { - fieldNames: { - consumer: 'ad_hoc_run_params.attributes.rule.consumer', - ruleTypeId: 'ad_hoc_run_params.attributes.rule.alertTypeId', + expect(authorization.getFindAuthorizationFilter).toHaveBeenCalledWith({ + authorizationEntity: 'rule', + filterOpts: { + fieldNames: { + consumer: 'ad_hoc_run_params.attributes.rule.consumer', + ruleTypeId: 'ad_hoc_run_params.attributes.rule.alertTypeId', + }, + type: 'kql', }, - type: 'kql', }); expect(unsecuredSavedObjectsClient.find).toHaveBeenCalledWith({ @@ -546,12 +561,15 @@ describe('findBackfill()', () => { ruleIds: 'abc', }); - expect(authorization.getFindAuthorizationFilter).toHaveBeenCalledWith('rule', { - fieldNames: { - consumer: 'ad_hoc_run_params.attributes.rule.consumer', - ruleTypeId: 'ad_hoc_run_params.attributes.rule.alertTypeId', + expect(authorization.getFindAuthorizationFilter).toHaveBeenCalledWith({ + authorizationEntity: 'rule', + filterOpts: { + fieldNames: { + consumer: 'ad_hoc_run_params.attributes.rule.consumer', + ruleTypeId: 'ad_hoc_run_params.attributes.rule.alertTypeId', + }, + type: 'kql', }, - type: 'kql', }); expect(unsecuredSavedObjectsClient.find).toHaveBeenCalledWith({ @@ -627,12 +645,15 @@ describe('findBackfill()', () => { sortOrder: 'asc', }); - expect(authorization.getFindAuthorizationFilter).toHaveBeenCalledWith('rule', { - fieldNames: { - consumer: 'ad_hoc_run_params.attributes.rule.consumer', - ruleTypeId: 'ad_hoc_run_params.attributes.rule.alertTypeId', + expect(authorization.getFindAuthorizationFilter).toHaveBeenCalledWith({ + authorizationEntity: 'rule', + filterOpts: { + fieldNames: { + consumer: 'ad_hoc_run_params.attributes.rule.consumer', + ruleTypeId: 'ad_hoc_run_params.attributes.rule.alertTypeId', + }, + type: 'kql', }, - type: 'kql', }); expect(unsecuredSavedObjectsClient.find).toHaveBeenCalledWith({ diff --git a/x-pack/plugins/alerting/server/application/backfill/methods/find/find_backfill.ts b/x-pack/plugins/alerting/server/application/backfill/methods/find/find_backfill.ts index 522128d0385f8..3482d854bda1f 100644 --- a/x-pack/plugins/alerting/server/application/backfill/methods/find/find_backfill.ts +++ b/x-pack/plugins/alerting/server/application/backfill/methods/find/find_backfill.ts @@ -40,16 +40,16 @@ export async function findBackfill( let authorizationTuple; try { - authorizationTuple = await context.authorization.getFindAuthorizationFilter( - AlertingAuthorizationEntity.Rule, - { + authorizationTuple = await context.authorization.getFindAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Rule, + filterOpts: { type: AlertingAuthorizationFilterType.KQL, fieldNames: { ruleTypeId: 'ad_hoc_run_params.attributes.rule.alertTypeId', consumer: 'ad_hoc_run_params.attributes.rule.consumer', }, - } - ); + }, + }); } catch (error) { context.auditLogger?.log( adHocRunAuditEvent({ diff --git a/x-pack/plugins/alerting/server/application/backfill/methods/schedule/schedule_backfill.test.ts b/x-pack/plugins/alerting/server/application/backfill/methods/schedule/schedule_backfill.test.ts index b8f1e5af9c869..a0a79421c7358 100644 --- a/x-pack/plugins/alerting/server/application/backfill/methods/schedule/schedule_backfill.test.ts +++ b/x-pack/plugins/alerting/server/application/backfill/methods/schedule/schedule_backfill.test.ts @@ -251,12 +251,15 @@ describe('scheduleBackfill()', () => { const mockData = [getMockData(), getMockData({ ruleId: '2', end: '2023-11-17T08:00:00.000Z' })]; const result = await rulesClient.scheduleBackfill(mockData); - expect(authorization.getFindAuthorizationFilter).toHaveBeenCalledWith('rule', { - fieldNames: { - consumer: 'alert.attributes.consumer', - ruleTypeId: 'alert.attributes.alertTypeId', + expect(authorization.getFindAuthorizationFilter).toHaveBeenCalledWith({ + authorizationEntity: 'rule', + filterOpts: { + fieldNames: { + consumer: 'alert.attributes.consumer', + ruleTypeId: 'alert.attributes.alertTypeId', + }, + type: 'kql', }, - type: 'kql', }); expect(unsecuredSavedObjectsClient.find).toHaveBeenCalledWith({ diff --git a/x-pack/plugins/alerting/server/application/backfill/methods/schedule/schedule_backfill.ts b/x-pack/plugins/alerting/server/application/backfill/methods/schedule/schedule_backfill.ts index 534262aa31c31..2dec1a78e3171 100644 --- a/x-pack/plugins/alerting/server/application/backfill/methods/schedule/schedule_backfill.ts +++ b/x-pack/plugins/alerting/server/application/backfill/methods/schedule/schedule_backfill.ts @@ -46,10 +46,10 @@ export async function scheduleBackfill( let authorizationTuple; try { - authorizationTuple = await context.authorization.getFindAuthorizationFilter( - AlertingAuthorizationEntity.Rule, - alertingAuthorizationFilterOpts - ); + authorizationTuple = await context.authorization.getFindAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Rule, + filterOpts: alertingAuthorizationFilterOpts, + }); } catch (error) { context.auditLogger?.log( ruleAuditEvent({ diff --git a/x-pack/plugins/alerting/server/application/rule/methods/aggregate/aggregate_rules.test.ts b/x-pack/plugins/alerting/server/application/rule/methods/aggregate/aggregate_rules.test.ts index 57fb2bf8f48a4..23ccbf97cb6ce 100644 --- a/x-pack/plugins/alerting/server/application/rule/methods/aggregate/aggregate_rules.test.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/aggregate/aggregate_rules.test.ts @@ -23,7 +23,7 @@ import { auditLoggerMock } from '@kbn/security-plugin/server/audit/mocks'; import { getBeforeSetup, setGlobalDate } from '../../../../rules_client/tests/lib'; import { RegistryRuleType } from '../../../../rule_type_registry'; -import { fromKueryExpression, nodeTypes } from '@kbn/es-query'; +import { fromKueryExpression, nodeTypes, toKqlExpression } from '@kbn/es-query'; import { RecoveredActionGroup } from '../../../../../common'; import { DefaultRuleAggregationResult } from '../../../../routes/rule/apis/aggregate/types'; import { defaultRuleAggregationFactory } from '.'; @@ -78,24 +78,28 @@ beforeEach(() => { setGlobalDate(); describe('aggregate()', () => { - const listedTypes = new Set([ - { - actionGroups: [], - actionVariables: undefined, - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: 'myType', - name: 'myType', - category: 'test', - producer: 'myApp', - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], - }, + const listedTypes = new Map([ + [ + 'myType', + { + actionGroups: [], + actionVariables: undefined, + defaultActionGroupId: 'default', + minimumLicenseRequired: 'basic', + isExportable: true, + recoveryActionGroup: RecoveredActionGroup, + id: 'myType', + name: 'myType', + category: 'test', + producer: 'myApp', + enabledInLicense: true, + hasAlertsMappings: false, + hasFieldsForAAD: false, + validLegacyConsumers: [], + }, + ], ]); + beforeEach(() => { authorization.getFindAuthorizationFilter.mockResolvedValue({ ensureRuleTypeIsAuthorized() {}, @@ -161,26 +165,16 @@ describe('aggregate()', () => { }); ruleTypeRegistry.list.mockReturnValue(listedTypes); - authorization.filterByRuleTypeAuthorization.mockResolvedValue( - new Set([ - { - id: 'myType', - name: 'Test', - actionGroups: [{ id: 'default', name: 'Default' }], - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - category: 'test', - producer: 'alerts', - authorizedConsumers: { - myApp: { read: true, all: true }, + authorization.getAuthorizedRuleTypes.mockResolvedValue( + new Map([ + [ + 'myType', + { + authorizedConsumers: { + myApp: { read: true, all: true }, + }, }, - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], - }, + ], ]) ); }); @@ -394,6 +388,34 @@ describe('aggregate()', () => { ]); }); + test('combines the filters with the auth filter correctly', async () => { + const authFilter = fromKueryExpression( + 'alert.attributes.alertTypeId:myType and alert.attributes.consumer:myApp' + ); + + authorization.getFindAuthorizationFilter.mockResolvedValue({ + filter: authFilter, + ensureRuleTypeIsAuthorized() {}, + }); + + const rulesClient = new RulesClient(rulesClientParams); + await rulesClient.aggregate({ + options: { + ruleTypeIds: ['my-rule-type-id'], + consumers: ['bar'], + filter: `alert.attributes.tags: ['bar']`, + }, + aggs: defaultRuleAggregationFactory(), + }); + + const finalFilter = unsecuredSavedObjectsClient.find.mock.calls[0][0].filter; + + expect(unsecuredSavedObjectsClient.find).toHaveBeenCalledTimes(1); + expect(toKqlExpression(finalFilter)).toMatchInlineSnapshot( + `"((alert.attributes.tags: ['bar'] AND alert.attributes.alertTypeId: my-rule-type-id AND alert.attributes.consumer: bar) AND (alert.attributes.alertTypeId: myType AND alert.attributes.consumer: myApp))"` + ); + }); + test('logs audit event when not authorized to aggregate rules', async () => { const rulesClient = new RulesClient({ ...rulesClientParams, auditLogger }); authorization.getFindAuthorizationFilter.mockRejectedValue(new Error('Unauthorized')); diff --git a/x-pack/plugins/alerting/server/application/rule/methods/aggregate/aggregate_rules.ts b/x-pack/plugins/alerting/server/application/rule/methods/aggregate/aggregate_rules.ts index 9011b971e629a..307e27184ca7e 100644 --- a/x-pack/plugins/alerting/server/application/rule/methods/aggregate/aggregate_rules.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/aggregate/aggregate_rules.ts @@ -5,8 +5,13 @@ * 2.0. */ -import { KueryNode, nodeBuilder } from '@kbn/es-query'; -import { isEmpty } from 'lodash'; +import type { KueryNode } from '@kbn/es-query'; +import { + buildConsumersFilter, + buildRuleTypeIdsFilter, + combineFilterWithAuthorizationFilter, + combineFilters, +} from '../../../../rules_client/common/filters'; import { findRulesSo } from '../../../../data/rule'; import { AlertingAuthorizationEntity } from '../../../../authorization'; import { ruleAuditEvent, RuleAuditAction } from '../../../../rules_client/common/audit_events'; @@ -22,15 +27,15 @@ export async function aggregateRules>( params: AggregateParams ): Promise { const { options = {}, aggs } = params; - const { filter, page = 1, perPage = 0, filterConsumers, ...restOptions } = options; + const { filter, page = 1, perPage = 0, ruleTypeIds, consumers, ...restOptions } = options; let authorizationTuple; try { - authorizationTuple = await context.authorization.getFindAuthorizationFilter( - AlertingAuthorizationEntity.Rule, - alertingAuthorizationFilterOpts, - isEmpty(filterConsumers) ? undefined : new Set(filterConsumers) - ); + authorizationTuple = await context.authorization.getFindAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Rule, + filterOpts: alertingAuthorizationFilterOpts, + }); + validateRuleAggregationFields(aggs); aggregateOptionsSchema.validate(options); } catch (error) { @@ -45,15 +50,21 @@ export async function aggregateRules>( const { filter: authorizationFilter } = authorizationTuple; const filterKueryNode = buildKueryNodeFilter(filter); + const ruleTypeIdsFilter = buildRuleTypeIdsFilter(ruleTypeIds); + const consumersFilter = buildConsumersFilter(consumers); + const combinedFilters = combineFilters( + [filterKueryNode, ruleTypeIdsFilter, consumersFilter], + 'and' + ); const { aggregations } = await findRulesSo({ savedObjectsClient: context.unsecuredSavedObjectsClient, savedObjectsFindOptions: { ...restOptions, - filter: - authorizationFilter && filterKueryNode - ? nodeBuilder.and([filterKueryNode, authorizationFilter as KueryNode]) - : authorizationFilter, + filter: combineFilterWithAuthorizationFilter( + combinedFilters, + authorizationFilter as KueryNode + ), page, perPage, aggs, diff --git a/x-pack/plugins/alerting/server/application/rule/methods/aggregate/schemas/aggregate_options_schema.ts b/x-pack/plugins/alerting/server/application/rule/methods/aggregate/schemas/aggregate_options_schema.ts index 7250094160a04..d26f48e2462f5 100644 --- a/x-pack/plugins/alerting/server/application/rule/methods/aggregate/schemas/aggregate_options_schema.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/aggregate/schemas/aggregate_options_schema.ts @@ -16,7 +16,8 @@ export const aggregateOptionsSchema = schema.object({ id: schema.string(), }) ), - filterConsumers: schema.maybe(schema.arrayOf(schema.string())), + ruleTypeIds: schema.maybe(schema.arrayOf(schema.string())), + consumers: schema.maybe(schema.arrayOf(schema.string())), // filter type is `string | KueryNode`, but `KueryNode` has no schema to import yet filter: schema.maybe( schema.oneOf([schema.string(), schema.recordOf(schema.string(), schema.any())]) diff --git a/x-pack/plugins/alerting/server/application/rule/methods/aggregate/types/index.ts b/x-pack/plugins/alerting/server/application/rule/methods/aggregate/types/index.ts index 2156fb91e8778..e146928efcfff 100644 --- a/x-pack/plugins/alerting/server/application/rule/methods/aggregate/types/index.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/aggregate/types/index.ts @@ -9,17 +9,9 @@ import { TypeOf } from '@kbn/config-schema'; import { KueryNode } from '@kbn/es-query'; import { aggregateOptionsSchema } from '../schemas'; -type AggregateOptionsSchemaTypes = TypeOf; export type AggregateOptions = TypeOf & { - search?: AggregateOptionsSchemaTypes['search']; - defaultSearchOperator?: AggregateOptionsSchemaTypes['defaultSearchOperator']; - searchFields?: AggregateOptionsSchemaTypes['searchFields']; - hasReference?: AggregateOptionsSchemaTypes['hasReference']; // Adding filter as in schema it's defined as any instead of KueryNode filter?: string | KueryNode; - page?: AggregateOptionsSchemaTypes['page']; - perPage?: AggregateOptionsSchemaTypes['perPage']; - filterConsumers?: string[]; }; export interface AggregateParams { diff --git a/x-pack/plugins/alerting/server/application/rule/methods/bulk_edit/bulk_edit_rules.ts b/x-pack/plugins/alerting/server/application/rule/methods/bulk_edit/bulk_edit_rules.ts index 8868065fa43a5..f7d83545ec193 100644 --- a/x-pack/plugins/alerting/server/application/rule/methods/bulk_edit/bulk_edit_rules.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/bulk_edit/bulk_edit_rules.ts @@ -132,10 +132,10 @@ export async function bulkEditRules( const qNodeFilter = ids ? convertRuleIdsToKueryNode(ids) : qNodeQueryFilter; let authorizationTuple; try { - authorizationTuple = await context.authorization.getFindAuthorizationFilter( - AlertingAuthorizationEntity.Rule, - alertingAuthorizationFilterOpts - ); + authorizationTuple = await context.authorization.getFindAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Rule, + filterOpts: alertingAuthorizationFilterOpts, + }); } catch (error) { context.auditLogger?.log( ruleAuditEvent({ diff --git a/x-pack/plugins/alerting/server/application/rule/methods/bulk_untrack/bulk_untrack_alerts.ts b/x-pack/plugins/alerting/server/application/rule/methods/bulk_untrack/bulk_untrack_alerts.ts index 304037782f6d3..e93f82da28cbe 100644 --- a/x-pack/plugins/alerting/server/application/rule/methods/bulk_untrack/bulk_untrack_alerts.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/bulk_untrack/bulk_untrack_alerts.ts @@ -41,12 +41,11 @@ async function bulkUntrackAlertsWithOCC(context: RulesClientContext, params: Bul if (!context.alertsService) throw new Error('unable to access alertsService'); const result = await context.alertsService.setAlertsToUntracked({ ...params, - featureIds: params.featureIds || [], + ruleTypeIds: params.ruleTypeIds || [], spaceId: context.spaceId, getAlertIndicesAlias: context.getAlertIndicesAlias, - getAuthorizedRuleTypes: context.authorization.getAuthorizedRuleTypes.bind( - context.authorization - ), + getAllAuthorizedRuleTypesFindOperation: + context.authorization.getAllAuthorizedRuleTypesFindOperation.bind(context.authorization), ensureAuthorized: async ({ ruleTypeId, consumer, diff --git a/x-pack/plugins/alerting/server/application/rule/methods/bulk_untrack/schemas/bulk_untrack_body_schema.ts b/x-pack/plugins/alerting/server/application/rule/methods/bulk_untrack/schemas/bulk_untrack_body_schema.ts index f597d9f5b6fa4..8a4affbc83c3f 100644 --- a/x-pack/plugins/alerting/server/application/rule/methods/bulk_untrack/schemas/bulk_untrack_body_schema.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/bulk_untrack/schemas/bulk_untrack_body_schema.ts @@ -11,5 +11,5 @@ export const bulkUntrackBodySchema = schema.object({ indices: schema.maybe(schema.arrayOf(schema.string())), alertUuids: schema.maybe(schema.arrayOf(schema.string())), query: schema.maybe(schema.arrayOf(schema.any())), - featureIds: schema.maybe(schema.arrayOf(schema.string())), + ruleTypeIds: schema.maybe(schema.arrayOf(schema.string())), }); diff --git a/x-pack/plugins/alerting/server/application/rule/methods/create/create_rule.ts b/x-pack/plugins/alerting/server/application/rule/methods/create/create_rule.ts index 34e13b65d76c5..3514f8ce2237b 100644 --- a/x-pack/plugins/alerting/server/application/rule/methods/create/create_rule.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/create/create_rule.ts @@ -84,6 +84,12 @@ export async function createRule( throw Boom.badRequest(`Error validating create data - ${error.message}`); } + /** + * ruleTypeRegistry.get will throw a 400 (Bad request) + * error if the rule type is not registered. + */ + context.ruleTypeRegistry.get(data.alertTypeId); + let validationPayload: ValidateScheduleLimitResult = null; if (data.enabled) { validationPayload = await validateScheduleLimit({ diff --git a/x-pack/plugins/alerting/server/application/rule/methods/find/find_rules.test.ts b/x-pack/plugins/alerting/server/application/rule/methods/find/find_rules.test.ts index e6bfd3408a538..369549d839c79 100644 --- a/x-pack/plugins/alerting/server/application/rule/methods/find/find_rules.test.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/find/find_rules.test.ts @@ -15,7 +15,7 @@ import { import { taskManagerMock } from '@kbn/task-manager-plugin/server/mocks'; import { ruleTypeRegistryMock } from '../../../../rule_type_registry.mock'; import { alertingAuthorizationMock } from '../../../../authorization/alerting_authorization.mock'; -import { nodeTypes, fromKueryExpression } from '@kbn/es-query'; +import { nodeTypes, fromKueryExpression, toKqlExpression } from '@kbn/es-query'; import { encryptedSavedObjectsMock } from '@kbn/encrypted-saved-objects-plugin/server/mocks'; import { actionsAuthorizationMock } from '@kbn/actions-plugin/server/mocks'; import { AlertingAuthorization } from '../../../../authorization/alerting_authorization'; @@ -92,23 +92,26 @@ jest.mock('../../../../rules_client/common/map_sort_field', () => ({ })); describe('find()', () => { - const listedTypes = new Set([ - { - actionGroups: [], - recoveryActionGroup: RecoveredActionGroup, - actionVariables: undefined, - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - id: 'myType', - name: 'myType', - category: 'test', - producer: 'myApp', - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], - }, + const listedTypes = new Map([ + [ + 'myType', + { + actionGroups: [], + recoveryActionGroup: RecoveredActionGroup, + actionVariables: undefined, + defaultActionGroupId: 'default', + minimumLicenseRequired: 'basic', + isExportable: true, + id: 'myType', + name: 'myType', + category: 'test', + producer: 'myApp', + enabledInLicense: true, + hasAlertsMappings: false, + hasFieldsForAAD: false, + validLegacyConsumers: [], + }, + ], ]); beforeEach(() => { @@ -163,26 +166,16 @@ describe('find()', () => { }); ruleTypeRegistry.list.mockReturnValue(listedTypes); - authorization.filterByRuleTypeAuthorization.mockResolvedValue( - new Set([ - { - id: 'myType', - name: 'Test', - actionGroups: [{ id: 'default', name: 'Default' }], - recoveryActionGroup: RecoveredActionGroup, - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - category: 'test', - producer: 'alerts', - authorizedConsumers: { - myApp: { read: true, all: true }, + authorization.getAuthorizedRuleTypes.mockResolvedValue( + new Map([ + [ + 'myType', + { + authorizedConsumers: { + myApp: { read: true, all: true }, + }, }, - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], - }, + ], ]) ); }); @@ -235,7 +228,7 @@ describe('find()', () => { Array [ Object { "fields": undefined, - "filter": null, + "filter": undefined, "sortField": undefined, "type": "alert", }, @@ -349,7 +342,7 @@ describe('find()', () => { Array [ Object { "fields": undefined, - "filter": null, + "filter": undefined, "sortField": undefined, "type": "alert", }, @@ -461,7 +454,7 @@ describe('find()', () => { Array [ Object { "fields": undefined, - "filter": null, + "filter": undefined, "sortField": undefined, "type": "alert", }, @@ -513,13 +506,34 @@ describe('find()', () => { authorization.getFindAuthorizationFilter.mockResolvedValue({ ensureRuleTypeIsAuthorized() {}, }); + const injectReferencesFn = jest.fn().mockReturnValue({ bar: true, parameterThatIsSavedObjectId: '9', }); - ruleTypeRegistry.list.mockReturnValue( - new Set([ - ...listedTypes, + + const ruleTypes = new Map([ + [ + 'myType', + { + actionGroups: [], + recoveryActionGroup: RecoveredActionGroup, + actionVariables: undefined, + defaultActionGroupId: 'default', + minimumLicenseRequired: 'basic', + isExportable: true, + id: 'myType', + name: 'myType', + category: 'test', + producer: 'myApp', + enabledInLicense: true, + hasAlertsMappings: false, + hasFieldsForAAD: false, + validLegacyConsumers: [], + }, + ], + [ + '123', { actionGroups: [], recoveryActionGroup: RecoveredActionGroup, @@ -536,8 +550,10 @@ describe('find()', () => { hasFieldsForAAD: false, validLegacyConsumers: [], }, - ]) - ); + ], + ]); + + ruleTypeRegistry.list.mockReturnValue(ruleTypes); ruleTypeRegistry.get.mockImplementationOnce(() => ({ id: 'myType', name: 'myType', @@ -750,12 +766,33 @@ describe('find()', () => { authorization.getFindAuthorizationFilter.mockResolvedValue({ ensureRuleTypeIsAuthorized() {}, }); + const injectReferencesFn = jest.fn().mockImplementation(() => { throw new Error('something went wrong!'); }); - ruleTypeRegistry.list.mockReturnValue( - new Set([ - ...listedTypes, + + const ruleTypes = new Map([ + [ + 'myType', + { + actionGroups: [], + recoveryActionGroup: RecoveredActionGroup, + actionVariables: undefined, + defaultActionGroupId: 'default', + minimumLicenseRequired: 'basic', + isExportable: true, + id: 'myType', + name: 'myType', + category: 'test', + producer: 'myApp', + enabledInLicense: true, + hasAlertsMappings: false, + hasFieldsForAAD: false, + validLegacyConsumers: [], + }, + ], + [ + '123', { actionGroups: [], recoveryActionGroup: RecoveredActionGroup, @@ -772,8 +809,10 @@ describe('find()', () => { hasFieldsForAAD: false, validLegacyConsumers: [], }, - ]) - ); + ], + ]); + + ruleTypeRegistry.list.mockReturnValue(ruleTypes); ruleTypeRegistry.get.mockImplementationOnce(() => ({ id: 'myType', name: 'myType', @@ -792,6 +831,7 @@ describe('find()', () => { }, validLegacyConsumers: [], })); + ruleTypeRegistry.get.mockImplementationOnce(() => ({ id: '123', name: 'Test', @@ -987,12 +1027,58 @@ describe('find()', () => { expect(unsecuredSavedObjectsClient.find).toHaveBeenCalledWith({ fields: ['tags', 'alertTypeId', 'consumer'], - filter: null, + filter: undefined, sortField: undefined, type: RULE_SAVED_OBJECT_TYPE, }); expect(ensureRuleTypeIsAuthorized).toHaveBeenCalledWith('myType', 'myApp', 'rule'); }); + + test('calls getFindAuthorizationFilter correctly', async () => { + authorization.getFindAuthorizationFilter.mockResolvedValue({ + ensureRuleTypeIsAuthorized() {}, + }); + + const rulesClient = new RulesClient(rulesClientParams); + await rulesClient.find({ options: { ruleTypeIds: ['foo'], consumers: ['bar'] } }); + + expect(authorization.getFindAuthorizationFilter).toHaveBeenCalledWith({ + authorizationEntity: 'rule', + filterOpts: { + fieldNames: { + consumer: 'alert.attributes.consumer', + ruleTypeId: 'alert.attributes.alertTypeId', + }, + type: 'kql', + }, + }); + }); + + test('combines the filters with the auth filter correctly', async () => { + const filter = fromKueryExpression( + 'alert.attributes.alertTypeId:myType and alert.attributes.consumer:myApp' + ); + + authorization.getFindAuthorizationFilter.mockResolvedValue({ + filter, + ensureRuleTypeIsAuthorized() {}, + }); + + const rulesClient = new RulesClient(rulesClientParams); + await rulesClient.find({ + options: { + ruleTypeIds: ['foo'], + consumers: ['bar'], + filter: `alert.attributes.tags: ['bar']`, + }, + }); + + const finalFilter = unsecuredSavedObjectsClient.find.mock.calls[0][0].filter; + + expect(toKqlExpression(finalFilter)).toMatchInlineSnapshot( + `"((alert.attributes.tags: ['bar'] AND alert.attributes.alertTypeId: foo AND alert.attributes.consumer: bar) AND (alert.attributes.alertTypeId: myType AND alert.attributes.consumer: myApp))"` + ); + }); }); describe('auditLogger', () => { diff --git a/x-pack/plugins/alerting/server/application/rule/methods/find/find_rules.ts b/x-pack/plugins/alerting/server/application/rule/methods/find/find_rules.ts index 7e4efb2665f6b..26441a4474473 100644 --- a/x-pack/plugins/alerting/server/application/rule/methods/find/find_rules.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/find/find_rules.ts @@ -6,11 +6,17 @@ */ import Boom from '@hapi/boom'; -import { isEmpty, pick } from 'lodash'; -import { KueryNode, nodeBuilder } from '@kbn/es-query'; +import { pick } from 'lodash'; +import { KueryNode } from '@kbn/es-query'; import { AlertConsumers } from '@kbn/rule-data-utils'; +import { + buildConsumersFilter, + buildRuleTypeIdsFilter, + combineFilterWithAuthorizationFilter, + combineFilters, +} from '../../../../rules_client/common/filters'; +import { AlertingAuthorizationEntity } from '../../../../authorization/types'; import { SanitizedRule, Rule as DeprecatedRule, RawRule } from '../../../../types'; -import { AlertingAuthorizationEntity } from '../../../../authorization'; import { ruleAuditEvent, RuleAuditAction } from '../../../../rules_client/common/audit_events'; import { mapSortField, @@ -46,7 +52,7 @@ export async function findRules( ): Promise> { const { options, excludeFromPublicApi = false, includeSnoozeData = false } = params || {}; - const { fields, filterConsumers, ...restOptions } = options || {}; + const { fields, ruleTypeIds, consumers, ...restOptions } = options || {}; try { if (params) { @@ -58,11 +64,10 @@ export async function findRules( let authorizationTuple; try { - authorizationTuple = await context.authorization.getFindAuthorizationFilter( - AlertingAuthorizationEntity.Rule, - alertingAuthorizationFilterOpts, - isEmpty(filterConsumers) ? undefined : new Set(filterConsumers) - ); + authorizationTuple = await context.authorization.getFindAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Rule, + filterOpts: alertingAuthorizationFilterOpts, + }); } catch (error) { context.auditLogger?.log( ruleAuditEvent({ @@ -76,6 +81,7 @@ export async function findRules( const { filter: authorizationFilter, ensureRuleTypeIsAuthorized } = authorizationTuple; const filterKueryNode = buildKueryNodeFilter(restOptions.filter as string | KueryNode); let sortField = mapSortField(restOptions.sortField); + if (excludeFromPublicApi) { try { validateOperationOnAttributes( @@ -111,6 +117,18 @@ export async function findRules( modifyFilterKueryNode({ astFilter: filterKueryNode }); } + const ruleTypeIdsFilter = buildRuleTypeIdsFilter(ruleTypeIds); + const consumersFilter = buildConsumersFilter(consumers); + const combinedFilters = combineFilters( + [filterKueryNode, ruleTypeIdsFilter, consumersFilter], + 'and' + ); + + const finalFilter = combineFilterWithAuthorizationFilter( + combinedFilters, + authorizationFilter as KueryNode + ); + const { page, per_page: perPage, @@ -121,10 +139,7 @@ export async function findRules( savedObjectsFindOptions: { ...modifiedOptions, sortField, - filter: - (authorizationFilter && filterKueryNode - ? nodeBuilder.and([filterKueryNode, authorizationFilter as KueryNode]) - : authorizationFilter) ?? filterKueryNode, + filter: finalFilter, fields: fields ? includeFieldsRequiredForAuthentication(fields) : fields, }, }); diff --git a/x-pack/plugins/alerting/server/application/rule/methods/find/schemas/find_rules_schemas.ts b/x-pack/plugins/alerting/server/application/rule/methods/find/schemas/find_rules_schemas.ts index b766ffc283bb2..aec95d7f2c061 100644 --- a/x-pack/plugins/alerting/server/application/rule/methods/find/schemas/find_rules_schemas.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/find/schemas/find_rules_schemas.ts @@ -28,7 +28,8 @@ export const findRulesOptionsSchema = schema.object( filter: schema.maybe( schema.oneOf([schema.string(), schema.recordOf(schema.string(), schema.any())]) ), - filterConsumers: schema.maybe(schema.arrayOf(schema.string())), + ruleTypeIds: schema.maybe(schema.arrayOf(schema.string())), + consumers: schema.maybe(schema.arrayOf(schema.string())), }, { unknowns: 'allow' } ); @@ -37,5 +38,4 @@ export const findRulesParamsSchema = schema.object({ options: schema.maybe(findRulesOptionsSchema), excludeFromPublicApi: schema.maybe(schema.boolean()), includeSnoozeData: schema.maybe(schema.boolean()), - featureIds: schema.maybe(schema.arrayOf(schema.string())), }); diff --git a/x-pack/plugins/alerting/server/application/rule/methods/find/types/find_rules_types.ts b/x-pack/plugins/alerting/server/application/rule/methods/find/types/find_rules_types.ts index 615a5b5db8672..77694f150c5a9 100644 --- a/x-pack/plugins/alerting/server/application/rule/methods/find/types/find_rules_types.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/find/types/find_rules_types.ts @@ -9,5 +9,4 @@ import { TypeOf } from '@kbn/config-schema'; import { findRulesOptionsSchema, findRulesParamsSchema } from '../schemas'; export type FindRulesOptions = TypeOf; - export type FindRulesParams = TypeOf; diff --git a/x-pack/plugins/alerting/server/application/rule/methods/rule_types/rule_types.test.ts b/x-pack/plugins/alerting/server/application/rule/methods/rule_types/rule_types.test.ts new file mode 100644 index 0000000000000..fd0a641df022c --- /dev/null +++ b/x-pack/plugins/alerting/server/application/rule/methods/rule_types/rule_types.test.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 { rulesClientContextMock } from '../../../../rules_client/rules_client.mock'; +import { RulesClient } from '../../../../rules_client'; + +describe('listRuleTypes', () => { + const rulesClientContext = rulesClientContextMock.create(); + let rulesClient: RulesClient; + + beforeEach(async () => { + jest.clearAllMocks(); + rulesClient = new RulesClient(rulesClientContext); + + rulesClientContext.ruleTypeRegistry.list = jest.fn().mockReturnValue( + new Map([ + ['apm.anomaly', { name: 'Anomaly' }], + ['.es-query', { name: 'ES rule type' }], + ]) + ); + rulesClientContext.ruleTypeRegistry.has = jest + .fn() + .mockImplementation((ruleTypeId: string) => ruleTypeId === '.es-query'); + + rulesClientContext.authorization.getAuthorizedRuleTypes = jest.fn().mockResolvedValue( + new Map([ + ['.es-query', { authorizedConsumers: { all: true, read: true } }], + ['.not-exist', { authorizedConsumers: { all: true, read: true } }], + ]) + ); + }); + + it('authorizes correctly', async () => { + await rulesClient.listRuleTypes(); + + expect(rulesClientContext.authorization.getAuthorizedRuleTypes).toHaveBeenCalledWith({ + authorizationEntity: 'rule', + operations: ['get', 'create'], + ruleTypeIds: ['apm.anomaly', '.es-query'], + }); + }); + + it('returns the authorized rule types correctly and does not return non authorized or non existing rule types', async () => { + const res = await rulesClient.listRuleTypes(); + + expect(res).toEqual([{ name: 'ES rule type', authorizedConsumers: { all: true, read: true } }]); + }); +}); diff --git a/x-pack/plugins/alerting/server/application/rule/methods/rule_types/rule_types.ts b/x-pack/plugins/alerting/server/application/rule/methods/rule_types/rule_types.ts index 66256b4b7d7eb..4bcb6fdece3e2 100644 --- a/x-pack/plugins/alerting/server/application/rule/methods/rule_types/rule_types.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/rule_types/rule_types.ts @@ -6,16 +6,28 @@ */ import { - WriteOperations, - ReadOperations, AlertingAuthorizationEntity, + ReadOperations, + RegistryAlertTypeWithAuth, + WriteOperations, } from '../../../../authorization'; import { RulesClientContext } from '../../../../rules_client/types'; -export async function listRuleTypes(context: RulesClientContext) { - return await context.authorization.filterByRuleTypeAuthorization( - context.ruleTypeRegistry.list(), - [ReadOperations.Get, WriteOperations.Create], - AlertingAuthorizationEntity.Rule - ); +export async function listRuleTypes( + context: RulesClientContext +): Promise { + const registeredRuleTypes = context.ruleTypeRegistry.list(); + + const authorizedRuleTypes = await context.authorization.getAuthorizedRuleTypes({ + authorizationEntity: AlertingAuthorizationEntity.Rule, + operations: [ReadOperations.Get, WriteOperations.Create], + ruleTypeIds: Array.from(registeredRuleTypes.keys()).map((id) => id), + }); + + return Array.from(authorizedRuleTypes.entries()) + .filter(([id, _]) => context.ruleTypeRegistry.has(id)) + .map(([id, { authorizedConsumers }]) => ({ + ...registeredRuleTypes.get(id)!, + authorizedConsumers, + })); } diff --git a/x-pack/plugins/alerting/server/application/rule/methods/tags/get_rule_tags.test.ts b/x-pack/plugins/alerting/server/application/rule/methods/tags/get_rule_tags.test.ts index de356c3a2e2b9..2a84becfd83d6 100644 --- a/x-pack/plugins/alerting/server/application/rule/methods/tags/get_rule_tags.test.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/tags/get_rule_tags.test.ts @@ -66,23 +66,26 @@ const rulesClientParams: jest.Mocked = { isSystemAction: jest.fn(), }; -const listedTypes = new Set([ - { - actionGroups: [], - actionVariables: undefined, - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: 'myType', - name: 'myType', - category: 'test', - producer: 'myApp', - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], - }, +const listedTypes = new Map([ + [ + 'myType', + { + actionGroups: [], + actionVariables: undefined, + defaultActionGroupId: 'default', + minimumLicenseRequired: 'basic', + isExportable: true, + recoveryActionGroup: RecoveredActionGroup, + id: 'myType', + name: 'myType', + category: 'test', + producer: 'myApp', + enabledInLicense: true, + hasAlertsMappings: false, + hasFieldsForAAD: false, + validLegacyConsumers: [], + }, + ], ]); beforeEach(() => { @@ -118,26 +121,16 @@ describe('getTags()', () => { unsecuredSavedObjectsClient.find.mockResolvedValue(getMockAggregationResult(['a', 'b', 'c'])); ruleTypeRegistry.list.mockReturnValue(listedTypes); - authorization.filterByRuleTypeAuthorization.mockResolvedValue( - new Set([ - { - id: 'myType', - name: 'Test', - actionGroups: [{ id: 'default', name: 'Default' }], - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - category: 'test', - producer: 'alerts', - authorizedConsumers: { - myApp: { read: true, all: true }, + authorization.getAuthorizedRuleTypes.mockResolvedValue( + new Map([ + [ + 'myType', + { + authorizedConsumers: { + myApp: { read: true, all: true }, + }, }, - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], - }, + ], ]) ); }); diff --git a/x-pack/plugins/alerting/server/application/rule/methods/tags/get_rule_tags.ts b/x-pack/plugins/alerting/server/application/rule/methods/tags/get_rule_tags.ts index c26fae42ce324..84a05ac67057a 100644 --- a/x-pack/plugins/alerting/server/application/rule/methods/tags/get_rule_tags.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/tags/get_rule_tags.ts @@ -33,10 +33,10 @@ export async function getRuleTags( let authorizationTuple; try { - authorizationTuple = await context.authorization.getFindAuthorizationFilter( - AlertingAuthorizationEntity.Rule, - alertingAuthorizationFilterOpts - ); + authorizationTuple = await context.authorization.getFindAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Rule, + filterOpts: alertingAuthorizationFilterOpts, + }); } catch (error) { context.auditLogger?.log( ruleAuditEvent({ diff --git a/x-pack/plugins/alerting/server/authorization/alerting_authorization.mock.ts b/x-pack/plugins/alerting/server/authorization/alerting_authorization.mock.ts index e51a5c9b12c79..12e360c7cd644 100644 --- a/x-pack/plugins/alerting/server/authorization/alerting_authorization.mock.ts +++ b/x-pack/plugins/alerting/server/authorization/alerting_authorization.mock.ts @@ -14,12 +14,20 @@ export type AlertingAuthorizationMock = jest.Mocked; const createAlertingAuthorizationMock = () => { const mocked: AlertingAuthorizationMock = { ensureAuthorized: jest.fn(), - filterByRuleTypeAuthorization: jest.fn(), - getAuthorizationFilter: jest.fn(), - getAuthorizedRuleTypes: jest.fn(), - getFindAuthorizationFilter: jest.fn(), - getAugmentedRuleTypesWithAuthorization: jest.fn(), + getAuthorizedRuleTypes: jest.fn().mockResolvedValue(new Map()), + getFindAuthorizationFilter: jest.fn().mockResolvedValue({ + filter: undefined, + ensureRuleTypeIsAuthorized: () => {}, + }), getSpaceId: jest.fn(), + getAllAuthorizedRuleTypes: jest + .fn() + .mockResolvedValue({ hasAllRequested: true, authorizedRuleTypes: new Map() }), + getAllAuthorizedRuleTypesFindOperation: jest.fn().mockResolvedValue(new Map()), + getAuthorizationFilter: jest.fn().mockResolvedValue({ + filter: undefined, + ensureRuleTypeIsAuthorized: () => {}, + }), }; return mocked; }; diff --git a/x-pack/plugins/alerting/server/authorization/alerting_authorization.test.ts b/x-pack/plugins/alerting/server/authorization/alerting_authorization.test.ts index f1cfb99a6daaa..9c470823362d8 100644 --- a/x-pack/plugins/alerting/server/authorization/alerting_authorization.test.ts +++ b/x-pack/plugins/alerting/server/authorization/alerting_authorization.test.ts @@ -5,75 +5,53 @@ * 2.0. */ -import { KueryNode, fromKueryExpression, toKqlExpression } from '@kbn/es-query'; +import Boom from '@hapi/boom'; +import { KueryNode, toKqlExpression } from '@kbn/es-query'; import { KibanaRequest } from '@kbn/core/server'; import { ruleTypeRegistryMock } from '../rule_type_registry.mock'; import { securityMock } from '@kbn/security-plugin/server/mocks'; -import { - FeaturesPluginStart as FeaturesStartContract, - KibanaFeature, -} from '@kbn/features-plugin/server'; +import { KibanaFeature } from '@kbn/features-plugin/server'; import { featuresPluginMock } from '@kbn/features-plugin/server/mocks'; -import { - AlertingAuthorization, - WriteOperations, - ReadOperations, - AlertingAuthorizationEntity, -} from './alerting_authorization'; -import { v4 as uuidv4 } from 'uuid'; -import { RecoveredActionGroup } from '../../common'; -import { NormalizedRuleType, RegistryRuleType } from '../rule_type_registry'; +import { AlertingAuthorization } from './alerting_authorization'; import { AlertingAuthorizationFilterType } from './alerting_authorization_kuery'; -import { schema } from '@kbn/config-schema'; - -const ruleTypeRegistry = ruleTypeRegistryMock.create(); -const features: jest.Mocked = featuresPluginMock.createStart(); -const request = {} as KibanaRequest; - -const getSpace = jest.fn(); -const getSpaceId = () => 'space1'; +import { httpServerMock } from '@kbn/core-http-server-mocks'; +import { CheckPrivilegesResponse } from '@kbn/security-plugin-types-server'; +import type { FeaturesPluginStart } from '@kbn/features-plugin/server'; +import { WriteOperations, AlertingAuthorizationEntity, ReadOperations } from './types'; +import { AlertingKibanaPrivilege } from '@kbn/features-plugin/common/alerting_kibana_privilege'; const mockAuthorizationAction = ( - type: string, - app: string, - alertingType: string, + ruleType: string, + consumer: string, + entity: string, operation: string -) => `${type}/${app}/${alertingType}/${operation}`; -function mockSecurity() { - const security = securityMock.createSetup(); - const authorization = security.authz; - // typescript is having trouble inferring jest's automocking - ( - authorization.actions.alerting.get as jest.MockedFunction< - typeof authorization.actions.alerting.get - > - ).mockImplementation(mockAuthorizationAction); - authorization.mode.useRbacForRequest.mockReturnValue(true); - return { authorization }; -} +) => `${ruleType}/${consumer}/${entity}/${operation}`; -function mockFeature(appName: string, typeName?: string | string[]) { - const typeNameArray = typeName ? (Array.isArray(typeName) ? typeName : [typeName]) : undefined; +function mockFeatureWithConsumers( + appName: string, + alertingFeatures?: AlertingKibanaPrivilege, + subFeature?: boolean +) { return new KibanaFeature({ id: appName, name: appName, app: [], category: { id: 'foo', label: 'foo' }, - ...(typeNameArray + ...(alertingFeatures ? { - alerting: typeNameArray, + alerting: alertingFeatures, } : {}), privileges: { all: { - ...(typeNameArray + ...(alertingFeatures ? { alerting: { rule: { - all: typeNameArray, + all: alertingFeatures, }, alert: { - all: typeNameArray, + all: alertingFeatures, }, }, } @@ -85,14 +63,14 @@ function mockFeature(appName: string, typeName?: string | string[]) { ui: [], }, read: { - ...(typeNameArray + ...(alertingFeatures ? { alerting: { rule: { - read: typeNameArray, + read: alertingFeatures, }, alert: { - read: typeNameArray, + read: alertingFeatures, }, }, } @@ -104,2480 +82,2219 @@ function mockFeature(appName: string, typeName?: string | string[]) { ui: [], }, }, - }); -} - -function mockFeatureWithSubFeature(appName: string, typeName: string) { - return new KibanaFeature({ - id: appName, - name: appName, - app: [], - category: { id: 'foo', label: 'foo' }, - ...(typeName + ...(subFeature ? { - alerting: [typeName], + subFeatures: [ + { + name: appName, + privilegeGroups: [ + { + groupType: 'independent', + privileges: [ + { + id: 'doSomethingAlertRelated', + name: 'sub feature alert', + includeIn: 'all', + alerting: { + rule: { + all: alertingFeatures, + }, + }, + savedObject: { + all: [], + read: [], + }, + ui: ['doSomethingAlertRelated'], + }, + { + id: 'doSomethingAlertRelated', + name: 'sub feature alert', + includeIn: 'read', + alerting: { + rule: { + read: alertingFeatures, + }, + }, + savedObject: { + all: [], + read: [], + }, + ui: ['doSomethingAlertRelated'], + }, + ], + }, + ], + }, + ], } : {}), - privileges: { - all: { - savedObject: { - all: [], - read: [], - }, - ui: [], - }, - read: { - savedObject: { - all: [], - read: [], - }, - ui: [], - }, - }, - subFeatures: [ - { - name: appName, - privilegeGroups: [ - { - groupType: 'independent', - privileges: [ - { - id: 'doSomethingAlertRelated', - name: 'sub feature alert', - includeIn: 'all', - alerting: { - rule: { - all: [typeName], - }, - }, - savedObject: { - all: [], - read: [], - }, - ui: ['doSomethingAlertRelated'], - }, - { - id: 'doSomethingAlertRelated', - name: 'sub feature alert', - includeIn: 'read', - alerting: { - rule: { - read: [typeName], - }, - }, - savedObject: { - all: [], - read: [], - }, - ui: ['doSomethingAlertRelated'], - }, - ], - }, - ], - }, - ], }); } -const myAppFeature = mockFeature('myApp', 'myType'); -const myOtherAppFeature = mockFeature('myOtherApp', 'myType'); -const myAppWithSubFeature = mockFeatureWithSubFeature('myAppWithSubFeature', 'myType'); -const myFeatureWithoutAlerting = mockFeature('myOtherApp'); - -beforeEach(() => { - jest.resetAllMocks(); - ruleTypeRegistry.get.mockImplementation((id) => ({ - id, - name: 'My Alert Type', - actionGroups: [{ id: 'default', name: 'Default' }], - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - async executor() { - return { state: {} }; - }, - category: 'test', - producer: 'myApp', - validate: { - params: schema.any(), - }, - validLegacyConsumers: [], - })); - features.getKibanaFeatures.mockReturnValue([ - myAppFeature, - myOtherAppFeature, - myAppWithSubFeature, - myFeatureWithoutAlerting, - ]); - getSpace.mockResolvedValue(undefined); -}); +type CheckPrivilegesResponseWithoutES = Omit & { + privileges: Omit; +}; describe('AlertingAuthorization', () => { - describe('constructor', () => { - test(`fetches the user's current space`, async () => { - const space = { - id: uuidv4(), - name: uuidv4(), - disabledFeatures: [], - }; - getSpace.mockResolvedValue(space); + const getSpace = jest.fn(); + const getSpaceId = () => 'space1'; + const allRegisteredConsumers = new Set(); + const ruleTypesConsumersMap = new Map>(); + + const checkPrivileges = jest.fn, []>(async () => ({ + username: 'elastic', + hasAllRequested: true, + privileges: { kibana: [] }, + })); + + const ruleTypeIds = ['rule-type-id-1', 'rule-type-id-2', 'rule-type-id-3', 'rule-type-id-4']; + + let request: KibanaRequest; + let ruleTypeRegistry = ruleTypeRegistryMock.create(); + let securityStart: ReturnType; + let features: jest.Mocked; + + beforeEach(() => { + jest.clearAllMocks(); + allRegisteredConsumers.clear(); + allRegisteredConsumers.clear(); + ruleTypesConsumersMap.clear(); + + securityStart = securityMock.createStart(); + securityStart.authz.mode.useRbacForRequest.mockReturnValue(true); + securityStart.authz.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); + request = httpServerMock.createKibanaRequest(); + getSpace.mockResolvedValue(undefined); + + features = featuresPluginMock.createStart(); + features.getKibanaFeatures.mockReturnValue([ + mockFeatureWithConsumers('feature-id-1', [ + { + ruleTypeId: 'rule-type-id-1', + consumers: ['alerts', 'consumer-a'], + }, + { ruleTypeId: 'rule-type-id-2', consumers: ['alerts', 'consumer-b'] }, + ]), + mockFeatureWithConsumers('feature-id-2', [ + { + ruleTypeId: 'rule-type-id-1', + consumers: ['alerts', 'consumer-b'], + }, + { + ruleTypeId: 'rule-type-id-3', + consumers: ['alerts', 'consumer-c'], + }, + ]), + mockFeatureWithConsumers('feature-id-3', [ + { + ruleTypeId: 'rule-type-id-4', + consumers: ['consumer-d'], + }, + ]), + ]); + + const alertingGet = securityStart.authz.actions.alerting.get as jest.Mock; + alertingGet.mockImplementation(mockAuthorizationAction); + + ruleTypeRegistry = ruleTypeRegistryMock.create(); + ruleTypeRegistry.getAllTypes.mockReturnValue(ruleTypeIds); + ruleTypeRegistry.has.mockImplementation((ruleTypeId: string) => + ruleTypeIds.includes(ruleTypeId) + ); + + // @ts-expect-error: only the id is needed for the tests + ruleTypeRegistry.get.mockImplementation((ruleTypeId: string) => ({ id: ruleTypeId })); + }); + + describe('create', () => { + beforeEach(() => { + jest.clearAllMocks(); + securityStart = securityMock.createStart(); + features = featuresPluginMock.createStart(); + + getSpace.mockReturnValue({ id: 'default', name: 'Default', disabledFeatures: [] }); + features.getKibanaFeatures.mockReturnValue([mockFeatureWithConsumers('my-feature-1')]); + }); + + it('creates an AlertingAuthorization object', async () => { + expect.assertions(2); - new AlertingAuthorization({ + const authPromise = AlertingAuthorization.create({ request, ruleTypeRegistry, + getSpaceId, features, getSpace, - getSpaceId, + authorization: securityStart.authz, }); - expect(getSpace).toHaveBeenCalledWith(request); + await expect(authPromise).resolves.toBeDefined(); + await expect(authPromise).resolves.not.toThrow(); }); - }); - describe('ensureAuthorized', () => { - test('is a no-op when there is no authorization api', async () => { - const alertAuthorization = new AlertingAuthorization({ + it('creates an AlertingAuthorization object without spaces', async () => { + getSpace.mockReturnValue(undefined); + expect.assertions(2); + + const authPromise = AlertingAuthorization.create({ request, ruleTypeRegistry, + getSpaceId, features, getSpace, - getSpaceId, + authorization: securityStart.authz, }); - await alertAuthorization.ensureAuthorized({ - ruleTypeId: 'myType', - consumer: 'myApp', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, + await expect(authPromise).resolves.toBeDefined(); + await expect(authPromise).resolves.not.toThrow(); + }); + + it('filters out disabled spaces and features without alerting', async () => { + getSpace.mockReturnValue({ + id: 'default', + name: 'Default', + disabledFeatures: ['my-feature-1'], }); - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); + features.getKibanaFeatures.mockReturnValue([ + mockFeatureWithConsumers('my-feature-1', [ + { ruleTypeId: 'rule-type-1', consumers: ['consumer-a', 'consumer-b'] }, + ]), + mockFeatureWithConsumers('my-feature-2', [ + { ruleTypeId: 'rule-type-2', consumers: ['consumer-c', 'consumer-d'] }, + ]), + mockFeatureWithConsumers('my-feature-3'), + mockFeatureWithConsumers('my-feature-4', []), + ]); - test('is a no-op when the security license is disabled', async () => { - const { authorization } = mockSecurity(); - authorization.mode.useRbacForRequest.mockReturnValue(false); - const alertAuthorization = new AlertingAuthorization({ + const auth = await AlertingAuthorization.create({ request, ruleTypeRegistry, - authorization, + getSpaceId, features, getSpace, - getSpaceId, + authorization: securityStart.authz, }); - await alertAuthorization.ensureAuthorized({ - ruleTypeId: 'myType', - consumer: 'myApp', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, + // @ts-expect-error: allRegisteredConsumers is a private method of the auth class + expect(auth.allRegisteredConsumers).toMatchInlineSnapshot(` + Set { + "consumer-c", + "consumer-d", + } + `); + // @ts-expect-error: allRegisteredConsumers is a private method of the auth class + expect(auth.ruleTypesConsumersMap).toMatchInlineSnapshot(` + Map { + "rule-type-2" => Set { + "consumer-c", + "consumer-d", + }, + } + `); + }); + + it('removes duplicated consumers', async () => { + getSpace.mockReturnValue({ + id: 'default', + name: 'Default', + disabledFeatures: [], }); - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); + features.getKibanaFeatures.mockReturnValue([ + mockFeatureWithConsumers('my-feature-1', [ + { ruleTypeId: 'rule-type-1', consumers: ['consumer-a', 'consumer-b', 'consumer-a'] }, + { ruleTypeId: 'rule-type-2', consumers: ['consumer-a', 'consumer-b', 'consumer-c'] }, + ]), + mockFeatureWithConsumers('my-feature-2', [ + { ruleTypeId: 'rule-type-2', consumers: ['consumer-a', 'consumer-b', 'consumer-c'] }, + ]), + ]); - test('ensures the user has privileges to execute rules for the specified rule type and operation without consumer when producer and consumer are the same', async () => { - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); - const alertAuthorization = new AlertingAuthorization({ + const auth = await AlertingAuthorization.create({ request, - authorization, ruleTypeRegistry, + getSpaceId, features, getSpace, - getSpaceId, + authorization: securityStart.authz, }); - checkPrivileges.mockResolvedValueOnce({ - username: 'some-user', - hasAllRequested: true, - privileges: { kibana: [] }, - }); + // @ts-expect-error: allRegisteredConsumers is a private method of the auth class + expect(auth.allRegisteredConsumers).toMatchInlineSnapshot(` + Set { + "consumer-a", + "consumer-b", + "consumer-c", + } + `); + }); - await alertAuthorization.ensureAuthorized({ - ruleTypeId: 'myType', - consumer: 'myApp', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, + it('removes duplicated ruleTypes and consumers', async () => { + getSpace.mockReturnValue({ + id: 'default', + name: 'Default', + disabledFeatures: [], }); - expect(ruleTypeRegistry.get).toHaveBeenCalledWith('myType'); - - expect(authorization.actions.alerting.get).toHaveBeenCalledTimes(1); - expect(authorization.actions.alerting.get).toHaveBeenCalledWith( - 'myType', - 'myApp', - 'rule', - 'create' - ); - expect(checkPrivileges).toHaveBeenCalledWith({ - kibana: [mockAuthorizationAction('myType', 'myApp', 'rule', 'create')], - }); - }); + features.getKibanaFeatures.mockReturnValue([ + mockFeatureWithConsumers('my-feature-1', [ + { ruleTypeId: 'rule-type-1', consumers: ['consumer-a', 'consumer-b', 'consumer-a'] }, + { ruleTypeId: 'rule-type-2', consumers: ['consumer-a', 'consumer-b', 'consumer-c'] }, + ]), + mockFeatureWithConsumers('my-feature-2', [ + { ruleTypeId: 'rule-type-2', consumers: ['consumer-a', 'consumer-b', 'consumer-e'] }, + { ruleTypeId: 'rule-type-1', consumers: ['consumer-a', 'consumer-b', 'consumer-d'] }, + ]), + ]); - test('ensures the user has privileges to execute alerts for the specified rule type and operation without consumer when producer and consumer are the same', async () => { - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); - const alertAuthorization = new AlertingAuthorization({ + const auth = await AlertingAuthorization.create({ request, - authorization, ruleTypeRegistry, + getSpaceId, features, getSpace, - getSpaceId, - }); - - checkPrivileges.mockResolvedValueOnce({ - username: 'some-user', - hasAllRequested: true, - privileges: { kibana: [] }, + authorization: securityStart.authz, }); - await alertAuthorization.ensureAuthorized({ - ruleTypeId: 'myType', - consumer: 'myApp', - operation: WriteOperations.Update, - entity: AlertingAuthorizationEntity.Alert, - }); + // @ts-expect-error: ruleTypesConsumersMap is a private method of the auth class + expect(auth.ruleTypesConsumersMap).toMatchInlineSnapshot(` + Map { + "rule-type-1" => Set { + "consumer-a", + "consumer-b", + "consumer-d", + }, + "rule-type-2" => Set { + "consumer-a", + "consumer-b", + "consumer-c", + "consumer-e", + }, + } + `); + }); - expect(ruleTypeRegistry.get).toHaveBeenCalledWith('myType'); + it('throws an error when a generic error occurs', async () => { + expect.assertions(1); - expect(authorization.actions.alerting.get).toHaveBeenCalledTimes(1); - expect(authorization.actions.alerting.get).toHaveBeenCalledWith( - 'myType', - 'myApp', - 'alert', - 'update' - ); - expect(checkPrivileges).toHaveBeenCalledWith({ - kibana: [mockAuthorizationAction('myType', 'myApp', 'alert', 'update')], - }); - }); + getSpace.mockRejectedValue(new Error('Error')); - test('ensures the user has privileges to execute rules for the specified rule type and operation without consumer when consumer is alerts', async () => { - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); - const alertAuthorization = new AlertingAuthorization({ + const authPromise = AlertingAuthorization.create({ request, - authorization, ruleTypeRegistry, + getSpaceId, features, getSpace, - getSpaceId, + authorization: securityStart.authz, }); - checkPrivileges.mockResolvedValueOnce({ - username: 'some-user', - hasAllRequested: true, - privileges: { kibana: [] }, - }); + await expect(authPromise).rejects.toThrow(); + }); - await alertAuthorization.ensureAuthorized({ - ruleTypeId: 'myType', - consumer: 'alerts', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }); + it.each([403, 404])( + `construct the AlertingAuthorization with empty features if the error is boom and %s`, + async (errorStatusCode: number) => { + getSpace.mockRejectedValue( + new Boom.Boom('Server error', { + statusCode: errorStatusCode, + message: 'my error message', + }) + ); + + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + authorization: securityStart.authz, + }); + + // @ts-expect-error: allRegisteredConsumers is a private method of the auth class + expect(auth.ruleTypesConsumersMap).toMatchInlineSnapshot(`Map {}`); + // @ts-expect-error: allRegisteredConsumers is a private method of the auth class + expect(auth.allRegisteredConsumers).toMatchInlineSnapshot(`Set {}`); + } + ); - expect(ruleTypeRegistry.get).toHaveBeenCalledWith('myType'); + it('throws an error if the error is boom but not 403', async () => { + expect.assertions(1); - expect(authorization.actions.alerting.get).toHaveBeenCalledTimes(1); - expect(authorization.actions.alerting.get).toHaveBeenCalledWith( - 'myType', - 'myApp', - 'rule', - 'create' + getSpace.mockRejectedValue( + new Boom.Boom('Server error', { statusCode: 400, message: 'my error message' }) ); - expect(checkPrivileges).toHaveBeenCalledWith({ - kibana: [mockAuthorizationAction('myType', 'myApp', 'rule', 'create')], - }); - }); - test('ensures the user has privileges to execute alerts for the specified rule type and operation without consumer when consumer is alerts', async () => { - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); - const alertAuthorization = new AlertingAuthorization({ + const authPromise = AlertingAuthorization.create({ request, - authorization, ruleTypeRegistry, + getSpaceId, features, getSpace, - getSpaceId, - }); - - checkPrivileges.mockResolvedValueOnce({ - username: 'some-user', - hasAllRequested: true, - privileges: { kibana: [] }, - }); - - await alertAuthorization.ensureAuthorized({ - ruleTypeId: 'myType', - consumer: 'alerts', - operation: WriteOperations.Update, - entity: AlertingAuthorizationEntity.Alert, + authorization: securityStart.authz, }); - expect(ruleTypeRegistry.get).toHaveBeenCalledWith('myType'); - - expect(authorization.actions.alerting.get).toHaveBeenCalledTimes(1); - expect(authorization.actions.alerting.get).toHaveBeenCalledWith( - 'myType', - 'myApp', - 'alert', - 'update' - ); - expect(checkPrivileges).toHaveBeenCalledWith({ - kibana: [mockAuthorizationAction('myType', 'myApp', 'alert', 'update')], - }); + await expect(authPromise).rejects.toThrow(); }); + }); - test('ensures the user has privileges to execute rules for the specified rule type, operation and producer when producer is different from consumer', async () => { - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); - checkPrivileges.mockResolvedValueOnce({ - username: 'some-user', - hasAllRequested: true, - privileges: { kibana: [] }, - }); + describe('ensureAuthorized', () => { + beforeEach(() => { + jest.clearAllMocks(); + allRegisteredConsumers.clear(); + allRegisteredConsumers.add('myApp'); + }); + it('is a no-op when there is no authorization api', async () => { const alertAuthorization = new AlertingAuthorization({ request, - authorization, ruleTypeRegistry, - features, - getSpace, getSpaceId, + allRegisteredConsumers, + ruleTypesConsumersMap, }); await alertAuthorization.ensureAuthorized({ ruleTypeId: 'myType', - consumer: 'myOtherApp', + consumer: 'myApp', operation: WriteOperations.Create, entity: AlertingAuthorizationEntity.Rule, }); - expect(ruleTypeRegistry.get).toHaveBeenCalledWith('myType'); - - expect(authorization.actions.alerting.get).toHaveBeenCalledTimes(1); - expect(authorization.actions.alerting.get).toHaveBeenCalledWith( - 'myType', - 'myOtherApp', - 'rule', - 'create' - ); - expect(checkPrivileges).toHaveBeenCalledWith({ - kibana: [mockAuthorizationAction('myType', 'myOtherApp', 'rule', 'create')], - }); + expect(checkPrivileges).not.toHaveBeenCalled(); }); - test('ensures the user has privileges to execute alerts for the specified rule type, operation and producer when producer is different from consumer', async () => { - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); - checkPrivileges.mockResolvedValueOnce({ - username: 'some-user', - hasAllRequested: true, - privileges: { kibana: [] }, - }); + it('is a no-op when the security license is disabled', async () => { + securityStart.authz.mode.useRbacForRequest.mockReturnValue(false); const alertAuthorization = new AlertingAuthorization({ request, - authorization, ruleTypeRegistry, - features, - getSpace, + authorization: securityStart.authz, getSpaceId, + allRegisteredConsumers, + ruleTypesConsumersMap, }); await alertAuthorization.ensureAuthorized({ ruleTypeId: 'myType', - consumer: 'myOtherApp', - operation: WriteOperations.Update, - entity: AlertingAuthorizationEntity.Alert, + consumer: 'myApp', + operation: WriteOperations.Create, + entity: AlertingAuthorizationEntity.Rule, }); - expect(ruleTypeRegistry.get).toHaveBeenCalledWith('myType'); - - expect(authorization.actions.alerting.get).toHaveBeenCalledTimes(1); - expect(authorization.actions.alerting.get).toHaveBeenCalledWith( - 'myType', - 'myOtherApp', - 'alert', - 'update' - ); - expect(checkPrivileges).toHaveBeenCalledWith({ - kibana: [mockAuthorizationAction('myType', 'myOtherApp', 'alert', 'update')], - }); + expect(checkPrivileges).not.toHaveBeenCalled(); }); - test('ensures the producer is used for authorization if the consumer is `alerts`', async () => { - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); - checkPrivileges.mockResolvedValueOnce({ - username: 'some-user', - hasAllRequested: true, - privileges: { kibana: [] }, - }); - + it('authorized correctly', async () => { const alertAuthorization = new AlertingAuthorization({ request, - authorization, ruleTypeRegistry, - features, - getSpace, + authorization: securityStart.authz, getSpaceId, + allRegisteredConsumers, + ruleTypesConsumersMap, }); await alertAuthorization.ensureAuthorized({ ruleTypeId: 'myType', - consumer: 'alerts', + consumer: 'myApp', operation: WriteOperations.Create, entity: AlertingAuthorizationEntity.Rule, }); - expect(ruleTypeRegistry.get).toHaveBeenCalledWith('myType'); + expect(checkPrivileges).toBeCalledTimes(1); + expect(checkPrivileges.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + Object { + "kibana": Array [ + "myType/myApp/rule/create", + ], + }, + ] + `); + }); - expect(authorization.actions.alerting.get).toHaveBeenCalledTimes(1); - expect(authorization.actions.alerting.get).toHaveBeenCalledWith( - 'myType', - 'myApp', - 'rule', - 'create' + it('throws if user lacks the required rule privileges for the consumer', async () => { + securityStart.authz.checkPrivilegesDynamicallyWithRequest.mockReturnValue( + jest.fn(async () => ({ hasAllRequested: false })) ); - expect(checkPrivileges).toHaveBeenCalledWith({ - kibana: [mockAuthorizationAction('myType', 'myApp', 'rule', 'create')], - }); - }); - test('throws if user lacks the required rule privileges for the consumer', async () => { - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); const alertAuthorization = new AlertingAuthorization({ request, - authorization, ruleTypeRegistry, - features, - getSpace, + authorization: securityStart.authz, getSpaceId, - }); - - checkPrivileges.mockResolvedValueOnce({ - username: 'some-user', - hasAllRequested: false, - privileges: { - kibana: [ - { - privilege: mockAuthorizationAction('myType', 'myOtherApp', 'rule', 'create'), - authorized: false, - }, - { - privilege: mockAuthorizationAction('myType', 'myApp', 'rule', 'create'), - authorized: true, - }, - ], - }, + allRegisteredConsumers, + ruleTypesConsumersMap, }); await expect( alertAuthorization.ensureAuthorized({ ruleTypeId: 'myType', - consumer: 'myOtherApp', + consumer: 'myApp', operation: WriteOperations.Create, entity: AlertingAuthorizationEntity.Rule, }) ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Unauthorized by \\"myOtherApp\\" to create \\"myType\\" rule"` + `"Unauthorized by \\"myApp\\" to create \\"myType\\" rule"` ); }); - test('throws if user lacks the required alert privileges for the consumer', async () => { - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); + it('throws if user lacks the required alert privileges for the consumer', async () => { + securityStart.authz.checkPrivilegesDynamicallyWithRequest.mockReturnValue( + jest.fn(async () => ({ hasAllRequested: false })) + ); + const alertAuthorization = new AlertingAuthorization({ request, - authorization, ruleTypeRegistry, - features, - getSpace, + authorization: securityStart.authz, getSpaceId, - }); - - checkPrivileges.mockResolvedValueOnce({ - username: 'some-user', - hasAllRequested: false, - privileges: { - kibana: [ - { - privilege: mockAuthorizationAction('myType', 'myOtherApp', 'alert', 'update'), - authorized: false, - }, - { - privilege: mockAuthorizationAction('myType', 'myApp', 'alert', 'update'), - authorized: true, - }, - { - privilege: mockAuthorizationAction('myType', 'myAppRulesOnly', 'alert', 'update'), - authorized: false, - }, - ], - }, + allRegisteredConsumers, + ruleTypesConsumersMap, }); await expect( alertAuthorization.ensureAuthorized({ ruleTypeId: 'myType', - consumer: 'myAppRulesOnly', + consumer: 'myApp', operation: WriteOperations.Update, entity: AlertingAuthorizationEntity.Alert, }) ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Unauthorized by \\"myAppRulesOnly\\" to update \\"myType\\" alert"` + `"Unauthorized by \\"myApp\\" to update \\"myType\\" alert"` ); }); - test('throws if user lacks the required privileges for the producer', async () => { - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); + it('throws if the user has access but the consumer is not registered', async () => { const alertAuthorization = new AlertingAuthorization({ request, - authorization, ruleTypeRegistry, - features, - getSpace, + authorization: securityStart.authz, getSpaceId, - }); - - checkPrivileges.mockResolvedValueOnce({ - username: 'some-user', - hasAllRequested: false, - privileges: { - kibana: [ - { - privilege: mockAuthorizationAction('myType', 'myOtherApp', 'alert', 'update'), - authorized: true, - }, - { - privilege: mockAuthorizationAction('myType', 'myApp', 'alert', 'update'), - authorized: false, - }, - ], - }, + allRegisteredConsumers, + ruleTypesConsumersMap, }); await expect( alertAuthorization.ensureAuthorized({ ruleTypeId: 'myType', - consumer: 'myOtherApp', - operation: WriteOperations.Update, - entity: AlertingAuthorizationEntity.Alert, + consumer: 'not-exist', + operation: WriteOperations.Create, + entity: AlertingAuthorizationEntity.Rule, }) ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Unauthorized by \\"myOtherApp\\" to update \\"myType\\" alert"` + `"Unauthorized by \\"not-exist\\" to create \\"myType\\" rule"` ); }); - test('throws if user lacks the required privileges for both consumer and producer', async () => { - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); + it('throws when there is no authorization api but the consumer is not registered', async () => { const alertAuthorization = new AlertingAuthorization({ request, - authorization, ruleTypeRegistry, - features, - getSpace, getSpaceId, - }); - - checkPrivileges.mockResolvedValueOnce({ - username: 'some-user', - hasAllRequested: false, - privileges: { - kibana: [ - { - privilege: mockAuthorizationAction('myType', 'myOtherApp', 'alert', 'create'), - authorized: false, - }, - { - privilege: mockAuthorizationAction('myType', 'myApp', 'alert', 'create'), - authorized: false, - }, - ], - }, + allRegisteredConsumers, + ruleTypesConsumersMap, }); await expect( alertAuthorization.ensureAuthorized({ ruleTypeId: 'myType', - consumer: 'myOtherApp', + consumer: 'not-exist', operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Alert, + entity: AlertingAuthorizationEntity.Rule, }) ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Unauthorized by \\"myOtherApp\\" to create \\"myType\\" alert"` + `"Unauthorized by \\"not-exist\\" to create \\"myType\\" rule"` ); }); - test('checks additional privileges correctly', async () => { - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); + it('throws when the security license is disabled but the consumer is not registered', async () => { + securityStart.authz.mode.useRbacForRequest.mockReturnValue(false); + const alertAuthorization = new AlertingAuthorization({ request, - authorization, ruleTypeRegistry, - features, - getSpace, getSpaceId, + allRegisteredConsumers, + ruleTypesConsumersMap, }); - checkPrivileges.mockResolvedValueOnce({ - username: 'some-user', - hasAllRequested: true, - privileges: { kibana: [] }, - }); - - await alertAuthorization.ensureAuthorized({ - ruleTypeId: 'myType', - consumer: 'myApp', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - additionalPrivileges: ['test/create'], - }); + await expect( + alertAuthorization.ensureAuthorized({ + ruleTypeId: 'myType', + consumer: 'not-exist', + operation: WriteOperations.Create, + entity: AlertingAuthorizationEntity.Rule, + }) + ).rejects.toThrowErrorMatchingInlineSnapshot( + `"Unauthorized by \\"not-exist\\" to create \\"myType\\" rule"` + ); + }); - expect(ruleTypeRegistry.get).toHaveBeenCalledWith('myType'); + it('throws an error when the consumer does not exist because it was from a disabled plugin', async () => { + features.getKibanaFeatures.mockReturnValue([ + mockFeatureWithConsumers('my-feature-1', [ + { ruleTypeId: 'rule-type-1', consumers: ['disabled-feature-consumer'] }, + ]), + mockFeatureWithConsumers('my-feature-2', [ + { ruleTypeId: 'rule-type-2', consumers: ['enabled-feature-consumer'] }, + ]), + ]); - expect(authorization.actions.alerting.get).toHaveBeenCalledTimes(1); - expect(authorization.actions.alerting.get).toHaveBeenCalledWith( - 'myType', - 'myApp', - 'rule', - 'create' - ); - expect(checkPrivileges).toHaveBeenCalledWith({ - kibana: [mockAuthorizationAction('myType', 'myApp', 'rule', 'create'), 'test/create'], + getSpace.mockReturnValue({ + id: 'default', + name: 'Default', + disabledFeatures: ['my-feature-1'], }); - }); - }); - describe('getFindAuthorizationFilter', () => { - const myOtherAppAlertType: RegistryRuleType = { - actionGroups: [], - actionVariables: undefined, - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: 'myOtherAppAlertType', - name: 'myOtherAppAlertType', - category: 'test', - producer: 'alerts', - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], - }; - const myAppAlertType: RegistryRuleType = { - actionGroups: [], - actionVariables: undefined, - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: 'myAppAlertType', - name: 'myAppAlertType', - category: 'test', - producer: 'myApp', - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], - }; - const mySecondAppAlertType: RegistryRuleType = { - actionGroups: [], - actionVariables: undefined, - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: 'mySecondAppAlertType', - name: 'mySecondAppAlertType', - category: 'test', - producer: 'myApp', - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], - }; - const setOfAlertTypes = new Set([myAppAlertType, myOtherAppAlertType, mySecondAppAlertType]); - test('omits filter when there is no authorization api', async () => { - const alertAuthorization = new AlertingAuthorization({ + const auth = await AlertingAuthorization.create({ request, ruleTypeRegistry, - features, - getSpace, getSpaceId, - }); - const { filter, ensureRuleTypeIsAuthorized } = - await alertAuthorization.getFindAuthorizationFilter(AlertingAuthorizationEntity.Rule, { - type: AlertingAuthorizationFilterType.KQL, - fieldNames: { - ruleTypeId: 'ruleId', - consumer: 'consumer', - }, - }); - expect(() => ensureRuleTypeIsAuthorized('someMadeUpType', 'myApp', 'rule')).not.toThrow(); - expect(filter).toEqual(undefined); - }); - test('ensureRuleTypeIsAuthorized is no-op when there is no authorization api', async () => { - const alertAuthorization = new AlertingAuthorization({ - request, - ruleTypeRegistry, features, getSpace, - getSpaceId, + authorization: securityStart.authz, }); - const { ensureRuleTypeIsAuthorized } = await alertAuthorization.getFindAuthorizationFilter( - AlertingAuthorizationEntity.Rule, - { - type: AlertingAuthorizationFilterType.KQL, - fieldNames: { - ruleTypeId: 'ruleId', - consumer: 'consumer', - }, - } + + await expect( + auth.ensureAuthorized({ + ruleTypeId: 'rule-type-1', + consumer: 'disabled-feature-consumer', + operation: WriteOperations.Create, + entity: AlertingAuthorizationEntity.Rule, + }) + ).rejects.toThrowErrorMatchingInlineSnapshot( + `"Unauthorized by \\"disabled-feature-consumer\\" to create \\"rule-type-1\\" rule"` ); - ensureRuleTypeIsAuthorized('someMadeUpType', 'myApp', 'rule'); }); - test('creates a filter based on the privileged types', async () => { - features.getKibanaFeatures.mockReturnValue([ - mockFeature('myApp', ['myAppAlertType', 'mySecondAppAlertType']), - mockFeature('alerts', 'myOtherAppAlertType'), - myOtherAppFeature, - myAppWithSubFeature, - ]); - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); - checkPrivileges.mockResolvedValueOnce({ - username: 'some-user', - hasAllRequested: true, - privileges: { kibana: [] }, - }); + + it('checks additional privileges correctly', async () => { const alertAuthorization = new AlertingAuthorization({ request, - authorization, ruleTypeRegistry, - features, - getSpace, + authorization: securityStart.authz, getSpaceId, + allRegisteredConsumers, + ruleTypesConsumersMap, }); - ruleTypeRegistry.list.mockReturnValue(setOfAlertTypes); - const filter = ( - await alertAuthorization.getFindAuthorizationFilter(AlertingAuthorizationEntity.Rule, { - type: AlertingAuthorizationFilterType.KQL, - fieldNames: { - ruleTypeId: 'path.to.rule_type_id', - consumer: 'consumer-field', - }, - }) - ).filter; + await alertAuthorization.ensureAuthorized({ + ruleTypeId: 'myType', + consumer: 'myApp', + operation: WriteOperations.Create, + entity: AlertingAuthorizationEntity.Rule, + additionalPrivileges: ['test/create'], + }); - expect(toKqlExpression(filter as KueryNode)).toMatchInlineSnapshot( - `"((path.to.rule_type_id: myAppAlertType AND (consumer-field: alerts OR consumer-field: discover OR consumer-field: myApp OR consumer-field: myOtherApp OR consumer-field: myAppWithSubFeature)) OR (path.to.rule_type_id: mySecondAppAlertType AND (consumer-field: alerts OR consumer-field: discover OR consumer-field: myApp OR consumer-field: myOtherApp OR consumer-field: myAppWithSubFeature)) OR (path.to.rule_type_id: myOtherAppAlertType AND (consumer-field: alerts OR consumer-field: discover OR consumer-field: myApp OR consumer-field: myOtherApp OR consumer-field: myAppWithSubFeature)))"` - ); + expect(checkPrivileges).toBeCalledTimes(1); + expect(checkPrivileges.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + Object { + "kibana": Array [ + "myType/myApp/rule/create", + "test/create", + ], + }, + ] + `); }); - test('throws if user has no privileges to any rule type', async () => { - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); - checkPrivileges.mockResolvedValueOnce({ - username: 'some-user', - hasAllRequested: false, - privileges: { - kibana: [ - { - privilege: mockAuthorizationAction('myType', 'myOtherApp', 'rule', 'create'), - authorized: false, - }, - { - privilege: mockAuthorizationAction('myType', 'myApp', 'rule', 'create'), - authorized: false, - }, - ], - }, - }); - const alertAuthorization = new AlertingAuthorization({ + }); + + describe('getFindAuthorizationFilter', () => { + it('creates a filter based on the privileged types', async () => { + const auth = await AlertingAuthorization.create({ request, - authorization, ruleTypeRegistry, + getSpaceId, features, getSpace, - getSpaceId, + authorization: securityStart.authz, }); - ruleTypeRegistry.list.mockReturnValue(setOfAlertTypes); - await expect( - alertAuthorization.getFindAuthorizationFilter(AlertingAuthorizationEntity.Rule, { - type: AlertingAuthorizationFilterType.KQL, - fieldNames: { - ruleTypeId: 'path.to.rule_type_id', - consumer: 'consumer-field', - }, - }) - ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Unauthorized to find rules for any rule types"` - ); - }); - test('creates an `ensureRuleTypeIsAuthorized` function which throws if type is unauthorized', async () => { - features.getKibanaFeatures.mockReturnValue([ - mockFeature('myApp', ['myOtherAppAlertType', 'myAppAlertType']), - mockFeature('myOtherApp', ['myOtherAppAlertType', 'myAppAlertType']), - ]); - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); + checkPrivileges.mockResolvedValueOnce({ username: 'some-user', - hasAllRequested: false, + hasAllRequested: true, privileges: { kibana: [ { - privilege: mockAuthorizationAction('myOtherAppAlertType', 'myApp', 'alert', 'find'), + privilege: mockAuthorizationAction('rule-type-id-1', 'alerts', 'rule', 'find'), authorized: true, }, { - privilege: mockAuthorizationAction( - 'myOtherAppAlertType', - 'myOtherApp', - 'alert', - 'find' - ), - authorized: false, + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-a', 'rule', 'find'), + authorized: true, }, { - privilege: mockAuthorizationAction('myAppAlertType', 'myApp', 'alert', 'find'), + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-b', 'rule', 'find'), authorized: true, }, { - privilege: mockAuthorizationAction('myAppAlertType', 'myOtherApp', 'alert', 'find'), - authorized: false, + privilege: mockAuthorizationAction('rule-type-id-2', 'alerts', 'rule', 'find'), + authorized: true, }, - ], - }, - }); - const alertAuthorization = new AlertingAuthorization({ - request, - authorization, - ruleTypeRegistry, - features, - getSpace, - getSpaceId, - }); - ruleTypeRegistry.list.mockReturnValue(setOfAlertTypes); - const { ensureRuleTypeIsAuthorized } = await alertAuthorization.getFindAuthorizationFilter( - AlertingAuthorizationEntity.Alert, - { - type: AlertingAuthorizationFilterType.KQL, - fieldNames: { - ruleTypeId: 'ruleId', - consumer: 'consumer', - }, - } - ); - expect(() => { - ensureRuleTypeIsAuthorized('myAppAlertType', 'myOtherApp', 'alert'); - }).toThrowErrorMatchingInlineSnapshot( - `"Unauthorized by \\"myOtherApp\\" to find \\"myAppAlertType\\" alert"` - ); - }); - test('creates an `ensureRuleTypeIsAuthorized` function which is no-op if type is authorized', async () => { - features.getKibanaFeatures.mockReturnValue([ - mockFeature('myApp', ['myOtherAppAlertType', 'myAppAlertType']), - mockFeature('myOtherApp', 'myAppAlertType'), - ]); - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); - checkPrivileges.mockResolvedValueOnce({ - username: 'some-user', - hasAllRequested: false, - privileges: { - kibana: [ { - privilege: mockAuthorizationAction('myOtherAppAlertType', 'myApp', 'rule', 'find'), + privilege: mockAuthorizationAction('rule-type-id-2', 'consumer-b', 'rule', 'find'), authorized: true, }, { - privilege: mockAuthorizationAction( - 'myOtherAppAlertType', - 'myOtherApp', - 'rule', - 'find' - ), - authorized: false, + privilege: mockAuthorizationAction('rule-type-id-3', 'consumer-c', 'rule', 'find'), + authorized: true, }, { - privilege: mockAuthorizationAction('myAppAlertType', 'myApp', 'rule', 'find'), + privilege: mockAuthorizationAction('rule-type-id-3', 'alerts', 'rule', 'find'), authorized: true, }, { - privilege: mockAuthorizationAction('myAppAlertType', 'myOtherApp', 'rule', 'find'), - authorized: true, + privilege: mockAuthorizationAction('rule-type-id-3', 'consumer-d', 'rule', 'find'), + authorized: false, }, ], }, }); - const alertAuthorization = new AlertingAuthorization({ - request, - authorization, - ruleTypeRegistry, - features, - getSpace, - getSpaceId, - }); - ruleTypeRegistry.list.mockReturnValue(setOfAlertTypes); - const { ensureRuleTypeIsAuthorized } = await alertAuthorization.getFindAuthorizationFilter( - AlertingAuthorizationEntity.Rule, - { - type: AlertingAuthorizationFilterType.KQL, - fieldNames: { - ruleTypeId: 'ruleId', - consumer: 'consumer', + + const filter = ( + await auth.getFindAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Rule, + filterOpts: { + type: AlertingAuthorizationFilterType.KQL, + fieldNames: { + ruleTypeId: 'path.to.rule_type_id', + consumer: 'consumer-field', + }, }, - } + }) + ).filter; + + expect(checkPrivileges).toBeCalledTimes(1); + expect(checkPrivileges.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + Object { + "kibana": Array [ + "rule-type-id-1/alerts/rule/find", + "rule-type-id-1/consumer-a/rule/find", + "rule-type-id-1/consumer-b/rule/find", + "rule-type-id-2/alerts/rule/find", + "rule-type-id-2/consumer-b/rule/find", + "rule-type-id-3/alerts/rule/find", + "rule-type-id-3/consumer-c/rule/find", + "rule-type-id-4/consumer-d/rule/find", + ], + }, + ] + `); + + expect(toKqlExpression(filter as KueryNode)).toMatchInlineSnapshot( + `"((path.to.rule_type_id: rule-type-id-1 AND (consumer-field: alerts OR consumer-field: consumer-a OR consumer-field: consumer-b)) OR (path.to.rule_type_id: rule-type-id-2 AND (consumer-field: alerts OR consumer-field: consumer-b)) OR (path.to.rule_type_id: rule-type-id-3 AND (consumer-field: consumer-c OR consumer-field: alerts)))"` ); - expect(() => { - ensureRuleTypeIsAuthorized('myAppAlertType', 'myOtherApp', 'rule'); - }).not.toThrow(); }); - test('creates an `logSuccessfulAuthorization` function which logs every authorized type', async () => { - features.getKibanaFeatures.mockReturnValue([ - mockFeature('myApp', ['myOtherAppAlertType', 'myAppAlertType', 'mySecondAppAlertType']), - mockFeature('myOtherApp', ['mySecondAppAlertType', 'myAppAlertType']), - ]); - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); + + it('does not throw if the rule type is authorized', async () => { checkPrivileges.mockResolvedValueOnce({ username: 'some-user', - hasAllRequested: false, + hasAllRequested: true, privileges: { kibana: [ { - privilege: mockAuthorizationAction('myOtherAppAlertType', 'myApp', 'rule', 'find'), - authorized: true, - }, - { - privilege: mockAuthorizationAction( - 'myOtherAppAlertType', - 'myOtherApp', - 'rule', - 'find' - ), - authorized: false, - }, - { - privilege: mockAuthorizationAction('myAppAlertType', 'myApp', 'rule', 'find'), - authorized: true, - }, - { - privilege: mockAuthorizationAction('myAppAlertType', 'myOtherApp', 'rule', 'find'), + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-a', 'rule', 'find'), authorized: true, }, { - privilege: mockAuthorizationAction('mySecondAppAlertType', 'myApp', 'rule', 'find'), - authorized: true, - }, - { - privilege: mockAuthorizationAction( - 'mySecondAppAlertType', - 'myOtherApp', - 'rule', - 'find' - ), + privilege: mockAuthorizationAction('rule-type-id-2', 'consumer-b', 'rule', 'find'), authorized: true, }, ], }, }); - const alertAuthorization = new AlertingAuthorization({ + + const auth = await AlertingAuthorization.create({ request, - authorization, ruleTypeRegistry, + getSpaceId, features, getSpace, - getSpaceId, + authorization: securityStart.authz, }); - ruleTypeRegistry.list.mockReturnValue(setOfAlertTypes); - const { ensureRuleTypeIsAuthorized } = await alertAuthorization.getFindAuthorizationFilter( - AlertingAuthorizationEntity.Rule, - { + + const { ensureRuleTypeIsAuthorized } = await auth.getFindAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Rule, + filterOpts: { type: AlertingAuthorizationFilterType.KQL, fieldNames: { - ruleTypeId: 'ruleId', - consumer: 'consumer', + ruleTypeId: 'path.to.rule_type_id', + consumer: 'consumer-field', }, - } - ); - expect(() => { - ensureRuleTypeIsAuthorized('myAppAlertType', 'myOtherApp', 'rule'); - ensureRuleTypeIsAuthorized('mySecondAppAlertType', 'myOtherApp', 'rule'); - ensureRuleTypeIsAuthorized('myAppAlertType', 'myOtherApp', 'rule'); - }).not.toThrow(); + }, + }); + + expect(() => + ensureRuleTypeIsAuthorized('rule-type-id-1', 'consumer-a', 'rule') + ).not.toThrow(); + + expect(() => + ensureRuleTypeIsAuthorized('rule-type-id-2', 'consumer-b', 'rule') + ).not.toThrow(); }); + }); - // This is a specific use case currently for alerts as data - // Space ids are stored in the alerts documents and even if security is disabled - // still need to consider the users space privileges - test('creates a spaceId only filter if security is disabled, but require space awareness', async () => { - const alertAuthorization = new AlertingAuthorization({ - request, - ruleTypeRegistry, - features, - getSpace, - getSpaceId, + describe('getAuthorizationFilter', () => { + describe('filter', () => { + it('gets the filter correctly with no security and no spaceIds in the fields names', async () => { + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + }); + + const { filter } = await auth.getAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Rule, + filterOpts: { + type: AlertingAuthorizationFilterType.KQL, + fieldNames: { + ruleTypeId: 'ruleId', + consumer: 'consumer', + }, + }, + operation: ReadOperations.Get, + }); + + expect(filter).toEqual(undefined); }); - const { filter } = await alertAuthorization.getFindAuthorizationFilter( - AlertingAuthorizationEntity.Alert, - { - type: AlertingAuthorizationFilterType.ESDSL, - fieldNames: { - ruleTypeId: 'ruleId', - consumer: 'consumer', - spaceIds: 'path.to.space.id', + + // This is a specific use case currently for alerts as data + // Space ids are stored in the alerts documents and even if security is disabled + // still need to consider the users space privileges + it('gets the filter correctly with no security and spaceIds in the fields names', async () => { + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + }); + + const { filter } = await auth.getAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Rule, + filterOpts: { + type: AlertingAuthorizationFilterType.KQL, + fieldNames: { + ruleTypeId: 'ruleId', + consumer: 'consumer', + spaceIds: 'path.to.space.id', + }, }, - } - ); + operation: ReadOperations.Get, + }); - expect(filter).toEqual({ - bool: { minimum_should_match: 1, should: [{ match: { 'path.to.space.id': 'space1' } }] }, + expect(toKqlExpression(filter as KueryNode)).toMatchInlineSnapshot( + `"path.to.space.id: space1"` + ); }); - }); - }); - describe('filterByRuleTypeAuthorization', () => { - const myOtherAppAlertType: RegistryRuleType = { - actionGroups: [], - actionVariables: undefined, - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: 'myOtherAppAlertType', - name: 'myOtherAppAlertType', - category: 'test', - producer: 'myOtherApp', - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], - }; - const myAppAlertType: RegistryRuleType = { - actionGroups: [], - actionVariables: undefined, - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: 'myAppAlertType', - name: 'myAppAlertType', - category: 'test', - producer: 'myApp', - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], - }; - const setOfAlertTypes = new Set([myAppAlertType, myOtherAppAlertType]); - beforeEach(() => { - features.getKibanaFeatures.mockReturnValue([ - mockFeature('myApp', ['myOtherAppAlertType', 'myAppAlertType']), - mockFeature('myOtherApp', ['myAppAlertType', 'myOtherAppAlertType']), - ]); - }); - test('augments a list of types with all features when there is no authorization api', async () => { - features.getKibanaFeatures.mockReturnValue([ - myAppFeature, - myOtherAppFeature, - myAppWithSubFeature, - myFeatureWithoutAlerting, - ]); - const alertAuthorization = new AlertingAuthorization({ - request, - ruleTypeRegistry, - features, - getSpace, - getSpaceId, + it('gets the filter correctly with security disabled', async () => { + securityStart.authz.mode.useRbacForRequest.mockReturnValue(false); + + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + authorization: securityStart.authz, + }); + + const { filter } = await auth.getAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Rule, + filterOpts: { + type: AlertingAuthorizationFilterType.KQL, + fieldNames: { + ruleTypeId: 'ruleId', + consumer: 'consumer', + }, + }, + operation: ReadOperations.Get, + }); + + expect(filter).toEqual(undefined); }); - ruleTypeRegistry.list.mockReturnValue(setOfAlertTypes); - await expect( - alertAuthorization.filterByRuleTypeAuthorization( - new Set([myAppAlertType, myOtherAppAlertType]), - [WriteOperations.Create], - AlertingAuthorizationEntity.Rule - ) - ).resolves.toMatchInlineSnapshot(` - Set { - Object { - "actionGroups": Array [], - "actionVariables": undefined, - "authorizedConsumers": Object { - "alerts": Object { - "all": true, - "read": true, + it('gets the filter correctly for all rule types and consumers', async () => { + checkPrivileges.mockResolvedValueOnce({ + username: 'some-user', + hasAllRequested: true, + privileges: { + kibana: [ + { + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-a', 'rule', 'get'), + authorized: true, }, - "discover": Object { - "all": true, - "read": true, + { + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-b', 'rule', 'get'), + authorized: true, }, - "myApp": Object { - "all": true, - "read": true, + { + privilege: mockAuthorizationAction('rule-type-id-2', 'consumer-b', 'rule', 'get'), + authorized: true, }, - "myAppWithSubFeature": Object { - "all": true, - "read": true, + { + privilege: mockAuthorizationAction('rule-type-id-3', 'consumer-c', 'rule', 'get'), + authorized: true, }, - "myOtherApp": Object { - "all": true, - "read": true, + { + privilege: mockAuthorizationAction('rule-type-id-4', 'consumer-d', 'rule', 'get'), + authorized: true, }, + ], + }, + }); + + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + authorization: securityStart.authz, + }); + + const { filter } = await auth.getAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Rule, + filterOpts: { + type: AlertingAuthorizationFilterType.KQL, + fieldNames: { + ruleTypeId: 'ruleId', + consumer: 'consumer', }, - "category": "test", - "defaultActionGroupId": "default", - "enabledInLicense": true, - "hasAlertsMappings": false, - "hasFieldsForAAD": false, - "id": "myAppAlertType", - "isExportable": true, - "minimumLicenseRequired": "basic", - "name": "myAppAlertType", - "producer": "myApp", - "recoveryActionGroup": Object { - "id": "recovered", - "name": "Recovered", - }, - "validLegacyConsumers": Array [], }, - Object { - "actionGroups": Array [], - "actionVariables": undefined, - "authorizedConsumers": Object { - "alerts": Object { - "all": true, - "read": true, + operation: ReadOperations.Get, + }); + + expect(toKqlExpression(filter as KueryNode)).toMatchInlineSnapshot( + `"((ruleId: rule-type-id-1 AND (consumer: consumer-a OR consumer: consumer-b)) OR (ruleId: rule-type-id-2 AND consumer: consumer-b) OR (ruleId: rule-type-id-3 AND consumer: consumer-c) OR (ruleId: rule-type-id-4 AND consumer: consumer-d))"` + ); + }); + + it('throws when the user is not authorized for any rule type', async () => { + checkPrivileges.mockResolvedValueOnce({ + username: 'some-user', + hasAllRequested: true, + privileges: { + kibana: [], + }, + }); + + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + authorization: securityStart.authz, + }); + + await expect( + auth.getAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Rule, + filterOpts: { + type: AlertingAuthorizationFilterType.KQL, + fieldNames: { + ruleTypeId: 'ruleId', + consumer: 'consumer', }, - "discover": Object { - "all": true, - "read": true, + }, + operation: ReadOperations.Get, + }) + ).rejects.toThrowErrorMatchingInlineSnapshot( + `"Unauthorized to get rules for any rule types"` + ); + }); + }); + + describe('ensureRuleTypeIsAuthorized', () => { + it('does not throw if the rule type is authorized', async () => { + checkPrivileges.mockResolvedValueOnce({ + username: 'some-user', + hasAllRequested: true, + privileges: { + kibana: [ + { + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-a', 'rule', 'get'), + authorized: true, }, - "myApp": Object { - "all": true, - "read": true, + { + privilege: mockAuthorizationAction('rule-type-id-2', 'consumer-b', 'rule', 'get'), + authorized: true, }, - "myAppWithSubFeature": Object { - "all": true, - "read": true, + ], + }, + }); + + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + authorization: securityStart.authz, + }); + + const { ensureRuleTypeIsAuthorized } = await auth.getAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Rule, + filterOpts: { + type: AlertingAuthorizationFilterType.KQL, + fieldNames: { + ruleTypeId: 'ruleId', + consumer: 'consumer', + }, + }, + operation: ReadOperations.Get, + }); + + expect(() => + ensureRuleTypeIsAuthorized('rule-type-id-1', 'consumer-a', 'rule') + ).not.toThrow(); + + expect(() => + ensureRuleTypeIsAuthorized('rule-type-id-2', 'consumer-b', 'rule') + ).not.toThrow(); + }); + + it('throws if the rule type is not authorized', async () => { + checkPrivileges.mockResolvedValueOnce({ + username: 'some-user', + hasAllRequested: true, + privileges: { + kibana: [ + { + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-a', 'rule', 'get'), + authorized: true, }, - "myOtherApp": Object { - "all": true, - "read": true, + ], + }, + }); + + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + authorization: securityStart.authz, + }); + + const { ensureRuleTypeIsAuthorized } = await auth.getAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Rule, + filterOpts: { + type: AlertingAuthorizationFilterType.KQL, + fieldNames: { + ruleTypeId: 'ruleId', + consumer: 'consumer', + }, + }, + operation: ReadOperations.Get, + }); + + expect(() => + ensureRuleTypeIsAuthorized('rule-type-id-2', 'consumer-a', 'rule') + ).toThrowErrorMatchingInlineSnapshot( + `"Unauthorized by \\"consumer-a\\" to get \\"rule-type-id-2\\" rule"` + ); + }); + + it('throws if the rule type is not authorized for the entity', async () => { + checkPrivileges.mockResolvedValueOnce({ + username: 'some-user', + hasAllRequested: true, + privileges: { + kibana: [ + { + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-a', 'rule', 'get'), + authorized: true, + }, + ], + }, + }); + + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + authorization: securityStart.authz, + }); + + const { ensureRuleTypeIsAuthorized } = await auth.getAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Rule, + filterOpts: { + type: AlertingAuthorizationFilterType.KQL, + fieldNames: { + ruleTypeId: 'ruleId', + consumer: 'consumer', + }, + }, + operation: ReadOperations.Get, + }); + + expect(() => + ensureRuleTypeIsAuthorized('rule-type-id-1', 'consumer-a', 'alert') + ).toThrowErrorMatchingInlineSnapshot( + `"Unauthorized by \\"consumer-a\\" to get \\"rule-type-id-1\\" alert"` + ); + }); + + it('throws if the rule type is not authorized for the consumer', async () => { + checkPrivileges.mockResolvedValueOnce({ + username: 'some-user', + hasAllRequested: true, + privileges: { + kibana: [ + { + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-a', 'rule', 'get'), + authorized: true, }, + ], + }, + }); + + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + authorization: securityStart.authz, + }); + + const { ensureRuleTypeIsAuthorized } = await auth.getAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Rule, + filterOpts: { + type: AlertingAuthorizationFilterType.KQL, + fieldNames: { + ruleTypeId: 'ruleId', + consumer: 'consumer', }, - "category": "test", - "defaultActionGroupId": "default", - "enabledInLicense": true, - "hasAlertsMappings": false, - "hasFieldsForAAD": false, - "id": "myOtherAppAlertType", - "isExportable": true, - "minimumLicenseRequired": "basic", - "name": "myOtherAppAlertType", - "producer": "myOtherApp", - "recoveryActionGroup": Object { - "id": "recovered", - "name": "Recovered", - }, - "validLegacyConsumers": Array [], }, - } + operation: ReadOperations.Get, + }); + + expect(() => + ensureRuleTypeIsAuthorized('rule-type-id-1', 'consumer-b', 'rule') + ).toThrowErrorMatchingInlineSnapshot( + `"Unauthorized by \\"consumer-b\\" to get \\"rule-type-id-1\\" rule"` + ); + }); + }); + }); + + describe('getAuthorizedRuleTypes', () => { + it('calls checkPrivileges correctly', async () => { + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + authorization: securityStart.authz, + }); + + await auth.getAuthorizedRuleTypes({ + ruleTypeIds: ['rule-type-id-1'], + operations: [WriteOperations.Create], + authorizationEntity: AlertingAuthorizationEntity.Rule, + }); + + expect(checkPrivileges).toBeCalledTimes(1); + expect(checkPrivileges.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + Object { + "kibana": Array [ + "rule-type-id-1/alerts/rule/create", + "rule-type-id-1/consumer-a/rule/create", + "rule-type-id-1/consumer-b/rule/create", + ], + }, + ] `); }); - test('augments a list of types with consumers under which the operation is authorized', async () => { - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); + it('returns the authorized rules correctly', async () => { checkPrivileges.mockResolvedValueOnce({ username: 'some-user', - hasAllRequested: false, + hasAllRequested: true, privileges: { kibana: [ { - privilege: mockAuthorizationAction('myOtherAppAlertType', 'myApp', 'rule', 'create'), + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-a', 'rule', 'get'), authorized: true, }, { - privilege: mockAuthorizationAction( - 'myOtherAppAlertType', - 'myOtherApp', - 'rule', - 'create' - ), - authorized: false, + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-a', 'rule', 'create'), + authorized: true, }, { - privilege: mockAuthorizationAction('myAppAlertType', 'myApp', 'rule', 'create'), + privilege: mockAuthorizationAction('rule-type-id-2', 'consumer-b', 'rule', 'get'), authorized: true, }, { - privilege: mockAuthorizationAction('myAppAlertType', 'myOtherApp', 'rule', 'create'), + privilege: mockAuthorizationAction('rule-type-id-3', 'consumer-c', 'rule', 'create'), authorized: true, }, ], }, }); - const alertAuthorization = new AlertingAuthorization({ + const auth = await AlertingAuthorization.create({ request, - authorization, ruleTypeRegistry, + getSpaceId, features, getSpace, - getSpaceId, + authorization: securityStart.authz, }); - ruleTypeRegistry.list.mockReturnValue(setOfAlertTypes); - await expect( - alertAuthorization.filterByRuleTypeAuthorization( - new Set([myAppAlertType, myOtherAppAlertType]), - [WriteOperations.Create], - AlertingAuthorizationEntity.Rule - ) - ).resolves.toMatchInlineSnapshot(` - Set { - Object { - "actionGroups": Array [], - "actionVariables": undefined, + expect( + await auth.getAuthorizedRuleTypes({ + ruleTypeIds: ['rule-type-id-1'], + operations: [WriteOperations.Create], + authorizationEntity: AlertingAuthorizationEntity.Rule, + }) + ).toMatchInlineSnapshot(` + Map { + "rule-type-id-1" => Object { "authorizedConsumers": Object { - "myApp": Object { + "consumer-a": Object { "all": true, "read": true, }, }, - "category": "test", - "defaultActionGroupId": "default", - "enabledInLicense": true, - "hasAlertsMappings": false, - "hasFieldsForAAD": false, - "id": "myOtherAppAlertType", - "isExportable": true, - "minimumLicenseRequired": "basic", - "name": "myOtherAppAlertType", - "producer": "myOtherApp", - "recoveryActionGroup": Object { - "id": "recovered", - "name": "Recovered", - }, - "validLegacyConsumers": Array [], }, - Object { - "actionGroups": Array [], - "actionVariables": undefined, - "authorizedConsumers": Object { - "myApp": Object { - "all": true, - "read": true, - }, - "myOtherApp": Object { - "all": true, - "read": true, + } + `); + }); + }); + + describe('getAllAuthorizedRuleTypes', () => { + it('get authorized rule types with authorized consumers', async () => { + checkPrivileges.mockResolvedValueOnce({ + username: 'some-user', + hasAllRequested: true, + privileges: { + kibana: [ + { + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-a', 'rule', 'get'), + authorized: true, + }, + { + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-a', 'rule', 'create'), + authorized: true, + }, + { + privilege: mockAuthorizationAction('rule-type-id-2', 'consumer-b', 'rule', 'get'), + authorized: true, + }, + { + privilege: mockAuthorizationAction('rule-type-id-3', 'consumer-c', 'rule', 'create'), + authorized: false, + }, + ], + }, + }); + + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + authorization: securityStart.authz, + }); + + expect( + await auth.getAllAuthorizedRuleTypes({ + operations: [ReadOperations.Get, WriteOperations.Create], + authorizationEntity: AlertingAuthorizationEntity.Rule, + }) + ).toMatchInlineSnapshot(` + Object { + "authorizedRuleTypes": Map { + "rule-type-id-1" => Object { + "authorizedConsumers": Object { + "consumer-a": Object { + "all": true, + "read": true, + }, + }, + }, + "rule-type-id-2" => Object { + "authorizedConsumers": Object { + "consumer-b": Object { + "all": false, + "read": true, + }, + }, + }, + }, + "hasAllRequested": true, + "username": "some-user", + } + `); + }); + + it('calls checkPrivileges with the correct actions', async () => { + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + authorization: securityStart.authz, + }); + + await auth.getAllAuthorizedRuleTypes({ + operations: [ReadOperations.Get, WriteOperations.Create], + authorizationEntity: AlertingAuthorizationEntity.Rule, + }); + + expect(checkPrivileges).toBeCalledTimes(1); + expect(checkPrivileges.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + Object { + "kibana": Array [ + "rule-type-id-1/alerts/rule/get", + "rule-type-id-1/alerts/rule/create", + "rule-type-id-1/consumer-a/rule/get", + "rule-type-id-1/consumer-a/rule/create", + "rule-type-id-1/consumer-b/rule/get", + "rule-type-id-1/consumer-b/rule/create", + "rule-type-id-2/alerts/rule/get", + "rule-type-id-2/alerts/rule/create", + "rule-type-id-2/consumer-b/rule/get", + "rule-type-id-2/consumer-b/rule/create", + "rule-type-id-3/alerts/rule/get", + "rule-type-id-3/alerts/rule/create", + "rule-type-id-3/consumer-c/rule/get", + "rule-type-id-3/consumer-c/rule/create", + "rule-type-id-4/consumer-d/rule/get", + "rule-type-id-4/consumer-d/rule/create", + ], + }, + ] + `); + }); + }); + + describe('_getAuthorizedRuleTypesWithAuthorizedConsumers', () => { + it('returns all rule types with all consumers as authorized with no authorization', async () => { + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + }); + + expect( + // @ts-expect-error: need to test the private method + await auth._getAuthorizedRuleTypesWithAuthorizedConsumers({ + ruleTypeIds, + operations: [ReadOperations.Get, WriteOperations.Create], + authorizationEntity: AlertingAuthorizationEntity.Rule, + }) + ).toMatchInlineSnapshot(` + Object { + "authorizedRuleTypes": Map { + "rule-type-id-1" => Object { + "authorizedConsumers": Object { + "alerts": Object { + "all": true, + "read": true, + }, + "consumer-a": Object { + "all": true, + "read": true, + }, + "consumer-b": Object { + "all": true, + "read": true, + }, + "consumer-c": Object { + "all": true, + "read": true, + }, + "consumer-d": Object { + "all": true, + "read": true, + }, + }, + }, + "rule-type-id-2" => Object { + "authorizedConsumers": Object { + "alerts": Object { + "all": true, + "read": true, + }, + "consumer-a": Object { + "all": true, + "read": true, + }, + "consumer-b": Object { + "all": true, + "read": true, + }, + "consumer-c": Object { + "all": true, + "read": true, + }, + "consumer-d": Object { + "all": true, + "read": true, + }, + }, + }, + "rule-type-id-3" => Object { + "authorizedConsumers": Object { + "alerts": Object { + "all": true, + "read": true, + }, + "consumer-a": Object { + "all": true, + "read": true, + }, + "consumer-b": Object { + "all": true, + "read": true, + }, + "consumer-c": Object { + "all": true, + "read": true, + }, + "consumer-d": Object { + "all": true, + "read": true, + }, + }, + }, + "rule-type-id-4" => Object { + "authorizedConsumers": Object { + "alerts": Object { + "all": true, + "read": true, + }, + "consumer-a": Object { + "all": true, + "read": true, + }, + "consumer-b": Object { + "all": true, + "read": true, + }, + "consumer-c": Object { + "all": true, + "read": true, + }, + "consumer-d": Object { + "all": true, + "read": true, + }, + }, + }, + }, + "hasAllRequested": true, + } + `); + }); + + it('filters out rule types with no authorization', async () => { + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + }); + + expect( + // @ts-expect-error: need to test the private method + await auth._getAuthorizedRuleTypesWithAuthorizedConsumers({ + ruleTypeIds: [ruleTypeIds[0], ruleTypeIds[1]], + operations: [ReadOperations.Get, WriteOperations.Create], + authorizationEntity: AlertingAuthorizationEntity.Rule, + }) + ).toMatchInlineSnapshot(` + Object { + "authorizedRuleTypes": Map { + "rule-type-id-1" => Object { + "authorizedConsumers": Object { + "alerts": Object { + "all": true, + "read": true, + }, + "consumer-a": Object { + "all": true, + "read": true, + }, + "consumer-b": Object { + "all": true, + "read": true, + }, + "consumer-c": Object { + "all": true, + "read": true, + }, + "consumer-d": Object { + "all": true, + "read": true, + }, + }, + }, + "rule-type-id-2" => Object { + "authorizedConsumers": Object { + "alerts": Object { + "all": true, + "read": true, + }, + "consumer-a": Object { + "all": true, + "read": true, + }, + "consumer-b": Object { + "all": true, + "read": true, + }, + "consumer-c": Object { + "all": true, + "read": true, + }, + "consumer-d": Object { + "all": true, + "read": true, + }, + }, + }, + }, + "hasAllRequested": true, + } + `); + }); + + it('returns all rule types with all consumers as authorized with disabled authorization', async () => { + securityStart.authz.mode.useRbacForRequest.mockReturnValue(false); + + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + authorization: securityStart.authz, + }); + + expect( + // @ts-expect-error: need to test the private method + await auth._getAuthorizedRuleTypesWithAuthorizedConsumers({ + ruleTypeIds, + operations: [ReadOperations.Get, WriteOperations.Create], + authorizationEntity: AlertingAuthorizationEntity.Rule, + }) + ).toMatchInlineSnapshot(` + Object { + "authorizedRuleTypes": Map { + "rule-type-id-1" => Object { + "authorizedConsumers": Object { + "alerts": Object { + "all": true, + "read": true, + }, + "consumer-a": Object { + "all": true, + "read": true, + }, + "consumer-b": Object { + "all": true, + "read": true, + }, + "consumer-c": Object { + "all": true, + "read": true, + }, + "consumer-d": Object { + "all": true, + "read": true, + }, + }, + }, + "rule-type-id-2" => Object { + "authorizedConsumers": Object { + "alerts": Object { + "all": true, + "read": true, + }, + "consumer-a": Object { + "all": true, + "read": true, + }, + "consumer-b": Object { + "all": true, + "read": true, + }, + "consumer-c": Object { + "all": true, + "read": true, + }, + "consumer-d": Object { + "all": true, + "read": true, + }, + }, + }, + "rule-type-id-3" => Object { + "authorizedConsumers": Object { + "alerts": Object { + "all": true, + "read": true, + }, + "consumer-a": Object { + "all": true, + "read": true, + }, + "consumer-b": Object { + "all": true, + "read": true, + }, + "consumer-c": Object { + "all": true, + "read": true, + }, + "consumer-d": Object { + "all": true, + "read": true, + }, + }, + }, + "rule-type-id-4" => Object { + "authorizedConsumers": Object { + "alerts": Object { + "all": true, + "read": true, + }, + "consumer-a": Object { + "all": true, + "read": true, + }, + "consumer-b": Object { + "all": true, + "read": true, + }, + "consumer-c": Object { + "all": true, + "read": true, + }, + "consumer-d": Object { + "all": true, + "read": true, + }, + }, + }, + }, + "hasAllRequested": true, + } + `); + }); + + it('filters out rule types with disabled authorization', async () => { + securityStart.authz.mode.useRbacForRequest.mockReturnValue(false); + + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + authorization: securityStart.authz, + }); + + expect( + // @ts-expect-error: need to test the private method + await auth._getAuthorizedRuleTypesWithAuthorizedConsumers({ + ruleTypeIds: [ruleTypeIds[0], ruleTypeIds[1]], + operations: [ReadOperations.Get, WriteOperations.Create], + authorizationEntity: AlertingAuthorizationEntity.Rule, + }) + ).toMatchInlineSnapshot(` + Object { + "authorizedRuleTypes": Map { + "rule-type-id-1" => Object { + "authorizedConsumers": Object { + "alerts": Object { + "all": true, + "read": true, + }, + "consumer-a": Object { + "all": true, + "read": true, + }, + "consumer-b": Object { + "all": true, + "read": true, + }, + "consumer-c": Object { + "all": true, + "read": true, + }, + "consumer-d": Object { + "all": true, + "read": true, + }, + }, + }, + "rule-type-id-2" => Object { + "authorizedConsumers": Object { + "alerts": Object { + "all": true, + "read": true, + }, + "consumer-a": Object { + "all": true, + "read": true, + }, + "consumer-b": Object { + "all": true, + "read": true, + }, + "consumer-c": Object { + "all": true, + "read": true, + }, + "consumer-d": Object { + "all": true, + "read": true, + }, + }, + }, + }, + "hasAllRequested": true, + } + `); + }); + + it('get authorized rule types with authorized consumers with read access only', async () => { + checkPrivileges.mockResolvedValueOnce({ + username: 'some-user', + hasAllRequested: true, + privileges: { + kibana: [ + { + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-a', 'rule', 'get'), + authorized: true, + }, + ], + }, + }); + + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + authorization: securityStart.authz, + }); + + expect( + // @ts-expect-error: need to test the private method + await auth._getAuthorizedRuleTypesWithAuthorizedConsumers({ + ruleTypeIds, + operations: [ReadOperations.Get, WriteOperations.Create], + authorizationEntity: AlertingAuthorizationEntity.Rule, + }) + ).toMatchInlineSnapshot(` + Object { + "authorizedRuleTypes": Map { + "rule-type-id-1" => Object { + "authorizedConsumers": Object { + "consumer-a": Object { + "all": false, + "read": true, + }, + }, + }, + }, + "hasAllRequested": true, + "username": "some-user", + } + `); + }); + + it('get authorized rule types with authorized consumers with full access', async () => { + checkPrivileges.mockResolvedValueOnce({ + username: 'some-user', + hasAllRequested: true, + privileges: { + kibana: [ + { + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-a', 'rule', 'get'), + authorized: true, + }, + { + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-a', 'rule', 'create'), + authorized: true, + }, + ], + }, + }); + + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + authorization: securityStart.authz, + }); + + expect( + // @ts-expect-error: need to test the private method + await auth._getAuthorizedRuleTypesWithAuthorizedConsumers({ + ruleTypeIds, + operations: [ReadOperations.Get, WriteOperations.Create], + authorizationEntity: AlertingAuthorizationEntity.Rule, + }) + ).toMatchInlineSnapshot(` + Object { + "authorizedRuleTypes": Map { + "rule-type-id-1" => Object { + "authorizedConsumers": Object { + "consumer-a": Object { + "all": true, + "read": true, + }, + }, + }, + }, + "hasAllRequested": true, + "username": "some-user", + } + `); + }); + + it('filters out not requested rule types', async () => { + checkPrivileges.mockResolvedValueOnce({ + username: 'some-user', + hasAllRequested: true, + privileges: { + kibana: [ + { + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-a', 'rule', 'get'), + authorized: true, + }, + { + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-b', 'rule', 'create'), + authorized: true, + }, + { + privilege: mockAuthorizationAction('rule-type-id-3', 'consumer-c', 'rule', 'create'), + authorized: true, + }, + ], + }, + }); + + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + authorization: securityStart.authz, + }); + + expect( + // @ts-expect-error: need to test the private method + await auth._getAuthorizedRuleTypesWithAuthorizedConsumers({ + ruleTypeIds: [ruleTypeIds[0], ruleTypeIds[1]], + operations: [ReadOperations.Get, WriteOperations.Create], + authorizationEntity: AlertingAuthorizationEntity.Rule, + }) + ).toMatchInlineSnapshot(` + Object { + "authorizedRuleTypes": Map { + "rule-type-id-1" => Object { + "authorizedConsumers": Object { + "consumer-a": Object { + "all": false, + "read": true, + }, + "consumer-b": Object { + "all": true, + "read": true, + }, }, }, - "category": "test", - "defaultActionGroupId": "default", - "enabledInLicense": true, - "hasAlertsMappings": false, - "hasFieldsForAAD": false, - "id": "myAppAlertType", - "isExportable": true, - "minimumLicenseRequired": "basic", - "name": "myAppAlertType", - "producer": "myApp", - "recoveryActionGroup": Object { - "id": "recovered", - "name": "Recovered", - }, - "validLegacyConsumers": Array [], }, + "hasAllRequested": true, + "username": "some-user", } `); }); - test('authorizes user under the `alerts` consumer when they are authorized by the producer', async () => { - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); + it('returns an empty map with no requested rule types', async () => { checkPrivileges.mockResolvedValueOnce({ username: 'some-user', - hasAllRequested: false, + hasAllRequested: true, privileges: { kibana: [ { - privilege: mockAuthorizationAction('myAppAlertType', 'myApp', 'alert', 'create'), + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-a', 'rule', 'get'), authorized: true, }, { - privilege: mockAuthorizationAction('myAppAlertType', 'myOtherApp', 'alert', 'create'), - authorized: false, + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-a', 'rule', 'create'), + authorized: true, }, ], }, }); - const alertAuthorization = new AlertingAuthorization({ + const auth = await AlertingAuthorization.create({ request, - authorization, ruleTypeRegistry, + getSpaceId, features, getSpace, - getSpaceId, + authorization: securityStart.authz, }); - ruleTypeRegistry.list.mockReturnValue(setOfAlertTypes); - await expect( - alertAuthorization.filterByRuleTypeAuthorization( - new Set([myAppAlertType]), - [WriteOperations.Create], - AlertingAuthorizationEntity.Alert - ) - ).resolves.toMatchInlineSnapshot(` - Set { - Object { - "actionGroups": Array [], - "actionVariables": undefined, - "authorizedConsumers": Object { - "myApp": Object { - "all": true, - "read": true, - }, - }, - "category": "test", - "defaultActionGroupId": "default", - "enabledInLicense": true, - "hasAlertsMappings": false, - "hasFieldsForAAD": false, - "id": "myAppAlertType", - "isExportable": true, - "minimumLicenseRequired": "basic", - "name": "myAppAlertType", - "producer": "myApp", - "recoveryActionGroup": Object { - "id": "recovered", - "name": "Recovered", - }, - "validLegacyConsumers": Array [], - }, + expect( + // @ts-expect-error: need to test the private method + await auth._getAuthorizedRuleTypesWithAuthorizedConsumers({ + ruleTypeIds: [], + operations: [ReadOperations.Get, WriteOperations.Create], + authorizationEntity: AlertingAuthorizationEntity.Rule, + }) + ).toMatchInlineSnapshot(` + Object { + "authorizedRuleTypes": Map {}, + "hasAllRequested": true, + "username": "some-user", } `); }); - test('augments a list of types with consumers under which multiple operations are authorized', async () => { - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); + it('get authorized rule types with authorized consumers when some rule types are not authorized', async () => { checkPrivileges.mockResolvedValueOnce({ username: 'some-user', - hasAllRequested: false, + hasAllRequested: true, privileges: { kibana: [ { - privilege: mockAuthorizationAction('myOtherAppAlertType', 'myApp', 'alert', 'create'), - authorized: true, - }, - { - privilege: mockAuthorizationAction( - 'myOtherAppAlertType', - 'myOtherApp', - 'alert', - 'create' - ), - authorized: false, - }, - { - privilege: mockAuthorizationAction('myAppAlertType', 'myApp', 'alert', 'create'), - authorized: false, - }, - { - privilege: mockAuthorizationAction('myAppAlertType', 'myOtherApp', 'alert', 'create'), - authorized: false, - }, - { - privilege: mockAuthorizationAction('myOtherAppAlertType', 'myApp', 'alert', 'get'), + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-a', 'rule', 'get'), authorized: true, }, { - privilege: mockAuthorizationAction( - 'myOtherAppAlertType', - 'myOtherApp', - 'alert', - 'get' - ), + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-a', 'rule', 'create'), authorized: true, }, { - privilege: mockAuthorizationAction('myAppAlertType', 'myApp', 'alert', 'get'), - authorized: true, + privilege: mockAuthorizationAction('rule-type-id-2', 'consumer-b', 'rule', 'create'), + authorized: false, }, { - privilege: mockAuthorizationAction('myAppAlertType', 'myOtherApp', 'alert', 'get'), + privilege: mockAuthorizationAction('rule-type-id-3', 'consumer-c', 'rule', 'get'), authorized: true, }, ], }, }); - const alertAuthorization = new AlertingAuthorization({ + const auth = await AlertingAuthorization.create({ request, - authorization, ruleTypeRegistry, + getSpaceId, features, getSpace, - getSpaceId, + authorization: securityStart.authz, }); - ruleTypeRegistry.list.mockReturnValue(setOfAlertTypes); - await expect( - alertAuthorization.filterByRuleTypeAuthorization( - new Set([myAppAlertType, myOtherAppAlertType]), - [WriteOperations.Create, ReadOperations.Get], - AlertingAuthorizationEntity.Alert - ) - ).resolves.toMatchInlineSnapshot(` - Set { - Object { - "actionGroups": Array [], - "actionVariables": undefined, - "authorizedConsumers": Object { - "myApp": Object { - "all": true, - "read": true, - }, - "myOtherApp": Object { - "all": false, - "read": true, + expect( + // @ts-expect-error: need to test the private method + await auth._getAuthorizedRuleTypesWithAuthorizedConsumers({ + ruleTypeIds, + operations: [ReadOperations.Get, WriteOperations.Create], + authorizationEntity: AlertingAuthorizationEntity.Rule, + }) + ).toMatchInlineSnapshot(` + Object { + "authorizedRuleTypes": Map { + "rule-type-id-1" => Object { + "authorizedConsumers": Object { + "consumer-a": Object { + "all": true, + "read": true, + }, }, }, - "category": "test", - "defaultActionGroupId": "default", - "enabledInLicense": true, - "hasAlertsMappings": false, - "hasFieldsForAAD": false, - "id": "myOtherAppAlertType", - "isExportable": true, - "minimumLicenseRequired": "basic", - "name": "myOtherAppAlertType", - "producer": "myOtherApp", - "recoveryActionGroup": Object { - "id": "recovered", - "name": "Recovered", - }, - "validLegacyConsumers": Array [], - }, - Object { - "actionGroups": Array [], - "actionVariables": undefined, - "authorizedConsumers": Object { - "myApp": Object { - "all": false, - "read": true, - }, - "myOtherApp": Object { - "all": false, - "read": true, + "rule-type-id-3" => Object { + "authorizedConsumers": Object { + "consumer-c": Object { + "all": false, + "read": true, + }, }, }, - "category": "test", - "defaultActionGroupId": "default", - "enabledInLicense": true, - "hasAlertsMappings": false, - "hasFieldsForAAD": false, - "id": "myAppAlertType", - "isExportable": true, - "minimumLicenseRequired": "basic", - "name": "myAppAlertType", - "producer": "myApp", - "recoveryActionGroup": Object { - "id": "recovered", - "name": "Recovered", - }, - "validLegacyConsumers": Array [], }, + "hasAllRequested": true, + "username": "some-user", } `); }); - test('omits types which have no consumers under which the operation is authorized', async () => { - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); + it('get authorized rule types with authorized consumers when consumers are not valid for a rule type', async () => { checkPrivileges.mockResolvedValueOnce({ username: 'some-user', - hasAllRequested: false, + hasAllRequested: true, privileges: { kibana: [ { - privilege: mockAuthorizationAction('myOtherAppAlertType', 'myApp', 'alert', 'create'), + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-a', 'rule', 'get'), authorized: true, }, { - privilege: mockAuthorizationAction( - 'myOtherAppAlertType', - 'myOtherApp', - 'alert', - 'create' - ), + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-a', 'rule', 'create'), authorized: true, }, { - privilege: mockAuthorizationAction('myAppAlertType', 'myApp', 'alert', 'create'), + privilege: mockAuthorizationAction('rule-type-id-2', 'consumer-b', 'rule', 'create'), authorized: false, }, { - privilege: mockAuthorizationAction('myAppAlertType', 'myOtherApp', 'alert', 'create'), - authorized: false, + privilege: mockAuthorizationAction('rule-type-id-3', 'consumer-d', 'rule', 'get'), + authorized: true, }, ], }, }); - const alertAuthorization = new AlertingAuthorization({ + const auth = await AlertingAuthorization.create({ request, - authorization, ruleTypeRegistry, + getSpaceId, features, getSpace, - getSpaceId, + authorization: securityStart.authz, }); - ruleTypeRegistry.list.mockReturnValue(setOfAlertTypes); - await expect( - alertAuthorization.filterByRuleTypeAuthorization( - new Set([myAppAlertType, myOtherAppAlertType]), - [WriteOperations.Create], - AlertingAuthorizationEntity.Alert - ) - ).resolves.toMatchInlineSnapshot(` - Set { - Object { - "actionGroups": Array [], - "actionVariables": undefined, - "authorizedConsumers": Object { - "myApp": Object { - "all": true, - "read": true, - }, - "myOtherApp": Object { - "all": true, - "read": true, + expect( + // @ts-expect-error: need to test the private method + await auth._getAuthorizedRuleTypesWithAuthorizedConsumers({ + ruleTypeIds, + operations: [ReadOperations.Get, WriteOperations.Create], + authorizationEntity: AlertingAuthorizationEntity.Rule, + }) + ).toMatchInlineSnapshot(` + Object { + "authorizedRuleTypes": Map { + "rule-type-id-1" => Object { + "authorizedConsumers": Object { + "consumer-a": Object { + "all": true, + "read": true, + }, }, }, - "category": "test", - "defaultActionGroupId": "default", - "enabledInLicense": true, - "hasAlertsMappings": false, - "hasFieldsForAAD": false, - "id": "myOtherAppAlertType", - "isExportable": true, - "minimumLicenseRequired": "basic", - "name": "myOtherAppAlertType", - "producer": "myOtherApp", - "recoveryActionGroup": Object { - "id": "recovered", - "name": "Recovered", - }, - "validLegacyConsumers": Array [], }, + "hasAllRequested": true, + "username": "some-user", } `); }); - }); - describe('getAugmentedRuleTypesWithAuthorization', () => { - const myOtherAppAlertType: RegistryRuleType = { - actionGroups: [], - actionVariables: undefined, - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - recoveryActionGroup: RecoveredActionGroup, - id: 'myOtherAppAlertType', - name: 'myOtherAppAlertType', - category: 'test', - producer: 'alerts', - enabledInLicense: true, - isExportable: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], - }; - const myAppAlertType: RegistryRuleType = { - actionGroups: [], - actionVariables: undefined, - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - recoveryActionGroup: RecoveredActionGroup, - id: 'myAppAlertType', - name: 'myAppAlertType', - category: 'test', - producer: 'myApp', - enabledInLicense: true, - isExportable: true, - hasAlertsMappings: true, - hasFieldsForAAD: true, - validLegacyConsumers: [], - }; - const mySecondAppAlertType: RegistryRuleType = { - actionGroups: [], - actionVariables: undefined, - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - recoveryActionGroup: RecoveredActionGroup, - id: 'mySecondAppAlertType', - name: 'mySecondAppAlertType', - category: 'test', - producer: 'myApp', - enabledInLicense: true, - isExportable: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], - }; - const setOfAlertTypes = new Set([myAppAlertType, myOtherAppAlertType, mySecondAppAlertType]); - beforeEach(() => { - features.getKibanaFeatures.mockReturnValue([mockFeature('myApp', ['myOtherAppAlertType'])]); - }); - test('it returns authorized rule types given a set of feature ids', async () => { - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); + it('filters out rule types that are not in the rule type registry but registered in the feature', async () => { + ruleTypeRegistry.has.mockImplementation((ruleTypeId: string) => false); + checkPrivileges.mockResolvedValueOnce({ username: 'some-user', - hasAllRequested: false, + hasAllRequested: true, privileges: { kibana: [ { - privilege: mockAuthorizationAction('myOtherAppAlertType', 'myApp', 'alert', 'find'), + privilege: mockAuthorizationAction('rule-type-id-1', 'consumer-a', 'rule', 'get'), authorized: true, }, ], }, }); - const alertAuthorization = new AlertingAuthorization({ + + const auth = await AlertingAuthorization.create({ request, - authorization, ruleTypeRegistry, + getSpaceId, features, getSpace, - getSpaceId, + authorization: securityStart.authz, }); - ruleTypeRegistry.list.mockReturnValue(setOfAlertTypes); - await expect( - alertAuthorization.getAugmentedRuleTypesWithAuthorization( - ['myApp'], - [ReadOperations.Find, ReadOperations.Get, WriteOperations.Update], - AlertingAuthorizationEntity.Alert - ) - ).resolves.toMatchInlineSnapshot(` + expect( + // @ts-expect-error: need to test the private method + await auth._getAuthorizedRuleTypesWithAuthorizedConsumers({ + ruleTypeIds: ['rule-type-id-1'], + operations: [ReadOperations.Get, WriteOperations.Create], + authorizationEntity: AlertingAuthorizationEntity.Rule, + }) + ).toMatchInlineSnapshot(` Object { - "authorizedRuleTypes": Set { - Object { - "actionGroups": Array [], - "actionVariables": undefined, - "authorizedConsumers": Object { - "myApp": Object { - "all": false, - "read": true, - }, - }, - "category": "test", - "defaultActionGroupId": "default", - "enabledInLicense": true, - "hasAlertsMappings": false, - "hasFieldsForAAD": false, - "id": "myOtherAppAlertType", - "isExportable": true, - "minimumLicenseRequired": "basic", - "name": "myOtherAppAlertType", - "producer": "alerts", - "recoveryActionGroup": Object { - "id": "recovered", - "name": "Recovered", - }, - "validLegacyConsumers": Array [], - }, - }, - "hasAllRequested": false, + "authorizedRuleTypes": Map {}, + "hasAllRequested": true, "username": "some-user", } `); }); - test('it returns all authorized if user has read, get and update alert privileges', async () => { - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); + it('filters out rule types that are registered in the rule type registry but not in the feature', async () => { + ruleTypeRegistry.has.mockImplementation((ruleTypeId: string) => true); + checkPrivileges.mockResolvedValueOnce({ username: 'some-user', - hasAllRequested: false, + hasAllRequested: true, privileges: { kibana: [ { - privilege: mockAuthorizationAction('myOtherAppAlertType', 'myApp', 'alert', 'find'), - authorized: true, - }, - { - privilege: mockAuthorizationAction('myOtherAppAlertType', 'myApp', 'alert', 'get'), - authorized: true, - }, - { - privilege: mockAuthorizationAction('myOtherAppAlertType', 'myApp', 'alert', 'update'), + privilege: mockAuthorizationAction('not-exist', 'consumer-a', 'rule', 'get'), authorized: true, }, ], }, }); - const alertAuthorization = new AlertingAuthorization({ + + const auth = await AlertingAuthorization.create({ request, - authorization, ruleTypeRegistry, + getSpaceId, features, getSpace, - getSpaceId, + authorization: securityStart.authz, }); - ruleTypeRegistry.list.mockReturnValue(setOfAlertTypes); - await expect( - alertAuthorization.getAugmentedRuleTypesWithAuthorization( - ['myApp'], - [ReadOperations.Find, ReadOperations.Get, WriteOperations.Update], - AlertingAuthorizationEntity.Alert - ) - ).resolves.toMatchInlineSnapshot(` + expect( + // @ts-expect-error: need to test the private method + await auth._getAuthorizedRuleTypesWithAuthorizedConsumers({ + ruleTypeIds: ['not-exist'], + operations: [ReadOperations.Get, WriteOperations.Create], + authorizationEntity: AlertingAuthorizationEntity.Rule, + }) + ).toMatchInlineSnapshot(` Object { - "authorizedRuleTypes": Set { - Object { - "actionGroups": Array [], - "actionVariables": undefined, - "authorizedConsumers": Object { - "myApp": Object { - "all": true, - "read": true, - }, - }, - "category": "test", - "defaultActionGroupId": "default", - "enabledInLicense": true, - "hasAlertsMappings": false, - "hasFieldsForAAD": false, - "id": "myOtherAppAlertType", - "isExportable": true, - "minimumLicenseRequired": "basic", - "name": "myOtherAppAlertType", - "producer": "alerts", - "recoveryActionGroup": Object { - "id": "recovered", - "name": "Recovered", - }, - "validLegacyConsumers": Array [], - }, - }, - "hasAllRequested": false, + "authorizedRuleTypes": Map {}, + "hasAllRequested": true, "username": "some-user", } `); }); - }); - describe('8.11+', () => { - let alertAuthorization: AlertingAuthorization; - - const setOfRuleTypes: RegistryRuleType[] = [ - { - actionGroups: [], - actionVariables: undefined, - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: '.esQuery', - name: 'ES Query', - category: 'management', - producer: 'stackAlerts', - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: ['discover', 'alerts'], - }, - { - actionGroups: [], - actionVariables: undefined, - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: '.threshold-rule-o11y', - name: 'New threshold 011y', - category: 'observability', - producer: 'observability', - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], - }, - { - actionGroups: [], - actionVariables: undefined, - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: '.infrastructure-threshold-o11y', - name: 'Metrics o11y', - category: 'observability', - producer: 'infrastructure', - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: ['alerts'], - }, - { - actionGroups: [], - actionVariables: undefined, - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: '.logs-threshold-o11y', - name: 'Logs o11y', - category: 'observability', - producer: 'logs', - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: ['alerts'], - }, - ]; + it('call checkPrivileges with the correct actions', async () => { + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + authorization: securityStart.authz, + }); - const onlyStackAlertsKibanaPrivileges = [ - { - privilege: mockAuthorizationAction('.esQuery', 'stackAlerts', 'rule', 'create'), - authorized: true, - }, - { - privilege: mockAuthorizationAction('.esQuery', 'stackAlerts', 'rule', 'find'), - authorized: true, - }, - ]; - const only011yKibanaPrivileges = [ - { - privilege: mockAuthorizationAction( - '.infrastructure-threshold-o11y', - 'infrastructure', - 'rule', - 'create' - ), - authorized: true, - }, - { - privilege: mockAuthorizationAction( - '.infrastructure-threshold-o11y', - 'infrastructure', - 'rule', - 'find' - ), - authorized: true, - }, - { - privilege: mockAuthorizationAction( - '.threshold-rule-o11y', - 'infrastructure', - 'rule', - 'create' - ), - authorized: true, - }, - { - privilege: mockAuthorizationAction( - '.threshold-rule-o11y', - 'infrastructure', - 'rule', - 'find' - ), - authorized: true, - }, - { - privilege: mockAuthorizationAction('.logs-threshold-o11y', 'logs', 'rule', 'create'), - authorized: true, - }, - { - privilege: mockAuthorizationAction('.logs-threshold-o11y', 'logs', 'rule', 'find'), - authorized: true, - }, - { - privilege: mockAuthorizationAction('.threshold-rule-o11y', 'logs', 'rule', 'create'), - authorized: true, - }, - { - privilege: mockAuthorizationAction('.threshold-rule-o11y', 'logs', 'rule', 'find'), - authorized: true, - }, - ]; - const onlyLogsAndStackAlertsKibanaPrivileges = [ - { - privilege: mockAuthorizationAction('.esQuery', 'stackAlerts', 'rule', 'create'), - authorized: true, - }, - { - privilege: mockAuthorizationAction('.esQuery', 'stackAlerts', 'rule', 'find'), - authorized: true, - }, - { - privilege: mockAuthorizationAction('.logs-threshold-o11y', 'logs', 'rule', 'create'), - authorized: true, - }, - { - privilege: mockAuthorizationAction('.logs-threshold-o11y', 'logs', 'rule', 'find'), - authorized: true, - }, - { - privilege: mockAuthorizationAction('.threshold-rule-o11y', 'logs', 'rule', 'create'), - authorized: true, - }, - { - privilege: mockAuthorizationAction('.threshold-rule-o11y', 'logs', 'rule', 'find'), - authorized: true, - }, - ]; - - beforeEach(async () => { - ruleTypeRegistry.list.mockReturnValue(new Set(setOfRuleTypes)); - ruleTypeRegistry.get.mockImplementation((id: string) => { - if (setOfRuleTypes.some((rt) => rt.id === id)) { - const ruleType = setOfRuleTypes.find((rt) => rt.id === id); - return (ruleType ?? {}) as NormalizedRuleType<{}, {}, {}, {}, {}, '', '', {}>; - } - return {} as NormalizedRuleType<{}, {}, {}, {}, {}, '', '', {}>; + // @ts-expect-error: need to test the private method + await auth._getAuthorizedRuleTypesWithAuthorizedConsumers({ + ruleTypeIds: [...ruleTypeIds, 'rule-type-not-exist'], + operations: [ReadOperations.Get, WriteOperations.Create], + authorizationEntity: AlertingAuthorizationEntity.Rule, }); - }); - describe('user only access to stack alerts + discover', () => { - beforeEach(() => { - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.mode.useRbacForRequest.mockReturnValue(true); - - features.getKibanaFeatures.mockReset(); - features.getKibanaFeatures.mockReturnValue([ - mockFeature('stackAlerts', ['.esQuery']), - mockFeature('discover', []), - ]); - checkPrivileges.mockReset(); - checkPrivileges.mockResolvedValue({ - username: 'onlyStack', - hasAllRequested: true, - privileges: { - kibana: onlyStackAlertsKibanaPrivileges, + expect(checkPrivileges).toBeCalledTimes(1); + expect(checkPrivileges.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + Object { + "kibana": Array [ + "rule-type-id-1/alerts/rule/get", + "rule-type-id-1/alerts/rule/create", + "rule-type-id-1/consumer-a/rule/get", + "rule-type-id-1/consumer-a/rule/create", + "rule-type-id-1/consumer-b/rule/get", + "rule-type-id-1/consumer-b/rule/create", + "rule-type-id-2/alerts/rule/get", + "rule-type-id-2/alerts/rule/create", + "rule-type-id-2/consumer-b/rule/get", + "rule-type-id-2/consumer-b/rule/create", + "rule-type-id-3/alerts/rule/get", + "rule-type-id-3/alerts/rule/create", + "rule-type-id-3/consumer-c/rule/get", + "rule-type-id-3/consumer-c/rule/create", + "rule-type-id-4/consumer-d/rule/get", + "rule-type-id-4/consumer-d/rule/create", + ], }, - }); - authorization.checkPrivilegesDynamicallyWithRequest.mockReset(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); - alertAuthorization = new AlertingAuthorization({ - request, - authorization, - ruleTypeRegistry, - features, - getSpace, - getSpaceId, - }); - }); + ] + `); + }); - describe('ensureAuthorized', () => { - test('should allow to create .esquery rule type with stackAlerts consumer', async () => { - await expect( - alertAuthorization.ensureAuthorized({ - ruleTypeId: '.esQuery', - consumer: 'stackAlerts', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }) - ).resolves.toEqual(undefined); + it('call checkPrivileges with the correct actions when the rule type does not exist in the registry', async () => { + ruleTypeRegistry.has.mockImplementation((ruleTypeId: string) => false); - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); - test('should allow to create .esquery rule type with discover consumer', async () => { - await expect( - alertAuthorization.ensureAuthorized({ - ruleTypeId: '.esQuery', - consumer: 'discover', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }) - ).resolves.toEqual(undefined); - - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); - test('should allow to create .esquery rule type with alerts consumer', async () => { - await expect( - alertAuthorization.ensureAuthorized({ - ruleTypeId: '.esQuery', - consumer: 'alerts', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }) - ).resolves.toEqual(undefined); - - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); - test('should throw an error to create .esquery rule type with logs consumer', async () => { - await expect( - alertAuthorization.ensureAuthorized({ - ruleTypeId: '.esQuery', - consumer: 'logs', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }) - ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Unauthorized by \\"logs\\" to create \\".esQuery\\" rule"` - ); - - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); - test('should throw an error to create .esquery rule type with infrastructure consumer', async () => { - await expect( - alertAuthorization.ensureAuthorized({ - ruleTypeId: '.esQuery', - consumer: 'infrastructure', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }) - ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Unauthorized by \\"infrastructure\\" to create \\".esQuery\\" rule"` - ); - - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); - test('should throw an error to create .threshold-rule-o11y rule type with alerts consumer', async () => { - await expect( - alertAuthorization.ensureAuthorized({ - ruleTypeId: '.threshold-rule-o11y', - consumer: 'alerts', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }) - ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Unauthorized by \\"alerts\\" to create \\".threshold-rule-o11y\\" rule"` - ); - - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); - test('should throw an error to create .logs-threshold-o11y rule type with alerts infrastructure', async () => { - await expect( - alertAuthorization.ensureAuthorized({ - ruleTypeId: '.logs-threshold-o11y', - consumer: 'alerts', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }) - ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Unauthorized by \\"alerts\\" to create \\".logs-threshold-o11y\\" rule"` - ); - - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + authorization: securityStart.authz, }); - test('creates a filter based on the privileged types', async () => { - const filter = ( - await alertAuthorization.getFindAuthorizationFilter(AlertingAuthorizationEntity.Rule, { - type: AlertingAuthorizationFilterType.KQL, - fieldNames: { - ruleTypeId: 'path.to.rule_type_id', - consumer: 'consumer-field', - }, - }) - ).filter; - expect(toKqlExpression(filter as KueryNode)).toMatchInlineSnapshot( - `"(path.to.rule_type_id: .esQuery AND (consumer-field: alerts OR consumer-field: discover OR consumer-field: stackAlerts))"` - ); + // @ts-expect-error: need to test the private method + await auth._getAuthorizedRuleTypesWithAuthorizedConsumers({ + ruleTypeIds: ['rule-type-id-1'], + operations: [ReadOperations.Get, WriteOperations.Create], + authorizationEntity: AlertingAuthorizationEntity.Rule, }); - }); - describe('user only access to o11y', () => { - beforeEach(() => { - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.mode.useRbacForRequest.mockReturnValue(true); - - features.getKibanaFeatures.mockReset(); - features.getKibanaFeatures.mockReturnValue([ - mockFeature('infrastructure', [ - '.infrastructure-threshold-o11y', - '.threshold-rule-o11y', - '.esQuery', - ]), - mockFeature('logs', ['.threshold-rule-o11y', '.esQuery', '.logs-threshold-o11y']), - ]); - checkPrivileges.mockReset(); - checkPrivileges.mockResolvedValue({ - username: 'onlyO11y', - hasAllRequested: true, - privileges: { - kibana: only011yKibanaPrivileges, + expect(checkPrivileges).toBeCalledTimes(1); + expect(checkPrivileges.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + Object { + "kibana": Array [], }, - }); - authorization.checkPrivilegesDynamicallyWithRequest.mockReset(); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); - alertAuthorization = new AlertingAuthorization({ - request, - authorization, - ruleTypeRegistry, - features, - getSpace, - getSpaceId, - }); - }); - - describe('ensureAuthorized', () => { - test('should throw an error to create .esquery rule type with stackAlerts consumer', async () => { - await expect( - alertAuthorization.ensureAuthorized({ - ruleTypeId: '.esQuery', - consumer: 'stackAlerts', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }) - ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Unauthorized by \\"stackAlerts\\" to create \\".esQuery\\" rule"` - ); - - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); - test('should throw an error to create .esquery rule type with discover consumer', async () => { - await expect( - alertAuthorization.ensureAuthorized({ - ruleTypeId: '.esQuery', - consumer: 'discover', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }) - ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Unauthorized by \\"discover\\" to create \\".esQuery\\" rule"` - ); - - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); - test('should throw an error to create .threshold-rule-o11y rule type with alerts consumer', async () => { - await expect( - alertAuthorization.ensureAuthorized({ - ruleTypeId: '.threshold-rule-o11y', - consumer: 'alerts', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }) - ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Unauthorized by \\"alerts\\" to create \\".threshold-rule-o11y\\" rule"` - ); - - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); - test('should allow to create .esquery rule type with logs consumer', async () => { - await expect( - alertAuthorization.ensureAuthorized({ - ruleTypeId: '.esQuery', - consumer: 'logs', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }) - ).resolves.toEqual(undefined); - - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); - test('should allow to create .esquery rule type with logs infrastructure', async () => { - await expect( - alertAuthorization.ensureAuthorized({ - ruleTypeId: '.esQuery', - consumer: 'infrastructure', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }) - ).resolves.toEqual(undefined); - - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); - test('should allow to create .logs-threshold-o11y rule type with alerts consumer', async () => { - await expect( - alertAuthorization.ensureAuthorized({ - ruleTypeId: '.logs-threshold-o11y', - consumer: 'alerts', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }) - ).resolves.toEqual(undefined); - - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); - test('should throw an error to create .threshold-rule-o11y rule type with logs consumer', async () => { - await expect( - alertAuthorization.ensureAuthorized({ - ruleTypeId: '.threshold-rule-o11y', - consumer: 'logs', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }) - ).resolves.toEqual(undefined); - - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); - }); - test('creates a filter based on the privileged types', async () => { - expect( - ( - await alertAuthorization.getFindAuthorizationFilter( - AlertingAuthorizationEntity.Rule, - { - type: AlertingAuthorizationFilterType.KQL, - fieldNames: { - ruleTypeId: 'path.to.rule_type_id', - consumer: 'consumer-field', - }, - }, - new Set(['infrastructure', 'logs']) - ) - ).filter - ).toEqual( - fromKueryExpression( - `(path.to.rule_type_id:.infrastructure-threshold-o11y and consumer-field:(infrastructure or alerts)) or (path.to.rule_type_id:.threshold-rule-o11y and consumer-field:(infrastructure or logs)) or (path.to.rule_type_id:.logs-threshold-o11y and consumer-field:(logs or alerts))` - ) - ); - }); + ] + `); }); - describe('user only access to logs and stackAlerts', () => { - beforeEach(() => { - const { authorization } = mockSecurity(); - const checkPrivileges: jest.MockedFunction< - ReturnType - > = jest.fn(); - authorization.mode.useRbacForRequest.mockReturnValue(true); - - features.getKibanaFeatures.mockClear(); - features.getKibanaFeatures.mockReturnValue([ - mockFeature('stackAlerts', ['.esQuery']), - mockFeature('logs', ['.logs-threshold-o11y', '.threshold-rule-o11y', '.esQuery']), - ]); - checkPrivileges.mockClear(); - checkPrivileges.mockResolvedValue({ - username: 'stackAndLogs', - hasAllRequested: true, - privileges: { - kibana: onlyLogsAndStackAlertsKibanaPrivileges, - }, - }); - authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); - alertAuthorization = new AlertingAuthorization({ - request, - authorization, - ruleTypeRegistry, - features, - getSpace, - getSpaceId, - }); - }); - - describe('ensureAuthorized', () => { - test('should allow to create .esquery rule type with stackAlerts consumer', async () => { - await expect( - alertAuthorization.ensureAuthorized({ - ruleTypeId: '.esQuery', - consumer: 'stackAlerts', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }) - ).resolves.toEqual(undefined); + it('call checkPrivileges with the correct actions when the rule type does not exist in the feature', async () => { + ruleTypeRegistry.has.mockImplementation((ruleTypeId: string) => true); - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); - test('should allow to create .esquery rule type with discover consumer', async () => { - await expect( - alertAuthorization.ensureAuthorized({ - ruleTypeId: '.esQuery', - consumer: 'discover', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }) - ).resolves.toEqual(undefined); - - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); - test('should allow to create .esquery rule type with logs consumer', async () => { - await expect( - alertAuthorization.ensureAuthorized({ - ruleTypeId: '.esQuery', - consumer: 'logs', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }) - ).resolves.toEqual(undefined); - - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); - test('should allow to create .logs-threshold-o11y rule type with alerts consumer', async () => { - await expect( - alertAuthorization.ensureAuthorized({ - ruleTypeId: '.logs-threshold-o11y', - consumer: 'alerts', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }) - ).resolves.toEqual(undefined); - - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); - test('should throw an error to create .threshold-rule-o11y rule type with logs consumer', async () => { - await expect( - alertAuthorization.ensureAuthorized({ - ruleTypeId: '.threshold-rule-o11y', - consumer: 'logs', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }) - ).resolves.toEqual(undefined); - - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); - test('should throw an error to create .esquery rule type with logs infrastructure', async () => { - await expect( - alertAuthorization.ensureAuthorized({ - ruleTypeId: '.esQuery', - consumer: 'infrastructure', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }) - ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Unauthorized by \\"infrastructure\\" to create \\".esQuery\\" rule"` - ); - - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); - test('should throw an error to create .threshold-rule-o11y rule type with alerts consumer', async () => { - await expect( - alertAuthorization.ensureAuthorized({ - ruleTypeId: '.threshold-rule-o11y', - consumer: 'alerts', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }) - ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Unauthorized by \\"alerts\\" to create \\".threshold-rule-o11y\\" rule"` - ); - - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); - test('should throw an error to create .esquery rule type with infrastructure consumer', async () => { - await expect( - alertAuthorization.ensureAuthorized({ - ruleTypeId: '.esQuery', - consumer: 'infrastructure', - operation: WriteOperations.Create, - entity: AlertingAuthorizationEntity.Rule, - }) - ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Unauthorized by \\"infrastructure\\" to create \\".esQuery\\" rule"` - ); - - expect(ruleTypeRegistry.get).toHaveBeenCalledTimes(1); - }); + const auth = await AlertingAuthorization.create({ + request, + ruleTypeRegistry, + getSpaceId, + features, + getSpace, + authorization: securityStart.authz, }); - test('creates a filter based on the privileged types', async () => { - const filter = ( - await alertAuthorization.getFindAuthorizationFilter(AlertingAuthorizationEntity.Rule, { - type: AlertingAuthorizationFilterType.KQL, - fieldNames: { - ruleTypeId: 'path.to.rule_type_id', - consumer: 'consumer-field', - }, - }) - ).filter; - - expect(toKqlExpression(filter as KueryNode)).toMatchInlineSnapshot( - `"((path.to.rule_type_id: .esQuery AND (consumer-field: alerts OR consumer-field: discover OR consumer-field: stackAlerts OR consumer-field: logs)) OR (path.to.rule_type_id: .logs-threshold-o11y AND (consumer-field: alerts OR consumer-field: discover OR consumer-field: stackAlerts OR consumer-field: logs)) OR (path.to.rule_type_id: .threshold-rule-o11y AND (consumer-field: alerts OR consumer-field: discover OR consumer-field: stackAlerts OR consumer-field: logs)))"` - ); + // @ts-expect-error: need to test the private method + await auth._getAuthorizedRuleTypesWithAuthorizedConsumers({ + ruleTypeIds: ['not-exist'], + operations: [ReadOperations.Get, WriteOperations.Create], + authorizationEntity: AlertingAuthorizationEntity.Rule, }); + + expect(checkPrivileges).toBeCalledTimes(1); + expect(checkPrivileges.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + Object { + "kibana": Array [], + }, + ] + `); }); }); }); diff --git a/x-pack/plugins/alerting/server/authorization/alerting_authorization.ts b/x-pack/plugins/alerting/server/authorization/alerting_authorization.ts index 6b24f2f5de9a4..a7e36590d2217 100644 --- a/x-pack/plugins/alerting/server/authorization/alerting_authorization.ts +++ b/x-pack/plugins/alerting/server/authorization/alerting_authorization.ts @@ -6,61 +6,20 @@ */ import Boom from '@hapi/boom'; -import { has, isEmpty } from 'lodash'; import { KibanaRequest } from '@kbn/core/server'; import { JsonObject } from '@kbn/utility-types'; import { KueryNode } from '@kbn/es-query'; -import { SecurityPluginSetup } from '@kbn/security-plugin/server'; +import { SecurityPluginStart } from '@kbn/security-plugin/server'; import { FeaturesPluginStart } from '@kbn/features-plugin/server'; import { Space } from '@kbn/spaces-plugin/server'; -import { STACK_ALERTS_FEATURE_ID } from '@kbn/rule-data-utils'; import { RegistryRuleType } from '../rule_type_registry'; -import { ALERTING_FEATURE_ID, RuleTypeRegistry } from '../types'; +import { RuleTypeRegistry } from '../types'; import { asFiltersByRuleTypeAndConsumer, asFiltersBySpaceId, AlertingAuthorizationFilterOpts, } from './alerting_authorization_kuery'; - -export enum AlertingAuthorizationEntity { - Rule = 'rule', - Alert = 'alert', -} - -export enum ReadOperations { - Get = 'get', - GetRuleState = 'getRuleState', - GetAlertSummary = 'getAlertSummary', - GetExecutionLog = 'getExecutionLog', - GetActionErrorLog = 'getActionErrorLog', - Find = 'find', - GetAuthorizedAlertsIndices = 'getAuthorizedAlertsIndices', - GetRuleExecutionKPI = 'getRuleExecutionKPI', - GetBackfill = 'getBackfill', - FindBackfill = 'findBackfill', -} - -export enum WriteOperations { - Create = 'create', - Delete = 'delete', - Update = 'update', - UpdateApiKey = 'updateApiKey', - Enable = 'enable', - Disable = 'disable', - MuteAll = 'muteAll', - UnmuteAll = 'unmuteAll', - MuteAlert = 'muteAlert', - UnmuteAlert = 'unmuteAlert', - Snooze = 'snooze', - BulkEdit = 'bulkEdit', - BulkDelete = 'bulkDelete', - BulkEnable = 'bulkEnable', - BulkDisable = 'bulkDisable', - Unsnooze = 'unsnooze', - RunSoon = 'runSoon', - ScheduleBackfill = 'scheduleBackfill', - DeleteBackfill = 'deleteBackfill', -} +import { ReadOperations, WriteOperations, AlertingAuthorizationEntity } from './types'; export interface EnsureAuthorizedOpts { ruleTypeId: string; @@ -74,75 +33,178 @@ interface HasPrivileges { read: boolean; all: boolean; } + type AuthorizedConsumers = Record; export interface RegistryAlertTypeWithAuth extends RegistryRuleType { authorizedConsumers: AuthorizedConsumers; } -type IsAuthorizedAtProducerLevel = boolean; -export interface ConstructorOptions { +export type AuthorizedRuleTypes = Map; + +export interface CreateOptions { ruleTypeRegistry: RuleTypeRegistry; request: KibanaRequest; features: FeaturesPluginStart; getSpace: (request: KibanaRequest) => Promise; getSpaceId: (request: KibanaRequest) => string | undefined; - authorization?: SecurityPluginSetup['authz']; + authorization?: SecurityPluginStart['authz']; +} + +type ConstructorOptions = Pick< + CreateOptions, + 'ruleTypeRegistry' | 'request' | 'authorization' | 'getSpaceId' +> & { + allRegisteredConsumers: Set; + ruleTypesConsumersMap: Map>; +}; + +interface GetAuthorizationFilterParams { + authorizationEntity: AlertingAuthorizationEntity; + filterOpts: AlertingAuthorizationFilterOpts; + operation: WriteOperations | ReadOperations; } -const DISCOVER_FEATURE_ID = 'discover'; +interface GetAuthorizedRuleTypesWithAuthorizedConsumersParams { + ruleTypeIds?: string[]; + operations: Array; + authorizationEntity: AlertingAuthorizationEntity; +} + +interface GetAllAuthorizedRuleTypesFindOperationParams { + authorizationEntity: AlertingAuthorizationEntity; + ruleTypeIds?: string[]; +} + +interface GetFindAuthorizationFilterParams { + authorizationEntity: AlertingAuthorizationEntity; + filterOpts: AlertingAuthorizationFilterOpts; +} + +interface GetAuthorizedRuleTypesParams { + ruleTypeIds?: string[]; + operations: Array; + authorizationEntity: AlertingAuthorizationEntity; +} + +interface GetAllAuthorizedRuleTypes { + operations: Array; + authorizationEntity: AlertingAuthorizationEntity; +} export class AlertingAuthorization { private readonly ruleTypeRegistry: RuleTypeRegistry; private readonly request: KibanaRequest; - private readonly authorization?: SecurityPluginSetup['authz']; - private readonly featuresIds: Promise>; - private readonly allPossibleConsumers: Promise; + private readonly authorization?: SecurityPluginStart['authz']; + private readonly allRegisteredConsumers: Set; + private readonly ruleTypesConsumersMap: Map>; private readonly spaceId: string | undefined; - private readonly features: FeaturesPluginStart; + constructor({ ruleTypeRegistry, request, authorization, - features, - getSpace, getSpaceId, + allRegisteredConsumers, + ruleTypesConsumersMap, }: ConstructorOptions) { this.request = request; this.authorization = authorization; this.ruleTypeRegistry = ruleTypeRegistry; - this.features = features; + this.allRegisteredConsumers = allRegisteredConsumers; + this.ruleTypesConsumersMap = ruleTypesConsumersMap; this.spaceId = getSpaceId(request); + } - this.featuresIds = getSpace(request) - .then((maybeSpace) => new Set(maybeSpace?.disabledFeatures ?? [])) - .then( - (disabledFeatures) => - new Set( - features - .getKibanaFeatures() - .filter( - ({ id, alerting }) => - // ignore features which are disabled in the user's space - !disabledFeatures.has(id) && - // ignore features which don't grant privileges to alerting - (alerting?.length ?? 0 > 0) - ) - .map((feature) => feature.id) - ) - ) - .catch(() => { - // failing to fetch the space means the user is likely not privileged in the - // active space at all, which means that their list of features should be empty - return new Set(); - }); + /** + * Creates an AlertingAuthorization object. + */ + static async create({ + request, + features, + getSpace, + getSpaceId, + authorization, + ruleTypeRegistry, + }: CreateOptions): Promise { + const allRegisteredConsumers = new Set(); + const ruleTypesConsumersMap = new Map>(); + let maybeSpace; + + try { + maybeSpace = await getSpace(request); + } catch (error) { + /** + * Failing to fetch the space with 403 or 404 means the user is likely not privileged in the active space at all + * which means that `allRegisteredConsumers` and `ruleTypesConsumersMap` should be empty. By initializing the alerting authorization + * with empty data structures we ensure that the user will not have access to any rule types in the active space. + * All other errors are treated as server errors and they are surfaced to the upper level. + */ + if (Boom.isBoom(error) && [403, 404].includes(error.output.statusCode)) { + return new AlertingAuthorization({ + request, + authorization, + getSpaceId, + ruleTypeRegistry, + allRegisteredConsumers, + ruleTypesConsumersMap, + }); + } + + if (Boom.isBoom(error)) { + throw error; + } - this.allPossibleConsumers = this.featuresIds.then((featuresIds) => { - return featuresIds.size - ? asAuthorizedConsumers([ALERTING_FEATURE_ID, DISCOVER_FEATURE_ID, ...featuresIds], { - read: true, - all: true, - }) - : {}; + throw new Error(`Failed to create AlertingAuthorization class: ${error}`); + } + + const disabledFeatures = new Set(maybeSpace?.disabledFeatures ?? []); + const featuresWithAlertingConfigured = features.getKibanaFeatures().filter( + ({ id, alerting }) => + // ignore features which are disabled in the user's space + !disabledFeatures.has(id) && + // ignore features which don't grant privileges to alerting + Boolean(alerting?.length) + ); + + /** + * Each feature configures a set of rule types. Each + * rule type configures its valid consumers. For example, + * + * { id: 'my-feature-id-1', alerting: [{ ruleTypeId: 'my-rule-type', consumers: ['consumer-a', 'consumer-b'] }] } + * { id: 'my-feature-id-2', alerting: [{ ruleTypeId: 'my-rule-type-2', consumers: ['consumer-a', 'consumer-d'] }] } + * + * In this loop we iterate over all features and we construct: + * a) a set that contains all registered consumers and + * b) a map that contains all valid consumers per rule type. + * We remove duplicates in the process. For example, + * + * allRegisteredConsumers: Set(1) { 'consumer-a', 'consumer-b', 'consumer-d' } + * ruleTypesConsumersMap: Map(1) { + * 'my-rule-type' => Set(1) { 'consumer-a', 'consumer-b' } + * 'my-rule-type-2' => Set(1) { 'consumer-a', 'consumer-d' } + * } + */ + for (const feature of featuresWithAlertingConfigured) { + if (feature.alerting) { + for (const entry of feature.alerting) { + const consumers = ruleTypesConsumersMap.get(entry.ruleTypeId) ?? new Set(); + + entry.consumers.forEach((consumer) => { + consumers.add(consumer); + allRegisteredConsumers.add(consumer); + }); + ruleTypesConsumersMap.set(entry.ruleTypeId, consumers); + } + } + } + + return new AlertingAuthorization({ + request, + authorization, + getSpaceId, + ruleTypeRegistry, + allRegisteredConsumers, + ruleTypesConsumersMap, }); } @@ -155,42 +217,30 @@ export class AlertingAuthorization { } /* - * This method exposes the private 'augmentRuleTypesWithAuthorization' to be + * This method exposes the private '_getAuthorizedRuleTypesWithAuthorizedConsumers' to be * used by the RAC/Alerts client */ - public async getAugmentedRuleTypesWithAuthorization( - featureIds: readonly string[], - operations: Array, - authorizationEntity: AlertingAuthorizationEntity - ): Promise<{ + public async getAllAuthorizedRuleTypes(params: GetAllAuthorizedRuleTypes): Promise<{ username?: string; hasAllRequested: boolean; - authorizedRuleTypes: Set; + authorizedRuleTypes: AuthorizedRuleTypes; }> { - return this.augmentRuleTypesWithAuthorization( - this.ruleTypeRegistry.list(), - operations, - authorizationEntity, - new Set(featureIds) - ); + return this._getAuthorizedRuleTypesWithAuthorizedConsumers({ + operations: params.operations, + authorizationEntity: params.authorizationEntity, + }); } public async ensureAuthorized({ ruleTypeId, - consumer: legacyConsumer, + consumer, operation, entity, additionalPrivileges = [], }: EnsureAuthorizedOpts) { const { authorization } = this; - const ruleType = this.ruleTypeRegistry.get(ruleTypeId); - const consumer = getValidConsumer({ - validLegacyConsumers: ruleType.validLegacyConsumers, - legacyConsumer, - producer: ruleType.producer, - }); - const isAvailableConsumer = has(await this.allPossibleConsumers, consumer); + const isAvailableConsumer = this.allRegisteredConsumers.has(consumer); if (authorization && this.shouldCheckAuthorization()) { const checkPrivileges = authorization.checkPrivilegesDynamicallyWithRequest(this.request); @@ -209,7 +259,7 @@ export class AlertingAuthorization { * as Privileged. * This check will ensure we don't accidentally let these through */ - throw Boom.forbidden(getUnauthorizedMessage(ruleTypeId, legacyConsumer, operation, entity)); + throw Boom.forbidden(getUnauthorizedMessage(ruleTypeId, consumer, operation, entity)); } if (!hasAllRequested) { @@ -220,274 +270,204 @@ export class AlertingAuthorization { } } - public async getFindAuthorizationFilter( - authorizationEntity: AlertingAuthorizationEntity, - filterOpts: AlertingAuthorizationFilterOpts, - featuresIds?: Set - ): Promise<{ + public async getFindAuthorizationFilter(params: GetFindAuthorizationFilterParams): Promise<{ filter?: KueryNode | JsonObject; ensureRuleTypeIsAuthorized: (ruleTypeId: string, consumer: string, auth: string) => void; }> { - return this.getAuthorizationFilter( - authorizationEntity, - filterOpts, - ReadOperations.Find, - featuresIds - ); + return this.getAuthorizationFilter({ + operation: ReadOperations.Find, + authorizationEntity: params.authorizationEntity, + filterOpts: params.filterOpts, + }); } - public async getAuthorizedRuleTypes( - authorizationEntity: AlertingAuthorizationEntity, - featuresIds?: Set - ): Promise { - const { authorizedRuleTypes } = await this.augmentRuleTypesWithAuthorization( - this.ruleTypeRegistry.list(), - [ReadOperations.Find], - authorizationEntity, - featuresIds - ); - return Array.from(authorizedRuleTypes); + public async getAllAuthorizedRuleTypesFindOperation( + params: GetAllAuthorizedRuleTypesFindOperationParams + ): Promise { + const { authorizedRuleTypes } = await this._getAuthorizedRuleTypesWithAuthorizedConsumers({ + ruleTypeIds: params.ruleTypeIds, + operations: [ReadOperations.Find], + authorizationEntity: params.authorizationEntity, + }); + + return authorizedRuleTypes; } - public async getAuthorizationFilter( - authorizationEntity: AlertingAuthorizationEntity, - filterOpts: AlertingAuthorizationFilterOpts, - operation: WriteOperations | ReadOperations, - featuresIds?: Set - ): Promise<{ + public async getAuthorizationFilter(params: GetAuthorizationFilterParams): Promise<{ filter?: KueryNode | JsonObject; ensureRuleTypeIsAuthorized: (ruleTypeId: string, consumer: string, auth: string) => void; }> { if (this.authorization && this.shouldCheckAuthorization()) { - const { authorizedRuleTypes } = await this.augmentRuleTypesWithAuthorization( - this.ruleTypeRegistry.list(), - [operation], - authorizationEntity, - featuresIds - ); + const { authorizedRuleTypes } = await this._getAuthorizedRuleTypesWithAuthorizedConsumers({ + operations: [params.operation], + authorizationEntity: params.authorizationEntity, + }); if (!authorizedRuleTypes.size) { - throw Boom.forbidden(`Unauthorized to find ${authorizationEntity}s for any rule types`); + throw Boom.forbidden( + `Unauthorized to ${params.operation} ${params.authorizationEntity}s for any rule types` + ); } - const authorizedRuleTypeIdsToConsumers = new Set( - [...authorizedRuleTypes].reduce((ruleTypeIdConsumerPairs, ruleType) => { - for (const consumer of Object.keys(ruleType.authorizedConsumers)) { - ruleTypeIdConsumerPairs.push(`${ruleType.id}/${consumer}/${authorizationEntity}`); - } - return ruleTypeIdConsumerPairs; - }, []) - ); - - const authorizedEntries: Map> = new Map(); return { filter: asFiltersByRuleTypeAndConsumer( authorizedRuleTypes, - filterOpts, + params.filterOpts, this.spaceId ) as JsonObject, ensureRuleTypeIsAuthorized: (ruleTypeId: string, consumer: string, authType: string) => { - if (!authorizedRuleTypeIdsToConsumers.has(`${ruleTypeId}/${consumer}/${authType}`)) { + if (!authorizedRuleTypes.has(ruleTypeId) || authType !== params.authorizationEntity) { + throw Boom.forbidden( + getUnauthorizedMessage(ruleTypeId, consumer, params.operation, authType) + ); + } + + const authorizedRuleType = authorizedRuleTypes.get(ruleTypeId)!; + const authorizedConsumers = authorizedRuleType.authorizedConsumers; + + if (!authorizedConsumers[consumer]) { throw Boom.forbidden( - getUnauthorizedMessage(ruleTypeId, consumer, 'find', authorizationEntity) + getUnauthorizedMessage( + ruleTypeId, + consumer, + params.operation, + params.authorizationEntity + ) ); - } else { - if (authorizedEntries.has(ruleTypeId)) { - authorizedEntries.get(ruleTypeId)!.add(consumer); - } else { - authorizedEntries.set(ruleTypeId, new Set([consumer])); - } } }, }; } return { - filter: asFiltersBySpaceId(filterOpts, this.spaceId) as JsonObject, + filter: asFiltersBySpaceId(params.filterOpts, this.spaceId) as JsonObject, ensureRuleTypeIsAuthorized: (ruleTypeId: string, consumer: string, authType: string) => {}, }; } - public async filterByRuleTypeAuthorization( - ruleTypes: Set, - operations: Array, - authorizationEntity: AlertingAuthorizationEntity - ): Promise> { - const { authorizedRuleTypes } = await this.augmentRuleTypesWithAuthorization( - ruleTypes, - operations, - authorizationEntity - ); + public async getAuthorizedRuleTypes( + params: GetAuthorizedRuleTypesParams + ): Promise { + const { authorizedRuleTypes } = await this._getAuthorizedRuleTypesWithAuthorizedConsumers({ + ruleTypeIds: params.ruleTypeIds, + operations: params.operations, + authorizationEntity: params.authorizationEntity, + }); + return authorizedRuleTypes; } - private async augmentRuleTypesWithAuthorization( - ruleTypes: Set, - operations: Array, - authorizationEntity: AlertingAuthorizationEntity, - featuresIds?: Set + private async _getAuthorizedRuleTypesWithAuthorizedConsumers( + params: GetAuthorizedRuleTypesWithAuthorizedConsumersParams ): Promise<{ username?: string; hasAllRequested: boolean; - authorizedRuleTypes: Set; + authorizedRuleTypes: Map; }> { - const fIds = new Set(featuresIds ?? (await this.featuresIds)); + const { operations, authorizationEntity } = params; + const ruleTypeIds = params.ruleTypeIds + ? new Set(params.ruleTypeIds) + : new Set(this.ruleTypeRegistry.getAllTypes()); - /** - * Temporary hack to fix issues with the discover consumer. - * Issue: https://github.com/elastic/kibana/issues/184595. - * PR https://github.com/elastic/kibana/pull/183756 will - * remove the hack and fix it in a generic way. - * - * The discover consumer should be authorized - * as the stackAlerts consumer. - */ - if (fIds.has(DISCOVER_FEATURE_ID)) { - fIds.delete(DISCOVER_FEATURE_ID); - fIds.add(STACK_ALERTS_FEATURE_ID); - } + const requiredPrivileges = new Map< + string, + { ruleTypeId: string; consumer: string; operation: ReadOperations | WriteOperations } + >(); if (this.authorization && this.shouldCheckAuthorization()) { + const authorizedRuleTypes = new Map(); + const checkPrivileges = this.authorization.checkPrivilegesDynamicallyWithRequest( this.request ); - // add an empty `authorizedConsumers` array on each ruleType - const ruleTypesWithAuthorization = Array.from( - this.augmentWithAuthorizedConsumers(ruleTypes, {}) - ); - const ruleTypesAuthorized: Map = new Map(); - // map from privilege to ruleType which we can refer back to when analyzing the result - // of checkPrivileges - const privilegeToRuleType = new Map< - string, - [RegistryAlertTypeWithAuth, string, HasPrivileges, IsAuthorizedAtProducerLevel] - >(); - const allPossibleConsumers = await this.allPossibleConsumers; - const addLegacyConsumerPrivileges = (legacyConsumer: string) => - legacyConsumer === ALERTING_FEATURE_ID || - legacyConsumer === DISCOVER_FEATURE_ID || - isEmpty(featuresIds); - - for (const feature of fIds) { - const featureDef = this.features - .getKibanaFeatures() - .find((kFeature) => kFeature.id === feature); - - for (const ruleTypeId of featureDef?.alerting ?? []) { - const ruleTypeAuth = ruleTypesWithAuthorization.find((rtwa) => rtwa.id === ruleTypeId); - if (ruleTypeAuth) { - if (!ruleTypesAuthorized.has(ruleTypeId)) { - ruleTypesAuthorized.set(ruleTypeId, ruleTypeAuth); - } - for (const operation of operations) { - privilegeToRuleType.set( - this.authorization!.actions.alerting.get( - ruleTypeId, - feature, - authorizationEntity, - operation - ), - [ - ruleTypeAuth, - feature, - hasPrivilegeByOperation(operation), - ruleTypeAuth.producer === feature, - ] - ); - // FUTURE ENGINEER - // We are just trying to add back the legacy consumers associated - // to the rule type to get back the privileges that was given at one point - if (!isEmpty(ruleTypeAuth.validLegacyConsumers)) { - ruleTypeAuth.validLegacyConsumers.forEach((legacyConsumer) => { - if (addLegacyConsumerPrivileges(legacyConsumer)) { - if (!allPossibleConsumers[legacyConsumer]) { - allPossibleConsumers[legacyConsumer] = { - read: true, - all: true, - }; - } - - privilegeToRuleType.set( - this.authorization!.actions.alerting.get( - ruleTypeId, - legacyConsumer, - authorizationEntity, - operation - ), - [ruleTypeAuth, legacyConsumer, hasPrivilegeByOperation(operation), false] - ); - } - }); + for (const ruleTypeId of ruleTypeIds) { + /** + * Skip if the ruleTypeId is not configured in any feature + * or it is not set in the rule type registry. + */ + if (!this.ruleTypesConsumersMap.has(ruleTypeId) || !this.ruleTypeRegistry.has(ruleTypeId)) { + continue; + } + + const ruleType = this.ruleTypeRegistry.get(ruleTypeId)!; + const ruleTypeConsumers = this.ruleTypesConsumersMap.get(ruleTypeId) ?? new Set(); + + for (const consumerToAuthorize of ruleTypeConsumers) { + for (const operation of operations) { + requiredPrivileges.set( + this.authorization.actions.alerting.get( + ruleTypeId, + consumerToAuthorize, + authorizationEntity, + operation + ), + { + ruleTypeId: ruleType.id, + consumer: consumerToAuthorize, + operation, } - } + ); } } } const { username, hasAllRequested, privileges } = await checkPrivileges({ - kibana: [...privilegeToRuleType.keys()], + kibana: [...requiredPrivileges.keys()], }); + for (const { authorized, privilege } of privileges.kibana) { + if (authorized && requiredPrivileges.has(privilege)) { + const { ruleTypeId, consumer, operation } = requiredPrivileges.get(privilege)!; + + const authorizedRuleType = authorizedRuleTypes.get(ruleTypeId) ?? { + authorizedConsumers: {}, + }; + + const authorizedConsumers = authorizedRuleType.authorizedConsumers; + const mergedOperations = mergeHasPrivileges( + getPrivilegesFromOperation(operation), + authorizedConsumers[consumer] + ); + + authorizedRuleTypes.set(ruleTypeId, { + authorizedConsumers: { + ...authorizedConsumers, + [consumer]: mergedOperations, + }, + }); + } + } + return { username, hasAllRequested, - authorizedRuleTypes: - hasAllRequested && featuresIds === undefined - ? // has access to all features - this.augmentWithAuthorizedConsumers( - new Set(ruleTypesAuthorized.values()), - allPossibleConsumers - ) - : // only has some of the required privileges - privileges.kibana.reduce((authorizedRuleTypes, { authorized, privilege }) => { - if (authorized && privilegeToRuleType.has(privilege)) { - const [ruleType, feature, hasPrivileges, isAuthorizedAtProducerLevel] = - privilegeToRuleType.get(privilege)!; - if (fIds.has(feature)) { - ruleType.authorizedConsumers[feature] = mergeHasPrivileges( - hasPrivileges, - ruleType.authorizedConsumers[feature] - ); - - if (isAuthorizedAtProducerLevel) { - // granting privileges under the producer automatically authorized the Rules Management UI as well - ruleType.validLegacyConsumers.forEach((legacyConsumer) => { - if (addLegacyConsumerPrivileges(legacyConsumer)) { - ruleType.authorizedConsumers[legacyConsumer] = mergeHasPrivileges( - hasPrivileges, - ruleType.authorizedConsumers[legacyConsumer] - ); - } - }); - } - authorizedRuleTypes.add(ruleType); - } - } - return authorizedRuleTypes; - }, new Set()), + authorizedRuleTypes, }; } else { return { hasAllRequested: true, - authorizedRuleTypes: this.augmentWithAuthorizedConsumers( - new Set([...ruleTypes].filter((ruleType) => fIds.has(ruleType.producer))), - await this.allPossibleConsumers - ), + authorizedRuleTypes: this.getRegisteredRuleTypesWithAllRegisteredConsumers(ruleTypeIds), }; } } - private augmentWithAuthorizedConsumers( - ruleTypes: Set, - authorizedConsumers: AuthorizedConsumers - ): Set { - return new Set( - Array.from(ruleTypes).map((ruleType) => ({ - ...ruleType, - authorizedConsumers: { ...authorizedConsumers }, - })) - ); + private getRegisteredRuleTypesWithAllRegisteredConsumers(ruleTypeIds: Set) { + const authorizedRuleTypes = new Map(); + const authorizedConsumers = getConsumersWithPrivileges(this.allRegisteredConsumers, { + all: true, + read: true, + }); + + Array.from(this.ruleTypesConsumersMap.keys()) + .filter((ruleTypeId) => ruleTypeIds.has(ruleTypeId)) + .forEach((ruleTypeId) => { + authorizedRuleTypes.set(ruleTypeId, { + authorizedConsumers, + }); + }); + + return authorizedRuleTypes; } } @@ -498,7 +478,7 @@ function mergeHasPrivileges(left: HasPrivileges, right?: HasPrivileges): HasPriv }; } -function hasPrivilegeByOperation(operation: ReadOperations | WriteOperations): HasPrivileges { +function getPrivilegesFromOperation(operation: ReadOperations | WriteOperations): HasPrivileges { const read = Object.values(ReadOperations).includes(operation as unknown as ReadOperations); const all = Object.values(WriteOperations).includes(operation as unknown as WriteOperations); return { @@ -507,34 +487,21 @@ function hasPrivilegeByOperation(operation: ReadOperations | WriteOperations): H }; } -function asAuthorizedConsumers( - consumers: string[], +function getConsumersWithPrivileges( + consumers: Set, hasPrivileges: HasPrivileges ): AuthorizedConsumers { - return consumers.reduce((acc, feature) => { + return Array.from(consumers).reduce((acc, feature) => { acc[feature] = hasPrivileges; return acc; }, {}); } function getUnauthorizedMessage( - alertTypeId: string, + ruleTypeId: string, scope: string, operation: string, entity: string ): string { - return `Unauthorized by "${scope}" to ${operation} "${alertTypeId}" ${entity}`; + return `Unauthorized by "${scope}" to ${operation} "${ruleTypeId}" ${entity}`; } - -export const getValidConsumer = ({ - validLegacyConsumers, - legacyConsumer, - producer, -}: { - validLegacyConsumers: string[]; - legacyConsumer: string; - producer: string; -}): string => - legacyConsumer === ALERTING_FEATURE_ID || validLegacyConsumers.includes(legacyConsumer) - ? producer - : legacyConsumer; diff --git a/x-pack/plugins/alerting/server/authorization/alerting_authorization_kuery.test.ts b/x-pack/plugins/alerting/server/authorization/alerting_authorization_kuery.test.ts index b433a95a77734..bcc2b37dca7dd 100644 --- a/x-pack/plugins/alerting/server/authorization/alerting_authorization_kuery.test.ts +++ b/x-pack/plugins/alerting/server/authorization/alerting_authorization_kuery.test.ts @@ -5,364 +5,258 @@ * 2.0. */ -import { RecoveredActionGroup } from '../../common'; import { AlertingAuthorizationFilterType, asFiltersByRuleTypeAndConsumer, ensureFieldIsSafeForQuery, asFiltersBySpaceId, } from './alerting_authorization_kuery'; -import { fromKueryExpression } from '@kbn/es-query'; +import { KueryNode, toKqlExpression } from '@kbn/es-query'; describe('asKqlFiltersByRuleTypeAndConsumer', () => { test('constructs KQL filter for single rule type with single authorized consumer', async () => { + const authorizedRuleTypes = new Map([ + [ + 'myAppAlertType', + { + authorizedConsumers: { + myApp: { read: true, all: true }, + }, + }, + ], + ]); + expect( - asFiltersByRuleTypeAndConsumer( - new Set([ + toKqlExpression( + asFiltersByRuleTypeAndConsumer( + authorizedRuleTypes, { - actionGroups: [], - defaultActionGroupId: 'default', - recoveryActionGroup: RecoveredActionGroup, - id: 'myAppAlertType', - name: 'myAppAlertType', - category: 'test', - producer: 'myApp', - minimumLicenseRequired: 'basic', - isExportable: true, - authorizedConsumers: { - myApp: { read: true, all: true }, + type: AlertingAuthorizationFilterType.KQL, + fieldNames: { + ruleTypeId: 'path.to.rule_type_id', + consumer: 'consumer-field', }, - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], - }, - ]), - { - type: AlertingAuthorizationFilterType.KQL, - fieldNames: { - ruleTypeId: 'path.to.rule_type_id', - consumer: 'consumer-field', }, - }, - 'space1' + 'space1' + ) as KueryNode ) - ).toEqual( - fromKueryExpression(`((path.to.rule_type_id:myAppAlertType and consumer-field:(myApp)))`) - ); + ).toMatchInlineSnapshot(`"(path.to.rule_type_id: myAppAlertType AND consumer-field: myApp)"`); }); test('constructs KQL filter for single rule type with multiple authorized consumers', async () => { + const authorizedRuleTypes = new Map([ + [ + 'myAppAlertType', + { + authorizedConsumers: { + alerts: { read: true, all: true }, + myApp: { read: true, all: true }, + myOtherApp: { read: true, all: true }, + }, + }, + ], + ]); + expect( - asFiltersByRuleTypeAndConsumer( - new Set([ + toKqlExpression( + asFiltersByRuleTypeAndConsumer( + authorizedRuleTypes, { - actionGroups: [], - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: 'myAppAlertType', - name: 'myAppAlertType', - category: 'test', - producer: 'myApp', - authorizedConsumers: { - alerts: { read: true, all: true }, - myApp: { read: true, all: true }, - myOtherApp: { read: true, all: true }, + type: AlertingAuthorizationFilterType.KQL, + fieldNames: { + ruleTypeId: 'path.to.rule_type_id', + consumer: 'consumer-field', }, - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], }, - ]), - { - type: AlertingAuthorizationFilterType.KQL, - fieldNames: { - ruleTypeId: 'path.to.rule_type_id', - consumer: 'consumer-field', - }, - }, - 'space1' - ) - ).toEqual( - fromKueryExpression( - `((path.to.rule_type_id:myAppAlertType and consumer-field:(alerts or myApp or myOtherApp)))` + 'space1' + ) as KueryNode ) + ).toMatchInlineSnapshot( + `"(path.to.rule_type_id: myAppAlertType AND (consumer-field: alerts OR consumer-field: myApp OR consumer-field: myOtherApp))"` ); }); test('constructs KQL filter for multiple rule types across authorized consumer', async () => { - expect( - asFiltersByRuleTypeAndConsumer( - new Set([ - { - actionGroups: [], - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: 'myAppAlertType', - name: 'myAppAlertType', - category: 'test', - producer: 'myApp', - authorizedConsumers: { - alerts: { read: true, all: true }, - myApp: { read: true, all: true }, - myOtherApp: { read: true, all: true }, - myAppWithSubFeature: { read: true, all: true }, - }, - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], + const authorizedRuleTypes = new Map([ + [ + 'myAppAlertType', + { + authorizedConsumers: { + alerts: { read: true, all: true }, + myApp: { read: true, all: true }, + myOtherApp: { read: true, all: true }, + myAppWithSubFeature: { read: true, all: true }, }, - { - actionGroups: [], - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: 'myOtherAppAlertType', - name: 'myOtherAppAlertType', - category: 'test', - producer: 'alerts', - authorizedConsumers: { - alerts: { read: true, all: true }, - myApp: { read: true, all: true }, - myOtherApp: { read: true, all: true }, - myAppWithSubFeature: { read: true, all: true }, - }, - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], + }, + ], + [ + 'myOtherAppAlertType', + { + authorizedConsumers: { + alerts: { read: true, all: true }, + myApp: { read: true, all: true }, + myOtherApp: { read: true, all: true }, + myAppWithSubFeature: { read: true, all: true }, }, + }, + ], + ]); + + expect( + toKqlExpression( + asFiltersByRuleTypeAndConsumer( + authorizedRuleTypes, { - actionGroups: [], - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: 'mySecondAppAlertType', - name: 'mySecondAppAlertType', - category: 'test', - producer: 'myApp', - authorizedConsumers: { - alerts: { read: true, all: true }, - myApp: { read: true, all: true }, - myOtherApp: { read: true, all: true }, - myAppWithSubFeature: { read: true, all: true }, + type: AlertingAuthorizationFilterType.KQL, + fieldNames: { + ruleTypeId: 'path.to.rule_type_id', + consumer: 'consumer-field', }, - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], }, - ]), - { - type: AlertingAuthorizationFilterType.KQL, - fieldNames: { - ruleTypeId: 'path.to.rule_type_id', - consumer: 'consumer-field', - }, - }, - 'space1' - ) - ).toEqual( - fromKueryExpression( - `((path.to.rule_type_id:myAppAlertType and consumer-field:(alerts or myApp or myOtherApp or myAppWithSubFeature)) or (path.to.rule_type_id:myOtherAppAlertType and consumer-field:(alerts or myApp or myOtherApp or myAppWithSubFeature)) or (path.to.rule_type_id:mySecondAppAlertType and consumer-field:(alerts or myApp or myOtherApp or myAppWithSubFeature)))` + 'space1' + ) as KueryNode ) + ).toMatchInlineSnapshot( + `"((path.to.rule_type_id: myAppAlertType AND (consumer-field: alerts OR consumer-field: myApp OR consumer-field: myOtherApp OR consumer-field: myAppWithSubFeature)) OR (path.to.rule_type_id: myOtherAppAlertType AND (consumer-field: alerts OR consumer-field: myApp OR consumer-field: myOtherApp OR consumer-field: myAppWithSubFeature)))"` ); }); test('constructs KQL filter with spaceId filter when spaceIds field path exists', async () => { - expect( - asFiltersByRuleTypeAndConsumer( - new Set([ - { - actionGroups: [], - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: 'myAppAlertType', - name: 'myAppAlertType', - category: 'test', - producer: 'myApp', - authorizedConsumers: { - alerts: { read: true, all: true }, - myApp: { read: true, all: true }, - myOtherApp: { read: true, all: true }, - myAppWithSubFeature: { read: true, all: true }, - }, - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], - }, - { - actionGroups: [], - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: 'myOtherAppAlertType', - name: 'myOtherAppAlertType', - category: 'test', - producer: 'alerts', - authorizedConsumers: { - alerts: { read: true, all: true }, - myApp: { read: true, all: true }, - myOtherApp: { read: true, all: true }, - myAppWithSubFeature: { read: true, all: true }, - }, - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], + const authorizedRuleTypes = new Map([ + [ + 'myAppAlertType', + { + authorizedConsumers: { + alerts: { read: true, all: true }, + myApp: { read: true, all: true }, + myOtherApp: { read: true, all: true }, + myAppWithSubFeature: { read: true, all: true }, }, - ]), + }, + ], + [ + 'myOtherAppAlertType', { - type: AlertingAuthorizationFilterType.KQL, - fieldNames: { - ruleTypeId: 'path.to.rule_type_id', - consumer: 'consumer-field', - spaceIds: 'path.to.spaceIds', + authorizedConsumers: { + alerts: { read: true, all: true }, + myApp: { read: true, all: true }, + myOtherApp: { read: true, all: true }, + myAppWithSubFeature: { read: true, all: true }, }, }, - 'space1' - ) - ).toEqual( - fromKueryExpression( - `((path.to.rule_type_id:myAppAlertType and consumer-field:(alerts or myApp or myOtherApp or myAppWithSubFeature) and path.to.spaceIds:space1) or (path.to.rule_type_id:myOtherAppAlertType and consumer-field:(alerts or myApp or myOtherApp or myAppWithSubFeature) and path.to.spaceIds:space1))` - ) - ); - }); + ], + ]); - test('constructs KQL filter without spaceId filter when spaceIds path is specified, but spaceId is undefined', async () => { expect( - asFiltersByRuleTypeAndConsumer( - new Set([ + toKqlExpression( + asFiltersByRuleTypeAndConsumer( + authorizedRuleTypes, { - actionGroups: [], - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: 'myAppAlertType', - name: 'myAppAlertType', - category: 'test', - producer: 'myApp', - authorizedConsumers: { - alerts: { read: true, all: true }, - myApp: { read: true, all: true }, - myOtherApp: { read: true, all: true }, - myAppWithSubFeature: { read: true, all: true }, + type: AlertingAuthorizationFilterType.KQL, + fieldNames: { + ruleTypeId: 'path.to.rule_type_id', + consumer: 'consumer-field', + spaceIds: 'path.to.spaceIds', }, - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], }, - { - actionGroups: [], - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: 'myOtherAppAlertType', - name: 'myOtherAppAlertType', - category: 'test', - producer: 'alerts', - authorizedConsumers: { - alerts: { read: true, all: true }, - myApp: { read: true, all: true }, - myOtherApp: { read: true, all: true }, - myAppWithSubFeature: { read: true, all: true }, - }, - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], + 'space1' + ) as KueryNode + ) + ).toMatchInlineSnapshot( + `"((path.to.rule_type_id: myAppAlertType AND (consumer-field: alerts OR consumer-field: myApp OR consumer-field: myOtherApp OR consumer-field: myAppWithSubFeature) AND path.to.spaceIds: space1) OR (path.to.rule_type_id: myOtherAppAlertType AND (consumer-field: alerts OR consumer-field: myApp OR consumer-field: myOtherApp OR consumer-field: myAppWithSubFeature) AND path.to.spaceIds: space1))"` + ); + }); + + test('constructs KQL filter without spaceId filter when spaceIds path is specified, but spaceId is undefined', async () => { + const authorizedRuleTypes = new Map([ + [ + 'myAppAlertType', + { + authorizedConsumers: { + alerts: { read: true, all: true }, + myApp: { read: true, all: true }, + myOtherApp: { read: true, all: true }, + myAppWithSubFeature: { read: true, all: true }, }, - ]), + }, + ], + [ + 'myOtherAppAlertType', { - type: AlertingAuthorizationFilterType.KQL, - fieldNames: { - ruleTypeId: 'path.to.rule_type_id', - consumer: 'consumer-field', - spaceIds: 'path.to.spaceIds', + authorizedConsumers: { + alerts: { read: true, all: true }, + myApp: { read: true, all: true }, + myOtherApp: { read: true, all: true }, + myAppWithSubFeature: { read: true, all: true }, }, }, - undefined - ) - ).toEqual( - fromKueryExpression( - `((path.to.rule_type_id:myAppAlertType and consumer-field:(alerts or myApp or myOtherApp or myAppWithSubFeature)) or (path.to.rule_type_id:myOtherAppAlertType and consumer-field:(alerts or myApp or myOtherApp or myAppWithSubFeature)))` + ], + ]); + + expect( + toKqlExpression( + asFiltersByRuleTypeAndConsumer( + authorizedRuleTypes, + { + type: AlertingAuthorizationFilterType.KQL, + fieldNames: { + ruleTypeId: 'path.to.rule_type_id', + consumer: 'consumer-field', + spaceIds: 'path.to.spaceIds', + }, + }, + undefined + ) as KueryNode ) + ).toMatchInlineSnapshot( + `"((path.to.rule_type_id: myAppAlertType AND (consumer-field: alerts OR consumer-field: myApp OR consumer-field: myOtherApp OR consumer-field: myAppWithSubFeature)) OR (path.to.rule_type_id: myOtherAppAlertType AND (consumer-field: alerts OR consumer-field: myApp OR consumer-field: myOtherApp OR consumer-field: myAppWithSubFeature)))"` ); }); test('constructs KQL filter for single rule type with no authorized consumer', async () => { - const result = asFiltersByRuleTypeAndConsumer( - new Set([ + const authorizedRuleTypes = new Map([ + [ + 'myAppAlertType', { - actionGroups: [], - defaultActionGroupId: 'default', - recoveryActionGroup: RecoveredActionGroup, - id: 'myAppAlertType', - name: 'myAppAlertType', - category: 'test', - producer: 'myApp', - minimumLicenseRequired: 'basic', - isExportable: true, authorizedConsumers: {}, - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], }, - ]), - { - type: AlertingAuthorizationFilterType.KQL, - fieldNames: { - ruleTypeId: 'path.to.rule_type_id', - consumer: 'consumer-field', + ], + ]); + + const result = toKqlExpression( + asFiltersByRuleTypeAndConsumer( + authorizedRuleTypes, + { + type: AlertingAuthorizationFilterType.KQL, + fieldNames: { + ruleTypeId: 'path.to.rule_type_id', + consumer: 'consumer-field', + }, }, - }, - 'space1' + 'space1' + ) as KueryNode ); - expect(result).toEqual(fromKueryExpression(`path.to.rule_type_id:myAppAlertType`)); + expect(result).toMatchInlineSnapshot(`"path.to.rule_type_id: myAppAlertType"`); }); }); describe('asEsDslFiltersByRuleTypeAndConsumer', () => { test('constructs ES DSL filter for single rule type with single authorized consumer', async () => { + const authorizedRuleTypes = new Map([ + [ + 'myAppAlertType', + { + authorizedConsumers: { + myApp: { read: true, all: true }, + }, + }, + ], + ]); + expect( asFiltersByRuleTypeAndConsumer( - new Set([ - { - actionGroups: [], - defaultActionGroupId: 'default', - recoveryActionGroup: RecoveredActionGroup, - id: 'myAppAlertType', - name: 'myAppAlertType', - category: 'test', - producer: 'myApp', - minimumLicenseRequired: 'basic', - isExportable: true, - authorizedConsumers: { - myApp: { read: true, all: true }, - }, - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], - }, - ]), + authorizedRuleTypes, { type: AlertingAuthorizationFilterType.ESDSL, fieldNames: { @@ -405,30 +299,22 @@ describe('asEsDslFiltersByRuleTypeAndConsumer', () => { }); test('constructs ES DSL filter for single rule type with multiple authorized consumers', async () => { + const authorizedRuleTypes = new Map([ + [ + 'myAppAlertType', + { + authorizedConsumers: { + alerts: { read: true, all: true }, + myApp: { read: true, all: true }, + myOtherApp: { read: true, all: true }, + }, + }, + ], + ]); + expect( asFiltersByRuleTypeAndConsumer( - new Set([ - { - actionGroups: [], - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: 'myAppAlertType', - name: 'myAppAlertType', - category: 'test', - producer: 'myApp', - authorizedConsumers: { - alerts: { read: true, all: true }, - myApp: { read: true, all: true }, - myOtherApp: { read: true, all: true }, - }, - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], - }, - ]), + authorizedRuleTypes, { type: AlertingAuthorizationFilterType.ESDSL, fieldNames: { @@ -478,73 +364,34 @@ describe('asEsDslFiltersByRuleTypeAndConsumer', () => { }); test('constructs ES DSL filter for multiple rule types across authorized consumer', async () => { - expect( - asFiltersByRuleTypeAndConsumer( - new Set([ - { - actionGroups: [], - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: 'myAppAlertType', - name: 'myAppAlertType', - category: 'test', - producer: 'myApp', - authorizedConsumers: { - alerts: { read: true, all: true }, - myApp: { read: true, all: true }, - myOtherApp: { read: true, all: true }, - myAppWithSubFeature: { read: true, all: true }, - }, - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], - }, - { - actionGroups: [], - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: 'myOtherAppAlertType', - name: 'myOtherAppAlertType', - category: 'test', - producer: 'alerts', - authorizedConsumers: { - alerts: { read: true, all: true }, - myApp: { read: true, all: true }, - myOtherApp: { read: true, all: true }, - myAppWithSubFeature: { read: true, all: true }, - }, - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], + const authorizedRuleTypes = new Map([ + [ + 'myAppAlertType', + { + authorizedConsumers: { + alerts: { read: true, all: true }, + myApp: { read: true, all: true }, + myOtherApp: { read: true, all: true }, + myAppWithSubFeature: { read: true, all: true }, }, - { - actionGroups: [], - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: 'mySecondAppAlertType', - name: 'mySecondAppAlertType', - category: 'test', - producer: 'myApp', - authorizedConsumers: { - alerts: { read: true, all: true }, - myApp: { read: true, all: true }, - myOtherApp: { read: true, all: true }, - myAppWithSubFeature: { read: true, all: true }, - }, - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], + }, + ], + [ + 'myOtherAppAlertType', + { + authorizedConsumers: { + alerts: { read: true, all: true }, + myApp: { read: true, all: true }, + myOtherApp: { read: true, all: true }, + myAppWithSubFeature: { read: true, all: true }, }, - ]), + }, + ], + ]); + + expect( + asFiltersByRuleTypeAndConsumer( + authorizedRuleTypes, { type: AlertingAuthorizationFilterType.ESDSL, fieldNames: { @@ -554,164 +401,175 @@ describe('asEsDslFiltersByRuleTypeAndConsumer', () => { }, 'space1' ) - ).toEqual({ - bool: { - should: [ - { - bool: { - filter: [ - { - bool: { - should: [{ match: { 'path.to.rule_type_id': 'myAppAlertType' } }], - minimum_should_match: 1, - }, - }, - { - bool: { - should: [ - { - bool: { - should: [{ match: { 'consumer-field': 'alerts' } }], - minimum_should_match: 1, - }, - }, - { - bool: { - should: [{ match: { 'consumer-field': 'myApp' } }], - minimum_should_match: 1, - }, - }, - { - bool: { - should: [{ match: { 'consumer-field': 'myOtherApp' } }], - minimum_should_match: 1, - }, - }, - { - bool: { - should: [{ match: { 'consumer-field': 'myAppWithSubFeature' } }], - minimum_should_match: 1, + ).toMatchInlineSnapshot(` + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "bool": Object { + "filter": Array [ + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "path.to.rule_type_id": "myAppAlertType", + }, }, - }, - ], - minimum_should_match: 1, - }, - }, - ], - }, - }, - { - bool: { - filter: [ - { - bool: { - should: [{ match: { 'path.to.rule_type_id': 'myOtherAppAlertType' } }], - minimum_should_match: 1, + ], + }, }, - }, - { - bool: { - should: [ - { - bool: { - should: [{ match: { 'consumer-field': 'alerts' } }], - minimum_should_match: 1, + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "consumer-field": "alerts", + }, + }, + ], + }, }, - }, - { - bool: { - should: [{ match: { 'consumer-field': 'myApp' } }], - minimum_should_match: 1, + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "consumer-field": "myApp", + }, + }, + ], + }, }, - }, - { - bool: { - should: [{ match: { 'consumer-field': 'myOtherApp' } }], - minimum_should_match: 1, + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "consumer-field": "myOtherApp", + }, + }, + ], + }, }, - }, - { - bool: { - should: [{ match: { 'consumer-field': 'myAppWithSubFeature' } }], - minimum_should_match: 1, + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "consumer-field": "myAppWithSubFeature", + }, + }, + ], + }, }, - }, - ], - minimum_should_match: 1, + ], + }, }, - }, - ], + ], + }, }, - }, - { - bool: { - filter: [ - { - bool: { - should: [{ match: { 'path.to.rule_type_id': 'mySecondAppAlertType' } }], - minimum_should_match: 1, + Object { + "bool": Object { + "filter": Array [ + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "path.to.rule_type_id": "myOtherAppAlertType", + }, + }, + ], + }, }, - }, - { - bool: { - should: [ - { - bool: { - should: [{ match: { 'consumer-field': 'alerts' } }], - minimum_should_match: 1, + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "consumer-field": "alerts", + }, + }, + ], + }, }, - }, - { - bool: { - should: [{ match: { 'consumer-field': 'myApp' } }], - minimum_should_match: 1, + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "consumer-field": "myApp", + }, + }, + ], + }, }, - }, - { - bool: { - should: [{ match: { 'consumer-field': 'myOtherApp' } }], - minimum_should_match: 1, + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "consumer-field": "myOtherApp", + }, + }, + ], + }, }, - }, - { - bool: { - should: [{ match: { 'consumer-field': 'myAppWithSubFeature' } }], - minimum_should_match: 1, + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "consumer-field": "myAppWithSubFeature", + }, + }, + ], + }, }, - }, - ], - minimum_should_match: 1, + ], + }, }, - }, - ], + ], + }, }, - }, - ], - minimum_should_match: 1, - }, - }); + ], + }, + } + `); }); test('constructs KQL filter for single rule type with no authorized consumer', async () => { - const result = asFiltersByRuleTypeAndConsumer( - new Set([ + const authorizedRuleTypes = new Map([ + [ + 'myAppAlertType', { - actionGroups: [], - defaultActionGroupId: 'default', - recoveryActionGroup: RecoveredActionGroup, - id: 'myAppAlertType', - name: 'myAppAlertType', - category: 'test', - producer: 'myApp', - minimumLicenseRequired: 'basic', - isExportable: true, authorizedConsumers: {}, - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], }, - ]), + ], + ]); + + const result = asFiltersByRuleTypeAndConsumer( + authorizedRuleTypes, { type: AlertingAuthorizationFilterType.ESDSL, fieldNames: { @@ -760,18 +618,20 @@ describe('asFiltersBySpaceId', () => { test('returns KQL filter of spaceId', () => { expect( - asFiltersBySpaceId( - { - type: AlertingAuthorizationFilterType.KQL, - fieldNames: { - ruleTypeId: 'path.to.rule_type_id', - consumer: 'consumer-field', - spaceIds: 'path.to.space.id', + toKqlExpression( + asFiltersBySpaceId( + { + type: AlertingAuthorizationFilterType.KQL, + fieldNames: { + ruleTypeId: 'path.to.rule_type_id', + consumer: 'consumer-field', + spaceIds: 'path.to.space.id', + }, }, - }, - 'space1' + 'space1' + ) as KueryNode ) - ).toEqual(fromKueryExpression('(path.to.space.id: space1)')); + ).toMatchInlineSnapshot(`"path.to.space.id: space1"`); }); test('returns undefined if no path to spaceIds is provided', () => { diff --git a/x-pack/plugins/alerting/server/authorization/alerting_authorization_kuery.ts b/x-pack/plugins/alerting/server/authorization/alerting_authorization_kuery.ts index 01e30dfb38327..666059c7a7b47 100644 --- a/x-pack/plugins/alerting/server/authorization/alerting_authorization_kuery.ts +++ b/x-pack/plugins/alerting/server/authorization/alerting_authorization_kuery.ts @@ -9,7 +9,7 @@ import { remove } from 'lodash'; import { EsQueryConfig, nodeBuilder, toElasticsearchQuery, KueryNode } from '@kbn/es-query'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { RegistryAlertTypeWithAuth } from './alerting_authorization'; +import { AuthorizedRuleTypes } from './alerting_authorization'; export enum AlertingAuthorizationFilterType { KQL = 'kql', @@ -35,36 +35,39 @@ const esQueryConfig: EsQueryConfig = { }; export function asFiltersByRuleTypeAndConsumer( - ruleTypes: Set, + ruleTypes: AuthorizedRuleTypes, opts: AlertingAuthorizationFilterOpts, spaceId: string | undefined ): KueryNode | estypes.QueryDslQueryContainer { const kueryNode = nodeBuilder.or( - Array.from(ruleTypes).reduce((filters, { id, authorizedConsumers }) => { - ensureFieldIsSafeForQuery('ruleTypeId', id); - - const andNodes: KueryNode[] = [nodeBuilder.is(opts.fieldNames.ruleTypeId, id)]; - - const authorizedConsumersKeys = Object.keys(authorizedConsumers); - if (authorizedConsumersKeys.length) { - andNodes.push( - nodeBuilder.or( - authorizedConsumersKeys.map((consumer) => { - ensureFieldIsSafeForQuery('consumer', consumer); - return nodeBuilder.is(opts.fieldNames.consumer, consumer); - }) - ) - ); - } - - if (opts.fieldNames.spaceIds != null && spaceId != null) { - andNodes.push(nodeBuilder.is(opts.fieldNames.spaceIds, spaceId)); - } - - filters.push(nodeBuilder.and(andNodes)); - - return filters; - }, []) + Array.from(ruleTypes.entries()).reduce( + (filters, [id, { authorizedConsumers }]) => { + ensureFieldIsSafeForQuery('ruleTypeId', id); + + const andNodes: KueryNode[] = [nodeBuilder.is(opts.fieldNames.ruleTypeId, id)]; + + const authorizedConsumersKeys = Object.keys(authorizedConsumers); + if (authorizedConsumersKeys.length) { + andNodes.push( + nodeBuilder.or( + authorizedConsumersKeys.map((consumer) => { + ensureFieldIsSafeForQuery('consumer', consumer); + return nodeBuilder.is(opts.fieldNames.consumer, consumer); + }) + ) + ); + } + + if (opts.fieldNames.spaceIds != null && spaceId != null) { + andNodes.push(nodeBuilder.is(opts.fieldNames.spaceIds, spaceId)); + } + + filters.push(nodeBuilder.and(andNodes)); + + return filters; + }, + [] + ) ); if (opts.type === AlertingAuthorizationFilterType.ESDSL) { diff --git a/x-pack/plugins/alerting/server/authorization/index.ts b/x-pack/plugins/alerting/server/authorization/index.ts index 17f0f9f22bbe1..e31dac301cbcb 100644 --- a/x-pack/plugins/alerting/server/authorization/index.ts +++ b/x-pack/plugins/alerting/server/authorization/index.ts @@ -7,3 +7,4 @@ export * from './alerting_authorization'; export * from './alerting_authorization_kuery'; +export * from './types'; diff --git a/x-pack/plugins/alerting/server/authorization/types.ts b/x-pack/plugins/alerting/server/authorization/types.ts new file mode 100644 index 0000000000000..77357456c74b6 --- /dev/null +++ b/x-pack/plugins/alerting/server/authorization/types.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. + */ + +export enum AlertingAuthorizationEntity { + Rule = 'rule', + Alert = 'alert', +} + +export enum ReadOperations { + Get = 'get', + GetRuleState = 'getRuleState', + GetAlertSummary = 'getAlertSummary', + GetExecutionLog = 'getExecutionLog', + GetActionErrorLog = 'getActionErrorLog', + Find = 'find', + GetAuthorizedAlertsIndices = 'getAuthorizedAlertsIndices', + GetRuleExecutionKPI = 'getRuleExecutionKPI', + GetBackfill = 'getBackfill', + FindBackfill = 'findBackfill', +} + +export enum WriteOperations { + Create = 'create', + Delete = 'delete', + Update = 'update', + UpdateApiKey = 'updateApiKey', + Enable = 'enable', + Disable = 'disable', + MuteAll = 'muteAll', + UnmuteAll = 'unmuteAll', + MuteAlert = 'muteAlert', + UnmuteAlert = 'unmuteAlert', + Snooze = 'snooze', + BulkEdit = 'bulkEdit', + BulkDelete = 'bulkDelete', + BulkEnable = 'bulkEnable', + BulkDisable = 'bulkDisable', + Unsnooze = 'unsnooze', + RunSoon = 'runSoon', + ScheduleBackfill = 'scheduleBackfill', + DeleteBackfill = 'deleteBackfill', +} diff --git a/x-pack/plugins/alerting/server/config.test.ts b/x-pack/plugins/alerting/server/config.test.ts index 4b84905a12a6e..0cb75cb6162ce 100644 --- a/x-pack/plugins/alerting/server/config.test.ts +++ b/x-pack/plugins/alerting/server/config.test.ts @@ -21,7 +21,6 @@ describe('config validation', () => { "interval": "5m", "removalDelay": "1h", }, - "maxEphemeralActionsPerAlert": 10, "rules": Object { "maxScheduledPerMinute": 32000, "minimumScheduleInterval": Object { diff --git a/x-pack/plugins/alerting/server/config.ts b/x-pack/plugins/alerting/server/config.ts index be7790cd81888..776576cce2993 100644 --- a/x-pack/plugins/alerting/server/config.ts +++ b/x-pack/plugins/alerting/server/config.ts @@ -60,7 +60,6 @@ const rulesSchema = schema.object({ }), }); -export const DEFAULT_MAX_EPHEMERAL_ACTIONS_PER_ALERT = 10; export const configSchema = schema.object({ healthCheck: schema.object({ interval: schema.string({ validate: validateDurationSchema, defaultValue: '60m' }), @@ -69,9 +68,7 @@ export const configSchema = schema.object({ interval: schema.string({ validate: validateDurationSchema, defaultValue: '5m' }), removalDelay: schema.string({ validate: validateDurationSchema, defaultValue: '1h' }), }), - maxEphemeralActionsPerAlert: schema.number({ - defaultValue: DEFAULT_MAX_EPHEMERAL_ACTIONS_PER_ALERT, - }), + maxEphemeralActionsPerAlert: schema.maybe(schema.number()), enableFrameworkAlerts: schema.boolean({ defaultValue: true }), cancelAlertsOnRuleTimeout: schema.boolean({ defaultValue: true }), rules: rulesSchema, diff --git a/x-pack/plugins/alerting/server/index.ts b/x-pack/plugins/alerting/server/index.ts index 2cb2c212a91ba..fc00d37e6ebc3 100644 --- a/x-pack/plugins/alerting/server/index.ts +++ b/x-pack/plugins/alerting/server/index.ts @@ -36,8 +36,7 @@ export type { export { DEFAULT_AAD_CONFIG } from './types'; export { RULE_SAVED_OBJECT_TYPE, API_KEY_PENDING_INVALIDATION_TYPE } from './saved_objects'; export { RuleNotifyWhen } from '../common'; -export { DEFAULT_MAX_EPHEMERAL_ACTIONS_PER_ALERT } from './config'; -export type { PluginSetupContract, PluginStartContract } from './plugin'; +export type { AlertingServerSetup, AlertingServerStart } from './plugin'; export type { FindResult, BulkEditOperation, BulkOperationError } from './rules_client'; export type { Rule } from './application/rule/types'; export type { PublicAlert as Alert } from './alert'; @@ -45,12 +44,13 @@ export { parseDuration, isRuleSnoozed } from './lib'; export { getEsErrorMessage } from './lib/errors'; export type { AlertingRulesConfig } from './config'; export { - ReadOperations, AlertingAuthorizationFilterType, AlertingAuthorization, + ReadOperations, WriteOperations, AlertingAuthorizationEntity, } from './authorization'; + export { DEFAULT_ALERTS_ILM_POLICY, DEFAULT_ALERTS_ILM_POLICY_NAME, @@ -84,9 +84,9 @@ export const config: PluginConfigDescriptor = { rules: { run: { alerts: { max: true } } }, }, deprecations: ({ renameFromRoot, deprecate }) => [ - deprecate('maxEphemeralActionsPerAlert', 'a future version', { + deprecate('maxEphemeralActionsPerAlert', '9.0.0', { level: 'warning', - message: `Configuring "xpack.alerting.maxEphemeralActionsPerAlert" is deprecated and will be removed in a future version. Remove this setting to increase action execution resiliency.`, + message: `The setting "xpack.alerting.maxEphemeralActionsPerAlert" is deprecated and currently ignored by the system. Please remove this setting.`, }), ], }; 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 082d5ea6381df..a206f4e058eed 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 @@ -1148,6 +1148,68 @@ describe('AlertingEventLogger', () => { expect(eventLogger.logEvent).toHaveBeenCalledWith(loggedEvent); }); + test('should set fields from backfill even when no rule data is provided', () => { + alertingEventLogger.initialize({ + context: backfillContext, + runDate, + type: executionType.BACKFILL, + }); + + alertingEventLogger.done({ + backfill: { + id: 'abc', + start: '2024-03-13T00:00:00.000Z', + interval: '1h', + }, + status: { + lastExecutionDate: new Date('2022-05-05T15:59:54.480Z'), + status: 'error', + error: { + reason: RuleExecutionStatusErrorReasons.Execute, + message: 'something went wrong', + }, + }, + }); + + const event = initializeExecuteBackfillRecord(backfillContextWithScheduleDelay, [adHocRunSO]); + const loggedEvent = { + ...event, + event: { + ...event?.event, + outcome: 'failure', + reason: RuleExecutionStatusErrorReasons.Execute, + }, + error: { + message: 'something went wrong', + }, + message: 'def: execution failed', + kibana: { + ...event.kibana, + alert: { + ...event.kibana?.alert, + rule: { + ...event.kibana?.alert?.rule, + execution: { + ...event.kibana?.alert?.rule?.execution, + backfill: { + id: 'abc', + start: '2024-03-13T00:00:00.000Z', + interval: '1h', + }, + }, + }, + }, + alerting: { + outcome: 'failure', + status: 'error', + }, + }, + }; + + expect(alertingEventLogger.getEvent()).toEqual(loggedEvent); + expect(eventLogger.logEvent).toHaveBeenCalledWith(loggedEvent); + }); + test('should set fields from execution metrics if provided', () => { alertingEventLogger.initialize({ context: ruleContext, runDate, ruleData }); alertingEventLogger.done({ diff --git a/x-pack/plugins/alerting/server/lib/alerting_event_logger/alerting_event_logger.ts b/x-pack/plugins/alerting/server/lib/alerting_event_logger/alerting_event_logger.ts index 1607f6090b10c..d344a8f2a240b 100644 --- a/x-pack/plugins/alerting/server/lib/alerting_event_logger/alerting_event_logger.ts +++ b/x-pack/plugins/alerting/server/lib/alerting_event_logger/alerting_event_logger.ts @@ -346,7 +346,7 @@ export class AlertingEventLogger { } public done({ status, metrics, timings, backfill }: DoneOpts) { - if (!this.isInitialized || !this.event || !this.context || !this.ruleData) { + if (!this.isInitialized || !this.event || !this.context) { throw new Error('AlertingEventLogger not initialized'); } @@ -360,16 +360,15 @@ export class AlertingEventLogger { updateEvent(this.event, { status: status.status }); if (status.error) { + const message = this.ruleData + ? `${this.ruleData.type?.id}:${this.context.savedObjectId}: execution failed` + : `${this.context.savedObjectId}: execution failed`; updateEvent(this.event, { outcome: 'failure', alertingOutcome: 'failure', reason: status.error?.reason || 'unknown', error: this.event?.error?.message || status.error.message, - ...(this.event.message && this.event.event?.outcome === 'failure' - ? {} - : { - message: `${this.ruleData.type?.id}:${this.context.savedObjectId}: execution failed`, - }), + ...(this.event.message && this.event.event?.outcome === 'failure' ? {} : { message }), }); } else { if (status.warning) { diff --git a/x-pack/plugins/alerting/server/mocks.ts b/x-pack/plugins/alerting/server/mocks.ts index 33cbccbaf8c0c..d885cf0721b4e 100644 --- a/x-pack/plugins/alerting/server/mocks.ts +++ b/x-pack/plugins/alerting/server/mocks.ts @@ -14,7 +14,7 @@ import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; import { searchSourceCommonMock } from '@kbn/data-plugin/common/search/search_source/mocks'; import { SharePluginStart } from '@kbn/share-plugin/server'; import { rulesClientMock } from './rules_client.mock'; -import { PluginSetupContract, PluginStartContract } from './plugin'; +import { AlertingServerSetup, AlertingServerStart } from './plugin'; import { Alert, AlertFactoryDoneUtils } from './alert'; import { AlertInstanceContext, @@ -27,7 +27,7 @@ import { publicAlertsClientMock } from './alerts_client/alerts_client.mock'; export { rulesClientMock }; const createSetupMock = () => { - const mock: jest.Mocked = { + const mock: jest.Mocked = { registerType: jest.fn(), getSecurityHealth: jest.fn(), getConfig: jest.fn(), @@ -57,7 +57,7 @@ const createShareStartMock = () => { }; const createStartMock = () => { - const mock: jest.Mocked = { + const mock: jest.Mocked = { listTypes: jest.fn(), getType: jest.fn(), getAllTypes: jest.fn(), diff --git a/x-pack/plugins/alerting/server/plugin.test.ts b/x-pack/plugins/alerting/server/plugin.test.ts index 37175ac960412..2938daf8b1ec3 100644 --- a/x-pack/plugins/alerting/server/plugin.test.ts +++ b/x-pack/plugins/alerting/server/plugin.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AlertingPlugin, PluginSetupContract } from './plugin'; +import { AlertingPlugin, AlertingServerSetup } from './plugin'; import { createUsageCollectionSetupMock } from '@kbn/usage-collection-plugin/server/mocks'; import { coreMock, statusServiceMock } from '@kbn/core/server/mocks'; import { licensingMock } from '@kbn/licensing-plugin/server/mocks'; @@ -170,7 +170,7 @@ describe('Alerting Plugin', () => { }); describe('registerType()', () => { - let setup: PluginSetupContract; + let setup: AlertingServerSetup; beforeEach(async () => { const context = coreMock.createPluginInitializerContext( generateAlertingConfig() @@ -209,7 +209,8 @@ describe('Alerting Plugin', () => { ...sampleRuleType, minimumLicenseRequired: 'basic', } as RuleType; - await setup.registerType(ruleType); + + setup.registerType(ruleType); expect(ruleType.ruleTaskTimeout).toBe('5m'); }); @@ -219,7 +220,7 @@ describe('Alerting Plugin', () => { minimumLicenseRequired: 'basic', ruleTaskTimeout: '20h', } as RuleType; - await setup.registerType(ruleType); + setup.registerType(ruleType); expect(ruleType.ruleTaskTimeout).toBe('20h'); }); @@ -228,7 +229,7 @@ describe('Alerting Plugin', () => { ...sampleRuleType, minimumLicenseRequired: 'basic', } as RuleType; - await setup.registerType(ruleType); + setup.registerType(ruleType); expect(ruleType.cancelAlertsOnRuleTimeout).toBe(true); }); @@ -238,13 +239,13 @@ describe('Alerting Plugin', () => { minimumLicenseRequired: 'basic', cancelAlertsOnRuleTimeout: false, } as RuleType; - await setup.registerType(ruleType); + setup.registerType(ruleType); expect(ruleType.cancelAlertsOnRuleTimeout).toBe(false); }); }); describe('registerConnectorAdapter()', () => { - let setup: PluginSetupContract; + let setup: AlertingServerSetup; beforeEach(async () => { const context = coreMock.createPluginInitializerContext( @@ -314,9 +315,9 @@ describe('Alerting Plugin', () => { }); expect(encryptedSavedObjectsSetup.canEncrypt).toEqual(false); - expect(() => + await expect(() => startContract.getRulesClientWithRequest({} as KibanaRequest) - ).toThrowErrorMatchingInlineSnapshot( + ).rejects.toThrowErrorMatchingInlineSnapshot( `"Unable to create alerts client because the Encrypted Saved Objects plugin is missing encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command."` ); }); @@ -380,7 +381,8 @@ describe('Alerting Plugin', () => { }, getSavedObjectsClient: jest.fn(), } as unknown as KibanaRequest; - startContract.getRulesClientWithRequest(fakeRequest); + + await startContract.getRulesClientWithRequest(fakeRequest); }); }); @@ -443,7 +445,8 @@ describe('Alerting Plugin', () => { }, getSavedObjectsClient: jest.fn(), } as unknown as KibanaRequest; - startContract.getAlertingAuthorizationWithRequest(fakeRequest); + + await startContract.getAlertingAuthorizationWithRequest(fakeRequest); }); }); }); diff --git a/x-pack/plugins/alerting/server/plugin.ts b/x-pack/plugins/alerting/server/plugin.ts index 9a12b13eb164c..9d1a15305f7e3 100644 --- a/x-pack/plugins/alerting/server/plugin.ts +++ b/x-pack/plugins/alerting/server/plugin.ts @@ -133,7 +133,7 @@ export const LEGACY_EVENT_LOG_ACTIONS = { resolvedInstance: 'resolved-instance', }; -export interface PluginSetupContract { +export interface AlertingServerSetup { registerConnectorAdapter< RuleActionParams extends ConnectorAdapterParams = ConnectorAdapterParams, ConnectorParams extends ConnectorAdapterParams = ConnectorAdapterParams @@ -168,19 +168,15 @@ export interface PluginSetupContract { getDataStreamAdapter: () => DataStreamAdapter; } -export interface PluginStartContract { +export interface AlertingServerStart { listTypes: RuleTypeRegistry['list']; - getAllTypes: RuleTypeRegistry['getAllTypes']; getType: RuleTypeRegistry['get']; getAlertIndicesAlias: GetAlertIndicesAlias; - - getRulesClientWithRequest(request: KibanaRequest): RulesClientApi; - + getRulesClientWithRequest(request: KibanaRequest): Promise; getAlertingAuthorizationWithRequest( request: KibanaRequest - ): PublicMethodsOf; - + ): Promise>; getFrameworkHealth: () => Promise; } @@ -260,7 +256,7 @@ export class AlertingPlugin { public setup( core: CoreSetup, plugins: AlertingPluginsSetup - ): PluginSetupContract { + ): AlertingServerSetup { this.kibanaBaseUrl = core.http.basePath.publicBaseUrl; this.licenseState = new LicenseState(plugins.licensing.license$); this.security = plugins.security; @@ -491,7 +487,7 @@ export class AlertingPlugin { }; } - public start(core: CoreStart, plugins: AlertingPluginsStart): PluginStartContract { + public start(core: CoreStart, plugins: AlertingPluginsStart): AlertingServerStart { const { isESOCanEncrypt, logger, @@ -518,7 +514,6 @@ export class AlertingPlugin { alertingAuthorizationClientFactory.initialize({ ruleTypeRegistry: ruleTypeRegistry!, - securityPluginSetup: security, securityPluginStart: plugins.security, async getSpace(request: KibanaRequest) { return plugins.spaces?.spacesService.getActiveSpace(request); @@ -572,7 +567,7 @@ export class AlertingPlugin { uiSettings: core.uiSettings, }); - const getRulesClientWithRequest = (request: KibanaRequest) => { + const getRulesClientWithRequest = async (request: KibanaRequest) => { if (isESOCanEncrypt !== true) { throw new Error( `Unable to create alerts client because the Encrypted Saved Objects plugin is missing encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.` @@ -581,7 +576,7 @@ export class AlertingPlugin { return rulesClientFactory!.create(request, core.savedObjects); }; - const getAlertingAuthorizationWithRequest = (request: KibanaRequest) => { + const getAlertingAuthorizationWithRequest = async (request: KibanaRequest) => { return alertingAuthorizationClientFactory!.create(request); }; @@ -615,7 +610,6 @@ export class AlertingPlugin { logger, }), maxAlerts: this.config.rules.run.alerts.max, - maxEphemeralActionsPerRule: this.config.maxEphemeralActionsPerAlert, ruleTypeRegistry: this.ruleTypeRegistry!, rulesSettingsService: new RulesSettingsService({ cacheInterval: this.config.rulesSettings.cacheInterval, @@ -626,18 +620,19 @@ export class AlertingPlugin { savedObjects: core.savedObjects, share: plugins.share, spaceIdToNamespace, - supportsEphemeralTasks: plugins.taskManager.supportsEphemeralTasks(), uiSettings: core.uiSettings, usageCounter: this.usageCounter, isServerless: this.isServerless, }); this.eventLogService!.registerSavedObjectProvider(RULE_SAVED_OBJECT_TYPE, (request) => { - const client = getRulesClientWithRequest(request); - return (objects?: SavedObjectsBulkGetObject[]) => - objects + return async (objects?: SavedObjectsBulkGetObject[]) => { + const client = await getRulesClientWithRequest(request); + + return objects ? Promise.all(objects.map(async (objectItem) => await client.get({ id: objectItem.id }))) : Promise.resolve([]); + }; }); this.eventLogService!.isEsContextReady() diff --git a/x-pack/plugins/alerting/server/routes/_mock_handler_arguments.ts b/x-pack/plugins/alerting/server/routes/_mock_handler_arguments.ts index b2f25d349ec7f..a24ea147d4113 100644 --- a/x-pack/plugins/alerting/server/routes/_mock_handler_arguments.ts +++ b/x-pack/plugins/alerting/server/routes/_mock_handler_arguments.ts @@ -59,7 +59,7 @@ export function mockHandlerArguments( alerting: { listTypes, getRulesClient() { - return rulesClient || rulesClientMock.create(); + return Promise.resolve(rulesClient || rulesClientMock.create()); }, getRulesSettingsClient() { return rulesSettingsClient || rulesSettingsClientMock.create(); diff --git a/x-pack/plugins/alerting/server/routes/backfill/apis/delete/delete_backfill_route.ts b/x-pack/plugins/alerting/server/routes/backfill/apis/delete/delete_backfill_route.ts index 6c343ac125188..66d90671ac1bd 100644 --- a/x-pack/plugins/alerting/server/routes/backfill/apis/delete/delete_backfill_route.ts +++ b/x-pack/plugins/alerting/server/routes/backfill/apis/delete/delete_backfill_route.ts @@ -29,7 +29,8 @@ export const deleteBackfillRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const params: DeleteBackfillRequestParamsV1 = req.params; await rulesClient.deleteBackfill(params.id); diff --git a/x-pack/plugins/alerting/server/routes/backfill/apis/find/find_backfill_route.ts b/x-pack/plugins/alerting/server/routes/backfill/apis/find/find_backfill_route.ts index fea2925c0983b..be1ff25ef5932 100644 --- a/x-pack/plugins/alerting/server/routes/backfill/apis/find/find_backfill_route.ts +++ b/x-pack/plugins/alerting/server/routes/backfill/apis/find/find_backfill_route.ts @@ -34,7 +34,8 @@ export const findBackfillRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const query: FindBackfillRequestQueryV1 = req.query; const result = await rulesClient.findBackfill(transformRequestV1(query)); diff --git a/x-pack/plugins/alerting/server/routes/backfill/apis/get/get_backfill_route.ts b/x-pack/plugins/alerting/server/routes/backfill/apis/get/get_backfill_route.ts index bfb178d875c8b..5758bb6ba805f 100644 --- a/x-pack/plugins/alerting/server/routes/backfill/apis/get/get_backfill_route.ts +++ b/x-pack/plugins/alerting/server/routes/backfill/apis/get/get_backfill_route.ts @@ -31,7 +31,8 @@ export const getBackfillRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const params: GetBackfillRequestParamsV1 = req.params; const result = await rulesClient.getBackfill(params.id); diff --git a/x-pack/plugins/alerting/server/routes/backfill/apis/schedule/schedule_backfill_route.ts b/x-pack/plugins/alerting/server/routes/backfill/apis/schedule/schedule_backfill_route.ts index 466c69b2b6aa5..77eb5c9355cfb 100644 --- a/x-pack/plugins/alerting/server/routes/backfill/apis/schedule/schedule_backfill_route.ts +++ b/x-pack/plugins/alerting/server/routes/backfill/apis/schedule/schedule_backfill_route.ts @@ -29,7 +29,8 @@ export const scheduleBackfillRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const body: ScheduleBackfillRequestBodyV1 = req.body; const result = await rulesClient.scheduleBackfill(transformRequestV1(body)); diff --git a/x-pack/plugins/alerting/server/routes/framework/apis/health/health.test.ts b/x-pack/plugins/alerting/server/routes/framework/apis/health/health.test.ts index f726073ed0844..83773ab8531b7 100644 --- a/x-pack/plugins/alerting/server/routes/framework/apis/health/health.test.ts +++ b/x-pack/plugins/alerting/server/routes/framework/apis/health/health.test.ts @@ -25,7 +25,7 @@ jest.mock('../../../../lib/license_api_access', () => ({ const alerting = alertsMock.createStart(); const currentDate = new Date().toISOString(); -const ruleTypes = [ +const ruleTypes: RegistryAlertTypeWithAuth[] = [ { id: '1', name: 'name', @@ -48,12 +48,11 @@ const ruleTypes = [ category: 'test', producer: 'test', enabledInLicense: true, - minimumScheduleInterval: '1m', defaultScheduleInterval: '10m', hasAlertsMappings: false, hasFieldsForAAD: false, validLegacyConsumers: [], - } as RegistryAlertTypeWithAuth, + }, ]; beforeEach(() => { @@ -76,7 +75,7 @@ beforeEach(() => { describe('healthRoute', () => { it('registers the route', async () => { - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set(ruleTypes)); + rulesClient.listRuleTypes.mockResolvedValueOnce(ruleTypes); const router = httpServiceMock.createRouter(); const licenseState = licenseStateMock.create(); @@ -89,7 +88,7 @@ describe('healthRoute', () => { }); it('queries the usage api', async () => { - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set(ruleTypes)); + rulesClient.listRuleTypes.mockResolvedValueOnce(ruleTypes); const router = httpServiceMock.createRouter(); const licenseState = licenseStateMock.create(); @@ -113,7 +112,7 @@ describe('healthRoute', () => { }); it('throws error when user does not have any access to any rule types', async () => { - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set()); + rulesClient.listRuleTypes.mockResolvedValueOnce([]); const router = httpServiceMock.createRouter(); const licenseState = licenseStateMock.create(); @@ -139,7 +138,7 @@ describe('healthRoute', () => { }); it('evaluates whether Encrypted Saved Objects is missing encryption key', async () => { - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set(ruleTypes)); + rulesClient.listRuleTypes.mockResolvedValueOnce(ruleTypes); const router = httpServiceMock.createRouter(); const licenseState = licenseStateMock.create(); @@ -180,7 +179,7 @@ describe('healthRoute', () => { }); test('when ES security status cannot be determined from license state, isSufficientlySecure should return false', async () => { - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set(ruleTypes)); + rulesClient.listRuleTypes.mockResolvedValueOnce(ruleTypes); const router = httpServiceMock.createRouter(); const licenseState = licenseStateMock.create(); const encryptedSavedObjects = encryptedSavedObjectsMock.createSetup({ canEncrypt: true }); @@ -222,7 +221,7 @@ describe('healthRoute', () => { }); test('when ES security is disabled, isSufficientlySecure should return true', async () => { - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set(ruleTypes)); + rulesClient.listRuleTypes.mockResolvedValueOnce(ruleTypes); const router = httpServiceMock.createRouter(); const licenseState = licenseStateMock.create(); const encryptedSavedObjects = encryptedSavedObjectsMock.createSetup({ canEncrypt: true }); @@ -264,7 +263,7 @@ describe('healthRoute', () => { }); test('when ES security is enabled but user cannot generate api keys, isSufficientlySecure should return false', async () => { - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set(ruleTypes)); + rulesClient.listRuleTypes.mockResolvedValueOnce(ruleTypes); const router = httpServiceMock.createRouter(); const licenseState = licenseStateMock.create(); const encryptedSavedObjects = encryptedSavedObjectsMock.createSetup({ canEncrypt: true }); @@ -306,7 +305,7 @@ describe('healthRoute', () => { }); test('when ES security is enabled and user can generate api keys, isSufficientlySecure should return true', async () => { - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set(ruleTypes)); + rulesClient.listRuleTypes.mockResolvedValueOnce(ruleTypes); const router = httpServiceMock.createRouter(); const licenseState = licenseStateMock.create(); const encryptedSavedObjects = encryptedSavedObjectsMock.createSetup({ canEncrypt: true }); diff --git a/x-pack/plugins/alerting/server/routes/framework/apis/health/health.ts b/x-pack/plugins/alerting/server/routes/framework/apis/health/health.ts index 34ef56a51daaa..4daf510b6a64f 100644 --- a/x-pack/plugins/alerting/server/routes/framework/apis/health/health.ts +++ b/x-pack/plugins/alerting/server/routes/framework/apis/health/health.ts @@ -48,8 +48,9 @@ export const healthRoute = ( verifyAccessAndContext(licenseState, async function (context, req, res) { try { const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); // Verify that user has access to at least one rule type - const ruleTypes = Array.from(await alertingContext.getRulesClient().listRuleTypes()); + const ruleTypes = Array.from(await rulesClient.listRuleTypes()); if (ruleTypes.length > 0) { const alertingFrameworkHealth = await alertingContext.getFrameworkHealth(); diff --git a/x-pack/plugins/alerting/server/routes/get_action_error_log.ts b/x-pack/plugins/alerting/server/routes/get_action_error_log.ts index 5da2189c1d43d..7406d07c3fa24 100644 --- a/x-pack/plugins/alerting/server/routes/get_action_error_log.ts +++ b/x-pack/plugins/alerting/server/routes/get_action_error_log.ts @@ -69,7 +69,8 @@ export const getActionErrorLogRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const { id } = req.params; const withAuth = req.query.with_auth; const rewrittenReq = rewriteReq({ id, ...req.query }); diff --git a/x-pack/plugins/alerting/server/routes/get_global_execution_kpi.ts b/x-pack/plugins/alerting/server/routes/get_global_execution_kpi.ts index 795b473dc8c66..48ea073369d2b 100644 --- a/x-pack/plugins/alerting/server/routes/get_global_execution_kpi.ts +++ b/x-pack/plugins/alerting/server/routes/get_global_execution_kpi.ts @@ -46,7 +46,8 @@ export const getGlobalExecutionKPIRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); return res.ok({ body: await rulesClient.getGlobalExecutionKpiWithAuth(rewriteReq(req.query)), }); diff --git a/x-pack/plugins/alerting/server/routes/get_global_execution_logs.ts b/x-pack/plugins/alerting/server/routes/get_global_execution_logs.ts index 9c9e09e81bd45..13ea133e21a82 100644 --- a/x-pack/plugins/alerting/server/routes/get_global_execution_logs.ts +++ b/x-pack/plugins/alerting/server/routes/get_global_execution_logs.ts @@ -71,7 +71,8 @@ export const getGlobalExecutionLogRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); return res.ok({ body: await rulesClient.getGlobalExecutionLogWithAuth(rewriteReq(req.query)), }); diff --git a/x-pack/plugins/alerting/server/routes/get_rule_alert_summary.ts b/x-pack/plugins/alerting/server/routes/get_rule_alert_summary.ts index 7eaf5d4645ecb..937db706199e2 100644 --- a/x-pack/plugins/alerting/server/routes/get_rule_alert_summary.ts +++ b/x-pack/plugins/alerting/server/routes/get_rule_alert_summary.ts @@ -75,7 +75,8 @@ export const getRuleAlertSummaryRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const { id } = req.params; const summary = await rulesClient.getAlertSummary(rewriteReq({ id, ...req.query })); return res.ok({ body: rewriteBodyRes(summary) }); diff --git a/x-pack/plugins/alerting/server/routes/get_rule_execution_kpi.ts b/x-pack/plugins/alerting/server/routes/get_rule_execution_kpi.ts index af15520d3c32f..302ac0293a444 100644 --- a/x-pack/plugins/alerting/server/routes/get_rule_execution_kpi.ts +++ b/x-pack/plugins/alerting/server/routes/get_rule_execution_kpi.ts @@ -48,7 +48,8 @@ export const getRuleExecutionKPIRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const { id } = req.params; return res.ok({ body: await rulesClient.getRuleExecutionKPI(rewriteReq({ id, ...req.query })), diff --git a/x-pack/plugins/alerting/server/routes/get_rule_execution_log.ts b/x-pack/plugins/alerting/server/routes/get_rule_execution_log.ts index 619bc82bd6378..4eccefd171f0e 100644 --- a/x-pack/plugins/alerting/server/routes/get_rule_execution_log.ts +++ b/x-pack/plugins/alerting/server/routes/get_rule_execution_log.ts @@ -73,7 +73,8 @@ export const getRuleExecutionLogRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const { id } = req.params; return res.ok({ body: await rulesClient.getExecutionLogForRule(rewriteReq({ id, ...req.query })), diff --git a/x-pack/plugins/alerting/server/routes/get_rule_state.ts b/x-pack/plugins/alerting/server/routes/get_rule_state.ts index 7530f1d4964cd..1a2b17b8f6747 100644 --- a/x-pack/plugins/alerting/server/routes/get_rule_state.ts +++ b/x-pack/plugins/alerting/server/routes/get_rule_state.ts @@ -47,7 +47,8 @@ export const getRuleStateRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const { id } = req.params; const state = await rulesClient.getAlertState({ id }); return state ? res.ok({ body: rewriteBodyRes(state) }) : res.noContent(); diff --git a/x-pack/plugins/alerting/server/routes/legacy/create.ts b/x-pack/plugins/alerting/server/routes/legacy/create.ts index 10c0fd2941068..8346ec37edf9c 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/create.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/create.ts @@ -84,7 +84,9 @@ export const createAlertRoute = ({ if (!context.alerting) { return res.badRequest({ body: 'RouteHandlerContext is not registered for alerting' }); } - const rulesClient = (await context.alerting).getRulesClient(); + + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const alert = req.body; const params = req.params; const notifyWhen = alert?.notifyWhen ? (alert.notifyWhen as RuleNotifyWhenType) : null; diff --git a/x-pack/plugins/alerting/server/routes/legacy/delete.ts b/x-pack/plugins/alerting/server/routes/legacy/delete.ts index a3ceb1ebccbba..738633c61f745 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/delete.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/delete.ts @@ -52,7 +52,8 @@ export const deleteAlertRoute = ( return res.badRequest({ body: 'RouteHandlerContext is not registered for alerting' }); } trackLegacyRouteUsage('delete', usageCounter); - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const { id } = req.params; await rulesClient.delete({ id }); return res.noContent(); diff --git a/x-pack/plugins/alerting/server/routes/legacy/disable.ts b/x-pack/plugins/alerting/server/routes/legacy/disable.ts index 1d2293b698e42..e69a176776e0c 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/disable.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/disable.ts @@ -53,7 +53,8 @@ export const disableAlertRoute = ( return res.badRequest({ body: 'RouteHandlerContext is not registered for alerting' }); } trackLegacyRouteUsage('disable', usageCounter); - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const { id } = req.params; try { await rulesClient.disableRule({ id }); diff --git a/x-pack/plugins/alerting/server/routes/legacy/enable.ts b/x-pack/plugins/alerting/server/routes/legacy/enable.ts index 8f680a23f89eb..289b4050e059b 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/enable.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/enable.ts @@ -55,7 +55,8 @@ export const enableAlertRoute = ( return res.badRequest({ body: 'RouteHandlerContext is not registered for alerting' }); } trackLegacyRouteUsage('enable', usageCounter); - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const { id } = req.params; try { await rulesClient.enableRule({ id }); diff --git a/x-pack/plugins/alerting/server/routes/legacy/find.ts b/x-pack/plugins/alerting/server/routes/legacy/find.ts index ef4f8a45bcc0f..de1e5f8c226a1 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/find.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/find.ts @@ -104,7 +104,8 @@ export const findAlertRoute = ( ) as string[], usageCounter ); - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const query = req.query; const renameMap = { diff --git a/x-pack/plugins/alerting/server/routes/legacy/get.ts b/x-pack/plugins/alerting/server/routes/legacy/get.ts index 08ecd410adc1f..19fc0f7ff49e6 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/get.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/get.ts @@ -52,7 +52,8 @@ export const getAlertRoute = ( return res.badRequest({ body: 'RouteHandlerContext is not registered for alerting' }); } trackLegacyRouteUsage('get', usageCounter); - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const { id } = req.params; const { systemActions, ...rule } = await rulesClient.get({ id, excludeFromPublicApi: true }); return res.ok({ diff --git a/x-pack/plugins/alerting/server/routes/legacy/get_alert_instance_summary.ts b/x-pack/plugins/alerting/server/routes/legacy/get_alert_instance_summary.ts index 58ab6a5446756..0e50601a1fd4d 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/get_alert_instance_summary.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/get_alert_instance_summary.ts @@ -61,7 +61,8 @@ export const getAlertInstanceSummaryRoute = ( return res.badRequest({ body: 'RouteHandlerContext is not registered for alerting' }); } trackLegacyRouteUsage('instanceSummary', usageCounter); - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const { id } = req.params; const { dateStart } = req.query; const summary = await rulesClient.getAlertSummary({ id, dateStart }); diff --git a/x-pack/plugins/alerting/server/routes/legacy/get_alert_state.ts b/x-pack/plugins/alerting/server/routes/legacy/get_alert_state.ts index ad3d9591c92c4..f9db44c1e9a0c 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/get_alert_state.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/get_alert_state.ts @@ -50,7 +50,8 @@ export const getAlertStateRoute = ( return res.badRequest({ body: 'RouteHandlerContext is not registered for alerting' }); } trackLegacyRouteUsage('state', usageCounter); - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const { id } = req.params; const state = await rulesClient.getAlertState({ id }); return state ? res.ok({ body: state }) : res.noContent(); diff --git a/x-pack/plugins/alerting/server/routes/legacy/health.test.ts b/x-pack/plugins/alerting/server/routes/legacy/health.test.ts index 64c994f9936b3..fea24b831e97d 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/health.test.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/health.test.ts @@ -84,7 +84,7 @@ describe('healthRoute', () => { const docLinks = docLinksServiceMock.createSetupContract(); it('registers the route', async () => { - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set(ruleTypes)); + rulesClient.listRuleTypes.mockResolvedValueOnce(ruleTypes); const router = httpServiceMock.createRouter(); const licenseState = licenseStateMock.create(); @@ -98,7 +98,7 @@ describe('healthRoute', () => { }); it('should have internal access for serverless', async () => { - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set(ruleTypes)); + rulesClient.listRuleTypes.mockResolvedValueOnce(ruleTypes); const router = httpServiceMock.createRouter(); const licenseState = licenseStateMock.create(); @@ -112,7 +112,7 @@ describe('healthRoute', () => { }); it('throws error when user does not have any access to any rule types', async () => { - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set()); + rulesClient.listRuleTypes.mockResolvedValueOnce([]); const router = httpServiceMock.createRouter(); const licenseState = licenseStateMock.create(); @@ -138,7 +138,7 @@ describe('healthRoute', () => { }); it('evaluates whether Encrypted Saved Objects is missing encryption key', async () => { - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set(ruleTypes)); + rulesClient.listRuleTypes.mockResolvedValueOnce(ruleTypes); const router = httpServiceMock.createRouter(); const licenseState = licenseStateMock.create(); @@ -195,7 +195,7 @@ describe('healthRoute', () => { }); test('when ES security status cannot be determined from license state, isSufficientlySecure should return false', async () => { - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set(ruleTypes)); + rulesClient.listRuleTypes.mockResolvedValueOnce(ruleTypes); const router = httpServiceMock.createRouter(); const licenseState = licenseStateMock.create(); const encryptedSavedObjects = encryptedSavedObjectsMock.createSetup({ canEncrypt: true }); @@ -253,7 +253,7 @@ describe('healthRoute', () => { }); test('when ES security is disabled, isSufficientlySecure should return true', async () => { - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set(ruleTypes)); + rulesClient.listRuleTypes.mockResolvedValueOnce(ruleTypes); const router = httpServiceMock.createRouter(); const licenseState = licenseStateMock.create(); const encryptedSavedObjects = encryptedSavedObjectsMock.createSetup({ canEncrypt: true }); @@ -311,7 +311,7 @@ describe('healthRoute', () => { }); test('when ES security is enabled but user cannot generate api keys, isSufficientlySecure should return false', async () => { - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set(ruleTypes)); + rulesClient.listRuleTypes.mockResolvedValueOnce(ruleTypes); const router = httpServiceMock.createRouter(); const licenseState = licenseStateMock.create(); const encryptedSavedObjects = encryptedSavedObjectsMock.createSetup({ canEncrypt: true }); @@ -369,7 +369,7 @@ describe('healthRoute', () => { }); test('when ES security is enabled and user can generate api keys, isSufficientlySecure should return true', async () => { - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set(ruleTypes)); + rulesClient.listRuleTypes.mockResolvedValueOnce(ruleTypes); const router = httpServiceMock.createRouter(); const licenseState = licenseStateMock.create(); const encryptedSavedObjects = encryptedSavedObjectsMock.createSetup({ canEncrypt: true }); @@ -427,7 +427,7 @@ describe('healthRoute', () => { }); it('should track every call', async () => { - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set(ruleTypes)); + rulesClient.listRuleTypes.mockResolvedValueOnce(ruleTypes); const licenseState = licenseStateMock.create(); const router = httpServiceMock.createRouter(); const encryptedSavedObjects = encryptedSavedObjectsMock.createSetup({ canEncrypt: true }); @@ -444,7 +444,7 @@ describe('healthRoute', () => { }); it('should be deprecated', async () => { - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set(ruleTypes)); + rulesClient.listRuleTypes.mockResolvedValueOnce(ruleTypes); const router = httpServiceMock.createRouter(); const licenseState = licenseStateMock.create(); diff --git a/x-pack/plugins/alerting/server/routes/legacy/health.ts b/x-pack/plugins/alerting/server/routes/legacy/health.ts index 223859124072b..b463298837f4e 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/health.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/health.ts @@ -50,8 +50,9 @@ export function healthRoute( trackLegacyRouteUsage('health', usageCounter); try { const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); // Verify that user has access to at least one rule type - const ruleTypes = Array.from(await alertingContext.getRulesClient().listRuleTypes()); + const ruleTypes = Array.from(await rulesClient.listRuleTypes()); if (ruleTypes.length > 0) { const alertingFrameworkHealth = await alertingContext.getFrameworkHealth(); diff --git a/x-pack/plugins/alerting/server/routes/legacy/list_alert_types.test.ts b/x-pack/plugins/alerting/server/routes/legacy/list_alert_types.test.ts index 3c1be0410f586..27e9d7ce44865 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/list_alert_types.test.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/list_alert_types.test.ts @@ -44,7 +44,7 @@ describe('listAlertTypesRoute', () => { expect(config.path).toMatchInlineSnapshot(`"/api/alerts/list_alert_types"`); expect(config.options?.access).toBe('public'); - const listTypes = [ + const listTypes: RegistryAlertTypeWithAuth[] = [ { id: '1', name: 'name', @@ -69,9 +69,10 @@ describe('listAlertTypesRoute', () => { hasAlertsMappings: false, hasFieldsForAAD: false, validLegacyConsumers: [], - } as RegistryAlertTypeWithAuth, + }, ]; - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set(listTypes)); + + rulesClient.listRuleTypes.mockResolvedValueOnce(listTypes); const [context, req, res] = mockHandlerArguments({ rulesClient }, {}, ['ok']); @@ -167,7 +168,7 @@ describe('listAlertTypesRoute', () => { } as RegistryAlertTypeWithAuth, ]; - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set(listTypes)); + rulesClient.listRuleTypes.mockResolvedValueOnce(listTypes); const [context, req, res] = mockHandlerArguments( { rulesClient }, @@ -224,7 +225,7 @@ describe('listAlertTypesRoute', () => { } as RegistryAlertTypeWithAuth, ]; - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set(listTypes)); + rulesClient.listRuleTypes.mockResolvedValueOnce(listTypes); const [context, req, res] = mockHandlerArguments( { rulesClient }, @@ -245,7 +246,7 @@ describe('listAlertTypesRoute', () => { const mockUsageCountersSetup = usageCountersServiceMock.createSetupContract(); const mockUsageCounter = mockUsageCountersSetup.createUsageCounter('test'); - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set([])); + rulesClient.listRuleTypes.mockResolvedValueOnce([]); listAlertTypesRoute(router, licenseState, docLinks, mockUsageCounter); const [, handler] = router.get.mock.calls[0]; diff --git a/x-pack/plugins/alerting/server/routes/legacy/list_alert_types.ts b/x-pack/plugins/alerting/server/routes/legacy/list_alert_types.ts index ad0f470ae9235..f4f2bc7936b3d 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/list_alert_types.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/list_alert_types.ts @@ -45,8 +45,10 @@ export const listAlertTypesRoute = ( } trackLegacyRouteUsage('listAlertTypes', usageCounter); const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); + return res.ok({ - body: Array.from(await alertingContext.getRulesClient().listRuleTypes()), + body: Array.from(await rulesClient.listRuleTypes()), }); }) ); diff --git a/x-pack/plugins/alerting/server/routes/legacy/mute_all.ts b/x-pack/plugins/alerting/server/routes/legacy/mute_all.ts index f7cb03a81dcb2..75c860167f21c 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/mute_all.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/mute_all.ts @@ -53,7 +53,8 @@ export const muteAllAlertRoute = ( return res.badRequest({ body: 'RouteHandlerContext is not registered for alerting' }); } trackLegacyRouteUsage('muteAll', usageCounter); - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const { id } = req.params; try { await rulesClient.muteAll({ id }); diff --git a/x-pack/plugins/alerting/server/routes/legacy/mute_instance.ts b/x-pack/plugins/alerting/server/routes/legacy/mute_instance.ts index a8e70ba707b78..23225c387ccaa 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/mute_instance.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/mute_instance.ts @@ -58,7 +58,8 @@ export const muteAlertInstanceRoute = ( trackLegacyRouteUsage('muteInstance', usageCounter); - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const renameMap = { alert_id: 'alertId', diff --git a/x-pack/plugins/alerting/server/routes/legacy/unmute_all.ts b/x-pack/plugins/alerting/server/routes/legacy/unmute_all.ts index bde7bea430fa5..2684ea60d7336 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/unmute_all.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/unmute_all.ts @@ -53,7 +53,8 @@ export const unmuteAllAlertRoute = ( return res.badRequest({ body: 'RouteHandlerContext is not registered for alerting' }); } trackLegacyRouteUsage('unmuteAll', usageCounter); - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const { id } = req.params; try { await rulesClient.unmuteAll({ id }); diff --git a/x-pack/plugins/alerting/server/routes/legacy/unmute_instance.ts b/x-pack/plugins/alerting/server/routes/legacy/unmute_instance.ts index 91774b0df7ac8..e6122a92509b0 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/unmute_instance.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/unmute_instance.ts @@ -54,7 +54,8 @@ export const unmuteAlertInstanceRoute = ( return res.badRequest({ body: 'RouteHandlerContext is not registered for alerting' }); } trackLegacyRouteUsage('unmuteInstance', usageCounter); - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const { alertId, alertInstanceId } = req.params; try { await rulesClient.unmuteInstance({ alertId, alertInstanceId }); diff --git a/x-pack/plugins/alerting/server/routes/legacy/update.ts b/x-pack/plugins/alerting/server/routes/legacy/update.ts index 04f54738e9608..3e3d3b5a480f0 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/update.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/update.ts @@ -81,7 +81,8 @@ export const updateAlertRoute = ( return res.badRequest({ body: 'RouteHandlerContext is not registered for alerting' }); } trackLegacyRouteUsage('update', usageCounter); - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const { id } = req.params; const { name, actions, params, schedule, tags, throttle, notifyWhen } = req.body; try { diff --git a/x-pack/plugins/alerting/server/routes/legacy/update_api_key.ts b/x-pack/plugins/alerting/server/routes/legacy/update_api_key.ts index 0a3b62ebed368..603a321768573 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/update_api_key.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/update_api_key.ts @@ -55,7 +55,8 @@ export const updateApiKeyRoute = ( return res.badRequest({ body: 'RouteHandlerContext is not registered for alerting' }); } trackLegacyRouteUsage('updateApiKey', usageCounter); - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const { id } = req.params; try { await rulesClient.updateRuleApiKey({ id }); diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/aggregate/aggregate_rules_route.test.ts b/x-pack/plugins/alerting/server/routes/rule/apis/aggregate/aggregate_rules_route.test.ts index 77221de2d714b..74a94cbba80a1 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/aggregate/aggregate_rules_route.test.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/aggregate/aggregate_rules_route.test.ts @@ -145,6 +145,7 @@ describe('aggregateRulesRoute', () => { { body: { default_search_operator: 'AND', + rule_type_ids: ['foo'], }, }, ['ok'] @@ -237,6 +238,9 @@ describe('aggregateRulesRoute', () => { }, "options": Object { "defaultSearchOperator": "AND", + "ruleTypeIds": Array [ + "foo", + ], }, }, ] diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/aggregate/aggregate_rules_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/aggregate/aggregate_rules_route.ts index 9b595858793f8..05c5fc2167e11 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/aggregate/aggregate_rules_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/aggregate/aggregate_rules_route.ts @@ -37,7 +37,8 @@ export const aggregateRulesRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const body: AggregateRulesRequestBodyV1 = req.body; const options = transformAggregateQueryRequestV1({ ...body, diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/aggregate/transforms/transform_aggregate_query_request/v1.ts b/x-pack/plugins/alerting/server/routes/rule/apis/aggregate/transforms/transform_aggregate_query_request/v1.ts index baa6b9bb46f9c..ae13f08d0afa5 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/aggregate/transforms/transform_aggregate_query_request/v1.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/aggregate/transforms/transform_aggregate_query_request/v1.ts @@ -13,13 +13,15 @@ export const transformAggregateQueryRequest: RewriteRequestCase ({ defaultSearchOperator, ...(hasReference ? { hasReference } : {}), ...(searchFields ? { searchFields } : {}), ...(search ? { search } : {}), - ...(filterConsumers ? { filterConsumers } : {}), + ...(ruleTypeIds ? { ruleTypeIds } : {}), + ...(consumers ? { consumers } : {}), ...(filter ? { filter } : {}), }); diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/bulk_delete/bulk_delete_rules_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/bulk_delete/bulk_delete_rules_route.ts index 8bd6f7fc19916..8548464d44812 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/bulk_delete/bulk_delete_rules_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/bulk_delete/bulk_delete_rules_route.ts @@ -36,7 +36,8 @@ export const bulkDeleteRulesRoute = ({ handleDisabledApiKeysError( router.handleLegacyErrors( verifyAccessAndContext(licenseState, async (context, req, res) => { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const body: BulkDeleteRulesRequestBodyV1 = req.body; const { filter, ids } = body; diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/bulk_disable/bulk_disable_rules_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/bulk_disable/bulk_disable_rules_route.ts index 724eda3ae7b87..315904efa40a7 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/bulk_disable/bulk_disable_rules_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/bulk_disable/bulk_disable_rules_route.ts @@ -37,7 +37,8 @@ export const bulkDisableRulesRoute = ({ handleDisabledApiKeysError( router.handleLegacyErrors( verifyAccessAndContext(licenseState, async (context, req, res) => { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const body: BulkDisableRulesRequestBodyV1 = req.body; const { filter, ids, untrack } = body; diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/bulk_edit/bulk_edit_rules_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/bulk_edit/bulk_edit_rules_route.ts index 4c853beeec250..f516b63031aad 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/bulk_edit/bulk_edit_rules_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/bulk_edit/bulk_edit_rules_route.ts @@ -41,7 +41,8 @@ const buildBulkEditRulesRoute = ({ licenseState, path, router }: BuildBulkEditRu handleDisabledApiKeysError( router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const actionsClient = (await context.actions).getActionsClient(); const bulkEditData: BulkEditRulesRequestBodyV1 = req.body; diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/bulk_enable/bulk_enable_rules_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/bulk_enable/bulk_enable_rules_route.ts index da97949fd0feb..71932cb6d78bb 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/bulk_enable/bulk_enable_rules_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/bulk_enable/bulk_enable_rules_route.ts @@ -35,7 +35,8 @@ export const bulkEnableRulesRoute = ({ handleDisabledApiKeysError( router.handleLegacyErrors( verifyAccessAndContext(licenseState, async (context, req, res) => { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const body: BulkEnableRulesRequestBodyV1 = req.body; try { diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/bulk_untrack/bulk_untrack_alerts_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/bulk_untrack/bulk_untrack_alerts_route.ts index 622218705b510..a43cc48d95631 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/bulk_untrack/bulk_untrack_alerts_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/bulk_untrack/bulk_untrack_alerts_route.ts @@ -28,7 +28,8 @@ export const bulkUntrackAlertsRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const body: BulkUntrackRequestBodyV1 = req.body; try { await rulesClient.bulkUntrackAlerts({ diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/bulk_untrack_by_query/bulk_untrack_alerts_by_query_route.test.ts b/x-pack/plugins/alerting/server/routes/rule/apis/bulk_untrack_by_query/bulk_untrack_alerts_by_query_route.test.ts index 3486005d3b588..ebaab0cb98402 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/bulk_untrack_by_query/bulk_untrack_alerts_by_query_route.test.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/bulk_untrack_by_query/bulk_untrack_alerts_by_query_route.test.ts @@ -45,7 +45,7 @@ describe('bulkUntrackAlertsByQueryRoute', () => { }, }, ], - feature_ids: ['o11y'], + rule_type_ids: ['o11y'], }; const [context, req, res] = mockHandlerArguments( @@ -62,7 +62,7 @@ describe('bulkUntrackAlertsByQueryRoute', () => { expect(rulesClient.bulkUntrackAlerts.mock.calls[0]).toEqual([ { query: requestBody.query, - featureIds: requestBody.feature_ids, + ruleTypeIds: requestBody.rule_type_ids, isUsingQuery: true, }, ]); diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/bulk_untrack_by_query/bulk_untrack_alerts_by_query_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/bulk_untrack_by_query/bulk_untrack_alerts_by_query_route.ts index 5cebdb8c6e7f4..735cd75b7f4a9 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/bulk_untrack_by_query/bulk_untrack_alerts_by_query_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/bulk_untrack_by_query/bulk_untrack_alerts_by_query_route.ts @@ -29,7 +29,8 @@ export const bulkUntrackAlertsByQueryRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const body: BulkUntrackByQueryRequestBodyV1 = req.body; try { await rulesClient.bulkUntrackAlerts({ diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/bulk_untrack_by_query/transforms/transform_bulk_untrack_alerts_by_query_body/v1.ts b/x-pack/plugins/alerting/server/routes/rule/apis/bulk_untrack_by_query/transforms/transform_bulk_untrack_alerts_by_query_body/v1.ts index 87c58c48c4c6d..dd346f8cc818e 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/bulk_untrack_by_query/transforms/transform_bulk_untrack_alerts_by_query_body/v1.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/bulk_untrack_by_query/transforms/transform_bulk_untrack_alerts_by_query_body/v1.ts @@ -9,8 +9,8 @@ import type { BulkUntrackByQueryRequestBodyV1 } from '../../../../../../../commo export const transformBulkUntrackAlertsByQueryBody = ({ query, - feature_ids: featureIds, + rule_type_ids: ruleTypeIds, }: BulkUntrackByQueryRequestBodyV1) => ({ query, - featureIds, + ruleTypeIds, }); diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/clone/clone_rule_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/clone/clone_rule_route.ts index ea6460dfb9463..0aa23886a9b4a 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/clone/clone_rule_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/clone/clone_rule_route.ts @@ -33,7 +33,8 @@ export const cloneRuleRoute = ( handleDisabledApiKeysError( router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const params: CloneRuleRequestParamsV1 = req.params; try { // TODO (http-versioning): Remove this cast, this enables us to move forward diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/create/create_rule_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/create/create_rule_route.ts index 45341fb48e9bd..26775ad0f98d4 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/create/create_rule_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/create/create_rule_route.ts @@ -62,7 +62,8 @@ export const createRuleRoute = ({ router, licenseState, usageCounter }: RouteOpt handleDisabledApiKeysError( router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const actionsClient = (await context.actions).getActionsClient(); const rulesSettingsClient = (await context.alerting).getRulesSettingsClient(true); diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/delete/delete_rule_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/delete/delete_rule_route.ts index 0452de7f7becd..e1e09403b309a 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/delete/delete_rule_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/delete/delete_rule_route.ts @@ -48,7 +48,8 @@ export const deleteRuleRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const params: DeleteRuleRequestParamsV1 = req.params; diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/disable/disable_rule_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/disable/disable_rule_route.ts index cae82e80be869..e364bc130121d 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/disable/disable_rule_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/disable/disable_rule_route.ts @@ -51,7 +51,7 @@ export const disableRuleRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const rulesClient = await (await context.alerting).getRulesClient(); const { id }: DisableRuleRequestParamsV1 = req.params; const body: DisableRuleRequestBodyV1 = req.body || {}; const { untrack = false } = body; diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/enable/enable_rule_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/enable/enable_rule_route.ts index 4843ed932374d..e5f0983bf844b 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/enable/enable_rule_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/enable/enable_rule_route.ts @@ -48,7 +48,7 @@ export const enableRuleRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const rulesClient = await (await context.alerting).getRulesClient(); const params: EnableRuleRequestParamsV1 = req.params; try { diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/find/find_internal_rules_route.test.ts b/x-pack/plugins/alerting/server/routes/rule/apis/find/find_internal_rules_route.test.ts index 46ff2e8e96e12..53b330a8a2044 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/find/find_internal_rules_route.test.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/find/find_internal_rules_route.test.ts @@ -7,6 +7,8 @@ import { httpServiceMock } from '@kbn/core/server/mocks'; import { licenseStateMock } from '../../../../lib/license_state.mock'; import { findInternalRulesRoute } from './find_internal_rules_route'; +import { mockHandlerArguments } from '../../../_mock_handler_arguments'; +import { rulesClientMock } from '../../../../rules_client.mock'; jest.mock('../../../../lib/license_api_access', () => ({ verifyApiAccess: jest.fn(), @@ -20,6 +22,8 @@ beforeEach(() => { jest.resetAllMocks(); }); +const rulesClient = rulesClientMock.create(); + describe('findInternalRulesRoute', () => { it('registers the route without public access', async () => { const licenseState = licenseStateMock.create(); @@ -33,4 +37,78 @@ describe('findInternalRulesRoute', () => { expect.any(Function) ); }); + + it('finds rules with proper parameters', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + findInternalRulesRoute(router, licenseState); + + const [config, handler] = router.post.mock.calls[0]; + + expect(config.path).toMatchInlineSnapshot(`"/internal/alerting/rules/_find"`); + + const findResult = { + page: 1, + perPage: 1, + total: 0, + data: [], + }; + rulesClient.find.mockResolvedValueOnce(findResult); + + const [context, req, res] = mockHandlerArguments( + { rulesClient }, + { + body: { + per_page: 1, + page: 1, + default_search_operator: 'OR', + rule_type_ids: ['foo'], + consumers: ['bar'], + }, + }, + ['ok'] + ); + + expect(await handler(context, req, res)).toMatchInlineSnapshot(` + Object { + "body": Object { + "data": Array [], + "page": 1, + "per_page": 1, + "total": 0, + }, + } + `); + + expect(rulesClient.find).toHaveBeenCalledTimes(1); + expect(rulesClient.find.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + Object { + "excludeFromPublicApi": false, + "includeSnoozeData": true, + "options": Object { + "consumers": Array [ + "bar", + ], + "defaultSearchOperator": "OR", + "page": 1, + "perPage": 1, + "ruleTypeIds": Array [ + "foo", + ], + }, + }, + ] + `); + + expect(res.ok).toHaveBeenCalledWith({ + body: { + page: 1, + per_page: 1, + total: 0, + data: [], + }, + }); + }); }); diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/find/find_internal_rules_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/find/find_internal_rules_route.ts index 8ff8ce59192cf..0117d86468f2a 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/find/find_internal_rules_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/find/find_internal_rules_route.ts @@ -8,10 +8,10 @@ import { IRouter } from '@kbn/core/server'; import { UsageCounter } from '@kbn/usage-collection-plugin/server'; import type { - FindRulesRequestQueryV1, + FindRulesInternalRequestBodyV1, FindRulesResponseV1, } from '../../../../../common/routes/rule/apis/find'; -import { findRulesRequestQuerySchemaV1 } from '../../../../../common/routes/rule/apis/find'; +import { findRulesInternalRequestBodySchemaV1 } from '../../../../../common/routes/rule/apis/find'; import { RuleParamsV1 } from '../../../../../common/routes/rule/response'; import { ILicenseState } from '../../../../lib'; import { @@ -20,7 +20,7 @@ import { } from '../../../../types'; import { verifyAccessAndContext } from '../../../lib'; import { trackLegacyTerminology } from '../../../lib/track_legacy_terminology'; -import { transformFindRulesBodyV1, transformFindRulesResponseV1 } from './transforms'; +import { transformFindRulesInternalBodyV1, transformFindRulesResponseV1 } from './transforms'; export const findInternalRulesRoute = ( router: IRouter, @@ -32,14 +32,14 @@ export const findInternalRulesRoute = ( path: INTERNAL_ALERTING_API_FIND_RULES_PATH, options: { access: 'internal' }, validate: { - body: findRulesRequestQuerySchemaV1, + body: findRulesInternalRequestBodySchemaV1, }, }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const rulesClient = await (await context.alerting).getRulesClient(); - const body: FindRulesRequestQueryV1 = req.body; + const body: FindRulesInternalRequestBodyV1 = req.body; trackLegacyTerminology( [req.body.search, req.body.search_fields, req.body.sort_field].filter( @@ -48,7 +48,7 @@ export const findInternalRulesRoute = ( usageCounter ); - const options = transformFindRulesBodyV1({ + const options = transformFindRulesInternalBodyV1({ ...body, has_reference: body.has_reference || undefined, search_fields: searchFieldsAsArray(body.search_fields), diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/find/find_rules_route.test.ts b/x-pack/plugins/alerting/server/routes/rule/apis/find/find_rules_route.test.ts index 0e1f07a5ce543..27769cf237389 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/find/find_rules_route.test.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/find/find_rules_route.test.ts @@ -42,6 +42,7 @@ describe('findRulesRoute', () => { expect.any(Function) ); }); + it('finds rules with proper parameters', async () => { const licenseState = licenseStateMock.create(); const router = httpServiceMock.createRouter(); @@ -446,4 +447,138 @@ describe('findRulesRoute', () => { incrementBy: 1, }); }); + + it('should not support rule_type_ids', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + findRulesRoute(router, licenseState); + + const [config, handler] = router.get.mock.calls[0]; + + expect(config.path).toMatchInlineSnapshot(`"/api/alerting/rules/_find"`); + + const findResult = { + page: 1, + perPage: 1, + total: 0, + data: [], + }; + rulesClient.find.mockResolvedValueOnce(findResult); + + const [context, req, res] = mockHandlerArguments( + { rulesClient }, + { + query: { + per_page: 1, + page: 1, + default_search_operator: 'OR', + rule_type_ids: ['foo'], + }, + }, + ['ok'] + ); + + expect(await handler(context, req, res)).toMatchInlineSnapshot(` + Object { + "body": Object { + "data": Array [], + "page": 1, + "per_page": 1, + "total": 0, + }, + } + `); + + expect(rulesClient.find).toHaveBeenCalledTimes(1); + expect(rulesClient.find.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + Object { + "excludeFromPublicApi": true, + "includeSnoozeData": true, + "options": Object { + "defaultSearchOperator": "OR", + "page": 1, + "perPage": 1, + }, + }, + ] + `); + + expect(res.ok).toHaveBeenCalledWith({ + body: { + page: 1, + per_page: 1, + total: 0, + data: [], + }, + }); + }); + + it('should not support consumers', async () => { + const licenseState = licenseStateMock.create(); + const router = httpServiceMock.createRouter(); + + findRulesRoute(router, licenseState); + + const [config, handler] = router.get.mock.calls[0]; + + expect(config.path).toMatchInlineSnapshot(`"/api/alerting/rules/_find"`); + + const findResult = { + page: 1, + perPage: 1, + total: 0, + data: [], + }; + rulesClient.find.mockResolvedValueOnce(findResult); + + const [context, req, res] = mockHandlerArguments( + { rulesClient }, + { + query: { + per_page: 1, + page: 1, + default_search_operator: 'OR', + consumers: ['foo'], + }, + }, + ['ok'] + ); + + expect(await handler(context, req, res)).toMatchInlineSnapshot(` + Object { + "body": Object { + "data": Array [], + "page": 1, + "per_page": 1, + "total": 0, + }, + } + `); + + expect(rulesClient.find).toHaveBeenCalledTimes(1); + expect(rulesClient.find.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + Object { + "excludeFromPublicApi": true, + "includeSnoozeData": true, + "options": Object { + "defaultSearchOperator": "OR", + "page": 1, + "perPage": 1, + }, + }, + ] + `); + + expect(res.ok).toHaveBeenCalledWith({ + body: { + page: 1, + per_page: 1, + total: 0, + data: [], + }, + }); + }); }); diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/find/find_rules_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/find/find_rules_route.ts index 90afde8f20813..37ea13c7983e6 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/find/find_rules_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/find/find_rules_route.ts @@ -52,7 +52,7 @@ export const findRulesRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const rulesClient = await (await context.alerting).getRulesClient(); const query: FindRulesRequestQueryV1 = req.query; diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/find/transforms/index.ts b/x-pack/plugins/alerting/server/routes/rule/apis/find/transforms/index.ts index 044a845f3f8f3..222215ffb9a31 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/find/transforms/index.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/find/transforms/index.ts @@ -8,5 +8,8 @@ export { transformFindRulesBody } from './transform_find_rules_body/latest'; export { transformFindRulesResponse } from './transform_find_rules_response/latest'; -export { transformFindRulesBody as transformFindRulesBodyV1 } from './transform_find_rules_body/v1'; +export { + transformFindRulesBody as transformFindRulesBodyV1, + transformFindRulesInternalBody as transformFindRulesInternalBodyV1, +} from './transform_find_rules_body/v1'; export { transformFindRulesResponse as transformFindRulesResponseV1 } from './transform_find_rules_response/v1'; diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/find/transforms/transform_find_rules_body/v1.ts b/x-pack/plugins/alerting/server/routes/rule/apis/find/transforms/transform_find_rules_body/v1.ts index a2f9d3c99b00d..3248c8f45360a 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/find/transforms/transform_find_rules_body/v1.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/find/transforms/transform_find_rules_body/v1.ts @@ -5,7 +5,10 @@ * 2.0. */ -import type { FindRulesRequestQueryV1 } from '../../../../../../../common/routes/rule/apis/find'; +import type { + FindRulesInternalRequestBodyV1, + FindRulesRequestQueryV1, +} from '../../../../../../../common/routes/rule/apis/find'; import { FindRulesOptions } from '../../../../../../application/rule/methods/find'; export const transformFindRulesBody = (params: FindRulesRequestQueryV1): FindRulesOptions => { @@ -29,7 +32,42 @@ export const transformFindRulesBody = (params: FindRulesRequestQueryV1): FindRul ...(filter ? { filter } : {}), ...(defaultSearchOperator ? { defaultSearchOperator } : {}), ...(perPage ? { perPage } : {}), - ...(filterConsumers ? { filterConsumers } : {}), + ...(sortField ? { sortField } : {}), + ...(sortOrder ? { sortOrder } : {}), + ...(hasReference ? { hasReference } : {}), + ...(searchFields + ? { searchFields: Array.isArray(searchFields) ? searchFields : [searchFields] } + : {}), + ...(filterConsumers ? { consumers: filterConsumers } : {}), + }; +}; + +export const transformFindRulesInternalBody = ( + params: FindRulesInternalRequestBodyV1 +): FindRulesOptions => { + const { + per_page: perPage, + page, + search, + default_search_operator: defaultSearchOperator, + search_fields: searchFields, + sort_field: sortField, + sort_order: sortOrder, + has_reference: hasReference, + fields, + filter, + rule_type_ids: ruleTypeIds, + consumers, + } = params; + return { + ...(page ? { page } : {}), + ...(search ? { search } : {}), + ...(fields ? { fields } : {}), + ...(filter ? { filter } : {}), + ...(defaultSearchOperator ? { defaultSearchOperator } : {}), + ...(perPage ? { perPage } : {}), + ...(ruleTypeIds ? { ruleTypeIds } : {}), + ...(consumers ? { consumers } : {}), ...(sortField ? { sortField } : {}), ...(sortOrder ? { sortOrder } : {}), ...(hasReference ? { hasReference } : {}), diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/get/get_rule_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/get/get_rule_route.ts index 0c19d0c9c4f70..46ccc00e33626 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/get/get_rule_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/get/get_rule_route.ts @@ -64,7 +64,8 @@ const buildGetRuleRoute = ({ }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const params: GetRuleRequestParamsV1 = req.params; // TODO (http-versioning): Remove this cast, this enables us to move forward diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/get_schedule_frequency/get_schedule_frequency_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/get_schedule_frequency/get_schedule_frequency_route.ts index e130679a78437..b91c0841df911 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/get_schedule_frequency/get_schedule_frequency_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/get_schedule_frequency/get_schedule_frequency_route.ts @@ -24,7 +24,8 @@ export const getScheduleFrequencyRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async (context, req, res) => { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const scheduleFrequencyResult = await rulesClient.getScheduleFrequency(); diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/list_types/rule_types.test.ts b/x-pack/plugins/alerting/server/routes/rule/apis/list_types/rule_types.test.ts index e6293a589743b..d32df997eb2c3 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/list_types/rule_types.test.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/list_types/rule_types.test.ts @@ -97,7 +97,7 @@ describe('ruleTypesRoute', () => { has_fields_for_a_a_d: false, }, ]; - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set(listTypes)); + rulesClient.listRuleTypes.mockResolvedValueOnce(listTypes); const [context, req, res] = mockHandlerArguments({ rulesClient }, {}, ['ok']); @@ -183,7 +183,7 @@ describe('ruleTypesRoute', () => { } as RegistryAlertTypeWithAuth, ]; - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set(listTypes)); + rulesClient.listRuleTypes.mockResolvedValueOnce(listTypes); const [context, req, res] = mockHandlerArguments( { rulesClient }, @@ -240,7 +240,7 @@ describe('ruleTypesRoute', () => { } as RegistryAlertTypeWithAuth, ]; - rulesClient.listRuleTypes.mockResolvedValueOnce(new Set(listTypes)); + rulesClient.listRuleTypes.mockResolvedValueOnce(listTypes); const [context, req, res] = mockHandlerArguments( { rulesClient }, diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/list_types/rule_types.ts b/x-pack/plugins/alerting/server/routes/rule/apis/list_types/rule_types.ts index da9c62ab5f3f2..a49820704d74a 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/list_types/rule_types.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/list_types/rule_types.ts @@ -42,7 +42,7 @@ export const ruleTypesRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const rulesClient = await (await context.alerting).getRulesClient(); const ruleTypes = await rulesClient.listRuleTypes(); const responseBody: TypesRulesResponseBodyV1 = transformRuleTypesResponseV1(ruleTypes); diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/list_types/transforms/transform_rule_types_response/v1.ts b/x-pack/plugins/alerting/server/routes/rule/apis/list_types/transforms/transform_rule_types_response/v1.ts index 54a5874331c86..e331fd9133332 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/list_types/transforms/transform_rule_types_response/v1.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/list_types/transforms/transform_rule_types_response/v1.ts @@ -10,9 +10,9 @@ import { RegistryAlertTypeWithAuth } from '../../../../../../authorization'; import type { TypesRulesResponseBodyV1 } from '../../../../../../../common/routes/rule/apis/list_types'; export const transformRuleTypesResponse = ( - ruleTypes: Set + ruleTypes: RegistryAlertTypeWithAuth[] ): TypesRulesResponseBodyV1 => { - return Array.from(ruleTypes).map((ruleType: RegistryAlertTypeWithAuth) => { + return ruleTypes.map((ruleType: RegistryAlertTypeWithAuth) => { return { ...(ruleType.actionGroups ? { action_groups: ruleType.actionGroups } : {}), ...(ruleType.actionVariables ? { action_variables: ruleType.actionVariables } : {}), diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/mute_alert/mute_alert.ts b/x-pack/plugins/alerting/server/routes/rule/apis/mute_alert/mute_alert.ts index 5ce924b445ca7..f9b7fa8bfbf0e 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/mute_alert/mute_alert.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/mute_alert/mute_alert.ts @@ -48,7 +48,8 @@ export const muteAlertRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const params: MuteAlertRequestParamsV1 = req.params; try { await rulesClient.muteInstance(transformRequestParamsToApplicationV1(params)); diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/mute_all/mute_all_rule.ts b/x-pack/plugins/alerting/server/routes/rule/apis/mute_all/mute_all_rule.ts index e9aa0e42a046f..46f108cb3a94e 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/mute_all/mute_all_rule.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/mute_all/mute_all_rule.ts @@ -51,7 +51,8 @@ export const muteAllRuleRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const params: MuteAllRuleRequestParamsV1 = req.params; trackDeprecatedRouteUsage('muteAll', usageCounter); try { diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/resolve/resolve_rule_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/resolve/resolve_rule_route.ts index f67485279edc5..ad0e846d452e5 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/resolve/resolve_rule_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/resolve/resolve_rule_route.ts @@ -34,7 +34,8 @@ export const resolveRuleRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const params: ResolveRuleRequestParamsV1 = req.params; const { id } = params; // TODO (http-versioning): Remove this cast, this enables us to move forward diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/snooze/snooze_rule_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/snooze/snooze_rule_route.ts index 1de46fd784905..3e0e22070d672 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/snooze/snooze_rule_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/snooze/snooze_rule_route.ts @@ -33,7 +33,8 @@ export const snoozeRuleRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const params: SnoozeRuleRequestParamsV1 = req.params; const body = transformSnoozeBodyV1(req.body); try { diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/tags/get_rule_tags.ts b/x-pack/plugins/alerting/server/routes/rule/apis/tags/get_rule_tags.ts index c66bf0d61009a..05e4433f5e53d 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/tags/get_rule_tags.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/tags/get_rule_tags.ts @@ -29,7 +29,8 @@ export const getRuleTagsRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const query: RuleTagsRequestQueryV1 = req.query; const options = transformRuleTagsQueryRequestV1(query); diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/unmute_alert_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/unmute_alert_route.ts index 63560e354dc1b..34108b937cc43 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/unmute_alert_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/unmute_alert_route.ts @@ -49,7 +49,7 @@ export const unmuteAlertRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const rulesClient = await (await context.alerting).getRulesClient(); const params: UnmuteAlertRequestParamsV1 = req.params; try { await rulesClient.unmuteInstance(transformRequestParamsToApplicationV1(params)); diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/unmute_all/unmute_all_rule.ts b/x-pack/plugins/alerting/server/routes/rule/apis/unmute_all/unmute_all_rule.ts index 8409128da6241..bf9d1660d0def 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/unmute_all/unmute_all_rule.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/unmute_all/unmute_all_rule.ts @@ -48,7 +48,8 @@ export const unmuteAllRuleRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const params: UnmuteAllRuleRequestParamsV1 = req.params; try { await rulesClient.unmuteAll(params); diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/unsnooze/unsnooze_rule_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/unsnooze/unsnooze_rule_route.ts index 69e4c91eeaf35..e5f476cbb2038 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/unsnooze/unsnooze_rule_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/unsnooze/unsnooze_rule_route.ts @@ -33,7 +33,8 @@ export const unsnoozeRuleRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const params: UnsnoozeRuleRequestParamsV1 = req.params; const body = transformUnsnoozeBodyV1(req.body); try { diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/update/update_rule_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/update/update_rule_route.ts index 5c925b05bace3..8fee470cb3bd7 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/update/update_rule_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/update/update_rule_route.ts @@ -64,7 +64,8 @@ export const updateRuleRoute = ( handleDisabledApiKeysError( router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const actionsClient = (await context.actions).getActionsClient(); const rulesSettingsClient = (await context.alerting).getRulesSettingsClient(true); diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/update_api_key/update_rule_api_key_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/update_api_key/update_rule_api_key_route.ts index 7ba8589412357..4f16d873dfaa8 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/update_api_key/update_rule_api_key_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/update_api_key/update_rule_api_key_route.ts @@ -51,7 +51,7 @@ export const updateRuleApiKeyRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const rulesClient = await (await context.alerting).getRulesClient(); const { id }: UpdateApiKeyParamsV1 = req.params; try { diff --git a/x-pack/plugins/alerting/server/routes/run_soon.ts b/x-pack/plugins/alerting/server/routes/run_soon.ts index 589724ab57b06..1b7fa271c9587 100644 --- a/x-pack/plugins/alerting/server/routes/run_soon.ts +++ b/x-pack/plugins/alerting/server/routes/run_soon.ts @@ -31,7 +31,8 @@ export const runSoonRoute = ( }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); const message = await rulesClient.runSoon(req.params); return message ? res.ok({ body: message }) : res.noContent(); }) diff --git a/x-pack/plugins/alerting/server/routes/suggestions/values_suggestion_alerts.ts b/x-pack/plugins/alerting/server/routes/suggestions/values_suggestion_alerts.ts index f39615efa7e8d..25dc8add03abf 100644 --- a/x-pack/plugins/alerting/server/routes/suggestions/values_suggestion_alerts.ts +++ b/x-pack/plugins/alerting/server/routes/suggestions/values_suggestion_alerts.ts @@ -11,15 +11,9 @@ import { firstValueFrom, Observable } from 'rxjs'; import { getRequestAbortedSignal } from '@kbn/data-plugin/server'; import { termsAggSuggestions } from '@kbn/unified-search-plugin/server/autocomplete/terms_agg'; import type { ConfigSchema } from '@kbn/unified-search-plugin/server/config'; -import { UsageCounter } from '@kbn/usage-collection-plugin/server'; import { getKbnServerError, reportServerError } from '@kbn/kibana-utils-plugin/server'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { - AlertConsumers, - ALERT_RULE_CONSUMER, - ALERT_RULE_TYPE_ID, - SPACE_IDS, -} from '@kbn/rule-data-utils'; +import { ALERT_RULE_CONSUMER, ALERT_RULE_TYPE_ID, SPACE_IDS } from '@kbn/rule-data-utils'; import { verifyAccessAndContext } from '../lib'; import { RuleAuditAction, ruleAuditEvent } from '../../rules_client/common/audit_events'; @@ -27,6 +21,7 @@ import { AlertingAuthorizationEntity, AlertingAuthorizationFilterOpts, AlertingAuthorizationFilterType, + AuthorizedRuleTypes, } from '../../authorization'; import { AlertingRequestHandlerContext } from '../../types'; import { GetAlertIndicesAlias, ILicenseState } from '../../lib'; @@ -45,20 +40,11 @@ export const AlertsSuggestionsSchema = { }), }; -const VALID_FEATURE_IDS = new Set([ - AlertConsumers.APM, - AlertConsumers.INFRASTRUCTURE, - AlertConsumers.LOGS, - AlertConsumers.SLO, - AlertConsumers.UPTIME, -]); - export function registerAlertsValueSuggestionsRoute( router: IRouter, licenseState: ILicenseState, config$: Observable, - getAlertIndicesAlias?: GetAlertIndicesAlias, - usageCounter?: UsageCounter + getAlertIndicesAlias?: GetAlertIndicesAlias ) { router.post( { @@ -73,19 +59,21 @@ export function registerAlertsValueSuggestionsRoute( const abortSignal = getRequestAbortedSignal(request.events.aborted$); const { savedObjects, elasticsearch } = await context.core; - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); let authorizationTuple; - let authorizedRuleType = []; + let authorizedRuleType: AuthorizedRuleTypes = new Map(); + try { const authorization = rulesClient.getAuthorization(); - authorizationTuple = await authorization.getFindAuthorizationFilter( - AlertingAuthorizationEntity.Alert, - alertingAuthorizationFilterOpts - ); - authorizedRuleType = await authorization.getAuthorizedRuleTypes( - AlertingAuthorizationEntity.Alert, - VALID_FEATURE_IDS - ); + authorizationTuple = await authorization.getFindAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Alert, + filterOpts: alertingAuthorizationFilterOpts, + }); + + authorizedRuleType = await authorization.getAllAuthorizedRuleTypesFindOperation({ + authorizationEntity: AlertingAuthorizationEntity.Alert, + }); } catch (error) { rulesClient.getAuditLogger()?.log( ruleAuditEvent({ @@ -93,8 +81,10 @@ export function registerAlertsValueSuggestionsRoute( error, }) ); + throw error; } + const spaceId = rulesClient.getSpaceId(); const { filter: authorizationFilter } = authorizationTuple; const filters = [ @@ -103,9 +93,10 @@ export function registerAlertsValueSuggestionsRoute( ] as estypes.QueryDslQueryContainer[]; const index = getAlertIndicesAlias!( - authorizedRuleType.map((art) => art.id), + Array.from(authorizedRuleType.keys()).map((id) => id), spaceId ).join(','); + try { const body = await termsAggSuggestions( config, diff --git a/x-pack/plugins/alerting/server/routes/suggestions/values_suggestion_rules.ts b/x-pack/plugins/alerting/server/routes/suggestions/values_suggestion_rules.ts index 6ada2378b3096..420d6473988fa 100644 --- a/x-pack/plugins/alerting/server/routes/suggestions/values_suggestion_rules.ts +++ b/x-pack/plugins/alerting/server/routes/suggestions/values_suggestion_rules.ts @@ -59,15 +59,14 @@ export function registerRulesValueSuggestionsRoute( const abortSignal = getRequestAbortedSignal(request.events.aborted$); const { savedObjects, elasticsearch } = await context.core; - const rulesClient = (await context.alerting).getRulesClient(); + const alertingContext = await context.alerting; + const rulesClient = await alertingContext.getRulesClient(); let authorizationTuple; try { - authorizationTuple = await rulesClient - .getAuthorization() - .getFindAuthorizationFilter( - AlertingAuthorizationEntity.Rule, - alertingAuthorizationFilterOpts - ); + authorizationTuple = await rulesClient.getAuthorization().getFindAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Rule, + filterOpts: alertingAuthorizationFilterOpts, + }); } catch (error) { rulesClient.getAuditLogger()?.log( ruleAuditEvent({ diff --git a/x-pack/plugins/alerting/server/rule_type_registry.test.ts b/x-pack/plugins/alerting/server/rule_type_registry.test.ts index e678228660e51..d9d7c1240922c 100644 --- a/x-pack/plugins/alerting/server/rule_type_registry.test.ts +++ b/x-pack/plugins/alerting/server/rule_type_registry.test.ts @@ -856,7 +856,7 @@ describe('Create Lifecycle', () => { test('should return empty when nothing is registered', () => { const registry = new RuleTypeRegistry(ruleTypeRegistryParams); const result = registry.list(); - expect(result).toMatchInlineSnapshot(`Set {}`); + expect(result).toMatchInlineSnapshot(`Map {}`); }); test('should return registered types', () => { @@ -888,8 +888,8 @@ describe('Create Lifecycle', () => { }); const result = registry.list(); expect(result).toMatchInlineSnapshot(` - Set { - Object { + Map { + "test" => Object { "actionGroups": Array [ Object { "id": "testActionGroup", diff --git a/x-pack/plugins/alerting/server/rule_type_registry.ts b/x-pack/plugins/alerting/server/rule_type_registry.ts index 7562942f0262d..40d00acbef598 100644 --- a/x-pack/plugins/alerting/server/rule_type_registry.ts +++ b/x-pack/plugins/alerting/server/rule_type_registry.ts @@ -382,59 +382,40 @@ export class RuleTypeRegistry { >; } - public list(): Set { - const mapRuleTypes: Array<[string, UntypedNormalizedRuleType]> = Array.from(this.ruleTypes); - const tempRegistryRuleType = mapRuleTypes.map( - ([ - id, - { - name, - actionGroups, - recoveryActionGroup, - defaultActionGroupId, - actionVariables, - category, - producer, - minimumLicenseRequired, - isExportable, - ruleTaskTimeout, - defaultScheduleInterval, - doesSetRecoveryContext, - alerts, - fieldsForAAD, - validLegacyConsumers, - }, - ]) => { - // KEEP the type here to be safe if not the map is ignoring it for some reason - const ruleType: RegistryRuleType = { - id, - name, - actionGroups, - recoveryActionGroup, - defaultActionGroupId, - actionVariables, - category, - producer, - minimumLicenseRequired, - isExportable, - ruleTaskTimeout, - defaultScheduleInterval, - doesSetRecoveryContext, - enabledInLicense: !!this.licenseState.getLicenseCheckForRuleType( - id, - name, - minimumLicenseRequired - ).isValid, - fieldsForAAD, - hasFieldsForAAD: Boolean(fieldsForAAD), - hasAlertsMappings: !!alerts, - validLegacyConsumers, - ...(alerts ? { alerts } : {}), - }; - return ruleType; - } - ); - return new Set(tempRegistryRuleType); + public list(): Map { + const ruleTypesMap = new Map(); + + this.ruleTypes.forEach((_ruleType) => { + const ruleType: RegistryRuleType = { + id: _ruleType.id, + name: _ruleType.name, + actionGroups: _ruleType.actionGroups, + recoveryActionGroup: _ruleType.recoveryActionGroup, + defaultActionGroupId: _ruleType.defaultActionGroupId, + actionVariables: _ruleType.actionVariables, + category: _ruleType.category, + producer: _ruleType.producer, + minimumLicenseRequired: _ruleType.minimumLicenseRequired, + isExportable: _ruleType.isExportable, + ruleTaskTimeout: _ruleType.ruleTaskTimeout, + defaultScheduleInterval: _ruleType.defaultScheduleInterval, + doesSetRecoveryContext: _ruleType.doesSetRecoveryContext, + enabledInLicense: !!this.licenseState.getLicenseCheckForRuleType( + _ruleType.id, + _ruleType.name, + _ruleType.minimumLicenseRequired + ).isValid, + fieldsForAAD: _ruleType.fieldsForAAD, + hasFieldsForAAD: Boolean(_ruleType.fieldsForAAD), + hasAlertsMappings: !!_ruleType.alerts, + ...(_ruleType.alerts ? { alerts: _ruleType.alerts } : {}), + validLegacyConsumers: _ruleType.validLegacyConsumers, + }; + + ruleTypesMap.set(ruleType.id, ruleType); + }); + + return ruleTypesMap; } public getAllTypes(): string[] { diff --git a/x-pack/plugins/alerting/server/rules_client.mock.ts b/x-pack/plugins/alerting/server/rules_client.mock.ts index 0616591cbe565..c7577656306d0 100644 --- a/x-pack/plugins/alerting/server/rules_client.mock.ts +++ b/x-pack/plugins/alerting/server/rules_client.mock.ts @@ -5,12 +5,15 @@ * 2.0. */ +import { alertingAuthorizationMock } from './authorization/alerting_authorization.mock'; import { RulesClientApi } from './types'; type Schema = RulesClientApi; export type RulesClientMock = jest.Mocked; const createRulesClientMock = () => { + const alertingAuthorization = alertingAuthorizationMock.create(); + const mocked: RulesClientMock = { aggregate: jest.fn().mockReturnValue({ ruleExecutionStatus: {}, ruleLastRunOutcome: {} }), getTags: jest.fn(), @@ -31,10 +34,7 @@ const createRulesClientMock = () => { listRuleTypes: jest.fn(), getAlertSummary: jest.fn(), getAuditLogger: jest.fn(), - getAuthorization: jest.fn().mockImplementation(() => ({ - getFindAuthorizationFilter: jest.fn().mockReturnValue({ filter: null }), - getAuthorizedRuleTypes: jest.fn().mockResolvedValue([]), - })), + getAuthorization: jest.fn().mockReturnValue(alertingAuthorization), getExecutionLogForRule: jest.fn(), getRuleExecutionKPI: jest.fn(), getGlobalExecutionKpiWithAuth: jest.fn(), diff --git a/x-pack/plugins/alerting/server/rules_client/common/filters.test.ts b/x-pack/plugins/alerting/server/rules_client/common/filters.test.ts new file mode 100644 index 0000000000000..fc14cb19bb803 --- /dev/null +++ b/x-pack/plugins/alerting/server/rules_client/common/filters.test.ts @@ -0,0 +1,463 @@ +/* + * 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 { nodeBuilder } from '@kbn/es-query'; +import { + buildConsumersFilter, + buildFilter, + buildRuleTypeIdsFilter, + combineFilterWithAuthorizationFilter, + combineFilters, +} from './filters'; + +describe('filters', () => { + describe('combineFilterWithAuthorizationFilter', () => { + it('returns undefined if neither a filter or authorizationFilter are passed', () => { + expect(combineFilterWithAuthorizationFilter()).toBeUndefined(); + }); + + it('returns a single KueryNode when only a filter is passed in', () => { + const node = nodeBuilder.is('a', 'hello'); + expect(combineFilterWithAuthorizationFilter(node)).toMatchInlineSnapshot(` + Object { + "arguments": Array [ + Object { + "isQuoted": false, + "type": "literal", + "value": "a", + }, + Object { + "isQuoted": false, + "type": "literal", + "value": "hello", + }, + ], + "function": "is", + "type": "function", + } + `); + }); + + it('returns a single KueryNode when only an authorizationFilter is passed in', () => { + const node = nodeBuilder.is('a', 'hello'); + expect(combineFilterWithAuthorizationFilter(undefined, node)).toMatchInlineSnapshot(` + Object { + "arguments": Array [ + Object { + "isQuoted": false, + "type": "literal", + "value": "a", + }, + Object { + "isQuoted": false, + "type": "literal", + "value": "hello", + }, + ], + "function": "is", + "type": "function", + } + `); + }); + + it("returns a single KueryNode and'ing together the passed in parameters", () => { + const node = nodeBuilder.is('a', 'hello'); + const node2 = nodeBuilder.is('b', 'hi'); + + expect(combineFilterWithAuthorizationFilter(node, node2)).toMatchInlineSnapshot(` + Object { + "arguments": Array [ + Object { + "arguments": Array [ + Object { + "isQuoted": false, + "type": "literal", + "value": "a", + }, + Object { + "isQuoted": false, + "type": "literal", + "value": "hello", + }, + ], + "function": "is", + "type": "function", + }, + Object { + "arguments": Array [ + Object { + "isQuoted": false, + "type": "literal", + "value": "b", + }, + Object { + "isQuoted": false, + "type": "literal", + "value": "hi", + }, + ], + "function": "is", + "type": "function", + }, + ], + "function": "and", + "type": "function", + } + `); + }); + + it("returns a single KueryNode and'ing together the passed in parameters in opposite order", () => { + const node = nodeBuilder.is('a', 'hello'); + const node2 = nodeBuilder.is('b', 'hi'); + + expect(combineFilterWithAuthorizationFilter(node2, node)).toMatchInlineSnapshot(` + Object { + "arguments": Array [ + Object { + "arguments": Array [ + Object { + "isQuoted": false, + "type": "literal", + "value": "b", + }, + Object { + "isQuoted": false, + "type": "literal", + "value": "hi", + }, + ], + "function": "is", + "type": "function", + }, + Object { + "arguments": Array [ + Object { + "isQuoted": false, + "type": "literal", + "value": "a", + }, + Object { + "isQuoted": false, + "type": "literal", + "value": "hello", + }, + ], + "function": "is", + "type": "function", + }, + ], + "function": "and", + "type": "function", + } + `); + }); + }); + + describe('buildFilter', () => { + it('returns undefined if filters is undefined', () => { + expect(buildFilter({ filters: undefined, field: 'abc', operator: 'or' })).toBeUndefined(); + }); + + it('returns undefined if filters is is an empty array', () => { + expect(buildFilter({ filters: [], field: 'abc', operator: 'or' })).toBeUndefined(); + }); + + it('returns a KueryNode using or operator', () => { + expect(buildFilter({ filters: ['value1'], field: 'abc', operator: 'or' })) + .toMatchInlineSnapshot(` + Object { + "arguments": Array [ + Object { + "isQuoted": false, + "type": "literal", + "value": "alert.attributes.abc", + }, + Object { + "isQuoted": false, + "type": "literal", + "value": "value1", + }, + ], + "function": "is", + "type": "function", + } + `); + }); + + it("returns multiple nodes or'd together", () => { + expect(buildFilter({ filters: ['value1', 'value2'], field: 'abc', operator: 'or' })) + .toMatchInlineSnapshot(` + Object { + "arguments": Array [ + Object { + "arguments": Array [ + Object { + "isQuoted": false, + "type": "literal", + "value": "alert.attributes.abc", + }, + Object { + "isQuoted": false, + "type": "literal", + "value": "value1", + }, + ], + "function": "is", + "type": "function", + }, + Object { + "arguments": Array [ + Object { + "isQuoted": false, + "type": "literal", + "value": "alert.attributes.abc", + }, + Object { + "isQuoted": false, + "type": "literal", + "value": "value2", + }, + ], + "function": "is", + "type": "function", + }, + ], + "function": "or", + "type": "function", + } + `); + }); + + it('does not escape special kql characters in the filter values', () => { + const specialCharacters = 'awesome:()\\<>"*'; + + expect(buildFilter({ filters: [specialCharacters], field: 'abc', operator: 'or' })) + .toMatchInlineSnapshot(` + Object { + "arguments": Array [ + Object { + "isQuoted": false, + "type": "literal", + "value": "alert.attributes.abc", + }, + Object { + "isQuoted": false, + "type": "literal", + "value": "awesome:()\\\\<>\\"*", + }, + ], + "function": "is", + "type": "function", + } + `); + }); + }); + + describe('combineFilters', () => { + it('returns undefined if the nodes are undefined or null', () => { + expect(combineFilters([null, undefined])).toBeUndefined(); + }); + + it('combines the filters correctly', () => { + const node = nodeBuilder.is('a', 'hello'); + const node2 = nodeBuilder.is('b', 'hi'); + + expect(combineFilters([node, null, undefined, node2])).toMatchInlineSnapshot(` + Object { + "arguments": Array [ + Object { + "arguments": Array [ + Object { + "isQuoted": false, + "type": "literal", + "value": "a", + }, + Object { + "isQuoted": false, + "type": "literal", + "value": "hello", + }, + ], + "function": "is", + "type": "function", + }, + Object { + "arguments": Array [ + Object { + "isQuoted": false, + "type": "literal", + "value": "b", + }, + Object { + "isQuoted": false, + "type": "literal", + "value": "hi", + }, + ], + "function": "is", + "type": "function", + }, + ], + "function": "and", + "type": "function", + } + `); + }); + + it('combines the filters correctly with an operator', () => { + const node = nodeBuilder.is('a', 'hello'); + const node2 = nodeBuilder.is('b', 'hi'); + + expect(combineFilters([node, null, undefined, node2], 'or')).toMatchInlineSnapshot(` + Object { + "arguments": Array [ + Object { + "arguments": Array [ + Object { + "isQuoted": false, + "type": "literal", + "value": "a", + }, + Object { + "isQuoted": false, + "type": "literal", + "value": "hello", + }, + ], + "function": "is", + "type": "function", + }, + Object { + "arguments": Array [ + Object { + "isQuoted": false, + "type": "literal", + "value": "b", + }, + Object { + "isQuoted": false, + "type": "literal", + "value": "hi", + }, + ], + "function": "is", + "type": "function", + }, + ], + "function": "or", + "type": "function", + } + `); + }); + }); + + describe('buildRuleTypeIdsFilter', () => { + it('returns undefined if ruleTypeIds is undefined', () => { + expect(buildRuleTypeIdsFilter()).toBeUndefined(); + }); + + it('returns undefined if ruleTypeIds is is an empty array', () => { + expect(buildRuleTypeIdsFilter([])).toBeUndefined(); + }); + + it('builds the filter correctly', () => { + expect(buildRuleTypeIdsFilter(['foo', 'bar'])).toMatchInlineSnapshot(` + Object { + "arguments": Array [ + Object { + "arguments": Array [ + Object { + "isQuoted": false, + "type": "literal", + "value": "alert.attributes.alertTypeId", + }, + Object { + "isQuoted": false, + "type": "literal", + "value": "foo", + }, + ], + "function": "is", + "type": "function", + }, + Object { + "arguments": Array [ + Object { + "isQuoted": false, + "type": "literal", + "value": "alert.attributes.alertTypeId", + }, + Object { + "isQuoted": false, + "type": "literal", + "value": "bar", + }, + ], + "function": "is", + "type": "function", + }, + ], + "function": "or", + "type": "function", + } + `); + }); + }); + + describe('buildConsumersFilter', () => { + it('returns undefined if ruleTypeIds is undefined', () => { + expect(buildConsumersFilter()).toBeUndefined(); + }); + + it('returns undefined if ruleTypeIds is is an empty array', () => { + expect(buildConsumersFilter([])).toBeUndefined(); + }); + + it('builds the filter correctly', () => { + expect(buildConsumersFilter(['foo', 'bar'])).toMatchInlineSnapshot(` + Object { + "arguments": Array [ + Object { + "arguments": Array [ + Object { + "isQuoted": false, + "type": "literal", + "value": "alert.attributes.consumer", + }, + Object { + "isQuoted": false, + "type": "literal", + "value": "foo", + }, + ], + "function": "is", + "type": "function", + }, + Object { + "arguments": Array [ + Object { + "isQuoted": false, + "type": "literal", + "value": "alert.attributes.consumer", + }, + Object { + "isQuoted": false, + "type": "literal", + "value": "bar", + }, + ], + "function": "is", + "type": "function", + }, + ], + "function": "or", + "type": "function", + } + `); + }); + }); +}); diff --git a/x-pack/plugins/alerting/server/rules_client/common/filters.ts b/x-pack/plugins/alerting/server/rules_client/common/filters.ts new file mode 100644 index 0000000000000..b0c3ccc5e1ec1 --- /dev/null +++ b/x-pack/plugins/alerting/server/rules_client/common/filters.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 { KueryNode, nodeBuilder } from '@kbn/es-query'; +import { RULE_SAVED_OBJECT_TYPE } from '../..'; + +export const NodeBuilderOperators = { + and: 'and', + or: 'or', +} as const; + +type NodeBuilderOperatorsType = keyof typeof NodeBuilderOperators; + +interface FilterField { + filters?: string | string[]; + field: string; + operator: NodeBuilderOperatorsType; + type?: string; +} + +export const buildFilter = ({ + filters, + field, + operator, + type = RULE_SAVED_OBJECT_TYPE, +}: FilterField): KueryNode | undefined => { + if (filters === undefined) { + return; + } + + const filtersAsArray = Array.isArray(filters) ? filters : [filters]; + + if (filtersAsArray.length === 0) { + return; + } + + return nodeBuilder[operator]( + filtersAsArray.map((filter) => nodeBuilder.is(`${type}.attributes.${field}`, filter)) + ); +}; + +export const buildRuleTypeIdsFilter = (ruleTypeIds?: string[]) => { + if (!ruleTypeIds || !ruleTypeIds?.length) { + return; + } + + return buildFilter({ filters: ruleTypeIds, field: 'alertTypeId', operator: 'or' }); +}; + +export const buildConsumersFilter = (consumers?: string[]) => { + if (!consumers || !consumers?.length) { + return; + } + + return buildFilter({ filters: consumers, field: 'consumer', operator: 'or' }); +}; + +/** + * Combines Kuery nodes and accepts an array with a mixture of undefined and KueryNodes. This will filter out the undefined + * filters and return a KueryNode with the filters combined using the specified operator which defaults to and if not defined. + */ +export function combineFilters( + nodes: Array, + operator: NodeBuilderOperatorsType = NodeBuilderOperators.and +): KueryNode | undefined { + const filters = nodes.filter(Boolean) as KueryNode[]; + + if (filters.length <= 0) { + return; + } + + return nodeBuilder[operator](filters); +} + +export const combineFilterWithAuthorizationFilter = ( + filter?: KueryNode, + authorizationFilter?: KueryNode +) => { + if (!filter && !authorizationFilter) { + return; + } + + const kueries = [ + ...(filter !== undefined ? [filter] : []), + ...(authorizationFilter !== undefined ? [authorizationFilter] : []), + ]; + return nodeBuilder.and(kueries); +}; diff --git a/x-pack/plugins/alerting/server/rules_client/lib/get_authorization_filter.ts b/x-pack/plugins/alerting/server/rules_client/lib/get_authorization_filter.ts index b9cc41a0fd7c4..591602effc474 100644 --- a/x-pack/plugins/alerting/server/rules_client/lib/get_authorization_filter.ts +++ b/x-pack/plugins/alerting/server/rules_client/lib/get_authorization_filter.ts @@ -6,11 +6,11 @@ */ import { withSpan } from '@kbn/apm-utils'; -import { AlertingAuthorizationEntity } from '../../authorization'; import { ruleAuditEvent, RuleAuditAction } from '../common/audit_events'; import { RulesClientContext } from '../types'; import { alertingAuthorizationFilterOpts } from '../common/constants'; import { BulkAction } from '../types'; +import { AlertingAuthorizationEntity } from '../../authorization/types'; export const getAuthorizationFilter = async ( context: RulesClientContext, @@ -20,10 +20,10 @@ export const getAuthorizationFilter = async ( const authorizationTuple = await withSpan( { name: 'authorization.getFindAuthorizationFilter', type: 'rules' }, () => - context.authorization.getFindAuthorizationFilter( - AlertingAuthorizationEntity.Rule, - alertingAuthorizationFilterOpts - ) + context.authorization.getFindAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Rule, + filterOpts: alertingAuthorizationFilterOpts, + }) ); return authorizationTuple.filter; } catch (error) { diff --git a/x-pack/plugins/alerting/server/rules_client/methods/get_action_error_log.ts b/x-pack/plugins/alerting/server/rules_client/methods/get_action_error_log.ts index a7d60fc8f8ca4..4d71af6573b57 100644 --- a/x-pack/plugins/alerting/server/rules_client/methods/get_action_error_log.ts +++ b/x-pack/plugins/alerting/server/rules_client/methods/get_action_error_log.ts @@ -108,16 +108,16 @@ export async function getActionErrorLogWithAuth( let authorizationTuple; try { - authorizationTuple = await context.authorization.getFindAuthorizationFilter( - AlertingAuthorizationEntity.Alert, - { + authorizationTuple = await context.authorization.getFindAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Alert, + filterOpts: { type: AlertingAuthorizationFilterType.KQL, fieldNames: { ruleTypeId: 'kibana.alert.rule.rule_type_id', consumer: 'kibana.alert.rule.consumer', }, - } - ); + }, + }); } catch (error) { context.auditLogger?.log( ruleAuditEvent({ diff --git a/x-pack/plugins/alerting/server/rules_client/methods/get_execution_kpi.ts b/x-pack/plugins/alerting/server/rules_client/methods/get_execution_kpi.ts index fc2c1298f69ac..4441cc69a5f72 100644 --- a/x-pack/plugins/alerting/server/rules_client/methods/get_execution_kpi.ts +++ b/x-pack/plugins/alerting/server/rules_client/methods/get_execution_kpi.ts @@ -105,16 +105,16 @@ export async function getGlobalExecutionKpiWithAuth( let authorizationTuple; try { - authorizationTuple = await context.authorization.getFindAuthorizationFilter( - AlertingAuthorizationEntity.Alert, - { + authorizationTuple = await context.authorization.getFindAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Alert, + filterOpts: { type: AlertingAuthorizationFilterType.KQL, fieldNames: { ruleTypeId: 'kibana.alert.rule.rule_type_id', consumer: 'kibana.alert.rule.consumer', }, - } - ); + }, + }); } catch (error) { context.auditLogger?.log( ruleAuditEvent({ diff --git a/x-pack/plugins/alerting/server/rules_client/methods/get_execution_log.ts b/x-pack/plugins/alerting/server/rules_client/methods/get_execution_log.ts index 18d65c28fc9bb..95d41a02a685b 100644 --- a/x-pack/plugins/alerting/server/rules_client/methods/get_execution_log.ts +++ b/x-pack/plugins/alerting/server/rules_client/methods/get_execution_log.ts @@ -118,16 +118,16 @@ export async function getGlobalExecutionLogWithAuth( let authorizationTuple; try { - authorizationTuple = await context.authorization.getFindAuthorizationFilter( - AlertingAuthorizationEntity.Alert, - { + authorizationTuple = await context.authorization.getFindAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Alert, + filterOpts: { type: AlertingAuthorizationFilterType.KQL, fieldNames: { ruleTypeId: 'kibana.alert.rule.rule_type_id', consumer: 'kibana.alert.rule.consumer', }, - } - ); + }, + }); } catch (error) { context.auditLogger?.log( ruleAuditEvent({ diff --git a/x-pack/plugins/alerting/server/rules_client/rules_client.mock.ts b/x-pack/plugins/alerting/server/rules_client/rules_client.mock.ts new file mode 100644 index 0000000000000..f8e2beba7ee67 --- /dev/null +++ b/x-pack/plugins/alerting/server/rules_client/rules_client.mock.ts @@ -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 { ActionsAuthorization } from '@kbn/actions-plugin/server'; +import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; +import { uiSettingsServiceMock } from '@kbn/core-ui-settings-server-mocks'; +import { AlertingAuthorization } from '../authorization'; +import { ConnectorAdapterRegistry } from '../connector_adapters/connector_adapter_registry'; +import type { ConstructorOptions } from './rules_client'; +import { actionsAuthorizationMock } from '@kbn/actions-plugin/server/mocks'; +import { + savedObjectsClientMock, + savedObjectsRepositoryMock, +} from '@kbn/core-saved-objects-api-server-mocks'; +import { auditLoggerMock } from '@kbn/core-security-server-mocks'; +import { encryptedSavedObjectsMock } from '@kbn/encrypted-saved-objects-plugin/server/mocks'; +import { taskManagerMock } from '@kbn/task-manager-plugin/server/mocks'; +import { alertingAuthorizationMock } from '../authorization/alerting_authorization.mock'; +import { backfillClientMock } from '../backfill_client/backfill_client.mock'; +import { ruleTypeRegistryMock } from '../rule_type_registry.mock'; + +const create = () => { + const kibanaVersion = 'v8.17.0'; + const taskManager = taskManagerMock.createStart(); + const ruleTypeRegistry = ruleTypeRegistryMock.create(); + const unsecuredSavedObjectsClient = savedObjectsClientMock.create(); + const encryptedSavedObjects = encryptedSavedObjectsMock.createClient(); + const authorization = alertingAuthorizationMock.create(); + const actionsAuthorization = actionsAuthorizationMock.create(); + const auditLogger = auditLoggerMock.create(); + const internalSavedObjectsRepository = savedObjectsRepositoryMock.create(); + const backfillClient = backfillClientMock.create(); + + const rulesClientParams: jest.Mocked = { + taskManager, + ruleTypeRegistry, + unsecuredSavedObjectsClient, + authorization: authorization as unknown as AlertingAuthorization, + actionsAuthorization: actionsAuthorization as unknown as ActionsAuthorization, + spaceId: 'default', + namespace: 'default', + getUserName: jest.fn(), + createAPIKey: jest.fn(), + logger: loggingSystemMock.create().get(), + internalSavedObjectsRepository, + encryptedSavedObjectsClient: encryptedSavedObjects, + getActionsClient: jest.fn(), + getEventLogClient: jest.fn(), + kibanaVersion, + auditLogger, + maxScheduledPerMinute: 10000, + minimumScheduleInterval: { value: '1m', enforce: false }, + isAuthenticationTypeAPIKey: jest.fn(), + getAuthenticationAPIKey: jest.fn(), + getAlertIndicesAlias: jest.fn(), + alertsService: null, + backfillClient, + isSystemAction: jest.fn(), + connectorAdapterRegistry: new ConnectorAdapterRegistry(), + uiSettings: uiSettingsServiceMock.createStartContract(), + }; + + return rulesClientParams; +}; + +export const rulesClientContextMock = { create }; diff --git a/x-pack/plugins/alerting/server/rules_client/tests/list_rule_types.test.ts b/x-pack/plugins/alerting/server/rules_client/tests/list_rule_types.test.ts index b096ec1c75f7d..7205decb32bb5 100644 --- a/x-pack/plugins/alerting/server/rules_client/tests/list_rule_types.test.ts +++ b/x-pack/plugins/alerting/server/rules_client/tests/list_rule_types.test.ts @@ -17,10 +17,7 @@ import { ruleTypeRegistryMock } from '../../rule_type_registry.mock'; import { alertingAuthorizationMock } from '../../authorization/alerting_authorization.mock'; import { encryptedSavedObjectsMock } from '@kbn/encrypted-saved-objects-plugin/server/mocks'; import { actionsAuthorizationMock } from '@kbn/actions-plugin/server/mocks'; -import { - AlertingAuthorization, - RegistryAlertTypeWithAuth, -} from '../../authorization/alerting_authorization'; +import { AlertingAuthorization } from '../../authorization/alerting_authorization'; import { ActionsAuthorization } from '@kbn/actions-plugin/server'; import { getBeforeSetup } from './lib'; import { RecoveredActionGroup } from '../../../common'; @@ -88,6 +85,7 @@ describe('listRuleTypes', () => { hasFieldsForAAD: false, validLegacyConsumers: [], }; + const myAppAlertType: RegistryRuleType = { actionGroups: [], actionVariables: undefined, @@ -104,7 +102,11 @@ describe('listRuleTypes', () => { hasFieldsForAAD: false, validLegacyConsumers: [], }; - const setOfAlertTypes = new Set([myAppAlertType, alertingAlertType]); + + const setOfAlertTypes = new Map([ + [myAppAlertType.id, myAppAlertType], + [alertingAlertType.id, alertingAlertType], + ]); const authorizedConsumers = { alerts: { read: true, all: true }, @@ -118,62 +120,162 @@ describe('listRuleTypes', () => { test('should return a list of AlertTypes that exist in the registry', async () => { ruleTypeRegistry.list.mockReturnValue(setOfAlertTypes); - authorization.filterByRuleTypeAuthorization.mockResolvedValue( - new Set([ - { ...myAppAlertType, authorizedConsumers }, - { ...alertingAlertType, authorizedConsumers }, + ruleTypeRegistry.has.mockReturnValue(true); + + authorization.getAuthorizedRuleTypes.mockResolvedValue( + new Map([ + [myAppAlertType.id, { authorizedConsumers }], + [alertingAlertType.id, { authorizedConsumers }], ]) ); - expect(await rulesClient.listRuleTypes()).toEqual( - new Set([ - { ...myAppAlertType, authorizedConsumers }, - { ...alertingAlertType, authorizedConsumers }, + + expect(await rulesClient.listRuleTypes()).toMatchInlineSnapshot(` + Array [ + Object { + "actionGroups": Array [], + "actionVariables": undefined, + "authorizedConsumers": Object { + "alerts": Object { + "all": true, + "read": true, + }, + "myApp": Object { + "all": true, + "read": true, + }, + "myOtherApp": Object { + "all": true, + "read": true, + }, + }, + "category": "test", + "defaultActionGroupId": "default", + "enabledInLicense": true, + "hasAlertsMappings": false, + "hasFieldsForAAD": false, + "id": "myAppAlertType", + "isExportable": true, + "minimumLicenseRequired": "basic", + "name": "myAppAlertType", + "producer": "myApp", + "recoveryActionGroup": Object { + "id": "recovered", + "name": "Recovered", + }, + "validLegacyConsumers": Array [], + }, + Object { + "actionGroups": Array [], + "actionVariables": undefined, + "authorizedConsumers": Object { + "alerts": Object { + "all": true, + "read": true, + }, + "myApp": Object { + "all": true, + "read": true, + }, + "myOtherApp": Object { + "all": true, + "read": true, + }, + }, + "category": "test", + "defaultActionGroupId": "default", + "enabledInLicense": true, + "hasAlertsMappings": false, + "hasFieldsForAAD": false, + "id": "alertingAlertType", + "isExportable": true, + "minimumLicenseRequired": "basic", + "name": "alertingAlertType", + "producer": "alerts", + "recoveryActionGroup": Object { + "id": "recovered", + "name": "Recovered", + }, + "validLegacyConsumers": Array [], + }, + ] + `); + }); + + test('should filter out rule types that are not registered in the registry', async () => { + ruleTypeRegistry.list.mockReturnValue(setOfAlertTypes); + ruleTypeRegistry.has.mockImplementation((id: string) => id === myAppAlertType.id); + + authorization.getAuthorizedRuleTypes.mockResolvedValue( + new Map([ + [myAppAlertType.id, { authorizedConsumers }], + [alertingAlertType.id, { authorizedConsumers }], ]) ); + + expect(await rulesClient.listRuleTypes()).toMatchInlineSnapshot(` + Array [ + Object { + "actionGroups": Array [], + "actionVariables": undefined, + "authorizedConsumers": Object { + "alerts": Object { + "all": true, + "read": true, + }, + "myApp": Object { + "all": true, + "read": true, + }, + "myOtherApp": Object { + "all": true, + "read": true, + }, + }, + "category": "test", + "defaultActionGroupId": "default", + "enabledInLicense": true, + "hasAlertsMappings": false, + "hasFieldsForAAD": false, + "id": "myAppAlertType", + "isExportable": true, + "minimumLicenseRequired": "basic", + "name": "myAppAlertType", + "producer": "myApp", + "recoveryActionGroup": Object { + "id": "recovered", + "name": "Recovered", + }, + "validLegacyConsumers": Array [], + }, + ] + `); }); describe('authorization', () => { - const listedTypes = new Set([ - { - actionGroups: [], - actionVariables: undefined, - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - id: 'myType', - name: 'myType', - category: 'test', - producer: 'myApp', - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], - }, - { - id: 'myOtherType', - name: 'Test', - actionGroups: [{ id: 'default', name: 'Default' }], - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - recoveryActionGroup: RecoveredActionGroup, - category: 'test', - producer: 'alerts', - enabledInLicense: true, - hasAlertsMappings: false, - hasFieldsForAAD: false, - validLegacyConsumers: [], - }, - ]); - beforeEach(() => { - ruleTypeRegistry.list.mockReturnValue(listedTypes); - }); - - test('should return a list of AlertTypes that exist in the registry only if the user is authorised to get them', async () => { - const authorizedTypes = new Set([ + const listedTypes = new Map([ + [ + 'myType', { + actionGroups: [], + actionVariables: undefined, + defaultActionGroupId: 'default', + minimumLicenseRequired: 'basic', + isExportable: true, + recoveryActionGroup: RecoveredActionGroup, id: 'myType', + name: 'myType', + category: 'test', + producer: 'myApp', + enabledInLicense: true, + hasAlertsMappings: false, + hasFieldsForAAD: false, + validLegacyConsumers: [], + }, + ], + [ + 'myOtherType', + { + id: 'myOtherType', name: 'Test', actionGroups: [{ id: 'default', name: 'Default' }], defaultActionGroupId: 'default', @@ -182,18 +284,62 @@ describe('listRuleTypes', () => { recoveryActionGroup: RecoveredActionGroup, category: 'test', producer: 'alerts', - authorizedConsumers: { - myApp: { read: true, all: true }, - }, enabledInLicense: true, hasAlertsMappings: false, hasFieldsForAAD: false, validLegacyConsumers: [], }, - ]); - authorization.filterByRuleTypeAuthorization.mockResolvedValue(authorizedTypes); + ], + ]); + + beforeEach(() => { + ruleTypeRegistry.list.mockReturnValue(listedTypes); + ruleTypeRegistry.has.mockReturnValue(true); + }); - expect(await rulesClient.listRuleTypes()).toEqual(authorizedTypes); + test('should return a list of AlertTypes that exist in the registry only if the user is authorized to get them', async () => { + authorization.getAuthorizedRuleTypes.mockResolvedValue( + new Map([ + [ + 'myType', + { + authorizedConsumers: { + myApp: { read: true, all: true }, + }, + }, + ], + ]) + ); + + expect(await rulesClient.listRuleTypes()).toMatchInlineSnapshot(` + Array [ + Object { + "actionGroups": Array [], + "actionVariables": undefined, + "authorizedConsumers": Object { + "myApp": Object { + "all": true, + "read": true, + }, + }, + "category": "test", + "defaultActionGroupId": "default", + "enabledInLicense": true, + "hasAlertsMappings": false, + "hasFieldsForAAD": false, + "id": "myType", + "isExportable": true, + "minimumLicenseRequired": "basic", + "name": "myType", + "producer": "myApp", + "recoveryActionGroup": Object { + "id": "recovered", + "name": "Recovered", + }, + "validLegacyConsumers": Array [], + }, + ] + `); }); }); }); diff --git a/x-pack/plugins/alerting/server/rules_client/types.ts b/x-pack/plugins/alerting/server/rules_client/types.ts index 9a701e1c95c81..afcb4e1037a6c 100644 --- a/x-pack/plugins/alerting/server/rules_client/types.ts +++ b/x-pack/plugins/alerting/server/rules_client/types.ts @@ -23,7 +23,6 @@ import { TaskManagerStartContract } from '@kbn/task-manager-plugin/server'; import { IEventLogClient, IEventLogger } from '@kbn/event-log-plugin/server'; import { AuditLogger } from '@kbn/security-plugin/server'; import { DistributiveOmit } from '@elastic/eui'; -import { RegistryRuleType } from '../rule_type_registry'; import { RuleTypeRegistry, IntervalSchedule, @@ -108,9 +107,6 @@ export type NormalizedAlertActionWithGeneratedValues = | NormalizedAlertDefaultActionWithGeneratedValues | NormalizedAlertSystemActionWithGeneratedValues; -export interface RegistryAlertTypeWithAuth extends RegistryRuleType { - authorizedConsumers: string[]; -} export type CreateAPIKeyResult = | { apiKeysEnabled: false } | { apiKeysEnabled: true; result: SecurityPluginGrantAPIKeyResult }; diff --git a/x-pack/plugins/alerting/server/rules_client_factory.test.ts b/x-pack/plugins/alerting/server/rules_client_factory.test.ts index 4cd7ffbcf0c6c..9af5962915d72 100644 --- a/x-pack/plugins/alerting/server/rules_client_factory.test.ts +++ b/x-pack/plugins/alerting/server/rules_client_factory.test.ts @@ -98,11 +98,11 @@ test('creates a rules client with proper constructor arguments when security is const request = mockRouter.createKibanaRequest(); savedObjectsService.getScopedClient.mockReturnValue(savedObjectsClient); - alertingAuthorizationClientFactory.create.mockReturnValue( + alertingAuthorizationClientFactory.create.mockResolvedValue( alertingAuthorization as unknown as AlertingAuthorization ); - factory.create(request, savedObjectsService); + await factory.create(request, savedObjectsService); expect(savedObjectsService.getScopedClient).toHaveBeenCalledWith(request, { excludedExtensions: [SECURITY_EXTENSION_ID], @@ -154,11 +154,11 @@ test('creates a rules client with proper constructor arguments', async () => { const request = mockRouter.createKibanaRequest(); savedObjectsService.getScopedClient.mockReturnValue(savedObjectsClient); - alertingAuthorizationClientFactory.create.mockReturnValue( + alertingAuthorizationClientFactory.create.mockResolvedValue( alertingAuthorization as unknown as AlertingAuthorization ); - factory.create(request, savedObjectsService); + await factory.create(request, savedObjectsService); expect(savedObjectsService.getScopedClient).toHaveBeenCalledWith(request, { excludedExtensions: [SECURITY_EXTENSION_ID], @@ -203,7 +203,7 @@ test('creates a rules client with proper constructor arguments', async () => { test('getUserName() returns null when security is disabled', async () => { const factory = new RulesClientFactory(); factory.initialize(rulesClientFactoryParams); - factory.create(mockRouter.createKibanaRequest(), savedObjectsService); + await factory.create(mockRouter.createKibanaRequest(), savedObjectsService); const constructorCall = jest.requireMock('./rules_client').RulesClient.mock.calls[0][0]; const userNameResult = await constructorCall.getUserName(); @@ -216,7 +216,7 @@ test('getUserName() returns a name when security is enabled', async () => { ...rulesClientFactoryParams, securityService, }); - factory.create(mockRouter.createKibanaRequest(), savedObjectsService); + await factory.create(mockRouter.createKibanaRequest(), savedObjectsService); const constructorCall = jest.requireMock('./rules_client').RulesClient.mock.calls[0][0]; securityService.authc.getCurrentUser.mockReturnValueOnce({ @@ -229,7 +229,7 @@ test('getUserName() returns a name when security is enabled', async () => { test('getActionsClient() returns ActionsClient', async () => { const factory = new RulesClientFactory(); factory.initialize(rulesClientFactoryParams); - factory.create(mockRouter.createKibanaRequest(), savedObjectsService); + await factory.create(mockRouter.createKibanaRequest(), savedObjectsService); const constructorCall = jest.requireMock('./rules_client').RulesClient.mock.calls[0][0]; const actionsClient = await constructorCall.getActionsClient(); @@ -239,7 +239,7 @@ test('getActionsClient() returns ActionsClient', async () => { test('createAPIKey() returns { apiKeysEnabled: false } when security is disabled', async () => { const factory = new RulesClientFactory(); factory.initialize(rulesClientFactoryParams); - factory.create(mockRouter.createKibanaRequest(), savedObjectsService); + await factory.create(mockRouter.createKibanaRequest(), savedObjectsService); const constructorCall = jest.requireMock('./rules_client').RulesClient.mock.calls[0][0]; const createAPIKeyResult = await constructorCall.createAPIKey(); @@ -249,7 +249,7 @@ test('createAPIKey() returns { apiKeysEnabled: false } when security is disabled test('createAPIKey() returns { apiKeysEnabled: false } when security is enabled but ES security is disabled', async () => { const factory = new RulesClientFactory(); factory.initialize(rulesClientFactoryParams); - factory.create(mockRouter.createKibanaRequest(), savedObjectsService); + await factory.create(mockRouter.createKibanaRequest(), savedObjectsService); const constructorCall = jest.requireMock('./rules_client').RulesClient.mock.calls[0][0]; securityPluginStart.authc.apiKeys.grantAsInternalUser.mockResolvedValueOnce(null); @@ -265,7 +265,7 @@ test('createAPIKey() returns an API key when security is enabled', async () => { securityPluginSetup, securityPluginStart, }); - factory.create(mockRouter.createKibanaRequest(), savedObjectsService); + await factory.create(mockRouter.createKibanaRequest(), savedObjectsService); const constructorCall = jest.requireMock('./rules_client').RulesClient.mock.calls[0][0]; securityPluginStart.authc.apiKeys.grantAsInternalUser.mockResolvedValueOnce({ @@ -296,7 +296,7 @@ test('createAPIKey() throws when security plugin createAPIKey throws an error', securityPluginSetup, securityPluginStart, }); - factory.create(mockRouter.createKibanaRequest(), savedObjectsService); + await factory.create(mockRouter.createKibanaRequest(), savedObjectsService); const constructorCall = jest.requireMock('./rules_client').RulesClient.mock.calls[0][0]; securityPluginStart.authc.apiKeys.grantAsInternalUser.mockRejectedValueOnce( diff --git a/x-pack/plugins/alerting/server/rules_client_factory.ts b/x-pack/plugins/alerting/server/rules_client_factory.ts index f28170b277ac4..f56b0840317bb 100644 --- a/x-pack/plugins/alerting/server/rules_client_factory.ts +++ b/x-pack/plugins/alerting/server/rules_client_factory.ts @@ -115,7 +115,10 @@ export class RulesClientFactory { this.securityService = options.securityService; } - public create(request: KibanaRequest, savedObjects: SavedObjectsServiceStart): RulesClient { + public async create( + request: KibanaRequest, + savedObjects: SavedObjectsServiceStart + ): Promise { const { securityPluginSetup, securityService, securityPluginStart, actions, eventLog } = this; const spaceId = this.getSpaceId(request); @@ -123,6 +126,8 @@ export class RulesClientFactory { throw new Error('AlertingAuthorizationClientFactory is not defined'); } + const authorization = await this.authorization.create(request); + return new RulesClient({ spaceId, kibanaVersion: this.kibanaVersion, @@ -139,7 +144,7 @@ export class RulesClientFactory { AD_HOC_RUN_SAVED_OBJECT_TYPE, ], }), - authorization: this.authorization.create(request), + authorization, actionsAuthorization: actions.getActionsAuthorizationWithRequest(request), namespace: this.spaceIdToNamespace(spaceId), internalSavedObjectsRepository: this.internalSavedObjectsRepository, @@ -169,6 +174,7 @@ export class RulesClientFactory { if (!createAPIKeyResult) { return { apiKeysEnabled: false }; } + return { apiKeysEnabled: true, result: createAPIKeyResult, diff --git a/x-pack/plugins/alerting/server/task_runner/action_scheduler/action_scheduler.test.ts b/x-pack/plugins/alerting/server/task_runner/action_scheduler/action_scheduler.test.ts index 00f1a87aefd71..c0eb08e6d582f 100644 --- a/x-pack/plugins/alerting/server/task_runner/action_scheduler/action_scheduler.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/action_scheduler/action_scheduler.test.ts @@ -2617,7 +2617,6 @@ describe('Action Scheduler', () => { }); expect(buildActionParams).not.toHaveBeenCalledWith(); - expect(actionsClient.ephemeralEnqueuedExecution).not.toHaveBeenCalled(); expect(actionsClient.bulkEnqueueExecution).not.toHaveBeenCalled(); expect(alertingEventLogger.logAction).not.toHaveBeenCalled(); expect(executorParams.logger.warn).toHaveBeenCalledWith( @@ -2662,7 +2661,6 @@ describe('Action Scheduler', () => { expect(res).toEqual({ throttledSummaryActions: {} }); expect(buildActionParams).not.toHaveBeenCalled(); expect(alertsClient.getSummarizedAlerts).not.toHaveBeenCalled(); - expect(actionsClient.ephemeralEnqueuedExecution).not.toHaveBeenCalled(); expect(actionsClient.bulkEnqueueExecution).not.toHaveBeenCalled(); expect(alertingEventLogger.logAction).not.toHaveBeenCalled(); }); diff --git a/x-pack/plugins/alerting/server/task_runner/action_scheduler/action_scheduler.ts b/x-pack/plugins/alerting/server/task_runner/action_scheduler/action_scheduler.ts index fa16cfcabb094..9a174dd236cf1 100644 --- a/x-pack/plugins/alerting/server/task_runner/action_scheduler/action_scheduler.ts +++ b/x-pack/plugins/alerting/server/task_runner/action_scheduler/action_scheduler.ts @@ -5,13 +5,8 @@ * 2.0. */ +import { createTaskRunError, TaskErrorSource } from '@kbn/task-manager-plugin/server'; import { - createTaskRunError, - isEphemeralTaskRejectedDueToCapacityError, - TaskErrorSource, -} from '@kbn/task-manager-plugin/server'; -import { - ExecuteOptions as EnqueueExecutionOptions, ExecutionResponseItem, ExecutionResponseType, } from '@kbn/actions-plugin/server/create_execute_function'; @@ -51,8 +46,6 @@ export class ActionScheduler< IActionScheduler > = []; - private ephemeralActionsToSchedule: number; - constructor( private readonly context: ActionSchedulerOptions< Params, @@ -65,7 +58,6 @@ export class ActionScheduler< AlertData > ) { - this.ephemeralActionsToSchedule = context.taskRunnerContext.maxEphemeralActionsPerRule; for (const [_, scheduler] of Object.entries(schedulers)) { this.schedulers.push(new scheduler(context)); } @@ -101,37 +93,28 @@ export class ActionScheduler< return { throttledSummaryActions }; } - const bulkScheduleRequest: EnqueueExecutionOptions[] = []; - - for (const result of allActionsToScheduleResult) { - await this.runActionAsEphemeralOrAddToBulkScheduleRequest({ - enqueueOptions: result.actionToEnqueue, - bulkScheduleRequest, - }); - } - let bulkScheduleResponse: ExecutionResponseItem[] = []; - if (!!bulkScheduleRequest.length) { - for (const c of chunk(bulkScheduleRequest, BULK_SCHEDULE_CHUNK_SIZE)) { - let enqueueResponse; - try { - enqueueResponse = await withAlertingSpan('alerting:bulk-enqueue-actions', () => - this.context.actionsClient!.bulkEnqueueExecution(c) - ); - } catch (e) { - if (e.statusCode === 404) { - throw createTaskRunError(e, TaskErrorSource.USER); - } - throw createTaskRunError(e, TaskErrorSource.FRAMEWORK); - } - if (enqueueResponse.errors) { - bulkScheduleResponse = bulkScheduleResponse.concat( - enqueueResponse.items.filter( - (i) => i.response === ExecutionResponseType.QUEUED_ACTIONS_LIMIT_ERROR - ) - ); + for (const c of chunk(allActionsToScheduleResult, BULK_SCHEDULE_CHUNK_SIZE)) { + let enqueueResponse; + try { + enqueueResponse = await withAlertingSpan('alerting:bulk-enqueue-actions', () => + this.context.actionsClient!.bulkEnqueueExecution( + c.map((actions) => actions.actionToEnqueue) + ) + ); + } catch (e) { + if (e.statusCode === 404) { + throw createTaskRunError(e, TaskErrorSource.USER); } + throw createTaskRunError(e, TaskErrorSource.FRAMEWORK); + } + if (enqueueResponse.errors) { + bulkScheduleResponse = bulkScheduleResponse.concat( + enqueueResponse.items.filter( + (i) => i.response === ExecutionResponseType.QUEUED_ACTIONS_LIMIT_ERROR + ) + ); } } @@ -175,28 +158,4 @@ export class ActionScheduler< return { throttledSummaryActions }; } - - private async runActionAsEphemeralOrAddToBulkScheduleRequest({ - enqueueOptions, - bulkScheduleRequest, - }: { - enqueueOptions: EnqueueExecutionOptions; - bulkScheduleRequest: EnqueueExecutionOptions[]; - }) { - if ( - this.context.taskRunnerContext.supportsEphemeralTasks && - this.ephemeralActionsToSchedule > 0 - ) { - this.ephemeralActionsToSchedule--; - try { - await this.context.actionsClient!.ephemeralEnqueuedExecution(enqueueOptions); - } catch (err) { - if (isEphemeralTaskRejectedDueToCapacityError(err)) { - bulkScheduleRequest.push(enqueueOptions); - } - } - } else { - bulkScheduleRequest.push(enqueueOptions); - } - } } diff --git a/x-pack/plugins/alerting/server/task_runner/ad_hoc_task_runner.test.ts b/x-pack/plugins/alerting/server/task_runner/ad_hoc_task_runner.test.ts index cfc87f8497eae..ae6467d0dcbf8 100644 --- a/x-pack/plugins/alerting/server/task_runner/ad_hoc_task_runner.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/ad_hoc_task_runner.test.ts @@ -168,13 +168,11 @@ const taskRunnerFactoryInitializerParams: TaskRunnerFactoryInitializerParamsType kibanaBaseUrl: 'https://localhost:5601', logger, maxAlerts: 1000, - maxEphemeralActionsPerRule: 10, ruleTypeRegistry, rulesSettingsService, savedObjects: savedObjectsService, share: {} as SharePluginStart, spaceIdToNamespace: jest.fn().mockReturnValue(undefined), - supportsEphemeralTasks: false, uiSettings: uiSettingsService, usageCounter: mockUsageCounter, isServerless: false, 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 4690ccc653a32..c5e833dee1058 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 @@ -113,7 +113,7 @@ describe('rule_loader', () => { }); }); - test('throws when rule is not enabled', async () => { + test('throws when rule is not enabled', () => { let outcome = 'success'; try { validateRuleAndCreateFakeRequest({ @@ -128,7 +128,7 @@ describe('rule_loader', () => { expect(outcome).toBe('failure'); }); - test('throws when rule type is not enabled', async () => { + test('throws when rule type is not enabled', () => { ruleTypeRegistry.ensureRuleTypeEnabled.mockImplementation(() => { throw new Error('rule-type-not-enabled: 2112'); }); @@ -148,7 +148,7 @@ describe('rule_loader', () => { expect(outcome).toBe('failure'); }); - test('test throws when rule params fail validation', async () => { + test('test throws when rule params fail validation', () => { mockGetAlertFromRaw.mockReturnValueOnce({ name: ruleName, alertTypeId: ruleTypeId, 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 da23b9bdce4ed..bbe927833afd0 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 @@ -53,7 +53,6 @@ import { generateActionOpts, mockDate, mockedRuleTypeSavedObject, - mockRunNowResponse, ruleType, RULE_NAME, generateRunnerResult, @@ -187,38 +186,16 @@ describe('Task Runner', () => { logger, maintenanceWindowsService, maxAlerts: 1000, - maxEphemeralActionsPerRule: 10, ruleTypeRegistry, rulesSettingsService, savedObjects: savedObjectsService, share: {} as SharePluginStart, spaceIdToNamespace: jest.fn().mockReturnValue(undefined), - supportsEphemeralTasks: false, uiSettings: uiSettingsService, usageCounter: mockUsageCounter, isServerless: false, }; - const ephemeralTestParams: Array< - [ - nameExtension: string, - customTaskRunnerFactoryInitializerParams: TaskRunnerFactoryInitializerParamsType, - enqueueFunction: unknown, - isBulk: boolean - ] - > = [ - ['', taskRunnerFactoryInitializerParams, actionsClient.bulkEnqueueExecution, true], - [ - ' (with ephemeral support)', - { - ...taskRunnerFactoryInitializerParams, - supportsEphemeralTasks: true, - }, - actionsClient.ephemeralEnqueuedExecution, - false, - ], - ]; - beforeEach(() => { jest.resetAllMocks(); jest.restoreAllMocks(); // clear spy mock implementations @@ -363,103 +340,95 @@ describe('Task Runner', () => { ).toHaveBeenCalled(); }); - test.each(ephemeralTestParams)( - 'actionsPlugin.execute is called per alert alert that is scheduled %s', - async (nameExtension, customTaskRunnerFactoryInitializerParams, enqueueFunction, isBulk) => { - customTaskRunnerFactoryInitializerParams.actionsPlugin.isActionTypeEnabled.mockReturnValue( - true - ); - customTaskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue( - true - ); - actionsClient.ephemeralEnqueuedExecution.mockResolvedValue(mockRunNowResponse); - ruleType.executor.mockImplementation( - async ({ - services: executorServices, - }: RuleExecutorOptions< - RuleTypeParams, - RuleTypeState, - AlertInstanceState, - AlertInstanceContext, - string, - RuleAlertData - >) => { - executorServices.alertFactory.create('1').scheduleActions('default'); - return { state: {} }; - } - ); - const taskRunner = new TaskRunner({ - ruleType, - taskInstance: mockedTaskInstance, - context: customTaskRunnerFactoryInitializerParams, - inMemoryMetrics, - internalSavedObjectsRepository, - }); - expect(AlertingEventLogger).toHaveBeenCalledTimes(1); + test('actionsPlugin.execute is called per alert alert that is scheduled', async () => { + taskRunnerFactoryInitializerParams.actionsPlugin.isActionTypeEnabled.mockReturnValue(true); + taskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue(true); + ruleType.executor.mockImplementation( + async ({ + services: executorServices, + }: RuleExecutorOptions< + RuleTypeParams, + RuleTypeState, + AlertInstanceState, + AlertInstanceContext, + string, + RuleAlertData + >) => { + executorServices.alertFactory.create('1').scheduleActions('default'); + return { state: {} }; + } + ); + const taskRunner = new TaskRunner({ + ruleType, + taskInstance: mockedTaskInstance, + context: taskRunnerFactoryInitializerParams, + inMemoryMetrics, + internalSavedObjectsRepository, + }); + expect(AlertingEventLogger).toHaveBeenCalledTimes(1); - mockGetAlertFromRaw.mockReturnValue(mockedRuleTypeSavedObject as Rule); - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); - await taskRunner.run(); - expect(enqueueFunction).toHaveBeenCalledTimes(1); - expect(enqueueFunction).toHaveBeenCalledWith( - generateEnqueueFunctionInput({ isBulk, id: '1', foo: true }) - ); + mockGetAlertFromRaw.mockReturnValue(mockedRuleTypeSavedObject as Rule); + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); + await taskRunner.run(); + expect(actionsClient.bulkEnqueueExecution).toHaveBeenCalledTimes(1); + expect(actionsClient.bulkEnqueueExecution).toHaveBeenCalledWith( + generateEnqueueFunctionInput({ isBulk: true, id: '1', foo: true }) + ); - expect(logger.debug).toHaveBeenCalledTimes(6); - expect(logger.debug).nthCalledWith(1, 'executing rule test:1 at 1970-01-01T00:00:00.000Z', { - tags: ['1', 'test'], - }); - expect(logger.debug).nthCalledWith( - 2, - `rule test:1: '${RULE_NAME}' has 1 active alerts: [{\"instanceId\":\"1\",\"actionGroup\":\"default\"}]`, - { tags: ['1', 'test'] } - ); - expect(logger.debug).nthCalledWith( - 3, - 'deprecated ruleRunStatus for test:1: {"lastExecutionDate":"1970-01-01T00:00:00.000Z","status":"active"}', - { tags: ['1', 'test'] } - ); - expect(logger.debug).nthCalledWith( - 4, - 'ruleRunStatus for test:1: {"outcome":"succeeded","outcomeOrder":0,"outcomeMsg":null,"warning":null,"alertsCount":{"active":1,"new":1,"recovered":0,"ignored":0}}', - { tags: ['1', 'test'] } - ); - expect(logger.debug).nthCalledWith( - 5, - 'ruleRunMetrics for test:1: {"numSearches":3,"totalSearchDurationMs":23423,"esSearchDurationMs":33,"numberOfTriggeredActions":1,"numberOfGeneratedActions":1,"numberOfActiveAlerts":1,"numberOfRecoveredAlerts":0,"numberOfNewAlerts":1,"numberOfDelayedAlerts":0,"hasReachedAlertLimit":false,"hasReachedQueuedActionsLimit":false,"triggeredActionsStatus":"complete"}', - { tags: ['1', 'test'] } - ); + expect(logger.debug).toHaveBeenCalledTimes(6); + expect(logger.debug).nthCalledWith(1, 'executing rule test:1 at 1970-01-01T00:00:00.000Z', { + tags: ['1', 'test'], + }); + expect(logger.debug).nthCalledWith( + 2, + `rule test:1: '${RULE_NAME}' has 1 active alerts: [{\"instanceId\":\"1\",\"actionGroup\":\"default\"}]`, + { tags: ['1', 'test'] } + ); + expect(logger.debug).nthCalledWith( + 3, + 'deprecated ruleRunStatus for test:1: {"lastExecutionDate":"1970-01-01T00:00:00.000Z","status":"active"}', + { tags: ['1', 'test'] } + ); + expect(logger.debug).nthCalledWith( + 4, + 'ruleRunStatus for test:1: {"outcome":"succeeded","outcomeOrder":0,"outcomeMsg":null,"warning":null,"alertsCount":{"active":1,"new":1,"recovered":0,"ignored":0}}', + { tags: ['1', 'test'] } + ); + expect(logger.debug).nthCalledWith( + 5, + 'ruleRunMetrics for test:1: {"numSearches":3,"totalSearchDurationMs":23423,"esSearchDurationMs":33,"numberOfTriggeredActions":1,"numberOfGeneratedActions":1,"numberOfActiveAlerts":1,"numberOfRecoveredAlerts":0,"numberOfNewAlerts":1,"numberOfDelayedAlerts":0,"hasReachedAlertLimit":false,"hasReachedQueuedActionsLimit":false,"triggeredActionsStatus":"complete"}', + { tags: ['1', 'test'] } + ); - testAlertingEventLogCalls({ - activeAlerts: 1, - generatedActions: 1, - newAlerts: 1, - triggeredActions: 1, - status: 'active', - logAlert: 2, - logAction: 1, - }); - expect(alertingEventLogger.logAlert).toHaveBeenNthCalledWith( - 1, - generateAlertOpts({ - action: EVENT_LOG_ACTIONS.newInstance, - group: 'default', - state: { start: DATE_1970, duration: '0' }, - }) - ); - expect(alertingEventLogger.logAlert).toHaveBeenNthCalledWith( - 2, - generateAlertOpts({ - action: EVENT_LOG_ACTIONS.activeInstance, - group: 'default', - state: { start: DATE_1970, duration: '0' }, - }) - ); - expect(alertingEventLogger.logAction).toHaveBeenNthCalledWith(1, generateActionOpts()); + testAlertingEventLogCalls({ + activeAlerts: 1, + generatedActions: 1, + newAlerts: 1, + triggeredActions: 1, + status: 'active', + logAlert: 2, + logAction: 1, + }); + expect(alertingEventLogger.logAlert).toHaveBeenNthCalledWith( + 1, + generateAlertOpts({ + action: EVENT_LOG_ACTIONS.newInstance, + group: 'default', + state: { start: DATE_1970, duration: '0' }, + }) + ); + expect(alertingEventLogger.logAlert).toHaveBeenNthCalledWith( + 2, + generateAlertOpts({ + action: EVENT_LOG_ACTIONS.activeInstance, + group: 'default', + state: { start: DATE_1970, duration: '0' }, + }) + ); + expect(alertingEventLogger.logAction).toHaveBeenNthCalledWith(1, generateActionOpts()); - expect(mockUsageCounter.incrementCounter).not.toHaveBeenCalled(); - } - ); + expect(mockUsageCounter.incrementCounter).not.toHaveBeenCalled(); + }); test('actionsPlugin.execute is skipped if muteAll is true', async () => { taskRunnerFactoryInitializerParams.actionsPlugin.isActionTypeEnabled.mockReturnValue(true); @@ -494,7 +463,6 @@ describe('Task Runner', () => { }); encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); await taskRunner.run(); - expect(actionsClient.ephemeralEnqueuedExecution).toHaveBeenCalledTimes(0); expect(logger.debug).toHaveBeenCalledTimes(7); expect(logger.debug).nthCalledWith(1, 'executing rule test:1 at 1970-01-01T00:00:00.000Z', { @@ -633,7 +601,6 @@ describe('Task Runner', () => { const expectedExecutions = shouldBeSnoozed ? 0 : 1; expect(actionsClient.bulkEnqueueExecution).toHaveBeenCalledTimes(expectedExecutions); - expect(actionsClient.ephemeralEnqueuedExecution).toHaveBeenCalledTimes(0); const expectedMessage = `no scheduling of actions for rule test:1: '${RULE_NAME}': rule is snoozed.`; if (expectedExecutions) { @@ -689,7 +656,6 @@ describe('Task Runner', () => { encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); await taskRunner.run(); - expect(actionsClient.ephemeralEnqueuedExecution).toHaveBeenCalledTimes(0); testAlertingEventLogCalls({ activeAlerts: 1, @@ -761,7 +727,6 @@ describe('Task Runner', () => { encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); await taskRunner.run(); - expect(actionsClient.ephemeralEnqueuedExecution).toHaveBeenCalledTimes(0); testAlertingEventLogCalls({ activeAlerts: 1, @@ -824,7 +789,6 @@ describe('Task Runner', () => { encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); await taskRunner.run(); - expect(actionsClient.ephemeralEnqueuedExecution).toHaveBeenCalledTimes(0); testAlertingEventLogCalls({ activeAlerts: 1, @@ -855,202 +819,10 @@ describe('Task Runner', () => { expect(mockUsageCounter.incrementCounter).not.toHaveBeenCalled(); }); - test.each(ephemeralTestParams)( - 'skips firing actions for active alert if alert is muted %s', - async (nameExtension, customTaskRunnerFactoryInitializerParams, enqueueFunction) => { - ( - customTaskRunnerFactoryInitializerParams as TaskRunnerFactoryInitializerParamsType - ).actionsPlugin.isActionTypeEnabled.mockReturnValue(true); - customTaskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue( - true - ); - actionsClient.ephemeralEnqueuedExecution.mockResolvedValue(mockRunNowResponse); - ruleType.executor.mockImplementation( - async ({ - services: executorServices, - }: RuleExecutorOptions< - RuleTypeParams, - RuleTypeState, - AlertInstanceState, - AlertInstanceContext, - string, - RuleAlertData - >) => { - executorServices.alertFactory.create('1').scheduleActions('default'); - executorServices.alertFactory.create('2').scheduleActions('default'); - return { state: {} }; - } - ); - const taskRunner = new TaskRunner({ - ruleType, - taskInstance: mockedTaskInstance, - context: customTaskRunnerFactoryInitializerParams, - inMemoryMetrics, - internalSavedObjectsRepository, - }); - expect(AlertingEventLogger).toHaveBeenCalledTimes(1); - - mockGetAlertFromRaw.mockReturnValue({ - ...(mockedRuleTypeSavedObject as Rule), - mutedInstanceIds: ['2'], - }); - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); - await taskRunner.run(); - expect(enqueueFunction).toHaveBeenCalledTimes(1); - - expect(logger.debug).toHaveBeenCalledTimes(7); - expect(logger.debug).nthCalledWith(1, 'executing rule test:1 at 1970-01-01T00:00:00.000Z', { - tags: ['1', 'test'], - }); - expect(logger.debug).nthCalledWith( - 2, - `rule test:1: '${RULE_NAME}' has 2 active alerts: [{\"instanceId\":\"1\",\"actionGroup\":\"default\"},{\"instanceId\":\"2\",\"actionGroup\":\"default\"}]`, - { tags: ['1', 'test'] } - ); - expect(logger.debug).nthCalledWith( - 3, - `skipping scheduling of actions for '2' in rule test:1: '${RULE_NAME}': rule is muted`, - { tags: ['1', 'test'] } - ); - expect(logger.debug).nthCalledWith( - 4, - 'deprecated ruleRunStatus for test:1: {"lastExecutionDate":"1970-01-01T00:00:00.000Z","status":"active"}', - { tags: ['1', 'test'] } - ); - expect(logger.debug).nthCalledWith( - 5, - 'ruleRunStatus for test:1: {"outcome":"succeeded","outcomeOrder":0,"outcomeMsg":null,"warning":null,"alertsCount":{"active":2,"new":2,"recovered":0,"ignored":0}}', - { tags: ['1', 'test'] } - ); - expect(logger.debug).nthCalledWith( - 6, - 'ruleRunMetrics for test:1: {"numSearches":3,"totalSearchDurationMs":23423,"esSearchDurationMs":33,"numberOfTriggeredActions":1,"numberOfGeneratedActions":1,"numberOfActiveAlerts":2,"numberOfRecoveredAlerts":0,"numberOfNewAlerts":2,"numberOfDelayedAlerts":0,"hasReachedAlertLimit":false,"hasReachedQueuedActionsLimit":false,"triggeredActionsStatus":"complete"}', - { tags: ['1', 'test'] } - ); - expect(mockUsageCounter.incrementCounter).not.toHaveBeenCalled(); - } - ); - - test.each(ephemeralTestParams)( - 'skips firing actions for active alert if alert is throttled %s', - async (nameExtension, customTaskRunnerFactoryInitializerParams, enqueueFunction) => { - ( - customTaskRunnerFactoryInitializerParams as TaskRunnerFactoryInitializerParamsType - ).actionsPlugin.isActionTypeEnabled.mockReturnValue(true); - customTaskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue( - true - ); - actionsClient.ephemeralEnqueuedExecution.mockResolvedValue(mockRunNowResponse); - ruleType.executor.mockImplementation( - async ({ - services: executorServices, - }: RuleExecutorOptions< - RuleTypeParams, - RuleTypeState, - AlertInstanceState, - AlertInstanceContext, - string, - RuleAlertData - >) => { - executorServices.alertFactory.create('1').scheduleActions('default'); - executorServices.alertFactory.create('2').scheduleActions('default'); - return { state: {} }; - } - ); - const taskRunner = new TaskRunner({ - ruleType, - internalSavedObjectsRepository, - taskInstance: { - ...mockedTaskInstance, - state: { - ...mockedTaskInstance.state, - alertInstances: { - '2': { - meta: { - lastScheduledActions: { date: moment().toISOString(), group: 'default' }, - }, - state: { - bar: false, - start: DATE_1969, - duration: MOCK_DURATION, - }, - }, - }, - }, - }, - context: taskRunnerFactoryInitializerParams, - inMemoryMetrics, - }); - expect(AlertingEventLogger).toHaveBeenCalledTimes(1); - - mockGetAlertFromRaw.mockReturnValue({ - ...(mockedRuleTypeSavedObject as Rule), - notifyWhen: 'onThrottleInterval', - throttle: '1d', - }); - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); - await taskRunner.run(); - // expect(enqueueFunction).toHaveBeenCalledTimes(1); - - // expect(logger.debug).toHaveBeenCalledTimes(5); - expect(logger.debug).nthCalledWith( - 3, - `skipping scheduling of actions for '2' in rule test:1: '${RULE_NAME}': rule is throttled`, - { tags: ['1', 'test'] } - ); - } - ); - - test.each(ephemeralTestParams)( - 'skips firing actions for active alert when alert is muted even if notifyWhen === onActionGroupChange %s', - async (nameExtension, customTaskRunnerFactoryInitializerParams, enqueueFunction) => { - customTaskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue( - true - ); - ruleType.executor.mockImplementation( - async ({ - services: executorServices, - }: RuleExecutorOptions< - RuleTypeParams, - RuleTypeState, - AlertInstanceState, - AlertInstanceContext, - string, - RuleAlertData - >) => { - executorServices.alertFactory.create('1').scheduleActions('default'); - executorServices.alertFactory.create('2').scheduleActions('default'); - return { state: {} }; - } - ); - const taskRunner = new TaskRunner({ - ruleType, - internalSavedObjectsRepository, - taskInstance: mockedTaskInstance, - context: customTaskRunnerFactoryInitializerParams, - inMemoryMetrics, - }); - expect(AlertingEventLogger).toHaveBeenCalledTimes(1); - - mockGetAlertFromRaw.mockReturnValue({ - ...(mockedRuleTypeSavedObject as Rule), - mutedInstanceIds: ['2'], - notifyWhen: 'onActionGroupChange', - }); - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); - await taskRunner.run(); - expect(enqueueFunction).toHaveBeenCalledTimes(1); - expect(logger.debug).toHaveBeenCalledTimes(7); - expect(logger.debug).nthCalledWith( - 3, - `skipping scheduling of actions for '2' in rule test:1: '${RULE_NAME}': rule is muted`, - { tags: ['1', 'test'] } - ); - } - ); - - test('actionsPlugin.execute is not called when notifyWhen=onActionGroupChange and alert state does not change', async () => { - taskRunnerFactoryInitializerParams.actionsPlugin.isActionTypeEnabled.mockReturnValue(true); + test('skips firing actions for active alert if alert is muted', async () => { + ( + taskRunnerFactoryInitializerParams as TaskRunnerFactoryInitializerParamsType + ).actionsPlugin.isActionTypeEnabled.mockReturnValue(true); taskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue(true); ruleType.executor.mockImplementation( async ({ @@ -1064,13 +836,188 @@ describe('Task Runner', () => { RuleAlertData >) => { executorServices.alertFactory.create('1').scheduleActions('default'); + executorServices.alertFactory.create('2').scheduleActions('default'); return { state: {} }; } ); const taskRunner = new TaskRunner({ ruleType, - internalSavedObjectsRepository, - taskInstance: { + taskInstance: mockedTaskInstance, + context: taskRunnerFactoryInitializerParams, + inMemoryMetrics, + internalSavedObjectsRepository, + }); + expect(AlertingEventLogger).toHaveBeenCalledTimes(1); + + mockGetAlertFromRaw.mockReturnValue({ + ...(mockedRuleTypeSavedObject as Rule), + mutedInstanceIds: ['2'], + }); + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); + await taskRunner.run(); + expect(actionsClient.bulkEnqueueExecution).toHaveBeenCalledTimes(1); + + expect(logger.debug).toHaveBeenCalledTimes(7); + expect(logger.debug).nthCalledWith(1, 'executing rule test:1 at 1970-01-01T00:00:00.000Z', { + tags: ['1', 'test'], + }); + expect(logger.debug).nthCalledWith( + 2, + `rule test:1: '${RULE_NAME}' has 2 active alerts: [{\"instanceId\":\"1\",\"actionGroup\":\"default\"},{\"instanceId\":\"2\",\"actionGroup\":\"default\"}]`, + { tags: ['1', 'test'] } + ); + expect(logger.debug).nthCalledWith( + 3, + `skipping scheduling of actions for '2' in rule test:1: '${RULE_NAME}': rule is muted`, + { tags: ['1', 'test'] } + ); + expect(logger.debug).nthCalledWith( + 4, + 'deprecated ruleRunStatus for test:1: {"lastExecutionDate":"1970-01-01T00:00:00.000Z","status":"active"}', + { tags: ['1', 'test'] } + ); + expect(logger.debug).nthCalledWith( + 5, + 'ruleRunStatus for test:1: {"outcome":"succeeded","outcomeOrder":0,"outcomeMsg":null,"warning":null,"alertsCount":{"active":2,"new":2,"recovered":0,"ignored":0}}', + { tags: ['1', 'test'] } + ); + expect(logger.debug).nthCalledWith( + 6, + 'ruleRunMetrics for test:1: {"numSearches":3,"totalSearchDurationMs":23423,"esSearchDurationMs":33,"numberOfTriggeredActions":1,"numberOfGeneratedActions":1,"numberOfActiveAlerts":2,"numberOfRecoveredAlerts":0,"numberOfNewAlerts":2,"numberOfDelayedAlerts":0,"hasReachedAlertLimit":false,"hasReachedQueuedActionsLimit":false,"triggeredActionsStatus":"complete"}', + { tags: ['1', 'test'] } + ); + expect(mockUsageCounter.incrementCounter).not.toHaveBeenCalled(); + }); + + test('skips firing actions for active alert if alert is throttled', async () => { + ( + taskRunnerFactoryInitializerParams as TaskRunnerFactoryInitializerParamsType + ).actionsPlugin.isActionTypeEnabled.mockReturnValue(true); + taskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue(true); + ruleType.executor.mockImplementation( + async ({ + services: executorServices, + }: RuleExecutorOptions< + RuleTypeParams, + RuleTypeState, + AlertInstanceState, + AlertInstanceContext, + string, + RuleAlertData + >) => { + executorServices.alertFactory.create('1').scheduleActions('default'); + executorServices.alertFactory.create('2').scheduleActions('default'); + return { state: {} }; + } + ); + const taskRunner = new TaskRunner({ + ruleType, + internalSavedObjectsRepository, + taskInstance: { + ...mockedTaskInstance, + state: { + ...mockedTaskInstance.state, + alertInstances: { + '2': { + meta: { + lastScheduledActions: { date: moment().toISOString(), group: 'default' }, + }, + state: { + bar: false, + start: DATE_1969, + duration: MOCK_DURATION, + }, + }, + }, + }, + }, + context: taskRunnerFactoryInitializerParams, + inMemoryMetrics, + }); + expect(AlertingEventLogger).toHaveBeenCalledTimes(1); + + mockGetAlertFromRaw.mockReturnValue({ + ...(mockedRuleTypeSavedObject as Rule), + notifyWhen: 'onThrottleInterval', + throttle: '1d', + }); + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); + await taskRunner.run(); + // expect(enqueueFunction).toHaveBeenCalledTimes(1); + + // expect(logger.debug).toHaveBeenCalledTimes(5); + expect(logger.debug).nthCalledWith( + 3, + `skipping scheduling of actions for '2' in rule test:1: '${RULE_NAME}': rule is throttled`, + { tags: ['1', 'test'] } + ); + }); + + test('skips firing actions for active alert when alert is muted even if notifyWhen === onActionGroupChange', async () => { + taskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue(true); + ruleType.executor.mockImplementation( + async ({ + services: executorServices, + }: RuleExecutorOptions< + RuleTypeParams, + RuleTypeState, + AlertInstanceState, + AlertInstanceContext, + string, + RuleAlertData + >) => { + executorServices.alertFactory.create('1').scheduleActions('default'); + executorServices.alertFactory.create('2').scheduleActions('default'); + return { state: {} }; + } + ); + const taskRunner = new TaskRunner({ + ruleType, + internalSavedObjectsRepository, + taskInstance: mockedTaskInstance, + context: taskRunnerFactoryInitializerParams, + inMemoryMetrics, + }); + expect(AlertingEventLogger).toHaveBeenCalledTimes(1); + + mockGetAlertFromRaw.mockReturnValue({ + ...(mockedRuleTypeSavedObject as Rule), + mutedInstanceIds: ['2'], + notifyWhen: 'onActionGroupChange', + }); + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); + await taskRunner.run(); + expect(actionsClient.bulkEnqueueExecution).toHaveBeenCalledTimes(1); + expect(logger.debug).toHaveBeenCalledTimes(7); + expect(logger.debug).nthCalledWith( + 3, + `skipping scheduling of actions for '2' in rule test:1: '${RULE_NAME}': rule is muted`, + { tags: ['1', 'test'] } + ); + }); + + test('actionsPlugin.execute is not called when notifyWhen=onActionGroupChange and alert state does not change', async () => { + taskRunnerFactoryInitializerParams.actionsPlugin.isActionTypeEnabled.mockReturnValue(true); + taskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue(true); + ruleType.executor.mockImplementation( + async ({ + services: executorServices, + }: RuleExecutorOptions< + RuleTypeParams, + RuleTypeState, + AlertInstanceState, + AlertInstanceContext, + string, + RuleAlertData + >) => { + executorServices.alertFactory.create('1').scheduleActions('default'); + return { state: {} }; + } + ); + const taskRunner = new TaskRunner({ + ruleType, + internalSavedObjectsRepository, + taskInstance: { ...mockedTaskInstance, state: { ...mockedTaskInstance.state, @@ -1099,7 +1046,6 @@ describe('Task Runner', () => { }); encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); await taskRunner.run(); - expect(actionsClient.ephemeralEnqueuedExecution).toHaveBeenCalledTimes(0); testAlertingEventLogCalls({ activeAlerts: 1, @@ -1118,690 +1064,620 @@ describe('Task Runner', () => { expect(mockUsageCounter.incrementCounter).not.toHaveBeenCalled(); }); - test.each(ephemeralTestParams)( - 'actionsPlugin.execute is called when notifyWhen=onActionGroupChange and alert state has changed %s', - async (nameExtension, customTaskRunnerFactoryInitializerParams, enqueueFunction) => { - customTaskRunnerFactoryInitializerParams.actionsPlugin.isActionTypeEnabled.mockReturnValue( - true - ); - customTaskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue( - true - ); - ruleType.executor.mockImplementation( - async ({ - services: executorServices, - }: RuleExecutorOptions< - RuleTypeParams, - RuleTypeState, - AlertInstanceState, - AlertInstanceContext, - string, - RuleAlertData - >) => { - executorServices.alertFactory.create('1').scheduleActions('default'); - return { state: {} }; - } - ); - const taskRunner = new TaskRunner({ - ruleType, - internalSavedObjectsRepository, - taskInstance: { - ...mockedTaskInstance, - state: { - ...mockedTaskInstance.state, - alertInstances: { - '1': { - meta: { - lastScheduledActions: { group: 'newGroup', date: new Date().toISOString() }, - }, - state: { bar: false }, + test('actionsPlugin.execute is called when notifyWhen=onActionGroupChange and alert state has changed', async () => { + taskRunnerFactoryInitializerParams.actionsPlugin.isActionTypeEnabled.mockReturnValue(true); + taskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue(true); + ruleType.executor.mockImplementation( + async ({ + services: executorServices, + }: RuleExecutorOptions< + RuleTypeParams, + RuleTypeState, + AlertInstanceState, + AlertInstanceContext, + string, + RuleAlertData + >) => { + executorServices.alertFactory.create('1').scheduleActions('default'); + return { state: {} }; + } + ); + const taskRunner = new TaskRunner({ + ruleType, + internalSavedObjectsRepository, + taskInstance: { + ...mockedTaskInstance, + state: { + ...mockedTaskInstance.state, + alertInstances: { + '1': { + meta: { + lastScheduledActions: { group: 'newGroup', date: new Date().toISOString() }, }, + state: { bar: false }, }, }, }, - context: customTaskRunnerFactoryInitializerParams, - inMemoryMetrics, - }); - expect(AlertingEventLogger).toHaveBeenCalledTimes(1); + }, + context: taskRunnerFactoryInitializerParams, + inMemoryMetrics, + }); + expect(AlertingEventLogger).toHaveBeenCalledTimes(1); - mockGetAlertFromRaw.mockReturnValue({ - ...(mockedRuleTypeSavedObject as Rule), - notifyWhen: 'onActionGroupChange', - }); - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); + mockGetAlertFromRaw.mockReturnValue({ + ...(mockedRuleTypeSavedObject as Rule), + notifyWhen: 'onActionGroupChange', + }); + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); - await taskRunner.run(); + await taskRunner.run(); - testAlertingEventLogCalls({ - activeAlerts: 1, - triggeredActions: 1, - generatedActions: 1, - status: 'active', - logAlert: 1, - logAction: 1, - }); - expect(alertingEventLogger.logAlert).toHaveBeenNthCalledWith( - 1, - generateAlertOpts({ - action: EVENT_LOG_ACTIONS.activeInstance, - group: 'default', - state: { bar: false }, - }) - ); - expect(alertingEventLogger.logAction).toHaveBeenNthCalledWith(1, generateActionOpts({})); + testAlertingEventLogCalls({ + activeAlerts: 1, + triggeredActions: 1, + generatedActions: 1, + status: 'active', + logAlert: 1, + logAction: 1, + }); + expect(alertingEventLogger.logAlert).toHaveBeenNthCalledWith( + 1, + generateAlertOpts({ + action: EVENT_LOG_ACTIONS.activeInstance, + group: 'default', + state: { bar: false }, + }) + ); + expect(alertingEventLogger.logAction).toHaveBeenNthCalledWith(1, generateActionOpts({})); - expect(enqueueFunction).toHaveBeenCalledTimes(1); - expect(mockUsageCounter.incrementCounter).not.toHaveBeenCalled(); - } - ); + expect(actionsClient.bulkEnqueueExecution).toHaveBeenCalledTimes(1); + expect(mockUsageCounter.incrementCounter).not.toHaveBeenCalled(); + }); - test.each(ephemeralTestParams)( - 'includes the apiKey in the request used to initialize the actionsClient %s', - async (nameExtension, customTaskRunnerFactoryInitializerParams, enqueueFunction, isBulk) => { - customTaskRunnerFactoryInitializerParams.actionsPlugin.isActionTypeEnabled.mockReturnValue( - true - ); - customTaskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue( - true - ); - actionsClient.ephemeralEnqueuedExecution.mockResolvedValue(mockRunNowResponse); - ruleType.executor.mockImplementation( - async ({ - services: executorServices, - }: RuleExecutorOptions< - RuleTypeParams, - RuleTypeState, - AlertInstanceState, - AlertInstanceContext, - string, - RuleAlertData - >) => { - executorServices.alertFactory.create('1').scheduleActions('default'); - return { state: {} }; - } - ); - const taskRunner = new TaskRunner({ - ruleType, - internalSavedObjectsRepository, - taskInstance: mockedTaskInstance, - context: customTaskRunnerFactoryInitializerParams, - inMemoryMetrics, - }); - expect(AlertingEventLogger).toHaveBeenCalled(); + test('includes the apiKey in the request used to initialize the actionsClient', async () => { + taskRunnerFactoryInitializerParams.actionsPlugin.isActionTypeEnabled.mockReturnValue(true); + taskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue(true); + ruleType.executor.mockImplementation( + async ({ + services: executorServices, + }: RuleExecutorOptions< + RuleTypeParams, + RuleTypeState, + AlertInstanceState, + AlertInstanceContext, + string, + RuleAlertData + >) => { + executorServices.alertFactory.create('1').scheduleActions('default'); + return { state: {} }; + } + ); + const taskRunner = new TaskRunner({ + ruleType, + internalSavedObjectsRepository, + taskInstance: mockedTaskInstance, + context: taskRunnerFactoryInitializerParams, + inMemoryMetrics, + }); + expect(AlertingEventLogger).toHaveBeenCalled(); - mockGetAlertFromRaw.mockReturnValue(mockedRuleTypeSavedObject as Rule); - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); - await taskRunner.run(); - expect( - customTaskRunnerFactoryInitializerParams.actionsPlugin.getActionsClientWithRequest - ).toHaveBeenCalledWith( - expect.objectContaining({ - headers: { - // base64 encoded "123:abc" - authorization: 'ApiKey MTIzOmFiYw==', - }, - }) - ); + mockGetAlertFromRaw.mockReturnValue(mockedRuleTypeSavedObject as Rule); + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); + await taskRunner.run(); + expect( + taskRunnerFactoryInitializerParams.actionsPlugin.getActionsClientWithRequest + ).toHaveBeenCalledWith( + expect.objectContaining({ + headers: { + // base64 encoded "123:abc" + authorization: 'ApiKey MTIzOmFiYw==', + }, + }) + ); - const [request] = - customTaskRunnerFactoryInitializerParams.actionsPlugin.getActionsClientWithRequest.mock - .calls[0]; + const [request] = + taskRunnerFactoryInitializerParams.actionsPlugin.getActionsClientWithRequest.mock.calls[0]; - expect(customTaskRunnerFactoryInitializerParams.basePathService.set).toHaveBeenCalledWith( - request, - '/' - ); + expect(taskRunnerFactoryInitializerParams.basePathService.set).toHaveBeenCalledWith( + request, + '/' + ); - expect(enqueueFunction).toHaveBeenCalledTimes(1); - expect(enqueueFunction).toHaveBeenCalledWith( - generateEnqueueFunctionInput({ isBulk, id: '1', foo: true }) - ); + expect(actionsClient.bulkEnqueueExecution).toHaveBeenCalledTimes(1); + expect(actionsClient.bulkEnqueueExecution).toHaveBeenCalledWith( + generateEnqueueFunctionInput({ isBulk: true, id: '1', foo: true }) + ); - testAlertingEventLogCalls({ - activeAlerts: 1, - newAlerts: 1, - triggeredActions: 1, - generatedActions: 1, - status: 'active', - logAlert: 2, - logAction: 1, - }); - expect(alertingEventLogger.logAlert).toHaveBeenNthCalledWith( - 1, - generateAlertOpts({ - action: EVENT_LOG_ACTIONS.newInstance, - group: 'default', - state: { start: DATE_1970, duration: '0' }, - }) - ); - expect(alertingEventLogger.logAlert).toHaveBeenNthCalledWith( - 2, - generateAlertOpts({ - action: EVENT_LOG_ACTIONS.activeInstance, - group: 'default', - state: { start: DATE_1970, duration: '0' }, - }) - ); - expect(alertingEventLogger.logAction).toHaveBeenNthCalledWith(1, generateActionOpts({})); + testAlertingEventLogCalls({ + activeAlerts: 1, + newAlerts: 1, + triggeredActions: 1, + generatedActions: 1, + status: 'active', + logAlert: 2, + logAction: 1, + }); + expect(alertingEventLogger.logAlert).toHaveBeenNthCalledWith( + 1, + generateAlertOpts({ + action: EVENT_LOG_ACTIONS.newInstance, + group: 'default', + state: { start: DATE_1970, duration: '0' }, + }) + ); + expect(alertingEventLogger.logAlert).toHaveBeenNthCalledWith( + 2, + generateAlertOpts({ + action: EVENT_LOG_ACTIONS.activeInstance, + group: 'default', + state: { start: DATE_1970, duration: '0' }, + }) + ); + expect(alertingEventLogger.logAction).toHaveBeenNthCalledWith(1, generateActionOpts({})); - expect(mockUsageCounter.incrementCounter).not.toHaveBeenCalled(); - } - ); + expect(mockUsageCounter.incrementCounter).not.toHaveBeenCalled(); + }); - test.each(ephemeralTestParams)( - 'fire recovered actions for execution for the alertInstances which is in the recovered state %s', - async (nameExtension, customTaskRunnerFactoryInitializerParams, enqueueFunction, isBulk) => { - customTaskRunnerFactoryInitializerParams.actionsPlugin.isActionTypeEnabled.mockReturnValue( - true - ); - customTaskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue( - true - ); - actionsClient.ephemeralEnqueuedExecution.mockResolvedValue(mockRunNowResponse); + test('fire recovered actions for execution for the alertInstances which is in the recovered state', async () => { + taskRunnerFactoryInitializerParams.actionsPlugin.isActionTypeEnabled.mockReturnValue(true); + taskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue(true); - ruleType.executor.mockImplementation( - async ({ - services: executorServices, - }: RuleExecutorOptions< - RuleTypeParams, - RuleTypeState, - AlertInstanceState, - AlertInstanceContext, - string, - RuleAlertData - >) => { - executorServices.alertFactory.create('1').scheduleActions('default'); - return { state: {} }; - } - ); - const taskRunner = new TaskRunner({ - ruleType, - internalSavedObjectsRepository, - taskInstance: { - ...mockedTaskInstance, - state: { - ...mockedTaskInstance.state, - alertInstances: { - '1': { - meta: {}, - state: { - bar: false, - start: DATE_1969, - duration: '80000000000', - }, + ruleType.executor.mockImplementation( + async ({ + services: executorServices, + }: RuleExecutorOptions< + RuleTypeParams, + RuleTypeState, + AlertInstanceState, + AlertInstanceContext, + string, + RuleAlertData + >) => { + executorServices.alertFactory.create('1').scheduleActions('default'); + return { state: {} }; + } + ); + const taskRunner = new TaskRunner({ + ruleType, + internalSavedObjectsRepository, + taskInstance: { + ...mockedTaskInstance, + state: { + ...mockedTaskInstance.state, + alertInstances: { + '1': { + meta: {}, + state: { + bar: false, + start: DATE_1969, + duration: '80000000000', }, - '2': { - meta: {}, - state: { - bar: false, - start: '1969-12-31T06:00:00.000Z', - duration: '70000000000', - }, + }, + '2': { + meta: {}, + state: { + bar: false, + start: '1969-12-31T06:00:00.000Z', + duration: '70000000000', }, }, }, }, - context: customTaskRunnerFactoryInitializerParams, - inMemoryMetrics, - }); - expect(AlertingEventLogger).toHaveBeenCalled(); + }, + context: taskRunnerFactoryInitializerParams, + inMemoryMetrics, + }); + expect(AlertingEventLogger).toHaveBeenCalled(); - mockGetAlertFromRaw.mockReturnValue(mockedRuleTypeSavedObject as Rule); - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); - const runnerResult = await taskRunner.run(); - expect(runnerResult.state.alertInstances).toEqual( - generateAlertInstance({ - id: 1, - duration: MOCK_DURATION, - start: DATE_1969, - flappingHistory: [false], - }) - ); + mockGetAlertFromRaw.mockReturnValue(mockedRuleTypeSavedObject as Rule); + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); + const runnerResult = await taskRunner.run(); + expect(runnerResult.state.alertInstances).toEqual( + generateAlertInstance({ + id: 1, + duration: MOCK_DURATION, + start: DATE_1969, + flappingHistory: [false], + }) + ); - expect(logger.debug).toHaveBeenCalledTimes(7); - expect(logger.debug).nthCalledWith(1, 'executing rule test:1 at 1970-01-01T00:00:00.000Z', { - tags: ['1', 'test'], - }); - expect(logger.debug).nthCalledWith( - 2, - `rule test:1: '${RULE_NAME}' has 1 active alerts: [{\"instanceId\":\"1\",\"actionGroup\":\"default\"}]`, - { tags: ['1', 'test'] } - ); - expect(logger.debug).nthCalledWith( - 3, - `rule test:1: '${RULE_NAME}' has 1 recovered alerts: [\"2\"]`, - { tags: ['1', 'test'] } - ); - expect(logger.debug).nthCalledWith( - 4, - 'deprecated ruleRunStatus for test:1: {"lastExecutionDate":"1970-01-01T00:00:00.000Z","status":"active"}', - { tags: ['1', 'test'] } - ); - expect(logger.debug).nthCalledWith( - 5, - 'ruleRunStatus for test:1: {"outcome":"succeeded","outcomeOrder":0,"outcomeMsg":null,"warning":null,"alertsCount":{"active":1,"new":0,"recovered":1,"ignored":0}}', - { tags: ['1', 'test'] } - ); - expect(logger.debug).nthCalledWith( - 6, - 'ruleRunMetrics for test:1: {"numSearches":3,"totalSearchDurationMs":23423,"esSearchDurationMs":33,"numberOfTriggeredActions":2,"numberOfGeneratedActions":2,"numberOfActiveAlerts":1,"numberOfRecoveredAlerts":1,"numberOfNewAlerts":0,"numberOfDelayedAlerts":0,"hasReachedAlertLimit":false,"hasReachedQueuedActionsLimit":false,"triggeredActionsStatus":"complete"}', - { tags: ['1', 'test'] } - ); + expect(logger.debug).toHaveBeenCalledTimes(7); + expect(logger.debug).nthCalledWith(1, 'executing rule test:1 at 1970-01-01T00:00:00.000Z', { + tags: ['1', 'test'], + }); + expect(logger.debug).nthCalledWith( + 2, + `rule test:1: '${RULE_NAME}' has 1 active alerts: [{\"instanceId\":\"1\",\"actionGroup\":\"default\"}]`, + { tags: ['1', 'test'] } + ); + expect(logger.debug).nthCalledWith( + 3, + `rule test:1: '${RULE_NAME}' has 1 recovered alerts: [\"2\"]`, + { tags: ['1', 'test'] } + ); + expect(logger.debug).nthCalledWith( + 4, + 'deprecated ruleRunStatus for test:1: {"lastExecutionDate":"1970-01-01T00:00:00.000Z","status":"active"}', + { tags: ['1', 'test'] } + ); + expect(logger.debug).nthCalledWith( + 5, + 'ruleRunStatus for test:1: {"outcome":"succeeded","outcomeOrder":0,"outcomeMsg":null,"warning":null,"alertsCount":{"active":1,"new":0,"recovered":1,"ignored":0}}', + { tags: ['1', 'test'] } + ); + expect(logger.debug).nthCalledWith( + 6, + 'ruleRunMetrics for test:1: {"numSearches":3,"totalSearchDurationMs":23423,"esSearchDurationMs":33,"numberOfTriggeredActions":2,"numberOfGeneratedActions":2,"numberOfActiveAlerts":1,"numberOfRecoveredAlerts":1,"numberOfNewAlerts":0,"numberOfDelayedAlerts":0,"hasReachedAlertLimit":false,"hasReachedQueuedActionsLimit":false,"triggeredActionsStatus":"complete"}', + { tags: ['1', 'test'] } + ); - testAlertingEventLogCalls({ - activeAlerts: 1, - recoveredAlerts: 1, - triggeredActions: 2, - generatedActions: 2, - status: 'active', - logAlert: 2, - logAction: 2, - }); - expect(alertingEventLogger.logAlert).toHaveBeenNthCalledWith( - 1, - generateAlertOpts({ - action: EVENT_LOG_ACTIONS.recoveredInstance, - id: '2', - state: { - bar: false, - start: '1969-12-31T06:00:00.000Z', - duration: '64800000000000', - end: DATE_1970, - }, - }) - ); - expect(alertingEventLogger.logAlert).toHaveBeenNthCalledWith( - 2, - generateAlertOpts({ - action: EVENT_LOG_ACTIONS.activeInstance, - group: 'default', - state: { bar: false, start: DATE_1969, duration: MOCK_DURATION }, - }) - ); - expect(alertingEventLogger.logAction).toHaveBeenNthCalledWith(1, generateActionOpts({})); - expect(alertingEventLogger.logAction).toHaveBeenNthCalledWith( - 2, - generateActionOpts({ id: '2', alertId: '2', alertGroup: 'recovered', uuid: '222-222' }) - ); + testAlertingEventLogCalls({ + activeAlerts: 1, + recoveredAlerts: 1, + triggeredActions: 2, + generatedActions: 2, + status: 'active', + logAlert: 2, + logAction: 2, + }); + expect(alertingEventLogger.logAlert).toHaveBeenNthCalledWith( + 1, + generateAlertOpts({ + action: EVENT_LOG_ACTIONS.recoveredInstance, + id: '2', + state: { + bar: false, + start: '1969-12-31T06:00:00.000Z', + duration: '64800000000000', + end: DATE_1970, + }, + }) + ); + expect(alertingEventLogger.logAlert).toHaveBeenNthCalledWith( + 2, + generateAlertOpts({ + action: EVENT_LOG_ACTIONS.activeInstance, + group: 'default', + state: { bar: false, start: DATE_1969, duration: MOCK_DURATION }, + }) + ); + expect(alertingEventLogger.logAction).toHaveBeenNthCalledWith(1, generateActionOpts({})); + expect(alertingEventLogger.logAction).toHaveBeenNthCalledWith( + 2, + generateActionOpts({ id: '2', alertId: '2', alertGroup: 'recovered', uuid: '222-222' }) + ); - expect(enqueueFunction).toHaveBeenCalledTimes(isBulk ? 1 : 2); - expect(enqueueFunction).toHaveBeenCalledWith( - isBulk - ? [ - generateEnqueueFunctionInput({ isBulk: false, id: '1', foo: true }), - generateEnqueueFunctionInput({ - isBulk: false, - id: '2', - isResolved: true, - uuid: '222-222', - }), - ] - : generateEnqueueFunctionInput({ isBulk: false, id: '1', foo: true }) - ); - expect(mockUsageCounter.incrementCounter).not.toHaveBeenCalled(); - jest.resetAllMocks(); - } - ); + expect(actionsClient.bulkEnqueueExecution).toHaveBeenCalledTimes(1); + expect(actionsClient.bulkEnqueueExecution).toHaveBeenCalledWith([ + generateEnqueueFunctionInput({ isBulk: false, id: '1', foo: true }), + generateEnqueueFunctionInput({ + isBulk: false, + id: '2', + isResolved: true, + uuid: '222-222', + }), + ]); + expect(mockUsageCounter.incrementCounter).not.toHaveBeenCalled(); + jest.resetAllMocks(); + }); - test.each(ephemeralTestParams)( - "should skip alertInstances which weren't active on the previous execution %s", - async (nameExtension, customTaskRunnerFactoryInitializerParams, enqueueFunction, isBulk) => { - customTaskRunnerFactoryInitializerParams.actionsPlugin.isActionTypeEnabled.mockReturnValue( - true - ); - customTaskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue( - true - ); - actionsClient.ephemeralEnqueuedExecution.mockResolvedValue(mockRunNowResponse); + test("should skip alertInstances which weren't active on the previous execution", async () => { + taskRunnerFactoryInitializerParams.actionsPlugin.isActionTypeEnabled.mockReturnValue(true); + taskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue(true); - ruleType.executor.mockImplementation( - async ({ - services: executorServices, - }: RuleExecutorOptions< - RuleTypeParams, - RuleTypeState, - AlertInstanceState, - AlertInstanceContext, - string, - RuleAlertData - >) => { - executorServices.alertFactory.create('1').scheduleActions('default'); + ruleType.executor.mockImplementation( + async ({ + services: executorServices, + }: RuleExecutorOptions< + RuleTypeParams, + RuleTypeState, + AlertInstanceState, + AlertInstanceContext, + string, + RuleAlertData + >) => { + executorServices.alertFactory.create('1').scheduleActions('default'); - // create an instance, but don't schedule any actions, so it doesn't go active - executorServices.alertFactory.create('3'); - return { state: {} }; - } - ); - const taskRunner = new TaskRunner({ - ruleType, - internalSavedObjectsRepository, - taskInstance: { - ...mockedTaskInstance, - state: { - ...mockedTaskInstance.state, - alertInstances: { - '1': { meta: {}, state: { bar: false } }, - '2': { meta: {}, state: { bar: false } }, - }, + // create an instance, but don't schedule any actions, so it doesn't go active + executorServices.alertFactory.create('3'); + return { state: {} }; + } + ); + const taskRunner = new TaskRunner({ + ruleType, + internalSavedObjectsRepository, + taskInstance: { + ...mockedTaskInstance, + state: { + ...mockedTaskInstance.state, + alertInstances: { + '1': { meta: {}, state: { bar: false } }, + '2': { meta: {}, state: { bar: false } }, }, }, - context: customTaskRunnerFactoryInitializerParams, - inMemoryMetrics, - }); - expect(AlertingEventLogger).toHaveBeenCalled(); - - mockGetAlertFromRaw.mockReturnValue(mockedRuleTypeSavedObject as Rule); - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); - const runnerResult = await taskRunner.run(); - expect(runnerResult.state.alertInstances).toEqual( - generateAlertInstance({ - id: 1, - flappingHistory: [false], - }) - ); + }, + context: taskRunnerFactoryInitializerParams, + inMemoryMetrics, + }); + expect(AlertingEventLogger).toHaveBeenCalled(); - expect(logger.debug).toHaveBeenCalledWith( - `rule test:1: '${RULE_NAME}' has 1 active alerts: [{\"instanceId\":\"1\",\"actionGroup\":\"default\"}]`, - { tags: ['1', 'test'] } - ); + mockGetAlertFromRaw.mockReturnValue(mockedRuleTypeSavedObject as Rule); + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); + const runnerResult = await taskRunner.run(); + expect(runnerResult.state.alertInstances).toEqual( + generateAlertInstance({ + id: 1, + flappingHistory: [false], + }) + ); - expect(logger.debug).nthCalledWith( - 3, - `rule test:1: '${RULE_NAME}' has 1 recovered alerts: [\"2\"]`, - { tags: ['1', 'test'] } - ); - expect(logger.debug).nthCalledWith( - 4, - `deprecated ruleRunStatus for test:1: {"lastExecutionDate":"1970-01-01T00:00:00.000Z","status":"active"}`, - { tags: ['1', 'test'] } - ); - expect(logger.debug).nthCalledWith( - 5, - 'ruleRunStatus for test:1: {"outcome":"succeeded","outcomeOrder":0,"outcomeMsg":null,"warning":null,"alertsCount":{"active":1,"new":0,"recovered":1,"ignored":0}}', - { tags: ['1', 'test'] } - ); - expect(logger.debug).nthCalledWith( - 6, - `ruleRunMetrics for test:1: {"numSearches":3,"totalSearchDurationMs":23423,"esSearchDurationMs":33,"numberOfTriggeredActions":2,"numberOfGeneratedActions":2,"numberOfActiveAlerts":1,"numberOfRecoveredAlerts":1,"numberOfNewAlerts":0,"numberOfDelayedAlerts":0,"hasReachedAlertLimit":false,"hasReachedQueuedActionsLimit":false,"triggeredActionsStatus":"complete"}`, - { tags: ['1', 'test'] } - ); + expect(logger.debug).toHaveBeenCalledWith( + `rule test:1: '${RULE_NAME}' has 1 active alerts: [{\"instanceId\":\"1\",\"actionGroup\":\"default\"}]`, + { tags: ['1', 'test'] } + ); - testAlertingEventLogCalls({ - activeAlerts: 1, - recoveredAlerts: 1, - triggeredActions: 2, - generatedActions: 2, - status: 'active', - logAlert: 2, - logAction: 2, - }); + expect(logger.debug).nthCalledWith( + 3, + `rule test:1: '${RULE_NAME}' has 1 recovered alerts: [\"2\"]`, + { tags: ['1', 'test'] } + ); + expect(logger.debug).nthCalledWith( + 4, + `deprecated ruleRunStatus for test:1: {"lastExecutionDate":"1970-01-01T00:00:00.000Z","status":"active"}`, + { tags: ['1', 'test'] } + ); + expect(logger.debug).nthCalledWith( + 5, + 'ruleRunStatus for test:1: {"outcome":"succeeded","outcomeOrder":0,"outcomeMsg":null,"warning":null,"alertsCount":{"active":1,"new":0,"recovered":1,"ignored":0}}', + { tags: ['1', 'test'] } + ); + expect(logger.debug).nthCalledWith( + 6, + `ruleRunMetrics for test:1: {"numSearches":3,"totalSearchDurationMs":23423,"esSearchDurationMs":33,"numberOfTriggeredActions":2,"numberOfGeneratedActions":2,"numberOfActiveAlerts":1,"numberOfRecoveredAlerts":1,"numberOfNewAlerts":0,"numberOfDelayedAlerts":0,"hasReachedAlertLimit":false,"hasReachedQueuedActionsLimit":false,"triggeredActionsStatus":"complete"}`, + { tags: ['1', 'test'] } + ); - expect(enqueueFunction).toHaveBeenCalledTimes(isBulk ? 1 : 2); - if (isBulk) { - expect((enqueueFunction as jest.Mock).mock.calls[0][0][0].id).toEqual('1'); - expect((enqueueFunction as jest.Mock).mock.calls[0][0][1].id).toEqual('2'); - } else { - expect((enqueueFunction as jest.Mock).mock.calls[0][0].id).toEqual('1'); - expect((enqueueFunction as jest.Mock).mock.calls[1][0].id).toEqual('2'); - } - expect(mockUsageCounter.incrementCounter).not.toHaveBeenCalled(); - } - ); + testAlertingEventLogCalls({ + activeAlerts: 1, + recoveredAlerts: 1, + triggeredActions: 2, + generatedActions: 2, + status: 'active', + logAlert: 2, + logAction: 2, + }); - test.each(ephemeralTestParams)( - 'fire actions under a custom recovery group when specified on an alert type for alertInstances which are in the recovered state %s', - async (nameExtension, customTaskRunnerFactoryInitializerParams, enqueueFunction, isBulk) => { - customTaskRunnerFactoryInitializerParams.actionsPlugin.isActionTypeEnabled.mockReturnValue( - true - ); - customTaskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue( - true - ); + expect(actionsClient.bulkEnqueueExecution).toHaveBeenCalledTimes(1); + expect((actionsClient.bulkEnqueueExecution as jest.Mock).mock.calls[0][0][0].id).toEqual('1'); + expect((actionsClient.bulkEnqueueExecution as jest.Mock).mock.calls[0][0][1].id).toEqual('2'); + expect(mockUsageCounter.incrementCounter).not.toHaveBeenCalled(); + }); - actionsClient.ephemeralEnqueuedExecution.mockResolvedValue(mockRunNowResponse); + test('fire actions under a custom recovery group when specified on an alert type for alertInstances which are in the recovered state', async () => { + taskRunnerFactoryInitializerParams.actionsPlugin.isActionTypeEnabled.mockReturnValue(true); + taskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue(true); - const recoveryActionGroup = { - id: 'customRecovered', - name: 'Custom Recovered', - }; - const ruleTypeWithCustomRecovery = { - ...ruleType, - recoveryActionGroup, - actionGroups: [{ id: 'default', name: 'Default' }, recoveryActionGroup], - }; + const recoveryActionGroup = { + id: 'customRecovered', + name: 'Custom Recovered', + }; + const ruleTypeWithCustomRecovery = { + ...ruleType, + recoveryActionGroup, + actionGroups: [{ id: 'default', name: 'Default' }, recoveryActionGroup], + }; - ruleTypeWithCustomRecovery.executor.mockImplementation( - async ({ - services: executorServices, - }: RuleExecutorOptions< - RuleTypeParams, - RuleTypeState, - AlertInstanceState, - AlertInstanceContext, - string, - RuleAlertData - >) => { - executorServices.alertFactory.create('1').scheduleActions('default'); - return { state: {} }; - } - ); - const taskRunner = new TaskRunner({ - ruleType: ruleTypeWithCustomRecovery, - internalSavedObjectsRepository, - taskInstance: { - ...mockedTaskInstance, - state: { - ...mockedTaskInstance.state, - alertInstances: { - '1': { meta: {}, state: { bar: false } }, - '2': { meta: {}, state: { bar: false } }, - }, + ruleTypeWithCustomRecovery.executor.mockImplementation( + async ({ + services: executorServices, + }: RuleExecutorOptions< + RuleTypeParams, + RuleTypeState, + AlertInstanceState, + AlertInstanceContext, + string, + RuleAlertData + >) => { + executorServices.alertFactory.create('1').scheduleActions('default'); + return { state: {} }; + } + ); + const taskRunner = new TaskRunner({ + ruleType: ruleTypeWithCustomRecovery, + internalSavedObjectsRepository, + taskInstance: { + ...mockedTaskInstance, + state: { + ...mockedTaskInstance.state, + alertInstances: { + '1': { meta: {}, state: { bar: false } }, + '2': { meta: {}, state: { bar: false } }, }, }, - context: customTaskRunnerFactoryInitializerParams, - inMemoryMetrics, - }); - expect(AlertingEventLogger).toHaveBeenCalled(); + }, + context: taskRunnerFactoryInitializerParams, + inMemoryMetrics, + }); + expect(AlertingEventLogger).toHaveBeenCalled(); - mockGetAlertFromRaw.mockReturnValue({ - ...(mockedRuleTypeSavedObject as Rule), - actions: [ - { - group: 'default', - id: '1', - actionTypeId: 'action', - params: { - foo: true, - }, - uuid: '111-111', + mockGetAlertFromRaw.mockReturnValue({ + ...(mockedRuleTypeSavedObject as Rule), + actions: [ + { + group: 'default', + id: '1', + actionTypeId: 'action', + params: { + foo: true, }, - { - group: recoveryActionGroup.id, - id: '2', - actionTypeId: 'action', - params: { - isResolved: true, - }, - uuid: '222-222', + uuid: '111-111', + }, + { + group: recoveryActionGroup.id, + id: '2', + actionTypeId: 'action', + params: { + isResolved: true, }, - ], - }); - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); - const runnerResult = await taskRunner.run(); - expect(runnerResult.state.alertInstances).toEqual( - generateAlertInstance({ - id: 1, - flappingHistory: [false], - }) - ); + uuid: '222-222', + }, + ], + }); + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); + const runnerResult = await taskRunner.run(); + expect(runnerResult.state.alertInstances).toEqual( + generateAlertInstance({ + id: 1, + flappingHistory: [false], + }) + ); - testAlertingEventLogCalls({ - ruleTypeDef: ruleTypeWithCustomRecovery, - activeAlerts: 1, - recoveredAlerts: 1, - triggeredActions: 2, - generatedActions: 2, - status: 'active', - logAlert: 2, - logAction: 2, - }); + testAlertingEventLogCalls({ + ruleTypeDef: ruleTypeWithCustomRecovery, + activeAlerts: 1, + recoveredAlerts: 1, + triggeredActions: 2, + generatedActions: 2, + status: 'active', + logAlert: 2, + logAction: 2, + }); - expect(enqueueFunction).toHaveBeenCalledTimes(isBulk ? 1 : 2); - expect(enqueueFunction).toHaveBeenCalledWith( - isBulk - ? [ - generateEnqueueFunctionInput({ isBulk: false, id: '1', foo: true }), - generateEnqueueFunctionInput({ - isBulk: false, - id: '2', - isResolved: true, - uuid: '222-222', - }), - ] - : generateEnqueueFunctionInput({ isBulk: false, id: '1', foo: true }) - ); - expect(mockUsageCounter.incrementCounter).not.toHaveBeenCalled(); - } - ); + expect(actionsClient.bulkEnqueueExecution).toHaveBeenCalledTimes(1); + expect(actionsClient.bulkEnqueueExecution).toHaveBeenCalledWith([ + generateEnqueueFunctionInput({ isBulk: false, id: '1', foo: true }), + generateEnqueueFunctionInput({ + isBulk: false, + id: '2', + isResolved: true, + uuid: '222-222', + }), + ]); + expect(mockUsageCounter.incrementCounter).not.toHaveBeenCalled(); + }); - test.each(ephemeralTestParams)( - 'triggers summary actions (Per rule run)', - async (nameExtension, customTaskRunnerFactoryInitializerParams, enqueueFunction, isBulk) => { - customTaskRunnerFactoryInitializerParams.actionsPlugin.isActionTypeEnabled.mockReturnValue( - true - ); - customTaskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue( - true - ); - actionsClient.ephemeralEnqueuedExecution.mockResolvedValue(mockRunNowResponse); - ruleType.executor.mockImplementation(async () => { - return { state: {} }; - }); + test('triggers summary actions (Per rule run)', async () => { + taskRunnerFactoryInitializerParams.actionsPlugin.isActionTypeEnabled.mockReturnValue(true); + taskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue(true); + ruleType.executor.mockImplementation(async () => { + return { state: {} }; + }); - alertsClient.getProcessedAlerts.mockReturnValue({}); - alertsClient.getSummarizedAlerts.mockResolvedValue({ - new: { - count: 1, - data: [mockAAD], - }, - ongoing: { count: 0, data: [] }, - recovered: { count: 0, data: [] }, - }); - alertsService.createAlertsClient.mockImplementation(() => alertsClient); + alertsClient.getProcessedAlerts.mockReturnValue({}); + alertsClient.getSummarizedAlerts.mockResolvedValue({ + new: { + count: 1, + data: [mockAAD], + }, + ongoing: { count: 0, data: [] }, + recovered: { count: 0, data: [] }, + }); + alertsService.createAlertsClient.mockImplementation(() => alertsClient); - const taskRunner = new TaskRunner({ - ruleType, - internalSavedObjectsRepository, - taskInstance: mockedTaskInstance, - context: customTaskRunnerFactoryInitializerParams, - inMemoryMetrics, - }); - expect(AlertingEventLogger).toHaveBeenCalledTimes(1); + const taskRunner = new TaskRunner({ + ruleType, + internalSavedObjectsRepository, + taskInstance: mockedTaskInstance, + context: taskRunnerFactoryInitializerParams, + inMemoryMetrics, + }); + expect(AlertingEventLogger).toHaveBeenCalledTimes(1); - mockGetAlertFromRaw.mockReturnValue({ - ...(mockedRuleTypeSavedObject as Rule), - actions: [ - { - group: 'default', - id: '1', - actionTypeId: 'slack', - frequency: { - notifyWhen: 'onActiveAlert', - summary: true, - throttle: null, - }, - params: { - foo: true, - }, - uuid: '111-111', + mockGetAlertFromRaw.mockReturnValue({ + ...(mockedRuleTypeSavedObject as Rule), + actions: [ + { + group: 'default', + id: '1', + actionTypeId: 'slack', + frequency: { + notifyWhen: 'onActiveAlert', + summary: true, + throttle: null, }, - ], - }); - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); - await taskRunner.run(); + params: { + foo: true, + }, + uuid: '111-111', + }, + ], + }); + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); + await taskRunner.run(); - expect(enqueueFunction).toHaveBeenCalledTimes(1); - expect(enqueueFunction).toHaveBeenCalledWith( - generateEnqueueFunctionInput({ isBulk, id: '1', foo: true, actionTypeId: 'slack' }) - ); - } - ); + expect(actionsClient.bulkEnqueueExecution).toHaveBeenCalledTimes(1); + expect(actionsClient.bulkEnqueueExecution).toHaveBeenCalledWith( + generateEnqueueFunctionInput({ isBulk: true, id: '1', foo: true, actionTypeId: 'slack' }) + ); + }); - test.each(ephemeralTestParams)( - 'triggers summary actions (Custom Frequency)', - async (nameExtension, customTaskRunnerFactoryInitializerParams, enqueueFunction, isBulk) => { - customTaskRunnerFactoryInitializerParams.actionsPlugin.isActionTypeEnabled.mockReturnValue( - true - ); - customTaskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue( - true - ); - actionsClient.ephemeralEnqueuedExecution.mockResolvedValue(mockRunNowResponse); - ruleType.executor.mockImplementation(async () => { - return { state: {} }; - }); - alertsClient.getProcessedAlerts.mockReturnValue({}); - alertsClient.getSummarizedAlerts.mockResolvedValue({ - new: { - count: 1, - data: [mockAAD], - }, - ongoing: { count: 0, data: [] }, - recovered: { count: 0, data: [] }, - }); + test('triggers summary actions (Custom Frequency)', async () => { + taskRunnerFactoryInitializerParams.actionsPlugin.isActionTypeEnabled.mockReturnValue(true); + taskRunnerFactoryInitializerParams.actionsPlugin.isActionExecutable.mockReturnValue(true); + ruleType.executor.mockImplementation(async () => { + return { state: {} }; + }); + alertsClient.getProcessedAlerts.mockReturnValue({}); + alertsClient.getSummarizedAlerts.mockResolvedValue({ + new: { + count: 1, + data: [mockAAD], + }, + ongoing: { count: 0, data: [] }, + recovered: { count: 0, data: [] }, + }); - alertsClient.getAlertsToSerialize.mockResolvedValueOnce({ state: {}, meta: {} }); - alertsService.createAlertsClient.mockImplementation(() => alertsClient); + alertsClient.getAlertsToSerialize.mockResolvedValueOnce({ state: {}, meta: {} }); + alertsService.createAlertsClient.mockImplementation(() => alertsClient); - const taskRunner = new TaskRunner({ - ruleType, - internalSavedObjectsRepository, - taskInstance: mockedTaskInstance, - context: customTaskRunnerFactoryInitializerParams, - inMemoryMetrics, - }); - expect(AlertingEventLogger).toHaveBeenCalledTimes(1); + const taskRunner = new TaskRunner({ + ruleType, + internalSavedObjectsRepository, + taskInstance: mockedTaskInstance, + context: taskRunnerFactoryInitializerParams, + inMemoryMetrics, + }); + expect(AlertingEventLogger).toHaveBeenCalledTimes(1); - mockGetAlertFromRaw.mockReturnValue({ - ...(mockedRuleTypeSavedObject as Rule), - actions: [ - { - group: 'default', - id: '1', - actionTypeId: 'slack', - frequency: { - notifyWhen: 'onThrottleInterval', - summary: true, - throttle: '1h', - }, - params: { - foo: true, - }, - uuid: '111-111', + mockGetAlertFromRaw.mockReturnValue({ + ...(mockedRuleTypeSavedObject as Rule), + actions: [ + { + group: 'default', + id: '1', + actionTypeId: 'slack', + frequency: { + notifyWhen: 'onThrottleInterval', + summary: true, + throttle: '1h', }, - ], - }); + params: { + foo: true, + }, + uuid: '111-111', + }, + ], + }); - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); - const result = await taskRunner.run(); - - expect(alertsClient.getSummarizedAlerts).toHaveBeenCalledWith({ - start: new Date('1969-12-31T23:00:00.000Z'), - end: new Date(DATE_1970), - ruleId: '1', - spaceId: 'default', - excludedAlertInstanceIds: [], - }); + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); + const result = await taskRunner.run(); - expect(enqueueFunction).toHaveBeenCalledTimes(1); - expect(enqueueFunction).toHaveBeenCalledWith( - generateEnqueueFunctionInput({ isBulk, id: '1', foo: true, actionTypeId: 'slack' }) - ); - expect(result.state.summaryActions).toEqual({ - '111-111': { date: new Date(DATE_1970).toISOString() }, - }); - } - ); + expect(alertsClient.getSummarizedAlerts).toHaveBeenCalledWith({ + start: new Date('1969-12-31T23:00:00.000Z'), + end: new Date(DATE_1970), + ruleId: '1', + spaceId: 'default', + excludedAlertInstanceIds: [], + }); + + expect(actionsClient.bulkEnqueueExecution).toHaveBeenCalledTimes(1); + expect(actionsClient.bulkEnqueueExecution).toHaveBeenCalledWith( + generateEnqueueFunctionInput({ isBulk: true, id: '1', foo: true, actionTypeId: 'slack' }) + ); + expect(result.state.summaryActions).toEqual({ + '111-111': { date: new Date(DATE_1970).toISOString() }, + }); + }); test('persists alertInstances passed in from state, only if they are scheduled for execution', async () => { ruleType.executor.mockImplementation( @@ -2629,7 +2505,6 @@ describe('Task Runner', () => { }, context: { ...taskRunnerFactoryInitializerParams, - supportsEphemeralTasks: true, }, inMemoryMetrics, }); 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 ed8e4a1259e6c..3d0cd5ab05059 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 @@ -216,13 +216,11 @@ describe('Task Runner', () => { logger, maintenanceWindowsService, maxAlerts: 1000, - maxEphemeralActionsPerRule: 10, ruleTypeRegistry, rulesSettingsService, savedObjects: savedObjectsService, share: {} as SharePluginStart, spaceIdToNamespace: jest.fn().mockReturnValue(undefined), - supportsEphemeralTasks: false, uiSettings: uiSettingsService, usageCounter: mockUsageCounter, isServerless: false, 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 066cff2944f26..54faa13de8352 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 @@ -149,13 +149,11 @@ describe('Task Runner Cancel', () => { logger, maintenanceWindowsService, maxAlerts: 1000, - maxEphemeralActionsPerRule: 10, ruleTypeRegistry, rulesSettingsService, savedObjects: savedObjectsService, share: {} as SharePluginStart, spaceIdToNamespace: jest.fn().mockReturnValue(undefined), - supportsEphemeralTasks: false, uiSettings: uiSettingsService, usageCounter: mockUsageCounter, isServerless: false, 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 7aa0105f7c06e..94acd3a0b2db6 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 @@ -120,13 +120,11 @@ describe('Task Runner Factory', () => { logger: loggingSystemMock.create().get(), maintenanceWindowsService, maxAlerts: 1000, - maxEphemeralActionsPerRule: 10, ruleTypeRegistry: ruleTypeRegistryMock.create(), rulesSettingsService, savedObjects: savedObjectsService, share: {} as SharePluginStart, spaceIdToNamespace: jest.fn().mockReturnValue(undefined), - supportsEphemeralTasks: true, uiSettings: uiSettingsService, usageCounter: mockUsageCounter, isServerless: false, diff --git a/x-pack/plugins/alerting/server/task_runner/types.ts b/x-pack/plugins/alerting/server/task_runner/types.ts index b401155ab06d7..f3e08aff2c3b7 100644 --- a/x-pack/plugins/alerting/server/task_runner/types.ts +++ b/x-pack/plugins/alerting/server/task_runner/types.ts @@ -172,13 +172,11 @@ export interface TaskRunnerContext { logger: Logger; maintenanceWindowsService: MaintenanceWindowsService; maxAlerts: number; - maxEphemeralActionsPerRule: number; ruleTypeRegistry: RuleTypeRegistry; rulesSettingsService: RulesSettingsService; savedObjects: SavedObjectsServiceStart; share: SharePluginStart; spaceIdToNamespace: SpaceIdToNamespaceFunction; - supportsEphemeralTasks: boolean; uiSettings: UiSettingsServiceStart; usageCounter?: UsageCounter; isServerless: boolean; diff --git a/x-pack/plugins/alerting/server/test_utils/index.ts b/x-pack/plugins/alerting/server/test_utils/index.ts index 036454f2f80c6..401225f171f06 100644 --- a/x-pack/plugins/alerting/server/test_utils/index.ts +++ b/x-pack/plugins/alerting/server/test_utils/index.ts @@ -57,7 +57,6 @@ export function generateAlertingConfig(): AlertingConfig { interval: '5m', removalDelay: '1h', }, - maxEphemeralActionsPerAlert: 10, cancelAlertsOnRuleTimeout: true, rules: { maxScheduledPerMinute: 10000, diff --git a/x-pack/plugins/alerting/server/types.ts b/x-pack/plugins/alerting/server/types.ts index c7ef8f563843c..4c3d9ee57f51d 100644 --- a/x-pack/plugins/alerting/server/types.ts +++ b/x-pack/plugins/alerting/server/types.ts @@ -29,7 +29,7 @@ import { Alert } from '@kbn/alerts-as-data-utils'; import { ActionsApiRequestHandlerContext } from '@kbn/actions-plugin/server'; import { AlertsHealth } from '@kbn/alerting-types'; import { RuleTypeRegistry as OrigruleTypeRegistry } from './rule_type_registry'; -import { PluginSetupContract, PluginStartContract } from './plugin'; +import { AlertingServerSetup, AlertingServerStart } from './plugin'; import { RulesClient } from './rules_client'; import { RulesSettingsClient, @@ -62,7 +62,7 @@ export type { RuleTypeParams }; * @public */ export interface AlertingApiRequestHandlerContext { - getRulesClient: () => RulesClient; + getRulesClient: () => Promise; getRulesSettingsClient: (withoutAuth?: boolean) => RulesSettingsClient; getMaintenanceWindowClient: () => MaintenanceWindowClient; listTypes: RuleTypeRegistry['list']; @@ -362,8 +362,8 @@ export type PartialRuleWithLegacyId = Pic Partial, 'id'>>; export interface AlertingPlugin { - setup: PluginSetupContract; - start: PluginStartContract; + setup: AlertingServerSetup; + start: AlertingServerStart; } export interface AlertsConfigType { diff --git a/x-pack/plugins/alerting/tsconfig.json b/x-pack/plugins/alerting/tsconfig.json index d261a00db74ca..6019f8711d681 100644 --- a/x-pack/plugins/alerting/tsconfig.json +++ b/x-pack/plugins/alerting/tsconfig.json @@ -70,9 +70,11 @@ "@kbn/search-types", "@kbn/alerting-state-types", "@kbn/core-security-server", + "@kbn/security-plugin-types-server", "@kbn/core-http-server", "@kbn/zod", "@kbn/core-saved-objects-base-server-internal", + "@kbn/core-security-server-mocks", "@kbn/response-ops-rule-params", "@kbn/core-http-server-utils" ], diff --git a/x-pack/plugins/asset_inventory/README.md b/x-pack/plugins/asset_inventory/README.md new file mode 100755 index 0000000000000..e1dd9d4ac8900 --- /dev/null +++ b/x-pack/plugins/asset_inventory/README.md @@ -0,0 +1,13 @@ +# Asset Inventory Kibana Plugin + +Centralized asset inventory experience within the Elastic Security solution. A central place for users to view and manage all their assets from different environments. + +--- + +## Development + +See the [kibana contributing guide](https://github.com/elastic/kibana/blob/main/CONTRIBUTING.md) for instructions setting up your development environment. + +## Testing + +For general guidelines, read [Kibana Testing Guide](https://www.elastic.co/guide/en/kibana/current/development-tests.html) for more details diff --git a/x-pack/plugins/asset_inventory/common/index.ts b/x-pack/plugins/asset_inventory/common/index.ts new file mode 100644 index 0000000000000..9f5311be877cc --- /dev/null +++ b/x-pack/plugins/asset_inventory/common/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 const PLUGIN_ID = 'assetInventory'; +export const PLUGIN_NAME = 'assetInventory'; diff --git a/x-pack/plugins/asset_inventory/kibana.jsonc b/x-pack/plugins/asset_inventory/kibana.jsonc new file mode 100644 index 0000000000000..dbb813be7aa4e --- /dev/null +++ b/x-pack/plugins/asset_inventory/kibana.jsonc @@ -0,0 +1,17 @@ +{ + "type": "plugin", + "id": "@kbn/asset-inventory-plugin", + "owner": ["@elastic/kibana-cloud-security-posture"], + "group": "security", + "visibility": "private", + "description": "Centralized asset inventory experience within the Elastic Security solution. A central place for users to view and manage all their assets from different environments", + "plugin": { + "id": "assetInventory", + "browser": true, + "server": true, + "configPath": ["xpack", "assetInventory"], + "requiredPlugins": [], + "requiredBundles": [], + "optionalPlugins": [] + } +} diff --git a/x-pack/plugins/asset_inventory/package.json b/x-pack/plugins/asset_inventory/package.json new file mode 100644 index 0000000000000..7abfb7bf63378 --- /dev/null +++ b/x-pack/plugins/asset_inventory/package.json @@ -0,0 +1,7 @@ +{ + "author": "Elastic", + "name": "@kbn/asset-inventory-plugin", + "version": "1.0.0", + "private": true, + "license": "Elastic License 2.0" +} diff --git a/x-pack/plugins/asset_inventory/public/application.tsx b/x-pack/plugins/asset_inventory/public/application.tsx new file mode 100644 index 0000000000000..f442f01d17f7c --- /dev/null +++ b/x-pack/plugins/asset_inventory/public/application.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 from 'react'; +import ReactDOM from 'react-dom'; +import type { AppMountParameters, CoreStart } from '@kbn/core/public'; +import type { AppPluginStartDependencies } from './types'; +import { AssetInventoryApp } from './components/app'; + +export const renderApp = ( + { notifications, http }: CoreStart, + {}: AppPluginStartDependencies, + { appBasePath, element }: AppMountParameters +) => { + ReactDOM.render( + , + element + ); + + return () => ReactDOM.unmountComponentAtNode(element); +}; diff --git a/x-pack/plugins/asset_inventory/public/components/app.tsx b/x-pack/plugins/asset_inventory/public/components/app.tsx new file mode 100644 index 0000000000000..924091034353b --- /dev/null +++ b/x-pack/plugins/asset_inventory/public/components/app.tsx @@ -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. + */ +import React from 'react'; +import { FormattedMessage, I18nProvider } from '@kbn/i18n-react'; +import { BrowserRouter as Router } from '@kbn/shared-ux-router'; +import { EuiPageTemplate, EuiTitle } from '@elastic/eui'; +import type { CoreStart } from '@kbn/core/public'; + +interface AssetInventoryAppDeps { + basename: string; + notifications: CoreStart['notifications']; + http: CoreStart['http']; +} + +export const AssetInventoryApp = ({ basename }: AssetInventoryAppDeps) => { + return ( + + + <> + + + +

        + +

        +
        +
        + +
        + +
        +
        + ); +}; diff --git a/x-pack/plugins/asset_inventory/public/index.ts b/x-pack/plugins/asset_inventory/public/index.ts new file mode 100644 index 0000000000000..269cab2ad181a --- /dev/null +++ b/x-pack/plugins/asset_inventory/public/index.ts @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { AssetInventoryPlugin } from './plugin'; + +// This exports static code and TypeScript types, +// as well as, Kibana Platform `plugin()` initializer. +export function plugin() { + return new AssetInventoryPlugin(); +} +export type { AssetInventoryPluginSetup, AssetInventoryPluginStart } from './types'; diff --git a/x-pack/plugins/asset_inventory/public/plugin.ts b/x-pack/plugins/asset_inventory/public/plugin.ts new file mode 100644 index 0000000000000..fd2841f5b2335 --- /dev/null +++ b/x-pack/plugins/asset_inventory/public/plugin.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 { AppMountParameters, CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; +import type { + AssetInventoryPluginSetup, + AssetInventoryPluginStart, + AppPluginStartDependencies, +} from './types'; + +export class AssetInventoryPlugin + implements Plugin +{ + public setup(core: CoreSetup): AssetInventoryPluginSetup { + return {}; + } + public start( + coreStart: CoreStart, + depsStart: AppPluginStartDependencies + ): AssetInventoryPluginStart { + return { + getAssetInventoryPage: async (params: AppMountParameters) => { + // Load application bundle + const { renderApp } = await import('./application'); + // Render the application + return renderApp(coreStart, depsStart as AppPluginStartDependencies, params); + }, + }; + } + + public stop() {} +} diff --git a/x-pack/plugins/asset_inventory/public/types.ts b/x-pack/plugins/asset_inventory/public/types.ts new file mode 100644 index 0000000000000..a551b4d231c3d --- /dev/null +++ b/x-pack/plugins/asset_inventory/public/types.ts @@ -0,0 +1,15 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface AssetInventoryPluginSetup {} + +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface AssetInventoryPluginStart {} + +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface AppPluginStartDependencies {} diff --git a/x-pack/plugins/asset_inventory/server/create_transforms/create_transforms.ts b/x-pack/plugins/asset_inventory/server/create_transforms/create_transforms.ts new file mode 100644 index 0000000000000..0d3d0e8f8e0c4 --- /dev/null +++ b/x-pack/plugins/asset_inventory/server/create_transforms/create_transforms.ts @@ -0,0 +1,142 @@ +/* + * 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 { transformError } from '@kbn/securitysolution-es-utils'; +import { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; +import type { ElasticsearchClient, Logger } from '@kbn/core/server'; +import { errors } from '@elastic/elasticsearch'; + +// TODO: Move transforms to integration package +export const initializeTransforms = async ( + esClient: ElasticsearchClient, + logger: Logger +): Promise => { + // Deletes old assets from previous versions as part of upgrade process + await deletePreviousTransformsVersions(esClient, logger); + // TODO initialize transforms here + // await initializeTransform(esClient, , logger); +}; + +export const initializeTransform = async ( + esClient: ElasticsearchClient, + transform: TransformPutTransformRequest, + logger: Logger +) => { + const success = await createTransformIfNotExists(esClient, transform, logger); + + if (success) { + await startTransformIfNotStarted(esClient, transform.transform_id, logger); + } +}; + +/** + * Checks if a transform exists, And if not creates it + * + * @param transform - the transform to create. If a transform with the same transform_id already exists, nothing is created or updated. + * + * @return true if the transform exits or created, false otherwise. + */ +export const createTransformIfNotExists = async ( + esClient: ElasticsearchClient, + transform: TransformPutTransformRequest, + logger: Logger +) => { + try { + await esClient.transform.getTransform({ + transform_id: transform.transform_id, + }); + return true; + } catch (existErr) { + const existError = transformError(existErr); + if (existError.statusCode === 404) { + try { + await esClient.transform.putTransform(transform); + return true; + } catch (createErr) { + const createError = transformError(createErr); + logger.error( + `Failed to create transform ${transform.transform_id}: ${createError.message}` + ); + } + } else { + logger.error( + `Failed to check if transform ${transform.transform_id} exists: ${existError.message}` + ); + } + } + return false; +}; + +export const startTransformIfNotStarted = async ( + esClient: ElasticsearchClient, + transformId: string, + logger: Logger +) => { + try { + const transformStats = await esClient.transform.getTransformStats({ + transform_id: transformId, + }); + + if (transformStats.count <= 0) { + logger.error(`Failed starting transform ${transformId}: couldn't find transform`); + return; + } + + const fetchedTransformStats = transformStats.transforms[0]; + + // trying to restart the transform in case it comes to a full stop or failure + if (fetchedTransformStats.state === 'stopped' || fetchedTransformStats.state === 'failed') { + try { + return await esClient.transform.startTransform({ transform_id: transformId }); + } catch (startErr) { + const startError = transformError(startErr); + logger.error( + `Failed to start transform ${transformId}. Transform State: Transform State: ${fetchedTransformStats.state}. Error: ${startError.message}` + ); + } + } + + if (fetchedTransformStats.state === 'stopping' || fetchedTransformStats.state === 'aborting') { + logger.error( + `Not starting transform ${transformId} since it's state is: ${fetchedTransformStats.state}` + ); + } + } catch (statsErr) { + const statsError = transformError(statsErr); + logger.error(`Failed to check if transform ${transformId} is started: ${statsError.message}`); + } +}; + +const deletePreviousTransformsVersions = async (esClient: ElasticsearchClient, logger: Logger) => { + // TODO Concat all deprecated transforms versions + const deprecatedTransforms: string[] = []; + + for (const transform of deprecatedTransforms) { + const response = await deleteTransformSafe(esClient, logger, transform); + if (response) return; + } +}; + +const deleteTransformSafe = async ( + esClient: ElasticsearchClient, + logger: Logger, + name: string +): Promise => { + try { + await esClient.transform.deleteTransform({ transform_id: name, force: true }); + logger.info(`Deleted transform successfully [Name: ${name}]`); + return true; + } catch (e) { + if (e instanceof errors.ResponseError && e.statusCode === 404) { + logger.trace(`Transform not exists [Name: ${name}]`); + return false; + } else { + logger.error(`Failed to delete transform [Name: ${name}]`); + logger.error(e); + return false; + } + } +}; diff --git a/x-pack/plugins/asset_inventory/server/index.ts b/x-pack/plugins/asset_inventory/server/index.ts new file mode 100644 index 0000000000000..6306618078898 --- /dev/null +++ b/x-pack/plugins/asset_inventory/server/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import type { PluginInitializerContext } from '@kbn/core/server'; + +// This exports static code and TypeScript types, +// as well as, Kibana Platform `plugin()` initializer. + +export async function plugin(initializerContext: PluginInitializerContext) { + const { AssetInventoryPlugin } = await import('./plugin'); + return new AssetInventoryPlugin(initializerContext); +} + +export type { AssetInventoryPluginSetup, AssetInventoryPluginStart } from './types'; diff --git a/x-pack/plugins/asset_inventory/server/plugin.ts b/x-pack/plugins/asset_inventory/server/plugin.ts new file mode 100644 index 0000000000000..3f35991c379d5 --- /dev/null +++ b/x-pack/plugins/asset_inventory/server/plugin.ts @@ -0,0 +1,63 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import type { + PluginInitializerContext, + CoreSetup, + CoreStart, + Plugin, + Logger, +} from '@kbn/core/server'; + +import type { AssetInventoryPluginSetup, AssetInventoryPluginStart } from './types'; +import { defineRoutes } from './routes'; +// TODO Uncomment this line when initialize() is enabled +// import { initializeTransforms } from './create_transforms/create_transforms'; + +export class AssetInventoryPlugin + implements Plugin +{ + private readonly logger: Logger; + + // TODO Uncomment this line when initialize() is enabled + // private isInitialized: boolean = false; + + constructor(initializerContext: PluginInitializerContext) { + this.logger = initializerContext.logger.get(); + } + + public setup(core: CoreSetup) { + this.logger.debug('assetInventory: Setup'); + const router = core.http.createRouter(); + + // Register server side APIs + defineRoutes(router); + + return {}; + } + + public start(core: CoreStart) { + this.logger.debug('assetInventory: Started'); + + // TODO Invoke initialize() when it's due + // this.initialize(core).catch(() => {}); + + return {}; + } + + public stop() {} + + /** + * Initialization is idempotent and required for (re)creating indices and transforms. + */ + // TODO Uncomment these lines when initialize() is enabled + // async initialize(core: CoreStart): Promise { + // this.logger.debug('initialize'); + // const esClient = core.elasticsearch.client.asInternalUser; + // await initializeTransforms(esClient, this.logger); + // this.isInitialized = true; + // } +} diff --git a/x-pack/plugins/asset_inventory/server/routes/index.ts b/x-pack/plugins/asset_inventory/server/routes/index.ts new file mode 100644 index 0000000000000..f577bfa19f719 --- /dev/null +++ b/x-pack/plugins/asset_inventory/server/routes/index.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 type { IRouter } from '@kbn/core/server'; + +export function defineRoutes(router: IRouter) { + router.get( + { + path: '/api/asset_inventory/example', + validate: false, + }, + async (context, request, response) => { + return response.ok({ + body: { + time: new Date().toISOString(), + }, + }); + } + ); +} diff --git a/x-pack/plugins/asset_inventory/server/types.ts b/x-pack/plugins/asset_inventory/server/types.ts new file mode 100644 index 0000000000000..1d9380e8514f8 --- /dev/null +++ b/x-pack/plugins/asset_inventory/server/types.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface AssetInventoryPluginSetup {} +// eslint-disable-next-line @typescript-eslint/no-empty-interface +export interface AssetInventoryPluginStart {} diff --git a/x-pack/plugins/asset_inventory/tsconfig.json b/x-pack/plugins/asset_inventory/tsconfig.json new file mode 100644 index 0000000000000..dc669eb3a6943 --- /dev/null +++ b/x-pack/plugins/asset_inventory/tsconfig.json @@ -0,0 +1,23 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types" + }, + "include": [ + "common/**/*.ts", + "common/**/*.json", + "public/**/*.ts", + "public/**/*.tsx", + "public/**/*.json", + "server/**/*.ts", + "server/**/*.json", + "../../../typings/**/*" + ], + "exclude": ["target/**/*"], + "kbn_references": [ + "@kbn/core", + "@kbn/i18n-react", + "@kbn/shared-ux-router", + "@kbn/securitysolution-es-utils" + ] +} diff --git a/x-pack/plugins/canvas/public/services/kibana_services.ts b/x-pack/plugins/canvas/public/services/kibana_services.ts index 2b966e698a874..92980d712fb4f 100644 --- a/x-pack/plugins/canvas/public/services/kibana_services.ts +++ b/x-pack/plugins/canvas/public/services/kibana_services.ts @@ -51,11 +51,9 @@ export const setKibanaServices = ( embeddableService = deps.embeddable; expressionsService = deps.expressions; presentationUtilService = deps.presentationUtil; - reportingService = Boolean( - deps.reporting?.usesUiCapabilities() && !kibanaCore.application.capabilities.canvas?.generatePdf - ) - ? undefined - : deps.reporting; + reportingService = Boolean(kibanaCore.application.capabilities.canvas?.generatePdf) + ? deps.reporting + : undefined; spacesService = deps.spaces; uiActionsService = deps.uiActions; visualizationsService = deps.visualizations; diff --git a/x-pack/plugins/canvas/server/feature.test.ts b/x-pack/plugins/canvas/server/feature.test.ts index c145140f8d944..7f71bafd41700 100644 --- a/x-pack/plugins/canvas/server/feature.test.ts +++ b/x-pack/plugins/canvas/server/feature.test.ts @@ -31,7 +31,11 @@ it('Provides a feature declaration ', () => { "order": 1000, }, "id": "canvas", - "management": Object {}, + "management": Object { + "insightsAndAlerting": Array [ + "reporting", + ], + }, "name": "Canvas", "order": 300, "privileges": Object { @@ -82,13 +86,44 @@ it('Provides a feature declaration ', () => { "spaces", "security", ], - "subFeatures": Array [], + "subFeatures": Array [ + Object { + "name": "Reporting", + "privilegeGroups": Array [ + Object { + "groupType": "independent", + "privileges": Array [ + Object { + "api": Array [ + "generateReport", + ], + "id": "generate_report", + "includeIn": "all", + "management": Object { + "insightsAndAlerting": Array [ + "reporting", + ], + }, + "minimumLicense": "gold", + "name": "Generate PDF reports", + "savedObject": Object { + "all": Array [], + "read": Array [], + }, + "ui": Array [ + "generatePdf", + ], + }, + ], + }, + ], + }, + ], } `); }); it(`Calls on Reporting whether to include Generate PDF as a sub-feature`, () => { - mockReportingPlugin.usesUiCapabilities = () => true; expect(getCanvasFeature({ reporting: mockReportingPlugin })).toMatchInlineSnapshot(` Object { "app": Array [ diff --git a/x-pack/plugins/canvas/server/feature.ts b/x-pack/plugins/canvas/server/feature.ts index 2406ac133c721..daa8a8fc4aa4f 100644 --- a/x-pack/plugins/canvas/server/feature.ts +++ b/x-pack/plugins/canvas/server/feature.ts @@ -16,7 +16,7 @@ import { KibanaFeatureScope } from '@kbn/features-plugin/common'; * with Reporting sub-feature integration (if enabled) */ export function getCanvasFeature(plugins: { reporting?: ReportingStart }): KibanaFeatureConfig { - const includeReporting = plugins.reporting && plugins.reporting.usesUiCapabilities(); + const includeReporting = Boolean(plugins.reporting); return { id: 'canvas', diff --git a/x-pack/plugins/cases/common/constants/owner.test.ts b/x-pack/plugins/cases/common/constants/owner.test.ts index 07b6866f857a4..b53f177dd7d29 100644 --- a/x-pack/plugins/cases/common/constants/owner.test.ts +++ b/x-pack/plugins/cases/common/constants/owner.test.ts @@ -10,7 +10,11 @@ import { OWNER_INFO } from './owners'; describe('OWNER_INFO', () => { it('should use all available rule consumers', () => { - const allConsumers = new Set(Object.values(AlertConsumers)); + const allConsumers = new Set( + // Alerts consumer fallbacks to producer so it is not counted as valid one + Object.values(AlertConsumers).filter((consumer) => consumer !== AlertConsumers.ALERTS) + ); + const ownersMappingConsumers = new Set( Object.values(OWNER_INFO) .map((value) => value.validRuleConsumers ?? []) diff --git a/x-pack/plugins/cases/common/constants/owners.ts b/x-pack/plugins/cases/common/constants/owners.ts index a7628628a7dcc..79db38345e566 100644 --- a/x-pack/plugins/cases/common/constants/owners.ts +++ b/x-pack/plugins/cases/common/constants/owners.ts @@ -59,6 +59,11 @@ export const OWNER_INFO: Record = { label: 'Management', iconType: 'managementApp', appRoute: '/app/management/insightsAndAlerting', - validRuleConsumers: [AlertConsumers.ML, AlertConsumers.STACK_ALERTS, AlertConsumers.EXAMPLE], + validRuleConsumers: [ + AlertConsumers.ML, + AlertConsumers.STACK_ALERTS, + AlertConsumers.EXAMPLE, + AlertConsumers.DISCOVER, + ], }, } as const; diff --git a/x-pack/plugins/cases/common/utils/capabilities.test.tsx b/x-pack/plugins/cases/common/utils/capabilities.test.tsx index 11f74af8e02d8..6194cfd9aef02 100644 --- a/x-pack/plugins/cases/common/utils/capabilities.test.tsx +++ b/x-pack/plugins/cases/common/utils/capabilities.test.tsx @@ -17,7 +17,6 @@ describe('createUICapabilities', () => { "update_cases", "push_cases", "cases_connectors", - "cases_settings", ], "createComment": Array [ "create_comment", diff --git a/x-pack/plugins/cases/common/utils/capabilities.ts b/x-pack/plugins/cases/common/utils/capabilities.ts index 6897dc6bae774..79f67b7b5445e 100644 --- a/x-pack/plugins/cases/common/utils/capabilities.ts +++ b/x-pack/plugins/cases/common/utils/capabilities.ts @@ -36,7 +36,6 @@ export const createUICapabilities = (): CasesUiCapabilities => ({ UPDATE_CASES_CAPABILITY, PUSH_CASES_CAPABILITY, CASES_CONNECTORS_CAPABILITY, - CASES_SETTINGS_CAPABILITY, ] as const, read: [READ_CASES_CAPABILITY, CASES_CONNECTORS_CAPABILITY] as const, delete: [DELETE_CASES_CAPABILITY] as const, diff --git a/x-pack/plugins/cases/common/utils/owner.test.ts b/x-pack/plugins/cases/common/utils/owner.test.ts index a6f7c99f540bb..4e005750ad36f 100644 --- a/x-pack/plugins/cases/common/utils/owner.test.ts +++ b/x-pack/plugins/cases/common/utils/owner.test.ts @@ -40,7 +40,7 @@ describe('owner utils', () => { validRuleConsumers: item.validRuleConsumers, })); - it.each(owners)('returns owner %s correctly for consumer', (owner) => { + it.each(owners)('returns owner %j correctly for consumer', (owner) => { for (const consumer of owner.validRuleConsumers ?? []) { const result = getOwnerFromRuleConsumerProducer({ consumer }); @@ -48,7 +48,7 @@ describe('owner utils', () => { } }); - it.each(owners)('returns owner %s correctly for producer', (owner) => { + it.each(owners)('returns owner %j correctly for producer', (owner) => { for (const producer of owner.validRuleConsumers ?? []) { const result = getOwnerFromRuleConsumerProducer({ producer }); @@ -80,5 +80,14 @@ describe('owner utils', () => { expect(owner).toBe(OWNER_INFO.securitySolution.id); }); + + it('fallbacks to producer when the consumer is alerts', () => { + const owner = getOwnerFromRuleConsumerProducer({ + consumer: AlertConsumers.ALERTS, + producer: AlertConsumers.OBSERVABILITY, + }); + + expect(owner).toBe(OWNER_INFO.observability.id); + }); }); }); diff --git a/x-pack/plugins/cases/common/utils/owner.ts b/x-pack/plugins/cases/common/utils/owner.ts index 7bde7220233db..d159a3d55ee7a 100644 --- a/x-pack/plugins/cases/common/utils/owner.ts +++ b/x-pack/plugins/cases/common/utils/owner.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { AlertConsumers } from '@kbn/rule-data-utils'; import { OWNER_INFO } from '../constants'; import type { Owner } from '../constants/types'; @@ -29,9 +30,12 @@ export const getOwnerFromRuleConsumerProducer = ({ return OWNER_INFO.securitySolution.id; } + // Fallback to producer if the consumer is alerts + const consumerValue = consumer === AlertConsumers.ALERTS ? producer : consumer; + for (const value of Object.values(OWNER_INFO)) { const foundConsumer = value.validRuleConsumers?.find( - (validConsumer) => validConsumer === consumer || validConsumer === producer + (validConsumer) => validConsumer === consumerValue || validConsumer === producer ); if (foundConsumer) { diff --git a/x-pack/plugins/cases/public/components/case_view/components/case_view_alerts.test.tsx b/x-pack/plugins/cases/public/components/case_view/components/case_view_alerts.test.tsx index fe2deb74dfa10..7366acf6e051f 100644 --- a/x-pack/plugins/cases/public/components/case_view/components/case_view_alerts.test.tsx +++ b/x-pack/plugins/cases/public/components/case_view/components/case_view_alerts.test.tsx @@ -15,6 +15,7 @@ import type { CaseUI } from '../../../../common'; import { CaseViewAlerts } from './case_view_alerts'; import * as api from '../../../containers/api'; import type { FeatureIdsResponse } from '../../../containers/types'; +import { SECURITY_SOLUTION_RULE_TYPE_IDS } from '@kbn/securitysolution-rules'; jest.mock('../../../containers/api'); @@ -54,7 +55,7 @@ describe('CaseUI View Page activity tab', () => { expect(getAlertsStateTableMock).toHaveBeenCalledWith({ alertsTableConfigurationRegistry: expect.anything(), configurationId: 'securitySolution-case', - featureIds: ['siem'], + ruleTypeIds: SECURITY_SOLUTION_RULE_TYPE_IDS, id: 'case-details-alerts-securitySolution', query: { ids: { @@ -88,7 +89,8 @@ describe('CaseUI View Page activity tab', () => { expect(getAlertsStateTableMock).toHaveBeenCalledWith({ alertsTableConfigurationRegistry: expect.anything(), configurationId: 'case-details-alerts-observability', - featureIds: ['observability'], + ruleTypeIds: ['log-threshold'], + consumers: ['observability'], id: 'case-details-alerts-observability', query: { ids: { diff --git a/x-pack/plugins/cases/public/components/case_view/components/case_view_alerts.tsx b/x-pack/plugins/cases/public/components/case_view/components/case_view_alerts.tsx index 9570bee46b3fe..6f8223b5305f1 100644 --- a/x-pack/plugins/cases/public/components/case_view/components/case_view_alerts.tsx +++ b/x-pack/plugins/cases/public/components/case_view/components/case_view_alerts.tsx @@ -8,8 +8,8 @@ import React, { useMemo } from 'react'; import { EuiFlexItem, EuiFlexGroup, EuiProgress } from '@elastic/eui'; -import type { ValidFeatureId } from '@kbn/rule-registry-plugin/common/technical_rule_data_field_names'; -import { AlertConsumers } from '@kbn/rule-registry-plugin/common/technical_rule_data_field_names'; +import type { AlertsTableStateProps } from '@kbn/triggers-actions-ui-plugin/public/application/sections/alerts_table/alerts_table_state'; +import { SECURITY_SOLUTION_RULE_TYPE_IDS } from '@kbn/securitysolution-rules'; import { SECURITY_SOLUTION_OWNER } from '../../../../common/constants'; import type { CaseUI } from '../../../../common'; import { useKibana } from '../../../common/lib/kibana'; @@ -49,14 +49,16 @@ export const CaseViewAlerts = ({ caseData, onAlertsTableLoaded }: CaseViewAlerts ) : ''; - const alertStateProps = useMemo( + const alertStateProps: AlertsTableStateProps = useMemo( () => ({ alertsTableConfigurationRegistry: triggersActionsUi.alertsTableConfigurationRegistry, configurationId: configId, id: `case-details-alerts-${caseData.owner}`, - featureIds: (caseData.owner === SECURITY_SOLUTION_OWNER - ? [AlertConsumers.SIEM] - : alertData?.featureIds ?? []) as ValidFeatureId[], + ruleTypeIds: + caseData.owner === SECURITY_SOLUTION_OWNER + ? SECURITY_SOLUTION_RULE_TYPE_IDS + : alertData?.ruleTypeIds ?? [], + consumers: alertData?.featureIds, query: alertIdsQuery, showAlertStatusWithFlapping: caseData.owner !== SECURITY_SOLUTION_OWNER, onLoaded: onAlertsTableLoaded, @@ -65,6 +67,7 @@ export const CaseViewAlerts = ({ caseData, onAlertsTableLoaded }: CaseViewAlerts triggersActionsUi.alertsTableConfigurationRegistry, configId, caseData.owner, + alertData?.ruleTypeIds, alertData?.featureIds, alertIdsQuery, onAlertsTableLoaded, diff --git a/x-pack/plugins/cases/public/components/configure_cases/index.test.tsx b/x-pack/plugins/cases/public/components/configure_cases/index.test.tsx index 7a29c959d2525..c309509d563a3 100644 --- a/x-pack/plugins/cases/public/components/configure_cases/index.test.tsx +++ b/x-pack/plugins/cases/public/components/configure_cases/index.test.tsx @@ -12,7 +12,7 @@ import { waitFor, screen, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { ConfigureCases } from '.'; -import { noUpdateCasesPermissions, TestProviders, createAppMockRenderer } from '../../common/mock'; +import { noCasesSettingsPermission, TestProviders, createAppMockRenderer } from '../../common/mock'; import { customFieldsConfigurationMock, templatesConfigurationMock } from '../../containers/mock'; import type { AppMockRenderer } from '../../common/mock'; import { Connectors } from './connectors'; @@ -200,10 +200,10 @@ describe('ConfigureCases', () => { expect(wrapper.find('[data-test-subj="edit-connector-flyout"]').exists()).toBe(false); }); - test('it disables correctly when the user cannot update', () => { + test('it disables correctly when the user does not have settings privilege', () => { const newWrapper = mount(, { wrappingComponent: TestProviders as ComponentType>, - wrappingComponentProps: { permissions: noUpdateCasesPermissions() }, + wrappingComponentProps: { permissions: noCasesSettingsPermission() }, }); expect(newWrapper.find('button[data-test-subj="dropdown-connectors"]').prop('disabled')).toBe( diff --git a/x-pack/plugins/cases/public/components/configure_cases/index.tsx b/x-pack/plugins/cases/public/components/configure_cases/index.tsx index 641482ceca4fe..071a4c5cfac4e 100644 --- a/x-pack/plugins/cases/public/components/configure_cases/index.tsx +++ b/x-pack/plugins/cases/public/components/configure_cases/index.tsx @@ -480,12 +480,7 @@ export const ConfigureCases: React.FC = React.memo(() => { flyOutVisibility?.type === 'customField' && flyOutVisibility?.visible ? ( isLoading={loadingCaseConfigure || isPersistingConfiguration} - disabled={ - !permissions.create || - !permissions.update || - loadingCaseConfigure || - isPersistingConfiguration - } + disabled={!permissions.settings || loadingCaseConfigure || isPersistingConfiguration} onCloseFlyout={onCloseCustomFieldFlyout} onSaveField={onCustomFieldSave} renderHeader={() => ( @@ -502,12 +497,7 @@ export const ConfigureCases: React.FC = React.memo(() => { flyOutVisibility?.type === 'template' && flyOutVisibility?.visible ? ( isLoading={loadingCaseConfigure || isPersistingConfiguration} - disabled={ - !permissions.create || - !permissions.update || - loadingCaseConfigure || - isPersistingConfiguration - } + disabled={!permissions.settings || loadingCaseConfigure || isPersistingConfiguration} onCloseFlyout={onCloseTemplateFlyout} onSaveField={onTemplateSave} renderHeader={() => ( @@ -565,7 +555,9 @@ export const ConfigureCases: React.FC = React.memo(() => {
        @@ -574,13 +566,15 @@ export const ConfigureCases: React.FC = React.memo(() => {
        diff --git a/x-pack/plugins/cases/public/components/custom_fields/index.tsx b/x-pack/plugins/cases/public/components/custom_fields/index.tsx index d749a7aba9bea..f93c72eb6a18e 100644 --- a/x-pack/plugins/cases/public/components/custom_fields/index.tsx +++ b/x-pack/plugins/cases/public/components/custom_fields/index.tsx @@ -17,7 +17,6 @@ import { } from '@elastic/eui'; import * as i18n from './translations'; -import { useCasesContext } from '../cases_context/use_cases_context'; import type { CustomFieldsConfiguration } from '../../../common/types/domain'; import { MAX_CUSTOM_FIELDS_PER_CASE } from '../../../common/constants'; import { CustomFieldsList } from './custom_fields_list'; @@ -38,8 +37,6 @@ const CustomFieldsComponent: React.FC = ({ handleEditCustomField, customFields, }) => { - const { permissions } = useCasesContext(); - const canAddCustomFields = permissions.create && permissions.update; const [error, setError] = useState(false); const onAddCustomField = useCallback(() => { @@ -64,7 +61,7 @@ const CustomFieldsComponent: React.FC = ({ setError(false); } - return canAddCustomFields ? ( + return ( {i18n.TITLE}} @@ -113,10 +110,11 @@ const CustomFieldsComponent: React.FC = ({ )} + - ) : null; + ); }; CustomFieldsComponent.displayName = 'CustomFields'; diff --git a/x-pack/plugins/cases/public/components/files/file_download_button.test.tsx b/x-pack/plugins/cases/public/components/files/file_download_button.test.tsx index 0c729900a9ea6..da80fbdfaa578 100644 --- a/x-pack/plugins/cases/public/components/files/file_download_button.test.tsx +++ b/x-pack/plugins/cases/public/components/files/file_download_button.test.tsx @@ -36,7 +36,8 @@ describe('FileDownloadButton', () => { }); }); - describe('not isIcon', () => { + // FLAKY: https://github.com/elastic/kibana/issues/201611 + describe.skip('not isIcon', () => { beforeEach(() => { jest.clearAllMocks(); appMockRender = createAppMockRenderer(); diff --git a/x-pack/plugins/cases/public/components/system_actions/cases/cases_params.tsx b/x-pack/plugins/cases/public/components/system_actions/cases/cases_params.tsx index 9fabf39db0bc4..e77e8313c6963 100644 --- a/x-pack/plugins/cases/public/components/system_actions/cases/cases_params.tsx +++ b/x-pack/plugins/cases/public/components/system_actions/cases/cases_params.tsx @@ -8,7 +8,6 @@ import React, { memo, useCallback, useEffect, useMemo } from 'react'; import type { ActionParamsProps } from '@kbn/triggers-actions-ui-plugin/public/types'; -import type { AlertConsumers, ValidFeatureId } from '@kbn/rule-data-utils'; import type { EuiComboBoxOptionOption } from '@elastic/eui'; import { EuiCheckbox, @@ -37,7 +36,7 @@ const DEFAULT_EMPTY_TEMPLATE_KEY = 'defaultEmptyTemplateKey'; export const CasesParamsFieldsComponent: React.FunctionComponent< ActionParamsProps -> = ({ actionParams, editAction, errors, index, producerId, featureId }) => { +> = ({ actionParams, editAction, errors, index, producerId, featureId, ruleTypeId }) => { const { cloud, data: { dataViews: dataViewsService }, @@ -58,9 +57,7 @@ export const CasesParamsFieldsComponent: React.FunctionComponent< http, toasts, dataViewsService, - featureIds: producerId - ? [producerId as Exclude] - : [], + ruleTypeIds: ruleTypeId ? [ruleTypeId] : [], }); const { data: configurations, isLoading: isLoadingCaseConfiguration } = diff --git a/x-pack/plugins/cases/public/components/templates/index.tsx b/x-pack/plugins/cases/public/components/templates/index.tsx index 479101d2889ad..6c15f1e9ef464 100644 --- a/x-pack/plugins/cases/public/components/templates/index.tsx +++ b/x-pack/plugins/cases/public/components/templates/index.tsx @@ -17,7 +17,6 @@ import { } from '@elastic/eui'; import { MAX_TEMPLATES_LENGTH } from '../../../common/constants'; import type { CasesConfigurationUITemplate } from '../../../common/ui'; -import { useCasesContext } from '../cases_context/use_cases_context'; import { ExperimentalBadge } from '../experimental_badge/experimental_badge'; import * as i18n from './translations'; import { TemplatesList } from './templates_list'; @@ -39,8 +38,6 @@ const TemplatesComponent: React.FC = ({ onEditTemplate, onDeleteTemplate, }) => { - const { permissions } = useCasesContext(); - const canAddTemplates = permissions.create && permissions.update; const [error, setError] = useState(false); const handleAddTemplate = useCallback(() => { @@ -103,31 +100,29 @@ const TemplatesComponent: React.FC = ({ ) : null} - {canAddTemplates ? ( - - - {templates.length < MAX_TEMPLATES_LENGTH ? ( - - {i18n.ADD_TEMPLATE} - - ) : ( - - - {i18n.MAX_TEMPLATE_LIMIT(MAX_TEMPLATES_LENGTH)} - - - )} - - - - ) : null} + + + {templates.length < MAX_TEMPLATES_LENGTH ? ( + + {i18n.ADD_TEMPLATE} + + ) : ( + + + {i18n.MAX_TEMPLATE_LIMIT(MAX_TEMPLATES_LENGTH)} + + + )} + + + ); diff --git a/x-pack/plugins/cases/server/connectors/cases/index.test.ts b/x-pack/plugins/cases/server/connectors/cases/index.test.ts index 7b6d244d165b3..c0480d694184f 100644 --- a/x-pack/plugins/cases/server/connectors/cases/index.test.ts +++ b/x-pack/plugins/cases/server/connectors/cases/index.test.ts @@ -366,7 +366,7 @@ describe('getCasesConnectorType', () => { expect( adapter.getKibanaPrivileges?.({ - consumer: 'alerting', + consumer: 'not-exist', producer: AlertConsumers.LOGS, }) ).toEqual([ @@ -387,7 +387,7 @@ describe('getCasesConnectorType', () => { expect( adapter.getKibanaPrivileges?.({ - consumer: 'alerting', + consumer: 'alerts', producer: AlertConsumers.LOGS, }) ).toEqual([ diff --git a/x-pack/plugins/cases/server/connectors/cases/index.ts b/x-pack/plugins/cases/server/connectors/cases/index.ts index 07b4ab5e29551..b630de5209e2d 100644 --- a/x-pack/plugins/cases/server/connectors/cases/index.ts +++ b/x-pack/plugins/cases/server/connectors/cases/index.ts @@ -95,7 +95,7 @@ export const getCasesConnectorAdapter = ({ return { connectorTypeId: CASES_CONNECTOR_ID, ruleActionParamsSchema: CasesConnectorRuleActionParamsSchema, - buildActionParams: ({ alerts, rule, params, spaceId, ruleUrl }) => { + buildActionParams: ({ alerts, rule, params, ruleUrl }) => { const caseAlerts = [...alerts.new.data, ...alerts.ongoing.data]; const owner = getOwnerFromRuleConsumerProducer({ diff --git a/x-pack/plugins/cases/server/connectors/index.ts b/x-pack/plugins/cases/server/connectors/index.ts index 0b0f201b46d42..56dcddfbee76a 100644 --- a/x-pack/plugins/cases/server/connectors/index.ts +++ b/x-pack/plugins/cases/server/connectors/index.ts @@ -9,7 +9,7 @@ import type { PluginSetupContract as ActionsPluginSetupContract } from '@kbn/act import type { KibanaRequest } from '@kbn/core-http-server'; import type { CoreSetup, SavedObjectsClientContract } from '@kbn/core/server'; import { SECURITY_EXTENSION_ID } from '@kbn/core/server'; -import type { PluginSetupContract as AlertingPluginSetup } from '@kbn/alerting-plugin/server'; +import type { AlertingServerSetup } from '@kbn/alerting-plugin/server'; import type { CasesClient } from '../client'; import { getCasesConnectorAdapter, getCasesConnectorType } from './cases'; @@ -25,7 +25,7 @@ export function registerConnectorTypes({ isServerlessSecurity, }: { actions: ActionsPluginSetupContract; - alerting: AlertingPluginSetup; + alerting: AlertingServerSetup; core: CoreSetup; getCasesClient: (request: KibanaRequest) => Promise; getSpaceId: (request?: KibanaRequest) => string; diff --git a/x-pack/plugins/cases/server/types.ts b/x-pack/plugins/cases/server/types.ts index a51817c9d7e58..8606808e1c183 100644 --- a/x-pack/plugins/cases/server/types.ts +++ b/x-pack/plugins/cases/server/types.ts @@ -29,7 +29,7 @@ import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; import type { LicensingPluginSetup, LicensingPluginStart } from '@kbn/licensing-plugin/server'; import type { NotificationsPluginStart } from '@kbn/notifications-plugin/server'; import type { RuleRegistryPluginStartContract } from '@kbn/rule-registry-plugin/server'; -import type { PluginSetupContract as AlertingPluginSetup } from '@kbn/alerting-plugin/server'; +import type { AlertingServerSetup } from '@kbn/alerting-plugin/server'; import type { CloudSetup } from '@kbn/cloud-plugin/server'; import type { CasesClient } from './client'; import type { AttachmentFramework } from './attachment_framework/types'; @@ -37,7 +37,7 @@ import type { ExternalReferenceAttachmentTypeRegistry } from './attachment_frame import type { PersistableStateAttachmentTypeRegistry } from './attachment_framework/persistable_state_registry'; export interface CasesServerSetupDependencies { - alerting: AlertingPluginSetup; + alerting: AlertingServerSetup; actions: ActionsPluginSetup; lens: LensServerPluginSetup; features: FeaturesPluginSetup; diff --git a/x-pack/plugins/cases/tsconfig.json b/x-pack/plugins/cases/tsconfig.json index 48ca36a02b2be..2a77cb0e7b5a1 100644 --- a/x-pack/plugins/cases/tsconfig.json +++ b/x-pack/plugins/cases/tsconfig.json @@ -74,6 +74,7 @@ "@kbn/core-logging-server-mocks", "@kbn/core-logging-browser-mocks", "@kbn/presentation-publishing", + "@kbn/securitysolution-rules", "@kbn/alerts-ui-shared", "@kbn/cloud-plugin", "@kbn/core-http-server-mocks", diff --git a/x-pack/plugins/cloud_security_posture/server/routes/benchmark_rules/bulk_action/bulk_action.ts b/x-pack/plugins/cloud_security_posture/server/routes/benchmark_rules/bulk_action/bulk_action.ts index b72cb27088eda..52a7c8b555094 100644 --- a/x-pack/plugins/cloud_security_posture/server/routes/benchmark_rules/bulk_action/bulk_action.ts +++ b/x-pack/plugins/cloud_security_posture/server/routes/benchmark_rules/bulk_action/bulk_action.ts @@ -31,7 +31,7 @@ import { bulkActionBenchmarkRulesHandler } from './v1'; // ... (additional benchmark rules) ]; } - + Response: { updated_benchmark_rules: CspBenchmarkRulesStates; Benchmark rules object that were affected @@ -67,7 +67,7 @@ export const defineBulkActionCspBenchmarkRulesRoute = (router: CspRouter) => const benchmarkRulesToUpdate = requestBody.rules; - const detectionRulesClient = (await context.alerting).getRulesClient(); + const detectionRulesClient = await (await context.alerting).getRulesClient(); const handlerResponse = await bulkActionBenchmarkRulesHandler( cspContext.soClient, diff --git a/x-pack/plugins/data_quality/public/routes/dataset_quality_details/context.tsx b/x-pack/plugins/data_quality/public/routes/dataset_quality_details/context.tsx index 462cbbbd9288b..5f710c445471e 100644 --- a/x-pack/plugins/data_quality/public/routes/dataset_quality_details/context.tsx +++ b/x-pack/plugins/data_quality/public/routes/dataset_quality_details/context.tsx @@ -74,7 +74,10 @@ export function DatasetQualityDetailsContextProvider({ urlStateStorageContainer, datasetQualityDetailsState: state, }); - const breadcrumbValue = getBreadcrumbValue(state.dataStream, state.integration); + const breadcrumbValue = getBreadcrumbValue( + state.dataStream, + state.integration?.integration + ); setBreadcrumbs([{ text: breadcrumbValue }]); } ); diff --git a/x-pack/plugins/data_usage/common/rest_types/data_streams.ts b/x-pack/plugins/data_usage/common/rest_types/data_streams.ts index 87af7e29eccb6..17fc5fa5de053 100644 --- a/x-pack/plugins/data_usage/common/rest_types/data_streams.ts +++ b/x-pack/plugins/data_usage/common/rest_types/data_streams.ts @@ -7,6 +7,14 @@ import { schema, TypeOf } from '@kbn/config-schema'; +export const DataStreamsRequestSchema = { + query: schema.object({ + includeZeroStorage: schema.boolean({ defaultValue: false }), + }), +}; + +export type DataStreamsRequestQuery = TypeOf; + export const DataStreamsResponseSchema = { body: () => schema.arrayOf( diff --git a/x-pack/plugins/data_usage/server/routes/internal/data_streams.ts b/x-pack/plugins/data_usage/server/routes/internal/data_streams.ts index bfa236aa1cec0..6a1a4517bf6ef 100644 --- a/x-pack/plugins/data_usage/server/routes/internal/data_streams.ts +++ b/x-pack/plugins/data_usage/server/routes/internal/data_streams.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DataStreamsResponseSchema } from '../../../common/rest_types'; +import { DataStreamsResponseSchema, DataStreamsRequestSchema } from '../../../common/rest_types'; import { DATA_USAGE_DATA_STREAMS_API_ROUTE } from '../../../common'; import { DataUsageContext, DataUsageRouter } from '../../types'; import { getDataStreamsHandler } from './data_streams_handler'; @@ -23,7 +23,7 @@ export const registerDataStreamsRoute = ( { version: '1', validate: { - request: {}, + request: DataStreamsRequestSchema, response: { 200: DataStreamsResponseSchema, }, diff --git a/x-pack/plugins/data_usage/server/routes/internal/data_streams_handler.ts b/x-pack/plugins/data_usage/server/routes/internal/data_streams_handler.ts index 99b4e982c5a40..726aa157050f8 100644 --- a/x-pack/plugins/data_usage/server/routes/internal/data_streams_handler.ts +++ b/x-pack/plugins/data_usage/server/routes/internal/data_streams_handler.ts @@ -9,12 +9,15 @@ import { RequestHandler } from '@kbn/core/server'; import { DataUsageContext, DataUsageRequestHandlerContext } from '../../types'; import { errorHandler } from '../error_handler'; import { getMeteringStats } from '../../utils/get_metering_stats'; +import { DataStreamsRequestQuery } from '../../../common/rest_types/data_streams'; export const getDataStreamsHandler = ( dataUsageContext: DataUsageContext -): RequestHandler => { +): RequestHandler => { const logger = dataUsageContext.logFactory.get('dataStreamsRoute'); - return async (context, _, response) => { + return async (context, request, response) => { + const { includeZeroStorage } = request.query; + logger.debug('Retrieving user data streams'); try { @@ -28,7 +31,7 @@ export const getDataStreamsHandler = ( ? meteringStats .sort((a, b) => b.size_in_bytes - a.size_in_bytes) .reduce>((acc, stat) => { - if (stat.size_in_bytes > 0) { + if (includeZeroStorage || stat.size_in_bytes > 0) { acc.push({ name: stat.name, storageSizeBytes: stat.size_in_bytes ?? 0, diff --git a/x-pack/plugins/discover_enhanced/ui_tests/README.md b/x-pack/plugins/discover_enhanced/ui_tests/README.md index 8320e9464d9ca..e6c5943e1533f 100644 --- a/x-pack/plugins/discover_enhanced/ui_tests/README.md +++ b/x-pack/plugins/discover_enhanced/ui_tests/README.md @@ -11,7 +11,10 @@ node scripts/scout_start_servers.js --serverless=es Then you can run the tests multiple times in another terminal with: ```bash -npx playwright test --config x-pack/plugins/discover_enhanced/ui_tests/playwright.config.ts +// ESS +npx playwright test --config x-pack/plugins/discover_enhanced/ui_tests/playwright.config.ts --grep @ess +// Serverless +npx playwright test --config x-pack/plugins/discover_enhanced/ui_tests/playwright.config.ts --grep @svlSearch // @svlOblt, @svlSecurity ``` Test results are available in `x-pack/plugins/discover_enhanced/ui_tests/output` diff --git a/x-pack/plugins/discover_enhanced/ui_tests/fixtures/assertion_messages.ts b/x-pack/plugins/discover_enhanced/ui_tests/fixtures/assertion_messages.ts new file mode 100644 index 0000000000000..6ccbe4df990cb --- /dev/null +++ b/x-pack/plugins/discover_enhanced/ui_tests/fixtures/assertion_messages.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export const QUERY_BAR_VALIDATION = { + SUGGESTIONS_COUNT: 'The query bar suggestions count should be', +}; diff --git a/x-pack/plugins/discover_enhanced/ui_tests/fixtures/constants.ts b/x-pack/plugins/discover_enhanced/ui_tests/fixtures/constants.ts new file mode 100644 index 0000000000000..3ac2c34586f4d --- /dev/null +++ b/x-pack/plugins/discover_enhanced/ui_tests/fixtures/constants.ts @@ -0,0 +1,44 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export const LOGSTASH_DEFAULT_START_TIME = '2015-09-19T06:31:44.000Z'; +export const LOGSTASH_DEFAULT_END_TIME = '2015-09-23T18:31:44.000Z'; + +export const DATA_VIEW_ID = { + ECOMMERCE: '5193f870-d861-11e9-a311-0fa548c5f953', + LOGSTASH: 'logstash-*', +}; + +export const DATA_VIEW = { + ECOMMERCE: 'ecommerce', + LOGSTASH: 'logstash-*', +}; + +export const LOGSTASH_OUT_OF_RANGE_DATES = { + from: 'Mar 1, 2020 @ 00:00:00.000', + to: 'Nov 1, 2020 @ 00:00:00.000', +}; + +export const LOGSTASH_IN_RANGE_DATES = { + from: 'Sep 19, 2015 @ 06:31:44.000', + to: 'Sep 23, 2015 @ 18:31:44.000', +}; + +export const ES_ARCHIVES = { + LOGSTASH: 'x-pack/test/functional/es_archives/logstash_functional', + NO_TIME_FIELD: 'test/functional/fixtures/es_archiver/index_pattern_without_timefield', + ECOMMERCE: 'x-pack/test/functional/es_archives/reporting/ecommerce', +}; + +export const KBN_ARCHIVES = { + INVALID_SCRIPTED_FIELD: 'test/functional/fixtures/kbn_archiver/invalid_scripted_field', + NO_TIME_FIELD: 'test/functional/fixtures/kbn_archiver/index_pattern_without_timefield', + DASHBOARD_DRILLDOWNS: + 'x-pack/test/functional/fixtures/kbn_archiver/dashboard_drilldowns/drilldowns', + DISCOVER: 'test/functional/fixtures/kbn_archiver/discover', + ECOMMERCE: 'x-pack/test/functional/fixtures/kbn_archiver/reporting/ecommerce.json', +}; diff --git a/x-pack/plugins/discover_enhanced/ui_tests/fixtures/index.ts b/x-pack/plugins/discover_enhanced/ui_tests/fixtures/index.ts index 38d4905f82e6f..cf12a98368b90 100644 --- a/x-pack/plugins/discover_enhanced/ui_tests/fixtures/index.ts +++ b/x-pack/plugins/discover_enhanced/ui_tests/fixtures/index.ts @@ -14,14 +14,23 @@ import { } from '@kbn/scout'; import { DemoPage } from './page_objects'; -interface ExtendedScoutTestFixtures extends ScoutTestFixtures { +export interface ExtendedScoutTestFixtures extends ScoutTestFixtures { pageObjects: PageObjects & { demo: DemoPage; }; } export const test = base.extend({ - pageObjects: async ({ pageObjects, page }, use) => { + pageObjects: async ( + { + pageObjects, + page, + }: { + pageObjects: ExtendedScoutTestFixtures['pageObjects']; + page: ExtendedScoutTestFixtures['page']; + }, + use: (pageObjects: ExtendedScoutTestFixtures['pageObjects']) => Promise + ) => { const extendedPageObjects = { ...pageObjects, demo: createLazyPageObject(DemoPage, page), @@ -30,3 +39,6 @@ export const test = base.extend( await use(extendedPageObjects); }, }); + +export * as testData from './constants'; +export * as assertionMessages from './assertion_messages'; diff --git a/x-pack/plugins/discover_enhanced/ui_tests/tests/error_handling.spec.ts b/x-pack/plugins/discover_enhanced/ui_tests/tests/error_handling.spec.ts new file mode 100644 index 0000000000000..914558fbdc97f --- /dev/null +++ b/x-pack/plugins/discover_enhanced/ui_tests/tests/error_handling.spec.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. + */ + +import { expect } from '@kbn/scout'; +import { test, testData } from '../fixtures'; + +test.describe('Discover app - errors', { tag: ['@ess'] }, () => { + test.beforeAll(async ({ esArchiver, kbnClient, uiSettings }) => { + await kbnClient.savedObjects.clean({ types: ['search', 'index-pattern'] }); + await esArchiver.loadIfNeeded(testData.ES_ARCHIVES.LOGSTASH); + await kbnClient.importExport.load(testData.KBN_ARCHIVES.INVALID_SCRIPTED_FIELD); + await uiSettings.setDefaultTime({ + from: testData.LOGSTASH_DEFAULT_START_TIME, + to: testData.LOGSTASH_DEFAULT_END_TIME, + }); + }); + + test.afterAll(async ({ kbnClient }) => { + await kbnClient.savedObjects.cleanStandardList(); + }); + + test.beforeEach(async ({ browserAuth, pageObjects }) => { + await browserAuth.loginAsViewer(); + await pageObjects.discover.goto(); + }); + + test('should render invalid scripted field error', async ({ page }) => { + await page.testSubj.locator('discoverErrorCalloutTitle').waitFor({ state: 'visible' }); + await expect( + page.testSubj.locator('painlessStackTrace'), + 'Painless error stacktrace should be displayed' + ).toBeVisible(); + }); +}); diff --git a/x-pack/plugins/discover_enhanced/ui_tests/tests/saved_search_embeddable.spec.ts b/x-pack/plugins/discover_enhanced/ui_tests/tests/saved_search_embeddable.spec.ts new file mode 100644 index 0000000000000..7103f2b25e633 --- /dev/null +++ b/x-pack/plugins/discover_enhanced/ui_tests/tests/saved_search_embeddable.spec.ts @@ -0,0 +1,102 @@ +/* + * 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 { ScoutWorkerFixtures, expect } from '@kbn/scout'; +import { test, testData } from '../fixtures'; + +const createSavedSearch = async ( + kbnClient: ScoutWorkerFixtures['kbnClient'], + searchId: string, + searchTitle: string, + dataViewId: string +) => + await kbnClient.savedObjects.create({ + type: 'search', + id: searchId, + overwrite: false, + attributes: { + title: searchTitle, + description: '', + columns: ['agent', 'bytes', 'clientip'], + sort: [['@timestamp', 'desc']], + kibanaSavedObjectMeta: { + searchSourceJSON: + '{"highlightAll":true,"version":true,"query":{"language":"lucene","query":""},"filter":[],"indexRefName":"kibanaSavedObjectMeta.searchSourceJSON.index"}', + }, + }, + references: [ + { + id: dataViewId, + name: 'kibanaSavedObjectMeta.searchSourceJSON.index', + type: 'index-pattern', + }, + ], + }); + +test.describe( + 'Discover app - saved search embeddable', + { tag: ['@ess', '@svlSecurity', '@svlOblt', '@svlSearch'] }, + () => { + const SAVED_SEARCH_TITLE = 'TempSearch'; + const SAVED_SEARCH_ID = '90943e30-9a47-11e8-b64d-95841ca0b247'; + test.beforeAll(async ({ esArchiver, kbnClient, uiSettings }) => { + await esArchiver.loadIfNeeded(testData.ES_ARCHIVES.LOGSTASH); + await kbnClient.importExport.load(testData.KBN_ARCHIVES.DASHBOARD_DRILLDOWNS); + await uiSettings.set({ + defaultIndex: testData.DATA_VIEW_ID.LOGSTASH, // TODO: investigate why it is required for `node scripts/playwright_test.js` run + 'timepicker:timeDefaults': `{ "from": "${testData.LOGSTASH_DEFAULT_START_TIME}", "to": "${testData.LOGSTASH_DEFAULT_END_TIME}"}`, + }); + }); + + test.afterAll(async ({ kbnClient, uiSettings }) => { + await uiSettings.unset('defaultIndex', 'timepicker:timeDefaults'); + await kbnClient.savedObjects.cleanStandardList(); + }); + + test.beforeEach(async ({ browserAuth, pageObjects }) => { + await browserAuth.loginAsPrivilegedUser(); + await pageObjects.dashboard.goto(); + }); + + test('should allow removing the dashboard panel after the underlying saved search has been deleted', async ({ + kbnClient, + page, + pageObjects, + }) => { + await pageObjects.dashboard.openNewDashboard(); + await createSavedSearch( + kbnClient, + SAVED_SEARCH_ID, + SAVED_SEARCH_TITLE, + testData.DATA_VIEW_ID.LOGSTASH + ); + await pageObjects.dashboard.addPanelFromLibrary(SAVED_SEARCH_TITLE); + await page.testSubj.locator('savedSearchTotalDocuments').waitFor({ + state: 'visible', + }); + + await pageObjects.dashboard.saveDashboard('Dashboard with deleted saved search'); + await kbnClient.savedObjects.delete({ + type: 'search', + id: SAVED_SEARCH_ID, + }); + + await page.reload(); + await page.waitForLoadingIndicatorHidden(); + await expect( + page.testSubj.locator('embeddableError'), + 'Embeddable error should be displayed' + ).toBeVisible(); + + await pageObjects.dashboard.removePanel('embeddableError'); + await expect( + page.testSubj.locator('embeddableError'), + 'Embeddable error should not be displayed' + ).toBeHidden(); + }); + } +); diff --git a/x-pack/plugins/discover_enhanced/ui_tests/tests/saved_searches.spec.ts b/x-pack/plugins/discover_enhanced/ui_tests/tests/saved_searches.spec.ts new file mode 100644 index 0000000000000..1398f5f24ab27 --- /dev/null +++ b/x-pack/plugins/discover_enhanced/ui_tests/tests/saved_searches.spec.ts @@ -0,0 +1,128 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { expect } from '@kbn/scout'; +import { test, testData } from '../fixtures'; +import type { ExtendedScoutTestFixtures } from '../fixtures'; + +const assertNoFilterAndEmptyQuery = async ( + filterBadge: { field: string; value: string }, + pageObjects: ExtendedScoutTestFixtures['pageObjects'], + page: ExtendedScoutTestFixtures['page'] +) => { + expect( + // checking if filter exists, enabled or disabled + await pageObjects.filterBar.hasFilter(filterBadge), + `Filter ${JSON.stringify(filterBadge)} should not exist` + ).toBe(false); + await expect( + page.testSubj.locator('queryInput'), + 'Query Bar input field should be empty' + ).toHaveText(''); +}; + +const assertDataViewIsSelected = async (page: ExtendedScoutTestFixtures['page'], name: string) => + await expect( + page.testSubj.locator('*dataView-switch-link'), + 'Incorrect data view is selected' + ).toHaveText(name); + +test.describe( + 'Discover app - saved searches', + { tag: ['@ess', '@svlSecurity', '@svlOblt', '@svlSearch'] }, + () => { + const START_TIME = '2019-04-27T23:56:51.374Z'; + const END_TIME = '2019-08-23T16:18:51.821Z'; + const PANEL_NAME = 'Ecommerce Data'; + const SEARCH_QUERY = 'customer_gender:MALE'; + const SAVED_SEARCH_NAME = 'test-unselect-saved-search'; + const filterFieldAndValue = { + field: 'category', + value: `Men's Shoes`, + }; + + test.beforeAll(async ({ esArchiver, kbnClient, uiSettings }) => { + await esArchiver.loadIfNeeded(testData.ES_ARCHIVES.ECOMMERCE); + await kbnClient.importExport.load(testData.KBN_ARCHIVES.DISCOVER); + await kbnClient.importExport.load(testData.KBN_ARCHIVES.ECOMMERCE); + await uiSettings.set({ + defaultIndex: testData.DATA_VIEW_ID.ECOMMERCE, + 'timepicker:timeDefaults': `{ "from": "${START_TIME}", "to": "${END_TIME}"}`, + }); + }); + + test.afterAll(async ({ kbnClient, uiSettings }) => { + await uiSettings.unset('defaultIndex', 'timepicker:timeDefaults'); + await kbnClient.savedObjects.cleanStandardList(); + }); + + test.beforeEach(async ({ browserAuth }) => { + await browserAuth.loginAsPrivilegedUser(); + }); + + test('should customize time range on dashboards', async ({ pageObjects, page }) => { + await pageObjects.dashboard.goto(); + await pageObjects.dashboard.openNewDashboard(); + await pageObjects.dashboard.addPanelFromLibrary(PANEL_NAME); + await page.testSubj.locator('savedSearchTotalDocuments').waitFor({ + state: 'visible', + }); + + await pageObjects.dashboard.customizePanel({ + name: PANEL_NAME, + customTimeRageCommonlyUsed: { value: 'Last_90 days' }, + }); + await expect( + page.testSubj.locator('embeddedSavedSearchDocTable').locator('.euiDataGrid__noResults'), + 'No results message in Saved Search panel should be visible' + ).toBeVisible(); + }); + + test(`should unselect saved search when navigating to a 'new'`, async ({ + pageObjects, + page, + }) => { + await pageObjects.discover.goto(); + await assertDataViewIsSelected(page, testData.DATA_VIEW.ECOMMERCE); + await pageObjects.filterBar.addFilter({ + ...filterFieldAndValue, + operator: 'is', + }); + await page.testSubj.fill('queryInput', SEARCH_QUERY); + await page.testSubj.click('querySubmitButton'); + await pageObjects.discover.waitForHistogramRendered(); + + await pageObjects.discover.saveSearch(SAVED_SEARCH_NAME); + await pageObjects.discover.waitForHistogramRendered(); + + expect( + await pageObjects.filterBar.hasFilter({ + ...filterFieldAndValue, + enabled: true, // Filter is enabled by default + }) + ).toBe(true); + await expect(page.testSubj.locator('queryInput')).toHaveText(SEARCH_QUERY); + + // create new search + await pageObjects.discover.clickNewSearch(); + await assertDataViewIsSelected(page, testData.DATA_VIEW.ECOMMERCE); + await assertNoFilterAndEmptyQuery(filterFieldAndValue, pageObjects, page); + + // change data view + await pageObjects.discover.selectDataView(testData.DATA_VIEW.LOGSTASH); + await assertNoFilterAndEmptyQuery(filterFieldAndValue, pageObjects, page); + + // change data view again + await pageObjects.discover.selectDataView(testData.DATA_VIEW.ECOMMERCE); + await assertNoFilterAndEmptyQuery(filterFieldAndValue, pageObjects, page); + + // create new search again + await pageObjects.discover.clickNewSearch(); + await assertDataViewIsSelected(page, testData.DATA_VIEW.ECOMMERCE); + }); + } +); diff --git a/x-pack/plugins/discover_enhanced/ui_tests/tests/value_suggestions.spec.ts b/x-pack/plugins/discover_enhanced/ui_tests/tests/value_suggestions.spec.ts index ff1389e85924e..04836afb99b5b 100644 --- a/x-pack/plugins/discover_enhanced/ui_tests/tests/value_suggestions.spec.ts +++ b/x-pack/plugins/discover_enhanced/ui_tests/tests/value_suggestions.spec.ts @@ -6,51 +6,54 @@ */ import { expect } from '@kbn/scout'; -import { test } from '../fixtures'; +import { test, testData, assertionMessages } from '../fixtures'; -test.describe('Discover app - value suggestions', () => { - test.beforeAll(async ({ esArchiver, kbnClient }) => { - await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional'); - await kbnClient.importExport.load( - 'x-pack/test/functional/fixtures/kbn_archiver/dashboard_drilldowns/drilldowns' - ); - await kbnClient.uiSettings.update({ - defaultIndex: 'logstash-*', // TODO: investigate why it is required for `node scripts/playwright_test.js` run - 'doc_table:legacy': false, +test.describe( + 'Discover app - value suggestions: useTimeRange enabled', + { tag: ['@ess', '@svlSecurity', '@svlOblt', '@svlSearch'] }, + () => { + test.beforeAll(async ({ esArchiver, kbnClient, uiSettings }) => { + await esArchiver.loadIfNeeded(testData.ES_ARCHIVES.LOGSTASH); + await kbnClient.importExport.load(testData.KBN_ARCHIVES.DASHBOARD_DRILLDOWNS); + await uiSettings.set({ + defaultIndex: testData.DATA_VIEW_ID.LOGSTASH, // TODO: investigate why it is required for `node scripts/playwright_test.js` run + 'timepicker:timeDefaults': `{ "from": "${testData.LOGSTASH_DEFAULT_START_TIME}", "to": "${testData.LOGSTASH_DEFAULT_END_TIME}"}`, + }); }); - }); - test.afterAll(async ({ kbnClient }) => { - await kbnClient.uiSettings.unset('doc_table:legacy'); - await kbnClient.uiSettings.unset('defaultIndex'); - await kbnClient.savedObjects.cleanStandardList(); - }); + test.afterAll(async ({ kbnClient, uiSettings }) => { + await uiSettings.unset('defaultIndex', 'timepicker:timeDefaults'); + await kbnClient.savedObjects.cleanStandardList(); + }); - test.beforeEach(async ({ browserAuth, pageObjects }) => { - await browserAuth.loginAsPrivilegedUser(); - await pageObjects.discover.goto(); - }); + test.beforeEach(async ({ browserAuth, pageObjects }) => { + await browserAuth.loginAsViewer(); + await pageObjects.discover.goto(); + }); - test('dont show up if outside of range', async ({ page, pageObjects }) => { - await pageObjects.datePicker.setAbsoluteRange({ - from: 'Mar 1, 2020 @ 00:00:00.000', - to: 'Nov 1, 2020 @ 00:00:00.000', + test('dont show up if outside of range', async ({ page, pageObjects }) => { + await pageObjects.datePicker.setAbsoluteRange(testData.LOGSTASH_OUT_OF_RANGE_DATES); + await page.testSubj.fill('queryInput', 'extension.raw : '); + await expect(page.testSubj.locator('autoCompleteSuggestionText')).toHaveCount(0); }); - await page.testSubj.fill('queryInput', 'extension.raw : '); - await expect(page.testSubj.locator('autoCompleteSuggestionText')).toHaveCount(0); - }); + test('show up if in range', async ({ page, pageObjects }) => { + await pageObjects.datePicker.setAbsoluteRange(testData.LOGSTASH_IN_RANGE_DATES); + await page.testSubj.fill('queryInput', 'extension.raw : '); + await expect( + page.testSubj.locator('autoCompleteSuggestionText'), + assertionMessages.QUERY_BAR_VALIDATION.SUGGESTIONS_COUNT + ).toHaveCount(5); + const actualSuggestions = await page.testSubj + .locator('autoCompleteSuggestionText') + .allTextContents(); + expect(actualSuggestions.join(',')).toContain('jpg'); + }); - test('show up if in range', async ({ page, pageObjects }) => { - await pageObjects.datePicker.setAbsoluteRange({ - from: 'Sep 19, 2015 @ 06:31:44.000', - to: 'Sep 23, 2015 @ 18:31:44.000', + test('also displays descriptions for operators', async ({ page, pageObjects }) => { + await pageObjects.datePicker.setAbsoluteRange(testData.LOGSTASH_IN_RANGE_DATES); + await page.testSubj.fill('queryInput', 'extension.raw'); + await expect(page.testSubj.locator('^autocompleteSuggestion-operator')).toHaveCount(2); }); - await page.testSubj.fill('queryInput', 'extension.raw : '); - await expect(page.testSubj.locator('autoCompleteSuggestionText')).toHaveCount(5); - const actualSuggestions = await page.testSubj - .locator('autoCompleteSuggestionText') - .allTextContents(); - expect(actualSuggestions.join(',')).toContain('jpg'); - }); -}); + } +); diff --git a/x-pack/plugins/discover_enhanced/ui_tests/tests/value_suggestions_non_time_based.spec.ts b/x-pack/plugins/discover_enhanced/ui_tests/tests/value_suggestions_non_time_based.spec.ts index 4ba9450869313..319d8af3e93c9 100644 --- a/x-pack/plugins/discover_enhanced/ui_tests/tests/value_suggestions_non_time_based.spec.ts +++ b/x-pack/plugins/discover_enhanced/ui_tests/tests/value_suggestions_non_time_based.spec.ts @@ -6,39 +6,42 @@ */ import { expect } from '@kbn/scout'; -import { test } from '../fixtures'; +import { test, testData, assertionMessages } from '../fixtures'; -test.describe('Discover app - value suggestions non-time based', () => { - test.beforeAll(async ({ esArchiver, kbnClient }) => { - await esArchiver.loadIfNeeded( - 'test/functional/fixtures/es_archiver/index_pattern_without_timefield' - ); - await kbnClient.importExport.load( - 'test/functional/fixtures/kbn_archiver/index_pattern_without_timefield' - ); - await kbnClient.uiSettings.update({ - defaultIndex: 'without-timefield', - 'doc_table:legacy': false, +test.describe( + 'Discover app - value suggestions non-time based', + { tag: ['@ess', '@svlSecurity', '@svlOblt', '@svlSearch'] }, + () => { + test.beforeAll(async ({ esArchiver, kbnClient, uiSettings }) => { + await esArchiver.loadIfNeeded(testData.ES_ARCHIVES.NO_TIME_FIELD); + await kbnClient.importExport.load(testData.KBN_ARCHIVES.NO_TIME_FIELD); + await uiSettings.set({ + defaultIndex: 'without-timefield', + }); }); - }); - test.afterAll(async ({ kbnClient }) => { - await kbnClient.uiSettings.unset('doc_table:legacy'); - await kbnClient.uiSettings.unset('defaultIndex'); - await kbnClient.savedObjects.cleanStandardList(); - }); + test.afterAll(async ({ kbnClient, uiSettings }) => { + await uiSettings.unset('defaultIndex'); + await kbnClient.savedObjects.cleanStandardList(); + }); - test.beforeEach(async ({ browserAuth, pageObjects }) => { - await browserAuth.loginAsPrivilegedUser(); - await pageObjects.discover.goto(); - }); + test.beforeEach(async ({ browserAuth, pageObjects }) => { + await browserAuth.loginAsViewer(); + await pageObjects.discover.goto(); + }); - test('shows all auto-suggest options for a filter in discover context app', async ({ page }) => { - await page.testSubj.fill('queryInput', 'type.keyword : '); - await expect(page.testSubj.locator('autoCompleteSuggestionText')).toHaveCount(1); - const actualSuggestions = await page.testSubj - .locator('autoCompleteSuggestionText') - .allTextContents(); - expect(actualSuggestions.join(',')).toContain('"apache"'); - }); -}); + test('shows all auto-suggest options for a filter in discover context app', async ({ + page, + }) => { + await page.testSubj.fill('queryInput', 'type.keyword : '); + await expect( + page.testSubj.locator('autoCompleteSuggestionText'), + assertionMessages.QUERY_BAR_VALIDATION.SUGGESTIONS_COUNT + ).toHaveCount(1); + const actualSuggestions = await page.testSubj + .locator('autoCompleteSuggestionText') + .allTextContents(); + expect(actualSuggestions.join(',')).toContain('"apache"'); + }); + } +); diff --git a/x-pack/plugins/discover_enhanced/ui_tests/tests/value_suggestions_use_time_range_disabled.spec.ts b/x-pack/plugins/discover_enhanced/ui_tests/tests/value_suggestions_use_time_range_disabled.spec.ts new file mode 100644 index 0000000000000..857709b091940 --- /dev/null +++ b/x-pack/plugins/discover_enhanced/ui_tests/tests/value_suggestions_use_time_range_disabled.spec.ts @@ -0,0 +1,62 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { expect } from '@kbn/scout'; +import { test, testData, assertionMessages } from '../fixtures'; + +test.describe( + 'Discover app - value suggestions: useTimeRange disabled', + { tag: ['@ess', '@svlSecurity', '@svlOblt', '@svlSearch'] }, + () => { + test.beforeAll(async ({ esArchiver, kbnClient, uiSettings }) => { + await esArchiver.loadIfNeeded(testData.ES_ARCHIVES.LOGSTASH); + await kbnClient.importExport.load(testData.KBN_ARCHIVES.DASHBOARD_DRILLDOWNS); + await uiSettings.set({ + defaultIndex: testData.DATA_VIEW_ID.LOGSTASH, // TODO: investigate why it is required for `node scripts/playwright_test.js` run + 'timepicker:timeDefaults': `{ "from": "${testData.LOGSTASH_DEFAULT_START_TIME}", "to": "${testData.LOGSTASH_DEFAULT_END_TIME}"}`, + 'autocomplete:useTimeRange': false, + }); + }); + + test.afterAll(async ({ uiSettings, kbnClient }) => { + await uiSettings.unset('defaultIndex', 'timepicker:timeDefaults'); + await uiSettings.set({ 'autocomplete:useTimeRange': true }); + await kbnClient.savedObjects.cleanStandardList(); + }); + + test.beforeEach(async ({ browserAuth, pageObjects }) => { + await browserAuth.loginAsViewer(); + await pageObjects.discover.goto(); + }); + + test('show up if outside of range', async ({ page, pageObjects }) => { + await pageObjects.datePicker.setAbsoluteRange(testData.LOGSTASH_OUT_OF_RANGE_DATES); + await page.testSubj.fill('queryInput', 'extension.raw : '); + await expect( + page.testSubj.locator('autoCompleteSuggestionText'), + assertionMessages.QUERY_BAR_VALIDATION.SUGGESTIONS_COUNT + ).toHaveCount(5); + const actualSuggestions = await page.testSubj + .locator('autoCompleteSuggestionText') + .allTextContents(); + expect(actualSuggestions.join(',')).toContain('jpg'); + }); + + test('show up if in range', async ({ page, pageObjects }) => { + await pageObjects.datePicker.setAbsoluteRange(testData.LOGSTASH_IN_RANGE_DATES); + await page.testSubj.fill('queryInput', 'extension.raw : '); + await expect( + page.testSubj.locator('autoCompleteSuggestionText'), + assertionMessages.QUERY_BAR_VALIDATION.SUGGESTIONS_COUNT + ).toHaveCount(5); + const actualSuggestions = await page.testSubj + .locator('autoCompleteSuggestionText') + .allTextContents(); + expect(actualSuggestions.join(',')).toContain('jpg'); + }); + } +); diff --git a/x-pack/plugins/elastic_assistant/kibana.jsonc b/x-pack/plugins/elastic_assistant/kibana.jsonc index 435ec0b916d01..2b06f1e0db65e 100644 --- a/x-pack/plugins/elastic_assistant/kibana.jsonc +++ b/x-pack/plugins/elastic_assistant/kibana.jsonc @@ -17,9 +17,11 @@ "ml", "taskManager", "licensing", + "llmTasks", "inference", + "productDocBase", "spaces", "security" ] } -} \ No newline at end of file +} diff --git a/x-pack/plugins/elastic_assistant/server/__mocks__/request_context.ts b/x-pack/plugins/elastic_assistant/server/__mocks__/request_context.ts index 77bd6b00105b6..3837c158ba199 100644 --- a/x-pack/plugins/elastic_assistant/server/__mocks__/request_context.ts +++ b/x-pack/plugins/elastic_assistant/server/__mocks__/request_context.ts @@ -53,6 +53,7 @@ export const createMockClients = () => { getSpaceId: jest.fn(), getCurrentUser: jest.fn(), inference: jest.fn(), + llmTasks: jest.fn(), }, savedObjectsClient: core.savedObjects.client, @@ -145,6 +146,7 @@ const createElasticAssistantRequestContextMock = ( getServerBasePath: jest.fn(), getSpaceId: jest.fn().mockReturnValue('default'), inference: { getClient: jest.fn() }, + llmTasks: { retrieveDocumentationAvailable: jest.fn(), retrieveDocumentation: jest.fn() }, core: clients.core, telemetry: clients.elasticAssistant.telemetry, }; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_service/helpers.test.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/helpers.test.ts new file mode 100644 index 0000000000000..8cd020149c433 --- /dev/null +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/helpers.test.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 { ensureProductDocumentationInstalled } from './helpers'; +import { loggerMock } from '@kbn/logging-mocks'; + +const mockLogger = loggerMock.create(); +const mockProductDocManager = { + getStatus: jest.fn(), + install: jest.fn(), + uninstall: jest.fn(), + update: jest.fn(), +}; + +describe('helpers', () => { + describe('ensureProductDocumentationInstalled', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('should install product documentation if not installed', async () => { + mockProductDocManager.getStatus.mockResolvedValue({ status: 'uninstalled' }); + mockProductDocManager.install.mockResolvedValue(null); + + await ensureProductDocumentationInstalled(mockProductDocManager, mockLogger); + + expect(mockProductDocManager.getStatus).toHaveBeenCalled(); + expect(mockLogger.debug).toHaveBeenCalledWith( + 'Installing product documentation for AIAssistantService' + ); + expect(mockProductDocManager.install).toHaveBeenCalled(); + expect(mockLogger.debug).toHaveBeenNthCalledWith( + 2, + 'Successfully installed product documentation for AIAssistantService' + ); + }); + + it('should not install product documentation if already installed', async () => { + mockProductDocManager.getStatus.mockResolvedValue({ status: 'installed' }); + + await ensureProductDocumentationInstalled(mockProductDocManager, mockLogger); + + expect(mockProductDocManager.getStatus).toHaveBeenCalled(); + expect(mockProductDocManager.install).not.toHaveBeenCalled(); + expect(mockLogger.debug).not.toHaveBeenCalledWith( + 'Installing product documentation for AIAssistantService' + ); + }); + it('should log a warning if install fails', async () => { + mockProductDocManager.getStatus.mockResolvedValue({ status: 'not_installed' }); + mockProductDocManager.install.mockRejectedValue(new Error('Install failed')); + + await ensureProductDocumentationInstalled(mockProductDocManager, mockLogger); + + expect(mockProductDocManager.getStatus).toHaveBeenCalled(); + expect(mockProductDocManager.install).toHaveBeenCalled(); + + expect(mockLogger.warn).toHaveBeenCalledWith( + 'Failed to install product documentation for AIAssistantService: Install failed' + ); + }); + + it('should log a warning if getStatus fails', async () => { + mockProductDocManager.getStatus.mockRejectedValue(new Error('Status check failed')); + + await ensureProductDocumentationInstalled(mockProductDocManager, mockLogger); + + expect(mockProductDocManager.getStatus).toHaveBeenCalled(); + expect(mockLogger.warn).toHaveBeenCalledWith( + 'Failed to get status of product documentation installation for AIAssistantService: Status check failed' + ); + expect(mockProductDocManager.install).not.toHaveBeenCalled(); + }); + }); +}); diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_service/helpers.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/helpers.ts index 57b7745a89c78..9067e42ca88bb 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_service/helpers.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/helpers.ts @@ -9,6 +9,11 @@ import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import type { KibanaRequest } from '@kbn/core-http-server'; import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import type { MlPluginSetup } from '@kbn/ml-plugin/server'; +import { DeleteByQueryRequest } from '@elastic/elasticsearch/lib/api/types'; +import { i18n } from '@kbn/i18n'; +import { ProductDocBaseStartContract } from '@kbn/product-doc-base-plugin/server'; +import type { Logger } from '@kbn/logging'; +import { getResourceName } from '.'; import { knowledgeBaseIngestPipeline } from '../ai_assistant_data_clients/knowledge_base/ingest_pipeline'; import { GetElser } from '../types'; @@ -96,3 +101,67 @@ export const deletePipeline = async ({ esClient, id }: DeletePipelineParams): Pr return response.acknowledged; }; + +export const removeLegacyQuickPrompt = async (esClient: ElasticsearchClient) => { + try { + const deleteQuery: DeleteByQueryRequest = { + index: `${getResourceName('prompts')}-*`, + query: { + bool: { + must: [ + { + term: { + name: ESQL_QUERY_GENERATION_TITLE, + }, + }, + { + term: { + prompt_type: 'quick', + }, + }, + { + term: { + is_default: true, + }, + }, + ], + }, + }, + }; + return esClient.deleteByQuery(deleteQuery); + } catch (e) { + // swallow any errors + return { + total: 0, + }; + } +}; + +const ESQL_QUERY_GENERATION_TITLE = i18n.translate( + 'xpack.elasticAssistantPlugin.assistant.quickPrompts.esqlQueryGenerationTitle', + { + defaultMessage: 'ES|QL Query Generation', + } +); + +export const ensureProductDocumentationInstalled = async ( + productDocManager: ProductDocBaseStartContract['management'], + logger: Logger +) => { + try { + const { status } = await productDocManager.getStatus(); + if (status !== 'installed') { + logger.debug(`Installing product documentation for AIAssistantService`); + try { + await productDocManager.install(); + logger.debug(`Successfully installed product documentation for AIAssistantService`); + } catch (e) { + logger.warn(`Failed to install product documentation for AIAssistantService: ${e.message}`); + } + } + } catch (e) { + logger.warn( + `Failed to get status of product documentation installation for AIAssistantService: ${e.message}` + ); + } +}; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.test.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.test.ts index 4bfd4da6cfcbf..c60fe9a220482 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.test.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.test.ts @@ -122,6 +122,12 @@ describe('AI Assistant Service', () => { kibanaVersion: '8.8.0', ml, taskManager: taskManagerMock.createSetup(), + productDocManager: Promise.resolve({ + getStatus: jest.fn(), + install: jest.fn(), + update: jest.fn(), + uninstall: jest.fn(), + }), }; }); diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.ts index 81ddd69fb67d3..ff0f95340d466 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.ts @@ -12,6 +12,7 @@ import type { TaskManagerSetupContract } from '@kbn/task-manager-plugin/server'; import type { MlPluginSetup } from '@kbn/ml-plugin/server'; import { Subject } from 'rxjs'; import { LicensingApiRequestHandlerContext } from '@kbn/licensing-plugin/server'; +import { ProductDocBaseStartContract } from '@kbn/product-doc-base-plugin/server'; import { attackDiscoveryFieldMap } from '../lib/attack_discovery/persistence/field_maps_configuration/field_maps_configuration'; import { defendInsightsFieldMap } from '../ai_assistant_data_clients/defend_insights/field_maps_configuration'; import { getDefaultAnonymizationFields } from '../../common/anonymization'; @@ -35,12 +36,17 @@ import { } from '../ai_assistant_data_clients/knowledge_base'; import { AttackDiscoveryDataClient } from '../lib/attack_discovery/persistence'; import { DefendInsightsDataClient } from '../ai_assistant_data_clients/defend_insights'; -import { createGetElserId, createPipeline, pipelineExists } from './helpers'; +import { + createGetElserId, + createPipeline, + ensureProductDocumentationInstalled, + pipelineExists, +} from './helpers'; import { hasAIAssistantLicense } from '../routes/helpers'; const TOTAL_FIELDS_LIMIT = 2500; -function getResourceName(resource: string) { +export function getResourceName(resource: string) { return `.kibana-elastic-ai-assistant-${resource}`; } @@ -51,6 +57,7 @@ export interface AIAssistantServiceOpts { ml: MlPluginSetup; taskManager: TaskManagerSetupContract; pluginStop$: Subject; + productDocManager: Promise; } export interface CreateAIAssistantClientParams { @@ -87,6 +94,7 @@ export class AIAssistantService { private initPromise: Promise; private isKBSetupInProgress: boolean = false; private hasInitializedV2KnowledgeBase: boolean = false; + private productDocManager?: ProductDocBaseStartContract['management']; constructor(private readonly options: AIAssistantServiceOpts) { this.initialized = false; @@ -129,6 +137,13 @@ export class AIAssistantService { this.initPromise, this.installAndUpdateSpaceLevelResources.bind(this) ); + options.productDocManager + .then((productDocManager) => { + this.productDocManager = productDocManager; + }) + .catch((error) => { + this.options.logger.warn(`Failed to initialize productDocManager: ${error.message}`); + }); } public isInitialized() { @@ -183,6 +198,11 @@ export class AIAssistantService { this.options.logger.debug(`Initializing resources for AIAssistantService`); const esClient = await this.options.elasticsearchClientPromise; + if (this.productDocManager) { + // install product documentation without blocking other resources + void ensureProductDocumentationInstalled(this.productDocManager, this.options.logger); + } + await this.conversationsDataStream.install({ esClient, logger: this.options.logger, diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/types.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/types.ts index 7dea19755a686..abef39d8b2e25 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/types.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/types.ts @@ -17,6 +17,7 @@ import { PublicMethodsOf } from '@kbn/utility-types'; import type { InferenceServerStart } from '@kbn/inference-plugin/server'; import { AnalyticsServiceSetup } from '@kbn/core-analytics-server'; import { TelemetryParams } from '@kbn/langchain/server/tracers/telemetry/telemetry_tracer'; +import type { LlmTasksPluginStart } from '@kbn/llm-tasks-plugin/server'; import { ResponseBody } from '../types'; import type { AssistantTool } from '../../../types'; import { AIAssistantKnowledgeBaseDataClient } from '../../../ai_assistant_data_clients/knowledge_base'; @@ -45,10 +46,11 @@ export interface AgentExecutorParams { dataClients?: AssistantDataClients; esClient: ElasticsearchClient; langChainMessages: BaseMessage[]; + llmTasks?: LlmTasksPluginStart; llmType?: string; isOssModel?: boolean; - logger: Logger; inference: InferenceServerStart; + logger: Logger; onNewReplacements?: (newReplacements: Replacements) => void; replacements: Replacements; isStream?: T; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/index.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/index.ts index e9d2c1dd2618b..4ddd3eae11624 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/index.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/graphs/default_assistant_graph/index.ts @@ -35,6 +35,7 @@ export const callAssistantGraph: AgentExecutor = async ({ esClient, inference, langChainMessages, + llmTasks, llmType, isOssModel, logger: parentLogger, @@ -106,6 +107,7 @@ export const callAssistantGraph: AgentExecutor = async ({ inference, isEnabledKnowledgeBase, kbDataClient: dataClients?.kbDataClient, + llmTasks, logger, onNewReplacements, replacements, diff --git a/x-pack/plugins/elastic_assistant/server/plugin.ts b/x-pack/plugins/elastic_assistant/server/plugin.ts index 4386b95c3fa7a..e93e3786b123c 100755 --- a/x-pack/plugins/elastic_assistant/server/plugin.ts +++ b/x-pack/plugins/elastic_assistant/server/plugin.ts @@ -25,7 +25,7 @@ import { RequestContextFactory } from './routes/request_context_factory'; import { PLUGIN_ID } from '../common/constants'; import { registerRoutes } from './routes/register_routes'; import { appContextService } from './services/app_context'; -import { createGetElserId } from './ai_assistant_service/helpers'; +import { createGetElserId, removeLegacyQuickPrompt } from './ai_assistant_service/helpers'; export class ElasticAssistantPlugin implements @@ -63,6 +63,9 @@ export class ElasticAssistantPlugin elasticsearchClientPromise: core .getStartServices() .then(([{ elasticsearch }]) => elasticsearch.client.asInternalUser), + productDocManager: core + .getStartServices() + .then(([_, { productDocBase }]) => productDocBase.management), pluginStop$: this.pluginStop$, }); @@ -109,6 +112,12 @@ export class ElasticAssistantPlugin this.getElserId = createGetElserId(this.mlTrainedModelsProvider); } }); + removeLegacyQuickPrompt(core.elasticsearch.client.asInternalUser) + .then((res) => { + if (res?.total) + this.logger.info(`Removed ${res.total} legacy quick prompts from AI Assistant`); + }) + .catch(() => {}); return { actions: plugins.actions, diff --git a/x-pack/plugins/elastic_assistant/server/routes/chat/chat_complete_route.test.ts b/x-pack/plugins/elastic_assistant/server/routes/chat/chat_complete_route.test.ts index 5d277abb00667..8cd2f0fd801d0 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/chat/chat_complete_route.test.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/chat/chat_complete_route.test.ts @@ -61,6 +61,7 @@ const mockContext = { getRegisteredFeatures: jest.fn(() => defaultAssistantFeatures), logger: loggingSystemMock.createLogger(), telemetry: { ...coreMock.createSetup().analytics, reportEvent }, + llmTasks: { retrieveDocumentationAvailable: jest.fn(), retrieveDocumentation: jest.fn() }, getCurrentUser: () => ({ username: 'user', email: 'email', diff --git a/x-pack/plugins/elastic_assistant/server/routes/chat/chat_complete_route.ts b/x-pack/plugins/elastic_assistant/server/routes/chat/chat_complete_route.ts index 35b4999a30249..cf1cff3d6201d 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/chat/chat_complete_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/chat/chat_complete_route.ts @@ -69,6 +69,8 @@ export const chatCompleteRoute = ( try { telemetry = ctx.elasticAssistant.telemetry; const inference = ctx.elasticAssistant.inference; + const productDocsAvailable = + (await ctx.elasticAssistant.llmTasks.retrieveDocumentationAvailable()) ?? false; // Perform license and authenticated user checks const checkResponse = performChecks({ @@ -217,6 +219,7 @@ export const chatCompleteRoute = ( response, telemetry, responseLanguage: request.body.responseLanguage, + ...(productDocsAvailable ? { llmTasks: ctx.elasticAssistant.llmTasks } : {}), }); } catch (err) { const error = transformError(err as Error); diff --git a/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.ts b/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.ts index 4e4b7e5fcd251..3c61fe75f6d00 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.ts @@ -150,6 +150,8 @@ export const postEvaluateRoute = ( const esClient = ctx.core.elasticsearch.client.asCurrentUser; const inference = ctx.elasticAssistant.inference; + const productDocsAvailable = + (await ctx.elasticAssistant.llmTasks.retrieveDocumentationAvailable()) ?? false; // Data clients const anonymizationFieldsDataClient = @@ -280,6 +282,7 @@ export const postEvaluateRoute = ( connectorId: connector.id, size, telemetry: ctx.elasticAssistant.telemetry, + ...(productDocsAvailable ? { llmTasks: ctx.elasticAssistant.llmTasks } : {}), }; const tools: StructuredTool[] = assistantTools.flatMap( diff --git a/x-pack/plugins/elastic_assistant/server/routes/helpers.ts b/x-pack/plugins/elastic_assistant/server/routes/helpers.ts index 23ec7011be5b7..25d4ce1a2ec45 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/helpers.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/helpers.ts @@ -29,6 +29,7 @@ import { ActionsClient } from '@kbn/actions-plugin/server'; import { AssistantFeatureKey } from '@kbn/elastic-assistant-common/impl/capabilities'; import { getLangSmithTracer } from '@kbn/langchain/server/tracers/langsmith'; import type { InferenceServerStart } from '@kbn/inference-plugin/server'; +import type { LlmTasksPluginStart } from '@kbn/llm-tasks-plugin/server'; import { INVOKE_ASSISTANT_SUCCESS_EVENT } from '../lib/telemetry/event_based_telemetry'; import { AIAssistantKnowledgeBaseDataClient } from '../ai_assistant_data_clients/knowledge_base'; import { FindResponse } from '../ai_assistant_data_clients/find'; @@ -215,6 +216,7 @@ export interface LangChainExecuteParams { telemetry: AnalyticsServiceSetup; actionTypeId: string; connectorId: string; + llmTasks?: LlmTasksPluginStart; inference: InferenceServerStart; isOssModel?: boolean; conversationId?: string; @@ -246,6 +248,7 @@ export const langChainExecute = async ({ isOssModel, context, actionsClient, + llmTasks, inference, request, logger, @@ -301,6 +304,7 @@ export const langChainExecute = async ({ conversationId, connectorId, esClient, + llmTasks, inference, isStream, llmType: getLlmType(actionTypeId), diff --git a/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.test.ts b/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.test.ts index a7abac27dac6f..9f4d0beb3caff 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.test.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.test.ts @@ -67,6 +67,7 @@ const mockContext = { actions: { getActionsClientWithRequest: jest.fn().mockResolvedValue(actionsClient), }, + llmTasks: { retrieveDocumentationAvailable: jest.fn(), retrieveDocumentation: jest.fn() }, getRegisteredTools: jest.fn(() => []), getRegisteredFeatures: jest.fn(() => defaultAssistantFeatures), logger: loggingSystemMock.createLogger(), diff --git a/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.ts b/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.ts index 43264a6c1f54b..55c23629c5de1 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.ts @@ -97,6 +97,8 @@ export const postActionsConnectorExecuteRoute = ( // get the actions plugin start contract from the request context: const actions = ctx.elasticAssistant.actions; const inference = ctx.elasticAssistant.inference; + const productDocsAvailable = + (await ctx.elasticAssistant.llmTasks.retrieveDocumentationAvailable()) ?? false; const actionsClient = await actions.getActionsClientWithRequest(request); const connectors = await actionsClient.getBulk({ ids: [connectorId] }); const connector = connectors.length > 0 ? connectors[0] : undefined; @@ -150,6 +152,7 @@ export const postActionsConnectorExecuteRoute = ( response, telemetry, systemPrompt, + ...(productDocsAvailable ? { llmTasks: ctx.elasticAssistant.llmTasks } : {}), }); } catch (err) { logger.error(err); diff --git a/x-pack/plugins/elastic_assistant/server/routes/request_context_factory.ts b/x-pack/plugins/elastic_assistant/server/routes/request_context_factory.ts index ef921d7c91a28..30045b3da8ad9 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/request_context_factory.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/request_context_factory.ts @@ -78,7 +78,7 @@ export class RequestContextFactory implements IRequestContextFactory { getRegisteredFeatures: (pluginName: string) => { return appContextService.getRegisteredFeatures(pluginName); }, - + llmTasks: startPlugins.llmTasks, inference: startPlugins.inference, telemetry: core.analytics, diff --git a/x-pack/plugins/elastic_assistant/server/types.ts b/x-pack/plugins/elastic_assistant/server/types.ts index 93f35d11eb877..6158acde679ff 100755 --- a/x-pack/plugins/elastic_assistant/server/types.ts +++ b/x-pack/plugins/elastic_assistant/server/types.ts @@ -20,6 +20,7 @@ import type { Logger, SecurityServiceStart, } from '@kbn/core/server'; +import type { LlmTasksPluginStart } from '@kbn/llm-tasks-plugin/server'; import { type MlPluginSetup } from '@kbn/ml-plugin/server'; import { DynamicStructuredTool, Tool } from '@langchain/core/tools'; import { SpacesPluginSetup, SpacesPluginStart } from '@kbn/spaces-plugin/server'; @@ -46,6 +47,7 @@ import { } from '@kbn/langchain/server'; import type { InferenceServerStart } from '@kbn/inference-plugin/server'; +import { ProductDocBaseStartContract } from '@kbn/product-doc-base-plugin/server'; import type { GetAIAssistantKnowledgeBaseDataClientParams } from './ai_assistant_data_clients/knowledge_base'; import { AttackDiscoveryDataClient } from './lib/attack_discovery/persistence'; import { AIAssistantConversationsDataClient } from './ai_assistant_data_clients/conversations'; @@ -111,10 +113,12 @@ export interface ElasticAssistantPluginSetupDependencies { } export interface ElasticAssistantPluginStartDependencies { actions: ActionsPluginStart; + llmTasks: LlmTasksPluginStart; inference: InferenceServerStart; spaces?: SpacesPluginStart; security: SecurityServiceStart; licensing: LicensingPluginStart; + productDocBase: ProductDocBaseStartContract; } export interface ElasticAssistantApiRequestHandlerContext { @@ -134,6 +138,7 @@ export interface ElasticAssistantApiRequestHandlerContext { getDefendInsightsDataClient: () => Promise; getAIAssistantPromptsDataClient: () => Promise; getAIAssistantAnonymizationFieldsDataClient: () => Promise; + llmTasks: LlmTasksPluginStart; inference: InferenceServerStart; telemetry: AnalyticsServiceSetup; } @@ -230,6 +235,7 @@ export interface AssistantToolParams { kbDataClient?: AIAssistantKnowledgeBaseDataClient; langChainTimeout?: number; llm?: ActionsClientLlm | AssistantToolLlm; + llmTasks?: LlmTasksPluginStart; isOssModel?: boolean; logger: Logger; onNewReplacements?: (newReplacements: Replacements) => void; diff --git a/x-pack/plugins/elastic_assistant/tsconfig.json b/x-pack/plugins/elastic_assistant/tsconfig.json index 52ed30dde67f8..5b9a7cb3466db 100644 --- a/x-pack/plugins/elastic_assistant/tsconfig.json +++ b/x-pack/plugins/elastic_assistant/tsconfig.json @@ -50,7 +50,9 @@ "@kbn/zod", "@kbn/inference-plugin", "@kbn/data-views-plugin", - "@kbn/core-analytics-server" + "@kbn/core-analytics-server", + "@kbn/llm-tasks-plugin", + "@kbn/product-doc-base-plugin" ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/embeddable_enhanced/kibana.jsonc b/x-pack/plugins/embeddable_enhanced/kibana.jsonc index d795afa4d7938..3b9632d4bf36c 100644 --- a/x-pack/plugins/embeddable_enhanced/kibana.jsonc +++ b/x-pack/plugins/embeddable_enhanced/kibana.jsonc @@ -5,7 +5,7 @@ "@elastic/kibana-presentation" ], "group": "platform", - "visibility": "private", + "visibility": "shared", "description": "Extends embeddable plugin with more functionality", "plugin": { "id": "embeddableEnhanced", diff --git a/x-pack/plugins/enterprise_search/public/applications/ai_search/index.tsx b/x-pack/plugins/enterprise_search/public/applications/ai_search/index.tsx index 2920a4900f0bd..bcb4441750d08 100644 --- a/x-pack/plugins/enterprise_search/public/applications/ai_search/index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/ai_search/index.tsx @@ -9,35 +9,17 @@ import React from 'react'; import { Routes, Route } from '@kbn/shared-ux-router'; -import { isVersionMismatch } from '../../../common/is_version_mismatch'; import { InitialAppData } from '../../../common/types'; -import { VersionMismatchPage } from '../shared/version_mismatch'; import { AISearchGuide } from './components/ai_search_guide/ai_search_guide'; import { ROOT_PATH } from './routes'; -export const EnterpriseSearchAISearch: React.FC = (props) => { - const { enterpriseSearchVersion, kibanaVersion } = props; - const incompatibleVersions = isVersionMismatch(enterpriseSearchVersion, kibanaVersion); - - const showView = () => { - if (incompatibleVersions) { - return ( - - ); - } - - return ; - }; - +export const EnterpriseSearchAISearch: React.FC = () => { return ( - {showView()} + ); diff --git a/x-pack/plugins/enterprise_search/public/applications/analytics/index.test.tsx b/x-pack/plugins/enterprise_search/public/applications/analytics/index.test.tsx index d3261eb265c06..a9914ca244f5b 100644 --- a/x-pack/plugins/enterprise_search/public/applications/analytics/index.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/analytics/index.test.tsx @@ -14,8 +14,6 @@ import React from 'react'; import { shallow } from 'enzyme'; -import { VersionMismatchPage } from '../shared/version_mismatch'; - import { AnalyticsOverview } from './components/analytics_overview/analytics_overview'; import { Analytics } from '.'; @@ -30,10 +28,4 @@ describe('EnterpriseSearchAnalytics', () => { expect(wrapper.find(AnalyticsOverview)).toHaveLength(1); }); - - it('renders VersionMismatchPage when there are mismatching versions', () => { - const wrapper = shallow(); - - expect(wrapper.find(VersionMismatchPage)).toHaveLength(1); - }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/analytics/index.tsx b/x-pack/plugins/enterprise_search/public/applications/analytics/index.tsx index 19d7b67be6bfc..03de5eff97837 100644 --- a/x-pack/plugins/enterprise_search/public/applications/analytics/index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/analytics/index.tsx @@ -9,30 +9,18 @@ import React from 'react'; import { Routes, Route } from '@kbn/shared-ux-router'; -import { isVersionMismatch } from '../../../common/is_version_mismatch'; import { InitialAppData } from '../../../common/types'; -import { VersionMismatchPage } from '../shared/version_mismatch'; import { AnalyticsCollectionView } from './components/analytics_collection_view/analytics_collection_view'; import { AnalyticsOverview } from './components/analytics_overview/analytics_overview'; import { ROOT_PATH, COLLECTION_VIEW_PATH } from './routes'; -export const Analytics: React.FC = (props) => { - const { enterpriseSearchVersion, kibanaVersion } = props; - const incompatibleVersions = isVersionMismatch(enterpriseSearchVersion, kibanaVersion); - +export const Analytics: React.FC = () => { return ( - {incompatibleVersions ? ( - - ) : ( - - )} + diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/documents/search_experience/customization_modal.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/documents/search_experience/customization_modal.tsx index 299a840cf8919..779158ae1e114 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/documents/search_experience/customization_modal.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/documents/search_experience/customization_modal.tsx @@ -20,6 +20,7 @@ import { EuiModalFooter, EuiModalHeader, EuiModalHeaderTitle, + useGeneratedHtmlId, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -44,6 +45,7 @@ export const CustomizationModal: React.FC = ({ sortFields, }) => { const { engine } = useValues(EngineLogic); + const modalTitleId = useGeneratedHtmlId(); const [selectedFilterFields, setSelectedFilterFields] = useState( filterFields.map(fieldNameToComboBoxOption) @@ -69,9 +71,9 @@ export const CustomizationModal: React.FC = ({ ); return ( - + - + {i18n.translate( 'xpack.enterpriseSearch.appSearch.documents.search.customizationModal.title', { @@ -132,8 +134,11 @@ export const CustomizationModal: React.FC = ({ - {CANCEL_BUTTON_LABEL} + + {CANCEL_BUTTON_LABEL} + { onSave({ diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/error_connecting/error_connecting.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/error_connecting/error_connecting.test.tsx deleted file mode 100644 index b307835534dd4..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/error_connecting/error_connecting.test.tsx +++ /dev/null @@ -1,23 +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 React from 'react'; - -import { shallow } from 'enzyme'; - -import { ErrorStatePrompt } from '../../../shared/error_state'; - -import { ErrorConnecting } from '.'; - -describe('ErrorConnecting', () => { - it('renders', () => { - const wrapper = shallow(); - - const errorStatePrompt = wrapper.find(ErrorStatePrompt); - expect(errorStatePrompt).toHaveLength(1); - }); -}); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/error_connecting/error_connecting.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/error_connecting/error_connecting.tsx deleted file mode 100644 index 2d1235e0b5c46..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/error_connecting/error_connecting.tsx +++ /dev/null @@ -1,27 +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 React from 'react'; - -import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; - -import { ErrorStatePrompt } from '../../../shared/error_state'; -import { SetAppSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome'; -import { SendAppSearchTelemetry as SendTelemetry } from '../../../shared/telemetry'; - -export const ErrorConnecting: React.FC = () => { - return ( - <> - - - - - - - - ); -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/multi_input_rows/constants.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/multi_input_rows/constants.ts index f0c077c5bfaf2..1b16ec0082f85 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/multi_input_rows/constants.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/multi_input_rows/constants.ts @@ -12,12 +12,18 @@ export const ADD_VALUE_BUTTON_LABEL = i18n.translate( { defaultMessage: 'Add value' } ); -export const DELETE_VALUE_BUTTON_LABEL = i18n.translate( - 'xpack.enterpriseSearch.appSearch.multiInputRows.removeValueButtonLabel', - { defaultMessage: 'Remove value' } -); +export const DELETE_ROW_VALUE_BUTTON_LABEL = (index: number) => + i18n.translate('xpack.enterpriseSearch.appSearch.multiInputRows.removeRowValueButtonLabel', { + defaultMessage: 'Remove value, row {index}', + values: { index }, + }); export const INPUT_ROW_PLACEHOLDER = i18n.translate( 'xpack.enterpriseSearch.appSearch.multiInputRows.inputRowPlaceholder', { defaultMessage: 'Enter a value' } ); + +export const INPUT_ROW_CONTAINER_ARIA_LABEL = i18n.translate( + 'xpack.enterpriseSearch.appSearch.multiInputRows.inputRowContainerAriaLabel', + { defaultMessage: 'Multiple input rows' } +); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/multi_input_rows/multi_input_rows.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/multi_input_rows/multi_input_rows.tsx index 257f4b637f3e0..f80b9cc07a218 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/multi_input_rows/multi_input_rows.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/multi_input_rows/multi_input_rows.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React from 'react'; +import React, { useRef } from 'react'; import { useValues, useActions } from 'kea'; import useUpdateEffect from 'react-use/lib/useUpdateEffect'; @@ -16,8 +16,9 @@ import { CONTINUE_BUTTON_LABEL } from '../../../shared/constants'; import { ADD_VALUE_BUTTON_LABEL, - DELETE_VALUE_BUTTON_LABEL, + DELETE_ROW_VALUE_BUTTON_LABEL, INPUT_ROW_PLACEHOLDER, + INPUT_ROW_CONTAINER_ARIA_LABEL, } from './constants'; import { InputRow } from './input_row'; import { MultiInputRowsLogic } from './multi_input_rows_logic'; @@ -43,12 +44,13 @@ export const MultiInputRows: React.FC = ({ showSubmitButton = true, submitButtonText = CONTINUE_BUTTON_LABEL, addRowText = ADD_VALUE_BUTTON_LABEL, - deleteRowLabel = DELETE_VALUE_BUTTON_LABEL, + deleteRowLabel, inputPlaceholder = INPUT_ROW_PLACEHOLDER, }) => { const logic = MultiInputRowsLogic({ id, values: initialValues }); const { values, addedNewRow, hasEmptyValues, hasOnlyOneValue } = useValues(logic); const { addValue, editValue, deleteValue } = useActions(logic); + const valuesContainerRef = useRef(null); useUpdateEffect(() => { if (onChange) { @@ -69,22 +71,32 @@ export const MultiInputRows: React.FC = ({ : undefined } > - {values.map((value: string, index: number) => { - const firstRow = index === 0; - const lastRow = index === values.length - 1; - return ( - editValue(index, newValue)} - onDelete={() => deleteValue(index)} - disableDelete={hasOnlyOneValue} - deleteLabel={deleteRowLabel} - /> - ); - })} +
        + {values.map((value: string, index: number) => { + const firstRow = index === 0; + const lastRow = index === values.length - 1; + return ( + editValue(index, newValue)} + onDelete={() => { + deleteValue(index); + valuesContainerRef.current?.focus(); + }} + disableDelete={hasOnlyOneValue} + deleteLabel={deleteRowLabel || DELETE_ROW_VALUE_BUTTON_LABEL(index + 1)} + /> + ); + })} +
        ({ AppLogic: jest.fn() })); @@ -26,7 +25,6 @@ import { Credentials } from './components/credentials'; import { EngineRouter } from './components/engine'; import { EngineCreation } from './components/engine_creation'; import { EnginesOverview } from './components/engines'; -import { ErrorConnecting } from './components/error_connecting'; import { Library } from './components/library'; import { MetaEngineCreation } from './components/meta_engine_creation'; import { RoleMappings } from './components/role_mappings'; @@ -42,12 +40,6 @@ describe('AppSearch', () => { expect(wrapper.find(SetupGuide)).toHaveLength(1); }); - it('renders VersionMismatchPage when there are mismatching versions', () => { - const wrapper = shallow(); - - expect(wrapper.find(VersionMismatchPage)).toHaveLength(1); - }); - it('renders AppSearchUnconfigured when config.host is not set', () => { setMockValues({ config: { host: '' } }); const wrapper = shallow(); @@ -55,14 +47,6 @@ describe('AppSearch', () => { expect(wrapper.find(AppSearchUnconfigured)).toHaveLength(1); }); - it('renders ErrorConnecting when Enterprise Search is unavailable', () => { - setMockValues({ errorConnectingMessage: '502 Bad Gateway' }); - const wrapper = shallow(); - - const errorConnection = wrapper.find(ErrorConnecting); - expect(errorConnection).toHaveLength(1); - }); - it('renders AppSearchConfigured when config.host is set & available', () => { setMockValues({ errorConnectingMessage: '', config: { host: 'some.url' } }); const wrapper = shallow(); diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/index.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/index.tsx index 7f7237555867b..1a75cd58b1a24 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/index.tsx @@ -12,19 +12,15 @@ import { useValues } from 'kea'; import { Routes, Route } from '@kbn/shared-ux-router'; -import { isVersionMismatch } from '../../../common/is_version_mismatch'; import { InitialAppData } from '../../../common/types'; -import { HttpLogic } from '../shared/http'; import { KibanaLogic } from '../shared/kibana'; import { EndpointsHeaderAction } from '../shared/layout/endpoints_header_action'; -import { VersionMismatchPage } from '../shared/version_mismatch'; import { AppLogic } from './app_logic'; import { Credentials } from './components/credentials'; import { EngineRouter } from './components/engine'; import { EngineCreation } from './components/engine_creation'; import { EnginesOverview } from './components/engines'; -import { ErrorConnecting } from './components/error_connecting'; import { KibanaHeaderActions } from './components/layout'; import { Library } from './components/library'; import { MetaEngineCreation } from './components/meta_engine_creation'; @@ -47,24 +43,10 @@ import { export const AppSearch: React.FC = (props) => { const { config } = useValues(KibanaLogic); - const { errorConnectingMessage } = useValues(HttpLogic); - const { enterpriseSearchVersion, kibanaVersion } = props; - const incompatibleVersions = isVersionMismatch(enterpriseSearchVersion, kibanaVersion); - const showView = () => { if (!config.host) { return ; - } else if (incompatibleVersions) { - return ( - - ); - } else if (errorConnectingMessage) { - return ; } - return )} />; }; diff --git a/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/connect/search_application_connect.tsx b/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/connect/search_application_connect.tsx index f3047ac23b645..99f44cbb01f0c 100644 --- a/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/connect/search_application_connect.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/connect/search_application_connect.tsx @@ -21,7 +21,6 @@ import { } from '../../../routes'; import { EnterpriseSearchApplicationsPageTemplate } from '../../layout/page_template'; -import { SearchApplicationError } from '../search_application_error'; import { SearchApplicationViewLogic } from '../search_application_view_logic'; import { SearchApplicationAPI } from './search_application_api'; @@ -47,7 +46,6 @@ const DOCUMENTATION_TAB_TITLE = i18n.translate( defaultMessage: 'Documentation', } ); -const ConnectTabs: string[] = Object.values(SearchApplicationConnectTabs); const getTabBreadCrumb = (tabId: string) => { switch (tabId) { case SearchApplicationConnectTabs.SEARCHAPI: @@ -76,26 +74,6 @@ export const SearchApplicationConnect: React.FC = () => { ); }; - if (!ConnectTabs.includes(connectTabId)) { - return ( - - - - ); - } - return ( { } }; -const ContentTabs: string[] = Object.values(SearchApplicationContentTabs); - export const SearchApplicationContent = () => { const { searchApplicationName, isLoadingSearchApplication, hasSchemaConflicts } = useValues( SearchApplicationViewLogic @@ -74,26 +71,6 @@ export const SearchApplicationContent = () => { contentTabId?: string; }>(); - if (!ContentTabs.includes(contentTabId)) { - return ( - - - - ); - } - const onTabClick = (tab: SearchApplicationContentTabs) => () => { KibanaLogic.values.navigateToUrl( generateEncodedPath(SEARCH_APPLICATION_CONTENT_PATH, { diff --git a/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/search_application_error.test.tsx b/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/search_application_error.test.tsx deleted file mode 100644 index d24675822a730..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/search_application_error.test.tsx +++ /dev/null @@ -1,68 +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 { setMockValues } from '../../../__mocks__/kea_logic'; - -import React from 'react'; - -import { HttpError } from '../../../../../common/types/api'; - -import { ErrorStatePrompt } from '../../../shared/error_state'; -import { NotFoundPrompt } from '../../../shared/not_found'; -import { SendEnterpriseSearchTelemetry } from '../../../shared/telemetry'; - -import { mountWithIntl } from '../../../test_helpers'; - -import { SearchApplicationError } from './search_application_error'; - -describe('SearchApplicationError', () => { - beforeEach(() => { - jest.clearAllMocks(); - setMockValues({}); - }); - - it('renders 404 prompt for 404 error', () => { - const error = { - body: { - error: 'NOT_FOUND', - message: 'Not Found', - statusCode: 404, - }, - } as HttpError; - const wrapper = mountWithIntl(); - - expect(wrapper.find(NotFoundPrompt)).toHaveLength(1); - expect(wrapper.find(SendEnterpriseSearchTelemetry)).toHaveLength(1); - expect(wrapper.find(ErrorStatePrompt)).toHaveLength(0); - - const notFound = wrapper.find(NotFoundPrompt); - expect(notFound.prop('backToLink')).toEqual('/search_applications'); - expect(notFound.prop('backToContent')).toEqual('Back to Search Applications'); - - const telemetry = wrapper.find(SendEnterpriseSearchTelemetry); - expect(telemetry.prop('action')).toEqual('error'); - expect(telemetry.prop('metric')).toEqual('not_found'); - }); - - it('renders error prompt for api errors', () => { - const error = { - body: { - error: 'ERROR', - message: 'Internal Server Error', - statusCode: 500, - }, - } as HttpError; - const wrapper = mountWithIntl(); - - expect(wrapper.find(ErrorStatePrompt)).toHaveLength(1); - expect(wrapper.find(SendEnterpriseSearchTelemetry)).toHaveLength(1); - expect(wrapper.find(NotFoundPrompt)).toHaveLength(0); - - const telemetry = wrapper.find(SendEnterpriseSearchTelemetry); - expect(telemetry.prop('action')).toEqual('error'); - expect(telemetry.prop('metric')).toEqual('cannot_connect'); - }); -}); diff --git a/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/search_application_error.tsx b/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/search_application_error.tsx deleted file mode 100644 index 49a783dbbcec3..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/search_application_error.tsx +++ /dev/null @@ -1,48 +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 React from 'react'; - -import { i18n } from '@kbn/i18n'; - -import { APPLICATIONS_PLUGIN } from '../../../../../common/constants'; -import { HttpError } from '../../../../../common/types/api'; - -import { ErrorStatePrompt } from '../../../shared/error_state'; -import { NotFoundPrompt } from '../../../shared/not_found'; -import { SendEnterpriseSearchTelemetry } from '../../../shared/telemetry'; - -import { SEARCH_APPLICATIONS_PATH } from '../../routes'; - -export const SearchApplicationError: React.FC<{ error?: HttpError; notFound?: boolean }> = ({ - error, - notFound, -}) => { - if (notFound || error?.body?.statusCode === 404) { - return ( - <> - - - - ); - } - return ( - <> - - - - ); -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/search_application_view.tsx b/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/search_application_view.tsx index fef6f95c3b435..001d36a0faf43 100644 --- a/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/search_application_view.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/search_application_view.tsx @@ -6,13 +6,12 @@ */ import React, { useEffect } from 'react'; -import { useParams, Redirect } from 'react-router-dom'; +import { Redirect } from 'react-router-dom'; import { useValues, useActions } from 'kea'; import { Routes, Route } from '@kbn/shared-ux-router'; -import { Status } from '../../../../../common/types/api'; import { SEARCH_APPLICATION_PATH, SEARCH_APPLICATION_CONTENT_PATH, @@ -22,52 +21,23 @@ import { SearchApplicationContentTabs, } from '../../routes'; -import { EnterpriseSearchApplicationsPageTemplate } from '../layout/page_template'; import { DeleteSearchApplicationModal } from '../search_applications/delete_search_application_modal'; import { SearchApplicationConnect } from './connect/search_application_connect'; import { SearchApplicationDocsExplorer } from './docs_explorer/docs_explorer'; import { SearchApplicationContent } from './search_application_content'; -import { SearchApplicationError } from './search_application_error'; import { SearchApplicationViewLogic } from './search_application_view_logic'; export const SearchApplicationView: React.FC = () => { const { fetchSearchApplication, closeDeleteSearchApplicationModal } = useActions( SearchApplicationViewLogic ); - const { - searchApplicationName, - fetchSearchApplicationApiError, - fetchSearchApplicationApiStatus, - hasSchemaConflicts, - isDeleteModalVisible, - } = useValues(SearchApplicationViewLogic); - const { tabId = SearchApplicationViewTabs.DOCS_EXPLORER } = useParams<{ - tabId?: string; - }>(); + const { searchApplicationName, isDeleteModalVisible } = useValues(SearchApplicationViewLogic); useEffect(() => { fetchSearchApplication({ name: searchApplicationName }); }, [searchApplicationName]); - if (fetchSearchApplicationApiStatus === Status.ERROR) { - return ( - } - hasSchemaConflicts={hasSchemaConflicts} - /> - ); - } - return ( <> {isDeleteModalVisible ? ( @@ -92,22 +62,6 @@ export const SearchApplicationView: React.FC = () => { from={`${SEARCH_APPLICATION_PATH}/${SearchApplicationViewTabs.CONNECT}`} to={`${SEARCH_APPLICATION_PATH}/${SearchApplicationViewTabs.CONNECT}/${SearchApplicationConnectTabs.SEARCHAPI}`} /> - - - - -
        ); diff --git a/x-pack/plugins/enterprise_search/public/applications/applications/components/search_applications/search_application_indices_flyout.tsx b/x-pack/plugins/enterprise_search/public/applications/applications/components/search_applications/search_application_indices_flyout.tsx index 532ba053af1d0..78f20bc122ca8 100644 --- a/x-pack/plugins/enterprise_search/public/applications/applications/components/search_applications/search_application_indices_flyout.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/applications/components/search_applications/search_application_indices_flyout.tsx @@ -26,7 +26,6 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { ENTERPRISE_SEARCH_CONTENT_PLUGIN } from '../../../../../common/constants'; -import { Status } from '../../../../../common/types/api'; import { EnterpriseSearchApplicationIndex } from '../../../../../common/types/search_applications'; @@ -35,8 +34,6 @@ import { healthColorsMap } from '../../../shared/constants/health_colors'; import { generateEncodedPath } from '../../../shared/encode_path_params'; import { EuiLinkTo } from '../../../shared/react_router_helpers'; -import { SearchApplicationError } from '../search_application/search_application_error'; - import { SearchApplicationIndicesFlyoutLogic } from './search_application_indices_flyout_logic'; export const SearchApplicationIndicesFlyout: React.FC = () => { @@ -45,15 +42,11 @@ export const SearchApplicationIndicesFlyout: React.FC = () => { searchApplicationName, isSearchApplicationLoading, isFlyoutVisible, - fetchSearchApplicationApiStatus, - fetchSearchApplicationApiError, } = useValues(SearchApplicationIndicesFlyoutLogic); const { closeFlyout } = useActions(SearchApplicationIndicesFlyoutLogic); if (!searchApplicationData) return null; const { indices } = searchApplicationData; - const searchApplicationFetchError = - fetchSearchApplicationApiStatus === Status.ERROR ? true : false; const columns: Array> = [ { @@ -139,11 +132,7 @@ export const SearchApplicationIndicesFlyout: React.FC = () => { - {searchApplicationFetchError ? ( - - ) : ( - - )} + ); diff --git a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/index.tsx b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/index.tsx index e5da2b5610d3d..881f042d1d626 100644 --- a/x-pack/plugins/enterprise_search/public/applications/elasticsearch/index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/elasticsearch/index.tsx @@ -9,35 +9,17 @@ import React from 'react'; import { Routes, Route } from '@kbn/shared-ux-router'; -import { isVersionMismatch } from '../../../common/is_version_mismatch'; import { InitialAppData } from '../../../common/types'; -import { VersionMismatchPage } from '../shared/version_mismatch'; import { ElasticsearchGuide } from './components/elasticsearch_guide/elasticsearch_guide'; import { ROOT_PATH } from './routes'; -export const Elasticsearch: React.FC = (props) => { - const { enterpriseSearchVersion, kibanaVersion } = props; - const incompatibleVersions = isVersionMismatch(enterpriseSearchVersion, kibanaVersion); - - const showView = () => { - if (incompatibleVersions) { - return ( - - ); - } - - return ; - }; - +export const Elasticsearch: React.FC = () => { return ( - {showView()} + ); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/native_connector_configuration.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/native_connector_configuration.tsx index 84afeb9a6e38b..86a3bf83f1b78 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/native_connector_configuration.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/native_connector_configuration.tsx @@ -11,7 +11,6 @@ import { useValues } from 'kea'; import { EuiBadge, - EuiCallOut, EuiFlexGroup, EuiFlexItem, EuiIcon, @@ -23,7 +22,6 @@ import { import { i18n } from '@kbn/i18n'; import { BetaConnectorCallout } from '../../../shared/beta/beta_connector_callout'; -import { HttpLogic } from '../../../shared/http'; import { KibanaLogic } from '../../../shared/kibana'; import { ConvertConnector } from '../search_index/connector/native_connector_configuration/convert_connector'; @@ -36,8 +34,7 @@ import { ConnectorViewLogic } from './connector_view_logic'; export const NativeConnectorConfiguration: React.FC = () => { const { connector } = useValues(ConnectorViewLogic); - const { config, connectorTypes: connectors } = useValues(KibanaLogic); - const { errorConnectingMessage } = useValues(HttpLogic); + const { connectorTypes: connectors } = useValues(KibanaLogic); const NATIVE_CONNECTORS = useMemo( () => connectors.filter(({ isNative }) => isNative), @@ -109,39 +106,8 @@ export const NativeConnectorConfiguration: React.FC = () => { - {config.host && config.canDeployEntSearch && errorConnectingMessage && ( - <> - -

        - {i18n.translate( - 'xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.entSearchWarning.text', - { - defaultMessage: - 'Elastic managed connectors require a running Enterprise Search instance.', - } - )} -

        -
        - - - - )} - { - <> - - - - } + + {connector.index_name && ( <> diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/connectors.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/connectors.tsx index c12dd8036b6b9..47f2226fe976e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/connectors.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/connectors.tsx @@ -36,8 +36,6 @@ import { } from '../../routes'; import { EnterpriseSearchContentPageTemplate } from '../layout'; -import { CannotConnect } from '../search_index/components/cannot_connect'; - import { DefaultSettingsFlyout } from '../settings/default_settings_flyout'; import { ConnectorStats } from './connector_stats'; @@ -55,7 +53,7 @@ export const connectorsBreadcrumbs = [ export const crawlersBreadcrumbs = [ i18n.translate('xpack.enterpriseSearch.content.crawlers.breadcrumb', { - defaultMessage: 'Web crawlers', + defaultMessage: 'Web Crawlers', }), ]; @@ -95,7 +93,7 @@ export const Connectors: React.FC = ({ isCrawler }) => { defaultMessage: 'Elasticsearch connectors', }) : i18n.translate('xpack.enterpriseSearch.crawlers.title', { - defaultMessage: 'Elasticsearch web crawlers', + defaultMessage: 'Elastic Web Crawler', }), rightSideGroupProps: { gutterSize: 's', @@ -241,12 +239,6 @@ export const Connectors: React.FC = ({ isCrawler }) => { {productFeatures.hasDefaultIngestPipeline && showDefaultSettingsFlyout && ( setShowDefaultSettingsFlyout(false)} /> )} - {Boolean(errorConnectingMessage) && ( - <> - - - - )} diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/crawler_empty_state.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/crawler_empty_state.tsx index 6be21dd8c63a7..2dc97fb86c04f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/crawler_empty_state.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/crawler_empty_state.tsx @@ -49,6 +49,7 @@ export const CrawlerEmptyState: React.FC = () => { fill iconType={GithubIcon} href={'https://github.com/elastic/crawler'} + target="_blank" > {i18n.translate( 'xpack.enterpriseSearch.crawlerEmptyState.openSourceCrawlerButtonLabel', diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/components/connector_description_popover.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/components/connector_description_popover.tsx index 9e0aed3fa75f0..f91a8eff670fe 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/components/connector_description_popover.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/components/connector_description_popover.tsx @@ -6,7 +6,10 @@ */ import React, { useState } from 'react'; +import { css } from '@emotion/react'; + import { + EuiButton, EuiButtonIcon, EuiCallOut, EuiFlexGroup, @@ -83,13 +86,15 @@ const connectorClientPopoverPanels = [ ]; export interface ConnectorDescriptionPopoverProps { - isDisabled: boolean; isNative: boolean; + isRunningLocally?: boolean; + showIsOnlySelfManaged: boolean; } export const ConnectorDescriptionPopover: React.FC = ({ isNative, - isDisabled, + isRunningLocally, + showIsOnlySelfManaged, }) => { const [isPopoverOpen, setIsPopoverOpen] = useState(false); const panels = isNative ? nativePopoverPanels : connectorClientPopoverPanels; @@ -111,55 +116,115 @@ export const ConnectorDescriptionPopover: React.FC - - {isDisabled && ( - - - + {(showIsOnlySelfManaged || isRunningLocally) && ( + <> + + + - + size="s" + iconType="warning" + color="warning" + /> + + + + + )} + + {!isRunningLocally && ( + + {panels.map((panel) => { + return ( + + + + + {panel.icons.map((icon, index) => ( + + {icon} + + ))} + + + + +

        {panel.description}

        +
        +
        +
        +
        + ); + })}
        )} - - - {panels.map((panel) => { - return ( - - + + + + +

        + {i18n.translate( + 'xpack.enterpriseSearch.createConnector.connectorDescriptionBadge.learnMore', + { defaultMessage: 'Explore Elastic Cloud with your 14-day free trial' } + )} +

        +
        +
        + + + {i18n.translate( + 'xpack.enterpriseSearch.createConnector.connectorDescriptionBadge.learnMore', + { + defaultMessage: + 'Take advantage of Elastic managed connectors and generative AI capabilities to address search challenges across your organization in real time, at scale.', + } + )} + + + + - - - {panel.icons.map((icon, index) => ( - - {icon} - - ))} - - - - -

        {panel.description}

        -
        -
        -
        + {i18n.translate('xpack.enterpriseSearch.createConnector.startTrialButtonLabel', { + defaultMessage: 'Start free trial', + })} +
        - ); - })} -
        + + + )}
        ); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/create_connector.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/create_connector.tsx index 6e83bf98c2371..095990c823f0a 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/create_connector.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/create_connector.tsx @@ -65,9 +65,14 @@ export const CreateConnector: React.FC = () => { const { setCurrentStep } = useActions(NewConnectorLogic); const stepStates = generateStepState(currentStep); + const { config } = useValues(KibanaLogic); + const isRunningLocally = (config.host ?? '').includes('localhost'); + useEffect(() => { - // TODO: separate this to ability and preference - if (selectedConnector && !selectedConnector.isNative && selfManagePreference === 'native') { + if ( + (selectedConnector && !selectedConnector.isNative && selfManagePreference === 'native') || + isRunningLocally + ) { setSelfManagePreference('selfManaged'); } }, [selectedConnector]); @@ -141,6 +146,7 @@ export const CreateConnector: React.FC = () => { setSelfManagePreference(preference); }} error={errorToText(error)} + isRunningLocally={isRunningLocally} /> ), }; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/start_step.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/start_step.tsx index a601222caa990..fb740189148d7 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/start_step.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/create_connector/start_step.tsx @@ -41,6 +41,7 @@ import { SelfManagePreference } from './create_connector'; interface StartStepProps { error?: string | React.ReactNode; + isRunningLocally: boolean; onSelfManagePreferenceChange(preference: SelfManagePreference): void; selfManagePreference: SelfManagePreference; setCurrentStep: Function; @@ -49,6 +50,7 @@ interface StartStepProps { export const StartStep: React.FC = ({ title, + isRunningLocally, selfManagePreference, setCurrentStep, onSelfManagePreferenceChange, @@ -209,14 +211,15 @@ export const StartStep: React.FC = ({ { defaultMessage: 'Elastic managed' } )} checked={selfManagePreference === 'native'} - disabled={selectedConnector?.isNative === false} + disabled={selectedConnector?.isNative === false || isRunningLocally} onChange={() => onSelfManagePreferenceChange('native')} name="setUp" /> @@ -234,7 +237,7 @@ export const StartStep: React.FC = ({ /> - + diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/error_connecting/error_connecting.test.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/error_connecting/error_connecting.test.tsx deleted file mode 100644 index b307835534dd4..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/error_connecting/error_connecting.test.tsx +++ /dev/null @@ -1,23 +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 React from 'react'; - -import { shallow } from 'enzyme'; - -import { ErrorStatePrompt } from '../../../shared/error_state'; - -import { ErrorConnecting } from '.'; - -describe('ErrorConnecting', () => { - it('renders', () => { - const wrapper = shallow(); - - const errorStatePrompt = wrapper.find(ErrorStatePrompt); - expect(errorStatePrompt).toHaveLength(1); - }); -}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/error_connecting/error_connecting.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/error_connecting/error_connecting.tsx deleted file mode 100644 index 69f479026014e..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/error_connecting/error_connecting.tsx +++ /dev/null @@ -1,27 +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 React from 'react'; - -import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; - -import { ErrorStatePrompt } from '../../../shared/error_state'; -import { SetSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome'; -import { SendEnterpriseSearchTelemetry as SendTelemetry } from '../../../shared/telemetry'; - -export const ErrorConnecting: React.FC = () => { - return ( - <> - - - - - - - - ); -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_crawler/method_crawler.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_crawler/method_crawler.tsx index 9e7702379a9a8..e4842f765b4ad 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_crawler/method_crawler.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/method_crawler/method_crawler.tsx @@ -21,7 +21,6 @@ import { LICENSING_FEATURE, } from '../../../../shared/licensing_callout/licensing_callout'; import { CreateCrawlerIndexApiLogic } from '../../../api/crawler/create_crawler_index_api_logic'; -import { CannotConnect } from '../../search_index/components/cannot_connect'; import { NewSearchIndexTemplate } from '../new_search_index_template'; import { MethodCrawlerLogic } from './method_crawler_logic'; @@ -44,11 +43,6 @@ export const MethodCrawler: React.FC = () => { )} - {Boolean(errorConnectingMessage) && ( - - - - )} { }} > - {errorConnectingMessage && productFeatures.hasWebCrawler && } - <> - - - {availableIngestionMethodOptions.map((type) => ( - - { - if (type === INGESTION_METHOD_IDS.CONNECTOR) { - KibanaLogic.values.navigateToUrl(NEW_INDEX_SELECT_CONNECTOR_PATH); - } else if (type === INGESTION_METHOD_IDS.CRAWLER) { - KibanaLogic.values.navigateToUrl(NEW_CRAWLER_PATH); - } else { - KibanaLogic.values.navigateToUrl(NEW_API_PATH); - } - }} - /> - - ))} - - - + + + {availableIngestionMethodOptions.map((type) => ( + + { + if (type === INGESTION_METHOD_IDS.CONNECTOR) { + KibanaLogic.values.navigateToUrl(NEW_INDEX_SELECT_CONNECTOR_PATH); + } else if (type === INGESTION_METHOD_IDS.CRAWLER) { + KibanaLogic.values.navigateToUrl(NEW_CRAWLER_PATH); + } else { + KibanaLogic.values.navigateToUrl(NEW_API_PATH); + } + }} + /> + + ))} + + ); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_template.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_template.tsx index 25baabb388575..211738b43f25d 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_template.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_template.tsx @@ -289,7 +289,7 @@ export const NewSearchIndexTemplate: React.FC = ({ {i18n.translate( 'xpack.enterpriseSearch.content.newIndex.newSearchIndexTemplate.learnMoreCrawler.linkText', { - defaultMessage: 'Learn more about the Elastic web crawler', + defaultMessage: 'Learn more about the Elastic Web Crawler', } )} diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/cannot_connect.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/cannot_connect.tsx deleted file mode 100644 index 3fa7b40117a68..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/cannot_connect.tsx +++ /dev/null @@ -1,47 +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 React from 'react'; - -import { EuiCallOut, EuiSpacer, EuiText } from '@elastic/eui'; - -import { i18n } from '@kbn/i18n'; - -import { FormattedMessage } from '@kbn/i18n-react'; - -import { EuiLinkTo } from '../../../../shared/react_router_helpers'; - -import { ERROR_STATE_PATH } from '../../../routes'; - -export const CannotConnect: React.FC = () => { - return ( - - - - - {i18n.translate('xpack.enterpriseSearch.content.cannotConnect.body', { - defaultMessage: 'More information.', - })} - - ), - }} - /> - - - ); -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx index 6cdd06f1586a2..e8876a7c56818 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx @@ -18,8 +18,6 @@ import { i18n } from '@kbn/i18n'; import { ClientConfigType } from '../../../../../common/types'; import { generateEncodedPath } from '../../../shared/encode_path_params'; -import { ErrorStatePrompt } from '../../../shared/error_state'; -import { HttpLogic } from '../../../shared/http'; import { KibanaLogic } from '../../../shared/kibana'; import { SEARCH_INDEX_PATH, SEARCH_INDEX_TAB_PATH } from '../../routes'; @@ -71,7 +69,6 @@ export const SearchIndex: React.FC = () => { }>(); const { indexName } = useValues(IndexNameLogic); - const { errorConnectingMessage } = useValues(HttpLogic); /** * Guided Onboarding needs us to mark the add data step as complete as soon as the user has data in an index. @@ -286,32 +283,19 @@ export const SearchIndex: React.FC = () => { }} > - + ); }; interface ContentProps { config?: ClientConfigType; - errorConnectingMessage: string; index?: ElasticsearchViewIndex; tabId?: string; tabs: EuiTabbedContentTab[]; } -const Content: React.FC = ({ - config, - errorConnectingMessage, - index, - tabs, - tabId, -}) => { +const Content: React.FC = ({ index, tabs, tabId }) => { const selectedTab = useMemo(() => tabs.find((tab) => tab.id === tabId), [tabId]); const onTabClick = (tab: EuiTabbedContentTab) => { @@ -329,9 +313,6 @@ const Content: React.FC = ({ if (isCrawlerIndex(index) && !index.connector) { return ; } - if (isCrawlerIndex(index) && (Boolean(errorConnectingMessage) || !config?.host)) { - return ; - } return ( <> diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.tsx index dece1b4beb2f7..d44e95b6271e4 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_indices/search_indices.tsx @@ -11,10 +11,8 @@ import { useValues, useActions } from 'kea'; import { EuiButton, - EuiCallOut, EuiFlexGroup, EuiFlexItem, - EuiSpacer, EuiTitle, EuiSwitch, EuiSearchBar, @@ -26,14 +24,13 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { AddContentEmptyPrompt } from '../../../shared/add_content_empty_prompt'; -import { HttpLogic } from '../../../shared/http/http_logic'; import { KibanaLogic } from '../../../shared/kibana'; -import { EuiButtonTo, EuiLinkTo } from '../../../shared/react_router_helpers'; +import { EuiLinkTo } from '../../../shared/react_router_helpers'; import { handlePageChange } from '../../../shared/table_pagination'; import { NEW_API_PATH } from '../../routes'; import { EnterpriseSearchContentPageTemplate } from '../layout/page_template'; -import { CannotConnect } from '../search_index/components/cannot_connect'; +// import { CannotConnect } from '../search_index/components/cannot_connect'; import { DefaultSettingsFlyout } from '../settings/default_settings_flyout'; import { DeleteIndexModal } from './delete_index_modal'; @@ -53,8 +50,7 @@ export const SearchIndices: React.FC = () => { const [showHiddenIndices, setShowHiddenIndices] = useState(false); const [onlyShowSearchOptimizedIndices, setOnlyShowSearchOptimizedIndices] = useState(false); const [searchQuery, setSearchValue] = useState(''); - const { config, productFeatures } = useValues(KibanaLogic); - const { errorConnectingMessage } = useValues(HttpLogic); + const { productFeatures } = useValues(KibanaLogic); const [showDefaultSettingsFlyout, setShowDefaultSettingsFlyout] = useState(false); useEffect(() => { @@ -142,37 +138,6 @@ export const SearchIndices: React.FC = () => { {productFeatures.hasDefaultIngestPipeline && showDefaultSettingsFlyout && ( setShowDefaultSettingsFlyout(false)} /> )} - {config.host && config.canDeployEntSearch && errorConnectingMessage && ( - <> - - - - )} - {!config.host && config.canDeployEntSearch && ( - <> - -

        - -

        - - - -
        - - - )} {!hasNoIndices ? ( diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/index.test.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/index.test.tsx index 9fcfe7c7fcfab..a32062256eec5 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/index.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/index.test.tsx @@ -15,7 +15,6 @@ import React from 'react'; import { shallow } from 'enzyme'; import { SetupGuide } from '../enterprise_search_overview/components/setup_guide'; -import { VersionMismatchPage } from '../shared/version_mismatch'; import { SearchIndicesRouter } from './components/search_indices'; @@ -28,15 +27,6 @@ describe('EnterpriseSearchContent', () => { expect(wrapper.find(SetupGuide)).toHaveLength(1); }); - it('renders VersionMismatchPage when there are mismatching versions', () => { - setMockValues({ config: { canDeployEntSearch: true, host: 'host' } }); - const wrapper = shallow( - - ); - - expect(wrapper.find(VersionMismatchPage)).toHaveLength(1); - }); - it('renders EnterpriseSearchContentConfigured when config.host is set & available', () => { setMockValues({ config: { canDeployEntSearch: true, host: 'some.url' }, diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/index.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/index.tsx index 2ec701aa9847b..d464923dea2ca 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/index.tsx @@ -8,17 +8,10 @@ import React from 'react'; import { Redirect } from 'react-router-dom'; -import { useValues } from 'kea'; - import { Route, Routes } from '@kbn/shared-ux-router'; -import { isVersionMismatch } from '../../../common/is_version_mismatch'; import { InitialAppData } from '../../../common/types'; import { SetupGuide } from '../enterprise_search_overview/components/setup_guide'; -import { ErrorStatePrompt } from '../shared/error_state'; -import { HttpLogic } from '../shared/http'; -import { KibanaLogic } from '../shared/kibana'; -import { VersionMismatchPage } from '../shared/version_mismatch'; import { ConnectorsRouter } from './components/connectors/connectors_router'; import { CrawlersRouter } from './components/connectors/crawlers_router'; @@ -27,44 +20,20 @@ import { SearchIndicesRouter } from './components/search_indices'; import { CONNECTORS_PATH, CRAWLERS_PATH, - ERROR_STATE_PATH, ROOT_PATH, SEARCH_INDICES_PATH, SETUP_GUIDE_PATH, } from './routes'; export const EnterpriseSearchContent: React.FC = (props) => { - const { config } = useValues(KibanaLogic); - const { errorConnectingMessage } = useValues(HttpLogic); - const { enterpriseSearchVersion, kibanaVersion } = props; - const incompatibleVersions = isVersionMismatch(enterpriseSearchVersion, kibanaVersion); - - const showView = () => { - if (config.host && config.canDeployEntSearch && incompatibleVersions) { - return ( - - ); - } - - return )} />; - }; - return ( - - {config.host && config.canDeployEntSearch && errorConnectingMessage ? ( - - ) : ( - - )} + + )} /> - {showView()} ); }; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/error_connecting/error_connecting.test.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/error_connecting/error_connecting.test.tsx deleted file mode 100644 index b307835534dd4..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/error_connecting/error_connecting.test.tsx +++ /dev/null @@ -1,23 +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 React from 'react'; - -import { shallow } from 'enzyme'; - -import { ErrorStatePrompt } from '../../../shared/error_state'; - -import { ErrorConnecting } from '.'; - -describe('ErrorConnecting', () => { - it('renders', () => { - const wrapper = shallow(); - - const errorStatePrompt = wrapper.find(ErrorStatePrompt); - expect(errorStatePrompt).toHaveLength(1); - }); -}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/error_connecting/error_connecting.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/error_connecting/error_connecting.tsx deleted file mode 100644 index 6fc4ae2842200..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/error_connecting/error_connecting.tsx +++ /dev/null @@ -1,21 +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 React from 'react'; - -import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; - -import { ErrorStatePrompt } from '../../../shared/error_state'; -import { SendEnterpriseSearchTelemetry as SendTelemetry } from '../../../shared/telemetry'; - -export const ErrorConnecting: React.FC = () => ( - - - - - -); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/product_selector.test.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/product_selector.test.tsx index dd67bf33d987b..3718a495cd17b 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/product_selector.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/product_selector.test.tsx @@ -11,8 +11,6 @@ import React from 'react'; import { shallow } from 'enzyme'; -import { ErrorStateCallout } from '../../../shared/error_state'; - import { TrialCallout } from '../trial_callout'; import { ElasticsearchProductCard } from './elasticsearch_product_card'; @@ -34,23 +32,6 @@ describe('ProductSelector', () => { expect(wrapper.find(TrialCallout)).toHaveLength(1); }); - it('does not render connection error callout without an error', () => { - setMockValues({ config: { canDeployEntSearch: true, host: 'localhost' } }); - const wrapper = shallow(); - - expect(wrapper.find(ErrorStateCallout)).toHaveLength(0); - }); - - it('does render connection error callout with an error', () => { - setMockValues({ - config: { canDeployEntSearch: true, host: 'localhost' }, - errorConnectingMessage: '502 Bad Gateway', - }); - const wrapper = shallow(); - - expect(wrapper.find(ErrorStateCallout)).toHaveLength(1); - }); - describe('access checks when host is set', () => { beforeEach(() => { setMockValues({ config: { canDeployEntSearch: true, host: 'localhost' } }); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/product_selector.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/product_selector.tsx index 1f25f5f69c2e0..7c22f5bfd433a 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/product_selector.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/product_selector/product_selector.tsx @@ -20,8 +20,6 @@ import { import { i18n } from '@kbn/i18n'; import { ApiKeyPanel } from '../../../shared/api_key/api_key_panel'; -import { ErrorStateCallout } from '../../../shared/error_state'; -import { HttpLogic } from '../../../shared/http'; import { KibanaLogic } from '../../../shared/kibana'; import { SetSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome'; import { SearchLabsBanner } from '../../../shared/search_labs_banner/search_labs_banner'; @@ -39,11 +37,8 @@ import './product_selector.scss'; import { WelcomeBanner } from './welcome_banner'; export const ProductSelector: React.FC = () => { - const { config } = useValues(KibanaLogic); - const { errorConnectingMessage } = useValues(HttpLogic); const { user } = useValues(KibanaLogic); - const showErrorConnecting = !!(config.host && errorConnectingMessage); // The create index flow does not work without ent-search, when content is updated // to no longer rely on ent-search we can always show the Add Content component @@ -80,12 +75,6 @@ export const ProductSelector: React.FC = () => { - {showErrorConnecting && ( - <> - - - - )} diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/index.test.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/index.test.tsx index 6742de0816f81..7754aa0cf11f7 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/index.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/index.test.tsx @@ -11,8 +11,6 @@ import React from 'react'; import { shallow } from 'enzyme'; -import { VersionMismatchPage } from '../shared/version_mismatch'; - import { ProductSelector } from './components/product_selector'; import { SetupGuide } from './components/setup_guide'; @@ -29,17 +27,4 @@ describe('EnterpriseSearchOverview', () => { expect(wrapper.find(SetupGuide)).toHaveLength(1); expect(wrapper.find(ProductSelector)).toHaveLength(1); }); - - it('renders the version error message if versions mismatch and the host is configured', () => { - setMockValues({ - errorConnectingMessage: '', - config: { host: 'localhost' }, - }); - const wrapper = shallow( - - ); - - expect(wrapper.find(VersionMismatchPage)).toHaveLength(1); - expect(wrapper.find(ProductSelector)).toHaveLength(0); - }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/index.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/index.tsx index 64ab8e44a69ae..70d4b40bb7f90 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/index.tsx @@ -7,49 +7,22 @@ import React from 'react'; -import { useValues } from 'kea'; - import { Routes, Route } from '@kbn/shared-ux-router'; -import { isVersionMismatch } from '../../../common/is_version_mismatch'; import { InitialAppData } from '../../../common/types'; -import { KibanaLogic } from '../shared/kibana'; -import { VersionMismatchPage } from '../shared/version_mismatch'; import { ProductSelector } from './components/product_selector'; import { SetupGuide } from './components/setup_guide'; import { ROOT_PATH, SETUP_GUIDE_PATH } from './routes'; -export const EnterpriseSearchOverview: React.FC = ({ - enterpriseSearchVersion, - kibanaVersion, -}) => { - const { config } = useValues(KibanaLogic); - - const incompatibleVersions = !!( - config.host && isVersionMismatch(enterpriseSearchVersion, kibanaVersion) - ); - - const showView = () => { - if (incompatibleVersions) { - return ( - - ); - } - - return ; - }; - +export const EnterpriseSearchOverview: React.FC = ({}) => { return ( - {showView()} + ); diff --git a/x-pack/plugins/enterprise_search/public/applications/search_experiences/index.tsx b/x-pack/plugins/enterprise_search/public/applications/search_experiences/index.tsx index 118cb5cb7caf2..e41918d8ce29d 100644 --- a/x-pack/plugins/enterprise_search/public/applications/search_experiences/index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/search_experiences/index.tsx @@ -9,35 +9,17 @@ import React from 'react'; import { Routes, Route } from '@kbn/shared-ux-router'; -import { isVersionMismatch } from '../../../common/is_version_mismatch'; import { InitialAppData } from '../../../common/types'; -import { VersionMismatchPage } from '../shared/version_mismatch'; import { SearchExperiencesGuide } from './components/search_experiences_guide'; import { ROOT_PATH } from './routes'; -export const SearchExperiences: React.FC = (props) => { - const { enterpriseSearchVersion, kibanaVersion } = props; - const incompatibleVersions = isVersionMismatch(enterpriseSearchVersion, kibanaVersion); - - const showView = () => { - if (incompatibleVersions) { - return ( - - ); - } - - return ; - }; - +export const SearchExperiences: React.FC = () => { return ( - {showView()} + ); diff --git a/x-pack/plugins/enterprise_search/public/applications/semantic_search/index.tsx b/x-pack/plugins/enterprise_search/public/applications/semantic_search/index.tsx index f33142bae940c..e6e5e3e66bbf4 100644 --- a/x-pack/plugins/enterprise_search/public/applications/semantic_search/index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/semantic_search/index.tsx @@ -12,29 +12,17 @@ import { Switch } from 'react-router-dom'; import { Route } from '@kbn/shared-ux-router'; -import { isVersionMismatch } from '../../../common/is_version_mismatch'; import { InitialAppData } from '../../../common/types'; -import { VersionMismatchPage } from '../shared/version_mismatch'; import { SemanticSearchGuide } from './components/semantic_search_guide/semantic_search_guide'; import { ROOT_PATH } from './routes'; -export const EnterpriseSearchSemanticSearch: React.FC = (props) => { - const { enterpriseSearchVersion, kibanaVersion } = props; - const incompatibleVersions = isVersionMismatch(enterpriseSearchVersion, kibanaVersion); - +export const EnterpriseSearchSemanticSearch: React.FC = () => { return ( - {incompatibleVersions ? ( - - ) : ( - - )} + ); diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/error_state/error_state_prompt.scss b/x-pack/plugins/enterprise_search/public/applications/shared/error_state/error_state_prompt.scss deleted file mode 100644 index 0d9926ab147bf..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/shared/error_state/error_state_prompt.scss +++ /dev/null @@ -1,12 +0,0 @@ -.troubleshootingSteps { - text-align: left; - - li { - margin: $euiSizeS auto; - } - - ul, - ol { - margin-bottom: 0; - } -} diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/error_state/error_state_prompt.test.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/error_state/error_state_prompt.test.tsx deleted file mode 100644 index 867702b8326ab..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/shared/error_state/error_state_prompt.test.tsx +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import '../../__mocks__/shallow_useeffect.mock'; -import { setMockValues, mockKibanaValues } from '../../__mocks__/kea_logic'; - -import React from 'react'; - -import { mountWithIntl } from '../../test_helpers'; - -import { ErrorStatePrompt } from '.'; - -describe('ErrorState', () => { - const values = { - config: {}, - cloud: { isCloudEnabled: true }, - errorConnectingMessage: '502 Bad Gateway', - }; - - beforeAll(() => { - setMockValues(values); - }); - - it('renders an error message', () => { - const wrapper = mountWithIntl(); - expect(wrapper.text()).toContain('502 Bad Gateway'); - }); - - it('renders a cloud specific error on cloud deployments', () => { - setMockValues({ - ...values, - cloud: { isCloudEnabled: true }, - }); - const wrapper = mountWithIntl(); - - expect(wrapper.find('[data-test-subj="CloudError"]').exists()).toBe(true); - expect(wrapper.find('[data-test-subj="SelfManagedError"]').exists()).toBe(false); - }); - - it('renders a different error if not a cloud deployment', () => { - setMockValues({ - ...values, - cloud: { isCloudEnabled: false }, - }); - const wrapper = mountWithIntl(); - - expect(wrapper.find('[data-test-subj="CloudError"]').exists()).toBe(false); - expect(wrapper.find('[data-test-subj="SelfManagedError"]').exists()).toBe(true); - }); - - describe('chrome visiblity', () => { - it('sets chrome visibility to true when not on personal dashboard route', () => { - mockKibanaValues.history.location.pathname = '/overview'; - mountWithIntl(); - - expect(mockKibanaValues.setChromeIsVisible).toHaveBeenCalledWith(true); - }); - - it('sets chrome visibility to false when on personal dashboard route', () => { - mockKibanaValues.history.location.pathname = '/p/sources'; - mountWithIntl(); - - expect(mockKibanaValues.setChromeIsVisible).toHaveBeenCalledWith(false); - }); - }); -}); diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/error_state/error_state_prompt.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/error_state/error_state_prompt.tsx deleted file mode 100644 index e744d8d9b1250..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/shared/error_state/error_state_prompt.tsx +++ /dev/null @@ -1,171 +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 React, { useEffect } from 'react'; - -import { useValues } from 'kea'; - -import { EuiEmptyPrompt, EuiCode, EuiLink, EuiCodeBlock, EuiCallOut } from '@elastic/eui'; -import { CloudSetup } from '@kbn/cloud-plugin/public'; -import { i18n } from '@kbn/i18n'; -import { FormattedMessage } from '@kbn/i18n-react'; - -import { HttpLogic } from '../http'; -import { KibanaLogic } from '../kibana'; -import { EuiButtonTo } from '../react_router_helpers'; - -import './error_state_prompt.scss'; - -/** - * Personal dashboard urls begin with /p/ - * EX: http://localhost:5601/app/enterprise_search/workplace_search/p/sources - */ -const WORKPLACE_SEARCH_PERSONAL_DASHBOARD_PATH = '/p/'; - -export const ErrorStatePrompt: React.FC = () => { - const { setChromeIsVisible, history } = useValues(KibanaLogic); - const isWorkplaceSearchPersonalDashboardRoute = history.location.pathname.includes( - WORKPLACE_SEARCH_PERSONAL_DASHBOARD_PATH - ); - - useEffect(() => { - // We hide the Kibana chrome for Workplace Search for Personal Dashboard routes. It is reenabled when the user enters the - // Workplace Search organization admin section of the product. If the Enterprise Search API is not working, we never show - // the chrome and this can have adverse effects when the user leaves thispage and returns to Kibana. To get around this, - // we always show the chrome when the error state is shown, unless the user is visiting the Personal Dashboard. - setChromeIsVisible(!isWorkplaceSearchPersonalDashboardRoute); - }, []); - - return ( - - - - } - titleSize="l" - body={} - actions={[ - - - , - ]} - /> - ); -}; - -export const ErrorStateCallout: React.FC = () => { - return ( - - - - - - - ); -}; - -const ErrorBody: React.FC = () => { - const { errorConnectingMessage } = useValues(HttpLogic); - const { config, cloud } = useValues(KibanaLogic); - return ( - <> -

        - - {config.host} - - ), - }} - /> -

        - {errorConnectingMessage} - {cloud?.isCloudEnabled ? cloudError(cloud) : nonCloudError()} - - ); -}; - -const cloudError = (cloud: Partial) => { - const deploymentUrl = cloud?.deploymentUrl; - return ( -

        - - {i18n.translate( - 'xpack.enterpriseSearch.errorConnectingState.cloudErrorMessageLinkText', - { - defaultMessage: 'Check your deployment settings', - } - )} - - ), - }} - /> -

        - ); -}; - -const nonCloudError = () => { - return ( -
          -
        1. - config/kibana.yml, - }} - /> -
        2. -
        3. - -
        4. -
        5. - -
            -
          • - -
          • -
          -
        6. -
        - ); -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/layout/classic_nav_helpers.test.ts b/x-pack/plugins/enterprise_search/public/applications/shared/layout/classic_nav_helpers.test.ts index d43d14aba2235..80e846716e59b 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/layout/classic_nav_helpers.test.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/layout/classic_nav_helpers.test.ts @@ -37,7 +37,7 @@ describe('generateSideNavItems', () => { }, 'enterpriseSearchContent:webCrawlers': { id: 'enterpriseSearchContent:webCrawlers', - title: 'Web crawlers', + title: 'Web Crawlers', url: '/app/enterprise_search/content/crawlers', }, } as unknown as Record; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx index a6cbf56691735..fed85bad23353 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/layout/nav.test.tsx @@ -62,7 +62,7 @@ const baseNavItems = [ href: '/app/enterprise_search/content/crawlers', id: 'crawlers', items: undefined, - name: 'Web crawlers', + name: 'Web Crawlers', }, ], name: 'Content', @@ -184,7 +184,7 @@ const mockNavLinks = [ }, { id: 'enterpriseSearchContent:webCrawlers', - title: 'Web crawlers', + title: 'Web Crawlers', url: '/app/enterprise_search/content/crawlers', }, { diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/version_mismatch_error.test.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/version_mismatch_error.test.tsx deleted file mode 100644 index f6d5ef4aa4212..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/version_mismatch_error.test.tsx +++ /dev/null @@ -1,23 +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 React from 'react'; - -import { mount } from 'enzyme'; - -import { VersionMismatchError } from './version_mismatch_error'; - -describe('VersionMismatchError', () => { - it('renders', () => { - const wrapper = mount( - - ); - - expect(wrapper.find('EuiEmptyPrompt').text()).toContain('Enterprise Search version: 8.0.0'); - expect(wrapper.find('EuiEmptyPrompt').text()).toContain('Kibana version: 8.1.0'); - }); -}); diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/version_mismatch_error.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/version_mismatch_error.tsx deleted file mode 100644 index 56915663961de..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/version_mismatch_error.tsx +++ /dev/null @@ -1,57 +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 React from 'react'; - -import { EuiEmptyPrompt, EuiSpacer } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; - -interface Props { - enterpriseSearchVersion?: string; - kibanaVersion?: string; -} - -export const VersionMismatchError: React.FC = ({ - enterpriseSearchVersion, - kibanaVersion, -}) => { - return ( - - {i18n.translate('xpack.enterpriseSearch.versionMismatch.title', { - defaultMessage: 'Incompatible version error', - })} - - } - titleSize="l" - body={ - <> - {i18n.translate('xpack.enterpriseSearch.versionMismatch.body', { - defaultMessage: - 'Your Kibana and Enterprise Search versions do not match. To access Enterprise Search, use the same major and minor version for each service.', - })} - -
        - {i18n.translate('xpack.enterpriseSearch.versionMismatch.enterpriseSearchVersionText', { - defaultMessage: 'Enterprise Search version: {enterpriseSearchVersion}', - values: { enterpriseSearchVersion }, - })} -
        -
        - {i18n.translate('xpack.enterpriseSearch.versionMismatch.kibanaVersionText', { - defaultMessage: 'Kibana version: {kibanaVersion}', - values: { kibanaVersion }, - })} -
        - - } - /> - ); -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/version_mismatch_page.test.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/version_mismatch_page.test.tsx deleted file mode 100644 index d86a1187bd4b9..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/version_mismatch_page.test.tsx +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; - -import { shallow } from 'enzyme'; - -import { VersionMismatchError } from './version_mismatch_error'; -import { VersionMismatchPage } from './version_mismatch_page'; - -describe('VersionMismatchPage', () => { - it('renders', () => { - const wrapper = shallow( - - ); - expect(wrapper.find(VersionMismatchError).exists()).toBe(true); - expect(wrapper.find(VersionMismatchError).props()).toEqual({ - kibanaVersion: '8.1.0', - enterpriseSearchVersion: '8.0.0', - }); - }); -}); diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/version_mismatch_page.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/version_mismatch_page.tsx deleted file mode 100644 index 0d730f9dee9ef..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/version_mismatch_page.tsx +++ /dev/null @@ -1,23 +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 React from 'react'; - -import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; - -import { VersionMismatchError } from './version_mismatch_error'; - -interface Props { - enterpriseSearchVersion?: string; - kibanaVersion?: string; -} - -export const VersionMismatchPage: React.FC = (props) => ( - - - -); diff --git a/x-pack/plugins/enterprise_search/public/applications/vector_search/index.tsx b/x-pack/plugins/enterprise_search/public/applications/vector_search/index.tsx index ce678121253f0..2d85725dc552d 100644 --- a/x-pack/plugins/enterprise_search/public/applications/vector_search/index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/vector_search/index.tsx @@ -12,29 +12,17 @@ import { Switch } from 'react-router-dom'; import { Route } from '@kbn/shared-ux-router'; -import { isVersionMismatch } from '../../../common/is_version_mismatch'; import { InitialAppData } from '../../../common/types'; -import { VersionMismatchPage } from '../shared/version_mismatch'; import { VectorSearchGuide } from './components/vector_search_guide/vector_search_guide'; import { ROOT_PATH } from './routes'; -export const EnterpriseSearchVectorSearch: React.FC = (props) => { - const { enterpriseSearchVersion, kibanaVersion } = props; - const incompatibleVersions = isVersionMismatch(enterpriseSearchVersion, kibanaVersion); - +export const EnterpriseSearchVectorSearch: React.FC = () => { return ( - {incompatibleVersions ? ( - - ) : ( - - )} + ); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/index.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/index.test.tsx index 6771168239126..67b7469fcfe36 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/index.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/index.test.tsx @@ -15,12 +15,9 @@ import { Redirect } from 'react-router-dom'; import { shallow } from 'enzyme'; -import { VersionMismatchPage } from '../shared/version_mismatch'; - import { WorkplaceSearchHeaderActions } from './components/layout'; import { SourcesRouter } from './views/content_sources'; import { SourceAdded } from './views/content_sources/components/source_added'; -import { ErrorState } from './views/error_state'; import { NotFound } from './views/not_found'; import { Overview } from './views/overview'; import { RoleMappings } from './views/role_mappings'; @@ -34,14 +31,6 @@ import { } from '.'; describe('WorkplaceSearch', () => { - it('renders VersionMismatchPage when there are mismatching versions', () => { - const wrapper = shallow( - - ); - - expect(wrapper.find(VersionMismatchPage)).toHaveLength(1); - }); - it('renders WorkplaceSearchUnconfigured when config.host is not set', () => { setMockValues({ config: { host: '' } }); const wrapper = shallow(); @@ -55,26 +44,6 @@ describe('WorkplaceSearch', () => { expect(wrapper.find(WorkplaceSearchConfigured)).toHaveLength(1); }); - - it('renders ErrorState when not on SetupGuide', () => { - mockUseRouteMatch.mockReturnValue(false); - setMockValues({ errorConnectingMessage: '502 Bad Gateway' }); - - const wrapper = shallow(); - - const errorState = wrapper.find(ErrorState); - expect(errorState).toHaveLength(1); - }); - - it('does not render ErrorState when on SetupGuide', () => { - mockUseRouteMatch.mockReturnValue(true); - setMockValues({ errorConnectingMessage: '502 Bad Gateway' }); - - const wrapper = shallow(); - - const errorState = wrapper.find(ErrorState); - expect(errorState).toHaveLength(0); - }); }); describe('WorkplaceSearchUnconfigured', () => { diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/index.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/index.tsx index e9332fe81bdab..6233208119c44 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/index.tsx @@ -12,11 +12,8 @@ import { useActions, useValues } from 'kea'; import { Routes, Route } from '@kbn/shared-ux-router'; -import { isVersionMismatch } from '../../../common/is_version_mismatch'; import { InitialAppData } from '../../../common/types'; -import { HttpLogic } from '../shared/http'; import { KibanaLogic } from '../shared/kibana'; -import { VersionMismatchPage } from '../shared/version_mismatch'; import { AppLogic } from './app_logic'; import { WorkplaceSearchHeaderActions } from './components/layout'; @@ -39,7 +36,6 @@ import { AccountSettings } from './views/account_settings'; import { ApiKeys } from './views/api_keys'; import { SourcesRouter } from './views/content_sources'; import { SourceAdded } from './views/content_sources/components/source_added'; -import { ErrorState } from './views/error_state'; import { GroupsRouter } from './views/groups'; import { NotFound } from './views/not_found'; import { OAuthAuthorize } from './views/oauth_authorize'; @@ -52,22 +48,9 @@ import { SetupGuide } from './views/setup_guide'; export const WorkplaceSearch: React.FC = (props) => { const { config } = useValues(KibanaLogic); - const { errorConnectingMessage } = useValues(HttpLogic); - const { enterpriseSearchVersion, kibanaVersion } = props; - const incompatibleVersions = isVersionMismatch(enterpriseSearchVersion, kibanaVersion); - const isSetupGuidePath = !!useRouteMatch(SETUP_GUIDE_PATH); if (!config.host) { return ; - } else if (incompatibleVersions) { - return ( - - ); - } else if (errorConnectingMessage && !isSetupGuidePath) { - return ; } return ; diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/error_state/error_state.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/error_state/error_state.test.tsx deleted file mode 100644 index 2c3b49230e394..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/error_state/error_state.test.tsx +++ /dev/null @@ -1,23 +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 React from 'react'; - -import { shallow } from 'enzyme'; - -import { ErrorStatePrompt } from '../../../shared/error_state'; - -import { ErrorState } from '.'; - -describe('ErrorState', () => { - it('renders', () => { - const wrapper = shallow(); - - const prompt = wrapper.find(ErrorStatePrompt); - expect(prompt).toHaveLength(1); - }); -}); diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/error_state/error_state.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/error_state/error_state.tsx deleted file mode 100644 index fc93896d931f7..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/error_state/error_state.tsx +++ /dev/null @@ -1,30 +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 React from 'react'; - -import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; - -import { WORKPLACE_SEARCH_PLUGIN } from '../../../../../common/constants'; -import { ErrorStatePrompt } from '../../../shared/error_state'; -import { SetWorkplaceSearchChrome as SetPageChrome } from '../../../shared/kibana_chrome'; -import { SendWorkplaceSearchTelemetry as SendTelemetry } from '../../../shared/telemetry'; -import { ViewContentHeader } from '../../components/shared/view_content_header'; - -export const ErrorState: React.FC = () => { - return ( - <> - - - - - - - - - ); -}; diff --git a/x-pack/plugins/enterprise_search/public/plugin.ts b/x-pack/plugins/enterprise_search/public/plugin.ts index 4d357956f6bb5..a413ae5f2067d 100644 --- a/x-pack/plugins/enterprise_search/public/plugin.ts +++ b/x-pack/plugins/enterprise_search/public/plugin.ts @@ -131,7 +131,7 @@ const contentLinks: AppDeepLink[] = [ id: 'webCrawlers', path: `/${CRAWLERS_PATH}`, title: i18n.translate('xpack.enterpriseSearch.navigation.contentWebcrawlersLinkLabel', { - defaultMessage: 'Web crawlers', + defaultMessage: 'Web Crawlers', }), }, ]; diff --git a/x-pack/plugins/entity_manager/kibana.jsonc b/x-pack/plugins/entity_manager/kibana.jsonc index c18822d48ac0a..02919893a8757 100644 --- a/x-pack/plugins/entity_manager/kibana.jsonc +++ b/x-pack/plugins/entity_manager/kibana.jsonc @@ -13,7 +13,8 @@ "requiredPlugins": [ "security", "encryptedSavedObjects", - "licensing" + "licensing", + "features" ], "requiredBundles": [] } diff --git a/x-pack/plugins/entity_manager/server/index.ts b/x-pack/plugins/entity_manager/server/index.ts index ebb826a500a5a..7327233c1fad2 100644 --- a/x-pack/plugins/entity_manager/server/index.ts +++ b/x-pack/plugins/entity_manager/server/index.ts @@ -18,6 +18,14 @@ export type { }; export { config }; +export { + CREATE_ENTITY_TYPE_DEFINITION_PRIVILEGE, + CREATE_ENTITY_SOURCE_DEFINITION_PRIVILEGE, + READ_ENTITY_TYPE_DEFINITION_PRIVILEGE, + READ_ENTITY_SOURCE_DEFINITION_PRIVILEGE, + READ_ENTITIES_PRIVILEGE, +} from './lib/v2/constants'; + export const plugin = async (context: PluginInitializerContext) => { const { EntityManagerServerPlugin } = await import('./plugin'); return new EntityManagerServerPlugin(context); diff --git a/x-pack/plugins/entity_manager/server/lib/client/index.ts b/x-pack/plugins/entity_manager/server/lib/client/index.ts deleted file mode 100644 index 90562264851ce..0000000000000 --- a/x-pack/plugins/entity_manager/server/lib/client/index.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import type { IScopedClusterClient, SavedObjectsClientContract } from '@kbn/core/server'; -import { EntityDefinition } from '@kbn/entities-schema'; -import { findEntityDefinitions } from '../entities/find_entity_definition'; -import type { EntityDefinitionWithState } from '../entities/types'; - -export class EntityManagerClient { - constructor( - private readonly esClient: IScopedClusterClient, - private readonly soClient: SavedObjectsClientContract - ) {} - - findEntityDefinitions({ page, perPage }: { page?: number; perPage?: number } = {}): Promise< - EntityDefinition[] | EntityDefinitionWithState[] - > { - return findEntityDefinitions({ - esClient: this.esClient.asCurrentUser, - soClient: this.soClient, - page, - perPage, - }); - } -} diff --git a/x-pack/plugins/entity_manager/server/lib/entity_client.ts b/x-pack/plugins/entity_manager/server/lib/entity_client.ts index 7045bee1fc538..dd4eeedbc4fc2 100644 --- a/x-pack/plugins/entity_manager/server/lib/entity_client.ts +++ b/x-pack/plugins/entity_manager/server/lib/entity_client.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { EntityV2, EntityDefinition, EntityDefinitionUpdate } from '@kbn/entities-schema'; +import { EntityDefinition, EntityDefinitionUpdate } from '@kbn/entities-schema'; import { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; -import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import { IScopedClusterClient } from '@kbn/core-elasticsearch-server'; import { Logger } from '@kbn/logging'; import { installEntityDefinition, @@ -18,23 +18,24 @@ import { startTransforms } from './entities/start_transforms'; import { findEntityDefinitionById, findEntityDefinitions } from './entities/find_entity_definition'; import { uninstallEntityDefinition } from './entities/uninstall_entity_definition'; import { EntityDefinitionNotFound } from './entities/errors/entity_not_found'; - import { stopTransforms } from './entities/stop_transforms'; import { deleteIndices } from './entities/delete_index'; import { EntityDefinitionWithState } from './entities/types'; import { EntityDefinitionUpdateConflict } from './entities/errors/entity_definition_update_conflict'; -import { EntitySource, getEntityInstancesQuery } from './queries'; -import { mergeEntitiesList, runESQLQuery } from './queries/utils'; -import { UnknownEntityType } from './entities/errors/unknown_entity_type'; +import { EntityClient as EntityClient_v2 } from './v2/entity_client'; export class EntityClient { + public v2: EntityClient_v2; + constructor( private options: { - esClient: ElasticsearchClient; + clusterClient: IScopedClusterClient; soClient: SavedObjectsClientContract; logger: Logger; } - ) {} + ) { + this.v2 = new EntityClient_v2(options); + } async createEntityDefinition({ definition, @@ -48,13 +49,17 @@ export class EntityClient { ); const installedDefinition = await installEntityDefinition({ definition, - esClient: this.options.esClient, + esClient: this.options.clusterClient.asCurrentUser, soClient: this.options.soClient, logger: this.options.logger, }); if (!installOnly) { - await startTransforms(this.options.esClient, installedDefinition, this.options.logger); + await startTransforms( + this.options.clusterClient.asCurrentUser, + installedDefinition, + this.options.logger + ); } return installedDefinition; @@ -70,7 +75,7 @@ export class EntityClient { const definition = await findEntityDefinitionById({ id, soClient: this.options.soClient, - esClient: this.options.esClient, + esClient: this.options.clusterClient.asCurrentUser, includeState: true, }); @@ -97,12 +102,16 @@ export class EntityClient { definition, definitionUpdate, soClient: this.options.soClient, - esClient: this.options.esClient, + esClient: this.options.clusterClient.asCurrentUser, logger: this.options.logger, }); if (shouldRestartTransforms) { - await startTransforms(this.options.esClient, updatedDefinition, this.options.logger); + await startTransforms( + this.options.clusterClient.asCurrentUser, + updatedDefinition, + this.options.logger + ); } return updatedDefinition; } @@ -110,7 +119,7 @@ export class EntityClient { async deleteEntityDefinition({ id, deleteData = false }: { id: string; deleteData?: boolean }) { const definition = await findEntityDefinitionById({ id, - esClient: this.options.esClient, + esClient: this.options.clusterClient.asCurrentUser, soClient: this.options.soClient, }); @@ -123,13 +132,17 @@ export class EntityClient { ); await uninstallEntityDefinition({ definition, - esClient: this.options.esClient, + esClient: this.options.clusterClient.asCurrentUser, soClient: this.options.soClient, logger: this.options.logger, }); if (deleteData) { - await deleteIndices(this.options.esClient, definition, this.options.logger); + await deleteIndices( + this.options.clusterClient.asCurrentUser, + definition, + this.options.logger + ); } } @@ -149,7 +162,7 @@ export class EntityClient { builtIn?: boolean; }) { const definitions = await findEntityDefinitions({ - esClient: this.options.esClient, + esClient: this.options.clusterClient.asCurrentUser, soClient: this.options.soClient, page, perPage, @@ -164,121 +177,19 @@ export class EntityClient { async startEntityDefinition(definition: EntityDefinition) { this.options.logger.info(`Starting transforms for definition [${definition.id}]`); - return startTransforms(this.options.esClient, definition, this.options.logger); + return startTransforms( + this.options.clusterClient.asCurrentUser, + definition, + this.options.logger + ); } async stopEntityDefinition(definition: EntityDefinition) { this.options.logger.info(`Stopping transforms for definition [${definition.id}]`); - return stopTransforms(this.options.esClient, definition, this.options.logger); - } - - async getEntitySources({ type }: { type: string }) { - const result = await this.options.esClient.search({ - index: 'kibana_entity_definitions', - query: { - bool: { - must: { - term: { entity_type: type }, - }, - }, - }, - }); - - return result.hits.hits.map((hit) => hit._source) as EntitySource[]; - } - - async searchEntities({ - type, - start, - end, - metadataFields = [], - filters = [], - limit = 10, - }: { - type: string; - start: string; - end: string; - metadataFields?: string[]; - filters?: string[]; - limit?: number; - }) { - const sources = await this.getEntitySources({ type }); - if (sources.length === 0) { - throw new UnknownEntityType(`No sources found for entity type [${type}]`); - } - - return this.searchEntitiesBySources({ - sources, - start, - end, - metadataFields, - filters, - limit, - }); - } - - async searchEntitiesBySources({ - sources, - start, - end, - metadataFields = [], - filters = [], - limit = 10, - }: { - sources: EntitySource[]; - start: string; - end: string; - metadataFields?: string[]; - filters?: string[]; - limit?: number; - }) { - const entities = await Promise.all( - sources.map(async (source) => { - const mandatoryFields = [source.timestamp_field, ...source.identity_fields]; - const metaFields = [...metadataFields, ...source.metadata_fields]; - const { fields } = await this.options.esClient.fieldCaps({ - index: source.index_patterns, - fields: [...mandatoryFields, ...metaFields], - }); - - const sourceHasMandatoryFields = mandatoryFields.every((field) => !!fields[field]); - if (!sourceHasMandatoryFields) { - // we can't build entities without id fields so we ignore the source. - // filters should likely behave similarly. - this.options.logger.info( - `Ignoring source for type [${source.type}] with index_patterns [${source.index_patterns}] because some mandatory fields [${mandatoryFields}] are not mapped` - ); - return []; - } - - // but metadata field not being available is fine - const availableMetadataFields = metaFields.filter((field) => fields[field]); - - const query = getEntityInstancesQuery({ - source: { - ...source, - metadata_fields: availableMetadataFields, - filters: [...source.filters, ...filters], - }, - start, - end, - limit, - }); - this.options.logger.debug(`Entity query: ${query}`); - - const rawEntities = await runESQLQuery({ - query, - esClient: this.options.esClient, - }); - - return rawEntities.map((entity) => { - entity['entity.id'] = source.identity_fields.map((field) => entity[field]).join(':'); - entity['entity.type'] = source.type; - return entity; - }); - }) - ).then((results) => results.flat()); - - return mergeEntitiesList(entities).slice(0, limit); + return stopTransforms( + this.options.clusterClient.asCurrentUser, + definition, + this.options.logger + ); } } diff --git a/x-pack/plugins/entity_manager/server/lib/queries/index.ts b/x-pack/plugins/entity_manager/server/lib/queries/index.ts deleted file mode 100644 index 9fc7ae00c9aa6..0000000000000 --- a/x-pack/plugins/entity_manager/server/lib/queries/index.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { z } from '@kbn/zod'; - -export const entitySourceSchema = z.object({ - type: z.string(), - timestamp_field: z.optional(z.string()).default('@timestamp'), - index_patterns: z.array(z.string()), - identity_fields: z.array(z.string()), - metadata_fields: z.array(z.string()), - filters: z.array(z.string()), -}); - -export type EntitySource = z.infer; - -const sourceCommand = ({ source }: { source: EntitySource }) => { - let query = `FROM ${source.index_patterns}`; - - const esMetadataFields = source.metadata_fields.filter((field) => - ['_index', '_id'].includes(field) - ); - if (esMetadataFields.length) { - query += ` METADATA ${esMetadataFields.join(',')}`; - } - - return query; -}; - -const filterCommands = ({ - source, - start, - end, -}: { - source: EntitySource; - start: string; - end: string; -}) => { - const commands = [ - `WHERE ${source.timestamp_field} >= "${start}"`, - `WHERE ${source.timestamp_field} <= "${end}"`, - ]; - - source.identity_fields.forEach((field) => { - commands.push(`WHERE ${field} IS NOT NULL`); - }); - - source.filters.forEach((filter) => { - commands.push(`WHERE ${filter}`); - }); - - return commands; -}; - -const statsCommand = ({ source }: { source: EntitySource }) => { - const aggs = [ - // default 'last_seen' attribute - `entity.last_seen_timestamp=MAX(${source.timestamp_field})`, - ...source.metadata_fields - .filter((field) => !source.identity_fields.some((idField) => idField === field)) - .map((field) => `metadata.${field}=VALUES(${field})`), - ]; - - return `STATS ${aggs.join(',')} BY ${source.identity_fields.join(',')}`; -}; - -export function getEntityInstancesQuery({ - source, - limit, - start, - end, -}: { - source: EntitySource; - limit: number; - start: string; - end: string; -}): string { - const commands = [ - sourceCommand({ source }), - ...filterCommands({ source, start, end }), - statsCommand({ source }), - `SORT entity.last_seen_timestamp DESC`, - `LIMIT ${limit}`, - ]; - - return commands.join('|'); -} diff --git a/x-pack/plugins/entity_manager/server/lib/queries/utils.test.ts b/x-pack/plugins/entity_manager/server/lib/queries/utils.test.ts deleted file mode 100644 index 5d57025671726..0000000000000 --- a/x-pack/plugins/entity_manager/server/lib/queries/utils.test.ts +++ /dev/null @@ -1,135 +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 { mergeEntitiesList } from './utils'; - -describe('mergeEntitiesList', () => { - describe('mergeEntitiesList', () => { - it('merges entities on entity.id', () => { - const entities = [ - { - 'entity.id': 'foo', - 'entity.last_seen_timestamp': '2024-11-20T18:00:00.000Z', - 'entity.type': 'service', - }, - { - 'entity.id': 'foo', - 'entity.last_seen_timestamp': '2024-11-20T18:00:00.000Z', - 'entity.type': 'service', - }, - ]; - - const mergedEntities = mergeEntitiesList(entities); - expect(mergedEntities.length).toEqual(1); - expect(mergedEntities[0]).toEqual({ - 'entity.id': 'foo', - 'entity.last_seen_timestamp': '2024-11-20T18:00:00.000Z', - 'entity.type': 'service', - }); - }); - - it('merges metadata fields', () => { - const entities = [ - { - 'entity.id': 'foo', - 'entity.last_seen_timestamp': '2024-11-20T18:00:00.000Z', - 'entity.type': 'service', - 'metadata.host.name': 'host-1', - 'metadata.agent.name': 'agent-1', - 'metadata.service.environment': ['dev', 'staging'], - 'metadata.only_in_record_1': 'foo', - }, - { - 'entity.id': 'foo', - 'entity.last_seen_timestamp': '2024-11-20T18:00:00.000Z', - 'entity.type': 'service', - 'metadata.host.name': ['host-2', 'host-3'], - 'metadata.agent.name': 'agent-2', - 'metadata.service.environment': 'prod', - 'metadata.only_in_record_2': 'bar', - }, - ]; - - const mergedEntities = mergeEntitiesList(entities); - expect(mergedEntities.length).toEqual(1); - expect(mergedEntities[0]).toEqual({ - 'entity.id': 'foo', - 'entity.last_seen_timestamp': '2024-11-20T18:00:00.000Z', - 'entity.type': 'service', - 'metadata.host.name': ['host-1', 'host-2', 'host-3'], - 'metadata.agent.name': ['agent-1', 'agent-2'], - 'metadata.service.environment': ['dev', 'staging', 'prod'], - 'metadata.only_in_record_1': 'foo', - 'metadata.only_in_record_2': 'bar', - }); - }); - - it('picks most recent timestamp when merging', () => { - const entities = [ - { - 'entity.id': 'foo', - 'entity.last_seen_timestamp': '2024-11-20T18:00:00.000Z', - 'entity.type': 'service', - 'metadata.host.name': 'host-1', - }, - { - 'entity.id': 'foo', - 'entity.last_seen_timestamp': '2024-11-20T20:00:00.000Z', - 'entity.type': 'service', - 'metadata.host.name': 'host-2', - }, - { - 'entity.id': 'foo', - 'entity.last_seen_timestamp': '2024-11-20T16:00:00.000Z', - 'entity.type': 'service', - 'metadata.host.name': 'host-3', - }, - ]; - - const mergedEntities = mergeEntitiesList(entities); - expect(mergedEntities.length).toEqual(1); - expect(mergedEntities[0]).toEqual({ - 'entity.id': 'foo', - 'entity.last_seen_timestamp': '2024-11-20T20:00:00.000Z', - 'entity.type': 'service', - 'metadata.host.name': ['host-1', 'host-2', 'host-3'], - }); - }); - - it('deduplicates metadata values', () => { - const entities = [ - { - 'entity.id': 'foo', - 'entity.last_seen_timestamp': '2024-11-20T18:00:00.000Z', - 'entity.type': 'service', - 'metadata.host.name': 'host-1', - }, - { - 'entity.id': 'foo', - 'entity.last_seen_timestamp': '2024-11-20T20:00:00.000Z', - 'entity.type': 'service', - 'metadata.host.name': 'host-2', - }, - { - 'entity.id': 'foo', - 'entity.last_seen_timestamp': '2024-11-20T16:00:00.000Z', - 'entity.type': 'service', - 'metadata.host.name': ['host-1', 'host-2'], - }, - ]; - - const mergedEntities = mergeEntitiesList(entities); - expect(mergedEntities.length).toEqual(1); - expect(mergedEntities[0]).toEqual({ - 'entity.id': 'foo', - 'entity.last_seen_timestamp': '2024-11-20T20:00:00.000Z', - 'entity.type': 'service', - 'metadata.host.name': ['host-1', 'host-2'], - }); - }); - }); -}); diff --git a/x-pack/plugins/entity_manager/server/lib/queries/utils.ts b/x-pack/plugins/entity_manager/server/lib/queries/utils.ts deleted file mode 100644 index 68f5b0f11aff2..0000000000000 --- a/x-pack/plugins/entity_manager/server/lib/queries/utils.ts +++ /dev/null @@ -1,90 +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 { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; -import { EntityV2 } from '@kbn/entities-schema'; -import { ESQLSearchResponse } from '@kbn/es-types'; -import { uniq } from 'lodash'; - -function mergeEntities(entity1: EntityV2, entity2: EntityV2): EntityV2 { - const merged: EntityV2 = { - ...entity1, - 'entity.last_seen_timestamp': new Date( - Math.max( - Date.parse(entity1['entity.last_seen_timestamp']), - Date.parse(entity2['entity.last_seen_timestamp']) - ) - ).toISOString(), - }; - - for (const [key, value] of Object.entries(entity2).filter(([_key]) => - _key.startsWith('metadata.') - )) { - if (merged[key]) { - merged[key] = uniq([ - ...(Array.isArray(merged[key]) ? merged[key] : [merged[key]]), - ...(Array.isArray(value) ? value : [value]), - ]); - } else { - merged[key] = value; - } - } - return merged; -} - -export function mergeEntitiesList(entities: EntityV2[]): EntityV2[] { - const instances: { [key: string]: EntityV2 } = {}; - - for (let i = 0; i < entities.length; i++) { - const entity = entities[i]; - const id = entity['entity.id']; - - if (instances[id]) { - instances[id] = mergeEntities(instances[id], entity); - } else { - instances[id] = entity; - } - } - - return Object.values(instances); -} - -export async function runESQLQuery({ - esClient, - query, -}: { - esClient: ElasticsearchClient; - query: string; -}): Promise { - const esqlResponse = (await esClient.esql.query( - { - query, - format: 'json', - }, - { querystring: { drop_null_columns: true } } - )) as unknown as ESQLSearchResponse; - - const documents = esqlResponse.values.map((row) => - row.reduce>((acc, value, index) => { - const column = esqlResponse.columns[index]; - - if (!column) { - return acc; - } - - // Removes the type suffix from the column name - const name = column.name.replace(/\.(text|keyword)$/, ''); - if (!acc[name]) { - acc[name] = value; - } - - return acc; - }, {}) - ) as T[]; - - return documents; -} diff --git a/x-pack/plugins/entity_manager/server/lib/v2/constants.ts b/x-pack/plugins/entity_manager/server/lib/v2/constants.ts new file mode 100644 index 0000000000000..71d9369318225 --- /dev/null +++ b/x-pack/plugins/entity_manager/server/lib/v2/constants.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. + */ + +// Definitions index + +export const DEFINITIONS_ALIAS = '.kibana-entities-definitions'; +export const TEMPLATE_VERSION = 1; + +// Privileges + +export const CREATE_ENTITY_TYPE_DEFINITION_PRIVILEGE = 'create_entity_type_definition'; +export const CREATE_ENTITY_SOURCE_DEFINITION_PRIVILEGE = 'create_entity_source_definition'; +export const READ_ENTITY_TYPE_DEFINITION_PRIVILEGE = 'read_entity_type_definition'; +export const READ_ENTITY_SOURCE_DEFINITION_PRIVILEGE = 'read_entity_source_definition'; +export const READ_ENTITIES_PRIVILEGE = 'read_entities'; diff --git a/x-pack/plugins/entity_manager/server/lib/v2/definitions/setup_entity_definitions_index.ts b/x-pack/plugins/entity_manager/server/lib/v2/definitions/setup_entity_definitions_index.ts new file mode 100644 index 0000000000000..b9e3f39a3dd62 --- /dev/null +++ b/x-pack/plugins/entity_manager/server/lib/v2/definitions/setup_entity_definitions_index.ts @@ -0,0 +1,81 @@ +/* + * 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 { IClusterClient, Logger } from '@kbn/core/server'; +import { DEFINITIONS_ALIAS, TEMPLATE_VERSION } from '../constants'; + +const definitionsIndexTemplate = { + name: `${DEFINITIONS_ALIAS}-template`, + index_patterns: [`${DEFINITIONS_ALIAS}-*`], + _meta: { + description: "Index template for the Elastic Entity Model's entity definitions index.", + managed: true, + managed_by: 'elastic_entity_model', + }, + version: TEMPLATE_VERSION, + template: { + settings: { + hidden: true, + }, + aliases: { + [DEFINITIONS_ALIAS]: { + is_hidden: true, + }, + }, + mappings: { + dynamic: false, + properties: { + template_version: { + type: 'short', + }, + definition_type: { + type: 'keyword', + }, + source: { + type: 'object', + properties: { + type_id: { + type: 'keyword', + }, + }, + }, + }, + }, + }, +}; + +const CURRENT_INDEX = `${DEFINITIONS_ALIAS}-${TEMPLATE_VERSION}` as const; + +export async function setupEntityDefinitionsIndex(clusterClient: IClusterClient, logger: Logger) { + const esClient = clusterClient.asInternalUser; + try { + logger.debug(`Installing entity definitions index template for version ${TEMPLATE_VERSION}`); + await esClient.indices.putIndexTemplate(definitionsIndexTemplate); + + await esClient.indices.get({ + index: CURRENT_INDEX, + }); + + logger.debug(`Entity definitions index already exists (${CURRENT_INDEX})`); + } catch (error) { + if ( + error instanceof errors.ResponseError && + error.message.includes('index_not_found_exception') + ) { + logger.debug(`Creating entity definitions index (${CURRENT_INDEX})`); + + await esClient.indices.create({ + index: CURRENT_INDEX, + }); + + return; + } + + throw error; + } +} diff --git a/x-pack/plugins/entity_manager/server/lib/v2/definitions/source_definition.ts b/x-pack/plugins/entity_manager/server/lib/v2/definitions/source_definition.ts new file mode 100644 index 0000000000000..7ed1779708e54 --- /dev/null +++ b/x-pack/plugins/entity_manager/server/lib/v2/definitions/source_definition.ts @@ -0,0 +1,68 @@ +/* + * 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 { IScopedClusterClient, Logger } from '@kbn/core/server'; +import { DEFINITIONS_ALIAS, TEMPLATE_VERSION } from '../constants'; +import { EntitySourceDefinition, StoredEntitySourceDefinition } from '../types'; +import { SourceAs, runESQLQuery } from '../run_esql_query'; +import { EntityDefinitionConflict } from '../errors/entity_definition_conflict'; + +export async function storeSourceDefinition( + source: EntitySourceDefinition, + clusterClient: IScopedClusterClient, + logger: Logger +): Promise { + const esClient = clusterClient.asInternalUser; + + const sources = await runESQLQuery('fetch source definition for conflict check', { + esClient, + query: `FROM ${DEFINITIONS_ALIAS} METADATA _id | WHERE definition_type == "source" AND _id == "source:${source.id}" | KEEP _id`, + logger, + }); + + if (sources.length !== 0) { + throw new EntityDefinitionConflict('source', source.id); + } + + const definition: StoredEntitySourceDefinition = { + template_version: TEMPLATE_VERSION, + definition_type: 'source', + source, + }; + + await esClient.index({ + index: DEFINITIONS_ALIAS, + id: `source:${definition.source.id}`, + document: definition, + }); + + return definition.source; +} + +export interface ReadSourceDefinitionOptions { + type?: string; +} + +export async function readSourceDefinitions( + clusterClient: IScopedClusterClient, + logger: Logger, + options?: ReadSourceDefinitionOptions +): Promise { + const esClient = clusterClient.asInternalUser; + + const typeFilter = options?.type ? `AND source.type_id == "${options.type}"` : ''; + const sources = await runESQLQuery>( + 'fetch all source definitions', + { + esClient, + query: `FROM ${DEFINITIONS_ALIAS} METADATA _source | WHERE definition_type == "source" ${typeFilter} | KEEP _source`, + logger, + } + ); + + return sources.map((storedTypeDefinition) => storedTypeDefinition._source.source); +} diff --git a/x-pack/plugins/entity_manager/server/lib/v2/definitions/type_definition.ts b/x-pack/plugins/entity_manager/server/lib/v2/definitions/type_definition.ts new file mode 100644 index 0000000000000..710e176a4a128 --- /dev/null +++ b/x-pack/plugins/entity_manager/server/lib/v2/definitions/type_definition.ts @@ -0,0 +1,62 @@ +/* + * 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 { IScopedClusterClient, Logger } from '@kbn/core/server'; +import { DEFINITIONS_ALIAS, TEMPLATE_VERSION } from '../constants'; +import { EntityTypeDefinition, StoredEntityTypeDefinition } from '../types'; +import { SourceAs, runESQLQuery } from '../run_esql_query'; +import { EntityDefinitionConflict } from '../errors/entity_definition_conflict'; + +export async function storeTypeDefinition( + type: EntityTypeDefinition, + clusterClient: IScopedClusterClient, + logger: Logger +): Promise { + const esClient = clusterClient.asInternalUser; + + const types = await runESQLQuery('fetch type definition for conflict check', { + esClient, + query: `FROM ${DEFINITIONS_ALIAS} METADATA _id | WHERE definition_type == "type" AND _id == "type:${type.id}" | KEEP _id`, + logger, + }); + + if (types.length !== 0) { + throw new EntityDefinitionConflict('type', type.id); + } + + const definition: StoredEntityTypeDefinition = { + template_version: TEMPLATE_VERSION, + definition_type: 'type', + type, + }; + + await esClient.index({ + index: DEFINITIONS_ALIAS, + id: `type:${definition.type.id}`, + document: definition, + }); + + return definition.type; +} + +export async function readTypeDefinitions( + clusterClient: IScopedClusterClient, + logger: Logger +): Promise { + const esClient = clusterClient.asInternalUser; + + const types = await runESQLQuery>( + 'fetch all type definitions', + { + esClient, + query: `FROM ${DEFINITIONS_ALIAS} METADATA _source | WHERE definition_type == "type" | KEEP _source`, + logger, + } + ); + + return types.map((storedTypeDefinition) => storedTypeDefinition._source.type); +} diff --git a/x-pack/plugins/entity_manager/server/lib/v2/entity_client.ts b/x-pack/plugins/entity_manager/server/lib/v2/entity_client.ts new file mode 100644 index 0000000000000..9eb2127ddc818 --- /dev/null +++ b/x-pack/plugins/entity_manager/server/lib/v2/entity_client.ts @@ -0,0 +1,142 @@ +/* + * 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 { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; +import { IScopedClusterClient, Logger } from '@kbn/core/server'; +import { EntityV2 } from '@kbn/entities-schema'; +import { without } from 'lodash'; +import { + ReadSourceDefinitionOptions, + readSourceDefinitions, + storeSourceDefinition, +} from './definitions/source_definition'; +import { readTypeDefinitions, storeTypeDefinition } from './definitions/type_definition'; +import { getEntityInstancesQuery } from './queries'; +import { mergeEntitiesList } from './queries/utils'; +import { + EntitySourceDefinition, + EntityTypeDefinition, + SearchByType, + SearchBySources, +} from './types'; +import { UnknownEntityType } from './errors/unknown_entity_type'; +import { runESQLQuery } from './run_esql_query'; + +export class EntityClient { + constructor( + private options: { + clusterClient: IScopedClusterClient; + soClient: SavedObjectsClientContract; + logger: Logger; + } + ) {} + + async searchEntities({ type, ...options }: SearchByType) { + const sources = await this.readSourceDefinitions({ + type, + }); + + if (sources.length === 0) { + throw new UnknownEntityType(`No sources found for entity type [${type}]`); + } + + return this.searchEntitiesBySources({ + sources, + ...options, + }); + } + + async searchEntitiesBySources({ + sources, + metadata_fields: metadataFields, + filters, + start, + end, + sort, + limit, + }: SearchBySources) { + const entities = await Promise.all( + sources.map(async (source) => { + const mandatoryFields = [ + ...source.identity_fields, + ...(source.timestamp_field ? [source.timestamp_field] : []), + ...(source.display_name ? [source.display_name] : []), + ]; + const metaFields = [...metadataFields, ...source.metadata_fields]; + + // operations on an unmapped field result in a failing query so we verify + // field capabilities beforehand + const { fields } = await this.options.clusterClient.asCurrentUser.fieldCaps({ + index: source.index_patterns, + fields: [...mandatoryFields, ...metaFields], + }); + + const sourceHasMandatoryFields = mandatoryFields.every((field) => !!fields[field]); + if (!sourceHasMandatoryFields) { + // we can't build entities without id fields so we ignore the source. + // TODO filters should likely behave similarly. we should also throw + const missingFields = mandatoryFields.filter((field) => !fields[field]); + this.options.logger.info( + `Ignoring source for type [${source.type_id}] with index_patterns [${ + source.index_patterns + }] because some mandatory fields [${missingFields.join(', ')}] are not mapped` + ); + return []; + } + + // but metadata field not being available is fine + const availableMetadataFields = metaFields.filter((field) => fields[field]); + if (availableMetadataFields.length < metaFields.length) { + this.options.logger.info( + `Ignoring unmapped fields [${without(metaFields, ...availableMetadataFields).join( + ', ' + )}]` + ); + } + + const query = getEntityInstancesQuery({ + source: { + ...source, + metadata_fields: availableMetadataFields, + filters: [...source.filters, ...filters], + }, + start, + end, + sort, + limit, + }); + this.options.logger.debug(`Entity query: ${query}`); + + const rawEntities = await runESQLQuery('resolve entities', { + query, + esClient: this.options.clusterClient.asCurrentUser, + logger: this.options.logger, + }); + + return rawEntities; + }) + ).then((results) => results.flat()); + + return mergeEntitiesList(sources, entities).slice(0, limit); + } + + async storeTypeDefinition(type: EntityTypeDefinition) { + return storeTypeDefinition(type, this.options.clusterClient, this.options.logger); + } + + async readTypeDefinitions() { + return readTypeDefinitions(this.options.clusterClient, this.options.logger); + } + + async storeSourceDefinition(source: EntitySourceDefinition) { + return storeSourceDefinition(source, this.options.clusterClient, this.options.logger); + } + + async readSourceDefinitions(options?: ReadSourceDefinitionOptions) { + return readSourceDefinitions(this.options.clusterClient, this.options.logger, options); + } +} diff --git a/x-pack/plugins/entity_manager/server/lib/v2/errors/entity_definition_conflict.ts b/x-pack/plugins/entity_manager/server/lib/v2/errors/entity_definition_conflict.ts new file mode 100644 index 0000000000000..9000685713e36 --- /dev/null +++ b/x-pack/plugins/entity_manager/server/lib/v2/errors/entity_definition_conflict.ts @@ -0,0 +1,15 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { DefinitionType } from '../types'; + +export class EntityDefinitionConflict extends Error { + constructor(definitionType: DefinitionType, id: string) { + super(`An entity ${definitionType} definition with the ID "${id}" already exists.`); + this.name = 'EntityDefinitionConflict'; + } +} diff --git a/x-pack/plugins/entity_manager/server/lib/entities/errors/unknown_entity_type.ts b/x-pack/plugins/entity_manager/server/lib/v2/errors/unknown_entity_type.ts similarity index 100% rename from x-pack/plugins/entity_manager/server/lib/entities/errors/unknown_entity_type.ts rename to x-pack/plugins/entity_manager/server/lib/v2/errors/unknown_entity_type.ts diff --git a/x-pack/plugins/entity_manager/server/lib/queries/index.test.ts b/x-pack/plugins/entity_manager/server/lib/v2/queries/index.test.ts similarity index 57% rename from x-pack/plugins/entity_manager/server/lib/queries/index.test.ts rename to x-pack/plugins/entity_manager/server/lib/v2/queries/index.test.ts index 539d20c464794..e77be7d4172ca 100644 --- a/x-pack/plugins/entity_manager/server/lib/queries/index.test.ts +++ b/x-pack/plugins/entity_manager/server/lib/v2/queries/index.test.ts @@ -12,25 +12,29 @@ describe('getEntityInstancesQuery', () => { it('generates a valid esql query', () => { const query = getEntityInstancesQuery({ source: { - type: 'service', + id: 'service_source', + type_id: 'service', index_patterns: ['logs-*', 'metrics-*'], identity_fields: ['service.name'], metadata_fields: ['host.name'], filters: [], timestamp_field: 'custom_timestamp_field', + display_name: 'service.id', }, limit: 5, start: '2024-11-20T19:00:00.000Z', end: '2024-11-20T20:00:00.000Z', + sort: { field: 'entity.id', direction: 'DESC' }, }); expect(query).toEqual( - 'FROM logs-*,metrics-*|' + - 'WHERE custom_timestamp_field >= "2024-11-20T19:00:00.000Z"|' + - 'WHERE custom_timestamp_field <= "2024-11-20T20:00:00.000Z"|' + - 'WHERE service.name IS NOT NULL|' + - 'STATS entity.last_seen_timestamp=MAX(custom_timestamp_field),metadata.host.name=VALUES(host.name) BY service.name|' + - 'SORT entity.last_seen_timestamp DESC|' + + 'FROM logs-*, metrics-* | ' + + 'WHERE service.name::keyword IS NOT NULL | ' + + 'WHERE custom_timestamp_field >= "2024-11-20T19:00:00.000Z" AND custom_timestamp_field <= "2024-11-20T20:00:00.000Z" | ' + + 'STATS host.name = VALUES(host.name::keyword), entity.last_seen_timestamp = MAX(custom_timestamp_field), service.id = MAX(service.id::keyword) BY service.name::keyword | ' + + 'RENAME `service.name::keyword` AS service.name | ' + + 'EVAL entity.type = "service", entity.id = service.name, entity.display_name = COALESCE(service.id, entity.id) | ' + + 'SORT entity.id DESC | ' + 'LIMIT 5' ); }); diff --git a/x-pack/plugins/entity_manager/server/lib/v2/queries/index.ts b/x-pack/plugins/entity_manager/server/lib/v2/queries/index.ts new file mode 100644 index 0000000000000..43c73fe7debad --- /dev/null +++ b/x-pack/plugins/entity_manager/server/lib/v2/queries/index.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { asKeyword } from './utils'; +import { EntitySourceDefinition, SortBy } from '../types'; + +const sourceCommand = ({ source }: { source: EntitySourceDefinition }) => { + let query = `FROM ${source.index_patterns.join(', ')}`; + + const esMetadataFields = source.metadata_fields.filter((field) => + ['_index', '_id'].includes(field) + ); + if (esMetadataFields.length) { + query += ` METADATA ${esMetadataFields.join(', ')}`; + } + + return query; +}; + +const whereCommand = ({ + source, + start, + end, +}: { + source: EntitySourceDefinition; + start: string; + end: string; +}) => { + const filters = [ + source.identity_fields.map((field) => `${asKeyword(field)} IS NOT NULL`).join(' AND '), + ...source.filters, + ]; + + if (source.timestamp_field) { + filters.push( + `${source.timestamp_field} >= "${start}" AND ${source.timestamp_field} <= "${end}"` + ); + } + + return filters.map((filter) => `WHERE ${filter}`).join(' | '); +}; + +const statsCommand = ({ source }: { source: EntitySourceDefinition }) => { + const aggs = source.metadata_fields + .filter((field) => !source.identity_fields.some((idField) => idField === field)) + .map((field) => `${field} = VALUES(${asKeyword(field)})`); + + if (source.timestamp_field) { + aggs.push(`entity.last_seen_timestamp = MAX(${source.timestamp_field})`); + } + + if (source.display_name) { + // ideally we want the latest value but there's no command yet + // so we use MAX for now + aggs.push(`${source.display_name} = MAX(${asKeyword(source.display_name)})`); + } + + return `STATS ${aggs.join(', ')} BY ${source.identity_fields.map(asKeyword).join(', ')}`; +}; + +const renameCommand = ({ source }: { source: EntitySourceDefinition }) => { + const operations = source.identity_fields.map((field) => `\`${asKeyword(field)}\` AS ${field}`); + return `RENAME ${operations.join(', ')}`; +}; + +const evalCommand = ({ source }: { source: EntitySourceDefinition }) => { + const id = + source.identity_fields.length === 1 + ? source.identity_fields[0] + : `CONCAT(${source.identity_fields.join(', ":", ')})`; + + const displayName = source.display_name + ? `COALESCE(${source.display_name}, entity.id)` + : 'entity.id'; + + return `EVAL ${[ + `entity.type = "${source.type_id}"`, + `entity.id = ${id}`, + `entity.display_name = ${displayName}`, + ].join(', ')}`; +}; + +const sortCommand = ({ source, sort }: { source: EntitySourceDefinition; sort?: SortBy }) => { + if (sort) { + return `SORT ${sort.field} ${sort.direction}`; + } + + if (source.timestamp_field) { + return `SORT entity.last_seen_timestamp DESC`; + } + + return `SORT entity.id ASC`; +}; + +export function getEntityInstancesQuery({ + source, + limit, + start, + end, + sort, +}: { + source: EntitySourceDefinition; + limit: number; + start: string; + end: string; + sort?: SortBy; +}): string { + const commands = [ + sourceCommand({ source }), + whereCommand({ source, start, end }), + statsCommand({ source }), + renameCommand({ source }), + evalCommand({ source }), + sortCommand({ source, sort }), + `LIMIT ${limit}`, + ]; + + return commands.join(' | '); +} diff --git a/x-pack/plugins/entity_manager/server/lib/v2/queries/utils.test.ts b/x-pack/plugins/entity_manager/server/lib/v2/queries/utils.test.ts new file mode 100644 index 0000000000000..295ab7796585c --- /dev/null +++ b/x-pack/plugins/entity_manager/server/lib/v2/queries/utils.test.ts @@ -0,0 +1,218 @@ +/* + * 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 { EntitySourceDefinition } from '../types'; +import { mergeEntitiesList } from './utils'; + +describe('mergeEntitiesList', () => { + describe('mergeEntitiesList', () => { + it('merges entities on entity.id', () => { + const entities = [ + { + 'entity.id': 'foo', + 'entity.last_seen_timestamp': '2024-11-20T18:00:00.000Z', + 'entity.type': 'service', + 'entity.display_name': 'foo', + }, + { + 'entity.id': 'foo', + 'entity.last_seen_timestamp': '2024-11-20T18:00:00.000Z', + 'entity.type': 'service', + 'entity.display_name': 'foo', + }, + ]; + + const mergedEntities = mergeEntitiesList([], entities); + expect(mergedEntities.length).toEqual(1); + expect(mergedEntities[0]).toEqual({ + 'entity.id': 'foo', + 'entity.last_seen_timestamp': '2024-11-20T18:00:00.000Z', + 'entity.type': 'service', + 'entity.display_name': 'foo', + }); + }); + + it('merges metadata fields', () => { + const entities = [ + { + 'entity.id': 'foo', + 'entity.last_seen_timestamp': '2024-11-20T18:00:00.000Z', + 'entity.type': 'service', + 'entity.display_name': 'foo', + 'host.name': 'host-1', + 'agent.name': 'agent-1', + 'service.environment': ['dev', 'staging'], + only_in_record_1: 'foo', + }, + { + 'entity.id': 'foo', + 'entity.last_seen_timestamp': '2024-11-20T18:00:00.000Z', + 'entity.type': 'service', + 'entity.display_name': 'foo', + 'host.name': ['host-2', 'host-3'], + 'agent.name': 'agent-2', + 'service.environment': 'prod', + only_in_record_2: 'bar', + }, + ]; + + const mergedEntities = mergeEntitiesList( + [ + { + metadata_fields: ['host.name', 'agent.name', 'service.environment', 'only_in_record_1'], + }, + { + metadata_fields: ['host.name', 'agent.name', 'service.environment', 'only_in_record_2'], + }, + ] as EntitySourceDefinition[], + entities + ); + expect(mergedEntities.length).toEqual(1); + expect(mergedEntities[0]).toEqual({ + 'entity.id': 'foo', + 'entity.last_seen_timestamp': '2024-11-20T18:00:00.000Z', + 'entity.type': 'service', + 'entity.display_name': 'foo', + 'host.name': ['host-1', 'host-2', 'host-3'], + 'agent.name': ['agent-1', 'agent-2'], + 'service.environment': ['dev', 'staging', 'prod'], + only_in_record_1: 'foo', + only_in_record_2: 'bar', + }); + }); + + it('picks most recent timestamp when merging', () => { + const entities = [ + { + 'entity.id': 'foo', + 'entity.last_seen_timestamp': '2024-11-20T18:00:00.000Z', + 'entity.type': 'service', + 'entity.display_name': 'foo', + 'host.name': 'host-1', + }, + { + 'entity.id': 'foo', + 'entity.last_seen_timestamp': '2024-11-20T20:00:00.000Z', + 'entity.type': 'service', + 'entity.display_name': 'foo', + 'host.name': 'host-2', + }, + { + 'entity.id': 'foo', + 'entity.last_seen_timestamp': '2024-11-20T16:00:00.000Z', + 'entity.type': 'service', + 'entity.display_name': 'foo', + 'host.name': 'host-3', + }, + { + 'entity.id': 'foo', + 'entity.type': 'service', + 'entity.display_name': 'foo', + 'host.name': 'host-3', + }, + ]; + + const mergedEntities = mergeEntitiesList( + [ + { + metadata_fields: ['host.name'], + }, + { + metadata_fields: ['host.name'], + }, + ] as EntitySourceDefinition[], + entities + ); + expect(mergedEntities.length).toEqual(1); + expect(mergedEntities[0]).toEqual({ + 'entity.id': 'foo', + 'entity.last_seen_timestamp': '2024-11-20T20:00:00.000Z', + 'entity.type': 'service', + 'entity.display_name': 'foo', + 'host.name': ['host-1', 'host-2', 'host-3'], + }); + }); + + it('works without entity.last_seen_timestamp', () => { + const entities = [ + { + 'entity.id': 'foo', + 'entity.type': 'service', + 'entity.display_name': 'foo', + 'host.name': 'host-1', + }, + { + 'entity.id': 'foo', + 'entity.type': 'service', + 'entity.display_name': 'foo', + 'host.name': 'host-2', + }, + ]; + + const mergedEntities = mergeEntitiesList( + [ + { metadata_fields: ['host.name'] }, + { metadata_fields: ['host.name'] }, + ] as EntitySourceDefinition[], + entities + ); + expect(mergedEntities.length).toEqual(1); + expect(mergedEntities[0]).toEqual({ + 'entity.id': 'foo', + 'entity.type': 'service', + 'entity.display_name': 'foo', + 'host.name': ['host-1', 'host-2'], + }); + }); + + it('deduplicates metadata values', () => { + const entities = [ + { + 'entity.id': 'foo', + 'entity.last_seen_timestamp': '2024-11-20T18:00:00.000Z', + 'entity.type': 'service', + 'entity.display_name': 'foo', + 'host.name': 'host-1', + }, + { + 'entity.id': 'foo', + 'entity.last_seen_timestamp': '2024-11-20T20:00:00.000Z', + 'entity.type': 'service', + 'entity.display_name': 'foo', + 'host.name': 'host-2', + }, + { + 'entity.id': 'foo', + 'entity.last_seen_timestamp': '2024-11-20T16:00:00.000Z', + 'entity.type': 'service', + 'entity.display_name': 'foo', + 'host.name': ['host-1', 'host-2'], + }, + ]; + + const mergedEntities = mergeEntitiesList( + [ + { + metadata_fields: ['host.name'], + }, + { + metadata_fields: ['host.name'], + }, + ] as EntitySourceDefinition[], + entities + ); + expect(mergedEntities.length).toEqual(1); + expect(mergedEntities[0]).toEqual({ + 'entity.id': 'foo', + 'entity.last_seen_timestamp': '2024-11-20T20:00:00.000Z', + 'entity.type': 'service', + 'entity.display_name': 'foo', + 'host.name': ['host-1', 'host-2'], + }); + }); + }); +}); diff --git a/x-pack/plugins/entity_manager/server/lib/v2/queries/utils.ts b/x-pack/plugins/entity_manager/server/lib/v2/queries/utils.ts new file mode 100644 index 0000000000000..5d1ebf3001434 --- /dev/null +++ b/x-pack/plugins/entity_manager/server/lib/v2/queries/utils.ts @@ -0,0 +1,71 @@ +/* + * 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 { EntityV2 } from '@kbn/entities-schema'; +import { compact, uniq } from 'lodash'; +import { EntitySourceDefinition } from '../types'; + +function getLatestDate(date1?: string, date2?: string) { + if (!date1 && !date2) return; + + return new Date( + Math.max(date1 ? Date.parse(date1) : 0, date2 ? Date.parse(date2) : 0) + ).toISOString(); +} + +function mergeEntities(metadataFields: string[], entity1: EntityV2, entity2: EntityV2): EntityV2 { + const merged: EntityV2 = { ...entity1 }; + + const latestTimestamp = getLatestDate( + entity1['entity.last_seen_timestamp'], + entity2['entity.last_seen_timestamp'] + ); + if (latestTimestamp) { + merged['entity.last_seen_timestamp'] = latestTimestamp; + } + + for (const [key, value] of Object.entries(entity2).filter(([_key]) => + metadataFields.includes(_key) + )) { + if (merged[key]) { + merged[key] = uniq([ + ...(Array.isArray(merged[key]) ? merged[key] : [merged[key]]), + ...(Array.isArray(value) ? value : [value]), + ]); + } else { + merged[key] = value; + } + } + return merged; +} + +export function mergeEntitiesList( + sources: EntitySourceDefinition[], + entities: EntityV2[] +): EntityV2[] { + const metadataFields = uniq( + sources.flatMap((source) => compact([source.timestamp_field, ...source.metadata_fields])) + ); + const instances: { [key: string]: EntityV2 } = {}; + + for (let i = 0; i < entities.length; i++) { + const entity = entities[i]; + const id = entity['entity.id']; + + if (instances[id]) { + instances[id] = mergeEntities(metadataFields, instances[id], entity); + } else { + instances[id] = entity; + } + } + + return Object.values(instances); +} + +export function asKeyword(field: string) { + return `${field}::keyword`; +} diff --git a/x-pack/plugins/entity_manager/server/lib/v2/run_esql_query.ts b/x-pack/plugins/entity_manager/server/lib/v2/run_esql_query.ts new file mode 100644 index 0000000000000..eda36a007ffe6 --- /dev/null +++ b/x-pack/plugins/entity_manager/server/lib/v2/run_esql_query.ts @@ -0,0 +1,73 @@ +/* + * 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 { withSpan } from '@kbn/apm-utils'; +import { ElasticsearchClient, Logger } from '@kbn/core/server'; +import { ESQLColumn, ESQLRow, ESQLSearchResponse } from '@kbn/es-types'; + +export interface SourceAs { + _source: T; +} + +export async function runESQLQuery( + operationName: string, + { + esClient, + logger, + query, + }: { + esClient: ElasticsearchClient; + logger: Logger; + query: string; + } +): Promise { + logger.trace(() => `Request (${operationName}):\n${query}`); + return withSpan( + { name: operationName, labels: { plugin: '@kbn/entityManager-plugin' } }, + async () => + esClient.esql.query( + { + query, + format: 'json', + }, + { querystring: { drop_null_columns: true } } + ) + ) + .then((response) => { + logger.trace(() => `Response (${operationName}):\n${JSON.stringify(response, null, 2)}`); + + const esqlResponse = response as unknown as ESQLSearchResponse; + + const documents = esqlResponse.values.map((row) => + rowToObject(row, esqlResponse.columns) + ) as T[]; + + return documents; + }) + .catch((error) => { + logger.trace(() => `Error (${operationName}):\n${error.message}`); + throw error; + }); +} + +function rowToObject(row: ESQLRow, columns: ESQLColumn[]) { + return row.reduce>((object, value, index) => { + const column = columns[index]; + + if (!column) { + return object; + } + + // Removes the type suffix from the column name + const name = column.name.replace(/\.(text|keyword)$/, ''); + if (!object[name]) { + object[name] = value; + } + + return object; + }, {}); +} diff --git a/x-pack/plugins/entity_manager/server/lib/v2/types.ts b/x-pack/plugins/entity_manager/server/lib/v2/types.ts new file mode 100644 index 0000000000000..e9815942592de --- /dev/null +++ b/x-pack/plugins/entity_manager/server/lib/v2/types.ts @@ -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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { z } from '@kbn/zod'; +import moment from 'moment'; + +// Definitions + +export const entityTypeDefinitionRt = z.object({ + id: z.string(), +}); + +export type EntityTypeDefinition = z.TypeOf; + +export const entitySourceDefinitionRt = z.object({ + id: z.string(), + type_id: z.string(), + index_patterns: z.array(z.string()), + identity_fields: z.array(z.string()), + metadata_fields: z.array(z.string()), + filters: z.array(z.string()), + timestamp_field: z.optional(z.string()), + display_name: z.optional(z.string()), +}); + +export type EntitySourceDefinition = z.TypeOf; + +// Stored definitions + +export type DefinitionType = 'type' | 'source'; + +export interface BaseEntityDefinition { + definition_type: DefinitionType; + template_version: number; +} + +export interface StoredEntityTypeDefinition extends BaseEntityDefinition { + type: EntityTypeDefinition; +} + +export interface StoredEntitySourceDefinition extends BaseEntityDefinition { + source: EntitySourceDefinition; +} + +// API parameters + +const sortByRt = z.object({ + field: z.string(), + direction: z.enum(['ASC', 'DESC']), +}); + +export type SortBy = z.TypeOf; + +const searchCommonRt = z.object({ + start: z + .optional(z.string()) + .default(() => moment().subtract(5, 'minutes').toISOString()) + .refine((val) => moment(val).isValid(), { + message: '[start] should be a date in ISO format', + }), + end: z + .optional(z.string()) + .default(() => moment().toISOString()) + .refine((val) => moment(val).isValid(), { + message: '[end] should be a date in ISO format', + }), + sort: z.optional(sortByRt), + limit: z.optional(z.number()).default(10), + metadata_fields: z.optional(z.array(z.string())).default([]), + filters: z.optional(z.array(z.string())).default([]), +}); + +export const searchByTypeRt = z.intersection( + searchCommonRt, + z.object({ + type: z.string(), + }) +); + +export type SearchByType = z.output; + +export const searchBySourcesRt = z.intersection( + searchCommonRt, + z.object({ + sources: z.array(entitySourceDefinitionRt), + }) +); + +export type SearchBySources = z.output; diff --git a/x-pack/plugins/entity_manager/server/plugin.ts b/x-pack/plugins/entity_manager/server/plugin.ts index 101fdde95c9dc..d2e9d12a33797 100644 --- a/x-pack/plugins/entity_manager/server/plugin.ts +++ b/x-pack/plugins/entity_manager/server/plugin.ts @@ -8,6 +8,7 @@ import { CoreSetup, CoreStart, + DEFAULT_APP_CATEGORIES, KibanaRequest, Logger, Plugin, @@ -16,6 +17,7 @@ import { } from '@kbn/core/server'; import { registerRoutes } from '@kbn/server-route-repository'; import { firstValueFrom } from 'rxjs'; +import { KibanaFeatureScope } from '@kbn/features-plugin/common'; import { EntityManagerConfig, configSchema, exposeToBrowserConfig } from '../common/config'; import { builtInDefinitions } from './lib/entities/built_in'; import { upgradeBuiltInEntityDefinitions } from './lib/entities/upgrade_entity_definition'; @@ -29,6 +31,14 @@ import { EntityManagerPluginStartDependencies, EntityManagerServerSetup, } from './types'; +import { setupEntityDefinitionsIndex } from './lib/v2/definitions/setup_entity_definitions_index'; +import { + CREATE_ENTITY_TYPE_DEFINITION_PRIVILEGE, + CREATE_ENTITY_SOURCE_DEFINITION_PRIVILEGE, + READ_ENTITY_TYPE_DEFINITION_PRIVILEGE, + READ_ENTITY_SOURCE_DEFINITION_PRIVILEGE, + READ_ENTITIES_PRIVILEGE, +} from './lib/v2/constants'; // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface EntityManagerServerPluginSetup {} @@ -63,6 +73,46 @@ export class EntityManagerServerPlugin core: CoreSetup, plugins: EntityManagerPluginSetupDependencies ): EntityManagerServerPluginSetup { + const ENTITY_MANAGER_FEATURE_ID = 'entityManager'; + plugins.features.registerKibanaFeature({ + id: ENTITY_MANAGER_FEATURE_ID, + name: 'Entity Manager', + description: 'All features related to the Elastic Entity model', + category: DEFAULT_APP_CATEGORIES.management, + scope: [KibanaFeatureScope.Spaces, KibanaFeatureScope.Security], + app: [ENTITY_MANAGER_FEATURE_ID], + privileges: { + all: { + app: [ENTITY_MANAGER_FEATURE_ID], + api: [ + CREATE_ENTITY_TYPE_DEFINITION_PRIVILEGE, + CREATE_ENTITY_SOURCE_DEFINITION_PRIVILEGE, + READ_ENTITY_TYPE_DEFINITION_PRIVILEGE, + READ_ENTITY_SOURCE_DEFINITION_PRIVILEGE, + READ_ENTITIES_PRIVILEGE, + ], + ui: [], + savedObject: { + all: [], + read: [], + }, + }, + read: { + app: [ENTITY_MANAGER_FEATURE_ID], + api: [ + READ_ENTITY_TYPE_DEFINITION_PRIVILEGE, + READ_ENTITY_SOURCE_DEFINITION_PRIVILEGE, + READ_ENTITIES_PRIVILEGE, + ], + ui: [], + savedObject: { + all: [], + read: [], + }, + }, + }, + }); + core.savedObjects.registerType(entityDefinition); core.savedObjects.registerType(EntityDiscoveryApiKeyType); plugins.encryptedSavedObjects.registerType({ @@ -99,9 +149,9 @@ export class EntityManagerServerPlugin request: KibanaRequest; coreStart: CoreStart; }) { - const esClient = coreStart.elasticsearch.client.asScoped(request).asCurrentUser; + const clusterClient = coreStart.elasticsearch.client.asScoped(request); const soClient = coreStart.savedObjects.getScopedClient(request); - return new EntityClient({ esClient, soClient, logger: this.logger }); + return new EntityClient({ clusterClient, soClient, logger: this.logger }); } public start( @@ -117,6 +167,7 @@ export class EntityManagerServerPlugin const esClient = core.elasticsearch.client.asInternalUser; + // Setup v1 definitions index installEntityManagerTemplates({ esClient, logger: this.logger }) .then(async () => { // the api key validation requires a check against the cluster license @@ -133,6 +184,11 @@ export class EntityManagerServerPlugin }) .catch((err) => this.logger.error(err)); + // Setup v2 definitions index + setupEntityDefinitionsIndex(core.elasticsearch.client, this.logger).catch((error) => { + this.logger.error(error); + }); + return { getScopedClient: async ({ request }: { request: KibanaRequest }) => { return this.getScopedClient({ request, coreStart: core }); diff --git a/x-pack/plugins/entity_manager/server/routes/entities/index.ts b/x-pack/plugins/entity_manager/server/routes/entities/index.ts index 52300ab2601b6..539423c6a5e17 100644 --- a/x-pack/plugins/entity_manager/server/routes/entities/index.ts +++ b/x-pack/plugins/entity_manager/server/routes/entities/index.ts @@ -10,7 +10,6 @@ import { deleteEntityDefinitionRoute } from './delete'; import { getEntityDefinitionRoute } from './get'; import { resetEntityDefinitionRoute } from './reset'; import { updateEntityDefinitionRoute } from './update'; -import { searchEntitiesRoute, searchEntitiesPreviewRoute } from '../v2/search'; export const entitiesRoutes = { ...createEntityDefinitionRoute, @@ -18,6 +17,4 @@ export const entitiesRoutes = { ...getEntityDefinitionRoute, ...resetEntityDefinitionRoute, ...updateEntityDefinitionRoute, - ...searchEntitiesRoute, - ...searchEntitiesPreviewRoute, }; diff --git a/x-pack/plugins/entity_manager/server/routes/index.ts b/x-pack/plugins/entity_manager/server/routes/index.ts index e3f2d3a75bbef..487dfe86028d7 100644 --- a/x-pack/plugins/entity_manager/server/routes/index.ts +++ b/x-pack/plugins/entity_manager/server/routes/index.ts @@ -7,10 +7,12 @@ import { enablementRoutes } from './enablement'; import { entitiesRoutes } from './entities'; +import { v2Routes } from './v2'; export const entityManagerRouteRepository = { ...enablementRoutes, ...entitiesRoutes, + ...v2Routes, }; export type EntityManagerRouteRepository = typeof entityManagerRouteRepository; diff --git a/x-pack/plugins/entity_manager/server/routes/v2/index.ts b/x-pack/plugins/entity_manager/server/routes/v2/index.ts new file mode 100644 index 0000000000000..c601ebe988a29 --- /dev/null +++ b/x-pack/plugins/entity_manager/server/routes/v2/index.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 { searchRoutes } from './search'; +import { typeDefinitionRoutes } from './type_definition_routes'; +import { sourceDefinitionRoutes } from './source_definition_routes'; + +export const v2Routes = { + ...searchRoutes, + ...typeDefinitionRoutes, + ...sourceDefinitionRoutes, +}; diff --git a/x-pack/plugins/entity_manager/server/routes/v2/search.ts b/x-pack/plugins/entity_manager/server/routes/v2/search.ts index 0b975da748a86..82d0e5e84f2da 100644 --- a/x-pack/plugins/entity_manager/server/routes/v2/search.ts +++ b/x-pack/plugins/entity_manager/server/routes/v2/search.ts @@ -5,47 +5,26 @@ * 2.0. */ -import moment from 'moment'; import { z } from '@kbn/zod'; import { createEntityManagerServerRoute } from '../create_entity_manager_server_route'; -import { entitySourceSchema } from '../../lib/queries'; -import { UnknownEntityType } from '../../lib/entities/errors/unknown_entity_type'; +import { UnknownEntityType } from '../../lib/v2/errors/unknown_entity_type'; +import { searchBySourcesRt, searchByTypeRt } from '../../lib/v2/types'; +import { READ_ENTITIES_PRIVILEGE } from '../../lib/v2/constants'; export const searchEntitiesRoute = createEntityManagerServerRoute({ endpoint: 'POST /internal/entities/v2/_search', + security: { + authz: { + requiredPrivileges: [READ_ENTITIES_PRIVILEGE], + }, + }, params: z.object({ - body: z.object({ - type: z.string(), - metadata_fields: z.optional(z.array(z.string())).default([]), - filters: z.optional(z.array(z.string())).default([]), - start: z - .optional(z.string()) - .default(() => moment().subtract(5, 'minutes').toISOString()) - .refine((val) => moment(val).isValid(), { - message: 'start should be a date in ISO format', - }), - end: z - .optional(z.string()) - .default(() => moment().toISOString()) - .refine((val) => moment(val).isValid(), { - message: 'start should be a date in ISO format', - }), - limit: z.optional(z.number()).default(10), - }), + body: searchByTypeRt, }), handler: async ({ request, response, params, logger, getScopedClient }) => { try { - const { type, start, end, limit, filters, metadata_fields: metadataFields } = params.body; - const client = await getScopedClient({ request }); - const entities = await client.searchEntities({ - type, - filters, - metadataFields, - start, - end, - limit, - }); + const entities = await client.v2.searchEntities(params.body); return response.ok({ body: { entities } }); } catch (e) { @@ -62,35 +41,23 @@ export const searchEntitiesRoute = createEntityManagerServerRoute({ export const searchEntitiesPreviewRoute = createEntityManagerServerRoute({ endpoint: 'POST /internal/entities/v2/_search/preview', + security: { + authz: { + requiredPrivileges: [READ_ENTITIES_PRIVILEGE], + }, + }, params: z.object({ - body: z.object({ - sources: z.array(entitySourceSchema), - start: z - .optional(z.string()) - .default(() => moment().subtract(5, 'minutes').toISOString()) - .refine((val) => moment(val).isValid(), { - message: 'start should be a date in ISO format', - }), - end: z - .optional(z.string()) - .default(() => moment().toISOString()) - .refine((val) => moment(val).isValid(), { - message: 'start should be a date in ISO format', - }), - limit: z.optional(z.number()).default(10), - }), + body: searchBySourcesRt, }), - handler: async ({ request, response, params, logger, getScopedClient }) => { - const { sources, start, end, limit } = params.body; - + handler: async ({ request, response, params, getScopedClient }) => { const client = await getScopedClient({ request }); - const entities = await client.searchEntitiesBySources({ - sources, - start, - end, - limit, - }); + const entities = await client.v2.searchEntitiesBySources(params.body); return response.ok({ body: { entities } }); }, }); + +export const searchRoutes = { + ...searchEntitiesRoute, + ...searchEntitiesPreviewRoute, +}; diff --git a/x-pack/plugins/entity_manager/server/routes/v2/source_definition_routes.ts b/x-pack/plugins/entity_manager/server/routes/v2/source_definition_routes.ts new file mode 100644 index 0000000000000..4fdfa281cfd72 --- /dev/null +++ b/x-pack/plugins/entity_manager/server/routes/v2/source_definition_routes.ts @@ -0,0 +1,78 @@ +/* + * 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 { z } from '@kbn/zod'; +import { + CREATE_ENTITY_SOURCE_DEFINITION_PRIVILEGE, + READ_ENTITY_SOURCE_DEFINITION_PRIVILEGE, +} from '../../lib/v2/constants'; +import { entitySourceDefinitionRt } from '../../lib/v2/types'; +import { createEntityManagerServerRoute } from '../create_entity_manager_server_route'; +import { EntityDefinitionConflict } from '../../lib/v2/errors/entity_definition_conflict'; + +const createSourceDefinitionRoute = createEntityManagerServerRoute({ + endpoint: 'POST /internal/entities/v2/definitions/sources', + security: { + authz: { + requiredPrivileges: [CREATE_ENTITY_SOURCE_DEFINITION_PRIVILEGE], + }, + }, + params: z.object({ + body: z.object({ + source: entitySourceDefinitionRt, + }), + }), + handler: async ({ request, response, params, getScopedClient }) => { + try { + const client = await getScopedClient({ request }); + const source = await client.v2.storeSourceDefinition(params.body.source); + + return response.created({ + body: { + source, + }, + headers: { + location: `GET /internal/entities/v2/definitions/sources/${source.id}`, + }, + }); + } catch (error) { + if (error instanceof EntityDefinitionConflict) { + response.conflict({ + body: { + message: error.message, + }, + }); + } + + throw error; + } + }, +}); + +const readSourceDefinitionsRoute = createEntityManagerServerRoute({ + endpoint: 'GET /internal/entities/v2/definitions/sources', + security: { + authz: { + requiredPrivileges: [READ_ENTITY_SOURCE_DEFINITION_PRIVILEGE], + }, + }, + handler: async ({ request, response, getScopedClient }) => { + const client = await getScopedClient({ request }); + const sources = await client.v2.readSourceDefinitions(); + + return response.ok({ + body: { + sources, + }, + }); + }, +}); + +export const sourceDefinitionRoutes = { + ...createSourceDefinitionRoute, + ...readSourceDefinitionsRoute, +}; diff --git a/x-pack/plugins/entity_manager/server/routes/v2/type_definition_routes.ts b/x-pack/plugins/entity_manager/server/routes/v2/type_definition_routes.ts new file mode 100644 index 0000000000000..8de41f7caf62f --- /dev/null +++ b/x-pack/plugins/entity_manager/server/routes/v2/type_definition_routes.ts @@ -0,0 +1,78 @@ +/* + * 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 { z } from '@kbn/zod'; +import { + CREATE_ENTITY_TYPE_DEFINITION_PRIVILEGE, + READ_ENTITY_TYPE_DEFINITION_PRIVILEGE, +} from '../../lib/v2/constants'; +import { entityTypeDefinitionRt } from '../../lib/v2/types'; +import { createEntityManagerServerRoute } from '../create_entity_manager_server_route'; +import { EntityDefinitionConflict } from '../../lib/v2/errors/entity_definition_conflict'; + +const createTypeDefinitionRoute = createEntityManagerServerRoute({ + endpoint: 'POST /internal/entities/v2/definitions/types', + security: { + authz: { + requiredPrivileges: [CREATE_ENTITY_TYPE_DEFINITION_PRIVILEGE], + }, + }, + params: z.object({ + body: z.object({ + type: entityTypeDefinitionRt, + }), + }), + handler: async ({ request, response, params, getScopedClient }) => { + try { + const client = await getScopedClient({ request }); + const type = await client.v2.storeTypeDefinition(params.body.type); + + return response.created({ + body: { + type, + }, + headers: { + location: `GET /internal/entities/v2/definitions/types/${type.id}`, + }, + }); + } catch (error) { + if (error instanceof EntityDefinitionConflict) { + return response.conflict({ + body: { + message: error.message, + }, + }); + } + + throw error; + } + }, +}); + +const readTypeDefinitionsRoute = createEntityManagerServerRoute({ + endpoint: 'GET /internal/entities/v2/definitions/types', + security: { + authz: { + requiredPrivileges: [READ_ENTITY_TYPE_DEFINITION_PRIVILEGE], + }, + }, + handler: async ({ request, response, getScopedClient }) => { + const client = await getScopedClient({ request }); + const types = await client.v2.readTypeDefinitions(); + + return response.ok({ + body: { + types, + }, + }); + }, +}); + +export const typeDefinitionRoutes = { + ...createTypeDefinitionRoute, + ...readTypeDefinitionsRoute, +}; diff --git a/x-pack/plugins/entity_manager/server/types.ts b/x-pack/plugins/entity_manager/server/types.ts index cd7a4a49b9882..0841ba8a2c950 100644 --- a/x-pack/plugins/entity_manager/server/types.ts +++ b/x-pack/plugins/entity_manager/server/types.ts @@ -12,6 +12,7 @@ import { EncryptedSavedObjectsPluginStart, } from '@kbn/encrypted-saved-objects-plugin/server'; import { LicensingPluginStart } from '@kbn/licensing-plugin/server'; +import { FeaturesPluginSetup } from '@kbn/features-plugin/server'; import { EntityManagerConfig } from '../common/config'; export interface EntityManagerServerSetup { @@ -29,6 +30,7 @@ export interface ElasticsearchAccessorOptions { export interface EntityManagerPluginSetupDependencies { encryptedSavedObjects: EncryptedSavedObjectsPluginSetup; + features: FeaturesPluginSetup; } export interface EntityManagerPluginStartDependencies { diff --git a/x-pack/plugins/entity_manager/tsconfig.json b/x-pack/plugins/entity_manager/tsconfig.json index 2ef8551f373fd..4c75ac101f6ad 100644 --- a/x-pack/plugins/entity_manager/tsconfig.json +++ b/x-pack/plugins/entity_manager/tsconfig.json @@ -36,5 +36,7 @@ "@kbn/licensing-plugin", "@kbn/core-saved-objects-server", "@kbn/es-types", + "@kbn/apm-utils", + "@kbn/features-plugin", ] } diff --git a/x-pack/plugins/features/common/alerting_kibana_privilege.ts b/x-pack/plugins/features/common/alerting_kibana_privilege.ts new file mode 100644 index 0000000000000..4a435b5c651c7 --- /dev/null +++ b/x-pack/plugins/features/common/alerting_kibana_privilege.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. + */ + +/** + * Interface for registering an alerting privilege. + * Alerting privilege registration allows plugins to + * specify for which rule types and consumers the feature + * has access to. + */ + +export type AlertingKibanaPrivilege = ReadonlyArray<{ + ruleTypeId: string; + consumers: readonly string[]; +}>; diff --git a/x-pack/plugins/features/common/feature_kibana_privileges.ts b/x-pack/plugins/features/common/feature_kibana_privileges.ts index 1939d0b5e4e49..a7d39669ef00a 100644 --- a/x-pack/plugins/features/common/feature_kibana_privileges.ts +++ b/x-pack/plugins/features/common/feature_kibana_privileges.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { AlertingKibanaPrivilege } from './alerting_kibana_privilege'; import { FeatureKibanaPrivilegesReference } from './feature_kibana_privileges_reference'; /** @@ -97,47 +98,47 @@ export interface FeatureKibanaPrivileges { alerting?: { rule?: { /** - * List of rule types which users should have full read/write access to when granted this privilege. + * List of rule types and consumers for which users should have full read/write access to when granted this privilege. * @example * ```ts * { - * all: ['my-alert-type-within-my-feature'] + * all: [{ ruleTypeId: 'my-alert-type-within-my-feature', consumers: ['my-consumer-within-my-feature'] }] * } * ``` */ - all?: readonly string[]; + all?: AlertingKibanaPrivilege; /** - * List of rule types which users should have read-only access to when granted this privilege. + * List of rule types and consumers for which users should have read-only access to when granted this privilege. * @example * ```ts * { - * read: ['my-alert-type'] + * read: [{ ruleTypeId: 'my-alert-type-within-my-feature', consumers: ['my-consumer-within-my-feature'] }] * } * ``` */ - read?: readonly string[]; + read?: AlertingKibanaPrivilege; }; alert?: { /** - * List of rule types for which users should have full read/write access their alert data to when granted this privilege. + * List of rule types and consumers for which users should have full read/write access their alert data to when granted this privilege. * @example * ```ts * { - * all: ['my-alert-type-within-my-feature'] + * all: [{ ruleTypeId: 'my-alert-type-within-my-feature', consumers: ['my-consumer-within-my-feature'] }] * } * ``` */ - all?: readonly string[]; + all?: AlertingKibanaPrivilege; /** - * List of rule types for which users should have read-only access to their alert data when granted this privilege. + * List of rule types and consumers for which users should have read-only access to their alert data when granted this privilege. * @example * ```ts * { - * read: ['my-alert-type'] + * read: [{ ruleTypeId: 'my-alert-type-within-my-feature', consumers: ['my-consumer-within-my-feature'] }] * } * ``` */ - read?: readonly string[]; + read?: AlertingKibanaPrivilege; }; }; diff --git a/x-pack/plugins/features/common/kibana_feature.ts b/x-pack/plugins/features/common/kibana_feature.ts index 3a5d9fc2a0e50..dba79a1663fca 100644 --- a/x-pack/plugins/features/common/kibana_feature.ts +++ b/x-pack/plugins/features/common/kibana_feature.ts @@ -11,6 +11,7 @@ import { LicenseType } from '@kbn/licensing-plugin/common/types'; import { FeatureKibanaPrivileges } from './feature_kibana_privileges'; import { SubFeatureConfig, SubFeature as KibanaSubFeature } from './sub_feature'; import { ReservedKibanaPrivilege } from './reserved_kibana_privilege'; +import { AlertingKibanaPrivilege } from './alerting_kibana_privilege'; /** * Enum for allowed feature scope values. @@ -107,11 +108,12 @@ export interface KibanaFeatureConfig { catalogue?: readonly string[]; /** - * If your feature grants access to specific Alert Types, you can specify them here to control visibility based on the current space. - * Include both Alert Types registered by the feature and external Alert Types such as built-in - * Alert Types and Alert Types provided by other features to which you wish to grant access. + * If your feature grants access to specific rule types, you can specify them here to control visibility based on the current space. + * Include both rule types registered by the feature and external rule types such as built-in + * rule types and rule types provided by other features to which you wish to grant access. For each rule type + * you can specify the consumers the feature has access to. */ - alerting?: readonly string[]; + alerting?: AlertingKibanaPrivilege; /** * If your feature grants access to specific case types, you can specify them here to control visibility based on the current space. diff --git a/x-pack/plugins/features/server/__snapshots__/oss_features.test.ts.snap b/x-pack/plugins/features/server/__snapshots__/oss_features.test.ts.snap index b8df9e9c2117b..140d20f8ebdb8 100644 --- a/x-pack/plugins/features/server/__snapshots__/oss_features.test.ts.snap +++ b/x-pack/plugins/features/server/__snapshots__/oss_features.test.ts.snap @@ -548,6 +548,8 @@ Array [ "api": Array [ "bulkGetUserProfiles", "dashboardUsageStats", + "savedQuery:manage", + "savedQuery:read", "store_search_session", ], "app": Array [ @@ -607,6 +609,7 @@ Array [ "api": Array [ "bulkGetUserProfiles", "dashboardUsageStats", + "savedQuery:read", ], "app": Array [ "dashboards", @@ -709,6 +712,8 @@ Array [ }, "api": Array [ "fileUpload:analyzeFile", + "savedQuery:manage", + "savedQuery:read", "store_search_session", ], "app": Array [ @@ -757,6 +762,9 @@ Array [ }, Object { "privilege": Object { + "api": Array [ + "savedQuery:read", + ], "app": Array [ "discover", "kibana", @@ -881,6 +889,9 @@ exports[`buildOSSFeatures with a basic license returns the indexPatterns feature Array [ Object { "privilege": Object { + "api": Array [ + "indexPatterns:manage", + ], "app": Array [ "kibana", ], @@ -1001,6 +1012,10 @@ exports[`buildOSSFeatures with a basic license returns the savedQueryManagement Array [ Object { "privilege": Object { + "api": Array [ + "savedQuery:manage", + "savedQuery:read", + ], "app": Array [ "kibana", ], @@ -1019,10 +1034,14 @@ Array [ }, Object { "privilege": Object { - "disabled": true, + "api": Array [ + "savedQuery:read", + ], "savedObject": Object { "all": Array [], - "read": Array [], + "read": Array [ + "query", + ], }, "ui": Array [], }, @@ -1045,7 +1064,10 @@ Array [ "read": Array [], }, }, - "api": Array [], + "api": Array [ + "savedQuery:manage", + "savedQuery:read", + ], "app": Array [ "visualize", "lens", @@ -1091,6 +1113,9 @@ Array [ }, Object { "privilege": Object { + "api": Array [ + "savedQuery:read", + ], "app": Array [ "visualize", "lens", @@ -1187,6 +1212,8 @@ Array [ "api": Array [ "bulkGetUserProfiles", "dashboardUsageStats", + "savedQuery:manage", + "savedQuery:read", "store_search_session", ], "app": Array [ @@ -1246,6 +1273,7 @@ Array [ "api": Array [ "bulkGetUserProfiles", "dashboardUsageStats", + "savedQuery:read", ], "app": Array [ "dashboards", @@ -1348,6 +1376,8 @@ Array [ }, "api": Array [ "fileUpload:analyzeFile", + "savedQuery:manage", + "savedQuery:read", "store_search_session", ], "app": Array [ @@ -1396,6 +1426,9 @@ Array [ }, Object { "privilege": Object { + "api": Array [ + "savedQuery:read", + ], "app": Array [ "discover", "kibana", @@ -1520,6 +1553,9 @@ exports[`buildOSSFeatures with a enterprise license returns the indexPatterns fe Array [ Object { "privilege": Object { + "api": Array [ + "indexPatterns:manage", + ], "app": Array [ "kibana", ], @@ -1640,6 +1676,10 @@ exports[`buildOSSFeatures with a enterprise license returns the savedQueryManage Array [ Object { "privilege": Object { + "api": Array [ + "savedQuery:manage", + "savedQuery:read", + ], "app": Array [ "kibana", ], @@ -1658,10 +1698,14 @@ Array [ }, Object { "privilege": Object { - "disabled": true, + "api": Array [ + "savedQuery:read", + ], "savedObject": Object { "all": Array [], - "read": Array [], + "read": Array [ + "query", + ], }, "ui": Array [], }, @@ -1684,7 +1728,10 @@ Array [ "read": Array [], }, }, - "api": Array [], + "api": Array [ + "savedQuery:manage", + "savedQuery:read", + ], "app": Array [ "visualize", "lens", @@ -1730,6 +1777,9 @@ Array [ }, Object { "privilege": Object { + "api": Array [ + "savedQuery:read", + ], "app": Array [ "visualize", "lens", diff --git a/x-pack/plugins/features/server/feature_privilege_iterator/feature_privilege_iterator.test.ts b/x-pack/plugins/features/server/feature_privilege_iterator/feature_privilege_iterator.test.ts index c7d501bb17cf8..c4e542a7ebcde 100644 --- a/x-pack/plugins/features/server/feature_privilege_iterator/feature_privilege_iterator.test.ts +++ b/x-pack/plugins/features/server/feature_privilege_iterator/feature_privilege_iterator.test.ts @@ -62,11 +62,11 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - all: ['alerting-all-type'], - read: ['alerting-read-type'], + all: [{ ruleTypeId: 'alerting-all-type', consumers: ['foo'] }], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, alert: { - all: ['alerting-all-type'], + all: [{ ruleTypeId: 'alerting-all-type', consumers: ['foo'] }], read: [], }, }, @@ -96,10 +96,10 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, alert: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, }, cases: { @@ -134,11 +134,11 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - all: ['alerting-all-type'], - read: ['alerting-read-type'], + all: [{ ruleTypeId: 'alerting-all-type', consumers: ['foo'] }], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, alert: { - all: ['alerting-all-type'], + all: [{ ruleTypeId: 'alerting-all-type', consumers: ['foo'] }], read: [], }, }, @@ -171,10 +171,10 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, alert: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, }, cases: { @@ -205,12 +205,12 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - all: ['alerting-all-type'], - read: ['alerting-read-type'], + all: [{ ruleTypeId: 'alerting-all-type', consumers: ['foo'] }], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, alert: { - all: ['alerting-all-type'], - read: ['alerting-read-type-alerts'], + all: [{ ruleTypeId: 'alerting-all-type', consumers: ['foo'] }], + read: [{ ruleTypeId: 'alerting-read-type-alerts', consumers: ['foo'] }], }, }, cases: { @@ -239,10 +239,10 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, alert: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, }, cases: { @@ -278,12 +278,12 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - all: ['alerting-all-type'], - read: ['alerting-read-type'], + all: [{ ruleTypeId: 'alerting-all-type', consumers: ['foo'] }], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, alert: { - all: ['alerting-all-type'], - read: ['alerting-read-type-alerts'], + all: [{ ruleTypeId: 'alerting-all-type', consumers: ['foo'] }], + read: [{ ruleTypeId: 'alerting-read-type-alerts', consumers: ['foo'] }], }, }, cases: { @@ -323,10 +323,10 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - all: ['alerting-all-type'], + all: [{ ruleTypeId: 'alerting-all-type', consumers: ['foo'] }], }, alert: { - read: ['alerting-another-read-type'], + read: [{ ruleTypeId: 'alerting-another-read-type', consumers: ['foo'] }], }, }, cases: { @@ -355,10 +355,10 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, alert: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, }, cases: { @@ -390,7 +390,7 @@ describe('featurePrivilegeIterator', () => { }, alerting: { alert: { - all: ['alerting-all-sub-type'], + all: [{ ruleTypeId: 'alerting-all-sub-type', consumers: ['foo'] }], }, }, cases: { @@ -436,10 +436,10 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - all: ['alerting-all-type'], + all: [{ ruleTypeId: 'alerting-all-type', consumers: ['foo'] }], }, alert: { - read: ['alerting-another-read-type'], + read: [{ ruleTypeId: 'alerting-another-read-type', consumers: ['foo'] }], }, }, cases: { @@ -471,10 +471,10 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, alert: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, }, cases: { @@ -506,10 +506,10 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - all: ['alerting-all-type'], + all: [{ ruleTypeId: 'alerting-all-type', consumers: ['foo'] }], }, alert: { - read: ['alerting-another-read-type'], + read: [{ ruleTypeId: 'alerting-another-read-type', consumers: ['foo'] }], }, }, cases: { @@ -538,10 +538,10 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, alert: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, }, cases: { @@ -573,7 +573,7 @@ describe('featurePrivilegeIterator', () => { }, alerting: { alert: { - all: ['alerting-all-sub-type'], + all: [{ ruleTypeId: 'alerting-all-sub-type', consumers: ['foo'] }], }, }, cases: { @@ -619,10 +619,10 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - all: ['alerting-all-type'], + all: [{ ruleTypeId: 'alerting-all-type', consumers: ['foo'] }], }, alert: { - read: ['alerting-another-read-type'], + read: [{ ruleTypeId: 'alerting-another-read-type', consumers: ['foo'] }], }, }, cases: { @@ -654,10 +654,10 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, alert: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, }, cases: { @@ -689,10 +689,10 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - all: ['alerting-all-type'], + all: [{ ruleTypeId: 'alerting-all-type', consumers: ['foo'] }], }, alert: { - read: ['alerting-another-read-type'], + read: [{ ruleTypeId: 'alerting-another-read-type', consumers: ['foo'] }], }, }, cases: { @@ -721,10 +721,10 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, alert: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, }, cases: { @@ -757,7 +757,7 @@ describe('featurePrivilegeIterator', () => { }, alerting: { alert: { - all: ['alerting-all-sub-type'], + all: [{ ruleTypeId: 'alerting-all-sub-type', consumers: ['foo'] }], }, }, cases: { @@ -804,12 +804,12 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - all: ['alerting-all-type'], + all: [{ ruleTypeId: 'alerting-all-type', consumers: ['foo'] }], read: [], }, alert: { - all: ['alerting-all-sub-type'], - read: ['alerting-another-read-type'], + all: [{ ruleTypeId: 'alerting-all-sub-type', consumers: ['foo'] }], + read: [{ ruleTypeId: 'alerting-another-read-type', consumers: ['foo'] }], }, }, cases: { @@ -843,11 +843,11 @@ describe('featurePrivilegeIterator', () => { alerting: { rule: { all: [], - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, alert: { - all: ['alerting-all-sub-type'], - read: ['alerting-read-type'], + all: [{ ruleTypeId: 'alerting-all-sub-type', consumers: ['foo'] }], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, }, cases: { @@ -887,12 +887,12 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - all: ['alerting-all-type'], - read: ['alerting-read-type'], + all: [{ ruleTypeId: 'alerting-all-type', consumers: ['foo'] }], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, alert: { all: [], - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, }, cases: { @@ -921,10 +921,10 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, alert: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, }, cases: { @@ -956,7 +956,7 @@ describe('featurePrivilegeIterator', () => { }, alerting: { alert: { - all: ['alerting-read-type'], + all: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, }, cases: { @@ -994,12 +994,12 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - all: ['alerting-all-type'], - read: ['alerting-read-type'], + all: [{ ruleTypeId: 'alerting-all-type', consumers: ['foo'] }], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, alert: { - all: ['alerting-read-type'], - read: ['alerting-read-type'], + all: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, }, cases: { @@ -1032,11 +1032,11 @@ describe('featurePrivilegeIterator', () => { alerting: { rule: { all: [], - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, alert: { - all: ['alerting-read-type'], - read: ['alerting-read-type'], + all: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, }, cases: { @@ -1076,10 +1076,10 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - all: ['alerting-all-type'], + all: [{ ruleTypeId: 'alerting-all-type', consumers: ['foo'] }], }, alert: { - read: ['alerting-another-read-type'], + read: [{ ruleTypeId: 'alerting-another-read-type', consumers: ['foo'] }], }, }, cases: { @@ -1108,10 +1108,10 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, alert: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, }, cases: { @@ -1144,7 +1144,7 @@ describe('featurePrivilegeIterator', () => { }, alerting: { alert: { - all: ['alerting-all-sub-type'], + all: [{ ruleTypeId: 'alerting-all-sub-type', consumers: ['foo'] }], }, }, cases: { @@ -1191,12 +1191,12 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - all: ['alerting-all-type'], + all: [{ ruleTypeId: 'alerting-all-type', consumers: ['foo'] }], read: [], }, alert: { - all: ['alerting-all-sub-type'], - read: ['alerting-another-read-type'], + all: [{ ruleTypeId: 'alerting-all-sub-type', consumers: ['foo'] }], + read: [{ ruleTypeId: 'alerting-another-read-type', consumers: ['foo'] }], }, }, cases: { @@ -1228,10 +1228,10 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, alert: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, }, cases: { @@ -1390,8 +1390,8 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - all: ['alerting-all-sub-type'], - read: ['alerting-read-sub-type'], + all: [{ ruleTypeId: 'alerting-all-sub-type', consumers: ['foo'] }], + read: [{ ruleTypeId: 'alerting-read-sub-type', consumers: ['foo'] }], }, }, cases: { @@ -1438,8 +1438,8 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - all: ['alerting-all-sub-type'], - read: ['alerting-read-sub-type'], + all: [{ ruleTypeId: 'alerting-all-sub-type', consumers: ['foo'] }], + read: [{ ruleTypeId: 'alerting-read-sub-type', consumers: ['foo'] }], }, alert: { all: [], @@ -1476,8 +1476,8 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - all: ['alerting-all-sub-type'], - read: ['alerting-read-sub-type'], + all: [{ ruleTypeId: 'alerting-all-sub-type', consumers: ['foo'] }], + read: [{ ruleTypeId: 'alerting-read-sub-type', consumers: ['foo'] }], }, alert: { all: [], @@ -1521,10 +1521,10 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - all: ['alerting-all-type'], + all: [{ ruleTypeId: 'alerting-all-type', consumers: ['foo'] }], }, alert: { - read: ['alerting-another-read-type'], + read: [{ ruleTypeId: 'alerting-another-read-type', consumers: ['foo'] }], }, }, cases: { @@ -1553,10 +1553,10 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, alert: { - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, }, cases: { @@ -1612,12 +1612,12 @@ describe('featurePrivilegeIterator', () => { }, alerting: { rule: { - all: ['alerting-all-type'], + all: [{ ruleTypeId: 'alerting-all-type', consumers: ['foo'] }], read: [], }, alert: { all: [], - read: ['alerting-another-read-type'], + read: [{ ruleTypeId: 'alerting-another-read-type', consumers: ['foo'] }], }, }, cases: { @@ -1650,11 +1650,11 @@ describe('featurePrivilegeIterator', () => { alerting: { rule: { all: [], - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, alert: { all: [], - read: ['alerting-read-type'], + read: [{ ruleTypeId: 'alerting-read-type', consumers: ['foo'] }], }, }, cases: { diff --git a/x-pack/plugins/features/server/feature_privilege_iterator/feature_privilege_iterator.ts b/x-pack/plugins/features/server/feature_privilege_iterator/feature_privilege_iterator.ts index a9d7336ea0a22..45518004430a4 100644 --- a/x-pack/plugins/features/server/feature_privilege_iterator/feature_privilege_iterator.ts +++ b/x-pack/plugins/features/server/feature_privilege_iterator/feature_privilege_iterator.ts @@ -8,6 +8,7 @@ import _ from 'lodash'; import type { LicenseType } from '@kbn/licensing-plugin/server'; +import { AlertingKibanaPrivilege } from '../../common/alerting_kibana_privilege'; import type { FeatureKibanaPrivileges, KibanaFeature } from '..'; import { subFeaturePrivilegeIterator } from './sub_feature_privilege_iterator'; @@ -108,26 +109,46 @@ function mergeWithSubFeatures( subFeaturePrivilege.savedObject.read ); + /** + * Merges all alerting rule types and consumers + * from features and sub features. + * Removes duplicated values. + */ + const mergeAlertingEntries = (entries: AlertingKibanaPrivilege): AlertingKibanaPrivilege => { + const alertingMap = new Map>(); + + for (const entry of entries) { + const consumers = alertingMap.get(entry.ruleTypeId) ?? new Set(); + entry.consumers.forEach((consumer) => consumers.add(consumer)); + alertingMap.set(entry.ruleTypeId, consumers); + } + + return Array.from(alertingMap).map(([ruleTypeId, consumers]) => ({ + ruleTypeId, + consumers: Array.from(consumers), + })); + }; + mergedConfig.alerting = { rule: { - all: mergeArrays( - mergedConfig.alerting?.rule?.all ?? [], - subFeaturePrivilege.alerting?.rule?.all ?? [] - ), - read: mergeArrays( - mergedConfig.alerting?.rule?.read ?? [], - subFeaturePrivilege.alerting?.rule?.read ?? [] - ), + all: mergeAlertingEntries([ + ...(mergedConfig.alerting?.rule?.all ?? []), + ...(subFeaturePrivilege.alerting?.rule?.all ?? []), + ]), + read: mergeAlertingEntries([ + ...(mergedConfig.alerting?.rule?.read ?? []), + ...(subFeaturePrivilege.alerting?.rule?.read ?? []), + ]), }, alert: { - all: mergeArrays( - mergedConfig.alerting?.alert?.all ?? [], - subFeaturePrivilege.alerting?.alert?.all ?? [] - ), - read: mergeArrays( - mergedConfig.alerting?.alert?.read ?? [], - subFeaturePrivilege.alerting?.alert?.read ?? [] - ), + all: mergeAlertingEntries([ + ...(mergedConfig.alerting?.alert?.all ?? []), + ...(subFeaturePrivilege.alerting?.alert?.all ?? []), + ]), + read: mergeAlertingEntries([ + ...(mergedConfig.alerting?.alert?.read ?? []), + ...(subFeaturePrivilege.alerting?.alert?.read ?? []), + ]), }, }; diff --git a/x-pack/plugins/features/server/feature_registry.test.ts b/x-pack/plugins/features/server/feature_registry.test.ts index 08da08e0a19bd..9ed7a207560b0 100644 --- a/x-pack/plugins/features/server/feature_registry.test.ts +++ b/x-pack/plugins/features/server/feature_registry.test.ts @@ -868,404 +868,688 @@ describe('FeatureRegistry', () => { ); }); - it(`prevents privileges from specifying alerting/rule entries that don't exist at the root level`, () => { - const feature: KibanaFeatureConfig = { - id: 'test-feature', - name: 'Test Feature', - app: [], - category: { id: 'foo', label: 'foo' }, - alerting: ['bar'], - privileges: { - all: { - alerting: { - rule: { - all: ['foo', 'bar'], - read: ['baz'], + describe('alerting', () => { + it(`prevents privileges from specifying rule types that don't exist at the root level`, () => { + const feature: KibanaFeatureConfig = { + id: 'test-feature', + name: 'Test Feature', + app: [], + category: { id: 'foo', label: 'foo' }, + alerting: [{ ruleTypeId: 'bar', consumers: ['test-feature'] }], + privileges: { + all: { + alerting: { + rule: { + all: [ + { ruleTypeId: 'foo', consumers: ['test-feature'] }, + { ruleTypeId: 'bar', consumers: ['test-feature'] }, + ], + read: [{ ruleTypeId: 'baz', consumers: ['test-feature'] }], + }, }, - }, - savedObject: { - all: [], - read: [], - }, - ui: [], - app: [], - }, - read: { - alerting: { - rule: { - read: ['foo', 'bar', 'baz'], + savedObject: { + all: [], + read: [], }, + ui: [], + app: [], }, - savedObject: { - all: [], - read: [], + read: { + alerting: { + rule: { + read: [{ ruleTypeId: 'bar', consumers: ['test-feature'] }], + }, + }, + savedObject: { + all: [], + read: [], + }, + ui: [], + app: [], }, - ui: [], - app: [], }, - }, - }; + }; - const featureRegistry = new FeatureRegistry(); + const featureRegistry = new FeatureRegistry(); - expect(() => - featureRegistry.registerKibanaFeature(feature) - ).toThrowErrorMatchingInlineSnapshot( - `"Feature privilege test-feature.all has unknown alerting entries: foo, baz"` - ); - }); + expect(() => + featureRegistry.registerKibanaFeature(feature) + ).toThrowErrorMatchingInlineSnapshot( + `"Feature privilege test-feature.all has unknown ruleTypeId: foo"` + ); + }); - it(`prevents privileges from specifying alerting/alert entries that don't exist at the root level`, () => { - const feature: KibanaFeatureConfig = { - id: 'test-feature', - name: 'Test Feature', - app: [], - category: { id: 'foo', label: 'foo' }, - alerting: ['bar'], - privileges: { - all: { - alerting: { - alert: { - all: ['foo', 'bar'], - read: ['baz'], + it(`prevents privileges from specifying rule types entries that don't exist at the root level`, () => { + const feature: KibanaFeatureConfig = { + id: 'test-feature', + name: 'Test Feature', + app: [], + category: { id: 'foo', label: 'foo' }, + alerting: [{ ruleTypeId: 'bar', consumers: ['test-feature'] }], + privileges: { + all: { + alerting: { + alert: { + all: [ + { ruleTypeId: 'foo', consumers: ['test-feature'] }, + { ruleTypeId: 'bar', consumers: ['test-feature'] }, + ], + read: [{ ruleTypeId: 'baz', consumers: ['test-feature'] }], + }, }, - }, - savedObject: { - all: [], - read: [], - }, - ui: [], - app: [], - }, - read: { - alerting: { - alert: { - read: ['foo', 'bar', 'baz'], + savedObject: { + all: [], + read: [], }, + ui: [], + app: [], }, - savedObject: { - all: [], - read: [], + read: { + alerting: { + alert: { + read: [{ ruleTypeId: 'bar', consumers: ['test-feature'] }], + }, + }, + savedObject: { + all: [], + read: [], + }, + ui: [], + app: [], }, - ui: [], - app: [], }, - }, - }; + }; - const featureRegistry = new FeatureRegistry(); + const featureRegistry = new FeatureRegistry(); - expect(() => - featureRegistry.registerKibanaFeature(feature) - ).toThrowErrorMatchingInlineSnapshot( - `"Feature privilege test-feature.all has unknown alerting entries: foo, baz"` - ); - }); + expect(() => + featureRegistry.registerKibanaFeature(feature) + ).toThrowErrorMatchingInlineSnapshot( + `"Feature privilege test-feature.all has unknown ruleTypeId: foo"` + ); + }); - it(`prevents features from specifying alerting/rule entries that don't exist at the privilege level`, () => { - const feature: KibanaFeatureConfig = { - id: 'test-feature', - name: 'Test Feature', - app: [], - category: { id: 'foo', label: 'foo' }, - alerting: ['foo', 'bar', 'baz'], - privileges: { - all: { - alerting: { - rule: { - all: ['foo'], + it(`prevents features from specifying rule types that don't exist at the privilege level`, () => { + const feature: KibanaFeatureConfig = { + id: 'test-feature', + name: 'Test Feature', + app: [], + category: { id: 'foo', label: 'foo' }, + alerting: [ + { ruleTypeId: 'foo', consumers: ['test-feature'] }, + { ruleTypeId: 'bar', consumers: ['test-feature'] }, + { ruleTypeId: 'baz', consumers: ['test-feature'] }, + ], + privileges: { + all: { + alerting: { + rule: { + all: [{ ruleTypeId: 'foo', consumers: ['test-feature'] }], + }, + }, + savedObject: { + all: [], + read: [], }, + ui: [], + app: [], }, - savedObject: { - all: [], - read: [], + read: { + alerting: { + rule: { + all: [{ ruleTypeId: 'foo', consumers: ['test-feature'] }], + }, + }, + savedObject: { + all: [], + read: [], + }, + ui: [], + app: [], }, - ui: [], - app: [], }, - read: { - alerting: { - rule: { - all: ['foo'], + subFeatures: [ + { + name: 'my sub feature', + privilegeGroups: [ + { + groupType: 'independent', + privileges: [ + { + id: 'cool-sub-feature-privilege', + name: 'cool privilege', + includeIn: 'none', + savedObject: { + all: [], + read: [], + }, + ui: [], + alerting: { + rule: { + all: [{ ruleTypeId: 'bar', consumers: ['test-feature'] }], + }, + }, + }, + ], + }, + ], + }, + ], + }; + + const featureRegistry = new FeatureRegistry(); + + expect(() => + featureRegistry.registerKibanaFeature(feature) + ).toThrowErrorMatchingInlineSnapshot( + `"Feature test-feature specifies alerting rule types which are not granted to any privileges: baz"` + ); + }); + + it(`prevents features from specifying rule types entries that don't exist at the privilege level`, () => { + const feature: KibanaFeatureConfig = { + id: 'test-feature', + name: 'Test Feature', + app: [], + category: { id: 'foo', label: 'foo' }, + alerting: [ + { ruleTypeId: 'foo', consumers: ['test-feature'] }, + { ruleTypeId: 'bar', consumers: ['test-feature'] }, + { ruleTypeId: 'baz', consumers: ['test-feature'] }, + ], + privileges: { + all: { + alerting: { + alert: { + all: [{ ruleTypeId: 'foo', consumers: ['test-feature'] }], + }, }, + savedObject: { + all: [], + read: [], + }, + ui: [], + app: [], }, - savedObject: { - all: [], - read: [], + read: { + alerting: { + alert: { + all: [{ ruleTypeId: 'foo', consumers: ['test-feature'] }], + }, + }, + savedObject: { + all: [], + read: [], + }, + ui: [], + app: [], }, - ui: [], - app: [], }, - }, - subFeatures: [ - { - name: 'my sub feature', - privilegeGroups: [ - { - groupType: 'independent', - privileges: [ - { - id: 'cool-sub-feature-privilege', - name: 'cool privilege', - includeIn: 'none', - savedObject: { - all: [], - read: [], - }, - ui: [], - alerting: { - rule: { - all: ['bar'], + subFeatures: [ + { + name: 'my sub feature', + privilegeGroups: [ + { + groupType: 'independent', + privileges: [ + { + id: 'cool-sub-feature-privilege', + name: 'cool privilege', + includeIn: 'none', + savedObject: { + all: [], + read: [], }, + ui: [], + alerting: { + alert: { + all: [{ ruleTypeId: 'bar', consumers: ['test-feature'] }], + }, + }, + }, + ], + }, + ], + }, + ], + }; + + const featureRegistry = new FeatureRegistry(); + + expect(() => + featureRegistry.registerKibanaFeature(feature) + ).toThrowErrorMatchingInlineSnapshot( + `"Feature test-feature specifies alerting rule types which are not granted to any privileges: baz"` + ); + }); + + it(`prevents reserved privileges from specifying rule types that don't exist at the root level`, () => { + const feature: KibanaFeatureConfig = { + id: 'test-feature', + name: 'Test Feature', + app: [], + category: { id: 'foo', label: 'foo' }, + alerting: [{ ruleTypeId: 'bar', consumers: ['test-feature'] }], + privileges: null, + reserved: { + description: 'something', + privileges: [ + { + id: 'reserved', + privilege: { + alerting: { + rule: { + all: [ + { ruleTypeId: 'foo', consumers: ['test-feature'] }, + { ruleTypeId: 'bar', consumers: ['test-feature'] }, + { ruleTypeId: 'baz', consumers: ['test-feature'] }, + ], }, }, - ], + savedObject: { + all: [], + read: [], + }, + ui: [], + app: [], + }, }, ], }, - ], - }; + }; - const featureRegistry = new FeatureRegistry(); + const featureRegistry = new FeatureRegistry(); - expect(() => - featureRegistry.registerKibanaFeature(feature) - ).toThrowErrorMatchingInlineSnapshot( - `"Feature test-feature specifies alerting entries which are not granted to any privileges: baz"` - ); - }); + expect(() => + featureRegistry.registerKibanaFeature(feature) + ).toThrowErrorMatchingInlineSnapshot( + `"Feature privilege test-feature.reserved has unknown ruleTypeId: foo"` + ); + }); - it(`prevents features from specifying alerting/alert entries that don't exist at the privilege level`, () => { - const feature: KibanaFeatureConfig = { - id: 'test-feature', - name: 'Test Feature', - app: [], - category: { id: 'foo', label: 'foo' }, - alerting: ['foo', 'bar', 'baz'], - privileges: { - all: { - alerting: { - alert: { - all: ['foo'], + it(`prevents reserved privileges from specifying rule types entries that don't exist at the root level`, () => { + const feature: KibanaFeatureConfig = { + id: 'test-feature', + name: 'Test Feature', + app: [], + category: { id: 'foo', label: 'foo' }, + alerting: [{ ruleTypeId: 'bar', consumers: ['test-feature'] }], + privileges: null, + reserved: { + description: 'something', + privileges: [ + { + id: 'reserved', + privilege: { + alerting: { + alert: { + all: [ + { ruleTypeId: 'foo', consumers: ['test-feature'] }, + { ruleTypeId: 'bar', consumers: ['test-feature'] }, + { ruleTypeId: 'baz', consumers: ['test-feature'] }, + ], + }, + }, + savedObject: { + all: [], + read: [], + }, + ui: [], + app: [], + }, }, - }, - savedObject: { - all: [], - read: [], - }, - ui: [], - app: [], + ], }, - read: { - alerting: { - alert: { - all: ['foo'], + }; + + const featureRegistry = new FeatureRegistry(); + + expect(() => + featureRegistry.registerKibanaFeature(feature) + ).toThrowErrorMatchingInlineSnapshot( + `"Feature privilege test-feature.reserved has unknown ruleTypeId: foo"` + ); + }); + + it(`prevents features from specifying rule types that don't exist at the reserved privilege level`, () => { + const feature: KibanaFeatureConfig = { + id: 'test-feature', + name: 'Test Feature', + app: [], + category: { id: 'foo', label: 'foo' }, + alerting: [ + { ruleTypeId: 'foo', consumers: ['test-feature'] }, + { ruleTypeId: 'bar', consumers: ['test-feature'] }, + { ruleTypeId: 'baz', consumers: ['test-feature'] }, + ], + privileges: null, + reserved: { + description: 'something', + privileges: [ + { + id: 'reserved', + privilege: { + alerting: { + rule: { + all: [ + { ruleTypeId: 'foo', consumers: ['test-feature'] }, + { ruleTypeId: 'bar', consumers: ['test-feature'] }, + ], + }, + }, + savedObject: { + all: [], + read: [], + }, + ui: [], + app: [], + }, }, - }, - savedObject: { - all: [], - read: [], - }, - ui: [], - app: [], + ], }, - }, - subFeatures: [ - { - name: 'my sub feature', - privilegeGroups: [ + }; + + const featureRegistry = new FeatureRegistry(); + + expect(() => + featureRegistry.registerKibanaFeature(feature) + ).toThrowErrorMatchingInlineSnapshot( + `"Feature test-feature specifies alerting rule types which are not granted to any privileges: baz"` + ); + }); + + it(`prevents features from specifying rule types entries that don't exist at the reserved privilege level`, () => { + const feature: KibanaFeatureConfig = { + id: 'test-feature', + name: 'Test Feature', + app: [], + category: { id: 'foo', label: 'foo' }, + alerting: [ + { ruleTypeId: 'foo', consumers: ['test-feature'] }, + { ruleTypeId: 'bar', consumers: ['test-feature'] }, + { ruleTypeId: 'baz', consumers: ['test-feature'] }, + ], + privileges: null, + reserved: { + description: 'something', + privileges: [ { - groupType: 'independent', - privileges: [ - { - id: 'cool-sub-feature-privilege', - name: 'cool privilege', - includeIn: 'none', - savedObject: { - all: [], - read: [], - }, - ui: [], - alerting: { - alert: { - all: ['bar'], - }, + id: 'reserved', + privilege: { + alerting: { + alert: { + all: [ + { ruleTypeId: 'foo', consumers: ['test-feature'] }, + { ruleTypeId: 'bar', consumers: ['test-feature'] }, + ], }, }, - ], + savedObject: { + all: [], + read: [], + }, + ui: [], + app: [], + }, }, ], }, - ], - }; + }; - const featureRegistry = new FeatureRegistry(); + const featureRegistry = new FeatureRegistry(); - expect(() => - featureRegistry.registerKibanaFeature(feature) - ).toThrowErrorMatchingInlineSnapshot( - `"Feature test-feature specifies alerting entries which are not granted to any privileges: baz"` - ); - }); + expect(() => + featureRegistry.registerKibanaFeature(feature) + ).toThrowErrorMatchingInlineSnapshot( + `"Feature test-feature specifies alerting rule types which are not granted to any privileges: baz"` + ); + }); - it(`prevents reserved privileges from specifying alerting/rule entries that don't exist at the root level`, () => { - const feature: KibanaFeatureConfig = { - id: 'test-feature', - name: 'Test Feature', - app: [], - category: { id: 'foo', label: 'foo' }, - alerting: ['bar'], - privileges: null, - reserved: { - description: 'something', - privileges: [ - { - id: 'reserved', - privilege: { - alerting: { - rule: { - all: ['foo', 'bar', 'baz'], - }, + it(`prevents privileges from specifying rule types without consumers`, () => { + const feature: KibanaFeatureConfig = { + id: 'test-feature', + name: 'Test Feature', + app: [], + category: { id: 'foo', label: 'foo' }, + alerting: [{ ruleTypeId: 'foo', consumers: [] }], + privileges: { + all: { + alerting: { + rule: { + all: [{ ruleTypeId: 'foo', consumers: [] }], }, - savedObject: { - all: [], - read: [], + }, + savedObject: { + all: [], + read: [], + }, + ui: [], + app: [], + }, + read: { + alerting: { + rule: { + read: [{ ruleTypeId: 'foo', consumers: [] }], }, - ui: [], - app: [], }, + savedObject: { + all: [], + read: [], + }, + ui: [], + app: [], }, - ], - }, - }; + }, + }; - const featureRegistry = new FeatureRegistry(); + const featureRegistry = new FeatureRegistry(); - expect(() => - featureRegistry.registerKibanaFeature(feature) - ).toThrowErrorMatchingInlineSnapshot( - `"Feature privilege test-feature.reserved has unknown alerting entries: foo, baz"` - ); - }); + expect(() => + featureRegistry.registerKibanaFeature(feature) + ).toThrowErrorMatchingInlineSnapshot( + `"[alerting.0.consumers]: array size is [0], but cannot be smaller than [1]"` + ); + }); - it(`prevents reserved privileges from specifying alerting/alert entries that don't exist at the root level`, () => { - const feature: KibanaFeatureConfig = { - id: 'test-feature', - name: 'Test Feature', - app: [], - category: { id: 'foo', label: 'foo' }, - alerting: ['bar'], - privileges: null, - reserved: { - description: 'something', - privileges: [ - { - id: 'reserved', - privilege: { - alerting: { - alert: { - all: ['foo', 'bar', 'baz'], - }, + it(`prevents privileges from specifying consumers entries that don't exist at the root level`, () => { + const feature: KibanaFeatureConfig = { + id: 'test-feature', + name: 'Test Feature', + app: [], + category: { id: 'foo', label: 'foo' }, + alerting: [{ ruleTypeId: 'bar', consumers: ['test-feature'] }], + privileges: { + all: { + alerting: { + rule: { + all: [{ ruleTypeId: 'bar', consumers: ['not-exist'] }], + read: [{ ruleTypeId: 'bar', consumers: ['test-feature'] }], }, - savedObject: { - all: [], - read: [], + }, + savedObject: { + all: [], + read: [], + }, + ui: [], + app: [], + }, + read: { + alerting: { + rule: { + read: [{ ruleTypeId: 'bar', consumers: ['test-feature'] }], }, - ui: [], - app: [], }, + savedObject: { + all: [], + read: [], + }, + ui: [], + app: [], }, - ], - }, - }; + }, + }; - const featureRegistry = new FeatureRegistry(); + const featureRegistry = new FeatureRegistry(); - expect(() => - featureRegistry.registerKibanaFeature(feature) - ).toThrowErrorMatchingInlineSnapshot( - `"Feature privilege test-feature.reserved has unknown alerting entries: foo, baz"` - ); - }); + expect(() => + featureRegistry.registerKibanaFeature(feature) + ).toThrowErrorMatchingInlineSnapshot( + `"Feature privilege test-feature.all.bar has unknown consumer: not-exist"` + ); + }); - it(`prevents features from specifying alerting/rule entries that don't exist at the reserved privilege level`, () => { - const feature: KibanaFeatureConfig = { - id: 'test-feature', - name: 'Test Feature', - app: [], - category: { id: 'foo', label: 'foo' }, - alerting: ['foo', 'bar', 'baz'], - privileges: null, - reserved: { - description: 'something', - privileges: [ - { - id: 'reserved', - privilege: { - alerting: { - rule: { - all: ['foo', 'bar'], - }, + it(`prevents features from specifying consumers that don't exist at the privilege level`, () => { + const feature: KibanaFeatureConfig = { + id: 'test-feature', + name: 'Test Feature', + app: [], + category: { id: 'foo', label: 'foo' }, + alerting: [{ ruleTypeId: 'foo', consumers: ['test-feature', 'should-exist', 'foo'] }], + privileges: { + all: { + alerting: { + alert: { + all: [{ ruleTypeId: 'foo', consumers: ['test-feature'] }], }, - savedObject: { - all: [], - read: [], + }, + savedObject: { + all: [], + read: [], + }, + ui: [], + app: [], + }, + read: { + alerting: { + alert: { + all: [{ ruleTypeId: 'foo', consumers: ['test-feature'] }], }, - ui: [], - app: [], }, + savedObject: { + all: [], + read: [], + }, + ui: [], + app: [], + }, + }, + subFeatures: [ + { + name: 'my sub feature', + privilegeGroups: [ + { + groupType: 'independent', + privileges: [ + { + id: 'cool-sub-feature-privilege', + name: 'cool privilege', + includeIn: 'none', + savedObject: { + all: [], + read: [], + }, + ui: [], + alerting: { + alert: { + all: [{ ruleTypeId: 'foo', consumers: ['foo'] }], + }, + }, + }, + ], + }, + ], }, ], - }, - }; + }; - const featureRegistry = new FeatureRegistry(); + const featureRegistry = new FeatureRegistry(); - expect(() => - featureRegistry.registerKibanaFeature(feature) - ).toThrowErrorMatchingInlineSnapshot( - `"Feature test-feature specifies alerting entries which are not granted to any privileges: baz"` - ); - }); + expect(() => + featureRegistry.registerKibanaFeature(feature) + ).toThrowErrorMatchingInlineSnapshot( + `"Feature test-feature specifies alerting consumers which are not granted to any privileges: should-exist"` + ); + }); - it(`prevents features from specifying alerting/alert entries that don't exist at the reserved privilege level`, () => { - const feature: KibanaFeatureConfig = { - id: 'test-feature', - name: 'Test Feature', - app: [], - category: { id: 'foo', label: 'foo' }, - alerting: ['foo', 'bar', 'baz'], - privileges: null, - reserved: { - description: 'something', - privileges: [ - { - id: 'reserved', - privilege: { - alerting: { - alert: { - all: ['foo', 'bar'], + it(`prevents reserved privileges from specifying consumers that don't exist at the root level`, () => { + const feature: KibanaFeatureConfig = { + id: 'test-feature', + name: 'Test Feature', + app: [], + category: { id: 'foo', label: 'foo' }, + alerting: [{ ruleTypeId: 'bar', consumers: ['test-feature'] }], + privileges: null, + reserved: { + description: 'something', + privileges: [ + { + id: 'reserved', + privilege: { + alerting: { + rule: { + all: [{ ruleTypeId: 'bar', consumers: ['not-exist'] }], + }, + }, + savedObject: { + all: [], + read: [], }, + ui: [], + app: [], }, - savedObject: { - all: [], - read: [], + }, + ], + }, + }; + + const featureRegistry = new FeatureRegistry(); + + expect(() => + featureRegistry.registerKibanaFeature(feature) + ).toThrowErrorMatchingInlineSnapshot( + `"Feature privilege test-feature.reserved.bar has unknown consumer: not-exist"` + ); + }); + + it(`prevents features from specifying consumers that don't exist at the reserved privilege level`, () => { + const feature: KibanaFeatureConfig = { + id: 'test-feature', + name: 'Test Feature', + app: [], + category: { id: 'foo', label: 'foo' }, + alerting: [{ ruleTypeId: 'foo', consumers: ['test-feature', 'should-exist'] }], + privileges: null, + reserved: { + description: 'something', + privileges: [ + { + id: 'reserved', + privilege: { + alerting: { + rule: { + all: [{ ruleTypeId: 'foo', consumers: ['test-feature'] }], + }, + }, + savedObject: { + all: [], + read: [], + }, + ui: [], + app: [], }, - ui: [], - app: [], }, - }, - ], - }, - }; + ], + }, + }; - const featureRegistry = new FeatureRegistry(); + const featureRegistry = new FeatureRegistry(); - expect(() => - featureRegistry.registerKibanaFeature(feature) - ).toThrowErrorMatchingInlineSnapshot( - `"Feature test-feature specifies alerting entries which are not granted to any privileges: baz"` - ); + expect(() => + featureRegistry.registerKibanaFeature(feature) + ).toThrowErrorMatchingInlineSnapshot( + `"Feature test-feature specifies alerting consumers which are not granted to any privileges: should-exist"` + ); + }); }); it(`prevents privileges from specifying cases entries that don't exist at the root level`, () => { @@ -2068,11 +2352,15 @@ describe('FeatureRegistry', () => { all: { ui: [], savedObject: { all: [], read: [] }, - alerting: { alert: { all: ['one'] } }, + alerting: { + alert: { + all: [{ ruleTypeId: 'one', consumers: ['featureE'] }], + }, + }, }, read: { ui: [], savedObject: { all: [], read: [] } }, }, - alerting: ['one'], + alerting: [{ ruleTypeId: 'one', consumers: ['featureE'] }], }, ]; features.forEach((f) => registry.registerKibanaFeature(f)); diff --git a/x-pack/plugins/features/server/feature_schema.ts b/x-pack/plugins/features/server/feature_schema.ts index ce444c41e477d..3923eb31dbecb 100644 --- a/x-pack/plugins/features/server/feature_schema.ts +++ b/x-pack/plugins/features/server/feature_schema.ts @@ -11,6 +11,7 @@ import { difference } from 'lodash'; import { Capabilities as UICapabilities } from '@kbn/core/server'; import { KibanaFeatureConfig, KibanaFeatureScope } from '../common'; import { FeatureKibanaPrivileges, ElasticsearchFeatureConfig } from '.'; +import { AlertingKibanaPrivilege } from '../common/alerting_kibana_privilege'; // Each feature gets its own property on the UICapabilities object, // but that object has a few built-in properties which should not be overwritten. @@ -63,7 +64,13 @@ const managementSchema = schema.recordOf( listOfCapabilitiesSchema ); const catalogueSchema = listOfCapabilitiesSchema; -const alertingSchema = schema.arrayOf(schema.string()); +const alertingSchema = schema.arrayOf( + schema.object({ + ruleTypeId: schema.string(), + consumers: schema.arrayOf(schema.string(), { minSize: 1 }), + }) +); + const casesSchema = schema.arrayOf(schema.string()); const appCategorySchema = schema.object({ @@ -331,7 +338,14 @@ export function validateKibanaFeature(feature: KibanaFeatureConfig) { const unseenCatalogue = new Set(catalogue); - const unseenAlertTypes = new Set(alerting); + const alertingMap = new Map( + alerting.map(({ ruleTypeId, consumers }) => [ruleTypeId, new Set(consumers)]) + ); + + const unseenAlertingRyleTypeIds = new Set(alertingMap.keys()); + const unseenAlertingConsumers = new Set( + alerting.flatMap(({ consumers }) => Array.from(consumers.values())) + ); const unseenCasesTypes = new Set(cases); @@ -362,20 +376,40 @@ export function validateKibanaFeature(feature: KibanaFeatureConfig) { } function validateAlertingEntry(privilegeId: string, entry: FeatureKibanaPrivileges['alerting']) { - const all: string[] = [...(entry?.rule?.all ?? []), ...(entry?.alert?.all ?? [])]; - const read: string[] = [...(entry?.rule?.read ?? []), ...(entry?.alert?.read ?? [])]; + const seenRuleTypeIds = new Set(); + const seenConsumers = new Set(); + + const validateAlertingPrivilege = (alertingPrivilege?: AlertingKibanaPrivilege) => { + for (const { ruleTypeId, consumers } of alertingPrivilege ?? []) { + if (!alertingMap.has(ruleTypeId)) { + throw new Error( + `Feature privilege ${feature.id}.${privilegeId} has unknown ruleTypeId: ${ruleTypeId}` + ); + } + + const alertingMapConsumers = alertingMap.get(ruleTypeId)!; + + for (const consumer of consumers) { + if (!alertingMapConsumers.has(consumer)) { + throw new Error( + `Feature privilege ${feature.id}.${privilegeId}.${ruleTypeId} has unknown consumer: ${consumer}` + ); + } - all.forEach((privilegeAlertTypes) => unseenAlertTypes.delete(privilegeAlertTypes)); - read.forEach((privilegeAlertTypes) => unseenAlertTypes.delete(privilegeAlertTypes)); + seenConsumers.add(consumer); + } - const unknownAlertingEntries = difference([...all, ...read], alerting); - if (unknownAlertingEntries.length > 0) { - throw new Error( - `Feature privilege ${ - feature.id - }.${privilegeId} has unknown alerting entries: ${unknownAlertingEntries.join(', ')}` - ); - } + seenRuleTypeIds.add(ruleTypeId); + } + }; + + validateAlertingPrivilege(entry?.rule?.all); + validateAlertingPrivilege(entry?.rule?.read); + validateAlertingPrivilege(entry?.alert?.all); + validateAlertingPrivilege(entry?.alert?.read); + + seenRuleTypeIds.forEach((ruleTypeId: string) => unseenAlertingRyleTypeIds.delete(ruleTypeId)); + seenConsumers.forEach((consumer: string) => unseenAlertingConsumers.delete(consumer)); } function validateCasesEntry(privilegeId: string, entry: FeatureKibanaPrivileges['cases']) { @@ -510,12 +544,22 @@ export function validateKibanaFeature(feature: KibanaFeatureConfig) { ); } - if (unseenAlertTypes.size > 0) { + if (unseenAlertingRyleTypeIds.size > 0) { + throw new Error( + `Feature ${ + feature.id + } specifies alerting rule types which are not granted to any privileges: ${Array.from( + unseenAlertingRyleTypeIds.keys() + ).join(',')}` + ); + } + + if (unseenAlertingConsumers.size > 0) { throw new Error( `Feature ${ feature.id - } specifies alerting entries which are not granted to any privileges: ${Array.from( - unseenAlertTypes.values() + } specifies alerting consumers which are not granted to any privileges: ${Array.from( + unseenAlertingConsumers.keys() ).join(',')}` ); } diff --git a/x-pack/plugins/features/server/oss_features.ts b/x-pack/plugins/features/server/oss_features.ts index 19001fe19547e..12978c35777e7 100644 --- a/x-pack/plugins/features/server/oss_features.ts +++ b/x-pack/plugins/features/server/oss_features.ts @@ -37,7 +37,7 @@ export const buildOSSFeatures = ({ privileges: { all: { app: ['discover', 'kibana'], - api: ['fileUpload:analyzeFile'], + api: ['fileUpload:analyzeFile', 'savedQuery:manage', 'savedQuery:read'], catalogue: ['discover'], savedObject: { all: ['search', 'query'], @@ -53,6 +53,7 @@ export const buildOSSFeatures = ({ read: ['index-pattern', 'search', 'query'], }, ui: ['show'], + api: ['savedQuery:read'], }, }, subFeatures: [ @@ -139,6 +140,7 @@ export const buildOSSFeatures = ({ read: ['index-pattern', 'search', 'tag'], }, ui: ['show', 'delete', 'save', 'saveQuery'], + api: ['savedQuery:manage', 'savedQuery:read'], }, read: { app: ['visualize', 'lens', 'kibana'], @@ -148,6 +150,7 @@ export const buildOSSFeatures = ({ read: ['index-pattern', 'search', 'visualization', 'query', 'lens', 'tag'], }, ui: ['show'], + api: ['savedQuery:read'], }, }, subFeatures: [ @@ -213,7 +216,12 @@ export const buildOSSFeatures = ({ ], }, ui: ['createNew', 'show', 'showWriteControls', 'saveQuery'], - api: ['bulkGetUserProfiles', 'dashboardUsageStats'], + api: [ + 'bulkGetUserProfiles', + 'dashboardUsageStats', + 'savedQuery:manage', + 'savedQuery:read', + ], }, read: { app: ['dashboards', 'kibana'], @@ -234,7 +242,7 @@ export const buildOSSFeatures = ({ ], }, ui: ['show'], - api: ['bulkGetUserProfiles', 'dashboardUsageStats'], + api: ['bulkGetUserProfiles', 'dashboardUsageStats', 'savedQuery:read'], }, }, subFeatures: [ @@ -401,6 +409,7 @@ export const buildOSSFeatures = ({ read: [], }, ui: ['save'], + api: ['indexPatterns:manage'], }, read: { app: ['kibana'], @@ -544,7 +553,7 @@ export const buildOSSFeatures = ({ catalogue: [], privilegesTooltip: i18n.translate('xpack.features.savedQueryManagementTooltip', { defaultMessage: - 'If set to "All", saved queries can be managed across Kibana in all applications that support them. If set to "None", saved query privileges will be determined independently by each application.', + 'If set to "All", saved queries can be managed across Kibana in all applications that support them. Otherwise, saved query privileges will be determined independently by each application.', }), privileges: { all: { @@ -555,9 +564,16 @@ export const buildOSSFeatures = ({ read: [], }, ui: ['saveQuery'], + api: ['savedQuery:manage', 'savedQuery:read'], + }, + read: { + savedObject: { + all: [], + read: ['query'], + }, + ui: [], + api: ['savedQuery:read'], }, - // No read-only mode supported - read: { disabled: true, savedObject: { all: [], read: [] }, ui: [] }, }, }, ]; diff --git a/x-pack/plugins/fleet/common/services/package_to_package_policy.test.ts b/x-pack/plugins/fleet/common/services/package_to_package_policy.test.ts index 0918fcaa08d7f..8f96c3ffc197d 100644 --- a/x-pack/plugins/fleet/common/services/package_to_package_policy.test.ts +++ b/x-pack/plugins/fleet/common/services/package_to_package_policy.test.ts @@ -469,6 +469,45 @@ describe('Fleet - packageToPackagePolicy', () => { }); }); + it('returns package policy with inputs variables', () => { + const mockPackageWithPolicyTemplates = { + ...mockPackage, + policy_templates: [ + { inputs: [{ type: 'foo' }] }, + { inputs: [{ type: 'bar', vars: [{ default: 'bar-var-value', name: 'var-name' }] }] }, + ], + } as unknown as PackageInfo; + + expect( + packageToPackagePolicy( + mockPackageWithPolicyTemplates, + 'policy-id-1', + 'default', + 'pkgPolicy-1' + ) + ).toEqual({ + policy_id: 'policy-id-1', + policy_ids: ['policy-id-1'], + namespace: 'default', + enabled: true, + inputs: [ + { type: 'foo', enabled: true, streams: [] }, + { + type: 'bar', + enabled: true, + streams: [], + vars: { 'var-name': { value: 'bar-var-value' } }, + }, + ], + name: 'pkgPolicy-1', + package: { + name: 'mock-package', + title: 'Mock package', + version: '0.0.0', + }, + }); + }); + it('returns package policy with multiple policy templates (aka has integrations', () => { expect( packageToPackagePolicy( diff --git a/x-pack/plugins/fleet/common/services/package_to_package_policy.ts b/x-pack/plugins/fleet/common/services/package_to_package_policy.ts index a830cfd903007..6aed76b0a115b 100644 --- a/x-pack/plugins/fleet/common/services/package_to_package_policy.ts +++ b/x-pack/plugins/fleet/common/services/package_to_package_policy.ts @@ -147,9 +147,7 @@ export const packageToPackagePolicyInputs = ( return stream; }); - // If non-integration package, collect input-level vars, otherwise skip them, - // we do not support input-level vars for packages with integrations yet) - if (packageInput.vars?.length && !hasIntegrations) { + if (packageInput.vars?.length) { varsForInput = packageInput.vars.reduce(varsReducer, {}); } diff --git a/x-pack/plugins/fleet/common/types/models/agent_policy.ts b/x-pack/plugins/fleet/common/types/models/agent_policy.ts index fb19953a1f731..0d180a0f4935a 100644 --- a/x-pack/plugins/fleet/common/types/models/agent_policy.ts +++ b/x-pack/plugins/fleet/common/types/models/agent_policy.ts @@ -46,7 +46,7 @@ export interface NewAgentPolicy { global_data_tags?: GlobalDataTag[]; monitoring_pprof_enabled?: boolean; monitoring_http?: { - enabled: boolean; + enabled?: boolean; host?: string; port?: number; buffer?: { diff --git a/x-pack/plugins/fleet/cypress/e2e/space_awareness/policies.cy.ts b/x-pack/plugins/fleet/cypress/e2e/space_awareness/policies.cy.ts index 8975de388248c..010f147882482 100644 --- a/x-pack/plugins/fleet/cypress/e2e/space_awareness/policies.cy.ts +++ b/x-pack/plugins/fleet/cypress/e2e/space_awareness/policies.cy.ts @@ -28,6 +28,7 @@ describe('Space aware policies creation', { testIsolation: false }, () => { beforeEach(() => { cy.intercept('GET', /\/api\/fleet\/agent_policies/).as('getAgentPolicies'); + cy.intercept('PUT', /\/api\/fleet\/agent_policies\/.*/).as('putAgentPolicy'); cy.intercept('GET', /\/internal\/fleet\/agent_policies_spaces/).as('getAgentPoliciesSpaces'); }); @@ -59,6 +60,7 @@ describe('Space aware policies creation', { testIsolation: false }, () => { cy.getBySel(AGENT_POLICY_DETAILS_PAGE.SPACE_SELECTOR_COMBOBOX).click().type('default{enter}'); cy.getBySel(AGENT_POLICY_DETAILS_PAGE.SAVE_BUTTON).click(); + cy.wait('@putAgentPolicy'); }); it('the policy should be visible in the test space', () => { @@ -72,4 +74,22 @@ describe('Space aware policies creation', { testIsolation: false }, () => { cy.wait('@getAgentPolicies'); cy.getBySel(AGENT_POLICIES_TABLE).contains(POLICY_NAME); }); + + it('should redirect to the agent policies list when removing the current space from a policy', () => { + cy.visit('/s/test/app/fleet/policies'); + cy.getBySel(AGENT_POLICIES_TABLE).contains(POLICY_NAME).click(); + + cy.getBySel(AGENT_POLICY_DETAILS_PAGE.SETTINGS_TAB).click(); + cy.wait('@getAgentPoliciesSpaces'); + + cy.get('[title="Remove Test from selection in this group"]').click(); + + cy.getBySel(AGENT_POLICY_DETAILS_PAGE.SAVE_BUTTON).click(); + cy.wait('@putAgentPolicy'); + + cy.wait('@getAgentPolicies'); + cy.location('pathname').should('eq', '/s/test/app/fleet/policies'); + + cy.getBySel(AGENT_POLICIES_TABLE).contains(NO_AGENT_POLICIES); + }); }); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx index e0ea955cf5afe..50baac84ff4a0 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx @@ -18,9 +18,10 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; +import { DEFAULT_SPACE_ID } from '@kbn/spaces-plugin/common'; +import { useHistory } from 'react-router-dom'; import { useSpaceSettingsContext } from '../../../../../../../hooks/use_space_settings_context'; - import type { AgentPolicy } from '../../../../../types'; import { useStartServices, @@ -30,6 +31,8 @@ import { sendGetAgentStatus, useAgentPolicyRefresh, useBreadcrumbs, + useFleetStatus, + useLink, } from '../../../../../hooks'; import { AgentPolicyForm, @@ -79,14 +82,17 @@ export const SettingsView = memo<{ agentPolicy: AgentPolicy }>( ({ agentPolicy: originalAgentPolicy }) => { useBreadcrumbs('policy_details', { policyName: originalAgentPolicy.name }); const { notifications } = useStartServices(); + const { spaceId } = useFleetStatus(); const { agents: { enabled: isFleetEnabled }, } = useConfig(); + const { getPath } = useLink(); const hasAllAgentPoliciesPrivileges = useAuthz().fleet.allAgentPolicies; const refreshAgentPolicy = useAgentPolicyRefresh(); const [agentPolicy, setAgentPolicy] = useState({ ...originalAgentPolicy, }); + const history = useHistory(); const spaceSettings = useSpaceSettingsContext(); const [isLoading, setIsLoading] = useState(false); @@ -121,8 +127,15 @@ export const SettingsView = memo<{ agentPolicy: AgentPolicy }>( values: { name: agentPolicy.name }, }) ); - refreshAgentPolicy(); - setHasChanges(false); + if ( + agentPolicy.space_ids && + !agentPolicy.space_ids.includes(spaceId ?? DEFAULT_SPACE_ID) + ) { + history.replace(getPath('policies_list')); + } else { + refreshAgentPolicy(); + setHasChanges(false); + } } else { notifications.toasts.addDanger( error diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/agent_policy_outputs_summary.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/agent_policy_outputs_summary.test.tsx index 255b2efb94026..b56494311f6a9 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/agent_policy_outputs_summary.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/agent_policy_outputs_summary.test.tsx @@ -15,7 +15,8 @@ import type { OutputsForAgentPolicy } from '../../../../../../../common/types'; import { AgentPolicyOutputsSummary } from './agent_policy_outputs_summary'; -describe('MultipleAgentPolicySummaryLine', () => { +// FLAKY: https://github.com/elastic/kibana/issues/200819 +describe.skip('MultipleAgentPolicySummaryLine', () => { let testRenderer: TestRenderer; const outputsForPolicy: OutputsForAgentPolicy = { agentPolicyId: 'policy-1', diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/multi_row_input/index.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/multi_row_input/index.test.tsx index f3fcdfabc7722..bfd9028f5d0ce 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/multi_row_input/index.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/multi_row_input/index.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { fireEvent, act } from '@testing-library/react'; +import { fireEvent, waitFor } from '@testing-library/react'; import { createFleetTestRendererMock } from '../../../../../../mock'; @@ -44,13 +44,9 @@ test('it should allow to add a new host', async () => { test('it should allow to remove an host', async () => { const { utils, mockOnChange } = renderInput(['http://host1.com', 'http://host2.com']); - await act(async () => { - const deleteRowEl = await utils.container.querySelector('[aria-label="Delete row"]'); - if (!deleteRowEl) { - throw new Error('Delete row button not found'); - } - fireEvent.click(deleteRowEl); - }); + const deleteRowEl = await utils.container.querySelector('[aria-label="Delete row"]'); + expect(deleteRowEl).not.toBeNull(); + fireEvent.click(deleteRowEl!); expect(mockOnChange).toHaveBeenCalledWith(['http://host2.com']); }); @@ -95,7 +91,7 @@ test('Should display errors in order', async () => { { message: 'Error 3', index: 2 }, ] ); - await act(async () => { + await waitFor(async () => { const errors = await utils.queryAllByText(/Error [1-3]/); expect(errors[0]).toHaveTextContent('Error 1'); expect(errors[1]).toHaveTextContent('Error 2'); @@ -126,18 +122,14 @@ test('Should remove error when item deleted', async () => { ); }); - await act(async () => { - const deleteRowButtons = await utils.container.querySelectorAll('[aria-label="Delete row"]'); - if (deleteRowButtons.length !== 3) { - throw new Error('Delete row buttons not found'); - } + const deleteRowButtons = await utils.container.querySelectorAll('[aria-label="Delete row"]'); + expect(deleteRowButtons.length).toEqual(3); - fireEvent.click(deleteRowButtons[1]); - expect(mockOnChange).toHaveBeenCalled(); + fireEvent.click(deleteRowButtons[1]); + expect(mockOnChange).toHaveBeenCalled(); - const renderedErrors = await utils.queryAllByText(/Error [1-3]/); - expect(renderedErrors).toHaveLength(2); - expect(renderedErrors[0]).toHaveTextContent('Error 1'); - expect(renderedErrors[1]).toHaveTextContent('Error 3'); - }); + const renderedErrors = await utils.queryAllByText(/Error [1-3]/); + expect(renderedErrors).toHaveLength(2); + expect(renderedErrors[0]).toHaveTextContent('Error 1'); + expect(renderedErrors[1]).toHaveTextContent('Error 3'); }); diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.test.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.test.tsx index 6c9be4796f205..400c5f3a5aa6d 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.test.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.test.tsx @@ -7,7 +7,7 @@ import React, { lazy, memo } from 'react'; import { Route } from '@kbn/shared-ux-router'; -import { act, cleanup } from '@testing-library/react'; +import { act } from '@testing-library/react'; import { INTEGRATIONS_ROUTING_PATHS, pagePathGetters } from '../../../../constants'; import type { @@ -65,10 +65,6 @@ describe('When on integration detail', () => { act(() => testRenderer.mountHistory.push(detailPageUrlPath)); }); - afterEach(() => { - cleanup(); - }); - describe('and the package is installed', () => { beforeEach(async () => { await render(); diff --git a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/agent_enrollment_flyout.test.tsx b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/agent_enrollment_flyout.test.tsx index 19709c55665fc..13ecfc2282226 100644 --- a/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/agent_enrollment_flyout.test.tsx +++ b/x-pack/plugins/fleet/public/components/agent_enrollment_flyout/agent_enrollment_flyout.test.tsx @@ -8,7 +8,7 @@ import './agent_enrollment_flyout.test.mocks'; import React from 'react'; -import { act, cleanup, fireEvent, waitFor } from '@testing-library/react'; +import { fireEvent, waitFor } from '@testing-library/react'; import type { RenderResult } from '@testing-library/react'; import { createFleetTestRendererMock } from '../../mock'; @@ -23,11 +23,8 @@ import type { FlyOutProps } from './types'; import { AgentEnrollmentFlyout } from '.'; const render = (props?: Partial) => { - cleanup(); const renderer = createFleetTestRendererMock(); - const results = renderer.render(); - - return results; + return renderer.render(); }; const testAgentPolicy: AgentPolicy = { @@ -46,7 +43,7 @@ const testAgentPolicy: AgentPolicy = { describe('', () => { let results: RenderResult; - beforeEach(async () => { + beforeEach(() => { jest.mocked(useAuthz).mockReturnValue({ fleet: { readAgentPolicies: true, @@ -88,10 +85,6 @@ describe('', () => { agentPolicies: [{ id: 'fleet-server-policy' } as AgentPolicy], refreshAgentPolicies: jest.fn(), }); - - act(() => { - results = render(); - }); }); afterEach(() => { @@ -113,6 +106,8 @@ describe('', () => { describe('managed instructions', () => { it('uses the agent policy selection step', () => { + results = render(); + expect(results.queryByTestId('agentEnrollmentFlyout')).not.toBeNull(); expect(results.queryByTestId('agent-policy-selection-step')).not.toBeNull(); expect(results.queryByTestId('agent-enrollment-key-selection-step')).toBeNull(); @@ -154,24 +149,22 @@ describe('', () => { describe('standalone instructions', () => { function goToStandaloneTab() { - act(() => { - fireEvent.click(results.getByTestId('standaloneTab')); - }); + fireEvent.click(results.getByTestId('standaloneTab')); } - beforeEach(() => { + it('uses the agent policy selection step', async () => { results = render({ isIntegrationFlow: true, }); - }); - it('uses the agent policy selection step', async () => { goToStandaloneTab(); - expect(results.queryByTestId('agentEnrollmentFlyout')).not.toBeNull(); - expect(results.queryByTestId('agent-policy-selection-step')).not.toBeNull(); - expect(results.queryByTestId('agent-enrollment-key-selection-step')).toBeNull(); - expect(results.queryByTestId('configure-standalone-step')).not.toBeNull(); + await waitFor(() => { + expect(results.queryByTestId('agentEnrollmentFlyout')).not.toBeNull(); + expect(results.queryByTestId('agent-policy-selection-step')).not.toBeNull(); + expect(results.queryByTestId('agent-enrollment-key-selection-step')).toBeNull(); + expect(results.queryByTestId('configure-standalone-step')).not.toBeNull(); + }); }); describe('with a specific policy', () => { @@ -185,13 +178,15 @@ describe('', () => { }); }); - it('does not use either of the agent policy selection or enrollment key steps', () => { + it('does not use either of the agent policy selection or enrollment key steps', async () => { goToStandaloneTab(); - expect(results.queryByTestId('agentEnrollmentFlyout')).not.toBeNull(); - expect(results.queryByTestId('agent-policy-selection-step')).toBeNull(); - expect(results.queryByTestId('agent-enrollment-key-selection-step')).toBeNull(); - expect(results.queryByTestId('configure-standalone-step')).not.toBeNull(); + await waitFor(() => { + expect(results.queryByTestId('agentEnrollmentFlyout')).not.toBeNull(); + expect(results.queryByTestId('agent-policy-selection-step')).toBeNull(); + expect(results.queryByTestId('agent-enrollment-key-selection-step')).toBeNull(); + expect(results.queryByTestId('configure-standalone-step')).not.toBeNull(); + }); }); }); }); diff --git a/x-pack/plugins/fleet/public/components/enrollment_instructions/root_privileges_callout.test.tsx b/x-pack/plugins/fleet/public/components/enrollment_instructions/root_privileges_callout.test.tsx index 86cbd1a1a5a10..6cf1f68673ac7 100644 --- a/x-pack/plugins/fleet/public/components/enrollment_instructions/root_privileges_callout.test.tsx +++ b/x-pack/plugins/fleet/public/components/enrollment_instructions/root_privileges_callout.test.tsx @@ -7,16 +7,14 @@ import React from 'react'; -import { cleanup, waitFor } from '@testing-library/react'; +import { waitFor } from '@testing-library/react'; import { createFleetTestRendererMock } from '../../mock'; import { RootPrivilegesCallout } from './root_privileges_callout'; -// FLAKY: https://github.com/elastic/kibana/issues/201210 -describe.skip('RootPrivilegesCallout', () => { +describe('RootPrivilegesCallout', () => { function render(rootIntegrations?: Array<{ name: string; title: string }>) { - cleanup(); const renderer = createFleetTestRendererMock(); const results = renderer.render(); diff --git a/x-pack/plugins/fleet/public/components/multiple_agent_policy_summary_line.test.tsx b/x-pack/plugins/fleet/public/components/multiple_agent_policy_summary_line.test.tsx index b14caf7a73517..22efe3f84d435 100644 --- a/x-pack/plugins/fleet/public/components/multiple_agent_policy_summary_line.test.tsx +++ b/x-pack/plugins/fleet/public/components/multiple_agent_policy_summary_line.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { act, fireEvent } from '@testing-library/react'; +import { fireEvent, waitFor } from '@testing-library/react'; import React from 'react'; import type { TestRenderer } from '../mock'; @@ -15,8 +15,7 @@ import type { AgentPolicy } from '../types'; import { MultipleAgentPoliciesSummaryLine } from './multiple_agent_policy_summary_line'; -// FLAKY: https://github.com/elastic/kibana/issues/200786 -describe.skip('MultipleAgentPolicySummaryLine', () => { +describe('MultipleAgentPolicySummaryLine', () => { let testRenderer: TestRenderer; const render = (agentPolicies: AgentPolicy[]) => @@ -32,7 +31,7 @@ describe.skip('MultipleAgentPolicySummaryLine', () => { testRenderer = createFleetTestRendererMock(); }); - test('it should only render the policy name when there is only one policy', async () => { + test('it should only render the policy name when there is only one policy', () => { const results = render([{ name: 'Test policy', revision: 2 }] as AgentPolicy[]); expect(results.container.textContent).toBe('Test policyrev. 2'); expect(results.queryByTestId('agentPolicyNameLink')).toBeInTheDocument(); @@ -49,19 +48,18 @@ describe.skip('MultipleAgentPolicySummaryLine', () => { expect(results.queryByTestId('agentPoliciesNumberBadge')).toBeInTheDocument(); expect(results.container.textContent).toBe('Test policy 1+2'); - await act(async () => { - fireEvent.click(results.getByTestId('agentPoliciesNumberBadge')); - }); - expect(results.queryByTestId('agentPoliciesPopover')).toBeInTheDocument(); - expect(results.queryByTestId('agentPoliciesPopoverButton')).toBeInTheDocument(); - expect(results.queryByTestId('policy-0001')).toBeInTheDocument(); - expect(results.queryByTestId('policy-0002')).toBeInTheDocument(); - expect(results.queryByTestId('policy-0003')).toBeInTheDocument(); + fireEvent.click(results.getByTestId('agentPoliciesNumberBadge')); - await act(async () => { - fireEvent.click(results.getByTestId('agentPoliciesPopoverButton')); + await waitFor(() => { + expect(results.queryByTestId('agentPoliciesPopover')).toBeInTheDocument(); + expect(results.queryByTestId('agentPoliciesPopoverButton')).toBeInTheDocument(); + expect(results.queryByTestId('policy-0001')).toBeInTheDocument(); + expect(results.queryByTestId('policy-0002')).toBeInTheDocument(); + expect(results.queryByTestId('policy-0003')).toBeInTheDocument(); }); + fireEvent.click(results.getByTestId('agentPoliciesPopoverButton')); + expect(results.queryByTestId('manageAgentPoliciesModal')).toBeInTheDocument(); }); }); diff --git a/x-pack/plugins/fleet/public/components/package_policy_actions_menu.test.tsx b/x-pack/plugins/fleet/public/components/package_policy_actions_menu.test.tsx index b7759438986d5..3c4b2c7f1bf3e 100644 --- a/x-pack/plugins/fleet/public/components/package_policy_actions_menu.test.tsx +++ b/x-pack/plugins/fleet/public/components/package_policy_actions_menu.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; -import { act } from '@testing-library/react'; +import { waitFor } from '@testing-library/react'; import type { AgentPolicy, InMemoryPackagePolicy } from '../types'; import { createIntegrationsTestRendererMock } from '../mock'; @@ -109,8 +109,8 @@ function createMockPackagePolicy( ...props, }; } -// FLAKY: https://github.com/elastic/kibana/issues/191804 -describe.skip('PackagePolicyActionsMenu', () => { + +describe('PackagePolicyActionsMenu', () => { beforeAll(() => { useMultipleAgentPoliciesMock.mockReturnValue({ canUseMultipleAgentPolicies: false }); }); @@ -119,7 +119,8 @@ describe.skip('PackagePolicyActionsMenu', () => { const agentPolicies = createMockAgentPolicies(); const packagePolicy = createMockPackagePolicy({ hasUpgrade: false }); const { utils } = renderMenu({ agentPolicies, packagePolicy }); - await act(async () => { + + await waitFor(() => { expect(utils.queryByTestId('PackagePolicyActionsUpgradeItem')).toBeNull(); }); }); @@ -129,7 +130,7 @@ describe.skip('PackagePolicyActionsMenu', () => { const packagePolicy = createMockPackagePolicy({ hasUpgrade: true }); const { utils } = renderMenu({ agentPolicies, packagePolicy }); - await act(async () => { + await waitFor(() => { const upgradeButton = utils.getByTestId('PackagePolicyActionsUpgradeItem'); expect(upgradeButton).not.toBeDisabled(); }); @@ -140,7 +141,7 @@ describe.skip('PackagePolicyActionsMenu', () => { const packagePolicy = createMockPackagePolicy({ hasUpgrade: true }); const { utils } = renderMenu({ agentPolicies, packagePolicy }); - await act(async () => { + await waitFor(() => { const upgradeButton = utils.getByTestId('PackagePolicyActionsUpgradeItem'); expect(upgradeButton).toBeDisabled(); }); @@ -150,7 +151,7 @@ describe.skip('PackagePolicyActionsMenu', () => { const agentPolicies = createMockAgentPolicies({ is_managed: true }); const packagePolicy = createMockPackagePolicy(); const { utils } = renderMenu({ agentPolicies, packagePolicy }); - await act(async () => { + await waitFor(() => { expect(utils.queryByText('Delete integration')).toBeNull(); }); }); @@ -159,7 +160,7 @@ describe.skip('PackagePolicyActionsMenu', () => { const agentPolicies = createMockAgentPolicies({ is_managed: false }); const packagePolicy = createMockPackagePolicy(); const { utils } = renderMenu({ agentPolicies, packagePolicy }); - await act(async () => { + await waitFor(() => { expect(utils.queryByText('Delete integration')).not.toBeNull(); }); }); @@ -168,7 +169,7 @@ describe.skip('PackagePolicyActionsMenu', () => { const agentPolicies = createMockAgentPolicies({ is_managed: false, supports_agentless: true }); const packagePolicy = createMockPackagePolicy(); const { utils } = renderMenu({ agentPolicies, packagePolicy }); - await act(async () => { + await waitFor(() => { expect(utils.queryByText('Delete integration')).not.toBeNull(); }); }); @@ -177,7 +178,7 @@ describe.skip('PackagePolicyActionsMenu', () => { const agentPolicies = createMockAgentPolicies(); const packagePolicy = createMockPackagePolicy({ hasUpgrade: true }); const { utils } = renderMenu({ agentPolicies, packagePolicy, showAddAgent: true }); - await act(async () => { + await waitFor(() => { expect(utils.queryByText('Add agent')).not.toBeNull(); }); }); @@ -186,7 +187,7 @@ describe.skip('PackagePolicyActionsMenu', () => { const agentPolicies = createMockAgentPolicies({ is_managed: true }); const packagePolicy = createMockPackagePolicy({ hasUpgrade: true }); const { utils } = renderMenu({ agentPolicies, packagePolicy, showAddAgent: true }); - await act(async () => { + await waitFor(() => { expect(utils.queryByText('Add agent')).toBeNull(); }); }); @@ -195,7 +196,7 @@ describe.skip('PackagePolicyActionsMenu', () => { const agentPolicies = createMockAgentPolicies({ supports_agentless: true }); const packagePolicy = createMockPackagePolicy({ hasUpgrade: true }); const { utils } = renderMenu({ agentPolicies, packagePolicy, showAddAgent: true }); - await act(async () => { + await waitFor(() => { expect(utils.queryByText('Add agent')).toBeNull(); }); }); @@ -204,7 +205,7 @@ describe.skip('PackagePolicyActionsMenu', () => { const agentPolicies = createMockAgentPolicies(); const packagePolicy = createMockPackagePolicy(); const { utils } = renderMenu({ agentPolicies, packagePolicy }); - await act(async () => { + await waitFor(() => { const editButton = utils.getByTestId('PackagePolicyActionsEditItem'); expect(editButton).not.toHaveAttribute('disabled'); expect(editButton).toHaveAttribute('href'); @@ -227,7 +228,7 @@ describe.skip('PackagePolicyActionsMenu', () => { agentPolicies: [], packagePolicy, }); - await act(async () => { + await waitFor(() => { const editButton = utils.getByTestId('PackagePolicyActionsEditItem'); expect(editButton).not.toHaveAttribute('disabled'); expect(editButton).toHaveAttribute('href'); diff --git a/x-pack/plugins/fleet/public/components/package_policy_delete_provider.test.tsx b/x-pack/plugins/fleet/public/components/package_policy_delete_provider.test.tsx index a71172411ef9d..d76f13ee78811 100644 --- a/x-pack/plugins/fleet/public/components/package_policy_delete_provider.test.tsx +++ b/x-pack/plugins/fleet/public/components/package_policy_delete_provider.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; -import { act, fireEvent } from '@testing-library/react'; +import { fireEvent, waitFor } from '@testing-library/react'; import { EuiContextMenuItem } from '@elastic/eui'; @@ -24,13 +24,15 @@ jest.mock('../hooks', () => { useMultipleAgentPolicies: jest.fn(), useStartServices: jest.fn().mockReturnValue({ notifications: { - toasts: { addSuccess: jest.fn() }, + toasts: { addSuccess: jest.fn(), addDanger: jest.fn() }, }, }), sendGetAgents: jest.fn(), useConfig: jest.fn().mockReturnValue({ agents: { enabled: true }, }), + sendDeletePackagePolicy: jest.fn().mockResolvedValue({ data: [] }), + sendDeleteAgentPolicy: jest.fn().mockResolvedValue({ data: [] }), }; }); @@ -56,6 +58,7 @@ function renderMenu({ onClick={() => { deletePackagePoliciesPrompt(packagePolicyIds, () => {}); }} + data-test-subj="deleteIntegrationBtn" > Delete integration @@ -155,15 +158,16 @@ describe.skip('PackagePolicyDeleteProvider', () => { agentPolicies, packagePolicyIds: ['integration-0001'], }); - await act(async () => { - const button = utils.getByRole('button'); - fireEvent.click(button); + const button = utils.getByTestId('deleteIntegrationBtn'); + fireEvent.click(button); + await waitFor(() => { + const calloutText = utils.getByTestId('affectedAgentsCallOut').textContent; + expect(calloutText).toContain('This action will affect 5 agents.'); + expect(calloutText).toContain('is already in use by some of your agents'); + expect(utils.getByTestId('confirmModalBodyText').textContent).toContain( + 'This action can not be undone. Are you sure you wish to continue?' + ); }); - expect(utils.getByText('This action will affect 5 agents.')).toBeInTheDocument(); - expect( - utils.getByText('This action can not be undone. Are you sure you wish to continue?') - ).toBeInTheDocument(); - expect(utils.getAllByText(/is already in use by some of your agents./).length).toBe(1); }); it('When multiple agent policies are present and agents are enrolled show additional warnings', async () => { @@ -185,18 +189,19 @@ describe.skip('PackagePolicyDeleteProvider', () => { agentPolicies, packagePolicyIds: ['integration-0001'], }); - await act(async () => { - const button = utils.getByRole('button'); - fireEvent.click(button); + const button = utils.getByTestId('deleteIntegrationBtn'); + fireEvent.click(button); + + await waitFor(() => { + const calloutText = utils.getByTestId('affectedAgentsCallOut').textContent; + expect(calloutText).toContain('This action will affect 5 agents.'); + expect(utils.getByTestId('sharedAgentPolicyCallOut').textContent).toContain( + 'This integration is shared by multiple agent policies.' + ); + expect(utils.getByTestId('confirmModalBodyText').textContent).toContain( + 'This action can not be undone. Are you sure you wish to continue?' + ); }); - expect(utils.getByText('This action will affect 5 agents.')).toBeInTheDocument(); - expect( - utils.getByText('This integration is shared by multiple agent policies.') - ).toBeInTheDocument(); - expect( - utils.getByText('This action can not be undone. Are you sure you wish to continue?') - ).toBeInTheDocument(); - expect(utils.queryAllByText(/is already in use by some of your agents./).length).toBe(0); }); it('When multiple agent policies are present and no agents are enrolled show additional warnings', async () => { @@ -213,18 +218,18 @@ describe.skip('PackagePolicyDeleteProvider', () => { agentPolicies, packagePolicyIds: ['integration-0001'], }); - await act(async () => { - const button = utils.getByRole('button'); - fireEvent.click(button); + const button = utils.getByTestId('deleteIntegrationBtn'); + fireEvent.click(button); + + await waitFor(() => { + expect(utils.queryByTestId('affectedAgentsCallOut')).not.toBeInTheDocument(); + expect(utils.getByTestId('sharedAgentPolicyCallOut').textContent).toContain( + 'This integration is shared by multiple agent policies.' + ); + expect(utils.getByTestId('confirmModalBodyText').textContent).toContain( + 'This action can not be undone. Are you sure you wish to continue?' + ); }); - expect(utils.queryByText('This action will affect 5 agents.')).not.toBeInTheDocument(); - expect(utils.queryAllByText(/is already in use by some of your agents./).length).toBe(0); - expect( - utils.getByText('This integration is shared by multiple agent policies.') - ).toBeInTheDocument(); - expect( - utils.getByText('This action can not be undone. Are you sure you wish to continue?') - ).toBeInTheDocument(); }); it('When agentless should show a different set of warnings', async () => { @@ -246,16 +251,19 @@ describe.skip('PackagePolicyDeleteProvider', () => { agentPolicies, packagePolicyIds: ['integration-0001'], }); - await act(async () => { - const button = utils.getByRole('button'); - fireEvent.click(button); + const button = utils.getByTestId('deleteIntegrationBtn'); + fireEvent.click(button); + + await waitFor(() => { + expect(utils.getByTestId('affectedAgentsCallOut').textContent).not.toContain( + 'This action will affect 5 agents.' + ); + expect(utils.getByTestId('confirmModalBodyText').textContent).toContain( + 'This action can not be undone. Are you sure you wish to continue?' + ); + expect(utils.getByTestId('confirmModalTitleText').textContent).toContain( + 'about to delete an integration' + ); }); - // utils.debug(); - expect(utils.queryByText('This action will affect 5 agents.')).not.toBeInTheDocument(); - expect(utils.getByText(/about to delete an integration/)).toBeInTheDocument(); - expect( - utils.getByText('This action can not be undone. Are you sure you wish to continue?') - ).toBeInTheDocument(); - expect(utils.getAllByText(/integration will stop data ingestion./).length).toBe(1); }); }); diff --git a/x-pack/plugins/fleet/public/components/package_policy_delete_provider.tsx b/x-pack/plugins/fleet/public/components/package_policy_delete_provider.tsx index f12c4cf371ed5..70e7d77636fcc 100644 --- a/x-pack/plugins/fleet/public/components/package_policy_delete_provider.tsx +++ b/x-pack/plugins/fleet/public/components/package_policy_delete_provider.tsx @@ -247,6 +247,7 @@ export const PackagePolicyDeleteProvider: React.FunctionComponent = ({ defaultMessage="This integration is shared by multiple agent policies." /> } + data-test-subj="sharedAgentPolicyCallOut" /> @@ -261,6 +262,7 @@ export const PackagePolicyDeleteProvider: React.FunctionComponent = ({ <> (agentPolicy.unprivileged_agents = total)); return Promise.all([totalAgents, unprivilegedAgents]); }, - { concurrency: 10 } + { concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS_10 } ); } diff --git a/x-pack/plugins/fleet/server/routes/data_streams/handlers.ts b/x-pack/plugins/fleet/server/routes/data_streams/handlers.ts index 7ed4b5bacf336..2a4ab12ad0055 100644 --- a/x-pack/plugins/fleet/server/routes/data_streams/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/data_streams/handlers.ts @@ -17,6 +17,7 @@ import type { GetDataStreamsResponse } from '../../../common/types'; import { getPackageSavedObjects } from '../../services/epm/packages/get'; import type { MeteringStats } from '../../services/data_streams'; import { dataStreamService } from '../../services/data_streams'; +import { MAX_CONCURRENT_DATASTREAM_OPERATIONS } from '../../constants'; import { appContextService } from '../../services'; import { getDataStreamsQueryMetadata } from './get_data_streams_query_metadata'; @@ -233,7 +234,7 @@ export const getListHandler: RequestHandler = async (context, request, response) // After filtering out data streams that are missing dataset/namespace/type/package fields body.data_streams = ( await pMap(dataStreamNames, (dataStreamName) => queryDataStreamInfo(dataStreamName), { - concurrency: 50, + concurrency: MAX_CONCURRENT_DATASTREAM_OPERATIONS, }) ) .filter(({ dataset, namespace, type }) => dataset && namespace && type) diff --git a/x-pack/plugins/fleet/server/routes/fleet_proxies/handler.ts b/x-pack/plugins/fleet/server/routes/fleet_proxies/handler.ts index 2d63b357347db..880b042de4350 100644 --- a/x-pack/plugins/fleet/server/routes/fleet_proxies/handler.ts +++ b/x-pack/plugins/fleet/server/routes/fleet_proxies/handler.ts @@ -31,6 +31,7 @@ import type { DownloadSource, } from '../../types'; import { agentPolicyService } from '../../services'; +import { MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS_20 } from '../../constants'; async function bumpRelatedPolicies( soClient: SavedObjectsClientContract, @@ -49,7 +50,7 @@ async function bumpRelatedPolicies( outputs, (output) => agentPolicyService.bumpAllAgentPoliciesForOutput(esClient, output.id), { - concurrency: 20, + concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS_20, } ); await pMap( @@ -57,7 +58,7 @@ async function bumpRelatedPolicies( (fleetServerHost) => agentPolicyService.bumpAllAgentPoliciesForFleetServerHosts(esClient, fleetServerHost.id), { - concurrency: 20, + concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS_20, } ); @@ -66,7 +67,7 @@ async function bumpRelatedPolicies( (downloadSource) => agentPolicyService.bumpAllAgentPoliciesForDownloadSource(esClient, downloadSource.id), { - concurrency: 20, + concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS_20, } ); } diff --git a/x-pack/plugins/fleet/server/services/agent_policy.ts b/x-pack/plugins/fleet/server/services/agent_policy.ts index 21614d2a97481..eed9b058ad03f 100644 --- a/x-pack/plugins/fleet/server/services/agent_policy.ts +++ b/x-pack/plugins/fleet/server/services/agent_policy.ts @@ -97,6 +97,11 @@ import type { FullAgentConfigMap } from '../../common/types/models/agent_cm'; import { fullAgentConfigMapToYaml } from '../../common/services/agent_cm_to_yaml'; +import { + MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS, + MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS_20, +} from '../constants'; + import { appContextService } from '.'; import { mapAgentPolicySavedObjectToAgentPolicy } from './agent_policies/utils'; @@ -550,7 +555,7 @@ class AgentPolicyService { } return agentPolicy; }, - { concurrency: 50 } + { concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS } ); const result = agentPolicies.filter( @@ -657,7 +662,7 @@ class AgentPolicyService { return agentPolicy; }, - { concurrency: 50 } + { concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS } ); } @@ -955,7 +960,7 @@ class AgentPolicyService { ); }, { - concurrency: 50, + concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS, } ); await pMap( @@ -970,7 +975,7 @@ class AgentPolicyService { }); }, { - concurrency: 50, + concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS, } ); } @@ -1014,7 +1019,7 @@ class AgentPolicyService { } ), { - concurrency: 50, + concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS, } ); } @@ -1083,7 +1088,7 @@ class AgentPolicyService { this.triggerAgentPolicyUpdatedEvent(esClient, 'updated', policy.id, { spaceId: policy.namespaces?.[0], }), - { concurrency: 50 } + { concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS } ); } @@ -1352,7 +1357,7 @@ class AgentPolicyService { agentPolicy: agentPolicies?.find((policy) => policy.id === agentPolicyId), }), { - concurrency: 20, + concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS_20, } ); @@ -1423,27 +1428,29 @@ class AgentPolicyService { ); } - await Promise.all( - fleetServerPolicies - .filter((fleetServerPolicy) => { - const policy = policiesMap[fleetServerPolicy.policy_id]; - return ( - !policy.schema_version || lt(policy.schema_version, FLEET_AGENT_POLICIES_SCHEMA_VERSION) - ); - }) - .map((fleetServerPolicy) => - // There are some potential performance concerns around using `agentPolicyService.update` in this context. - // This could potentially be a bottleneck in environments with several thousand agent policies being deployed here. - agentPolicyService.update( - soClient, - esClient, - fleetServerPolicy.policy_id, - { - schema_version: FLEET_AGENT_POLICIES_SCHEMA_VERSION, - }, - { force: true } - ) - ) + const filteredFleetServerPolicies = fleetServerPolicies.filter((fleetServerPolicy) => { + const policy = policiesMap[fleetServerPolicy.policy_id]; + return ( + !policy.schema_version || lt(policy.schema_version, FLEET_AGENT_POLICIES_SCHEMA_VERSION) + ); + }); + await pMap( + filteredFleetServerPolicies, + (fleetServerPolicy) => + // There are some potential performance concerns around using `agentPolicyService.update` in this context. + // This could potentially be a bottleneck in environments with several thousand agent policies being deployed here. + agentPolicyService.update( + soClient, + esClient, + fleetServerPolicy.policy_id, + { + schema_version: FLEET_AGENT_POLICIES_SCHEMA_VERSION, + }, + { force: true } + ), + { + concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS, + } ); } @@ -1589,7 +1596,7 @@ class AgentPolicyService { } ), { - concurrency: 50, + concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS, } ); } @@ -1890,7 +1897,7 @@ class AgentPolicyService { return { integrationPolicyName: pkgPolicy?.name, id: pkgPolicy?.output_id ?? '' }; }, { - concurrency: 20, + concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS_20, } ); } @@ -1923,7 +1930,7 @@ class AgentPolicyService { return { agentPolicyId: agentPolicy.id, ...output }; }, { - concurrency: 50, + concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS, } ); return allOutputs; diff --git a/x-pack/plugins/fleet/server/services/agents/actions.ts b/x-pack/plugins/fleet/server/services/agents/actions.ts index f0dcd9a1ac62d..f2faf26fd96af 100644 --- a/x-pack/plugins/fleet/server/services/agents/actions.ts +++ b/x-pack/plugins/fleet/server/services/agents/actions.ts @@ -8,6 +8,7 @@ import { v4 as uuidv4 } from 'uuid'; import type { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; import apm from 'elastic-apm-node'; +import pMap from 'p-map'; import { partition } from 'lodash'; @@ -33,6 +34,8 @@ import { getAgentIdsForAgentPolicies } from '../agent_policies/agent_policies_to import { getCurrentNamespace } from '../spaces/get_current_namespace'; import { addNamespaceFilteringToQuery } from '../spaces/query_namespaces_filtering'; +import { MAX_CONCURRENT_CREATE_ACTIONS } from '../../constants'; + import { bulkUpdateAgents } from './crud'; const ONE_MONTH_IN_MS = 2592000000; @@ -110,40 +113,47 @@ export async function bulkCreateAgentActions( } const messageSigningService = appContextService.getMessageSigningService(); - await esClient.bulk({ - index: AGENT_ACTIONS_INDEX, - body: await Promise.all( - actions.flatMap(async (action) => { - const body: FleetServerAgentAction = { - '@timestamp': new Date().toISOString(), - expiration: action.expiration ?? new Date(Date.now() + ONE_MONTH_IN_MS).toISOString(), - start_time: action.start_time, - rollout_duration_seconds: action.rollout_duration_seconds, - agents: action.agents, - action_id: action.id, - data: action.data, - type: action.type, - traceparent: apm.currentTraceparent, - }; - if (SIGNED_ACTIONS.has(action.type) && messageSigningService) { - const signedBody = await messageSigningService.sign(body); - body.signed = { - data: signedBody.data.toString('base64'), - signature: signedBody.signature, - }; - } + const fleetServerAgentActions = await pMap( + actions, + async (action) => { + const body: FleetServerAgentAction = { + '@timestamp': new Date().toISOString(), + expiration: action.expiration ?? new Date(Date.now() + ONE_MONTH_IN_MS).toISOString(), + start_time: action.start_time, + rollout_duration_seconds: action.rollout_duration_seconds, + agents: action.agents, + action_id: action.id, + data: action.data, + type: action.type, + traceparent: apm.currentTraceparent, + }; + + if (SIGNED_ACTIONS.has(action.type) && messageSigningService) { + const signedBody = await messageSigningService.sign(body); + body.signed = { + data: signedBody.data.toString('base64'), + signature: signedBody.signature, + }; + } - return [ - { - create: { - _id: action.id, - }, + return [ + { + create: { + _id: action.id, }, - body, - ]; - }) - ), + }, + body, + ].flat(); + }, + { + concurrency: MAX_CONCURRENT_CREATE_ACTIONS, + } + ); + + await esClient.bulk({ + index: AGENT_ACTIONS_INDEX, + body: fleetServerAgentActions, }); for (const action of actions) { diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/datastream_ilm/install.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/datastream_ilm/install.ts index 6a14c1c301aa8..eafda9a99e4fc 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/datastream_ilm/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/datastream_ilm/install.ts @@ -6,6 +6,7 @@ */ import type { ElasticsearchClient, Logger, SavedObjectsClientContract } from '@kbn/core/server'; +import pMap from 'p-map'; import { ElasticsearchAssetType, @@ -18,6 +19,8 @@ import { getAssetFromAssetsMap } from '../../archive'; import { getESAssetMetadata } from '../meta'; import { retryTransientEsErrors } from '../retry'; +import { MAX_CONCURRENT_DATASTREAMS_ILM_OPERATIONS } from '../../../../constants'; + import { deleteIlms } from './remove'; interface IlmInstallation { @@ -111,11 +114,15 @@ export const installIlmForDataStream = async ( } ); - const installationPromises = ilmInstallations.map(async (ilmInstallation) => { - return handleIlmInstall({ esClient, ilmInstallation, logger }); - }); - - installedIlms = await Promise.all(installationPromises).then((results) => results.flat()); + installedIlms = await pMap( + ilmInstallations, + async (ilmInstallation) => { + return handleIlmInstall({ esClient, ilmInstallation, logger }); + }, + { + concurrency: MAX_CONCURRENT_DATASTREAMS_ILM_OPERATIONS, + } + ).then((results) => results.flat()); } return { installedIlms, esReferences }; diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/datastream_ilm/remove.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/datastream_ilm/remove.ts index 331088d195d0b..b8f4849934757 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/datastream_ilm/remove.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/datastream_ilm/remove.ts @@ -7,9 +7,17 @@ import type { ElasticsearchClient } from '@kbn/core/server'; +import pMap from 'p-map'; + +import { appContextService } from '../../../app_context'; +import { MAX_CONCURRENT_ILM_POLICIES_OPERATIONS } from '../../../../constants'; + export const deleteIlms = async (esClient: ElasticsearchClient, ilmPolicyIds: string[]) => { - await Promise.all( - ilmPolicyIds.map(async (ilmPolicyId) => { + const logger = appContextService.getLogger(); + + await pMap( + ilmPolicyIds, + async (ilmPolicyId) => { await esClient.transport.request( { method: 'DELETE', @@ -19,6 +27,10 @@ export const deleteIlms = async (esClient: ElasticsearchClient, ilmPolicyIds: st ignore: [404, 400], } ); - }) + logger.debug(`Deleted ilm policy with id: ${ilmPolicyId}`); + }, + { + concurrency: MAX_CONCURRENT_ILM_POLICIES_OPERATIONS, + } ); }; diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/ilm/install.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/ilm/install.ts index 6596650a94c53..1203ec02ba9ac 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/ilm/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/ilm/install.ts @@ -6,6 +6,7 @@ */ import type { ElasticsearchClient, Logger, SavedObjectsClientContract } from '@kbn/core/server'; +import pMap from 'p-map'; import type { EsAssetReference } from '../../../../types'; @@ -16,6 +17,7 @@ import { getESAssetMetadata } from '../meta'; import { retryTransientEsErrors } from '../retry'; import { PackageInvalidArchiveError } from '../../../../errors'; import type { PackageInstallContext } from '../../../../../common/types'; +import { MAX_CONCURRENT_ILM_POLICIES_OPERATIONS } from '../../../../constants'; export async function installILMPolicy( packageInstallContext: PackageInstallContext, @@ -48,8 +50,9 @@ export async function installILMPolicy( })), }); - await Promise.all( - ilmPolicies.map(async (policy) => { + await pMap( + ilmPolicies, + async (policy) => { try { await retryTransientEsErrors( () => @@ -63,7 +66,10 @@ export async function installILMPolicy( } catch (err) { throw new PackageInvalidArchiveError(`Couldn't install ilm policies: ${err.message}`); } - }) + }, + { + concurrency: MAX_CONCURRENT_ILM_POLICIES_OPERATIONS, + } ); return esReferences; diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/ingest_pipeline/remove.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/ingest_pipeline/remove.ts index aab876652756c..242365d5cc214 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/ingest_pipeline/remove.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/ingest_pipeline/remove.ts @@ -7,11 +7,14 @@ import type { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; +import pMap from 'p-map'; + import { appContextService } from '../../..'; import { ElasticsearchAssetType } from '../../../../types'; import { FleetError } from '../../../../errors'; import type { EsAssetReference } from '../../../../../common/types'; import { updateEsAssetReferences } from '../../packages/es_assets_reference'; +import { MAX_CONCURRENT_PIPELINES_DELETIONS } from '../../../../constants'; export const deletePreviousPipelines = async ( esClient: ElasticsearchClient, @@ -26,10 +29,15 @@ export const deletePreviousPipelines = async ( type === ElasticsearchAssetType.ingestPipeline && id.includes(previousPkgVersion) ); try { - await Promise.all( - installedPipelines.map(({ type, id }) => { + await pMap( + installedPipelines, + ({ type, id }) => { + logger.debug(`Deleting pipeline with id: ${id}`); return deletePipeline(esClient, id); - }) + }, + { + concurrency: MAX_CONCURRENT_PIPELINES_DELETIONS, + } ); } catch (e) { logger.error(e); diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/ml_model/remove.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/ml_model/remove.ts index 3abd19bd8035e..7852787da0d76 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/ml_model/remove.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/ml_model/remove.ts @@ -7,17 +7,24 @@ import type { ElasticsearchClient } from '@kbn/core/server'; +import pMap from 'p-map'; + import { appContextService } from '../../../app_context'; +import { MAX_CONCURRENT_ML_MODELS_OPERATIONS } from '../../../../constants'; export const deleteMlModel = async (esClient: ElasticsearchClient, mlModelIds: string[]) => { const logger = appContextService.getLogger(); if (mlModelIds.length) { logger.info(`Deleting currently installed ml model ids ${mlModelIds}`); } - await Promise.all( - mlModelIds.map(async (modelId) => { + await pMap( + mlModelIds, + async (modelId) => { await esClient.ml.deleteTrainedModel({ model_id: modelId }, { ignore: [404] }); logger.info(`Deleted: ${modelId}`); - }) + }, + { + concurrency: MAX_CONCURRENT_ML_MODELS_OPERATIONS, + } ); }; diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.test.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.test.ts index 3b4b74cf772e5..f735e8638b583 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.test.ts @@ -124,12 +124,13 @@ describe('EPM index template install', () => { const packageTemplate = componentTemplates['metrics-package.dataset@package'].template; - if (!('mappings' in packageTemplate)) { + if (!('settings' in packageTemplate)) { throw new Error('no mappings on package template'); } - expect(packageTemplate.mappings).toHaveProperty('_source'); - expect(packageTemplate.mappings._source).toEqual({ mode: 'synthetic' }); + expect(packageTemplate.settings?.index?.mapping).toHaveProperty('source'); + // @ts-expect-error esclient mapping out-of-date + expect(packageTemplate.settings?.index?.mapping?.source).toEqual({ mode: 'synthetic' }); }); it('tests prepareTemplate to set source mode to synthetics if index_mode:time_series', async () => { @@ -154,12 +155,13 @@ describe('EPM index template install', () => { const packageTemplate = componentTemplates['metrics-package.dataset@package'].template; - if (!('mappings' in packageTemplate)) { - throw new Error('no mappings on package template'); + if (!('settings' in packageTemplate)) { + throw new Error('no settings on package template'); } - expect(packageTemplate.mappings).toHaveProperty('_source'); - expect(packageTemplate.mappings._source).toEqual({ mode: 'synthetic' }); + expect(packageTemplate.settings?.index?.mapping).toHaveProperty('source'); + // @ts-expect-error esclient mapping out-of-date + expect(packageTemplate.settings?.index?.mapping?.source).toEqual({ mode: 'synthetic' }); }); it('tests prepareTemplate to not set source mode to synthetics if index_mode:time_series and user disabled synthetic', async () => { @@ -193,11 +195,11 @@ describe('EPM index template install', () => { const packageTemplate = componentTemplates['metrics-package.dataset@package'].template; - if (!('mappings' in packageTemplate)) { - throw new Error('no mappings on package template'); + if (!('settings' in packageTemplate)) { + throw new Error('no settings on package template'); } - expect(packageTemplate.mappings).not.toHaveProperty('_source'); + expect(packageTemplate.settings?.index?.mapping).not.toHaveProperty('source'); }); it('tests prepareTemplate to not set source mode to synthetics if specified but user disabled it', async () => { @@ -231,11 +233,11 @@ describe('EPM index template install', () => { const packageTemplate = componentTemplates['metrics-package.dataset@package'].template; - if (!('mappings' in packageTemplate)) { - throw new Error('no mappings on package template'); + if (!('settings' in packageTemplate)) { + throw new Error('no settings on package template'); } - expect(packageTemplate.mappings).not.toHaveProperty('_source'); + expect(packageTemplate.settings?.index?.mapping).not.toHaveProperty('source'); }); it('tests prepareTemplate to set index_mode time series if index_mode:time_series', async () => { diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts index 2a17768ac1f9c..f17a05a6837aa 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts @@ -8,6 +8,7 @@ import { merge, concat, uniqBy, omit } from 'lodash'; import Boom from '@hapi/boom'; import type { ElasticsearchClient, Logger } from '@kbn/core/server'; +import pMap from 'p-map'; import type { IndicesCreateRequest, @@ -38,6 +39,7 @@ import { PACKAGE_TEMPLATE_SUFFIX, USER_SETTINGS_TEMPLATE_SUFFIX, STACK_COMPONENT_TEMPLATES, + MAX_CONCURRENT_COMPONENT_TEMPLATES, } from '../../../../constants'; import { getESAssetMetadata } from '../meta'; import { retryTransientEsErrors } from '../retry'; @@ -103,15 +105,18 @@ export const prepareToInstallTemplates = ( await installPreBuiltComponentTemplates(packageInstallContext, esClient, logger); await installPreBuiltTemplates(packageInstallContext, esClient, logger); - await Promise.all( - templates.map((template) => + await pMap( + templates, + (template) => installComponentAndIndexTemplateForDataStream({ esClient, logger, componentTemplates: template.componentTemplates, indexTemplate: template.indexTemplate, - }) - ) + }), + { + concurrency: MAX_CONCURRENT_COMPONENT_TEMPLATES, + } ); return templates.map((template) => template.indexTemplate); @@ -125,32 +130,37 @@ const installPreBuiltTemplates = async ( logger: Logger ) => { const templatePaths = packageInstallContext.paths.filter((path) => isTemplate(path)); - const templateInstallPromises = templatePaths.map(async (path) => { - const { file } = getPathParts(path); - const templateName = file.substr(0, file.lastIndexOf('.')); - const content = JSON.parse( - getAssetFromAssetsMap(packageInstallContext.assetsMap, path).toString('utf8') - ); - - const esClientParams = { name: templateName, body: content }; - const esClientRequestOptions = { ignore: [404] }; - - if (Object.hasOwn(content, 'template') || Object.hasOwn(content, 'composed_of')) { - // Template is v2 - return retryTransientEsErrors( - () => esClient.indices.putIndexTemplate(esClientParams, esClientRequestOptions), - { logger } - ); - } else { - // template is V1 - return retryTransientEsErrors( - () => esClient.indices.putTemplate(esClientParams, esClientRequestOptions), - { logger } - ); - } - }); try { - return await Promise.all(templateInstallPromises); + await pMap( + templatePaths, + async (path) => { + const { file } = getPathParts(path); + const templateName = file.substr(0, file.lastIndexOf('.')); + const content = JSON.parse( + getAssetFromAssetsMap(packageInstallContext.assetsMap, path).toString('utf8') + ); + + const esClientParams = { name: templateName, body: content }; + const esClientRequestOptions = { ignore: [404] }; + + if (Object.hasOwn(content, 'template') || Object.hasOwn(content, 'composed_of')) { + // Template is v2 + return retryTransientEsErrors( + () => esClient.indices.putIndexTemplate(esClientParams, esClientRequestOptions), + { logger } + ); + } else { + // template is V1 + return retryTransientEsErrors( + () => esClient.indices.putTemplate(esClientParams, esClientRequestOptions), + { logger } + ); + } + }, + { + concurrency: MAX_CONCURRENT_COMPONENT_TEMPLATES, + } + ); } catch (e) { throw new Boom.Boom(`Error installing prebuilt index templates ${e.message}`, { statusCode: 400, @@ -164,26 +174,30 @@ const installPreBuiltComponentTemplates = async ( logger: Logger ) => { const templatePaths = packageInstallContext.paths.filter((path) => isComponentTemplate(path)); - const templateInstallPromises = templatePaths.map(async (path) => { - const { file } = getPathParts(path); - const templateName = file.substr(0, file.lastIndexOf('.')); - const content = JSON.parse( - getAssetFromAssetsMap(packageInstallContext.assetsMap, path).toString('utf8') - ); - - const esClientParams = { - name: templateName, - body: content, - }; - - return retryTransientEsErrors( - () => esClient.cluster.putComponentTemplate(esClientParams, { ignore: [404] }), - { logger } - ); - }); - try { - return await Promise.all(templateInstallPromises); + await pMap( + templatePaths, + async (path) => { + const { file } = getPathParts(path); + const templateName = file.substr(0, file.lastIndexOf('.')); + const content = JSON.parse( + getAssetFromAssetsMap(packageInstallContext.assetsMap, path).toString('utf8') + ); + + const esClientParams = { + name: templateName, + body: content, + }; + + return retryTransientEsErrors( + () => esClient.cluster.putComponentTemplate(esClientParams, { ignore: [404] }), + { logger } + ); + }, + { + concurrency: MAX_CONCURRENT_COMPONENT_TEMPLATES, + } + ); } catch (e) { throw new Boom.Boom(`Error installing prebuilt component templates ${e.message}`, { statusCode: 400, @@ -395,6 +409,14 @@ export function buildComponentTemplates(params: { templateSettings.index?.mapping?.total_fields?.limit ), }, + ...(templateSettings.index?.mapping?.source || sourceModeSynthetic + ? { + source: { + ...templateSettings.index?.mapping?.source, + ...(sourceModeSynthetic ? { mode: 'synthetic' } : {}), + }, + } + : {}), }, }, }, @@ -404,15 +426,7 @@ export function buildComponentTemplates(params: { ? { runtime: mappingsRuntimeFields } : {}), dynamic_templates: mappingsDynamicTemplates.length ? mappingsDynamicTemplates : undefined, - ...omit(indexTemplateMappings, 'properties', 'dynamic_templates', '_source', 'runtime'), - ...(indexTemplateMappings?._source || sourceModeSynthetic - ? { - _source: { - ...indexTemplateMappings?._source, - ...(sourceModeSynthetic ? { mode: 'synthetic' } : {}), - }, - } - : {}), + ...omit(indexTemplateMappings, 'properties', 'dynamic_templates', 'runtime'), }, ...(lifecycle ? { lifecycle } : {}), }, @@ -450,8 +464,9 @@ async function installDataStreamComponentTemplates({ logger: Logger; componentTemplates: TemplateMap; }) { - await Promise.all( - Object.entries(componentTemplates).map(async ([name, body]) => { + await pMap( + Object.entries(componentTemplates), + async ([name, body]) => { // @custom component template should be lazily created by user if (isUserSettingsTemplate(name)) { return; @@ -459,7 +474,10 @@ async function installDataStreamComponentTemplates({ const { clusterPromise } = putComponentTemplate(esClient, logger, { body, name }); return clusterPromise; - }) + }, + { + concurrency: MAX_CONCURRENT_COMPONENT_TEMPLATES, + } ); } @@ -467,10 +485,12 @@ export async function ensureDefaultComponentTemplates( esClient: ElasticsearchClient, logger: Logger ) { - return Promise.all( - FLEET_COMPONENT_TEMPLATES.map(({ name, body }) => - ensureComponentTemplate(esClient, logger, name, body) - ) + return await pMap( + FLEET_COMPONENT_TEMPLATES, + ({ name, body }) => ensureComponentTemplate(esClient, logger, name, body), + { + concurrency: MAX_CONCURRENT_COMPONENT_TEMPLATES, + } ); } diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.test.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.test.ts index dbc93e35c8218..9fc5383902ff3 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.test.ts @@ -2105,6 +2105,57 @@ describe('EPM template', () => { }) ); }); + it('should rollover on mapper exception with subobjects in reason', async () => { + const esClient = elasticsearchServiceMock.createElasticsearchClient(); + esClient.indices.getDataStream.mockResponse({ + data_streams: [{ name: 'test.prefix1-default' }], + } as any); + esClient.indices.get.mockResponse({ + 'test.prefix1-default': { + mappings: {}, + }, + } as any); + esClient.indices.simulateTemplate.mockResponse({ + template: { + settings: { index: {} }, + mappings: {}, + }, + } as any); + esClient.indices.putMapping.mockImplementation(() => { + throw new errors.ResponseError({ + body: { + error: { + type: 'mapper_exception', + reason: + "the [subobjects] parameter can't be updated for the object mapping [okta.debug_context.debug_data]", + }, + }, + } as any); + }); + + const logger = loggerMock.create(); + await updateCurrentWriteIndices(esClient, logger, [ + { + templateName: 'test', + indexTemplate: { + index_patterns: ['test.*-*'], + template: { + settings: { index: {} }, + mappings: {}, + }, + } as any, + }, + ]); + + expect(esClient.transport.request).toHaveBeenCalledWith( + expect.objectContaining({ + path: '/test.prefix1-default/_rollover', + querystring: { + lazy: true, + }, + }) + ); + }); it('should skip rollover on expected error when flag is on', async () => { const esClient = elasticsearchServiceMock.createElasticsearchClient(); esClient.indices.getDataStream.mockResponse({ diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts index bb38480fd66b7..d44cd57a2c5ba 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts @@ -19,6 +19,7 @@ import { FLEET_EVENT_INGESTED_COMPONENT_TEMPLATE_NAME, STACK_COMPONENT_TEMPLATE_LOGS_MAPPINGS, } from '../../../../constants/fleet_es_assets'; +import { MAX_CONCURRENT_DATASTREAM_OPERATIONS } from '../../../../constants'; import type { Field, Fields } from '../../fields/field'; import type { @@ -931,10 +932,15 @@ const queryDataStreamsFromTemplates = async ( esClient: ElasticsearchClient, templates: IndexTemplateEntry[] ): Promise => { - const dataStreamPromises = templates.map((template) => { - return getDataStreams(esClient, template); - }); - const dataStreamObjects = await Promise.all(dataStreamPromises); + const dataStreamObjects = await pMap( + templates, + (template) => { + return getDataStreams(esClient, template); + }, + { + concurrency: MAX_CONCURRENT_DATASTREAM_OPERATIONS, + } + ); return dataStreamObjects.filter(isCurrentDataStream).flat(); }; @@ -997,8 +1003,7 @@ const updateAllDataStreams = async ( }); }, { - // Limit concurrent putMapping/rollover requests to avoid overwhelming ES cluster - concurrency: 20, + concurrency: MAX_CONCURRENT_DATASTREAM_OPERATIONS, } ); }; @@ -1026,8 +1031,8 @@ const updateExistingDataStream = async ({ const existingDsConfig = Object.values(existingDs); const currentBackingIndexConfig = existingDsConfig.at(-1); const currentIndexMode = currentBackingIndexConfig?.settings?.index?.mode; - // @ts-expect-error Property 'mode' does not exist on type 'MappingSourceField' - const currentSourceType = currentBackingIndexConfig.mappings?._source?.mode; + // @ts-expect-error Property 'source.mode' does not exist on type 'IndicesMappingLimitSettings' + const currentSourceType = currentBackingIndexConfig?.settings?.index?.mapping?.source?.mode; let settings: IndicesIndexSettings; let mappings: MappingTypeMapping = {}; @@ -1079,6 +1084,10 @@ const updateExistingDataStream = async ({ // if update fails, rollover data stream and bail out } catch (err) { + subobjectsFieldChanged = + subobjectsFieldChanged || + (err.body?.error?.type === 'mapper_exception' && + err.body?.error?.reason?.includes('subobjects')); if ( (isResponseError(err) && err.statusCode === 400 && @@ -1132,7 +1141,7 @@ const updateExistingDataStream = async ({ // Trigger a rollover if the index mode or source type has changed if ( currentIndexMode !== settings?.index?.mode || - currentSourceType !== mappings?._source?.mode || + currentSourceType !== settings?.index?.source?.mode || dynamicDimensionMappingsChanged ) { if (options?.skipDataStreamRollover === true) { 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 cbdde6feee64c..85ae293455c9e 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 @@ -10,6 +10,7 @@ import { errors } from '@elastic/elasticsearch'; import { load } from 'js-yaml'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; import { uniqBy } from 'lodash'; +import pMap from 'p-map'; import type { HTTPAuthorizationHeader } from '../../../../../common/http_authorization_header'; @@ -44,6 +45,8 @@ import { getInstallation } from '../../packages'; import { retryTransientEsErrors } from '../retry'; import { isUserSettingsTemplate } from '../template/utils'; +import { MAX_CONCURRENT_TRANSFORMS_OPERATIONS } from '../../../../constants'; + import { deleteTransforms } from './remove'; import { getDestinationIndexAliases } from './transform_utils'; import { loadMappingForTransform } from './mappings'; @@ -573,17 +576,21 @@ const installTransformsAssets = async ( } } else { // Else, create & start all the transforms at once for speed - const transformsPromises = transforms.map(async (transform) => { - return handleTransformInstall({ - esClient, - logger, - transform, - startTransform: transformsSpecifications.get(transform.transformModuleId)?.get('start'), - secondaryAuth: transform.runAsKibanaSystem !== false ? undefined : secondaryAuth, - }); - }); - - installedTransforms = await Promise.all(transformsPromises).then((results) => results.flat()); + installedTransforms = await pMap( + transforms, + async (transform) => { + return handleTransformInstall({ + esClient, + logger, + transform, + startTransform: transformsSpecifications.get(transform.transformModuleId)?.get('start'), + secondaryAuth: transform.runAsKibanaSystem !== false ? undefined : secondaryAuth, + }); + }, + { + concurrency: MAX_CONCURRENT_TRANSFORMS_OPERATIONS, + } + ).then((results) => results.flat()); } // If user does not have sufficient permissions to start the transforms, 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 d1a492cb213a9..8d53a952608fa 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 @@ -10,6 +10,7 @@ import type { Logger } from '@kbn/logging'; import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import { sortBy, uniqBy } from 'lodash'; +import pMap from 'p-map'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; import type { ErrorResponseBase } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; @@ -19,6 +20,7 @@ import type { Installation } from '../../../../../common'; import { ElasticsearchAssetType, PACKAGES_SAVED_OBJECT_TYPE } from '../../../../../common'; import { retryTransientEsErrors } from '../retry'; +import { MAX_CONCURRENT_TRANSFORMS_OPERATIONS } from '../../../../constants'; interface FleetTransformMetadata { fleet_transform_version?: string; @@ -119,8 +121,9 @@ export async function handleTransformReauthorizeAndStart({ ); } - const transformInfos = await Promise.all( - transforms.map(({ transformId }) => + const transformInfos = await pMap( + transforms, + ({ transformId }) => retryTransientEsErrors( () => esClient.transform.getTransform( @@ -130,8 +133,10 @@ export async function handleTransformReauthorizeAndStart({ { ...(secondaryAuth ? secondaryAuth : {}), ignore: [404] } ), { logger, additionalResponseStatuses: [400] } - ) - ) + ), + { + concurrency: MAX_CONCURRENT_TRANSFORMS_OPERATIONS, + } ); const transformsMetadata: FleetTransformMetadata[] = transformInfos @@ -168,17 +173,20 @@ export async function handleTransformReauthorizeAndStart({ } } else { // Else, create & start all the transforms at once for speed - const transformsPromises = transformsMetadata.map(async ({ transformId, ...meta }) => { - return await reauthorizeAndStartTransform({ - esClient, - logger, - transformId, - secondaryAuth, - meta: { ...meta, last_authorized_by: username }, - }); - }); - - authorizedTransforms = await Promise.all(transformsPromises).then((results) => results.flat()); + authorizedTransforms = await pMap( + transformsMetadata, + async ({ transformId, ...meta }) => + reauthorizeAndStartTransform({ + esClient, + logger, + transformId, + secondaryAuth, + meta: { ...meta, last_authorized_by: username }, + }), + { + concurrency: MAX_CONCURRENT_TRANSFORMS_OPERATIONS, + } + ).then((results) => results.flat()); } const so = await savedObjectsClient.get(PACKAGES_SAVED_OBJECT_TYPE, pkgName); diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/remove.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/remove.ts index 4149d15899166..8a2d5cd13c59d 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/remove.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/remove.ts @@ -6,6 +6,7 @@ */ import type { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; +import pMap from 'p-map'; import type { SecondaryAuthorizationHeader } from '../../../../../common/types/models/transform_api_key'; import { ElasticsearchAssetType } from '../../../../types'; @@ -14,6 +15,7 @@ import { PACKAGES_SAVED_OBJECT_TYPE } from '../../../../../common/constants'; import { appContextService } from '../../../app_context'; import { retryTransientEsErrors } from '../retry'; +import { MAX_CONCURRENT_TRANSFORMS_OPERATIONS } from '../../../../constants'; export const stopTransforms = async (transformIds: string[], esClient: ElasticsearchClient) => { for (const transformId of transformIds) { @@ -34,8 +36,10 @@ export const deleteTransforms = async ( if (transformIds.length) { logger.info(`Deleting currently installed transform ids ${transformIds}`); } - await Promise.all( - transformIds.map(async (transformId) => { + + await pMap( + transformIds, + async (transformId) => { await stopTransforms([transformId], esClient); await retryTransientEsErrors(() => esClient.transform.deleteTransform( @@ -48,7 +52,10 @@ export const deleteTransforms = async ( ) ); logger.info(`Deleted: ${transformId}`); - }) + }, + { + concurrency: MAX_CONCURRENT_TRANSFORMS_OPERATIONS, + } ); }; diff --git a/x-pack/plugins/fleet/server/services/epm/kibana/index_pattern/install.ts b/x-pack/plugins/fleet/server/services/epm/kibana/index_pattern/install.ts index 3ae1c4a6cffba..3ecdfe02319a9 100644 --- a/x-pack/plugins/fleet/server/services/epm/kibana/index_pattern/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/kibana/index_pattern/install.ts @@ -6,10 +6,12 @@ */ import type { SavedObjectsClientContract } from '@kbn/core/server'; +import pMap from 'p-map'; import { dataTypes, installationStatuses } from '../../../../../common/constants'; import { appContextService } from '../../..'; import { getPackageSavedObjects } from '../../packages/get'; +import { MAX_CONCURRENT_INDEX_PATTERN_OPERATIONS } from '../../../../constants'; const INDEX_PATTERN_SAVED_OBJECT_TYPE = 'index-pattern'; export const indexPatternTypes = [dataTypes.Logs, dataTypes.Metrics]; @@ -72,9 +74,9 @@ export async function removeUnusedIndexPatterns(savedObjectsClient: SavedObjects // eslint-disable-next-line @typescript-eslint/naming-convention const idsToDelete = resolvedObjects.map(({ saved_object }) => saved_object.id); - - return Promise.all( - idsToDelete.map(async (id) => { + await pMap( + idsToDelete, + async (id) => { try { logger.debug(`deleting index pattern ${id}`); await savedObjectsClient.delete(INDEX_PATTERN_SAVED_OBJECT_TYPE, id); @@ -83,6 +85,9 @@ export async function removeUnusedIndexPatterns(savedObjectsClient: SavedObjects logger.debug(`Non fatal error encountered deleting index pattern ${id} : ${err}`); } return; - }) + }, + { + concurrency: MAX_CONCURRENT_INDEX_PATTERN_OPERATIONS, + } ); } diff --git a/x-pack/plugins/fleet/server/services/epm/package_service.mock.ts b/x-pack/plugins/fleet/server/services/epm/package_service.mock.ts index eeaa80b0c9449..e72b218ab1fcc 100644 --- a/x-pack/plugins/fleet/server/services/epm/package_service.mock.ts +++ b/x-pack/plugins/fleet/server/services/epm/package_service.mock.ts @@ -17,6 +17,7 @@ const createClientMock = (): jest.Mocked => ({ fetchFindLatestPackage: jest.fn(), readBundledPackage: jest.fn(), getAgentPolicyConfigYAML: jest.fn(), + getLatestPackageInfo: jest.fn(), getPackage: jest.fn(), getPackageFieldsMetadata: jest.fn(), getPackages: jest.fn(), diff --git a/x-pack/plugins/fleet/server/services/epm/package_service.test.ts b/x-pack/plugins/fleet/server/services/epm/package_service.test.ts index 479d355c00e68..ea7586b9ebd78 100644 --- a/x-pack/plugins/fleet/server/services/epm/package_service.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/package_service.test.ts @@ -43,6 +43,7 @@ const testKeys = [ 'getInstallation', 'ensureInstalledPackage', 'fetchFindLatestPackage', + 'getLatestPackageInfo', 'getPackage', 'getPackageFieldsMetadata', 'reinstallEsAssets', @@ -112,6 +113,23 @@ function getTest( }; break; case testKeys[3]: + test = { + method: mocks.packageClient.getLatestPackageInfo.bind(mocks.packageClient), + args: ['package name'], + spy: jest.spyOn(epmPackagesGet, 'getPackageInfo'), + spyArgs: [ + { + pkgName: 'package name', + pkgVersion: '', + savedObjectsClient: mocks.soClient, + prerelease: undefined, + }, + ], + spyResponse: { name: 'getLatestPackageInfo test' }, + expectedReturnValue: { name: 'getLatestPackageInfo test' }, + }; + break; + case testKeys[4]: test = { method: mocks.packageClient.getPackage.bind(mocks.packageClient), args: ['package name', '8.0.0'], @@ -127,7 +145,7 @@ function getTest( }, }; break; - case testKeys[4]: + case testKeys[5]: test = { method: mocks.packageClient.getPackageFieldsMetadata.bind(mocks.packageClient), args: [{ packageName: 'package_name', datasetName: 'dataset_name' }], @@ -141,7 +159,7 @@ function getTest( }, }; break; - case testKeys[5]: + case testKeys[6]: const pkg: InstallablePackage = { format_version: '1.0.0', name: 'package name', @@ -187,7 +205,7 @@ function getTest( ], }; break; - case testKeys[6]: + case testKeys[7]: const bundledPackage = { name: 'package name', version: '8.0.0', diff --git a/x-pack/plugins/fleet/server/services/epm/package_service.ts b/x-pack/plugins/fleet/server/services/epm/package_service.ts index a097db584b460..782aeffb6a85c 100644 --- a/x-pack/plugins/fleet/server/services/epm/package_service.ts +++ b/x-pack/plugins/fleet/server/services/epm/package_service.ts @@ -56,6 +56,7 @@ import { getPackages, installPackage, getTemplateInputs, + getPackageInfo, } from './packages'; import { generatePackageInfoFromArchiveBuffer } from './archive'; import { getEsPackage } from './archive/storage'; @@ -113,6 +114,11 @@ export interface PackageClient { options?: Parameters['1'] ): ReturnType; + getLatestPackageInfo( + packageName: string, + prerelease?: boolean + ): ReturnType; + getPackages(params?: { excludeInstallStatus?: false; category?: CategoryId; @@ -328,6 +334,16 @@ class PackageClientImpl implements PackageClient { return getPackageFieldsMetadata(params, options); } + public async getLatestPackageInfo(packageName: string, prerelease?: boolean) { + await this.#runPreflight(READ_PACKAGE_INFO_AUTHZ); + return getPackageInfo({ + savedObjectsClient: this.internalSoClient, + pkgName: packageName, + pkgVersion: '', + prerelease, + }); + } + public async getPackages(params?: { excludeInstallStatus?: false; category?: CategoryId; diff --git a/x-pack/plugins/fleet/server/services/epm/packages/get.ts b/x-pack/plugins/fleet/server/services/epm/packages/get.ts index 2ab0856063367..5b0e3df279cdc 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/get.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/get.ts @@ -39,7 +39,10 @@ import type { PackageSpecManifest, AssetsMap, } from '../../../../common/types'; -import { PACKAGES_SAVED_OBJECT_TYPE } from '../../../constants'; +import { + PACKAGES_SAVED_OBJECT_TYPE, + MAX_CONCURRENT_EPM_PACKAGES_INSTALLATIONS, +} from '../../../constants'; import type { ArchivePackage, RegistryPackage, @@ -142,7 +145,7 @@ export async function getPackages( ); } }, - { concurrency: 10 } + { concurrency: MAX_CONCURRENT_EPM_PACKAGES_INSTALLATIONS } ) ).filter((p): p is Installable => p !== null); diff --git a/x-pack/plugins/fleet/server/services/epm/packages/remove.ts b/x-pack/plugins/fleet/server/services/epm/packages/remove.ts index 84c8a8eb9e104..0557027a3c0a6 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/remove.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/remove.ts @@ -17,10 +17,12 @@ import { SavedObjectsUtils, SavedObjectsErrorHelpers } from '@kbn/core/server'; import minVersion from 'semver/ranges/min-version'; import { chunk } from 'lodash'; +import pMap from 'p-map'; import { updateIndexSettings } from '../elasticsearch/index/update_settings'; import { + MAX_CONCURRENT_ES_ASSETS_OPERATIONS, PACKAGE_POLICY_SAVED_OBJECT_TYPE, PACKAGES_SAVED_OBJECT_TYPE, SO_SEARCH_LIMIT, @@ -209,29 +211,36 @@ async function bulkDeleteSavedObjects( } } -export function deleteESAssets( +export const deleteESAsset = async ( + installedObject: EsAssetReference, + esClient: ElasticsearchClient +): Promise => { + const { id, type } = installedObject; + const assetType = type as AssetType; + if (assetType === ElasticsearchAssetType.ingestPipeline) { + return deletePipeline(esClient, id); + } else if (assetType === ElasticsearchAssetType.indexTemplate) { + return deleteIndexTemplate(esClient, id); + } else if (assetType === ElasticsearchAssetType.componentTemplate) { + return deleteComponentTemplate(esClient, id); + } else if (assetType === ElasticsearchAssetType.transform) { + return deleteTransforms(esClient, [id], true); + } else if (assetType === ElasticsearchAssetType.dataStreamIlmPolicy) { + return deleteIlms(esClient, [id]); + } else if (assetType === ElasticsearchAssetType.ilmPolicy) { + return deleteIlms(esClient, [id]); + } else if (assetType === ElasticsearchAssetType.mlModel) { + return deleteMlModel(esClient, [id]); + } +}; + +export const deleteESAssets = ( installedObjects: EsAssetReference[], esClient: ElasticsearchClient -): Array> { - return installedObjects.map(async ({ id, type }) => { - const assetType = type as AssetType; - if (assetType === ElasticsearchAssetType.ingestPipeline) { - return deletePipeline(esClient, id); - } else if (assetType === ElasticsearchAssetType.indexTemplate) { - return deleteIndexTemplate(esClient, id); - } else if (assetType === ElasticsearchAssetType.componentTemplate) { - return deleteComponentTemplate(esClient, id); - } else if (assetType === ElasticsearchAssetType.transform) { - return deleteTransforms(esClient, [id], true); - } else if (assetType === ElasticsearchAssetType.dataStreamIlmPolicy) { - return deleteIlms(esClient, [id]); - } else if (assetType === ElasticsearchAssetType.ilmPolicy) { - return deleteIlms(esClient, [id]); - } else if (assetType === ElasticsearchAssetType.mlModel) { - return deleteMlModel(esClient, [id]); - } - }); -} +): Array> => { + return installedObjects.map((installedObject) => deleteESAsset(installedObject, esClient)); +}; + type Tuple = [EsAssetReference[], EsAssetReference[], EsAssetReference[], EsAssetReference[]]; export const splitESAssets = (installedEs: EsAssetReference[]) => { @@ -291,16 +300,24 @@ export async function deletePrerequisiteAssets( try { // must first unset any default pipeline associated with any existing indices // by setting empty string - await Promise.all( - indexAssets.map((asset) => updateIndexSettings(esClient, asset.id, { default_pipeline: '' })) + await pMap( + indexAssets, + (asset) => updateIndexSettings(esClient, asset.id, { default_pipeline: '' }), + { + concurrency: MAX_CONCURRENT_ES_ASSETS_OPERATIONS, + } ); // in case transform's destination index contains any pipeline, // we should delete the transforms first - await Promise.all(deleteESAssets(transformAssets, esClient)); + await pMap(transformAssets, (transformAsset) => deleteESAsset(transformAsset, esClient), { + concurrency: MAX_CONCURRENT_ES_ASSETS_OPERATIONS, + }); // then delete index templates and pipelines - await Promise.all(deleteESAssets(indexTemplatesAndPipelines, esClient)); + await pMap(indexTemplatesAndPipelines, (asset) => deleteESAsset(asset, esClient), { + concurrency: MAX_CONCURRENT_ES_ASSETS_OPERATIONS, + }); } catch (err) { // in the rollback case, partial installs are likely, so missing assets are not an error if (!SavedObjectsErrorHelpers.isNotFoundError(err)) { diff --git a/x-pack/plugins/fleet/server/services/files/index.ts b/x-pack/plugins/fleet/server/services/files/index.ts index c7a00ee597f62..0598155153ce6 100644 --- a/x-pack/plugins/fleet/server/services/files/index.ts +++ b/x-pack/plugins/fleet/server/services/files/index.ts @@ -8,6 +8,7 @@ import type { ElasticsearchClient } from '@kbn/core/server'; import type { SearchHit, UpdateByQueryResponse } from '@elastic/elasticsearch/lib/api/types'; import type { FileStatus } from '@kbn/files-plugin/common/types'; +import pMap from 'p-map'; import { FILE_STORAGE_DATA_INDEX_PATTERN, @@ -20,6 +21,8 @@ import { getFileMetadataIndexName } from '../../../common/services'; import { ES_SEARCH_LIMIT } from '../../../common/constants'; +import { MAX_CONCURRENT_AGENT_FILES_UPLOADS } from '../../constants'; + import { parseFileStorageIndex } from './utils'; /** @@ -145,14 +148,15 @@ export async function fileIdsWithoutChunksByIndex( * @param fileIdsByIndex * @param status */ -export function updateFilesStatus( +export async function updateFilesStatus( esClient: ElasticsearchClient, abortController: AbortController | undefined, fileIdsByIndex: FileIdsByIndex, status: FileStatus ): Promise { - return Promise.all( - Object.entries(fileIdsByIndex).map(([index, fileIds]) => { + return await pMap( + Object.entries(fileIdsByIndex), + ([index, fileIds]) => { return esClient .updateByQuery( { @@ -174,6 +178,9 @@ export function updateFilesStatus( Error.captureStackTrace(err); throw err; }); - }) + }, + { + concurrency: MAX_CONCURRENT_AGENT_FILES_UPLOADS, + } ); } diff --git a/x-pack/plugins/fleet/server/services/fleet_proxies.ts b/x-pack/plugins/fleet/server/services/fleet_proxies.ts index 4cfc81db50740..e60c15577bdc2 100644 --- a/x-pack/plugins/fleet/server/services/fleet_proxies.ts +++ b/x-pack/plugins/fleet/server/services/fleet_proxies.ts @@ -13,7 +13,11 @@ import type { import { omit } from 'lodash'; import pMap from 'p-map'; -import { FLEET_PROXY_SAVED_OBJECT_TYPE, SO_SEARCH_LIMIT } from '../constants'; +import { + FLEET_PROXY_SAVED_OBJECT_TYPE, + SO_SEARCH_LIMIT, + MAX_CONCURRENT_FLEET_PROXIES_OPERATIONS, +} from '../constants'; import { FleetProxyUnauthorizedError } from '../errors'; import type { DownloadSource, @@ -206,7 +210,7 @@ async function updateRelatedSavedObject( ...omit(fleetServerHost, 'id'), proxy_id: null, }), - { concurrency: 20 } + { concurrency: MAX_CONCURRENT_FLEET_PROXIES_OPERATIONS } ); await pMap( @@ -216,7 +220,7 @@ async function updateRelatedSavedObject( ...omit(output, 'id'), proxy_id: null, } as Partial), - { concurrency: 20 } + { concurrency: MAX_CONCURRENT_FLEET_PROXIES_OPERATIONS } ); await pMap(downloadSources, (downloadSource) => diff --git a/x-pack/plugins/fleet/server/services/output.ts b/x-pack/plugins/fleet/server/services/output.ts index ceecd29562fc9..0b30890ee566d 100644 --- a/x-pack/plugins/fleet/server/services/output.ts +++ b/x-pack/plugins/fleet/server/services/output.ts @@ -44,6 +44,7 @@ import { DEFAULT_OUTPUT_ID, OUTPUT_SAVED_OBJECT_TYPE, OUTPUT_HEALTH_DATA_STREAM, + MAX_CONCURRENT_BACKFILL_OUTPUTS_PRESETS, } from '../constants'; import { SO_SEARCH_LIMIT, @@ -1165,7 +1166,7 @@ class OutputService { await agentPolicyService.bumpAllAgentPoliciesForOutput(esClient, output.id); }, { - concurrency: 5, + concurrency: MAX_CONCURRENT_BACKFILL_OUTPUTS_PRESETS, } ); } diff --git a/x-pack/plugins/fleet/server/services/package_policy.ts b/x-pack/plugins/fleet/server/services/package_policy.ts index eac31bb980256..32ec4c90b4319 100644 --- a/x-pack/plugins/fleet/server/services/package_policy.ts +++ b/x-pack/plugins/fleet/server/services/package_policy.ts @@ -100,6 +100,11 @@ import type { } from '../types'; import type { ExternalCallback } from '..'; +import { + MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS, + MAX_CONCURRENT_PACKAGE_ASSETS, +} from '../constants'; + import { createSoFindIterable } from './utils/create_so_find_iterable'; import type { FleetAuthzRouteConfig } from './security'; @@ -178,7 +183,7 @@ async function getPkgInfoAssetsMap({ pkgInfo, }); }, - { concurrency: 5 } + { concurrency: MAX_CONCURRENT_PACKAGE_ASSETS } ); return packageInfosandAssetsMap; @@ -2211,7 +2216,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { } }, { - concurrency: 50, + concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS, } ); await pMap( @@ -2231,7 +2236,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { ); }, { - concurrency: 50, + concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS, } ); } diff --git a/x-pack/plugins/fleet/server/services/preconfiguration/fleet_proxies.ts b/x-pack/plugins/fleet/server/services/preconfiguration/fleet_proxies.ts index 03787b8e6be65..d09494e52d30b 100644 --- a/x-pack/plugins/fleet/server/services/preconfiguration/fleet_proxies.ts +++ b/x-pack/plugins/fleet/server/services/preconfiguration/fleet_proxies.ts @@ -22,6 +22,8 @@ import { listFleetServerHostsForProxyId } from '../fleet_server_host'; import { agentPolicyService } from '../agent_policy'; import { outputService } from '../output'; +import { MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS_20 } from '../../constants'; + export function getPreconfiguredFleetProxiesFromConfig(config?: FleetConfigType) { const { proxies: fleetProxiesFromConfig } = config; @@ -107,7 +109,7 @@ async function createOrUpdatePreconfiguredFleetProxies( outputs, (output) => agentPolicyService.bumpAllAgentPoliciesForOutput(esClient, output.id), { - concurrency: 20, + concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS_20, } ); await pMap( @@ -118,7 +120,7 @@ async function createOrUpdatePreconfiguredFleetProxies( fleetServerHost.id ), { - concurrency: 20, + concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS_20, } ); } diff --git a/x-pack/plugins/fleet/server/services/preconfiguration/outputs.ts b/x-pack/plugins/fleet/server/services/preconfiguration/outputs.ts index 714b16af5bcd2..f605df4680b31 100644 --- a/x-pack/plugins/fleet/server/services/preconfiguration/outputs.ts +++ b/x-pack/plugins/fleet/server/services/preconfiguration/outputs.ts @@ -11,6 +11,7 @@ import utils from 'node:util'; import type { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; import { isEqual } from 'lodash'; import { dump } from 'js-yaml'; +import pMap from 'p-map'; const pbkdf2Async = utils.promisify(crypto.pbkdf2); @@ -32,6 +33,8 @@ import { appContextService } from '../app_context'; import { isDifferent } from './utils'; +export const MAX_CONCURRENT_OUTPUTS_OPERATIONS = 50; + export function getPreconfiguredOutputFromConfig(config?: FleetConfigType) { const { outputs: outputsOrUndefined } = config; @@ -78,67 +81,69 @@ export async function createOrUpdatePreconfiguredOutputs( { ignoreNotFound: true } ); - await Promise.all( - outputs.map(async (output) => { - const existingOutput = existingOutputs.find((o) => o.id === output.id); + const updateOrConfigureOutput = async (output: PreconfiguredOutput) => { + const existingOutput = existingOutputs.find((o) => o.id === output.id); - const { id, config, ...outputData } = output; + const { id, config, ...outputData } = output; - const configYaml = config ? dump(config) : undefined; + const configYaml = config ? dump(config) : undefined; - const data: NewOutput = { - ...outputData, - is_preconfigured: true, - config_yaml: configYaml ?? null, - // Set value to null to update these fields on update - ca_sha256: outputData.ca_sha256 ?? null, - ca_trusted_fingerprint: outputData.ca_trusted_fingerprint ?? null, - ssl: outputData.ssl ?? null, - } as NewOutput; + const data: NewOutput = { + ...outputData, + is_preconfigured: true, + config_yaml: configYaml ?? null, + // Set value to null to update these fields on update + ca_sha256: outputData.ca_sha256 ?? null, + ca_trusted_fingerprint: outputData.ca_trusted_fingerprint ?? null, + ssl: outputData.ssl ?? null, + } as NewOutput; - if (!data.hosts || data.hosts.length === 0) { - data.hosts = outputService.getDefaultESHosts(); - } + if (!data.hosts || data.hosts.length === 0) { + data.hosts = outputService.getDefaultESHosts(); + } - const isCreate = !existingOutput; + const isCreate = !existingOutput; - // field in allow edit are not updated through preconfiguration - if (!isCreate && output.allow_edit) { - for (const key of output.allow_edit) { - // @ts-expect-error - data[key] = existingOutput[key]; - } + // field in allow edit are not updated through preconfiguration + if (!isCreate && output.allow_edit) { + for (const key of output.allow_edit) { + // @ts-expect-error + data[key] = existingOutput[key]; } + } + + const isUpdateWithNewData = + existingOutput && (await isPreconfiguredOutputDifferentFromCurrent(existingOutput, data)); + + if (isCreate || isUpdateWithNewData) { + const secretHashes = await hashSecrets(output); - const isUpdateWithNewData = - existingOutput && (await isPreconfiguredOutputDifferentFromCurrent(existingOutput, data)); - - if (isCreate || isUpdateWithNewData) { - const secretHashes = await hashSecrets(output); - - if (isCreate) { - logger.debug(`Creating preconfigured output ${output.id}`); - await outputService.create(soClient, esClient, data, { - id, - fromPreconfiguration: true, - secretHashes, - }); - } else if (isUpdateWithNewData) { - logger.debug(`Updating preconfigured output ${output.id}`); - await outputService.update(soClient, esClient, id, data, { - fromPreconfiguration: true, - secretHashes, - }); - // Bump revision of all policies using that output - if (outputData.is_default || outputData.is_default_monitoring) { - await agentPolicyService.bumpAllAgentPolicies(esClient); - } else { - await agentPolicyService.bumpAllAgentPoliciesForOutput(esClient, id); - } + if (isCreate) { + logger.debug(`Creating preconfigured output ${output.id}`); + await outputService.create(soClient, esClient, data, { + id, + fromPreconfiguration: true, + secretHashes, + }); + } else if (isUpdateWithNewData) { + logger.debug(`Updating preconfigured output ${output.id}`); + await outputService.update(soClient, esClient, id, data, { + fromPreconfiguration: true, + secretHashes, + }); + // Bump revision of all policies using that output + if (outputData.is_default || outputData.is_default_monitoring) { + await agentPolicyService.bumpAllAgentPolicies(esClient); + } else { + await agentPolicyService.bumpAllAgentPoliciesForOutput(esClient, id); } } - }) - ); + } + }; + + await pMap(outputs, (output) => updateOrConfigureOutput(output), { + concurrency: MAX_CONCURRENT_OUTPUTS_OPERATIONS, + }); } // Values recommended by NodeJS documentation diff --git a/x-pack/plugins/fleet/server/services/preconfiguration/reset_agent_policies.ts b/x-pack/plugins/fleet/server/services/preconfiguration/reset_agent_policies.ts index 7e65dd665d0bd..84dbbf817d665 100644 --- a/x-pack/plugins/fleet/server/services/preconfiguration/reset_agent_policies.ts +++ b/x-pack/plugins/fleet/server/services/preconfiguration/reset_agent_policies.ts @@ -24,6 +24,8 @@ import { listEnrollmentApiKeys, deleteEnrollmentApiKey } from '../api_keys'; import type { AgentPolicy } from '../../types'; import { AgentPolicyInvalidError } from '../../errors'; +import { MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS_20 } from '../../constants'; + export async function resetPreconfiguredAgentPolicies( soClient: SavedObjectsClientContract, esClient: ElasticsearchClient, @@ -83,7 +85,7 @@ async function _deleteGhostPackagePolicies( } }, { - concurrency: 20, + concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS_20, } ); } @@ -116,7 +118,7 @@ async function _deletePreconfigurationDeleteRecord( }), { - concurrency: 20, + concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS_20, } ); } @@ -167,7 +169,7 @@ async function _deleteExistingData( if (agents.length > 0) { logger.info(`Force unenrolling ${agents.length} agents`); await pMap(agents, (agent) => forceUnenrollAgent(esClient, soClient, agent.id), { - concurrency: 20, + concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS_20, }); } @@ -183,7 +185,7 @@ async function _deleteExistingData( enrollmentApiKeys, (enrollmentKey) => deleteEnrollmentApiKey(esClient, enrollmentKey.id, true), { - concurrency: 20, + concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS_20, } ); } @@ -195,7 +197,7 @@ async function _deleteExistingData( force: true, }), { - concurrency: 20, + concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS_20, } ); } diff --git a/x-pack/plugins/fleet/server/services/setup.ts b/x-pack/plugins/fleet/server/services/setup.ts index ab882a013ebe3..24d655a4cae16 100644 --- a/x-pack/plugins/fleet/server/services/setup.ts +++ b/x-pack/plugins/fleet/server/services/setup.ts @@ -21,6 +21,8 @@ import { AUTO_UPDATE_PACKAGES, FLEET_SETUP_LOCK_TYPE } from '../../common/consta import type { PreconfigurationError } from '../../common/constants'; import type { DefaultPackagesInstallationError, FleetSetupLock } from '../../common/types'; +import { MAX_CONCURRENT_EPM_PACKAGES_INSTALLATIONS } from '../constants'; + import { appContextService } from './app_context'; import { ensurePreconfiguredPackagesAndPolicies } from './preconfiguration'; import { @@ -359,7 +361,7 @@ export async function ensureFleetGlobalEsAssets( ); }); }, - { concurrency: 10 } + { concurrency: MAX_CONCURRENT_EPM_PACKAGES_INSTALLATIONS } ); } } diff --git a/x-pack/plugins/fleet/server/services/setup/clean_old_fleet_indices.tsx b/x-pack/plugins/fleet/server/services/setup/clean_old_fleet_indices.tsx index cd3317c5eb23b..ab3045ee57a08 100644 --- a/x-pack/plugins/fleet/server/services/setup/clean_old_fleet_indices.tsx +++ b/x-pack/plugins/fleet/server/services/setup/clean_old_fleet_indices.tsx @@ -8,6 +8,8 @@ import type { ElasticsearchClient, Logger } from '@kbn/core/server'; import pMap from 'p-map'; +import { MAX_CONCURRENT_CLEAN_OLD_FILE_INDICES } from '../../constants'; + const INDICES_TO_CLEAN = [ '.fleet-files-*', '.fleet-file-data-*', @@ -49,7 +51,7 @@ export async function cleanUpOldFileIndices(esClient: ElasticsearchClient, logge }); } }, - { concurrency: 2 } + { concurrency: MAX_CONCURRENT_CLEAN_OLD_FILE_INDICES } ); await esClient.indices .deleteIndexTemplate({ diff --git a/x-pack/plugins/fleet/server/services/setup/fleet_server_policies_enrollment_keys.ts b/x-pack/plugins/fleet/server/services/setup/fleet_server_policies_enrollment_keys.ts index cd7e91fb81ac4..07efdde6f7b77 100644 --- a/x-pack/plugins/fleet/server/services/setup/fleet_server_policies_enrollment_keys.ts +++ b/x-pack/plugins/fleet/server/services/setup/fleet_server_policies_enrollment_keys.ts @@ -10,7 +10,7 @@ import pMap from 'p-map'; import { agentPolicyService } from '../agent_policy'; import { ensureDefaultEnrollmentAPIKeyForAgentPolicy } from '../api_keys'; -import { SO_SEARCH_LIMIT } from '../../constants'; +import { SO_SEARCH_LIMIT, MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS_20 } from '../../constants'; import { appContextService } from '../app_context'; import { scheduleDeployAgentPoliciesTask } from '../agent_policies/deploy_agent_policies_task'; import { scheduleBumpAgentPoliciesTask } from '../agent_policies/bump_agent_policies_task'; @@ -51,7 +51,7 @@ export async function ensureAgentPoliciesFleetServerKeysAndPolicies({ } }, { - concurrency: 20, + concurrency: MAX_CONCURRENT_AGENT_POLICIES_OPERATIONS_20, } ); diff --git a/x-pack/plugins/fleet/server/services/setup/upgrade_package_install_version.ts b/x-pack/plugins/fleet/server/services/setup/upgrade_package_install_version.ts index db85e269dc345..bb9def3dc4ae6 100644 --- a/x-pack/plugins/fleet/server/services/setup/upgrade_package_install_version.ts +++ b/x-pack/plugins/fleet/server/services/setup/upgrade_package_install_version.ts @@ -9,7 +9,11 @@ import type { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/ import pMap from 'p-map'; import type { Logger } from '@kbn/logging'; -import { PACKAGES_SAVED_OBJECT_TYPE, SO_SEARCH_LIMIT } from '../../constants'; +import { + MAX_CONCURRENT_EPM_PACKAGES_INSTALLATIONS, + PACKAGES_SAVED_OBJECT_TYPE, + SO_SEARCH_LIMIT, +} from '../../constants'; import { FLEET_INSTALL_FORMAT_VERSION } from '../../constants/fleet_es_assets'; import type { Installation } from '../../types'; @@ -59,6 +63,6 @@ export async function upgradePackageInstallVersion({ } }); }, - { concurrency: 10 } + { concurrency: MAX_CONCURRENT_EPM_PACKAGES_INSTALLATIONS } ); } diff --git a/x-pack/plugins/fleet/server/types/models/agent_policy.ts b/x-pack/plugins/fleet/server/types/models/agent_policy.ts index 4f131d00bdf38..cc7dabe253ec1 100644 --- a/x-pack/plugins/fleet/server/types/models/agent_policy.ts +++ b/x-pack/plugins/fleet/server/types/models/agent_policy.ts @@ -135,7 +135,7 @@ export const AgentPolicyBaseSchema = { monitoring_pprof_enabled: schema.maybe(schema.boolean()), monitoring_http: schema.maybe( schema.object({ - enabled: schema.boolean(), + enabled: schema.maybe(schema.boolean()), host: schema.maybe(schema.string({ defaultValue: 'localhost' })), port: schema.maybe(schema.number({ min: 0, max: 65353, defaultValue: 6791 })), buffer: schema.maybe(schema.object({ enabled: schema.boolean({ defaultValue: false }) })), diff --git a/x-pack/plugins/fleet/server/types/rest_spec/agent.ts b/x-pack/plugins/fleet/server/types/rest_spec/agent.ts index a5fb3e9e034ed..9df9b73b3f49b 100644 --- a/x-pack/plugins/fleet/server/types/rest_spec/agent.ts +++ b/x-pack/plugins/fleet/server/types/rest_spec/agent.ts @@ -138,22 +138,25 @@ export const AgentResponseSchema = schema.object({ upgraded_at: schema.maybe(schema.oneOf([schema.literal(null), schema.string()])), upgrade_started_at: schema.maybe(schema.oneOf([schema.literal(null), schema.string()])), upgrade_details: schema.maybe( - schema.object({ - target_version: schema.string(), - action_id: schema.string(), - state: AgentUpgradeStateTypeSchema, - metadata: schema.maybe( - schema.object({ - scheduled_at: schema.maybe(schema.string()), - download_percent: schema.maybe(schema.number()), - download_rate: schema.maybe(schema.number()), - failed_state: schema.maybe(AgentUpgradeStateTypeSchema), - error_msg: schema.maybe(schema.string()), - retry_error_msg: schema.maybe(schema.string()), - retry_until: schema.maybe(schema.string()), - }) - ), - }) + schema.oneOf([ + schema.literal(null), + schema.object({ + target_version: schema.string(), + action_id: schema.string(), + state: AgentUpgradeStateTypeSchema, + metadata: schema.maybe( + schema.object({ + scheduled_at: schema.maybe(schema.string()), + download_percent: schema.maybe(schema.number()), + download_rate: schema.maybe(schema.number()), + failed_state: schema.maybe(AgentUpgradeStateTypeSchema), + error_msg: schema.maybe(schema.string()), + retry_error_msg: schema.maybe(schema.string()), + retry_until: schema.maybe(schema.string()), + }) + ), + }), + ]) ), access_api_key_id: schema.maybe(schema.string()), default_api_key: schema.maybe(schema.string()), diff --git a/x-pack/plugins/index_management/__jest__/client_integration/create_enrich_policy/create_enrich_policy.test.tsx b/x-pack/plugins/index_management/__jest__/client_integration/create_enrich_policy/create_enrich_policy.test.tsx index a9675b592aa39..e9d93e6baf631 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/create_enrich_policy/create_enrich_policy.test.tsx +++ b/x-pack/plugins/index_management/__jest__/client_integration/create_enrich_policy/create_enrich_policy.test.tsx @@ -57,10 +57,6 @@ describe('Create enrich policy', () => { beforeEach(async () => { httpRequestsMockHelpers.setGetMatchingIndices(getMatchingIndices()); - httpRequestsMockHelpers.setGetPrivilegesResponse({ - hasAllPrivileges: true, - missingPrivileges: { cluster: [] }, - }); httpRequestsMockHelpers.setGetMatchingDataStreams(getMatchingDataStreams()); await act(async () => { diff --git a/x-pack/plugins/index_management/__jest__/client_integration/helpers/http_requests.ts b/x-pack/plugins/index_management/__jest__/client_integration/helpers/http_requests.ts index 0504f9bf40b7a..a9f1dac15ed1f 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/helpers/http_requests.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/helpers/http_requests.ts @@ -188,9 +188,6 @@ const registerHttpRequestMockHelpers = ( error ); - const setGetPrivilegesResponse = (response?: HttpResponse, error?: ResponseError) => - mockResponse('GET', `${INTERNAL_API_BASE_PATH}/enrich_policies/privileges`, response, error); - const setCreateEnrichPolicy = (response?: HttpResponse, error?: ResponseError) => mockResponse('POST', `${INTERNAL_API_BASE_PATH}/enrich_policies`, response, error); @@ -253,7 +250,6 @@ const registerHttpRequestMockHelpers = ( setCreateIndexResponse, setGetMatchingIndices, setGetFieldsFromIndices, - setGetPrivilegesResponse, setCreateEnrichPolicy, setInferenceModels, setGetMatchingDataStreams, diff --git a/x-pack/plugins/index_management/__jest__/client_integration/helpers/setup_environment.tsx b/x-pack/plugins/index_management/__jest__/client_integration/helpers/setup_environment.tsx index 633ed96ec8225..24f641ae2833f 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/helpers/setup_environment.tsx +++ b/x-pack/plugins/index_management/__jest__/client_integration/helpers/setup_environment.tsx @@ -91,6 +91,11 @@ const appDependencies = { overlays: { openConfirm: jest.fn(), }, + privs: { + monitor: true, + manageEnrich: true, + monitorEnrich: true, + }, } as any; export const kibanaVersion = new SemVer(MAJOR_VERSION); diff --git a/x-pack/plugins/index_management/__jest__/client_integration/home/enrich_policies.test.tsx b/x-pack/plugins/index_management/__jest__/client_integration/home/enrich_policies.test.tsx index 77c7757fe9202..040602a058e25 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/home/enrich_policies.test.tsx +++ b/x-pack/plugins/index_management/__jest__/client_integration/home/enrich_policies.test.tsx @@ -38,11 +38,6 @@ describe('Enrich policies tab', () => { describe('empty states', () => { beforeEach(async () => { setDelayResponse(false); - - httpRequestsMockHelpers.setGetPrivilegesResponse({ - hasAllPrivileges: true, - missingPrivileges: { cluster: [] }, - }); }); test('displays a loading prompt', async () => { @@ -82,24 +77,6 @@ describe('Enrich policies tab', () => { }); }); - describe('permissions check', () => { - it('shows a permissions error when the user does not have sufficient privileges', async () => { - httpRequestsMockHelpers.setGetPrivilegesResponse({ - hasAllPrivileges: false, - missingPrivileges: { cluster: ['manage_enrich'] }, - }); - - testBed = await setup(httpSetup); - await act(async () => { - testBed.actions.goToEnrichPoliciesTab(); - }); - - testBed.component.update(); - - expect(testBed.exists('enrichPoliciesInsuficientPrivileges')).toBe(true); - }); - }); - describe('policies list', () => { let testPolicy: ReturnType; beforeEach(async () => { @@ -110,11 +87,6 @@ describe('Enrich policies tab', () => { createTestEnrichPolicy('policy-range', 'range'), ]); - httpRequestsMockHelpers.setGetPrivilegesResponse({ - hasAllPrivileges: true, - missingPrivileges: { cluster: [] }, - }); - testBed = await setup(httpSetup); await act(async () => { testBed.actions.goToEnrichPoliciesTab(); diff --git a/x-pack/plugins/index_management/__jest__/components/index_table.test.js b/x-pack/plugins/index_management/__jest__/components/index_table.test.js index 2ae162b421001..0a59fef7be6e6 100644 --- a/x-pack/plugins/index_management/__jest__/components/index_table.test.js +++ b/x-pack/plugins/index_management/__jest__/components/index_table.test.js @@ -168,6 +168,11 @@ describe('index table', () => { enableIndexActions: true, enableIndexStats: true, }, + privs: { + monitor: true, + manageEnrich: true, + monitorEnrich: true, + }, }; component = ( diff --git a/x-pack/plugins/index_management/public/application/app_context.tsx b/x-pack/plugins/index_management/public/application/app_context.tsx index 6df01a109a036..3573ae33812d9 100644 --- a/x-pack/plugins/index_management/public/application/app_context.tsx +++ b/x-pack/plugins/index_management/public/application/app_context.tsx @@ -80,6 +80,11 @@ export interface AppDependencies { kibanaVersion: SemVer; overlays: OverlayStart; canUseSyntheticSource: boolean; + privs: { + monitor: boolean; + manageEnrich: boolean; + monitorEnrich: boolean; + }; } export const AppContextProvider = ({ diff --git a/x-pack/plugins/index_management/public/application/components/enrich_policies/index.ts b/x-pack/plugins/index_management/public/application/components/enrich_policies/index.ts deleted file mode 100644 index de8fa4ebf5ac7..0000000000000 --- a/x-pack/plugins/index_management/public/application/components/enrich_policies/index.ts +++ /dev/null @@ -1,9 +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. - */ - -export { EnrichPoliciesWithPrivileges } from './with_privileges'; -export { EnrichPoliciesAuthProvider } from './auth_provider'; diff --git a/x-pack/plugins/index_management/public/application/components/enrich_policies/with_privileges.tsx b/x-pack/plugins/index_management/public/application/components/enrich_policies/with_privileges.tsx deleted file mode 100644 index 09a79343b2210..0000000000000 --- a/x-pack/plugins/index_management/public/application/components/enrich_policies/with_privileges.tsx +++ /dev/null @@ -1,82 +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 { FormattedMessage } from '@kbn/i18n-react'; -import React, { FunctionComponent } from 'react'; - -import { - PageLoading, - PageError, - useAuthorizationContext, - WithPrivileges, - NotAuthorizedSection, -} from '../../../shared_imports'; -import { ENRICH_POLICIES_REQUIRED_PRIVILEGES } from '../../constants'; - -export const EnrichPoliciesWithPrivileges: FunctionComponent<{ - children?: React.ReactNode; -}> = ({ children }) => { - const { apiError } = useAuthorizationContext(); - - if (apiError) { - return ( - - } - error={apiError} - /> - ); - } - - return ( - `cluster.${privilege}`)} - > - {({ isLoading, hasPrivileges, privilegesMissing }) => { - if (isLoading) { - return ( - - - - ); - } - - if (!hasPrivileges) { - return ( - - } - message={ - - } - /> - ); - } - - return <>{children}; - }} - - ); -}; diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/search_fields/search_result_item.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/search_fields/search_result_item.tsx index a66811d41b94f..428189acf8559 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/search_fields/search_result_item.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/search_fields/search_result_item.tsx @@ -108,6 +108,7 @@ export const SearchResultItem = React.memo(function FieldListItemFlatComponent({ 'mappingsEditor__fieldsListItem__content--toggle': hasChildFields || hasMultiFields, 'mappingsEditor__fieldsListItem__content--multiField': isMultiField, })} + tabIndex={0} > = () => { +export const EnrichPolicyCreate: React.FunctionComponent = () => { useEffect(() => { breadcrumbService.setBreadcrumbs(IndexManagementBreadcrumb.enrichPoliciesCreate); }, []); @@ -64,11 +60,3 @@ const CreateView: React.FunctionComponent = () => { ); }; - -export const EnrichPolicyCreate: React.FunctionComponent = (props) => ( - - - - - -); diff --git a/x-pack/plugins/index_management/public/application/sections/home/enrich_policies_list/enrich_policies_list.tsx b/x-pack/plugins/index_management/public/application/sections/home/enrich_policies_list/enrich_policies_list.tsx index a036273ebdde9..eeba7b9e03fd8 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/enrich_policies_list/enrich_policies_list.tsx +++ b/x-pack/plugins/index_management/public/application/sections/home/enrich_policies_list/enrich_policies_list.tsx @@ -17,10 +17,6 @@ import { APP_WRAPPER_CLASS, useExecutionContext } from '../../../../shared_impor import { useAppContext } from '../../../app_context'; import { useRedirectPath } from '../../../hooks/redirect_path'; -import { - EnrichPoliciesAuthProvider, - EnrichPoliciesWithPrivileges, -} from '../../../components/enrich_policies'; import { breadcrumbService, IndexManagementBreadcrumb } from '../../../services/breadcrumbs'; import { documentationService } from '../../../services/documentation'; import { useLoadEnrichPolicies } from '../../../services/api'; @@ -34,9 +30,13 @@ const getEnrichPolicyNameFromLocation = (location: Location) => { return policy; }; -const ListView: React.FunctionComponent = ({ history, location }) => { +export const EnrichPoliciesList: React.FunctionComponent = ({ + history, + location, +}) => { const { core: { executionContext }, + privs, } = useAppContext(); const redirectTo = useRedirectPath(history); @@ -79,7 +79,7 @@ const ListView: React.FunctionComponent = ({ history, locat return ; } - if (policies?.length === 0) { + if (privs.manageEnrich && policies?.length === 0) { return ; } @@ -151,11 +151,3 @@ const ListView: React.FunctionComponent = ({ history, locat
        ); }; - -export const EnrichPoliciesList: React.FunctionComponent = (props) => ( - - - - - -); diff --git a/x-pack/plugins/index_management/public/application/sections/home/enrich_policies_list/policies_table/policies_table.tsx b/x-pack/plugins/index_management/public/application/sections/home/enrich_policies_list/policies_table/policies_table.tsx index e78e08b829997..61574a70fa545 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/enrich_policies_list/policies_table/policies_table.tsx +++ b/x-pack/plugins/index_management/public/application/sections/home/enrich_policies_list/policies_table/policies_table.tsx @@ -33,43 +33,84 @@ export const PoliciesTable: FunctionComponent = ({ onDeletePolicyClick, onExecutePolicyClick, }) => { - const { history } = useAppContext(); + const { history, privs } = useAppContext(); - const renderToolsRight = () => { - return [ - - - , - - - , - ]; - }; + const createBtn = ( + + + + ); + + const toolsRight = [ + + + , + ]; + + if (privs.manageEnrich) { + toolsRight.push(createBtn); + } const search: EuiSearchBarProps = { - toolsRight: renderToolsRight(), + toolsRight, box: { incremental: true, }, }; + const actions: EuiBasicTableColumn = { + name: i18n.translate('xpack.idxMgmt.enrichPolicies.table.actionsField', { + defaultMessage: 'Actions', + }), + actions: [ + { + isPrimary: true, + name: i18n.translate('xpack.idxMgmt.enrichPolicies.table.executeAction', { + defaultMessage: 'Execute', + }), + description: i18n.translate('xpack.idxMgmt.enrichPolicies.table.executeDescription', { + defaultMessage: 'Execute this enrich policy', + }), + type: 'icon', + icon: 'play', + 'data-test-subj': 'executePolicyButton', + onClick: ({ name }) => onExecutePolicyClick(name), + }, + { + isPrimary: true, + name: i18n.translate('xpack.idxMgmt.enrichPolicies.table.deleteAction', { + defaultMessage: 'Delete', + }), + description: i18n.translate('xpack.idxMgmt.enrichPolicies.table.deleteDescription', { + defaultMessage: 'Delete this enrich policy', + }), + type: 'icon', + icon: 'trash', + color: 'danger', + 'data-test-subj': 'deletePolicyButton', + onClick: ({ name }) => onDeletePolicyClick(name), + }, + ], + }; + const columns: Array> = [ { field: 'name', @@ -120,42 +161,12 @@ export const PoliciesTable: FunctionComponent = ({ truncateText: true, render: (fields: string[]) => {fields.join(', ')}, }, - { - name: i18n.translate('xpack.idxMgmt.enrichPolicies.table.actionsField', { - defaultMessage: 'Actions', - }), - actions: [ - { - isPrimary: true, - name: i18n.translate('xpack.idxMgmt.enrichPolicies.table.executeAction', { - defaultMessage: 'Execute', - }), - description: i18n.translate('xpack.idxMgmt.enrichPolicies.table.executeDescription', { - defaultMessage: 'Execute this enrich policy', - }), - type: 'icon', - icon: 'play', - 'data-test-subj': 'executePolicyButton', - onClick: ({ name }) => onExecutePolicyClick(name), - }, - { - isPrimary: true, - name: i18n.translate('xpack.idxMgmt.enrichPolicies.table.deleteAction', { - defaultMessage: 'Delete', - }), - description: i18n.translate('xpack.idxMgmt.enrichPolicies.table.deleteDescription', { - defaultMessage: 'Delete this enrich policy', - }), - type: 'icon', - icon: 'trash', - color: 'danger', - 'data-test-subj': 'deletePolicyButton', - onClick: ({ name }) => onDeletePolicyClick(name), - }, - ], - }, ]; + if (privs.manageEnrich) { + columns.push(actions); + } + const { pageSize, sorting, onTableChange } = useEuiTablePersist({ tableId: 'enrichPolicies', initialPageSize: 50, diff --git a/x-pack/plugins/index_management/public/application/sections/home/home.tsx b/x-pack/plugins/index_management/public/application/sections/home/home.tsx index e7de896fa4b38..2d0fc7d4ec108 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/home.tsx +++ b/x-pack/plugins/index_management/public/application/sections/home/home.tsx @@ -41,6 +41,7 @@ export const IndexManagementHome: React.FunctionComponent { const { plugins: { console: consolePlugin }, + privs, } = useAppContext(); const tabs = [ { @@ -74,7 +75,10 @@ export const IndexManagementHome: React.FunctionComponent ), }, - { + ]; + + if (privs.monitorEnrich) { + tabs.push({ id: Section.EnrichPolicies, name: ( ), - }, - ]; + }); + } const onSectionChange = (newSection: Section) => { history.push(`/${newSection}`); @@ -143,7 +147,9 @@ export const IndexManagementHome: React.FunctionComponent - + {privs.monitorEnrich && ( + + )} {consolePlugin?.EmbeddableConsole ? : null} diff --git a/x-pack/plugins/index_management/public/plugin.ts b/x-pack/plugins/index_management/public/plugin.ts index 82ba6505696aa..06adcc75d80b3 100644 --- a/x-pack/plugins/index_management/public/plugin.ts +++ b/x-pack/plugins/index_management/public/plugin.ts @@ -6,6 +6,7 @@ */ import { i18n } from '@kbn/i18n'; +import { Subject } from 'rxjs'; import SemVer from 'semver/classes/semver'; import { @@ -14,6 +15,7 @@ import { Plugin, PluginInitializerContext, ScopedHistory, + Capabilities, } from '@kbn/core/public'; import { IndexManagementPluginSetup, @@ -61,6 +63,8 @@ export class IndexMgmtUIPlugin private canUseSyntheticSource: boolean = false; private licensingSubscription?: Subscription; + private capabilities$ = new Subject(); + constructor(ctx: PluginInitializerContext) { // Temporary hack to provide the service instances in module files in order to avoid a big refactor // For the selectors we should expose them through app dependencies and read them from there on each container component. @@ -98,29 +102,34 @@ export class IndexMgmtUIPlugin coreSetup: CoreSetup, plugins: SetupDependencies ): IndexManagementPluginSetup { - if (this.config.isIndexManagementUiEnabled) { - const { fleet, usageCollection, management, cloud } = plugins; + const { fleet, usageCollection, management, cloud } = plugins; - management.sections.section.data.registerApp({ - id: PLUGIN.id, - title: i18n.translate('xpack.idxMgmt.appTitle', { defaultMessage: 'Index Management' }), - order: 0, - mount: async (params) => { - const { mountManagementSection } = await import('./application/mount_management_section'); - return mountManagementSection({ - coreSetup, - usageCollection, - params, - extensionsService: this.extensionsService, - isFleetEnabled: Boolean(fleet), - kibanaVersion: this.kibanaVersion, - config: this.config, - cloud, - canUseSyntheticSource: this.canUseSyntheticSource, - }); - }, - }); - } + this.capabilities$.subscribe((capabilities) => { + const { monitor, manageEnrich, monitorEnrich } = capabilities.index_management; + if (this.config.isIndexManagementUiEnabled && (monitor || manageEnrich || monitorEnrich)) { + management.sections.section.data.registerApp({ + id: PLUGIN.id, + title: i18n.translate('xpack.idxMgmt.appTitle', { defaultMessage: 'Index Management' }), + order: 0, + mount: async (params) => { + const { mountManagementSection } = await import( + './application/mount_management_section' + ); + return mountManagementSection({ + coreSetup, + usageCollection, + params, + extensionsService: this.extensionsService, + isFleetEnabled: Boolean(fleet), + kibanaVersion: this.kibanaVersion, + config: this.config, + cloud, + canUseSyntheticSource: this.canUseSyntheticSource, + }); + }, + }); + } + }); this.locator = plugins.share.url.locators.create( new IndexManagementLocatorDefinition({ @@ -138,6 +147,8 @@ export class IndexMgmtUIPlugin public start(coreStart: CoreStart, plugins: StartDependencies): IndexManagementPluginStart { const { fleet, usageCollection, cloud, share, console, ml, licensing } = plugins; + this.capabilities$.next(coreStart.application.capabilities); + this.licensingSubscription = licensing?.license$.subscribe((next) => { this.canUseSyntheticSource = next.hasAtLeast('enterprise'); }); diff --git a/x-pack/plugins/index_management/server/plugin.ts b/x-pack/plugins/index_management/server/plugin.ts index 0ba15c463d4ec..ab6b058cddc78 100644 --- a/x-pack/plugins/index_management/server/plugin.ts +++ b/x-pack/plugins/index_management/server/plugin.ts @@ -37,15 +37,20 @@ export class IndexMgmtServerPlugin implements Plugin { + const { root, errors } = parse(query); + // don't try modifying anything if the query is not syntactically correct + if (errors) { + return { + output: query, + corrections: [], + }; + } + + const corrections = correctAll(root); + + const multiline = /\r?\n/.test(query); + const formattedQuery = BasicPrettyPrinter.print(root, { multiline, pipeTab: '' }); + + return { + output: formattedQuery, + corrections, + }; +}; diff --git a/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/corrections/index.ts b/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/corrections/index.ts new file mode 100644 index 0000000000000..76ffd993bb9ab --- /dev/null +++ b/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/corrections/index.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 type { ESQLAstQueryExpression } from '@kbn/esql-ast'; +import type { QueryCorrection } from './types'; +import { correctTimespanLiterals } from './timespan_literals'; +import { correctLikeWildcards } from './like'; + +export type { QueryCorrection } from './types'; + +export const correctAll = (query: ESQLAstQueryExpression): QueryCorrection[] => { + const corrections: QueryCorrection[] = []; + corrections.push(...correctTimespanLiterals(query)); + corrections.push(...correctLikeWildcards(query)); + return corrections; +}; diff --git a/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/corrections/like.test.ts b/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/corrections/like.test.ts new file mode 100644 index 0000000000000..81779188c553b --- /dev/null +++ b/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/corrections/like.test.ts @@ -0,0 +1,59 @@ +/* + * 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 { parse, BasicPrettyPrinter } from '@kbn/esql-ast'; +import { correctLikeWildcards } from './like'; + +describe('correctLikeWildcards', () => { + it('replaces badly used "_" wildcard', () => { + const query = 'FROM logs | WHERE message LIKE "ba_"'; + const { root } = parse(query); + correctLikeWildcards(root); + + const output = BasicPrettyPrinter.print(root); + expect(output).toEqual('FROM logs | WHERE message LIKE "ba?"'); + }); + + it('replaces badly used "%" wildcard', () => { + const query = 'FROM logs | WHERE message LIKE "b%"'; + const { root } = parse(query); + correctLikeWildcards(root); + + const output = BasicPrettyPrinter.print(root); + expect(output).toEqual('FROM logs | WHERE message LIKE "b*"'); + }); + + it('replaces multiple bad wildcards', () => { + const query = 'FROM logs | WHERE message LIKE "a__t%"'; + const { root } = parse(query); + correctLikeWildcards(root); + + const output = BasicPrettyPrinter.print(root); + expect(output).toEqual('FROM logs | WHERE message LIKE "a??t*"'); + }); + + it('replaces bad wildcards in multiple commands and functions', () => { + const query = + 'FROM logs | WHERE message LIKE "a%" AND TO_UPPER(level) LIKE "err%" | WHERE foo LIKE "ba_"'; + const { root } = parse(query); + correctLikeWildcards(root); + + const output = BasicPrettyPrinter.print(root); + expect(output).toEqual( + 'FROM logs | WHERE message LIKE "a*" AND TO_UPPER(level) LIKE "err*" | WHERE foo LIKE "ba?"' + ); + }); + + it('does not replace escaped characters', () => { + const query = 'FROM logs | WHERE message LIKE "ba\\\\_"'; + const { root } = parse(query); + correctLikeWildcards(root); + + const output = BasicPrettyPrinter.print(root); + expect(output).toEqual('FROM logs | WHERE message LIKE "ba\\\\_"'); + }); +}); diff --git a/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/corrections/like.ts b/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/corrections/like.ts new file mode 100644 index 0000000000000..be61bd216284b --- /dev/null +++ b/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/corrections/like.ts @@ -0,0 +1,59 @@ +/* + * 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 { Walker, type ESQLAstQueryExpression } from '@kbn/esql-ast'; +import { isLikeOperatorNode, isStringLiteralNode } from '../typeguards'; +import type { ESQLLikeOperator, ESQLStringLiteral } from '../types'; +import type { QueryCorrection } from './types'; + +/** + * Correct wrong LIKE wildcard mistakes. + * The LLM can make mistake and use SQL wildcards for LIKE operators. + * + * E.g. + * `column LIKE "ba_"` => `column LIKE "ba?"` + * `column LIKE "ba%"` => `column LIKE "ba*"` + */ +export const correctLikeWildcards = (query: ESQLAstQueryExpression): QueryCorrection[] => { + const corrections: QueryCorrection[] = []; + + Walker.walk(query, { + visitFunction: (node) => { + if (isLikeOperatorNode(node)) { + corrections.push(...checkLikeNode(node)); + } + }, + }); + + return corrections; +}; + +function checkLikeNode(node: ESQLLikeOperator): QueryCorrection[] { + if (node.args.length !== 2 || !isStringLiteralNode(node.args[1])) { + return []; + } + const likeExpression = node.args[1] as ESQLStringLiteral; + + const initialValue = likeExpression.value; + + likeExpression.value = likeExpression.value + .replaceAll(/(? { + describe('with DATE_TRUNC', () => { + it('replaces a timespan with a proper timespan literal', () => { + const query = 'FROM logs | EVAL truncated = DATE_TRUNC("1 year", date)'; + const { root } = parse(query); + + correctTimespanLiterals(root); + + const output = BasicPrettyPrinter.print(root); + + expect(output).toMatchInlineSnapshot( + `"FROM logs | EVAL truncated = DATE_TRUNC(1 year, date)"` + ); + }); + + it('replaces a timespan without quantity', () => { + const query = 'FROM logs | EVAL truncated = DATE_TRUNC("month", date)'; + const { root } = parse(query); + + correctTimespanLiterals(root); + + const output = BasicPrettyPrinter.print(root); + + expect(output).toMatchInlineSnapshot( + `"FROM logs | EVAL truncated = DATE_TRUNC(1 month, date)"` + ); + }); + + it('replaces uppercase literals', () => { + const query = 'FROM logs | EVAL truncated = DATE_TRUNC("1 YEAR", date)'; + const { root } = parse(query); + + correctTimespanLiterals(root); + + const output = BasicPrettyPrinter.print(root); + + expect(output).toMatchInlineSnapshot( + `"FROM logs | EVAL truncated = DATE_TRUNC(1 year, date)"` + ); + }); + + it('returns info about the correction', () => { + const query = 'FROM logs | EVAL truncated = DATE_TRUNC("1 year", date)'; + const { root } = parse(query); + + const corrections = correctTimespanLiterals(root); + + expect(corrections).toHaveLength(1); + expect(corrections[0]).toEqual({ + type: 'string_as_timespan_literal', + description: + 'Replaced string literal with timespan literal in DATE_TRUNC function at position 29', + node: expect.any(Object), + }); + }); + }); + + describe('with BUCKET', () => { + it('replaces a timespan with a proper timespan literal', () => { + const query = 'FROM logs | STATS hires = COUNT(*) BY week = BUCKET(hire_date, "1 week")'; + const { root } = parse(query); + + correctTimespanLiterals(root); + + const output = BasicPrettyPrinter.print(root); + + expect(output).toMatchInlineSnapshot( + `"FROM logs | STATS hires = COUNT(*) BY week = BUCKET(hire_date, 1 week)"` + ); + }); + + it('replaces a timespan without quantity', () => { + const query = 'FROM logs | STATS hires = COUNT(*) BY hour = BUCKET(hire_date, "hour")'; + const { root } = parse(query); + + correctTimespanLiterals(root); + + const output = BasicPrettyPrinter.print(root); + + expect(output).toMatchInlineSnapshot( + `"FROM logs | STATS hires = COUNT(*) BY hour = BUCKET(hire_date, 1 hour)"` + ); + }); + + it('replaces uppercase literals', () => { + const query = 'FROM logs | STATS hires = COUNT(*) BY week = BUCKET(hire_date, "1 WEEK")'; + const { root } = parse(query); + + correctTimespanLiterals(root); + + const output = BasicPrettyPrinter.print(root); + + expect(output).toMatchInlineSnapshot( + `"FROM logs | STATS hires = COUNT(*) BY week = BUCKET(hire_date, 1 week)"` + ); + }); + + it('returns info about the correction', () => { + const query = 'FROM logs | STATS hires = COUNT(*) BY hour = BUCKET(hire_date, "hour")'; + const { root } = parse(query); + + const corrections = correctTimespanLiterals(root); + + expect(corrections).toHaveLength(1); + expect(corrections[0]).toEqual({ + type: 'string_as_timespan_literal', + description: + 'Replaced string literal with timespan literal in BUCKET function at position 45', + node: expect.any(Object), + }); + }); + }); + + describe('with mixed usages', () => { + it('find all occurrences in a complex query', () => { + const query = `FROM logs + | EVAL trunc_year = DATE_TRUNC("1 year", date) + | EVAL trunc_month = DATE_TRUNC("month", date) + | STATS hires = COUNT(*) BY hour = BUCKET(hire_date, "3 hour")`; + const { root } = parse(query); + + correctTimespanLiterals(root); + + const output = BasicPrettyPrinter.print(root, { multiline: true, pipeTab: '' }); + + expect(output).toMatchInlineSnapshot(` + "FROM logs + | EVAL trunc_year = DATE_TRUNC(1 year, date) + | EVAL trunc_month = DATE_TRUNC(1 month, date) + | STATS hires = COUNT(*) BY hour = BUCKET(hire_date, 3 hour)" + `); + }); + }); +}); diff --git a/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/corrections/timespan_literals.ts b/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/corrections/timespan_literals.ts new file mode 100644 index 0000000000000..039632c3d103f --- /dev/null +++ b/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/corrections/timespan_literals.ts @@ -0,0 +1,82 @@ +/* + * 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 { Walker, type ESQLAstQueryExpression } from '@kbn/esql-ast'; +import { isDateTruncFunctionNode, isBucketFunctionNode, isStringLiteralNode } from '../typeguards'; +import type { ESQLDateTruncFunction, ESQLBucketFunction } from '../types'; +import { stringToTimespanLiteral, isTimespanString } from '../ast_tools/timespan'; +import { QueryCorrection } from './types'; + +/** + * Correct timespan literal grammar mistakes, and returns the list of corrections that got applied. + * + * E.g. + * `DATE_TRUNC("YEAR", @timestamp)` => `DATE_TRUNC(1 year, @timestamp)` + * `BUCKET(@timestamp, "1 week")` => `BUCKET(@timestamp, 1 week)` + * + */ +export const correctTimespanLiterals = (query: ESQLAstQueryExpression): QueryCorrection[] => { + const corrections: QueryCorrection[] = []; + + Walker.walk(query, { + visitFunction: (node) => { + if (isDateTruncFunctionNode(node)) { + corrections.push(...checkDateTrunc(node)); + } + if (isBucketFunctionNode(node)) { + corrections.push(...checkBucket(node)); + } + }, + }); + + return corrections; +}; + +function checkDateTrunc(node: ESQLDateTruncFunction): QueryCorrection[] { + if (node.args.length !== 2) { + return []; + } + + const firstArg = node.args[0]; + + if (isStringLiteralNode(firstArg) && isTimespanString(firstArg.value)) { + const replacement = stringToTimespanLiteral(firstArg.value); + node.args[0] = replacement; + + const correction: QueryCorrection = { + type: 'string_as_timespan_literal', + node, + description: `Replaced string literal with timespan literal in DATE_TRUNC function at position ${node.location.min}`, + }; + return [correction]; + } + + return []; +} + +function checkBucket(node: ESQLBucketFunction): QueryCorrection[] { + // only checking the 2 args version - e.g. BUCKET(hire_date, 1 week) + if (node.args.length !== 2) { + return []; + } + + const secondArg = node.args[1]; + + if (isStringLiteralNode(secondArg) && isTimespanString(secondArg.value)) { + const replacement = stringToTimespanLiteral(secondArg.value); + node.args[1] = replacement; + + const correction: QueryCorrection = { + type: 'string_as_timespan_literal', + node, + description: `Replaced string literal with timespan literal in BUCKET function at position ${node.location.min}`, + }; + return [correction]; + } + + return []; +} diff --git a/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/corrections/types.ts b/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/corrections/types.ts new file mode 100644 index 0000000000000..dc1210c84acc2 --- /dev/null +++ b/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/corrections/types.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { ESQLSingleAstItem } from '@kbn/esql-ast'; + +/** + * Represents a correction that was applied to the query + */ +export interface QueryCorrection { + /** The type of correction */ + type: string; + /** A human-friendly-ish description of the correction */ + description: string; + /** The parent node the correction was applied to */ + node: ESQLSingleAstItem; +} diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/error_connecting/index.ts b/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/index.ts similarity index 81% rename from x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/error_connecting/index.ts rename to x-pack/plugins/inference/common/tasks/nl_to_esql/ast/index.ts index 59ac4e0e37efe..d0e1a4808829a 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/error_connecting/index.ts +++ b/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export { ErrorConnecting } from './error_connecting'; +export { correctQueryWithAst } from './correct_with_ast'; diff --git a/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/typeguards.ts b/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/typeguards.ts new file mode 100644 index 0000000000000..54bbe2f7300a9 --- /dev/null +++ b/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/typeguards.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 type { + ESQLSingleAstItem, + ESQLAstItem, + ESQLFunction, + ESQLLiteral, + ESQLColumn, +} from '@kbn/esql-ast'; +import type { + ESQLStringLiteral, + ESQLDateTruncFunction, + ESQLBucketFunction, + ESQLLikeOperator, +} from './types'; + +export function isSingleItem(item: ESQLAstItem): item is ESQLSingleAstItem { + return Object.hasOwn(item, 'type'); +} + +export function isFunctionNode(node: ESQLAstItem): node is ESQLFunction { + return isSingleItem(node) && node.type === 'function'; +} + +export function isColumnNode(node: ESQLAstItem): node is ESQLColumn { + return isSingleItem(node) && node.type === 'column'; +} + +export function isLiteralNode(node: ESQLAstItem): node is ESQLLiteral { + return isSingleItem(node) && node.type === 'literal'; +} + +export function isStringLiteralNode(node: ESQLAstItem): node is ESQLStringLiteral { + return isLiteralNode(node) && node.literalType === 'keyword'; +} + +export function isDateTruncFunctionNode(node: ESQLAstItem): node is ESQLDateTruncFunction { + return isFunctionNode(node) && node.subtype === 'variadic-call' && node.name === 'date_trunc'; +} + +export function isBucketFunctionNode(node: ESQLAstItem): node is ESQLBucketFunction { + return isFunctionNode(node) && node.subtype === 'variadic-call' && node.name === 'bucket'; +} + +export function isLikeOperatorNode(node: ESQLAstItem): node is ESQLLikeOperator { + return isFunctionNode(node) && node.subtype === 'binary-expression' && node.name === 'like'; +} diff --git a/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/types.ts b/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/types.ts new file mode 100644 index 0000000000000..6444f1490f3d2 --- /dev/null +++ b/x-pack/plugins/inference/common/tasks/nl_to_esql/ast/types.ts @@ -0,0 +1,28 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { ESQLFunction, ESQLLiteral } from '@kbn/esql-ast'; + +/** + * represents a DATE_TRUNC function node. + */ +export type ESQLDateTruncFunction = ESQLFunction<'variadic-call', 'date_trunc'>; + +/** + * represents a LIKE function node. + */ +export type ESQLLikeOperator = ESQLFunction<'binary-expression', 'like'>; + +/** + * represents a BUCKET function node. + */ +export type ESQLBucketFunction = ESQLFunction<'variadic-call', 'bucket'>; + +/** + * represents an ESQL string literal. + */ +export type ESQLStringLiteral = Extract; diff --git a/x-pack/plugins/inference/common/tasks/nl_to_esql/correct_esql_query.test.ts b/x-pack/plugins/inference/common/tasks/nl_to_esql/correct_esql_query.test.ts new file mode 100644 index 0000000000000..22ae55f772e95 --- /dev/null +++ b/x-pack/plugins/inference/common/tasks/nl_to_esql/correct_esql_query.test.ts @@ -0,0 +1,84 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { correctCommonEsqlMistakes } from './correct_esql_query'; + +jest.mock('./ast'); +jest.mock('./non_ast'); +import { correctQueryWithAst } from './ast'; +import { correctCommonEsqlMistakes as correctQueryWithoutAst } from './non_ast'; + +const correctQueryWithAstMock = correctQueryWithAst as jest.MockedFn; +const correctQueryWithoutAstMock = correctQueryWithoutAst as jest.MockedFn< + typeof correctQueryWithoutAst +>; + +describe('correctCommonEsqlMistakes', () => { + beforeEach(() => { + correctQueryWithoutAstMock.mockImplementation((query) => { + return { + input: query, + output: query, + isCorrection: false, + }; + }); + correctQueryWithAstMock.mockImplementation((query) => { + return { + output: query, + corrections: [], + }; + }); + }); + + afterEach(() => { + correctQueryWithoutAstMock.mockReset(); + correctQueryWithAstMock.mockReset(); + }); + + it('calls correctQueryWithoutAst with the right parameters', () => { + const inputQuery = 'FROM logs | WHERE foo > bar'; + correctCommonEsqlMistakes(inputQuery); + + expect(correctQueryWithoutAstMock).toHaveBeenCalledTimes(1); + expect(correctQueryWithoutAstMock).toHaveBeenCalledWith(inputQuery); + }); + + it('calls correctQueryWithAst with the right parameters', () => { + const inputQuery = 'FROM logs | WHERE foo > bar'; + const correctQueryWithoutAstResult = 'FROM logs | WHERE foo > dolly'; + + correctQueryWithoutAstMock.mockImplementation((query) => { + return { + input: inputQuery, + output: correctQueryWithoutAstResult, + isCorrection: true, + }; + }); + + correctCommonEsqlMistakes(inputQuery); + + expect(correctQueryWithAstMock).toHaveBeenCalledTimes(1); + expect(correctQueryWithAstMock).toHaveBeenCalledWith(correctQueryWithoutAstResult); + }); + + it('returns the corrected query', () => { + const inputQuery = 'FROM logs | WHERE foo > bar'; + const correctQueryWithAstResult = 'FROM logs | WHERE foo > dolly'; + + correctQueryWithAstMock.mockImplementation((query) => { + return { + output: correctQueryWithAstResult, + corrections: [], + }; + }); + + const { input, output } = correctCommonEsqlMistakes(inputQuery); + + expect(input).toEqual(inputQuery); + expect(output).toEqual(correctQueryWithAstResult); + }); +}); diff --git a/x-pack/plugins/inference/common/tasks/nl_to_esql/correct_esql_query.ts b/x-pack/plugins/inference/common/tasks/nl_to_esql/correct_esql_query.ts new file mode 100644 index 0000000000000..4ad96323cc7ea --- /dev/null +++ b/x-pack/plugins/inference/common/tasks/nl_to_esql/correct_esql_query.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 { correctQueryWithAst } from './ast'; +import { correctCommonEsqlMistakes as correctQueryWithoutAst } from './non_ast'; + +/** + * Correct some common ES|QL syntax and grammar mistakes that LLM can potentially do. + * + * Correcting the query is done in two steps: + * 1. we try to correct the *syntax*, without AST (given it requires a valid syntax) + * 2. we try to correct the *grammar*, using AST this time. + */ +export const correctCommonEsqlMistakes = (query: string) => { + const { output: outputWithoutAst, isCorrection: correctionWithoutAst } = + correctQueryWithoutAst(query); + const { output: corrected, corrections } = correctQueryWithAst(outputWithoutAst); + return { + input: query, + output: corrected, + isCorrection: correctionWithoutAst || corrections.length > 0, + }; +}; diff --git a/x-pack/plugins/inference/common/tasks/nl_to_esql/correct_query_with_actions.test.ts b/x-pack/plugins/inference/common/tasks/nl_to_esql/correct_query_with_actions.test.ts deleted file mode 100644 index 818f4854e038d..0000000000000 --- a/x-pack/plugins/inference/common/tasks/nl_to_esql/correct_query_with_actions.test.ts +++ /dev/null @@ -1,46 +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 { correctQueryWithActions } from './correct_query_with_actions'; - -describe('correctQueryWithActions', () => { - it(`fixes errors correctly for a query with one syntax error for stats`, async () => { - const fixedQuery = await correctQueryWithActions('from logstash-* | stats aveg(bytes)'); - expect(fixedQuery).toBe('from logstash-* | stats avg(bytes)'); - }); - - it(`fixes errors correctly for a query with 2 syntax errors for stats`, async () => { - const fixedQuery = await correctQueryWithActions( - 'from logstash-* | stats aveg(bytes), max2(bytes)' - ); - expect(fixedQuery).toBe('from logstash-* | stats avg(bytes), max(bytes)'); - }); - - it(`fixes errors correctly for a query with one syntax error for eval`, async () => { - const fixedQuery = await correctQueryWithActions( - 'from logstash-* | stats var0 = max(bytes) | eval ab(var0) | limit 1' - ); - expect(fixedQuery).toBe('from logstash-* | stats var0 = max(bytes) | eval abs(var0) | limit 1'); - }); - - it(`fixes errors correctly for a query with two syntax error for eval`, async () => { - const fixedQuery = await correctQueryWithActions( - 'from logstash-* | stats var0 = max2(bytes) | eval ab(var0) | limit 1' - ); - expect(fixedQuery).toBe('from logstash-* | stats var0 = max(bytes) | eval abs(var0) | limit 1'); - }); - - it(`doesnt complain for @timestamp column`, async () => { - const queryWithTimestamp = `FROM logstash-* - | WHERE @timestamp >= NOW() - 15 minutes - | EVAL bucket = DATE_TRUNC(1 minute, @timestamp) - | STATS avg_cpu = AVG(system.cpu.total.norm.pct) BY service.name, bucket - | SORT avg_cpu DESC - | LIMIT 10`; - const fixedQuery = await correctQueryWithActions(queryWithTimestamp); - expect(fixedQuery).toBe(queryWithTimestamp); - }); -}); diff --git a/x-pack/plugins/inference/common/tasks/nl_to_esql/correct_query_with_actions.ts b/x-pack/plugins/inference/common/tasks/nl_to_esql/correct_query_with_actions.ts deleted file mode 100644 index 30e2c11adb6de..0000000000000 --- a/x-pack/plugins/inference/common/tasks/nl_to_esql/correct_query_with_actions.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 { validateQuery, getActions } from '@kbn/esql-validation-autocomplete'; -import { getAstAndSyntaxErrors } from '@kbn/esql-ast'; - -const fixedQueryByOneAction = async (queryString: string) => { - const { errors } = await validateQuery(queryString, getAstAndSyntaxErrors, { - ignoreOnMissingCallbacks: true, - }); - - const actions = await getActions(queryString, errors, getAstAndSyntaxErrors, { - relaxOnMissingCallbacks: true, - }); - - if (actions.length) { - const [firstAction] = actions; - const range = firstAction.edits[0].range; - const correctText = firstAction.edits[0].text; - const problematicString = queryString.substring(range.startColumn - 1, range.endColumn - 1); - const fixedQuery = queryString.replace(problematicString, correctText); - - return { - query: fixedQuery, - shouldRunAgain: Boolean(actions.length), - }; - } - return { - query: queryString, - shouldRunAgain: false, - }; -}; - -/** - * @param queryString - * @returns corrected queryString - * The cases that are handled are: - * - Query stats / eval functions have typos e.g. aveg instead of avg - * - Unquoted fields e.g. keep field-1 instead of keep `field-1` - * - Unquoted fields in stats or eval e.g. stats avg(field-1) instead of stats avg(`field-1`) - * - Combination of the above - */ - -export const correctQueryWithActions = async (queryString: string) => { - let shouldCorrectQuery = true; - let fixedQuery = queryString; - // this is an escape hatch, the loop will end automatically if the ast doesnt return more actions - // in case it goes wrong, we allow it to loop 10 times - let limit = 10; - - while (shouldCorrectQuery && limit >= 0) { - const { query, shouldRunAgain } = await fixedQueryByOneAction(fixedQuery); - shouldCorrectQuery = shouldRunAgain; - fixedQuery = query; - limit--; - } - - return fixedQuery; -}; diff --git a/x-pack/plugins/inference/common/tasks/nl_to_esql/get_errors_with_commands.test.ts b/x-pack/plugins/inference/common/tasks/nl_to_esql/get_errors_with_commands.test.ts deleted file mode 100644 index 04d99aede62b8..0000000000000 --- a/x-pack/plugins/inference/common/tasks/nl_to_esql/get_errors_with_commands.test.ts +++ /dev/null @@ -1,25 +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 { getErrorsWithCommands } from './get_errors_with_commands'; - -describe('getErrorsWithCommands', () => { - it('returns the command associated with the error', () => { - expect( - getErrorsWithCommands(`FROM logs-* | WHERE @timestamp <= NOW() | STATS BY host.name`, [ - { - type: 'error', - text: 'Syntax error', - code: '', - location: { - min: 24, - max: 36, - }, - }, - ]) - ).toEqual(['Error in `| WHERE @timestamp <= NOW()`:\n Syntax error']); - }); -}); diff --git a/x-pack/plugins/inference/common/tasks/nl_to_esql/get_errors_with_commands.ts b/x-pack/plugins/inference/common/tasks/nl_to_esql/get_errors_with_commands.ts deleted file mode 100644 index b25c79161f79b..0000000000000 --- a/x-pack/plugins/inference/common/tasks/nl_to_esql/get_errors_with_commands.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import type { EditorError, ESQLMessage } from '@kbn/esql-ast'; -import { splitIntoCommands } from './correct_common_esql_mistakes'; - -export function getErrorsWithCommands(query: string, errors: Array) { - const asCommands = splitIntoCommands(query); - - const errorMessages = errors.map((error) => { - if ('location' in error) { - const commandsUntilEndOfError = splitIntoCommands(query.substring(0, error.location.max)); - const lastCompleteCommand = asCommands[commandsUntilEndOfError.length - 1]; - if (lastCompleteCommand) { - return `Error in \`| ${lastCompleteCommand.command}\`:\n ${error.text}`; - } - } - return 'text' in error ? error.text : error.message; - }); - - return errorMessages; -} diff --git a/x-pack/plugins/inference/common/tasks/nl_to_esql/index.ts b/x-pack/plugins/inference/common/tasks/nl_to_esql/index.ts new file mode 100644 index 0000000000000..2efacc374e8cd --- /dev/null +++ b/x-pack/plugins/inference/common/tasks/nl_to_esql/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 { correctCommonEsqlMistakes } from './correct_esql_query'; +export { splitIntoCommands } from './non_ast'; diff --git a/x-pack/plugins/inference/common/tasks/nl_to_esql/correct_common_esql_mistakes.test.ts b/x-pack/plugins/inference/common/tasks/nl_to_esql/non_ast/correct_common_esql_mistakes.test.ts similarity index 99% rename from x-pack/plugins/inference/common/tasks/nl_to_esql/correct_common_esql_mistakes.test.ts rename to x-pack/plugins/inference/common/tasks/nl_to_esql/non_ast/correct_common_esql_mistakes.test.ts index 8c6b90bca76ab..9d4b064b35f61 100644 --- a/x-pack/plugins/inference/common/tasks/nl_to_esql/correct_common_esql_mistakes.test.ts +++ b/x-pack/plugins/inference/common/tasks/nl_to_esql/non_ast/correct_common_esql_mistakes.test.ts @@ -4,6 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ + import { correctCommonEsqlMistakes } from './correct_common_esql_mistakes'; describe('correctCommonEsqlMistakes', () => { diff --git a/x-pack/plugins/inference/common/tasks/nl_to_esql/correct_common_esql_mistakes.ts b/x-pack/plugins/inference/common/tasks/nl_to_esql/non_ast/correct_common_esql_mistakes.ts similarity index 100% rename from x-pack/plugins/inference/common/tasks/nl_to_esql/correct_common_esql_mistakes.ts rename to x-pack/plugins/inference/common/tasks/nl_to_esql/non_ast/correct_common_esql_mistakes.ts diff --git a/x-pack/plugins/inference/common/tasks/nl_to_esql/non_ast/index.ts b/x-pack/plugins/inference/common/tasks/nl_to_esql/non_ast/index.ts new file mode 100644 index 0000000000000..2752f82ce9c43 --- /dev/null +++ b/x-pack/plugins/inference/common/tasks/nl_to_esql/non_ast/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 { correctCommonEsqlMistakes, splitIntoCommands } from './correct_common_esql_mistakes'; diff --git a/x-pack/plugins/inference/public/util/create_observable_from_http_response.ts b/x-pack/plugins/inference/public/util/create_observable_from_http_response.ts index 862986ce1c73a..d7520a86d6922 100644 --- a/x-pack/plugins/inference/public/util/create_observable_from_http_response.ts +++ b/x-pack/plugins/inference/public/util/create_observable_from_http_response.ts @@ -26,10 +26,10 @@ export function createObservableFromHttpResponse( } return new Observable((subscriber) => { - const parser = createParser((event) => { - if (event.type === 'event') { + const parser = createParser({ + onEvent: (event) => { subscriber.next(event.data); - } + }, }); const readStream = async () => { diff --git a/x-pack/plugins/inference/scripts/load_esql_docs/load_esql_docs.ts b/x-pack/plugins/inference/scripts/load_esql_docs/load_esql_docs.ts index a35491a476040..fba1d75956bf0 100644 --- a/x-pack/plugins/inference/scripts/load_esql_docs/load_esql_docs.ts +++ b/x-pack/plugins/inference/scripts/load_esql_docs/load_esql_docs.ts @@ -13,7 +13,7 @@ import Path from 'path'; import yargs, { Argv } from 'yargs'; import { REPO_ROOT } from '@kbn/repo-info'; import { INLINE_ESQL_QUERY_REGEX } from '../../common/tasks/nl_to_esql/constants'; -import { correctCommonEsqlMistakes } from '../../common/tasks/nl_to_esql/correct_common_esql_mistakes'; +import { correctCommonEsqlMistakes } from '../../common/tasks/nl_to_esql'; import { connectorIdOption, elasticsearchOption, kibanaOption } from '../util/cli_options'; import { getServiceUrls } from '../util/get_service_urls'; import { KibanaClient } from '../util/kibana_client'; diff --git a/x-pack/plugins/inference/server/chat_complete/adapters/gemini/process_vertex_stream.test.ts b/x-pack/plugins/inference/server/chat_complete/adapters/gemini/process_vertex_stream.test.ts index 8613799846e3b..01c93107a199a 100644 --- a/x-pack/plugins/inference/server/chat_complete/adapters/gemini/process_vertex_stream.test.ts +++ b/x-pack/plugins/inference/server/chat_complete/adapters/gemini/process_vertex_stream.test.ts @@ -97,6 +97,11 @@ describe('processVertexStream', () => { expectObservable(processed$).toBe('--(ab)', { a: { + content: 'last chunk', + tool_calls: [], + type: ChatCompletionEventType.ChatCompletionChunk, + }, + b: { tokens: { completion: 1, prompt: 2, @@ -104,11 +109,6 @@ describe('processVertexStream', () => { }, type: ChatCompletionEventType.ChatCompletionTokenCount, }, - b: { - content: 'last chunk', - tool_calls: [], - type: ChatCompletionEventType.ChatCompletionChunk, - }, }); }); }); diff --git a/x-pack/plugins/inference/server/chat_complete/adapters/gemini/process_vertex_stream.ts b/x-pack/plugins/inference/server/chat_complete/adapters/gemini/process_vertex_stream.ts index 3081317882c65..7b2ed2869c21d 100644 --- a/x-pack/plugins/inference/server/chat_complete/adapters/gemini/process_vertex_stream.ts +++ b/x-pack/plugins/inference/server/chat_complete/adapters/gemini/process_vertex_stream.ts @@ -18,18 +18,6 @@ export function processVertexStream() { return (source: Observable) => new Observable((subscriber) => { function handleNext(value: GenerateContentResponseChunk) { - // completion: only present on last chunk - if (value.usageMetadata) { - subscriber.next({ - type: ChatCompletionEventType.ChatCompletionTokenCount, - tokens: { - prompt: value.usageMetadata.promptTokenCount, - completion: value.usageMetadata.candidatesTokenCount, - total: value.usageMetadata.totalTokenCount, - }, - }); - } - const contentPart = value.candidates?.[0].content.parts[0]; const completion = contentPart?.text; const toolCall = contentPart?.functionCall; @@ -49,6 +37,18 @@ export function processVertexStream() { : [], }); } + + // completion: only present on last chunk + if (value.usageMetadata) { + subscriber.next({ + type: ChatCompletionEventType.ChatCompletionTokenCount, + tokens: { + prompt: value.usageMetadata.promptTokenCount, + completion: value.usageMetadata.candidatesTokenCount, + total: value.usageMetadata.totalTokenCount, + }, + }); + } } source.subscribe({ diff --git a/x-pack/plugins/inference/server/routes/chat_complete.ts b/x-pack/plugins/inference/server/routes/chat_complete.ts index b363c88352994..8b4cc49dfaa46 100644 --- a/x-pack/plugins/inference/server/routes/chat_complete.ts +++ b/x-pack/plugins/inference/server/routes/chat_complete.ts @@ -13,7 +13,13 @@ import type { RequestHandlerContext, KibanaRequest, } from '@kbn/core/server'; -import { MessageRole, ToolCall, ToolChoiceType } from '@kbn/inference-common'; +import { + MessageRole, + ToolCall, + ToolChoiceType, + InferenceTaskEventType, + isInferenceError, +} from '@kbn/inference-common'; import type { ChatCompleteRequestBody } from '../../common/http_apis'; import { createClient as createInferenceClient } from '../inference_client'; import { InferenceServerStart, InferenceStartDependencies } from '../types'; @@ -130,10 +136,22 @@ export function registerChatCompleteRoute({ }, }, async (context, request, response) => { - const chatCompleteResponse = await callChatComplete({ request, stream: false }); - return response.ok({ - body: chatCompleteResponse, - }); + try { + const chatCompleteResponse = await callChatComplete({ request, stream: false }); + return response.ok({ + body: chatCompleteResponse, + }); + } catch (e) { + return response.custom({ + statusCode: isInferenceError(e) ? e.meta?.status ?? 500 : 500, + bypassErrorFormat: true, + body: { + type: InferenceTaskEventType.error, + code: e.code ?? 'unknown', + message: e.message, + }, + }); + } } ); @@ -145,9 +163,9 @@ export function registerChatCompleteRoute({ }, }, async (context, request, response) => { - const chatCompleteResponse = await callChatComplete({ request, stream: true }); + const chatCompleteEvents$ = await callChatComplete({ request, stream: true }); return response.ok({ - body: observableIntoEventSourceStream(chatCompleteResponse, logger), + body: observableIntoEventSourceStream(chatCompleteEvents$, logger), }); } ); diff --git a/x-pack/plugins/inference/server/tasks/nl_to_esql/validate_esql_query.ts b/x-pack/plugins/inference/server/tasks/nl_to_esql/validate_esql_query.ts index 823344f52a891..049e627303d1b 100644 --- a/x-pack/plugins/inference/server/tasks/nl_to_esql/validate_esql_query.ts +++ b/x-pack/plugins/inference/server/tasks/nl_to_esql/validate_esql_query.ts @@ -11,7 +11,7 @@ import type { ElasticsearchClient } from '@kbn/core/server'; import { ESQLSearchResponse, ESQLRow } from '@kbn/es-types'; import { esFieldTypeToKibanaFieldType } from '@kbn/field-types'; import { DatatableColumn, DatatableColumnType } from '@kbn/expressions-plugin/common'; -import { splitIntoCommands } from '../../../common/tasks/nl_to_esql/correct_common_esql_mistakes'; +import { splitIntoCommands } from '../../../common'; export async function runAndValidateEsqlQuery({ query, diff --git a/x-pack/plugins/inference/server/util/event_source_stream_into_observable.ts b/x-pack/plugins/inference/server/util/event_source_stream_into_observable.ts index cad0a8e84d6a7..42844632aa03b 100644 --- a/x-pack/plugins/inference/server/util/event_source_stream_into_observable.ts +++ b/x-pack/plugins/inference/server/util/event_source_stream_into_observable.ts @@ -11,10 +11,10 @@ import { Observable } from 'rxjs'; export function eventSourceStreamIntoObservable(readable: Readable) { return new Observable((subscriber) => { - const parser = createParser((event) => { - if (event.type === 'event') { + const parser = createParser({ + onEvent: (event) => { subscriber.next(event.data); - } + }, }); async function processStream() { diff --git a/x-pack/plugins/inference/server/util/observable_into_event_source_stream.test.ts b/x-pack/plugins/inference/server/util/observable_into_event_source_stream.test.ts index 8ece214c27599..a815b22854118 100644 --- a/x-pack/plugins/inference/server/util/observable_into_event_source_stream.test.ts +++ b/x-pack/plugins/inference/server/util/observable_into_event_source_stream.test.ts @@ -72,10 +72,10 @@ describe('observableIntoEventSourceStream', () => { const events: Array> = []; - const parser = createParser((event) => { - if (event.type === 'event') { + const parser = createParser({ + onEvent: (event) => { events.push(JSON.parse(event.data)); - } + }, }); chunks.forEach((chunk) => { diff --git a/x-pack/plugins/integration_assistant/common/api/generation_error.test.ts b/x-pack/plugins/integration_assistant/common/api/generation_error.test.ts new file mode 100644 index 0000000000000..b18414610664c --- /dev/null +++ b/x-pack/plugins/integration_assistant/common/api/generation_error.test.ts @@ -0,0 +1,63 @@ +/* + * 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 { GenerationErrorCode } from '../constants'; +import { isGenerationErrorBody } from './generation_error'; +import type { GenerationErrorBody } from './generation_error'; + +describe('isGenerationErrorBody', () => { + it('should return true for a valid GenerationErrorBody object', () => { + const validErrorBody: GenerationErrorBody = { + message: 'An error occurred', + attributes: { + errorCode: GenerationErrorCode.CEF_ERROR, + underlyingMessages: ['Error message 1', 'Error message 2'], + }, + }; + + expect(isGenerationErrorBody(validErrorBody)).toBe(true); + }); + + it('should return false for an object without a message', () => { + const invalidErrorBody = { + attributes: { + errorCode: 'ERROR_CODE', + underlyingMessages: ['Error message 1', 'Error message 2'], + }, + }; + + expect(isGenerationErrorBody(invalidErrorBody)).toBe(false); + }); + + it('should return false for an object without attributes', () => { + const invalidErrorBody = { + message: 'An error occurred', + }; + + expect(isGenerationErrorBody(invalidErrorBody)).toBe(false); + }); + + it('should return false for an object with invalid attributes', () => { + const invalidErrorBody = { + message: 'An error occurred', + attributes: { + errorCode: 123, // errorCode should be a string + underlyingMessages: 'Error message', // underlyingMessages should be an array + }, + }; + + expect(isGenerationErrorBody(invalidErrorBody)).toBe(false); + }); + + it('should return false for a non-object value', () => { + expect(isGenerationErrorBody(null)).toBe(false); + expect(isGenerationErrorBody(undefined)).toBe(false); + expect(isGenerationErrorBody('string')).toBe(false); + expect(isGenerationErrorBody(123)).toBe(false); + expect(isGenerationErrorBody(true)).toBe(false); + }); +}); diff --git a/x-pack/plugins/integration_assistant/common/api/generation_error.ts b/x-pack/plugins/integration_assistant/common/api/generation_error.ts index e96ad8bff9b59..03f01e96bee53 100644 --- a/x-pack/plugins/integration_assistant/common/api/generation_error.ts +++ b/x-pack/plugins/integration_assistant/common/api/generation_error.ts @@ -13,6 +13,12 @@ export interface GenerationErrorBody { attributes: GenerationErrorAttributes; } +export interface ErrorMessageWithLink { + link: string; + linkText: string; + errorMessage: string; +} + export function isGenerationErrorBody(obj: unknown | undefined): obj is GenerationErrorBody { return ( typeof obj === 'object' && @@ -27,7 +33,8 @@ export function isGenerationErrorBody(obj: unknown | undefined): obj is Generati export interface GenerationErrorAttributes { errorCode: GenerationErrorCode; - underlyingMessages: string[] | undefined; + underlyingMessages?: string[] | undefined; + errorMessageWithLink?: ErrorMessageWithLink | undefined; } export function isGenerationErrorAttributes(obj: unknown): obj is GenerationErrorAttributes { diff --git a/x-pack/plugins/integration_assistant/common/api/model/common_attributes.gen.ts b/x-pack/plugins/integration_assistant/common/api/model/common_attributes.gen.ts index 803f9b8a6c3af..3b8dac7af22ca 100644 --- a/x-pack/plugins/integration_assistant/common/api/model/common_attributes.gen.ts +++ b/x-pack/plugins/integration_assistant/common/api/model/common_attributes.gen.ts @@ -84,6 +84,7 @@ export const SamplesFormatName = z.enum([ 'structured', 'unstructured', 'unsupported', + 'cef', ]); export type SamplesFormatNameEnum = typeof SamplesFormatName.enum; export const SamplesFormatNameEnum = SamplesFormatName.enum; diff --git a/x-pack/plugins/integration_assistant/common/api/model/common_attributes.schema.yaml b/x-pack/plugins/integration_assistant/common/api/model/common_attributes.schema.yaml index 900b6e362a754..23ad137d8d83a 100644 --- a/x-pack/plugins/integration_assistant/common/api/model/common_attributes.schema.yaml +++ b/x-pack/plugins/integration_assistant/common/api/model/common_attributes.schema.yaml @@ -64,6 +64,7 @@ components: - structured - unstructured - unsupported + - cef SamplesFormat: type: object diff --git a/x-pack/plugins/integration_assistant/common/constants.ts b/x-pack/plugins/integration_assistant/common/constants.ts index 4d791341e34f9..3026101ebf54d 100644 --- a/x-pack/plugins/integration_assistant/common/constants.ts +++ b/x-pack/plugins/integration_assistant/common/constants.ts @@ -35,6 +35,7 @@ export enum GenerationErrorCode { RECURSION_LIMIT_ANALYZE_LOGS = 'recursion-limit-analyze-logs', UNSUPPORTED_LOG_SAMPLES_FORMAT = 'unsupported-log-samples-format', UNPARSEABLE_CSV_DATA = 'unparseable-csv-data', + CEF_ERROR = 'cef-not-supported', } // Size limits diff --git a/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/error_with_link.test.tsx b/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/error_with_link.test.tsx new file mode 100644 index 0000000000000..105bacf45e92c --- /dev/null +++ b/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/error_with_link.test.tsx @@ -0,0 +1,43 @@ +/* + * 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 { render } from '@testing-library/react'; +import { ErrorMessage, isErrorMessageWithLink, MessageLink } from './error_with_link'; + +describe('isErrorMessageWithLink', () => { + it('should return true when error is an ErrorMessageWithLink', () => { + const error = { + link: 'http://example.com', + errorMessage: 'An error occurred', + linkText: 'decode_cef', + }; + expect(isErrorMessageWithLink(error)).toBe(true); + }); + + it('should return false when error is a string', () => { + const error = 'An error occurred'; + expect(isErrorMessageWithLink(error)).toBe(false); + }); + + describe('MessageLink', () => { + it('should render link with correct href and text', () => { + const { getByText } = render(); + const linkElement = getByText('decode_cef'); + expect(linkElement).toBeInTheDocument(); + expect(linkElement).toHaveAttribute('href', 'http://example.com'); + }); + }); + + describe('ErrorMessage', () => { + it('should render error message when error is a string', () => { + const error = 'An error occurred'; + const { getByText } = render(); + expect(getByText('An error occurred')).toBeInTheDocument(); + }); + }); +}); diff --git a/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/error_with_link.tsx b/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/error_with_link.tsx new file mode 100644 index 0000000000000..8791e9f03a0f8 --- /dev/null +++ b/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/error_with_link.tsx @@ -0,0 +1,59 @@ +/* + * 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 { FormattedMessage } from '@kbn/i18n-react'; +import { EuiLink } from '@elastic/eui'; +import type { ErrorMessageWithLink } from '../../../../../../common/api/generation_error'; + +interface ErrorMessageProps { + error: string | null | ErrorMessageWithLink; +} + +interface MessageLinkProps { + link: string; + linkText: string; +} + +export const isErrorMessageWithLink = ( + error: string | ErrorMessageWithLink | null +): error is ErrorMessageWithLink => { + return ( + (error as ErrorMessageWithLink).link !== undefined && + (error as ErrorMessageWithLink).linkText !== undefined && + (error as ErrorMessageWithLink).errorMessage !== undefined + ); +}; + +export const MessageLink = React.memo(({ link, linkText }) => { + return ( + + {linkText} + + ); +}); +MessageLink.displayName = 'MessageLink'; + +export const ErrorMessage = React.memo(({ error }) => { + return ( + <> + {isErrorMessageWithLink(error) ? ( + , + }} + /> + ) : typeof error === 'string' ? ( + <>{error} + ) : null} + + ); +}); +ErrorMessage.displayName = 'ErrorMessage'; diff --git a/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/generation_modal.tsx b/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/generation_modal.tsx index ba57d83618c13..9d8d52a5b8783 100644 --- a/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/generation_modal.tsx +++ b/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/generation_modal.tsx @@ -28,6 +28,7 @@ import * as i18n from './translations'; import type { OnComplete, ProgressItem } from './use_generation'; import { ProgressOrder, useGeneration } from './use_generation'; +import { ErrorMessage } from './error_with_link'; const progressText: Record = { analyzeLogs: i18n.PROGRESS_ANALYZE_LOGS, @@ -87,7 +88,7 @@ export const GenerationModal = React.memo( iconType="alert" data-test-subj="generationErrorCallout" > - {error} + ) : ( diff --git a/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/translations.ts b/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/translations.ts index ec90568da0ef9..8f2aab49622f0 100644 --- a/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/translations.ts +++ b/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/translations.ts @@ -188,6 +188,13 @@ export const RETRY = i18n.translate('xpack.integrationAssistant.step.dataStream. defaultMessage: 'Retry', }); +export const DECODE_CEF_LINK = i18n.translate( + 'xpack.integrationAssistant.errors.cefFormat.decodeLink', + { + defaultMessage: 'CEF format not supported yet. Instead please use CEF Integration:', + } +); + export const GENERATION_ERROR_TRANSLATION: Record< GenerationErrorCode, string | ((attributes: GenerationErrorAttributes) => string) @@ -211,6 +218,11 @@ export const GENERATION_ERROR_TRANSLATION: Record< defaultMessage: 'Unsupported log format in the samples.', } ), + [GenerationErrorCode.CEF_ERROR]: i18n.translate('xpack.integrationAssistant.errors.cefError', { + // This is a default error message if the linking does not work. + defaultMessage: + 'CEF format detected. Please decode the CEF logs into JSON format using filebeat decode_cef processor.', + }), [GenerationErrorCode.UNPARSEABLE_CSV_DATA]: (attributes) => { if ( attributes.underlyingMessages !== undefined && diff --git a/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/use_generation.tsx b/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/use_generation.tsx index 566451d624c5e..de6b2eed038ec 100644 --- a/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/use_generation.tsx +++ b/x-pack/plugins/integration_assistant/public/components/create_integration/create_integration_assistant/steps/data_stream_step/use_generation.tsx @@ -28,6 +28,8 @@ import type { State } from '../../state'; import * as i18n from './translations'; import { useTelemetry } from '../../../telemetry'; import type { AIConnector, IntegrationSettings } from '../../types'; +import type { ErrorMessageWithLink } from '../../../../../../common/api/generation_error'; +import { GenerationErrorCode } from '../../../../../../common/constants'; export type OnComplete = (result: State['result']) => void; export const ProgressOrder = ['analyzeLogs', 'ecs', 'categorization', 'related'] as const; @@ -48,12 +50,23 @@ interface RunGenerationProps { // If the result is classified as a generation error, produce an error message // as defined in the i18n file. Otherwise, return undefined. -function generationErrorMessage(body: unknown | undefined): string | undefined { +function generationErrorMessage( + body: unknown | undefined +): string | ErrorMessageWithLink | undefined { if (!isGenerationErrorBody(body)) { return; } const errorCode = body.attributes.errorCode; + if (errorCode === GenerationErrorCode.CEF_ERROR) { + if (body.attributes.errorMessageWithLink !== undefined) { + return { + link: body.attributes.errorMessageWithLink.link, + errorMessage: i18n.DECODE_CEF_LINK, + linkText: body.attributes.errorMessageWithLink.linkText, + }; + } + } const translation = i18n.GENERATION_ERROR_TRANSLATION[errorCode]; return typeof translation === 'function' ? translation(body.attributes) : translation; } @@ -72,7 +85,7 @@ export const useGeneration = ({ const { reportGenerationComplete } = useTelemetry(); const { http, notifications } = useKibana().services; const [progress, setProgress] = useState(); - const [error, setError] = useState(null); + const [error, setError] = useState(null); const [isRequesting, setIsRequesting] = useState(true); useEffect(() => { diff --git a/x-pack/plugins/integration_assistant/server/graphs/log_type_detection/prompts.ts b/x-pack/plugins/integration_assistant/server/graphs/log_type_detection/prompts.ts index b6e777a87888a..09a7249a3786c 100644 --- a/x-pack/plugins/integration_assistant/server/graphs/log_type_detection/prompts.ts +++ b/x-pack/plugins/integration_assistant/server/graphs/log_type_detection/prompts.ts @@ -23,6 +23,7 @@ Follow these steps to do this: b. If there is no csv header then set "header: false" and try to find good names for the columns in the "columns" array by looking into the values of data in those columns. For each column, if you are unable to find good name candidate for it then output an empty string, like in the example. * 'structured': If the log samples have structured message body with key-value pairs then classify it as "name: structured". Look for a flat list of key-value pairs, often separated by some delimiters. Consider variations in formatting, such as quotes around values ("key=value", key="value"), special characters in keys or values, or escape sequences. * 'unstructured': If the log samples have unstructured body like a free-form text then classify it as "name: unstructured". + * 'cef': If the log samples have Common Event Format (CEF) then classify it as "name: cef". * 'unsupported': If you cannot put the format into any of the above categories then classify it with "name: unsupported". 2. Header: for structured and unstructured format: - if the samples have any or all of priority, timestamp, loglevel, hostname, ipAddress, messageId in the beginning information then set "header: true". diff --git a/x-pack/plugins/integration_assistant/server/lib/errors/cef_error.ts b/x-pack/plugins/integration_assistant/server/lib/errors/cef_error.ts new file mode 100644 index 0000000000000..16889b30c1a11 --- /dev/null +++ b/x-pack/plugins/integration_assistant/server/lib/errors/cef_error.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 { KibanaResponseFactory } from '@kbn/core/server'; +import { + GenerationErrorAttributes, + GenerationErrorBody, +} from '../../../common/api/generation_error'; +import { ErrorThatHandlesItsOwnResponse } from './types'; +import { GenerationErrorCode } from '../../../common/constants'; + +export class CefError extends Error implements ErrorThatHandlesItsOwnResponse { + private readonly errorCode: GenerationErrorCode = GenerationErrorCode.CEF_ERROR; + attributes: GenerationErrorAttributes; + + constructor(message: string) { + super(message); + this.attributes = { + errorCode: this.errorCode, + errorMessageWithLink: { + linkText: 'cef-integration', + link: 'https://www.elastic.co/docs/current/integrations/cef', + errorMessage: '', // Will be set using translation in the UI. + }, + }; + } + + public sendResponse(res: KibanaResponseFactory) { + const body: GenerationErrorBody = { + message: this.errorCode, + attributes: this.attributes, + }; + return res.customError({ + statusCode: 501, + body, + }); + } +} diff --git a/x-pack/plugins/integration_assistant/server/routes/analyze_logs_routes.ts b/x-pack/plugins/integration_assistant/server/routes/analyze_logs_routes.ts index 34f05fcc82025..37926dac19156 100644 --- a/x-pack/plugins/integration_assistant/server/routes/analyze_logs_routes.ts +++ b/x-pack/plugins/integration_assistant/server/routes/analyze_logs_routes.ts @@ -19,6 +19,7 @@ import { withAvailability } from './with_availability'; import { isErrorThatHandlesItsOwnResponse, UnsupportedLogFormatError } from '../lib/errors'; import { handleCustomErrors } from './routes_util'; import { GenerationErrorCode } from '../../common/constants'; +import { CefError } from '../lib/errors/cef_error'; export function registerAnalyzeLogsRoutes( router: IRouter @@ -102,9 +103,16 @@ export function registerAnalyzeLogsRoutes( .withConfig({ runName: 'Log Format' }) .invoke(logFormatParameters, options); const graphLogFormat = graphResults.results.samplesFormat.name; - if (graphLogFormat === 'unsupported') { - throw new UnsupportedLogFormatError(GenerationErrorCode.UNSUPPORTED_LOG_SAMPLES_FORMAT); + + switch (graphLogFormat) { + case 'unsupported': + throw new UnsupportedLogFormatError( + GenerationErrorCode.UNSUPPORTED_LOG_SAMPLES_FORMAT + ); + case 'cef': + throw new CefError(GenerationErrorCode.CEF_ERROR); } + return res.ok({ body: AnalyzeLogsResponse.parse(graphResults) }); } catch (err) { try { diff --git a/x-pack/plugins/lens/public/app_plugin/app.test.tsx b/x-pack/plugins/lens/public/app_plugin/app.test.tsx index 73fb52bbe6683..c146352ede566 100644 --- a/x-pack/plugins/lens/public/app_plugin/app.test.tsx +++ b/x-pack/plugins/lens/public/app_plugin/app.test.tsx @@ -34,7 +34,7 @@ import { setState, LensAppState } from '../state_management'; import { coreMock } from '@kbn/core/public/mocks'; import { LensSerializedState } from '..'; import { createMockedField, createMockedIndexPattern } from '../datasources/form_based/mocks'; -import faker from 'faker'; +import { faker } from '@faker-js/faker'; import { screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { VisualizeEditorContext } from '../types'; @@ -48,7 +48,7 @@ jest.mock('lodash', () => ({ debounce: (fn: unknown) => fn, })); -const defaultSavedObjectId: string = faker.random.uuid(); +const defaultSavedObjectId: string = faker.string.uuid(); const waitToLoad = async () => await act(async () => new Promise((resolve) => setTimeout(resolve, 0))); @@ -233,7 +233,7 @@ describe('Lens App', () => { }); describe('breadcrumbs', () => { - const breadcrumbDocSavedObjectId = faker.random.uuid(); + const breadcrumbDocSavedObjectId = faker.string.uuid(); const breadcrumbDoc = getLensDocumentMock({ savedObjectId: breadcrumbDocSavedObjectId, title: 'Daaaaaaadaumching!', @@ -601,7 +601,7 @@ describe('Lens App', () => { expect(lensStore.getState().lens.applyChangesCounter).toBe(1); }); it('adds to the recently accessed list on save', async () => { - const savedObjectId = faker.random.uuid(); + const savedObjectId = faker.string.uuid(); await save({ savedObjectId, prevSavedObjectId: 'prevId', comesFromDashboard: false }); expect(services.chrome.recentlyAccessed.add).toHaveBeenCalledWith( `/app/lens#/edit/${savedObjectId}`, diff --git a/x-pack/plugins/lens/public/app_plugin/app_helpers.test.ts b/x-pack/plugins/lens/public/app_plugin/app_helpers.test.ts index 7dc4e8cfda78c..773276710f48d 100644 --- a/x-pack/plugins/lens/public/app_plugin/app_helpers.test.ts +++ b/x-pack/plugins/lens/public/app_plugin/app_helpers.test.ts @@ -6,7 +6,7 @@ */ import { renderHook, act } from '@testing-library/react-hooks'; -import faker from 'faker'; +import { faker } from '@faker-js/faker'; import { UseNavigateBackToAppProps, useNavigateBackToApp } from './app_helpers'; import { defaultDoc, makeDefaultServices } from '../mocks/services_mock'; import { cloneDeep } from 'lodash'; diff --git a/x-pack/plugins/lens/public/app_plugin/save_modal_container.test.tsx b/x-pack/plugins/lens/public/app_plugin/save_modal_container.test.tsx index 987b320b3abf1..5d9c833174ed5 100644 --- a/x-pack/plugins/lens/public/app_plugin/save_modal_container.test.tsx +++ b/x-pack/plugins/lens/public/app_plugin/save_modal_container.test.tsx @@ -8,7 +8,7 @@ import { SaveProps } from './app'; import { type SaveVisualizationProps, runSaveLensVisualization } from './save_modal_container'; import { defaultDoc, makeDefaultServices } from '../mocks'; -import faker from 'faker'; +import { faker } from '@faker-js/faker'; import { makeAttributeService } from '../mocks/services_mock'; jest.mock('../persistence/saved_objects_utils/check_for_duplicate_title', () => ({ @@ -241,7 +241,7 @@ describe('runSaveLensVisualization', () => { }); // save the current document as a new by-value copy and add it to a dashboard it('should save as a new by-value copy and redirect to the dashboard', async () => { - const dashboardId = faker.random.uuid(); + const dashboardId = faker.string.uuid(); const { props, saveProps, options, redirectToDashboardFn, saveToLibraryFn, toasts } = getDefaultArgs( { @@ -271,7 +271,7 @@ describe('runSaveLensVisualization', () => { // save the current document as a new by-ref copy and add it to a dashboard it('should save as a new by-ref copy and redirect to the dashboard', async () => { - const dashboardId = faker.random.uuid(); + const dashboardId = faker.string.uuid(); const { props, saveProps, options, redirectToDashboardFn, saveToLibraryFn, toasts } = getDefaultArgs( { @@ -376,7 +376,7 @@ describe('runSaveLensVisualization', () => { // simulate a new save const attributeServiceMock = makeAttributeService({ ...defaultDoc, - savedObjectId: faker.random.uuid(), + savedObjectId: faker.string.uuid(), }); const { props, saveProps, options, saveToLibraryFn, cleanupEditor } = getDefaultArgs( diff --git a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/percentile.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/percentile.test.tsx index a140ca22db2b5..b8d3af522c455 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/percentile.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/percentile.test.tsx @@ -12,7 +12,7 @@ import { unifiedSearchPluginMock } from '@kbn/unified-search-plugin/public/mocks import { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; -import faker from 'faker'; +import { faker } from '@faker-js/faker'; import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { createMockedIndexPattern } from '../../mocks'; @@ -402,7 +402,7 @@ describe('percentile', () => { it('should update order-by references for any terms columns', () => { const field1 = 'foo'; const field2 = 'bar'; - const percentile = faker.random.number(100); + const percentile = faker.number.int(100); const aggs = [ makeEsAggBuilder('aggTerms', { diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/chart_switch/chart_switch.test.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/chart_switch/chart_switch.test.tsx index 6795cd8caaa83..5686d94f52d49 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/chart_switch/chart_switch.test.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/chart_switch/chart_switch.test.tsx @@ -21,7 +21,7 @@ import { DatasourcePublicAPI, SuggestionRequest, DatasourceSuggestion } from '.. import { ChartSwitchProps } from './chart_switch'; import { ChartSwitchPopover } from './chart_switch_popover'; import { LensAppState, applyChanges } from '../../../../state_management'; -import faker from 'faker'; +import { faker } from '@faker-js/faker'; const mockFrame = (layers: string[]) => ({ ...createMockFramePublicAPI(), diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_header.test.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_header.test.tsx index 6f0edd6cbcd16..bcd21c71312ce 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_header.test.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_header.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { screen } from '@testing-library/react'; -import faker from 'faker'; +import { faker } from '@faker-js/faker'; import { createMockDatasource, createMockFramePublicAPI, diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.test.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.test.tsx index 9c3457dacc6d4..9cfb1597ffdd4 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.test.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.test.tsx @@ -12,7 +12,7 @@ import { ChildDragDropProvider, Droppable, Draggable } from '@kbn/dom-drag-drop' import { FramePublicAPI, Visualization, VisualizationConfigProps } from '../../../types'; import { LayerPanel } from './layer_panel'; import { coreMock } from '@kbn/core/public/mocks'; -import faker from 'faker'; +import { faker } from '@faker-js/faker'; import { generateId } from '../../../id_generator'; import { createMockVisualization, @@ -144,7 +144,7 @@ describe('LayerPanel', () => { }; beforeEach(() => { - mockVisualization = createMockVisualization(faker.random.alphaNumeric()); + mockVisualization = createMockVisualization(faker.string.alphanumeric()); mockVisualization.getLayerIds.mockReturnValue(['first']); mockDatasource = createMockDatasource(); }); diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.test.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.test.tsx index 42abcdf8fe56c..e44e528e5a33c 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.test.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.test.tsx @@ -39,7 +39,7 @@ import { getLensInspectorService } from '../../../lens_inspector_service'; import { inspectorPluginMock } from '@kbn/inspector-plugin/public/mocks'; import { disableAutoApply, enableAutoApply } from '../../../state_management/lens_slice'; import { Ast, toExpression } from '@kbn/interpreter'; -import faker from 'faker'; +import { faker } from '@faker-js/faker'; const defaultPermissions: Record>> = { navLinks: { management: true }, diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.test.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.test.tsx index 8694cc7c27dcf..c5cabaa053c4b 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.test.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.test.tsx @@ -18,7 +18,7 @@ import { updateVisualizationState, LensAppState } from '../../../state_managemen import { setChangesApplied } from '../../../state_management/lens_slice'; import { LensInspector } from '../../../lens_inspector_service'; import { screen } from '@testing-library/react'; -import faker from 'faker'; +import { faker } from '@faker-js/faker'; import { SettingsMenu } from '../../../app_plugin/settings_menu'; describe('workspace_panel_wrapper', () => { @@ -98,7 +98,7 @@ describe('workspace_panel_wrapper', () => { }); it('should render its children', async () => { - const customElementText = faker.random.word(); + const customElementText = faker.word.words(); renderWorkspacePanelWrapper({ children: {customElementText} }); expect(screen.getByText(customElementText)).toBeInTheDocument(); }); diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.tsx index 54532360169fd..a4077b6919823 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.tsx @@ -260,6 +260,7 @@ export function WorkspacePanelWrapper({ flexGrow: 0, height: '100%', width: '100%', + overflow: 'auto', ...visDimensionsCSS, }} > diff --git a/x-pack/plugins/lens/public/lens_ui_telemetry/color_telemetry_helpers.test.ts b/x-pack/plugins/lens/public/lens_ui_telemetry/color_telemetry_helpers.test.ts index 47eba8b0252ef..8719c54f6f1dd 100644 --- a/x-pack/plugins/lens/public/lens_ui_telemetry/color_telemetry_helpers.test.ts +++ b/x-pack/plugins/lens/public/lens_ui_telemetry/color_telemetry_helpers.test.ts @@ -13,7 +13,7 @@ import { DEFAULT_COLOR_MAPPING_CONFIG, DEFAULT_OTHER_ASSIGNMENT_INDEX, } from '@kbn/coloring'; -import faker from 'faker'; +import { faker } from '@faker-js/faker'; const exampleAssignment = ( valuesCount = 1, @@ -35,7 +35,7 @@ const exampleAssignment = ( return { rule: { type: 'matchExactly', - values: Array.from({ length: valuesCount }, () => faker.random.alpha()), + values: Array.from({ length: valuesCount }, () => faker.string.alpha()), }, color, touched: false, diff --git a/x-pack/plugins/lens/public/mocks/visualization_mock.tsx b/x-pack/plugins/lens/public/mocks/visualization_mock.tsx index f0513e66de0c5..9810b916d5ea6 100644 --- a/x-pack/plugins/lens/public/mocks/visualization_mock.tsx +++ b/x-pack/plugins/lens/public/mocks/visualization_mock.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { LayerTypes } from '@kbn/expression-xy-plugin/public'; import { toExpression } from '@kbn/interpreter'; -import faker from 'faker'; +import { faker } from '@faker-js/faker'; import { Visualization, VisualizationMap } from '../types'; export function createMockVisualization( diff --git a/x-pack/plugins/lens/public/react_embeddable/expressions/on_event.test.ts b/x-pack/plugins/lens/public/react_embeddable/expressions/on_event.test.ts index dfddfe84b57cc..aba94db03de88 100644 --- a/x-pack/plugins/lens/public/react_embeddable/expressions/on_event.test.ts +++ b/x-pack/plugins/lens/public/react_embeddable/expressions/on_event.test.ts @@ -9,7 +9,7 @@ import { ExpressionRendererEvent } from '@kbn/expressions-plugin/public'; import { getLensApiMock, getLensRuntimeStateMock, makeEmbeddableServices } from '../mocks'; import { LensApi, LensEmbeddableStartServices, LensPublicCallbacks } from '../types'; import { prepareEventHandler } from './on_event'; -import faker from 'faker'; +import { faker } from '@faker-js/faker'; import { LENS_EDIT_PAGESIZE_ACTION, LENS_EDIT_RESIZE_ACTION, @@ -109,7 +109,7 @@ describe('Embeddable interaction event handlers', () => { const event = { name: 'filter', data: { - data: [{ value: faker.random.number(), row: 1, column: 'test', table: getTable() }], + data: [{ value: faker.number.int(), row: 1, column: 'test', table: getTable() }], }, }; const { callbacks } = await submitEvent(event); @@ -119,7 +119,7 @@ describe('Embeddable interaction event handlers', () => { const event = { name: 'filter', data: { - data: [{ value: faker.random.number(), row: 1, column: 'test', table: getTable() }], + data: [{ value: faker.number.int(), row: 1, column: 'test', table: getTable() }], }, }; const { getTrigger } = await submitEvent(event, true); @@ -171,7 +171,7 @@ describe('Embeddable interaction event handlers', () => { await reSubmit({ name: 'filter', data: { - data: [{ value: faker.random.number(), row: 1, column: 'test', table: getTable() }], + data: [{ value: faker.number.int(), row: 1, column: 'test', table: getTable() }], }, }); diff --git a/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_actions.test.ts b/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_actions.test.ts index a4f84c329bd3c..016bc0e87f11d 100644 --- a/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_actions.test.ts +++ b/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_actions.test.ts @@ -6,7 +6,7 @@ */ import { pick } from 'lodash'; -import faker from 'faker'; +import { faker } from '@faker-js/faker'; import type { LensRuntimeState, VisualizationContext } from '../types'; import { initializeActionApi } from './initialize_actions'; import { @@ -42,7 +42,7 @@ function setupActionsApi( visOverrides: { id: 'lnsXY' }, dataOverrides: { id: 'form_based' }, }); - const uuid = faker.random.uuid(); + const uuid = faker.string.uuid(); const runtimeState = getLensRuntimeStateMock(stateOverrides); const apiMock = getLensApiMock(); diff --git a/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_dashboard_service.test.ts b/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_dashboard_service.test.ts index 2a0c469b3bbfb..af68f887bff54 100644 --- a/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_dashboard_service.test.ts +++ b/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_dashboard_service.test.ts @@ -9,7 +9,7 @@ import type { LensRuntimeState } from '../types'; import { getLensRuntimeStateMock, getLensInternalApiMock, makeEmbeddableServices } from '../mocks'; import { initializeStateManagement } from './initialize_state_management'; import { initializeDashboardServices } from './initialize_dashboard_services'; -import faker from 'faker'; +import { faker } from '@faker-js/faker'; import { createEmptyLensState } from '../helper'; function setupDashboardServicesApi(runtimeOverrides?: Partial) { @@ -30,7 +30,7 @@ function setupDashboardServicesApi(runtimeOverrides?: Partial) describe('Transformation API', () => { it("should not save to library if there's already a saveObjectId", async () => { - const api = setupDashboardServicesApi({ savedObjectId: faker.random.uuid() }); + const api = setupDashboardServicesApi({ savedObjectId: faker.string.uuid() }); expect(await api.canLinkToLibrary()).toBe(false); }); diff --git a/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_dashboard_services.ts b/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_dashboard_services.ts index bf203f5faf32a..67a5d3a89a1c2 100644 --- a/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_dashboard_services.ts +++ b/x-pack/plugins/lens/public/react_embeddable/initializers/initialize_dashboard_services.ts @@ -16,7 +16,7 @@ import { getUnchangingComparator, initializeTitles, } from '@kbn/presentation-publishing'; -import { apiPublishesSettings } from '@kbn/presentation-containers'; +import { apiIsPresentationContainer, apiPublishesSettings } from '@kbn/presentation-containers'; import { buildObservableVariable, isTextBasedLanguage } from '../helper'; import type { LensComponentProps, @@ -27,6 +27,7 @@ import type { LensSharedProps, IntegrationCallbacks, LensInternalApi, + LensApi, } from '../types'; import { apiHasLensComponentProps } from '../type_guards'; import { StateManagementConfig } from './initialize_state_management'; @@ -39,9 +40,12 @@ export interface DashboardServicesConfig { PublishesWritablePanelDescription & HasInPlaceLibraryTransforms & HasLibraryTransforms & + Pick & Pick; serialize: () => SerializedProps; - comparators: StateComparators; + comparators: StateComparators< + SerializedProps & Pick & { isNewPanel?: boolean } + >; cleanup: () => void; } @@ -78,6 +82,7 @@ export function initializeDashboardServices( return { api: { + parentApi: apiIsPresentationContainer(parentApi) ? parentApi : undefined, defaultPanelTitle: defaultPanelTitle$, defaultPanelDescription: defaultPanelDescription$, ...titlesApi, @@ -178,6 +183,7 @@ export function initializeDashboardServices( overrides: overridesComparator, disableTriggers: disabledTriggersComparator, isNewPanel: getUnchangingComparator<{ isNewPanel?: boolean }, 'isNewPanel'>(), + parentApi: getUnchangingComparator, 'parentApi'>(), }, cleanup: noop, }; diff --git a/x-pack/plugins/lens/public/react_embeddable/mocks/index.tsx b/x-pack/plugins/lens/public/react_embeddable/mocks/index.tsx index ddcd5e6089592..ca8f489a711aa 100644 --- a/x-pack/plugins/lens/public/react_embeddable/mocks/index.tsx +++ b/x-pack/plugins/lens/public/react_embeddable/mocks/index.tsx @@ -8,7 +8,7 @@ import { BehaviorSubject, Subject } from 'rxjs'; import deepMerge from 'deepmerge'; import React from 'react'; -import faker from 'faker'; +import { faker } from '@faker-js/faker'; import { Query, Filter, AggregateQuery, TimeRange } from '@kbn/es-query'; import { PhaseEvent, ViewMode } from '@kbn/presentation-publishing'; import { DataView } from '@kbn/data-views-plugin/common'; @@ -49,7 +49,7 @@ import { const LensApiMock: LensApi = { // Static props type: DOC_TYPE, - uuid: faker.random.uuid(), + uuid: faker.string.uuid(), // Shared Embeddable Observables panelTitle: new BehaviorSubject(faker.lorem.words()), hidePanelTitle: new BehaviorSubject(false), @@ -94,7 +94,7 @@ const LensApiMock: LensApi = { setPanelTitle: jest.fn(), setHidePanelTitle: jest.fn(), phase$: new BehaviorSubject({ - id: faker.random.uuid(), + id: faker.string.uuid(), status: 'rendered', timeToEvent: 1000, }), @@ -138,7 +138,7 @@ export function getLensApiMock(overrides: Partial = {}) { export function getLensSerializedStateMock(overrides: Partial = {}) { return { - savedObjectId: faker.random.uuid(), + savedObjectId: faker.string.uuid(), ...LensSerializedStateMock, ...overrides, }; diff --git a/x-pack/plugins/lens/public/react_embeddable/types.ts b/x-pack/plugins/lens/public/react_embeddable/types.ts index 058affe7f8d2f..c860c543570c1 100644 --- a/x-pack/plugins/lens/public/react_embeddable/types.ts +++ b/x-pack/plugins/lens/public/react_embeddable/types.ts @@ -17,6 +17,7 @@ import type { HasEditCapabilities, HasInPlaceLibraryTransforms, HasLibraryTransforms, + HasParentApi, HasSupportedTriggers, PublishesBlockingError, PublishesDataLoading, @@ -63,6 +64,7 @@ import type { AllowedGaugeOverrides } from '@kbn/expression-gauge-plugin/common' import type { AllowedPartitionOverrides } from '@kbn/expression-partition-vis-plugin/common'; import type { AllowedXYOverrides } from '@kbn/expression-xy-plugin/common'; import type { Action } from '@kbn/ui-actions-plugin/public'; +import { PresentationContainer } from '@kbn/presentation-containers'; import type { LegacyMetricState } from '../../common'; import type { LensDocument } from '../persistence'; import type { LensInspector } from '../lens_inspector_service'; @@ -379,6 +381,8 @@ export type LensApi = Simplify< HasLibraryTransforms & // Let the container know the view mode PublishesViewMode & + // forward the parentApi, note that will be exposed only if it satisfy the PresentationContainer interface + Partial> & // Let the container know the saved object id PublishesSavedObjectId & // Lens specific API methods: diff --git a/x-pack/plugins/lens/public/state_management/load_initial.test.tsx b/x-pack/plugins/lens/public/state_management/load_initial.test.tsx index 1514a508b8781..0a47af299d136 100644 --- a/x-pack/plugins/lens/public/state_management/load_initial.test.tsx +++ b/x-pack/plugins/lens/public/state_management/load_initial.test.tsx @@ -17,7 +17,7 @@ import { Location, History } from 'history'; import { act } from 'react-dom/test-utils'; import { InitialAppState, loadInitial } from './lens_slice'; import { Filter } from '@kbn/es-query'; -import faker from 'faker'; +import { faker } from '@faker-js/faker'; import { DOC_TYPE } from '../../common/constants'; const history = { diff --git a/x-pack/plugins/lens/public/visualizations/datatable/components/table_basic.test.tsx b/x-pack/plugins/lens/public/visualizations/datatable/components/table_basic.test.tsx index 14b3796fbd145..992e79681d415 100644 --- a/x-pack/plugins/lens/public/visualizations/datatable/components/table_basic.test.tsx +++ b/x-pack/plugins/lens/public/visualizations/datatable/components/table_basic.test.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { fireEvent, render, screen, within } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { I18nProvider } from '@kbn/i18n-react'; -import faker from 'faker'; +import { faker } from '@faker-js/faker'; import { act } from 'react-dom/test-utils'; import { IFieldFormat } from '@kbn/field-formats-plugin/common'; import { coreMock } from '@kbn/core/public/mocks'; @@ -504,7 +504,7 @@ describe('DatatableComponent', () => { data.rows = new Array(rowNumbers).fill({ a: 'shoes', b: 1588024800000, - c: faker.random.number(), + c: faker.number.int(), }); args.pageSize = pageSize; @@ -537,7 +537,7 @@ describe('DatatableComponent', () => { data.rows = new Array(rowNumbers).fill({ a: 'shoes', b: 1588024800000, - c: faker.random.number(), + c: faker.number.int(), }); args.pageSize = pageSize; @@ -558,7 +558,7 @@ describe('DatatableComponent', () => { data.rows = new Array(20).fill({ a: 'shoes', b: 1588024800000, - c: faker.random.number(), + c: faker.number.int(), }); renderDatatableComponent({ args, @@ -584,7 +584,7 @@ describe('DatatableComponent', () => { data.rows = new Array(rowNumbers).fill({ a: 'shoes', b: 1588024800000, - c: faker.random.number(), + c: faker.number.int(), }); args.pageSize = pageSize; @@ -624,7 +624,7 @@ describe('DatatableComponent', () => { data.rows = new Array(rowNumbers).fill({ a: 'shoes', b: 1588024800000, - c: faker.random.number(), + c: faker.number.int(), }); args.pageSize = pageSize; diff --git a/x-pack/plugins/lens/public/visualizations/metric/dimension_editor.test.tsx b/x-pack/plugins/lens/public/visualizations/metric/dimension_editor.test.tsx index 73f07d66bcb8b..7a143d3c9ba8a 100644 --- a/x-pack/plugins/lens/public/visualizations/metric/dimension_editor.test.tsx +++ b/x-pack/plugins/lens/public/visualizations/metric/dimension_editor.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { render, screen, waitFor } from '@testing-library/react'; -import faker from 'faker'; +import { faker } from '@faker-js/faker'; import userEvent from '@testing-library/user-event'; import { chartPluginMock } from '@kbn/charts-plugin/public/mocks'; import { euiLightVars } from '@kbn/ui-theme'; @@ -77,7 +77,7 @@ describe('dimension editor', () => { id: 'first', rows: Array(3).fill({ 'metric-col-id': faker.lorem.word(3), - 'max-col-id': faker.random.number(), + 'max-col-id': faker.number.int(), }), }, ]), @@ -106,8 +106,8 @@ describe('dimension editor', () => { { id: 'first', rows: Array(3).fill({ - 'metric-col-id': faker.random.number(), - 'secondary-metric-col-id': faker.random.number(), + 'metric-col-id': faker.number.int(), + 'secondary-metric-col-id': faker.number.int(), }), }, ]), diff --git a/x-pack/plugins/maps/server/plugin.ts b/x-pack/plugins/maps/server/plugin.ts index 1b98310f798e4..9d82aa0cc931e 100644 --- a/x-pack/plugins/maps/server/plugin.ts +++ b/x-pack/plugins/maps/server/plugin.ts @@ -188,6 +188,7 @@ export class MapsPlugin implements Plugin { read: ['index-pattern', 'tag'], }, ui: ['save', 'show', 'saveQuery'], + api: ['savedQuery:manage', 'savedQuery:read'], }, read: { app: [APP_ID, 'kibana'], @@ -197,6 +198,7 @@ export class MapsPlugin implements Plugin { read: [MAP_SAVED_OBJECT_TYPE, 'index-pattern', 'query', 'tag'], }, ui: ['show'], + api: ['savedQuery:read'], }, }, }); diff --git a/x-pack/plugins/ml/common/constants/alerts.ts b/x-pack/plugins/ml/common/constants/alerts.ts index 009345d23542d..8ed9d61b418ff 100644 --- a/x-pack/plugins/ml/common/constants/alerts.ts +++ b/x-pack/plugins/ml/common/constants/alerts.ts @@ -12,6 +12,7 @@ import { ALERT_RULE_NAME, ALERT_START, ALERT_STATUS, + AlertConsumers, ML_ANOMALY_DETECTION_RULE_TYPE_ID, } from '@kbn/rule-data-utils'; import type { JobsHealthTests } from '../types/alerts'; @@ -21,6 +22,9 @@ export const ML_ALERT_TYPES = { AD_JOBS_HEALTH: 'xpack.ml.anomaly_detection_jobs_health', } as const; +export const ML_RULE_TYPE_IDS = Object.values(ML_ALERT_TYPES); +export const ML_VALID_CONSUMERS = [AlertConsumers.ML, AlertConsumers.ALERTS]; + export type MlAlertType = (typeof ML_ALERT_TYPES)[keyof typeof ML_ALERT_TYPES]; export const ALERT_PREVIEW_SAMPLE_SIZE = 5; diff --git a/x-pack/plugins/ml/common/constants/trained_models.ts b/x-pack/plugins/ml/common/constants/trained_models.ts new file mode 100644 index 0000000000000..c6092037cbfb4 --- /dev/null +++ b/x-pack/plugins/ml/common/constants/trained_models.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. + */ + +/** + * Default page for the trained_models endpoint is 100, + * which is too small for the most cases, so we set it to 10000. + */ +export const DEFAULT_TRAINED_MODELS_PAGE_SIZE = 10000; diff --git a/x-pack/plugins/ml/common/index.ts b/x-pack/plugins/ml/common/index.ts index bc53fc4247f2d..dbb6c1a54ca16 100644 --- a/x-pack/plugins/ml/common/index.ts +++ b/x-pack/plugins/ml/common/index.ts @@ -8,5 +8,5 @@ export { getDefaultCapabilities as getDefaultMlCapabilities } from './types/capabilities'; export { DATAFEED_STATE, JOB_STATE } from './constants/states'; export type { MlSummaryJob, SummaryJobState } from './types/anomaly_detection_jobs'; -export { ML_ALERT_TYPES } from './constants/alerts'; +export { ML_ALERT_TYPES, ML_RULE_TYPE_IDS } from './constants/alerts'; export type { Job, Datafeed } from './types/anomaly_detection_jobs'; diff --git a/x-pack/plugins/ml/common/types/capabilities.ts b/x-pack/plugins/ml/common/types/capabilities.ts index e7a097fae7dc4..b598a3bfd4d2d 100644 --- a/x-pack/plugins/ml/common/types/capabilities.ts +++ b/x-pack/plugins/ml/common/types/capabilities.ts @@ -6,6 +6,7 @@ */ import type { KibanaRequest } from '@kbn/core/server'; +import { ALERTING_FEATURE_ID } from '@kbn/alerting-plugin/common'; import { PLUGIN_ID } from '../constants/app'; import { ML_JOB_SAVED_OBJECT_TYPE, @@ -109,6 +110,11 @@ export function getDefaultCapabilities(): MlCapabilities { }; } +const alertingFeatures = Object.values(ML_ALERT_TYPES).map((ruleTypeId) => ({ + ruleTypeId, + consumers: [PLUGIN_ID, ALERTING_FEATURE_ID], +})); + export function getPluginPrivileges() { const apmUserMlCapabilitiesKeys = Object.keys(apmUserMlCapabilities); const userMlCapabilitiesKeys = Object.keys(userMlCapabilities); @@ -150,10 +156,10 @@ export function getPluginPrivileges() { }, alerting: { rule: { - all: Object.values(ML_ALERT_TYPES), + all: alertingFeatures, }, alert: { - all: Object.values(ML_ALERT_TYPES), + all: alertingFeatures, }, }, }, @@ -172,10 +178,10 @@ export function getPluginPrivileges() { }, alerting: { rule: { - read: Object.values(ML_ALERT_TYPES), + read: alertingFeatures, }, alert: { - read: Object.values(ML_ALERT_TYPES), + read: alertingFeatures, }, }, }, diff --git a/x-pack/plugins/ml/common/types/trained_models.ts b/x-pack/plugins/ml/common/types/trained_models.ts index f4ed52ff21f52..25d7e231bf166 100644 --- a/x-pack/plugins/ml/common/types/trained_models.ts +++ b/x-pack/plugins/ml/common/types/trained_models.ts @@ -5,14 +5,25 @@ * 2.0. */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import type { TrainedModelType } from '@kbn/ml-trained-models-utils'; +import type { + InferenceInferenceEndpointInfo, + MlInferenceConfigCreateContainer, +} from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { + ModelDefinitionResponse, + ModelState, + TrainedModelType, +} from '@kbn/ml-trained-models-utils'; +import { + BUILT_IN_MODEL_TAG, + ELASTIC_MODEL_TAG, + TRAINED_MODEL_TYPE, +} from '@kbn/ml-trained-models-utils'; import type { DataFrameAnalyticsConfig, FeatureImportanceBaseline, TotalFeatureImportance, } from '@kbn/ml-data-frame-analytics-utils'; -import type { IndexName, IndicesIndexState } from '@elastic/elasticsearch/lib/api/types'; -import type { InferenceAPIConfigResponse } from '@kbn/ml-trained-models-utils'; import type { XOR } from './common'; import type { MlSavedObjectType } from './saved_objects'; @@ -95,33 +106,12 @@ export type PutTrainedModelConfig = { >; // compressed_definition and definition are mutually exclusive export type TrainedModelConfigResponse = estypes.MlTrainedModelConfig & { - /** - * Associated pipelines. Extends response from the ES endpoint. - */ - pipelines?: Record | null; - origin_job_exists?: boolean; - - metadata?: { - analytics_config: DataFrameAnalyticsConfig; + metadata?: estypes.MlTrainedModelConfig['metadata'] & { + analytics_config?: DataFrameAnalyticsConfig; input: unknown; total_feature_importance?: TotalFeatureImportance[]; feature_importance_baseline?: FeatureImportanceBaseline; - model_aliases?: string[]; } & Record; - model_id: string; - model_type: TrainedModelType; - tags: string[]; - version: string; - inference_config?: Record; - indices?: Array>; - /** - * Whether the model has inference services - */ - hasInferenceServices?: boolean; - /** - * Inference services associated with the model - */ - inference_apis?: InferenceAPIConfigResponse[]; }; export interface PipelineDefinition { @@ -309,3 +299,125 @@ export interface ModelDownloadState { total_parts: number; downloaded_parts: number; } + +export type Stats = Omit; + +/** + * Additional properties for all items in the Trained models table + * */ +interface BaseModelItem { + type?: string[]; + tags: string[]; + /** + * Whether the model has inference services + */ + hasInferenceServices?: boolean; + /** + * Inference services associated with the model + */ + inference_apis?: InferenceInferenceEndpointInfo[]; + /** + * Associated pipelines. Extends response from the ES endpoint. + */ + pipelines?: Record; + /** + * Indices with associated pipelines that have inference processors utilizing the model deployments. + */ + indices?: string[]; +} + +/** Common properties for existing NLP models and NLP model download configs */ +interface BaseNLPModelItem extends BaseModelItem { + disclaimer?: string; + recommended?: boolean; + supported?: boolean; + state: ModelState | undefined; + downloadState?: ModelDownloadState; +} + +/** Model available for download */ +export type ModelDownloadItem = BaseNLPModelItem & + Omit & { + putModelConfig?: object; + softwareLicense?: string; + }; +/** Trained NLP model, i.e. pytorch model returned by the trained_models API */ +export type NLPModelItem = BaseNLPModelItem & + TrainedModelItem & { + stats: Stats & { deployment_stats: TrainedModelDeploymentStatsResponse[] }; + /** + * Description of the current model state + */ + stateDescription?: string; + /** + * Deployment ids extracted from the deployment stats + */ + deployment_ids: string[]; + }; + +export function isBaseNLPModelItem(item: unknown): item is BaseNLPModelItem { + return ( + typeof item === 'object' && + item !== null && + 'type' in item && + Array.isArray(item.type) && + item.type.includes(TRAINED_MODEL_TYPE.PYTORCH) + ); +} + +export function isNLPModelItem(item: unknown): item is NLPModelItem { + return isExistingModel(item) && item.model_type === TRAINED_MODEL_TYPE.PYTORCH; +} + +export const isElasticModel = (item: TrainedModelConfigResponse) => + item.tags.includes(ELASTIC_MODEL_TAG); + +export type ExistingModelBase = TrainedModelConfigResponse & BaseModelItem; + +/** Any model returned by the trained_models API, e.g. lang_ident, elser, dfa model */ +export type TrainedModelItem = ExistingModelBase & { stats: Stats }; + +/** Trained DFA model */ +export type DFAModelItem = Omit & { + origin_job_exists?: boolean; + inference_config?: Pick; + metadata?: estypes.MlTrainedModelConfig['metadata'] & { + analytics_config: DataFrameAnalyticsConfig; + input: unknown; + total_feature_importance?: TotalFeatureImportance[]; + feature_importance_baseline?: FeatureImportanceBaseline; + } & Record; +}; + +export type TrainedModelWithPipelines = TrainedModelItem & { + pipelines: Record; +}; + +export function isExistingModel(item: unknown): item is TrainedModelItem { + return ( + typeof item === 'object' && + item !== null && + 'model_type' in item && + 'create_time' in item && + !!item.create_time + ); +} + +export function isDFAModelItem(item: unknown): item is DFAModelItem { + return isExistingModel(item) && item.model_type === TRAINED_MODEL_TYPE.TREE_ENSEMBLE; +} + +export function isModelDownloadItem(item: TrainedModelUIItem): item is ModelDownloadItem { + return 'putModelConfig' in item && !!item.type?.includes(TRAINED_MODEL_TYPE.PYTORCH); +} + +export const isBuiltInModel = (item: TrainedModelConfigResponse | TrainedModelUIItem) => + item.tags.includes(BUILT_IN_MODEL_TAG); +/** + * This type represents a union of different model entities: + * - Any existing trained model returned by the API, e.g., lang_ident_model_1, DFA models, etc. + * - Hosted model configurations available for download, e.g., ELSER or E5 + * - NLP models already downloaded into Elasticsearch + * - DFA models + */ +export type TrainedModelUIItem = TrainedModelItem | ModelDownloadItem | NLPModelItem | DFAModelItem; diff --git a/x-pack/plugins/ml/kibana.jsonc b/x-pack/plugins/ml/kibana.jsonc index 274a92c57a2c3..5c4961de54e97 100644 --- a/x-pack/plugins/ml/kibana.jsonc +++ b/x-pack/plugins/ml/kibana.jsonc @@ -63,7 +63,8 @@ "lens", "maps", "savedObjectsFinder", - "usageCollection" + "usageCollection", + "alerting" ], "extraPublicDirs": [ "common" diff --git a/x-pack/plugins/ml/public/application/components/ml_inference/add_inference_pipeline_flyout.tsx b/x-pack/plugins/ml/public/application/components/ml_inference/add_inference_pipeline_flyout.tsx index 1d58dce866449..5bd47702ed3f0 100644 --- a/x-pack/plugins/ml/public/application/components/ml_inference/add_inference_pipeline_flyout.tsx +++ b/x-pack/plugins/ml/public/application/components/ml_inference/add_inference_pipeline_flyout.tsx @@ -20,7 +20,7 @@ import { import { i18n } from '@kbn/i18n'; import { extractErrorProperties } from '@kbn/ml-error-utils'; -import type { ModelItem } from '../../model_management/models_list'; +import type { DFAModelItem } from '../../../../common/types/trained_models'; import type { AddInferencePipelineSteps } from './types'; import { ADD_INFERENCE_PIPELINE_STEPS } from './constants'; import { AddInferencePipelineFooter } from '../shared'; @@ -39,7 +39,7 @@ import { useFetchPipelines } from './hooks/use_fetch_pipelines'; export interface AddInferencePipelineFlyoutProps { onClose: () => void; - model: ModelItem; + model: DFAModelItem; } export const AddInferencePipelineFlyout: FC = ({ diff --git a/x-pack/plugins/ml/public/application/components/ml_inference/components/processor_configuration.tsx b/x-pack/plugins/ml/public/application/components/ml_inference/components/processor_configuration.tsx index cd8bdf52166e0..0803cd98679a8 100644 --- a/x-pack/plugins/ml/public/application/components/ml_inference/components/processor_configuration.tsx +++ b/x-pack/plugins/ml/public/application/components/ml_inference/components/processor_configuration.tsx @@ -25,7 +25,7 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { CodeEditor } from '@kbn/code-editor'; -import type { ModelItem } from '../../../model_management/models_list'; +import type { DFAModelItem } from '../../../../../common/types/trained_models'; import { EDIT_MESSAGE, CANCEL_EDIT_MESSAGE, @@ -56,9 +56,9 @@ interface Props { condition?: string; fieldMap: MlInferenceState['fieldMap']; handleAdvancedConfigUpdate: (configUpdate: Partial) => void; - inferenceConfig: ModelItem['inference_config']; - modelInferenceConfig: ModelItem['inference_config']; - modelInputFields: ModelItem['input']; + inferenceConfig: DFAModelItem['inference_config']; + modelInferenceConfig: DFAModelItem['inference_config']; + modelInputFields: DFAModelItem['input']; modelType?: InferenceModelTypes; setHasUnsavedChanges: React.Dispatch>; tag?: string; diff --git a/x-pack/plugins/ml/public/application/components/ml_inference/state.ts b/x-pack/plugins/ml/public/application/components/ml_inference/state.ts index 787a2335717df..26bfe934eb46b 100644 --- a/x-pack/plugins/ml/public/application/components/ml_inference/state.ts +++ b/x-pack/plugins/ml/public/application/components/ml_inference/state.ts @@ -6,10 +6,10 @@ */ import { getAnalysisType } from '@kbn/ml-data-frame-analytics-utils'; +import type { DFAModelItem } from '../../../../common/types/trained_models'; import type { MlInferenceState } from './types'; -import type { ModelItem } from '../../model_management/models_list'; -export const getModelType = (model: ModelItem): string | undefined => { +export const getModelType = (model: DFAModelItem): string | undefined => { const analysisConfig = model.metadata?.analytics_config?.analysis; return analysisConfig !== undefined ? getAnalysisType(analysisConfig) : undefined; }; @@ -54,13 +54,17 @@ export const getDefaultOnFailureConfiguration = (): MlInferenceState['onFailure' }, ]; -export const getInitialState = (model: ModelItem): MlInferenceState => { +export const getInitialState = (model: DFAModelItem): MlInferenceState => { const modelType = getModelType(model); let targetField; if (modelType !== undefined) { targetField = model.inference_config - ? `ml.inference.${model.inference_config[modelType].results_field}` + ? `ml.inference.${ + model.inference_config[ + modelType as keyof Exclude + ]!.results_field + }` : undefined; } diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/components/analytics_selector/analytics_id_selector.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/components/analytics_selector/analytics_id_selector.tsx index bf786436919a9..9fe4da68aa6f8 100644 --- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/components/analytics_selector/analytics_id_selector.tsx +++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/components/analytics_selector/analytics_id_selector.tsx @@ -154,6 +154,7 @@ export function AnalyticsIdSelector({ async function fetchAnalyticsModels() { setIsLoading(true); try { + // FIXME should if fetch all trained models? const response = await trainedModelsApiService.getTrainedModels(); setTrainedModels(response); } catch (e) { diff --git a/x-pack/plugins/ml/public/application/explorer/alerts/alerts_panel.tsx b/x-pack/plugins/ml/public/application/explorer/alerts/alerts_panel.tsx index b9b680a9fbac5..338c5a2a2b3c5 100644 --- a/x-pack/plugins/ml/public/application/explorer/alerts/alerts_panel.tsx +++ b/x-pack/plugins/ml/public/application/explorer/alerts/alerts_panel.tsx @@ -15,9 +15,12 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import { ALERT_STATUS_ACTIVE, AlertConsumers, type AlertStatus } from '@kbn/rule-data-utils'; +import { ALERT_STATUS_ACTIVE, type AlertStatus } from '@kbn/rule-data-utils'; +import type { AlertsTableStateProps } from '@kbn/triggers-actions-ui-plugin/public/application/sections/alerts_table/alerts_table_state'; import React, { type FC, useState } from 'react'; import useObservable from 'react-use/lib/useObservable'; +import { ML_VALID_CONSUMERS } from '../../../../common/constants/alerts'; +import { ML_RULE_TYPE_IDS } from '../../../../common'; import { ML_ALERTS_CONFIG_ID } from '../../../alerting/anomaly_detection_alerts_table/register_alerts_table_configuration'; import { CollapsiblePanel } from '../../components/collapsible_panel'; import { useMlKibana } from '../../contexts/kibana'; @@ -42,13 +45,13 @@ export const AlertsPanel: FC = () => { const alertsQuery = useObservable(anomalyDetectionAlertsStateService.alertsQuery$, {}); const isLoading = useObservable(anomalyDetectionAlertsStateService.isLoading$, true); - const alertStateProps = { + const alertStateProps: AlertsTableStateProps = { alertsTableConfigurationRegistry: triggersActionsUi!.alertsTableConfigurationRegistry, configurationId: ML_ALERTS_CONFIG_ID, id: `ml-details-alerts`, - featureIds: [AlertConsumers.ML], + ruleTypeIds: ML_RULE_TYPE_IDS, + consumers: ML_VALID_CONSUMERS, query: alertsQuery, - showExpandToDetails: true, showAlertStatusWithFlapping: true, cellContext: { fieldFormats, diff --git a/x-pack/plugins/ml/public/application/explorer/alerts/anomaly_detection_alerts_state_service.ts b/x-pack/plugins/ml/public/application/explorer/alerts/anomaly_detection_alerts_state_service.ts index d02e9baf91c95..82bd60a4802ab 100644 --- a/x-pack/plugins/ml/public/application/explorer/alerts/anomaly_detection_alerts_state_service.ts +++ b/x-pack/plugins/ml/public/application/explorer/alerts/anomaly_detection_alerts_state_service.ts @@ -21,7 +21,6 @@ import { ALERT_START, ALERT_STATUS, ALERT_UUID, - AlertConsumers, } from '@kbn/rule-data-utils'; import { isDefined } from '@kbn/ml-is-defined'; import { getSeverityColor } from '@kbn/ml-anomaly-utils'; @@ -30,6 +29,8 @@ import { ALERT_ANOMALY_SCORE, ALERT_ANOMALY_TIMESTAMP, ML_ALERT_TYPES, + ML_RULE_TYPE_IDS, + ML_VALID_CONSUMERS, } from '../../../../common/constants/alerts'; import { StateService } from '../../services/state_service'; import type { AnomalyTimelineStateService } from '../anomaly_timeline_state_service'; @@ -175,7 +176,8 @@ export class AnomalyDetectionAlertsStateService extends StateService { return this.data.search .search( { - featureIds: [AlertConsumers.ML], + ruleTypeIds: ML_RULE_TYPE_IDS, + consumers: ML_VALID_CONSUMERS, query, }, { strategy: 'privateRuleRegistryAlertsSearchStrategy' } diff --git a/x-pack/plugins/ml/public/application/model_management/add_model_flyout.tsx b/x-pack/plugins/ml/public/application/model_management/add_model_flyout.tsx index 5a92a67962579..24c8ce0915234 100644 --- a/x-pack/plugins/ml/public/application/model_management/add_model_flyout.tsx +++ b/x-pack/plugins/ml/public/application/model_management/add_model_flyout.tsx @@ -30,12 +30,12 @@ import { FormattedMessage } from '@kbn/i18n-react'; import React, { type FC, useMemo, useState } from 'react'; import { groupBy } from 'lodash'; import { ElandPythonClient } from '@kbn/inference_integration_flyout'; +import type { ModelDownloadItem } from '../../../common/types/trained_models'; import { usePermissionCheck } from '../capabilities/check_capabilities'; import { useMlKibana } from '../contexts/kibana'; -import type { ModelItem } from './models_list'; export interface AddModelFlyoutProps { - modelDownloads: ModelItem[]; + modelDownloads: ModelDownloadItem[]; onClose: () => void; onSubmit: (modelId: string) => void; } @@ -138,7 +138,7 @@ export const AddModelFlyout: FC = ({ onClose, onSubmit, mod }; interface ClickToDownloadTabContentProps { - modelDownloads: ModelItem[]; + modelDownloads: ModelDownloadItem[]; onModelDownload: (modelId: string) => void; } diff --git a/x-pack/plugins/ml/public/application/model_management/create_pipeline_for_model/create_pipeline_for_model_flyout.tsx b/x-pack/plugins/ml/public/application/model_management/create_pipeline_for_model/create_pipeline_for_model_flyout.tsx index 21fac6f6a28f8..580341800f3b5 100644 --- a/x-pack/plugins/ml/public/application/model_management/create_pipeline_for_model/create_pipeline_for_model_flyout.tsx +++ b/x-pack/plugins/ml/public/application/model_management/create_pipeline_for_model/create_pipeline_for_model_flyout.tsx @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { extractErrorProperties } from '@kbn/ml-error-utils'; import type { SupportedPytorchTasksType } from '@kbn/ml-trained-models-utils'; -import type { ModelItem } from '../models_list'; +import type { TrainedModelItem } from '../../../../common/types/trained_models'; import type { AddInferencePipelineSteps } from '../../components/ml_inference/types'; import { ADD_INFERENCE_PIPELINE_STEPS } from '../../components/ml_inference/constants'; import { AddInferencePipelineFooter } from '../../components/shared'; @@ -40,7 +40,7 @@ import { useTestTrainedModelsContext } from '../test_models/test_trained_models_ export interface CreatePipelineForModelFlyoutProps { onClose: (refreshList?: boolean) => void; - model: ModelItem; + model: TrainedModelItem; } export const CreatePipelineForModelFlyout: FC = ({ diff --git a/x-pack/plugins/ml/public/application/model_management/create_pipeline_for_model/state.ts b/x-pack/plugins/ml/public/application/model_management/create_pipeline_for_model/state.ts index 603a542e7964f..586537222c3c5 100644 --- a/x-pack/plugins/ml/public/application/model_management/create_pipeline_for_model/state.ts +++ b/x-pack/plugins/ml/public/application/model_management/create_pipeline_for_model/state.ts @@ -7,8 +7,8 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { IngestInferenceProcessor } from '@elastic/elasticsearch/lib/api/types'; +import type { TrainedModelItem } from '../../../../common/types/trained_models'; import { getDefaultOnFailureConfiguration } from '../../components/ml_inference/state'; -import type { ModelItem } from '../models_list'; export interface InferecePipelineCreationState { creatingPipeline: boolean; @@ -26,7 +26,7 @@ export interface InferecePipelineCreationState { } export const getInitialState = ( - model: ModelItem, + model: TrainedModelItem, initialPipelineConfig: estypes.IngestPipeline | undefined ): InferecePipelineCreationState => ({ creatingPipeline: false, diff --git a/x-pack/plugins/ml/public/application/model_management/create_pipeline_for_model/test_trained_model.tsx b/x-pack/plugins/ml/public/application/model_management/create_pipeline_for_model/test_trained_model.tsx index 46ec8a6060ac5..ba25e3b26f920 100644 --- a/x-pack/plugins/ml/public/application/model_management/create_pipeline_for_model/test_trained_model.tsx +++ b/x-pack/plugins/ml/public/application/model_management/create_pipeline_for_model/test_trained_model.tsx @@ -12,13 +12,13 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import type { ModelItem } from '../models_list'; +import type { TrainedModelItem } from '../../../../common/types/trained_models'; import { TestTrainedModelContent } from '../test_models/test_trained_model_content'; import { useMlKibana } from '../../contexts/kibana'; import { type InferecePipelineCreationState } from './state'; interface ContentProps { - model: ModelItem; + model: TrainedModelItem; handlePipelineConfigUpdate: (configUpdate: Partial) => void; externalPipelineConfig?: estypes.IngestPipeline; } diff --git a/x-pack/plugins/ml/public/application/model_management/delete_models_modal.tsx b/x-pack/plugins/ml/public/application/model_management/delete_models_modal.tsx index 0f5c515c22776..7afad711521dc 100644 --- a/x-pack/plugins/ml/public/application/model_management/delete_models_modal.tsx +++ b/x-pack/plugins/ml/public/application/model_management/delete_models_modal.tsx @@ -22,14 +22,15 @@ import { EuiSpacer, } from '@elastic/eui'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; +import type { TrainedModelItem, TrainedModelUIItem } from '../../../common/types/trained_models'; +import { isExistingModel } from '../../../common/types/trained_models'; import { type WithRequired } from '../../../common/types/common'; import { useTrainedModelsApiService } from '../services/ml_api_service/trained_models'; import { useToastNotificationService } from '../services/toast_notification_service'; import { DeleteSpaceAwareItemCheckModal } from '../components/delete_space_aware_item_check_modal'; -import { type ModelItem } from './models_list'; interface DeleteModelsModalProps { - models: ModelItem[]; + models: TrainedModelUIItem[]; onClose: (refreshList?: boolean) => void; } @@ -42,11 +43,14 @@ export const DeleteModelsModal: FC = ({ models, onClose const modelIds = models.map((m) => m.model_id); - const modelsWithPipelines = models.filter((m) => isPopulatedObject(m.pipelines)) as Array< - WithRequired - >; + const modelsWithPipelines = models.filter( + (m): m is WithRequired => + isExistingModel(m) && isPopulatedObject(m.pipelines) + ); - const modelsWithInferenceAPIs = models.filter((m) => m.hasInferenceServices); + const modelsWithInferenceAPIs = models.filter( + (m): m is TrainedModelItem => isExistingModel(m) && !!m.hasInferenceServices + ); const inferenceAPIsIDs: string[] = modelsWithInferenceAPIs.flatMap((model) => { return (model.inference_apis ?? []).map((inference) => inference.inference_id); diff --git a/x-pack/plugins/ml/public/application/model_management/deployment_setup.tsx b/x-pack/plugins/ml/public/application/model_management/deployment_setup.tsx index 87fff2bf3eb75..c5b38feb4c799 100644 --- a/x-pack/plugins/ml/public/application/model_management/deployment_setup.tsx +++ b/x-pack/plugins/ml/public/application/model_management/deployment_setup.tsx @@ -42,9 +42,11 @@ import { css } from '@emotion/react'; import { toMountPoint } from '@kbn/react-kibana-mount'; import { dictionaryValidator } from '@kbn/ml-validators'; import type { NLPSettings } from '../../../common/constants/app'; -import type { TrainedModelDeploymentStatsResponse } from '../../../common/types/trained_models'; +import type { + NLPModelItem, + TrainedModelDeploymentStatsResponse, +} from '../../../common/types/trained_models'; import { type CloudInfo, getNewJobLimits } from '../services/ml_server_info'; -import type { ModelItem } from './models_list'; import type { MlStartTrainedModelDeploymentRequestNew } from './deployment_params_mapper'; import { DeploymentParamsMapper } from './deployment_params_mapper'; @@ -645,7 +647,7 @@ export const DeploymentSetup: FC = ({ }; interface StartDeploymentModalProps { - model: ModelItem; + model: NLPModelItem; startModelDeploymentDocUrl: string; onConfigChange: (config: DeploymentParamsUI) => void; onClose: () => void; @@ -845,7 +847,7 @@ export const getUserInputModelDeploymentParamsProvider = nlpSettings: NLPSettings ) => ( - model: ModelItem, + model: NLPModelItem, initialParams?: TrainedModelDeploymentStatsResponse, deploymentIds?: string[] ): Promise => { diff --git a/x-pack/plugins/ml/public/application/model_management/expanded_row.tsx b/x-pack/plugins/ml/public/application/model_management/expanded_row.tsx index f44dc55dab2df..4304e9e207e20 100644 --- a/x-pack/plugins/ml/public/application/model_management/expanded_row.tsx +++ b/x-pack/plugins/ml/public/application/model_management/expanded_row.tsx @@ -26,18 +26,23 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { FIELD_FORMAT_IDS } from '@kbn/field-formats-plugin/common'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; import { isDefined } from '@kbn/ml-is-defined'; -import { TRAINED_MODEL_TYPE } from '@kbn/ml-trained-models-utils'; +import { MODEL_STATE, TRAINED_MODEL_TYPE } from '@kbn/ml-trained-models-utils'; import { dynamic } from '@kbn/shared-ux-utility'; import { InferenceApi } from './inference_api_tab'; -import type { ModelItemFull } from './models_list'; import { ModelPipelines } from './pipelines'; import { AllocatedModels } from '../memory_usage/nodes_overview/allocated_models'; -import type { AllocatedModel, TrainedModelStat } from '../../../common/types/trained_models'; +import type { + AllocatedModel, + NLPModelItem, + TrainedModelItem, + TrainedModelStat, +} from '../../../common/types/trained_models'; import { useFieldFormatter } from '../contexts/kibana/use_field_formatter'; import { useEnabledFeatures } from '../contexts/ml'; +import { isNLPModelItem } from '../../../common/types/trained_models'; interface ExpandedRowProps { - item: ModelItemFull; + item: TrainedModelItem; } const JobMap = dynamic(async () => ({ @@ -169,8 +174,14 @@ export const ExpandedRow: FC = ({ item }) => { license_level, ]); + const hideColumns = useMemo(() => { + return showNodeInfo ? ['model_id'] : ['model_id', 'node_name']; + }, [showNodeInfo]); + const deploymentStatItems = useMemo(() => { - const deploymentStats = stats.deployment_stats; + if (!isNLPModelItem(item)) return []; + + const deploymentStats = (stats as NLPModelItem['stats'])!.deployment_stats; const modelSizeStats = stats.model_size_stats; if (!deploymentStats || !modelSizeStats) return []; @@ -228,11 +239,7 @@ export const ExpandedRow: FC = ({ item }) => { }; }); }); - }, [stats]); - - const hideColumns = useMemo(() => { - return showNodeInfo ? ['model_id'] : ['model_id', 'node_name']; - }, [showNodeInfo]); + }, [stats, item]); const tabs = useMemo(() => { return [ @@ -320,9 +327,7 @@ export const ExpandedRow: FC = ({ item }) => { @@ -529,7 +534,9 @@ export const ExpandedRow: FC = ({ item }) => { ]); const initialSelectedTab = - item.state === 'started' ? tabs.find((t) => t.id === 'stats') : tabs[0]; + isNLPModelItem(item) && item.state === MODEL_STATE.STARTED + ? tabs.find((t) => t.id === 'stats') + : tabs[0]; return ( void; onConfirm: (deploymentIds: string[]) => void; } @@ -220,7 +220,7 @@ export const StopModelDeploymentsConfirmDialog: FC) => - async (forceStopModel: ModelItem): Promise => { + async (forceStopModel: NLPModelItem): Promise => { return new Promise(async (resolve, reject) => { try { const modalSession = overlays.openModal( diff --git a/x-pack/plugins/ml/public/application/model_management/get_model_state.tsx b/x-pack/plugins/ml/public/application/model_management/get_model_state.tsx index d8bf2b8084a6a..75f8f9faa7a91 100644 --- a/x-pack/plugins/ml/public/application/model_management/get_model_state.tsx +++ b/x-pack/plugins/ml/public/application/model_management/get_model_state.tsx @@ -5,40 +5,18 @@ * 2.0. */ -import React from 'react'; -import { DEPLOYMENT_STATE, MODEL_STATE, type ModelState } from '@kbn/ml-trained-models-utils'; import { EuiBadge, - EuiHealth, - EuiLoadingSpinner, - type EuiHealthProps, EuiFlexGroup, EuiFlexItem, + EuiHealth, + EuiLoadingSpinner, EuiText, + type EuiHealthProps, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import type { ModelItem } from './models_list'; - -/** - * Resolves result model state based on the state of each deployment. - * - * If at least one deployment is in the STARTED state, the model state is STARTED. - * Then if none of the deployments are in the STARTED state, but at least one is in the STARTING state, the model state is STARTING. - * If all deployments are in the STOPPING state, the model state is STOPPING. - */ -export const getModelDeploymentState = (model: ModelItem): ModelState | undefined => { - if (!model.stats?.deployment_stats?.length) return; - - if (model.stats?.deployment_stats?.some((v) => v.state === DEPLOYMENT_STATE.STARTED)) { - return MODEL_STATE.STARTED; - } - if (model.stats?.deployment_stats?.some((v) => v.state === DEPLOYMENT_STATE.STARTING)) { - return MODEL_STATE.STARTING; - } - if (model.stats?.deployment_stats?.every((v) => v.state === DEPLOYMENT_STATE.STOPPING)) { - return MODEL_STATE.STOPPING; - } -}; +import { MODEL_STATE, type ModelState } from '@kbn/ml-trained-models-utils'; +import React from 'react'; export const getModelStateColor = ( state: ModelState | undefined diff --git a/x-pack/plugins/ml/public/application/model_management/inference_api_tab.tsx b/x-pack/plugins/ml/public/application/model_management/inference_api_tab.tsx index dc86c359bb1aa..3f55871a93e44 100644 --- a/x-pack/plugins/ml/public/application/model_management/inference_api_tab.tsx +++ b/x-pack/plugins/ml/public/application/model_management/inference_api_tab.tsx @@ -16,10 +16,10 @@ import { EuiTitle, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import type { InferenceAPIConfigResponse } from '@kbn/ml-trained-models-utils'; +import type { InferenceInferenceEndpointInfo } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; export interface InferenceAPITabProps { - inferenceApis: InferenceAPIConfigResponse[]; + inferenceApis: InferenceInferenceEndpointInfo[]; } export const InferenceApi: FC = ({ inferenceApis }) => { diff --git a/x-pack/plugins/ml/public/application/model_management/model_actions.tsx b/x-pack/plugins/ml/public/application/model_management/model_actions.tsx index 133698b0e72f1..1fe008871b0ef 100644 --- a/x-pack/plugins/ml/public/application/model_management/model_actions.tsx +++ b/x-pack/plugins/ml/public/application/model_management/model_actions.tsx @@ -8,18 +8,28 @@ import type { Action } from '@elastic/eui/src/components/basic_table/action_types'; import { i18n } from '@kbn/i18n'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; -import { EuiToolTip, useIsWithinMaxBreakpoint } from '@elastic/eui'; -import React, { useCallback, useMemo, useEffect, useState } from 'react'; -import { - BUILT_IN_MODEL_TAG, - DEPLOYMENT_STATE, - TRAINED_MODEL_TYPE, -} from '@kbn/ml-trained-models-utils'; +import { useIsWithinMaxBreakpoint } from '@elastic/eui'; +import React, { useMemo, useEffect, useState } from 'react'; +import { DEPLOYMENT_STATE } from '@kbn/ml-trained-models-utils'; import { MODEL_STATE } from '@kbn/ml-trained-models-utils/src/constants/trained_models'; import { getAnalysisType, type DataFrameAnalysisConfigType, } from '@kbn/ml-data-frame-analytics-utils'; +import useMountedState from 'react-use/lib/useMountedState'; +import type { + DFAModelItem, + NLPModelItem, + TrainedModelItem, + TrainedModelUIItem, +} from '../../../common/types/trained_models'; +import { + isBuiltInModel, + isDFAModelItem, + isExistingModel, + isModelDownloadItem, + isNLPModelItem, +} from '../../../common/types/trained_models'; import { useEnabledFeatures, useMlServerInfo } from '../contexts/ml'; import { useTrainedModelsApiService } from '../services/ml_api_service/trained_models'; import { getUserConfirmationProvider } from './force_stop_dialog'; @@ -27,8 +37,7 @@ import { useToastNotificationService } from '../services/toast_notification_serv import { getUserInputModelDeploymentParamsProvider } from './deployment_setup'; import { useMlKibana, useMlLocator, useNavigateToPath } from '../contexts/kibana'; import { ML_PAGES } from '../../../common/constants/locator'; -import { isTestable, isDfaTrainedModel } from './test_models'; -import type { ModelItem } from './models_list'; +import { isTestable } from './test_models'; import { usePermissionCheck } from '../capabilities/check_capabilities'; import { useCloudCheck } from '../components/node_available_warning/hooks'; @@ -44,16 +53,17 @@ export function useModelActions({ onModelDownloadRequest, }: { isLoading: boolean; - onDfaTestAction: (model: ModelItem) => void; - onTestAction: (model: ModelItem) => void; - onModelsDeleteRequest: (models: ModelItem[]) => void; - onModelDeployRequest: (model: ModelItem) => void; + onDfaTestAction: (model: DFAModelItem) => void; + onTestAction: (model: TrainedModelItem) => void; + onModelsDeleteRequest: (models: TrainedModelUIItem[]) => void; + onModelDeployRequest: (model: DFAModelItem) => void; onModelDownloadRequest: (modelId: string) => void; onLoading: (isLoading: boolean) => void; fetchModels: () => Promise; modelAndDeploymentIds: string[]; -}): Array> { +}): Array> { const isMobileLayout = useIsWithinMaxBreakpoint('l'); + const isMounted = useMountedState(); const { services: { @@ -95,23 +105,19 @@ export function useModelActions({ const trainedModelsApiService = useTrainedModelsApiService(); useEffect(() => { - let isMounted = true; mlApi .hasPrivileges({ cluster: ['manage_ingest_pipelines'], }) .then((result) => { - if (isMounted) { + if (isMounted()) { setCanManageIngestPipelines( result.hasPrivileges === undefined || result.hasPrivileges.cluster?.manage_ingest_pipelines === true ); } }); - return () => { - isMounted = false; - }; - }, [mlApi]); + }, [mlApi, isMounted]); const getUserConfirmation = useMemo( () => getUserConfirmationProvider(overlays, startServices), @@ -131,12 +137,7 @@ export function useModelActions({ [overlays, startServices, startModelDeploymentDocUrl, cloudInfo, showNodeInfo, nlpSettings] ); - const isBuiltInModel = useCallback( - (item: ModelItem) => item.tags.includes(BUILT_IN_MODEL_TAG), - [] - ); - - return useMemo>>( + return useMemo>>( () => [ { name: i18n.translate('xpack.ml.trainedModels.modelsList.viewTrainingDataNameActionLabel', { @@ -150,10 +151,10 @@ export function useModelActions({ ), icon: 'visTable', type: 'icon', - available: (item) => !!item.metadata?.analytics_config?.id, - enabled: (item) => item.origin_job_exists === true, + available: (item) => isDFAModelItem(item) && !!item.metadata?.analytics_config?.id, + enabled: (item) => isDFAModelItem(item) && item.origin_job_exists === true, onClick: async (item) => { - if (item.metadata?.analytics_config === undefined) return; + if (!isDFAModelItem(item) || item.metadata?.analytics_config === undefined) return; const analysisType = getAnalysisType( item.metadata?.analytics_config.analysis @@ -185,7 +186,7 @@ export function useModelActions({ icon: 'graphApp', type: 'icon', isPrimary: true, - available: (item) => !!item.metadata?.analytics_config?.id, + available: (item) => isDFAModelItem(item) && !!item.metadata?.analytics_config?.id, onClick: async (item) => { const path = await urlLocator.getUrl({ page: ML_PAGES.DATA_FRAME_ANALYTICS_MAP, @@ -216,15 +217,14 @@ export function useModelActions({ }, available: (item) => { return ( - item.model_type === TRAINED_MODEL_TYPE.PYTORCH && - !!item.state && + isNLPModelItem(item) && item.state !== MODEL_STATE.DOWNLOADING && item.state !== MODEL_STATE.NOT_DOWNLOADED ); }, onClick: async (item) => { const modelDeploymentParams = await getUserInputModelDeploymentParams( - item, + item as NLPModelItem, undefined, modelAndDeploymentIds ); @@ -277,11 +277,13 @@ export function useModelActions({ type: 'icon', isPrimary: false, available: (item) => - item.model_type === TRAINED_MODEL_TYPE.PYTORCH && + isNLPModelItem(item) && canStartStopTrainedModels && !isLoading && !!item.stats?.deployment_stats?.some((v) => v.state === DEPLOYMENT_STATE.STARTED), onClick: async (item) => { + if (!isNLPModelItem(item)) return; + const deploymentIdToUpdate = item.deployment_ids[0]; const targetDeployment = item.stats!.deployment_stats.find( @@ -345,7 +347,7 @@ export function useModelActions({ type: 'icon', isPrimary: false, available: (item) => - item.model_type === TRAINED_MODEL_TYPE.PYTORCH && + isNLPModelItem(item) && canStartStopTrainedModels && // Deployment can be either started, starting, or exist in a failed state (item.state === MODEL_STATE.STARTED || item.state === MODEL_STATE.STARTING) && @@ -358,6 +360,8 @@ export function useModelActions({ )), enabled: (item) => !isLoading, onClick: async (item) => { + if (!isNLPModelItem(item)) return; + const requireForceStop = isPopulatedObject(item.pipelines); const hasMultipleDeployments = item.deployment_ids.length > 1; @@ -423,7 +427,10 @@ export function useModelActions({ // @ts-ignore type: isMobileLayout ? 'icon' : 'button', isPrimary: true, - available: (item) => canCreateTrainedModels && item.state === MODEL_STATE.NOT_DOWNLOADED, + available: (item) => + canCreateTrainedModels && + isModelDownloadItem(item) && + item.state === MODEL_STATE.NOT_DOWNLOADED, enabled: (item) => !isLoading, onClick: async (item) => { onModelDownloadRequest(item.model_id); @@ -431,28 +438,9 @@ export function useModelActions({ }, { name: (model) => { - const hasDeployments = model.state === MODEL_STATE.STARTED; - return ( - - <> - {i18n.translate('xpack.ml.trainedModels.modelsList.deployModelActionLabel', { - defaultMessage: 'Deploy model', - })} - - - ); + return i18n.translate('xpack.ml.trainedModels.modelsList.deployModelActionLabel', { + defaultMessage: 'Deploy model', + }); }, description: i18n.translate('xpack.ml.trainedModels.modelsList.deployModelActionLabel', { defaultMessage: 'Deploy model', @@ -462,23 +450,18 @@ export function useModelActions({ type: 'icon', isPrimary: false, onClick: (model) => { - onModelDeployRequest(model); + onModelDeployRequest(model as DFAModelItem); }, available: (item) => { - return ( - isDfaTrainedModel(item) && - !isBuiltInModel(item) && - !item.putModelConfig && - canManageIngestPipelines - ); + return isDFAModelItem(item) && canManageIngestPipelines; }, enabled: (item) => { - return canStartStopTrainedModels && item.state !== MODEL_STATE.STARTED; + return canStartStopTrainedModels; }, }, { name: (model) => { - return model.state === MODEL_STATE.DOWNLOADING ? ( + return isModelDownloadItem(model) && model.state === MODEL_STATE.DOWNLOADING ? ( <> {i18n.translate('xpack.ml.trainedModels.modelsList.deleteModelActionLabel', { defaultMessage: 'Cancel', @@ -492,33 +475,33 @@ export function useModelActions({ ); }, - description: (model: ModelItem) => { - const hasDeployments = model.deployment_ids.length > 0; - const { hasInferenceServices } = model; - - if (model.state === MODEL_STATE.DOWNLOADING) { + description: (model: TrainedModelUIItem) => { + if (isModelDownloadItem(model) && model.state === MODEL_STATE.DOWNLOADING) { return i18n.translate('xpack.ml.trainedModels.modelsList.cancelDownloadActionLabel', { defaultMessage: 'Cancel download', }); - } else if (hasInferenceServices) { - return i18n.translate( - 'xpack.ml.trainedModels.modelsList.deleteDisabledWithInferenceServicesTooltip', - { - defaultMessage: 'Model is used by the _inference API', - } - ); - } else if (hasDeployments) { - return i18n.translate( - 'xpack.ml.trainedModels.modelsList.deleteDisabledWithDeploymentsTooltip', - { - defaultMessage: 'Model has started deployments', - } - ); - } else { - return i18n.translate('xpack.ml.trainedModels.modelsList.deleteModelActionLabel', { - defaultMessage: 'Delete model', - }); + } else if (isNLPModelItem(model)) { + const hasDeployments = model.deployment_ids?.length ?? 0 > 0; + const { hasInferenceServices } = model; + if (hasInferenceServices) { + return i18n.translate( + 'xpack.ml.trainedModels.modelsList.deleteDisabledWithInferenceServicesTooltip', + { + defaultMessage: 'Model is used by the _inference API', + } + ); + } else if (hasDeployments) { + return i18n.translate( + 'xpack.ml.trainedModels.modelsList.deleteDisabledWithDeploymentsTooltip', + { + defaultMessage: 'Model has started deployments', + } + ); + } } + return i18n.translate('xpack.ml.trainedModels.modelsList.deleteModelActionLabel', { + defaultMessage: 'Delete model', + }); }, 'data-test-subj': 'mlModelsTableRowDeleteAction', icon: 'trash', @@ -530,16 +513,17 @@ export function useModelActions({ onModelsDeleteRequest([model]); }, available: (item) => { - const hasZeroPipelines = Object.keys(item.pipelines ?? {}).length === 0; - return ( - canDeleteTrainedModels && - !isBuiltInModel(item) && - !item.putModelConfig && - (hasZeroPipelines || canManageIngestPipelines) - ); + if (!canDeleteTrainedModels || isBuiltInModel(item)) return false; + + if (isModelDownloadItem(item)) { + return !!item.downloadState; + } else { + const hasZeroPipelines = Object.keys(item.pipelines ?? {}).length === 0; + return hasZeroPipelines || canManageIngestPipelines; + } }, enabled: (item) => { - return item.state !== MODEL_STATE.STARTED; + return !isNLPModelItem(item) || item.state !== MODEL_STATE.STARTED; }, }, { @@ -556,9 +540,9 @@ export function useModelActions({ isPrimary: true, available: (item) => isTestable(item, true), onClick: (item) => { - if (isDfaTrainedModel(item) && !isBuiltInModel(item)) { + if (isDFAModelItem(item)) { onDfaTestAction(item); - } else { + } else if (isExistingModel(item)) { onTestAction(item); } }, @@ -579,19 +563,20 @@ export function useModelActions({ isPrimary: true, available: (item) => { return ( - item?.metadata?.analytics_config !== undefined || - (Array.isArray(item.indices) && item.indices.length > 0) + isDFAModelItem(item) || + (isExistingModel(item) && Array.isArray(item.indices) && item.indices.length > 0) ); }, onClick: async (item) => { - let indexPatterns: string[] | undefined = item?.indices - ?.map((o) => Object.keys(o)) - .flat(); + if (!isDFAModelItem(item) || !isExistingModel(item)) return; - if (item?.metadata?.analytics_config?.dest?.index !== undefined) { + let indexPatterns: string[] | undefined = item.indices; + + if (isDFAModelItem(item) && item?.metadata?.analytics_config?.dest?.index !== undefined) { const destIndex = item.metadata.analytics_config.dest?.index; indexPatterns = [destIndex]; } + const path = await urlLocator.getUrl({ page: ML_PAGES.DATA_DRIFT_CUSTOM, pageState: indexPatterns ? { comparison: indexPatterns.join(',') } : {}, @@ -612,7 +597,6 @@ export function useModelActions({ fetchModels, getUserConfirmation, getUserInputModelDeploymentParams, - isBuiltInModel, isLoading, modelAndDeploymentIds, navigateToPath, diff --git a/x-pack/plugins/ml/public/application/model_management/models_list.tsx b/x-pack/plugins/ml/public/application/model_management/models_list.tsx index d66ab1ab3db16..9547e7c6473bd 100644 --- a/x-pack/plugins/ml/public/application/model_management/models_list.tsx +++ b/x-pack/plugins/ml/public/application/model_management/models_list.tsx @@ -29,33 +29,29 @@ import type { EuiTableSelectionType } from '@elastic/eui/src/components/basic_ta import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { useTimefilter } from '@kbn/ml-date-picker'; -import { isDefined } from '@kbn/ml-is-defined'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; import { useStorage } from '@kbn/ml-local-storage'; -import { - BUILT_IN_MODEL_TAG, - BUILT_IN_MODEL_TYPE, - ELASTIC_MODEL_TAG, - ELASTIC_MODEL_TYPE, - ELSER_ID_V1, - MODEL_STATE, - type ModelState, -} from '@kbn/ml-trained-models-utils'; +import { ELSER_ID_V1, MODEL_STATE } from '@kbn/ml-trained-models-utils'; import type { ListingPageUrlState } from '@kbn/ml-url-state'; import { usePageUrlState } from '@kbn/ml-url-state'; import { dynamic } from '@kbn/shared-ux-utility'; -import { cloneDeep, groupBy, isEmpty, memoize } from 'lodash'; +import { cloneDeep, isEmpty } from 'lodash'; import type { FC } from 'react'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import useMountedState from 'react-use/lib/useMountedState'; import { ML_PAGES } from '../../../common/constants/locator'; import { ML_ELSER_CALLOUT_DISMISSED } from '../../../common/types/storage'; import type { - ModelDownloadState, - ModelPipelines, - TrainedModelConfigResponse, - TrainedModelDeploymentStatsResponse, - TrainedModelStat, + DFAModelItem, + NLPModelItem, + TrainedModelItem, + TrainedModelUIItem, +} from '../../../common/types/trained_models'; +import { + isBaseNLPModelItem, + isBuiltInModel, + isModelDownloadItem, + isNLPModelItem, } from '../../../common/types/trained_models'; import { AddInferencePipelineFlyout } from '../components/ml_inference'; import { SavedObjectsWarning } from '../components/saved_objects_warning'; @@ -70,41 +66,11 @@ import { useTrainedModelsApiService } from '../services/ml_api_service/trained_m import { useToastNotificationService } from '../services/toast_notification_service'; import { ModelsTableToConfigMapping } from './config_mapping'; import { DeleteModelsModal } from './delete_models_modal'; -import { getModelDeploymentState, getModelStateColor } from './get_model_state'; +import { getModelStateColor } from './get_model_state'; import { useModelActions } from './model_actions'; import { TestDfaModelsFlyout } from './test_dfa_models_flyout'; import { TestModelAndPipelineCreationFlyout } from './test_models'; -type Stats = Omit; - -export type ModelItem = TrainedModelConfigResponse & { - type?: string[]; - stats?: Stats & { deployment_stats: TrainedModelDeploymentStatsResponse[] }; - pipelines?: ModelPipelines['pipelines'] | null; - origin_job_exists?: boolean; - deployment_ids: string[]; - putModelConfig?: object; - state: ModelState | undefined; - /** - * Description of the current model state - */ - stateDescription?: string; - recommended?: boolean; - supported: boolean; - /** - * Model name, e.g. elser - */ - modelName?: string; - os?: string; - arch?: string; - softwareLicense?: string; - licenseUrl?: string; - downloadState?: ModelDownloadState; - disclaimer?: string; -}; - -export type ModelItemFull = Required; - interface PageUrlState { pageKey: typeof ML_PAGES.TRAINED_MODELS_MANAGE; pageUrlState: ListingPageUrlState; @@ -185,120 +151,29 @@ export const ModelsList: FC = ({ const [isInitialized, setIsInitialized] = useState(false); const [isLoading, setIsLoading] = useState(false); - const [items, setItems] = useState([]); - const [selectedModels, setSelectedModels] = useState([]); - const [modelsToDelete, setModelsToDelete] = useState([]); - const [modelToDeploy, setModelToDeploy] = useState(); + const [items, setItems] = useState([]); + const [selectedModels, setSelectedModels] = useState([]); + const [modelsToDelete, setModelsToDelete] = useState([]); + const [modelToDeploy, setModelToDeploy] = useState(); const [itemIdToExpandedRowMap, setItemIdToExpandedRowMap] = useState>( {} ); - const [modelToTest, setModelToTest] = useState(null); - const [dfaModelToTest, setDfaModelToTest] = useState(null); + const [modelToTest, setModelToTest] = useState(null); + const [dfaModelToTest, setDfaModelToTest] = useState(null); const [isAddModelFlyoutVisible, setIsAddModelFlyoutVisible] = useState(false); - const isBuiltInModel = useCallback( - (item: ModelItem) => item.tags.includes(BUILT_IN_MODEL_TAG), - [] - ); - - const isElasticModel = useCallback( - (item: ModelItem) => item.tags.includes(ELASTIC_MODEL_TAG), - [] - ); - // List of downloaded/existing models - const existingModels = useMemo(() => { - return items.filter((i) => !i.putModelConfig); + const existingModels = useMemo>(() => { + return items.filter((i): i is NLPModelItem | DFAModelItem => !isModelDownloadItem(i)); }, [items]); - /** - * Fetch of model definitions available for download needs to happen only once - */ - const getTrainedModelDownloads = memoize(trainedModelsApiService.getTrainedModelDownloads); - /** * Fetches trained models. */ const fetchModelsData = useCallback(async () => { setIsLoading(true); try { - const response = await trainedModelsApiService.getTrainedModels(undefined, { - with_pipelines: true, - with_indices: true, - }); - - const newItems: ModelItem[] = []; - const expandedItemsToRefresh = []; - - for (const model of response) { - const tableItem: ModelItem = { - ...model, - // Extract model types - ...(typeof model.inference_config === 'object' - ? { - type: [ - model.model_type, - ...Object.keys(model.inference_config), - ...(isBuiltInModel(model as ModelItem) ? [BUILT_IN_MODEL_TYPE] : []), - ...(isElasticModel(model as ModelItem) ? [ELASTIC_MODEL_TYPE] : []), - ], - } - : {}), - } as ModelItem; - newItems.push(tableItem); - - if (itemIdToExpandedRowMap[model.model_id]) { - expandedItemsToRefresh.push(tableItem); - } - } - - // Need to fetch stats for all models to enable/disable actions - // TODO combine fetching models definitions and stats into a single function - await fetchModelsStats(newItems); - - let resultItems = newItems; - // don't add any of the built-in models (e.g. elser) if NLP is disabled - if (isNLPEnabled) { - const idMap = new Map( - resultItems.map((model) => [model.model_id, model]) - ); - /** - * Fetches model definitions available for download - */ - const forDownload = await getTrainedModelDownloads(); - - const notDownloaded: ModelItem[] = forDownload - .filter(({ model_id: modelId, hidden, recommended, supported, disclaimer }) => { - if (idMap.has(modelId)) { - const model = idMap.get(modelId)!; - if (recommended) { - model.recommended = true; - } - model.supported = supported; - model.disclaimer = disclaimer; - } - return !idMap.has(modelId) && !hidden; - }) - .map((modelDefinition) => { - return { - model_id: modelDefinition.model_id, - type: modelDefinition.type, - tags: modelDefinition.type?.includes(ELASTIC_MODEL_TAG) ? [ELASTIC_MODEL_TAG] : [], - putModelConfig: modelDefinition.config, - description: modelDefinition.description, - state: MODEL_STATE.NOT_DOWNLOADED, - recommended: !!modelDefinition.recommended, - modelName: modelDefinition.modelName, - os: modelDefinition.os, - arch: modelDefinition.arch, - softwareLicense: modelDefinition.license, - licenseUrl: modelDefinition.licenseUrl, - supported: modelDefinition.supported, - disclaimer: modelDefinition.disclaimer, - } as ModelItem; - }); - resultItems = [...resultItems, ...notDownloaded]; - } + const resultItems = await trainedModelsApiService.getTrainedModelsList(); setItems((prevItems) => { // Need to merge existing items with new items @@ -307,7 +182,7 @@ export const ModelsList: FC = ({ const prevItem = prevItems.find((i) => i.model_id === item.model_id); return { ...item, - ...(prevItem?.state === MODEL_STATE.DOWNLOADING + ...(isBaseNLPModelItem(prevItem) && prevItem?.state === MODEL_STATE.DOWNLOADING ? { state: prevItem.state, downloadState: prevItem.downloadState, @@ -322,7 +197,7 @@ export const ModelsList: FC = ({ return Object.fromEntries( Object.keys(prev).map((modelId) => { const item = resultItems.find((i) => i.model_id === modelId); - return item ? [modelId, ] : []; + return item ? [modelId, ] : []; }) ); }); @@ -365,51 +240,6 @@ export const ModelsList: FC = ({ }; }, [existingModels]); - /** - * Fetches models stats and update the original object - */ - const fetchModelsStats = useCallback(async (models: ModelItem[]) => { - try { - if (models) { - const { trained_model_stats: modelsStatsResponse } = - await trainedModelsApiService.getTrainedModelStats(); - - const groupByModelId = groupBy(modelsStatsResponse, 'model_id'); - - models.forEach((model) => { - const modelStats = groupByModelId[model.model_id]; - model.stats = { - ...(model.stats ?? {}), - ...modelStats[0], - deployment_stats: modelStats.map((d) => d.deployment_stats).filter(isDefined), - }; - - // Extract deployment ids from deployment stats - model.deployment_ids = modelStats - .map((v) => v.deployment_stats?.deployment_id) - .filter(isDefined); - - model.state = getModelDeploymentState(model); - model.stateDescription = model.stats.deployment_stats.reduce((acc, c) => { - if (acc) return acc; - return c.reason ?? ''; - }, ''); - }); - } - - return true; - } catch (error) { - displayErrorToast( - error, - i18n.translate('xpack.ml.trainedModels.modelsList.fetchModelStatsErrorMessage', { - defaultMessage: 'Error loading trained models statistics', - }) - ); - return false; - } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); - const downLoadStatusFetchInProgress = useRef(false); const abortedDownload = useRef(new Set()); @@ -432,7 +262,7 @@ export const ModelsList: FC = ({ if (isMounted()) { setItems((prevItems) => { return prevItems.map((item) => { - if (!item.type?.includes('pytorch')) { + if (!isBaseNLPModelItem(item)) { return item; } const newItem = cloneDeep(item); @@ -493,7 +323,9 @@ export const ModelsList: FC = ({ if (type) { acc.add(type); } - acc.add(item.model_type); + if (item.model_type) { + acc.add(item.model_type); + } return acc; }, new Set()); return [...result] @@ -504,15 +336,15 @@ export const ModelsList: FC = ({ })); }, [existingModels]); - const modelAndDeploymentIds = useMemo( - () => [ + const modelAndDeploymentIds = useMemo(() => { + const nlpModels = existingModels.filter(isNLPModelItem); + return [ ...new Set([ - ...existingModels.flatMap((v) => v.deployment_ids), - ...existingModels.map((i) => i.model_id), + ...nlpModels.flatMap((v) => v.deployment_ids), + ...nlpModels.map((i) => i.model_id), ]), - ], - [existingModels] - ); + ]; + }, [existingModels]); const onModelDownloadRequest = useCallback( async (modelId: string) => { @@ -550,22 +382,22 @@ export const ModelsList: FC = ({ onModelDownloadRequest, }); - const toggleDetails = async (item: ModelItem) => { + const toggleDetails = async (item: TrainedModelUIItem) => { const itemIdToExpandedRowMapValues = { ...itemIdToExpandedRowMap }; if (itemIdToExpandedRowMapValues[item.model_id]) { delete itemIdToExpandedRowMapValues[item.model_id]; } else { - itemIdToExpandedRowMapValues[item.model_id] = ; + itemIdToExpandedRowMapValues[item.model_id] = ; } setItemIdToExpandedRowMap(itemIdToExpandedRowMapValues); }; - const columns: Array> = [ + const columns: Array> = [ { isExpander: true, align: 'center', - render: (item: ModelItem) => { - if (!item.stats) { + render: (item: TrainedModelUIItem) => { + if (isModelDownloadItem(item) || !item.stats) { return null; } return ( @@ -588,38 +420,38 @@ export const ModelsList: FC = ({ }, { name: modelIdColumnName, - sortable: ({ model_id: modelId }: ModelItem) => modelId, + sortable: ({ model_id: modelId }: TrainedModelUIItem) => modelId, truncateText: false, textOnly: false, 'data-test-subj': 'mlModelsTableColumnId', - render: ({ - description, - model_id: modelId, - recommended, - supported, - type, - disclaimer, - }: ModelItem) => { + render: (item: TrainedModelUIItem) => { + const { description, model_id: modelId, type } = item; + const isTechPreview = description?.includes('(Tech Preview)'); let descriptionText = description?.replace('(Tech Preview)', ''); - if (disclaimer) { - descriptionText += '. ' + disclaimer; - } + let tooltipContent = null; - const tooltipContent = - supported === false ? ( - - ) : recommended === false ? ( - - ) : null; + if (isBaseNLPModelItem(item)) { + const { disclaimer, recommended, supported } = item; + if (disclaimer) { + descriptionText += '. ' + disclaimer; + } + + tooltipContent = + supported === false ? ( + + ) : recommended === false ? ( + + ) : null; + } return ( @@ -675,7 +507,10 @@ export const ModelsList: FC = ({ }), truncateText: false, width: '150px', - render: ({ state, downloadState }: ModelItem) => { + render: (item: TrainedModelUIItem) => { + if (!isBaseNLPModelItem(item)) return null; + + const { state, downloadState } = item; const config = getModelStateColor(state); if (!config) return null; @@ -776,7 +611,7 @@ export const ModelsList: FC = ({ const isSelectionAllowed = canDeleteTrainedModels; - const selection: EuiTableSelectionType | undefined = isSelectionAllowed + const selection: EuiTableSelectionType | undefined = isSelectionAllowed ? { selectableMessage: (selectable, item) => { if (selectable) { @@ -784,31 +619,28 @@ export const ModelsList: FC = ({ defaultMessage: 'Select a model', }); } - if (isPopulatedObject(item.pipelines)) { + // TODO support multiple model downloads with selection + if (!isModelDownloadItem(item) && isPopulatedObject(item.pipelines)) { return i18n.translate('xpack.ml.trainedModels.modelsList.disableSelectableMessage', { defaultMessage: 'Model has associated pipelines', }); } - if (isBuiltInModel(item)) { return i18n.translate('xpack.ml.trainedModels.modelsList.builtInModelMessage', { defaultMessage: 'Built-in model', }); } - return ''; }, selectable: (item) => - !isPopulatedObject(item.pipelines) && - !isBuiltInModel(item) && - !(isElasticModel(item) && !item.state), + !isModelDownloadItem(item) && !isPopulatedObject(item.pipelines) && !isBuiltInModel(item), onSelectionChange: (selectedItems) => { setSelectedModels(selectedItems); }, } : undefined; - const { onTableChange, pagination, sorting } = useTableSettings( + const { onTableChange, pagination, sorting } = useTableSettings( items.length, pageState, updatePageState, @@ -847,7 +679,7 @@ export const ModelsList: FC = ({ return items; } else { // by default show only deployed models or recommended for download - return items.filter((item) => item.create_time || item.recommended); + return items.filter((item) => !isModelDownloadItem(item) || item.recommended); } }, [items, pageState.showAll]); @@ -896,7 +728,7 @@ export const ModelsList: FC = ({
        - + tableLayout={'auto'} responsiveBreakpoint={'xl'} allowNeutralSort={false} @@ -952,7 +784,7 @@ export const ModelsList: FC = ({ { modelsToDelete.forEach((model) => { - if (model.state === MODEL_STATE.DOWNLOADING) { + if (isBaseNLPModelItem(model) && model.state === MODEL_STATE.DOWNLOADING) { abortedDownload.current.add(model.model_id); } }); @@ -996,7 +828,7 @@ export const ModelsList: FC = ({ ) : null} {isAddModelFlyoutVisible ? ( i.state === MODEL_STATE.NOT_DOWNLOADED)} + modelDownloads={items.filter(isModelDownloadItem)} onClose={setIsAddModelFlyoutVisible.bind(null, false)} onSubmit={(modelId) => { onModelDownloadRequest(modelId); diff --git a/x-pack/plugins/ml/public/application/model_management/pipelines/pipelines.tsx b/x-pack/plugins/ml/public/application/model_management/pipelines/pipelines.tsx index d144bf2aaf558..384a0736ed6f2 100644 --- a/x-pack/plugins/ml/public/application/model_management/pipelines/pipelines.tsx +++ b/x-pack/plugins/ml/public/application/model_management/pipelines/pipelines.tsx @@ -17,14 +17,14 @@ import { EuiAccordion, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; +import type { TrainedModelItem } from '../../../../common/types/trained_models'; import { useMlKibana } from '../../contexts/kibana'; -import type { ModelItem } from '../models_list'; import { ProcessorsStats } from './expanded_row'; -export type IngestStatsResponse = Exclude['ingest']; +export type IngestStatsResponse = Exclude['ingest']; interface ModelPipelinesProps { - pipelines: ModelItem['pipelines']; + pipelines: TrainedModelItem['pipelines']; ingestStats: IngestStatsResponse; } diff --git a/x-pack/plugins/ml/public/application/model_management/test_dfa_models_flyout.tsx b/x-pack/plugins/ml/public/application/model_management/test_dfa_models_flyout.tsx index 86ddd16e620ad..4593413154bd5 100644 --- a/x-pack/plugins/ml/public/application/model_management/test_dfa_models_flyout.tsx +++ b/x-pack/plugins/ml/public/application/model_management/test_dfa_models_flyout.tsx @@ -9,14 +9,13 @@ import type { FC } from 'react'; import React, { useMemo } from 'react'; import { EuiFlyout, EuiFlyoutBody, EuiFlyoutHeader, EuiSpacer, EuiTitle } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; - +import type { DFAModelItem } from '../../../common/types/trained_models'; import { TestPipeline } from '../components/ml_inference/components/test_pipeline'; import { getInitialState } from '../components/ml_inference/state'; -import type { ModelItem } from './models_list'; import { TEST_PIPELINE_MODE } from '../components/ml_inference/types'; interface Props { - model: ModelItem; + model: DFAModelItem; onClose: () => void; } diff --git a/x-pack/plugins/ml/public/application/model_management/test_models/index.ts b/x-pack/plugins/ml/public/application/model_management/test_models/index.ts index 4b238f477092e..209704581f489 100644 --- a/x-pack/plugins/ml/public/application/model_management/test_models/index.ts +++ b/x-pack/plugins/ml/public/application/model_management/test_models/index.ts @@ -6,4 +6,4 @@ */ export { TestModelAndPipelineCreationFlyout } from './test_model_and_pipeline_creation_flyout'; -export { isTestable, isDfaTrainedModel } from './utils'; +export { isTestable } from './utils'; diff --git a/x-pack/plugins/ml/public/application/model_management/test_models/test_flyout.tsx b/x-pack/plugins/ml/public/application/model_management/test_models/test_flyout.tsx index b8bc2d706b8c0..3b8d3cc7bdea9 100644 --- a/x-pack/plugins/ml/public/application/model_management/test_models/test_flyout.tsx +++ b/x-pack/plugins/ml/public/application/model_management/test_models/test_flyout.tsx @@ -7,15 +7,13 @@ import type { FC } from 'react'; import React from 'react'; - import { FormattedMessage } from '@kbn/i18n-react'; import { EuiFlyout, EuiFlyoutBody, EuiFlyoutHeader, EuiSpacer, EuiTitle } from '@elastic/eui'; - -import { type ModelItem } from '../models_list'; +import type { TrainedModelItem } from '../../../../common/types/trained_models'; import { TestTrainedModelContent } from './test_trained_model_content'; interface Props { - model: ModelItem; + model: TrainedModelItem; onClose: () => void; } export const TestTrainedModelFlyout: FC = ({ model, onClose }) => ( diff --git a/x-pack/plugins/ml/public/application/model_management/test_models/test_model_and_pipeline_creation_flyout.tsx b/x-pack/plugins/ml/public/application/model_management/test_models/test_model_and_pipeline_creation_flyout.tsx index 240c2545f3d8e..f78f12cf88211 100644 --- a/x-pack/plugins/ml/public/application/model_management/test_models/test_model_and_pipeline_creation_flyout.tsx +++ b/x-pack/plugins/ml/public/application/model_management/test_models/test_model_and_pipeline_creation_flyout.tsx @@ -7,17 +7,16 @@ import type { FC } from 'react'; import React, { useState } from 'react'; - +import type { TrainedModelItem } from '../../../../common/types/trained_models'; import { type TestTrainedModelsContextType, TestTrainedModelsContext, } from './test_trained_models_context'; -import type { ModelItem } from '../models_list'; import { TestTrainedModelFlyout } from './test_flyout'; import { CreatePipelineForModelFlyout } from '../create_pipeline_for_model/create_pipeline_for_model_flyout'; interface Props { - model: ModelItem; + model: TrainedModelItem; onClose: (refreshList?: boolean) => void; } export const TestModelAndPipelineCreationFlyout: FC = ({ model, onClose }) => { diff --git a/x-pack/plugins/ml/public/application/model_management/test_models/test_trained_model_content.tsx b/x-pack/plugins/ml/public/application/model_management/test_models/test_trained_model_content.tsx index da4c496700687..3c829c8f7cd49 100644 --- a/x-pack/plugins/ml/public/application/model_management/test_models/test_trained_model_content.tsx +++ b/x-pack/plugins/ml/public/application/model_management/test_models/test_trained_model_content.tsx @@ -12,14 +12,15 @@ import { SUPPORTED_PYTORCH_TASKS } from '@kbn/ml-trained-models-utils'; import { FormattedMessage } from '@kbn/i18n-react'; import { EuiFormRow, EuiSelect, EuiSpacer, EuiTab, EuiTabs, useEuiPaddingSize } from '@elastic/eui'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { TrainedModelItem } from '../../../../common/types/trained_models'; +import { isNLPModelItem } from '../../../../common/types/trained_models'; import { SelectedModel } from './selected_model'; -import { type ModelItem } from '../models_list'; import { INPUT_TYPE } from './models/inference_base'; import { useTestTrainedModelsContext } from './test_trained_models_context'; import { type InferecePipelineCreationState } from '../create_pipeline_for_model/state'; interface ContentProps { - model: ModelItem; + model: TrainedModelItem; handlePipelineConfigUpdate?: (configUpdate: Partial) => void; externalPipelineConfig?: estypes.IngestPipeline; } @@ -29,7 +30,9 @@ export const TestTrainedModelContent: FC = ({ handlePipelineConfigUpdate, externalPipelineConfig, }) => { - const [deploymentId, setDeploymentId] = useState(model.deployment_ids[0]); + const [deploymentId, setDeploymentId] = useState( + isNLPModelItem(model) ? model.deployment_ids[0] : model.model_id + ); const mediumPadding = useEuiPaddingSize('m'); const [inputType, setInputType] = useState(INPUT_TYPE.TEXT); @@ -46,8 +49,7 @@ export const TestTrainedModelContent: FC = ({ }, [model, createPipelineFlyoutOpen]); return ( <> - {' '} - {model.deployment_ids.length > 1 ? ( + {isNLPModelItem(model) && model.deployment_ids.length > 1 ? ( <> ({ + path: `${ML_INTERNAL_BASE_PATH}/trained_models_list`, + method: 'GET', + version: '1', + }); + }, + /** * Fetches usage information for trained inference models. * @param modelId - Model ID, collection of Model IDs or Model ID pattern. diff --git a/x-pack/plugins/ml/server/models/data_frame_analytics/analytics_manager.ts b/x-pack/plugins/ml/server/models/data_frame_analytics/analytics_manager.ts index 4e112a2ff313b..04a14c7f235ff 100644 --- a/x-pack/plugins/ml/server/models/data_frame_analytics/analytics_manager.ts +++ b/x-pack/plugins/ml/server/models/data_frame_analytics/analytics_manager.ts @@ -20,6 +20,7 @@ import { } from '@kbn/ml-data-frame-analytics-utils'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; import type { CloudSetup } from '@kbn/cloud-plugin/server'; +import { DEFAULT_TRAINED_MODELS_PAGE_SIZE } from '../../../common/constants/trained_models'; import type { MlFeatures } from '../../../common/constants/app'; import type { ModelService } from '../model_management/models_provider'; import { modelsProvider } from '../model_management'; @@ -38,7 +39,6 @@ import { isTransformLinkReturnType, } from './types'; import type { MlClient } from '../../lib/ml_client'; -import { DEFAULT_TRAINED_MODELS_PAGE_SIZE } from '../../routes/trained_models'; export class AnalyticsManager { private _trainedModels: estypes.MlTrainedModelConfig[] = []; @@ -51,7 +51,12 @@ export class AnalyticsManager { private readonly _enabledFeatures: MlFeatures, cloud: CloudSetup ) { - this._modelsProvider = modelsProvider(this._client, this._mlClient, cloud); + this._modelsProvider = modelsProvider( + this._client, + this._mlClient, + cloud, + this._enabledFeatures + ); } private async initData() { diff --git a/x-pack/plugins/ml/public/application/model_management/get_model_state.test.tsx b/x-pack/plugins/ml/server/models/model_management/get_model_state.test.tsx similarity index 94% rename from x-pack/plugins/ml/public/application/model_management/get_model_state.test.tsx rename to x-pack/plugins/ml/server/models/model_management/get_model_state.test.tsx index 1431b2da0439c..16c30395d1b15 100644 --- a/x-pack/plugins/ml/public/application/model_management/get_model_state.test.tsx +++ b/x-pack/plugins/ml/server/models/model_management/get_model_state.test.tsx @@ -5,9 +5,9 @@ * 2.0. */ -import { getModelDeploymentState } from './get_model_state'; import { MODEL_STATE } from '@kbn/ml-trained-models-utils'; -import type { ModelItem } from './models_list'; +import type { NLPModelItem } from '../../../common/types/trained_models'; +import { getModelDeploymentState } from './get_model_state'; describe('getModelDeploymentState', () => { it('returns STARTED if any deployment is in STARTED state', () => { @@ -37,7 +37,7 @@ describe('getModelDeploymentState', () => { }, ], }, - } as unknown as ModelItem; + } as unknown as NLPModelItem; const result = getModelDeploymentState(model); expect(result).toEqual(MODEL_STATE.STARTED); }); @@ -69,7 +69,7 @@ describe('getModelDeploymentState', () => { }, ], }, - } as unknown as ModelItem; + } as unknown as NLPModelItem; const result = getModelDeploymentState(model); expect(result).toEqual(MODEL_STATE.STARTING); }); @@ -96,7 +96,7 @@ describe('getModelDeploymentState', () => { }, ], }, - } as unknown as ModelItem; + } as unknown as NLPModelItem; const result = getModelDeploymentState(model); expect(result).toEqual(MODEL_STATE.STOPPING); }); @@ -112,7 +112,7 @@ describe('getModelDeploymentState', () => { deployment_stats: [], }, - } as unknown as ModelItem; + } as unknown as NLPModelItem; const result = getModelDeploymentState(model); expect(result).toEqual(undefined); }); diff --git a/x-pack/plugins/ml/server/models/model_management/get_model_state.ts b/x-pack/plugins/ml/server/models/model_management/get_model_state.ts new file mode 100644 index 0000000000000..2ee2bf8cb4532 --- /dev/null +++ b/x-pack/plugins/ml/server/models/model_management/get_model_state.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 { DEPLOYMENT_STATE, MODEL_STATE, type ModelState } from '@kbn/ml-trained-models-utils'; +import type { NLPModelItem } from '../../../common/types/trained_models'; + +/** + * Resolves result model state based on the state of each deployment. + * + * If at least one deployment is in the STARTED state, the model state is STARTED. + * Then if none of the deployments are in the STARTED state, but at least one is in the STARTING state, the model state is STARTING. + * If all deployments are in the STOPPING state, the model state is STOPPING. + */ +export const getModelDeploymentState = (model: NLPModelItem): ModelState | undefined => { + if (!model.stats?.deployment_stats?.length) return; + + if (model.stats?.deployment_stats?.some((v) => v.state === DEPLOYMENT_STATE.STARTED)) { + return MODEL_STATE.STARTED; + } + if (model.stats?.deployment_stats?.some((v) => v.state === DEPLOYMENT_STATE.STARTING)) { + return MODEL_STATE.STARTING; + } + if (model.stats?.deployment_stats?.every((v) => v.state === DEPLOYMENT_STATE.STOPPING)) { + return MODEL_STATE.STOPPING; + } +}; diff --git a/x-pack/plugins/ml/server/models/model_management/model_provider.test.ts b/x-pack/plugins/ml/server/models/model_management/model_provider.test.ts index 0b9b93720234d..0a73dfa3053db 100644 --- a/x-pack/plugins/ml/server/models/model_management/model_provider.test.ts +++ b/x-pack/plugins/ml/server/models/model_management/model_provider.test.ts @@ -6,45 +6,54 @@ */ import { modelsProvider } from './models_provider'; -import { type IScopedClusterClient } from '@kbn/core/server'; import { cloudMock } from '@kbn/cloud-plugin/server/mocks'; import type { MlClient } from '../../lib/ml_client'; import downloadTasksResponse from './__mocks__/mock_download_tasks.json'; +import type { MlFeatures } from '../../../common/constants/app'; +import { mlLog } from '../../lib/log'; +import { errors } from '@elastic/elasticsearch'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; +import type { ExistingModelBase } from '../../../common/types/trained_models'; +import type { InferenceInferenceEndpointInfo } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; + +jest.mock('../../lib/log'); describe('modelsProvider', () => { - const mockClient = { - asInternalUser: { - transport: { - request: jest.fn().mockResolvedValue({ - _nodes: { - total: 1, - successful: 1, - failed: 0, - }, - cluster_name: 'default', - nodes: { - yYmqBqjpQG2rXsmMSPb9pQ: { - name: 'node-0', - roles: ['ml'], - attributes: {}, - os: { - name: 'Linux', - arch: 'amd64', - }, - }, - }, - }), - }, - tasks: { - list: jest.fn().mockResolvedValue({ tasks: [] }), + const mockClient = elasticsearchClientMock.createScopedClusterClient(); + + mockClient.asInternalUser.transport.request.mockResolvedValue({ + _nodes: { + total: 1, + successful: 1, + failed: 0, + }, + cluster_name: 'default', + nodes: { + yYmqBqjpQG2rXsmMSPb9pQ: { + name: 'node-0', + roles: ['ml'], + attributes: {}, + os: { + name: 'Linux', + arch: 'amd64', + }, }, }, - } as unknown as jest.Mocked; + }); + + mockClient.asInternalUser.tasks.list.mockResolvedValue({ tasks: [] }); const mockMlClient = {} as unknown as jest.Mocked; const mockCloud = cloudMock.createSetup(); - const modelService = modelsProvider(mockClient, mockMlClient, mockCloud); + + const enabledMlFeatures: MlFeatures = { + ad: false, + dfa: true, + nlp: true, + }; + + const modelService = modelsProvider(mockClient, mockMlClient, mockCloud, enabledMlFeatures); afterEach(() => { jest.clearAllMocks(); @@ -122,7 +131,7 @@ describe('modelsProvider', () => { test('provides a list of models with default model as recommended', async () => { mockCloud.cloudId = undefined; - (mockClient.asInternalUser.transport.request as jest.Mock).mockResolvedValueOnce({ + mockClient.asInternalUser.transport.request.mockResolvedValueOnce({ _nodes: { total: 1, successful: 1, @@ -218,7 +227,7 @@ describe('modelsProvider', () => { test('provides a default version if there is no recommended', async () => { mockCloud.cloudId = undefined; - (mockClient.asInternalUser.transport.request as jest.Mock).mockResolvedValueOnce({ + mockClient.asInternalUser.transport.request.mockResolvedValueOnce({ _nodes: { total: 1, successful: 1, @@ -261,7 +270,7 @@ describe('modelsProvider', () => { test('provides a default version if there is no recommended', async () => { mockCloud.cloudId = undefined; - (mockClient.asInternalUser.transport.request as jest.Mock).mockResolvedValueOnce({ + mockClient.asInternalUser.transport.request.mockResolvedValueOnce({ _nodes: { total: 1, successful: 1, @@ -292,9 +301,7 @@ describe('modelsProvider', () => { expect(result).toEqual({}); }); test('provides download status for all models', async () => { - (mockClient.asInternalUser.tasks.list as jest.Mock).mockResolvedValueOnce( - downloadTasksResponse - ); + mockClient.asInternalUser.tasks.list.mockResolvedValueOnce(downloadTasksResponse); const result = await modelService.getModelsDownloadStatus(); expect(result).toEqual({ '.elser_model_2': { downloaded_parts: 0, total_parts: 418 }, @@ -302,4 +309,124 @@ describe('modelsProvider', () => { }); }); }); + + describe('#assignInferenceEndpoints', () => { + let trainedModels: ExistingModelBase[]; + + const inferenceServices = [ + { + service: 'elser', + model_id: 'elser_test', + service_settings: { model_id: '.elser_model_2' }, + }, + { service: 'open_api_01', service_settings: {} }, + ] as InferenceInferenceEndpointInfo[]; + + beforeEach(() => { + trainedModels = [ + { model_id: '.elser_model_2' }, + { model_id: 'model2' }, + ] as ExistingModelBase[]; + + mockClient.asInternalUser.inference.get.mockResolvedValue({ + endpoints: inferenceServices, + }); + + jest.clearAllMocks(); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + describe('when the user has required privileges', () => { + beforeEach(() => { + mockClient.asCurrentUser.inference.get.mockResolvedValue({ + endpoints: inferenceServices, + }); + }); + + test('should populate inference services for trained models', async () => { + // act + await modelService.assignInferenceEndpoints(trainedModels, false); + + // assert + expect(mockClient.asCurrentUser.inference.get).toHaveBeenCalledWith({ + inference_id: '_all', + }); + + expect(mockClient.asInternalUser.inference.get).not.toHaveBeenCalled(); + + expect(trainedModels[0].inference_apis).toEqual([ + { + model_id: 'elser_test', + service: 'elser', + service_settings: { model_id: '.elser_model_2' }, + }, + ]); + expect(trainedModels[0].hasInferenceServices).toBe(true); + + expect(trainedModels[1].inference_apis).toEqual(undefined); + expect(trainedModels[1].hasInferenceServices).toBe(false); + + expect(mlLog.error).not.toHaveBeenCalled(); + }); + }); + + describe('when the user does not have required privileges', () => { + beforeEach(() => { + mockClient.asCurrentUser.inference.get.mockRejectedValue( + new errors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 403, + body: { message: 'not allowed' }, + }) + ) + ); + }); + + test('should retry with internal user if an error occurs', async () => { + await modelService.assignInferenceEndpoints(trainedModels, false); + + // assert + expect(mockClient.asCurrentUser.inference.get).toHaveBeenCalledWith({ + inference_id: '_all', + }); + + expect(mockClient.asInternalUser.inference.get).toHaveBeenCalledWith({ + inference_id: '_all', + }); + + expect(trainedModels[0].inference_apis).toEqual(undefined); + expect(trainedModels[0].hasInferenceServices).toBe(true); + + expect(trainedModels[1].inference_apis).toEqual(undefined); + expect(trainedModels[1].hasInferenceServices).toBe(false); + + expect(mlLog.error).not.toHaveBeenCalled(); + }); + }); + + test('should not retry on any other error than 403', async () => { + const notFoundError = new errors.ResponseError( + elasticsearchClientMock.createApiResponse({ + statusCode: 404, + body: { message: 'not found' }, + }) + ); + + mockClient.asCurrentUser.inference.get.mockRejectedValue(notFoundError); + + await modelService.assignInferenceEndpoints(trainedModels, false); + + // assert + expect(mockClient.asCurrentUser.inference.get).toHaveBeenCalledWith({ + inference_id: '_all', + }); + + expect(mockClient.asInternalUser.inference.get).not.toHaveBeenCalled(); + + expect(mlLog.error).toHaveBeenCalledWith(notFoundError); + }); + }); }); diff --git a/x-pack/plugins/ml/server/models/model_management/models_provider.ts b/x-pack/plugins/ml/server/models/model_management/models_provider.ts index 1c175cee26d14..0f302363f66ea 100644 --- a/x-pack/plugins/ml/server/models/model_management/models_provider.ts +++ b/x-pack/plugins/ml/server/models/model_management/models_provider.ts @@ -8,10 +8,11 @@ import Boom from '@hapi/boom'; import type { IScopedClusterClient } from '@kbn/core/server'; import { JOB_MAP_NODE_TYPES, type MapElements } from '@kbn/ml-data-frame-analytics-utils'; -import { flatten } from 'lodash'; +import { flatten, groupBy, isEmpty } from 'lodash'; import type { InferenceInferenceEndpoint, InferenceTaskType, + MlGetTrainedModelsRequest, TasksTaskInfo, TransformGetTransformTransformSummary, } from '@elastic/elasticsearch/lib/api/types'; @@ -24,22 +25,50 @@ import type { } from '@elastic/elasticsearch/lib/api/types'; import { ELASTIC_MODEL_DEFINITIONS, + ELASTIC_MODEL_TAG, + MODEL_STATE, type GetModelDownloadConfigOptions, type ModelDefinitionResponse, + ELASTIC_MODEL_TYPE, + BUILT_IN_MODEL_TYPE, } from '@kbn/ml-trained-models-utils'; import type { CloudSetup } from '@kbn/cloud-plugin/server'; import type { ElasticCuratedModelName } from '@kbn/ml-trained-models-utils'; -import type { ModelDownloadState, PipelineDefinition } from '../../../common/types/trained_models'; +import { isDefined } from '@kbn/ml-is-defined'; +import { DEFAULT_TRAINED_MODELS_PAGE_SIZE } from '../../../common/constants/trained_models'; +import type { MlFeatures } from '../../../common/constants/app'; +import type { + DFAModelItem, + ExistingModelBase, + ModelDownloadItem, + NLPModelItem, + TrainedModelItem, + TrainedModelUIItem, + TrainedModelWithPipelines, +} from '../../../common/types/trained_models'; +import { isBuiltInModel, isExistingModel } from '../../../common/types/trained_models'; +import { + isDFAModelItem, + isElasticModel, + isNLPModelItem, + type ModelDownloadState, + type PipelineDefinition, + type TrainedModelConfigResponse, +} from '../../../common/types/trained_models'; import type { MlClient } from '../../lib/ml_client'; import type { MLSavedObjectService } from '../../saved_objects'; +import { filterForEnabledFeatureModels } from '../../routes/trained_models'; +import { mlLog } from '../../lib/log'; +import { getModelDeploymentState } from './get_model_state'; export type ModelService = ReturnType; export const modelsProvider = ( client: IScopedClusterClient, mlClient: MlClient, - cloud: CloudSetup -) => new ModelsProvider(client, mlClient, cloud); + cloud: CloudSetup, + enabledFeatures: MlFeatures +) => new ModelsProvider(client, mlClient, cloud, enabledFeatures); interface ModelMapResult { ingestPipelines: Map | null>; @@ -66,7 +95,8 @@ export class ModelsProvider { constructor( private _client: IScopedClusterClient, private _mlClient: MlClient, - private _cloud: CloudSetup + private _cloud: CloudSetup, + private _enabledFeatures: MlFeatures ) {} private async initTransformData() { @@ -110,6 +140,291 @@ export class ModelsProvider { return `${elementOriginalId}-${nodeType}`; } + /** + * Assigns inference endpoints to trained models + * @param trainedModels + * @param asInternal + */ + async assignInferenceEndpoints(trainedModels: ExistingModelBase[], asInternal: boolean = false) { + const esClient = asInternal ? this._client.asInternalUser : this._client.asCurrentUser; + + try { + // Check if model is used by an inference service + const { endpoints } = await esClient.inference.get({ + inference_id: '_all', + }); + + const inferenceAPIMap = groupBy( + endpoints, + (endpoint) => endpoint.service === 'elser' && endpoint.service_settings.model_id + ); + + for (const model of trainedModels) { + const inferenceApis = inferenceAPIMap[model.model_id]; + model.hasInferenceServices = !!inferenceApis; + if (model.hasInferenceServices && !asInternal) { + model.inference_apis = inferenceApis; + } + } + } catch (e) { + if (!asInternal && e.statusCode === 403) { + // retry with internal user to get an indicator if models has associated inference services, without mentioning the names + await this.assignInferenceEndpoints(trainedModels, true); + } else { + mlLog.error(e); + } + } + } + + /** + * Assigns trained model stats to trained models + * @param trainedModels + */ + async assignModelStats(trainedModels: ExistingModelBase[]): Promise { + const { trained_model_stats: modelsStatsResponse } = await this._mlClient.getTrainedModelsStats( + { + size: DEFAULT_TRAINED_MODELS_PAGE_SIZE, + } + ); + + const groupByModelId = groupBy(modelsStatsResponse, 'model_id'); + + return trainedModels.map((model) => { + const modelStats = groupByModelId[model.model_id]; + + const completeModelItem: TrainedModelItem = { + ...model, + // @ts-ignore FIXME: fix modelStats type + stats: { + ...modelStats[0], + ...(isNLPModelItem(model) + ? { deployment_stats: modelStats.map((d) => d.deployment_stats).filter(isDefined) } + : {}), + }, + }; + + if (isNLPModelItem(completeModelItem)) { + // Extract deployment ids from deployment stats + completeModelItem.deployment_ids = modelStats + .map((v) => v.deployment_stats?.deployment_id) + .filter(isDefined); + + completeModelItem.state = getModelDeploymentState(completeModelItem); + + completeModelItem.stateDescription = completeModelItem.stats.deployment_stats.reduce( + (acc, c) => { + if (acc) return acc; + return c.reason ?? ''; + }, + '' + ); + } + + return completeModelItem; + }); + } + + /** + * Merges the list of models with the list of models available for download. + */ + async includeModelDownloads(resultItems: TrainedModelUIItem[]): Promise { + const idMap = new Map( + resultItems.map((model) => [model.model_id, model]) + ); + /** + * Fetches model definitions available for download + */ + const forDownload = await this.getModelDownloads(); + + const notDownloaded: TrainedModelUIItem[] = forDownload + .filter(({ model_id: modelId, hidden, recommended, supported, disclaimer }) => { + if (idMap.has(modelId)) { + const model = idMap.get(modelId)! as NLPModelItem; + if (recommended) { + model.recommended = true; + } + model.supported = supported; + model.disclaimer = disclaimer; + } + return !idMap.has(modelId) && !hidden; + }) + .map((modelDefinition) => { + return { + model_id: modelDefinition.model_id, + type: modelDefinition.type, + tags: modelDefinition.type?.includes(ELASTIC_MODEL_TAG) ? [ELASTIC_MODEL_TAG] : [], + putModelConfig: modelDefinition.config, + description: modelDefinition.description, + state: MODEL_STATE.NOT_DOWNLOADED, + recommended: !!modelDefinition.recommended, + modelName: modelDefinition.modelName, + os: modelDefinition.os, + arch: modelDefinition.arch, + softwareLicense: modelDefinition.license, + licenseUrl: modelDefinition.licenseUrl, + supported: modelDefinition.supported, + disclaimer: modelDefinition.disclaimer, + } as ModelDownloadItem; + }); + + // show model downloads first + return [...notDownloaded, ...resultItems]; + } + + /** + * Assigns pipelines to trained models + */ + async assignPipelines(trainedModels: TrainedModelItem[]): Promise { + // For each model create a dict with model aliases and deployment ids for faster lookup + const modelToAliasesAndDeployments: Record> = Object.fromEntries( + trainedModels.map((model) => [ + model.model_id, + new Set([ + model.model_id, + ...(model.metadata?.model_aliases ?? []), + ...(isNLPModelItem(model) ? model.deployment_ids : []), + ]), + ]) + ); + + // Set of unique model ids, aliases, and deployment ids. + const modelIdsAndAliases: string[] = Object.values(modelToAliasesAndDeployments).flatMap((s) => + Array.from(s) + ); + + try { + // Get all pipelines first in one call: + const modelPipelinesMap = await this.getModelsPipelines(modelIdsAndAliases); + + trainedModels.forEach((model) => { + const modelAliasesAndDeployments = modelToAliasesAndDeployments[model.model_id]; + // Check model pipelines map for any pipelines associated with the model + for (const [modelEntityId, pipelines] of modelPipelinesMap) { + if (modelAliasesAndDeployments.has(modelEntityId)) { + // Merge pipeline definitions into the model + model.pipelines = model.pipelines + ? Object.assign(model.pipelines, pipelines) + : pipelines; + } + } + }); + } catch (e) { + // the user might not have required permissions to fetch pipelines + // log the error to the debug log as this might be a common situation and + // we don't need to fill kibana's log with these messages. + mlLog.debug(e); + } + } + + /** + * Assigns indices to trained models + */ + async assignModelIndices(trainedModels: TrainedModelItem[]): Promise { + // Get a list of all uniquer pipeline ids to retrieve mapping with indices + const pipelineIds = new Set( + trainedModels + .filter((model): model is TrainedModelWithPipelines => isDefined(model.pipelines)) + .flatMap((model) => Object.keys(model.pipelines)) + ); + + const pipelineToIndicesMap = await this.getPipelineToIndicesMap(pipelineIds); + + trainedModels.forEach((model) => { + if (!isEmpty(model.pipelines)) { + model.indices = Object.entries(pipelineToIndicesMap) + .filter(([pipelineId]) => !isEmpty(model.pipelines?.[pipelineId])) + .flatMap(([_, indices]) => indices); + } + }); + } + + /** + * Assign a check for each DFA model if origin job exists + */ + async assignDFAJobCheck(trainedModels: DFAModelItem[]): Promise { + try { + const dfaJobIds = trainedModels + .map((model) => { + const id = model.metadata?.analytics_config?.id; + if (id) { + return `${id}*`; + } + }) + .filter(isDefined); + + if (dfaJobIds.length > 0) { + const { data_frame_analytics: jobs } = await this._mlClient.getDataFrameAnalytics({ + id: dfaJobIds.join(','), + allow_no_match: true, + }); + + trainedModels.forEach((model) => { + const dfaId = model?.metadata?.analytics_config?.id; + if (dfaId !== undefined) { + // if this is a dfa model, set origin_job_exists + model.origin_job_exists = jobs.find((job) => job.id === dfaId) !== undefined; + } + }); + } + } catch (e) { + return; + } + } + + /** + * Returns a complete list of entities for the Trained Models UI + */ + async getTrainedModelList(): Promise { + const resp = await this._mlClient.getTrainedModels({ + size: 1000, + } as MlGetTrainedModelsRequest); + + let resultItems: TrainedModelUIItem[] = []; + + // Filter models based on enabled features + const filteredModels = filterForEnabledFeatureModels( + resp.trained_model_configs, + this._enabledFeatures + ) as TrainedModelConfigResponse[]; + + const formattedModels = filteredModels.map((model) => { + return { + ...model, + // Extract model types + type: [ + model.model_type, + ...(isBuiltInModel(model) ? [BUILT_IN_MODEL_TYPE] : []), + ...(isElasticModel(model) ? [ELASTIC_MODEL_TYPE] : []), + ...(typeof model.inference_config === 'object' + ? Object.keys(model.inference_config) + : []), + ].filter(isDefined), + }; + }); + + // Update inference endpoints info + await this.assignInferenceEndpoints(formattedModels); + + // Assign model stats + resultItems = await this.assignModelStats(formattedModels); + + if (this._enabledFeatures.nlp) { + resultItems = await this.includeModelDownloads(resultItems); + } + + const existingModels = resultItems.filter(isExistingModel); + + // Assign pipelines to existing models + await this.assignPipelines(existingModels); + + // Assign indices + await this.assignModelIndices(existingModels); + + await this.assignDFAJobCheck(resultItems.filter(isDFAModelItem)); + + return resultItems; + } + /** * Simulates the effect of the pipeline on given document. * @@ -170,12 +485,13 @@ export class ModelsProvider { } /** - * Retrieves the map of model ids and aliases with associated pipelines. + * Retrieves the map of model ids and aliases with associated pipelines, + * where key is a model, alias or deployment id, and value is a map of pipeline ids and pipeline definitions. * @param modelIds - Array of models ids and model aliases. */ async getModelsPipelines(modelIds: string[]) { - const modelIdsMap = new Map | null>( - modelIds.map((id: string) => [id, null]) + const modelIdsMap = new Map>( + modelIds.map((id: string) => [id, {}]) ); try { @@ -208,6 +524,53 @@ export class ModelsProvider { return modelIdsMap; } + /** + * Match pipelines to indices based on the default_pipeline setting in the index settings. + */ + async getPipelineToIndicesMap(pipelineIds: Set): Promise> { + const pipelineIdsToDestinationIndices: Record = {}; + + let indicesPermissions; + let indicesSettings; + + try { + indicesSettings = await this._client.asInternalUser.indices.getSettings(); + const hasPrivilegesResponse = await this._client.asCurrentUser.security.hasPrivileges({ + index: [ + { + names: Object.keys(indicesSettings), + privileges: ['read'], + }, + ], + }); + indicesPermissions = hasPrivilegesResponse.index; + } catch (e) { + // Possible that the user doesn't have permissions to view + if (e.meta?.statusCode !== 403) { + mlLog.error(e); + } + return pipelineIdsToDestinationIndices; + } + + // From list of model pipelines, find all indices that have pipeline set as index.default_pipeline + for (const [indexName, { settings }] of Object.entries(indicesSettings)) { + const defaultPipeline = settings?.index?.default_pipeline; + if ( + defaultPipeline && + pipelineIds.has(defaultPipeline) && + indicesPermissions[indexName]?.read === true + ) { + if (Array.isArray(pipelineIdsToDestinationIndices[defaultPipeline])) { + pipelineIdsToDestinationIndices[defaultPipeline].push(indexName); + } else { + pipelineIdsToDestinationIndices[defaultPipeline] = [indexName]; + } + } + } + + return pipelineIdsToDestinationIndices; + } + /** * Retrieves the network map and metadata of model ids, pipelines, and indices that are tied to the model ids. * @param modelIds - Array of models ids and model aliases. @@ -229,7 +592,6 @@ export class ModelsProvider { }; let pipelinesResponse; - let indicesSettings; try { pipelinesResponse = await this.getModelsPipelines([modelId]); @@ -264,44 +626,8 @@ export class ModelsProvider { } if (withIndices === true) { - const pipelineIdsToDestinationIndices: Record = {}; - - let indicesPermissions; - try { - indicesSettings = await this._client.asInternalUser.indices.getSettings(); - const hasPrivilegesResponse = await this._client.asCurrentUser.security.hasPrivileges({ - index: [ - { - names: Object.keys(indicesSettings), - privileges: ['read'], - }, - ], - }); - indicesPermissions = hasPrivilegesResponse.index; - } catch (e) { - // Possible that the user doesn't have permissions to view - // If so, gracefully exit - if (e.meta?.statusCode !== 403) { - // eslint-disable-next-line no-console - console.error(e); - } - return result; - } - - // 2. From list of model pipelines, find all indices that have pipeline set as index.default_pipeline - for (const [indexName, { settings }] of Object.entries(indicesSettings)) { - if ( - settings?.index?.default_pipeline && - pipelineIds.has(settings.index.default_pipeline) && - indicesPermissions[indexName]?.read === true - ) { - if (Array.isArray(pipelineIdsToDestinationIndices[settings.index.default_pipeline])) { - pipelineIdsToDestinationIndices[settings.index.default_pipeline].push(indexName); - } else { - pipelineIdsToDestinationIndices[settings.index.default_pipeline] = [indexName]; - } - } - } + const pipelineIdsToDestinationIndices: Record = + await this.getPipelineToIndicesMap(pipelineIds); // 3. Grab index information for all the indices found, and add their info to the map for (const [pipelineId, indexIds] of Object.entries(pipelineIdsToDestinationIndices)) { diff --git a/x-pack/plugins/ml/server/plugin.ts b/x-pack/plugins/ml/server/plugin.ts index 01f3ec7e5d131..e40bed733f0da 100644 --- a/x-pack/plugins/ml/server/plugin.ts +++ b/x-pack/plugins/ml/server/plugin.ts @@ -26,6 +26,7 @@ import type { SpacesPluginSetup } from '@kbn/spaces-plugin/server'; import type { FieldFormatsStart } from '@kbn/field-formats-plugin/server'; import type { HomeServerPluginSetup } from '@kbn/home-plugin/server'; import type { CasesServerSetup } from '@kbn/cases-plugin/server'; +import { ALERTING_FEATURE_ID } from '@kbn/alerting-plugin/common'; import { KibanaFeatureScope } from '@kbn/features-plugin/common'; import type { PluginsSetup, PluginsStart, RouteInitialization } from './types'; import type { MlCapabilities } from '../common/types/capabilities'; @@ -142,7 +143,10 @@ export class MlServerPlugin management: { insightsAndAlerting: ['jobsListLink', 'triggersActions'], }, - alerting: Object.values(ML_ALERT_TYPES), + alerting: Object.values(ML_ALERT_TYPES).map((ruleTypeId) => ({ + ruleTypeId, + consumers: [PLUGIN_ID, ALERTING_FEATURE_ID], + })), privileges: { all: admin, read: user, @@ -222,7 +226,8 @@ export class MlServerPlugin getDataViews, () => this.auditService, () => this.isMlReady, - this.compatibleModuleType + this.compatibleModuleType, + this.enabledFeatures ); const routeInit: RouteInitialization = { diff --git a/x-pack/plugins/ml/server/routes/inference_models.ts b/x-pack/plugins/ml/server/routes/inference_models.ts index 866398ac56ce9..8318fadee8ebd 100644 --- a/x-pack/plugins/ml/server/routes/inference_models.ts +++ b/x-pack/plugins/ml/server/routes/inference_models.ts @@ -19,7 +19,7 @@ import { ML_INTERNAL_BASE_PATH } from '../../common/constants/app'; import { syncSavedObjectsFactory } from '../saved_objects'; export function inferenceModelRoutes( - { router, routeGuard }: RouteInitialization, + { router, routeGuard, getEnabledFeatures }: RouteInitialization, cloud: CloudSetup ) { router.versioned @@ -48,7 +48,12 @@ export function inferenceModelRoutes( async ({ client, mlClient, request, response, mlSavedObjectService }) => { try { const { inferenceId, taskType } = request.params; - const body = await modelsProvider(client, mlClient, cloud).createInferenceEndpoint( + const body = await modelsProvider( + client, + mlClient, + cloud, + getEnabledFeatures() + ).createInferenceEndpoint( inferenceId, taskType as InferenceTaskType, request.body as InferenceInferenceEndpoint diff --git a/x-pack/plugins/ml/server/routes/job_service.ts b/x-pack/plugins/ml/server/routes/job_service.ts index 3814d36bc3a6c..8c9f90db38186 100644 --- a/x-pack/plugins/ml/server/routes/job_service.ts +++ b/x-pack/plugins/ml/server/routes/job_service.ts @@ -135,7 +135,7 @@ export function jobServiceRoutes({ router, routeGuard }: RouteInitialization) { routeGuard.fullLicenseAPIGuard(async ({ client, mlClient, request, response, context }) => { try { const alerting = await context.alerting; - const rulesClient = alerting?.getRulesClient(); + const rulesClient = await alerting?.getRulesClient(); const { deleteJobs } = jobServiceProvider(client, mlClient, rulesClient); const { jobIds, deleteUserAnnotations, deleteAlertingRules } = request.body; @@ -283,7 +283,8 @@ export function jobServiceRoutes({ router, routeGuard }: RouteInitialization) { routeGuard.fullLicenseAPIGuard(async ({ client, mlClient, request, response, context }) => { try { const alerting = await context.alerting; - const { jobsSummary } = jobServiceProvider(client, mlClient, alerting?.getRulesClient()); + const rulesClient = await alerting?.getRulesClient(); + const { jobsSummary } = jobServiceProvider(client, mlClient, rulesClient); const { jobIds } = request.body; const resp = await jobsSummary(jobIds); @@ -317,11 +318,8 @@ export function jobServiceRoutes({ router, routeGuard }: RouteInitialization) { routeGuard.fullLicenseAPIGuard(async ({ client, mlClient, response, context }) => { try { const alerting = await context.alerting; - const { getJobIdsWithGeo } = jobServiceProvider( - client, - mlClient, - alerting?.getRulesClient() - ); + const rulesClient = await alerting?.getRulesClient(); + const { getJobIdsWithGeo } = jobServiceProvider(client, mlClient, rulesClient); const resp = await getJobIdsWithGeo(); @@ -425,11 +423,9 @@ export function jobServiceRoutes({ router, routeGuard }: RouteInitialization) { routeGuard.fullLicenseAPIGuard(async ({ client, mlClient, request, response, context }) => { try { const alerting = await context.alerting; - const { createFullJobsList } = jobServiceProvider( - client, - mlClient, - alerting?.getRulesClient() - ); + const rulesClient = await alerting?.getRulesClient(); + + const { createFullJobsList } = jobServiceProvider(client, mlClient, rulesClient); const { jobIds } = request.body; const resp = await createFullJobsList(jobIds); diff --git a/x-pack/plugins/ml/server/routes/schemas/inference_schema.ts b/x-pack/plugins/ml/server/routes/schemas/inference_schema.ts index f8305cff189ed..1c2ec984fc286 100644 --- a/x-pack/plugins/ml/server/routes/schemas/inference_schema.ts +++ b/x-pack/plugins/ml/server/routes/schemas/inference_schema.ts @@ -65,8 +65,6 @@ export const optionalModelIdSchema = schema.object({ export const getInferenceQuerySchema = schema.object({ size: schema.maybe(schema.string()), - with_pipelines: schema.maybe(schema.string()), - with_indices: schema.maybe(schema.oneOf([schema.string(), schema.boolean()])), include: schema.maybe(schema.string()), }); diff --git a/x-pack/plugins/ml/server/routes/trained_models.test.ts b/x-pack/plugins/ml/server/routes/trained_models.test.ts deleted file mode 100644 index ca3eb19e757c6..0000000000000 --- a/x-pack/plugins/ml/server/routes/trained_models.test.ts +++ /dev/null @@ -1,139 +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 { errors } from '@elastic/elasticsearch'; -import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; -import type { TrainedModelConfigResponse } from '../../common/types/trained_models'; -import { populateInferenceServicesProvider } from './trained_models'; -import { mlLog } from '../lib/log'; - -jest.mock('../lib/log'); - -describe('populateInferenceServicesProvider', () => { - const client = elasticsearchClientMock.createScopedClusterClient(); - - let trainedModels: TrainedModelConfigResponse[]; - - const inferenceServices = [ - { - service: 'elser', - model_id: 'elser_test', - service_settings: { model_id: '.elser_model_2' }, - }, - { service: 'open_api_01', model_id: 'open_api_model', service_settings: {} }, - ]; - - beforeEach(() => { - trainedModels = [ - { model_id: '.elser_model_2' }, - { model_id: 'model2' }, - ] as TrainedModelConfigResponse[]; - - client.asInternalUser.transport.request.mockResolvedValue({ endpoints: inferenceServices }); - - jest.clearAllMocks(); - }); - - afterEach(() => { - jest.clearAllMocks(); - }); - - describe('when the user has required privileges', () => { - beforeEach(() => { - client.asCurrentUser.transport.request.mockResolvedValue({ endpoints: inferenceServices }); - }); - - test('should populate inference services for trained models', async () => { - const populateInferenceServices = populateInferenceServicesProvider(client); - // act - await populateInferenceServices(trainedModels, false); - - // assert - expect(client.asCurrentUser.transport.request).toHaveBeenCalledWith({ - method: 'GET', - path: '/_inference/_all', - }); - - expect(client.asInternalUser.transport.request).not.toHaveBeenCalled(); - - expect(trainedModels[0].inference_apis).toEqual([ - { - model_id: 'elser_test', - service: 'elser', - service_settings: { model_id: '.elser_model_2' }, - }, - ]); - expect(trainedModels[0].hasInferenceServices).toBe(true); - - expect(trainedModels[1].inference_apis).toEqual(undefined); - expect(trainedModels[1].hasInferenceServices).toBe(false); - - expect(mlLog.error).not.toHaveBeenCalled(); - }); - }); - - describe('when the user does not have required privileges', () => { - beforeEach(() => { - client.asCurrentUser.transport.request.mockRejectedValue( - new errors.ResponseError( - elasticsearchClientMock.createApiResponse({ - statusCode: 403, - body: { message: 'not allowed' }, - }) - ) - ); - }); - - test('should retry with internal user if an error occurs', async () => { - const populateInferenceServices = populateInferenceServicesProvider(client); - await populateInferenceServices(trainedModels, false); - - // assert - expect(client.asCurrentUser.transport.request).toHaveBeenCalledWith({ - method: 'GET', - path: '/_inference/_all', - }); - - expect(client.asInternalUser.transport.request).toHaveBeenCalledWith({ - method: 'GET', - path: '/_inference/_all', - }); - - expect(trainedModels[0].inference_apis).toEqual(undefined); - expect(trainedModels[0].hasInferenceServices).toBe(true); - - expect(trainedModels[1].inference_apis).toEqual(undefined); - expect(trainedModels[1].hasInferenceServices).toBe(false); - - expect(mlLog.error).not.toHaveBeenCalled(); - }); - }); - - test('should not retry on any other error than 403', async () => { - const notFoundError = new errors.ResponseError( - elasticsearchClientMock.createApiResponse({ - statusCode: 404, - body: { message: 'not found' }, - }) - ); - - client.asCurrentUser.transport.request.mockRejectedValue(notFoundError); - - const populateInferenceServices = populateInferenceServicesProvider(client); - await populateInferenceServices(trainedModels, false); - - // assert - expect(client.asCurrentUser.transport.request).toHaveBeenCalledWith({ - method: 'GET', - path: '/_inference/_all', - }); - - expect(client.asInternalUser.transport.request).not.toHaveBeenCalled(); - - expect(mlLog.error).toHaveBeenCalledWith(notFoundError); - }); -}); diff --git a/x-pack/plugins/ml/server/routes/trained_models.ts b/x-pack/plugins/ml/server/routes/trained_models.ts index c0010777ecf18..adedb37b4a7a5 100644 --- a/x-pack/plugins/ml/server/routes/trained_models.ts +++ b/x-pack/plugins/ml/server/routes/trained_models.ts @@ -6,20 +6,18 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { groupBy } from 'lodash'; +import type { CloudSetup } from '@kbn/cloud-plugin/server'; import { schema } from '@kbn/config-schema'; import type { ErrorType } from '@kbn/ml-error-utils'; -import type { CloudSetup } from '@kbn/cloud-plugin/server'; -import type { - ElasticCuratedModelName, - ElserVersion, - InferenceAPIConfigResponse, -} from '@kbn/ml-trained-models-utils'; -import { isDefined } from '@kbn/ml-is-defined'; -import type { IScopedClusterClient } from '@kbn/core-elasticsearch-server'; -import { type MlFeatures, ML_INTERNAL_BASE_PATH } from '../../common/constants/app'; -import type { RouteInitialization } from '../types'; +import type { ElasticCuratedModelName, ElserVersion } from '@kbn/ml-trained-models-utils'; +import { TRAINED_MODEL_TYPE } from '@kbn/ml-trained-models-utils'; +import { ML_INTERNAL_BASE_PATH, type MlFeatures } from '../../common/constants/app'; +import { DEFAULT_TRAINED_MODELS_PAGE_SIZE } from '../../common/constants/trained_models'; +import { type TrainedModelConfigResponse } from '../../common/types/trained_models'; import { wrapError } from '../client/error_wrapper'; +import { modelsProvider } from '../models/model_management'; +import type { RouteInitialization } from '../types'; +import { forceQuerySchema } from './schemas/anomaly_detectors_schema'; import { createIngestPipelineSchema, curatedModelsParamsSchema, @@ -38,72 +36,57 @@ import { threadingParamsQuerySchema, updateDeploymentParamsSchema, } from './schemas/inference_schema'; -import type { PipelineDefinition } from '../../common/types/trained_models'; -import { type TrainedModelConfigResponse } from '../../common/types/trained_models'; -import { mlLog } from '../lib/log'; -import { forceQuerySchema } from './schemas/anomaly_detectors_schema'; -import { modelsProvider } from '../models/model_management'; - -export const DEFAULT_TRAINED_MODELS_PAGE_SIZE = 10000; export function filterForEnabledFeatureModels< T extends TrainedModelConfigResponse | estypes.MlTrainedModelConfig >(models: T[], enabledFeatures: MlFeatures) { let filteredModels = models; if (enabledFeatures.nlp === false) { - filteredModels = filteredModels.filter((m) => m.model_type === 'tree_ensemble'); + filteredModels = filteredModels.filter((m) => m.model_type !== TRAINED_MODEL_TYPE.PYTORCH); } - if (enabledFeatures.dfa === false) { - filteredModels = filteredModels.filter((m) => m.model_type !== 'tree_ensemble'); + filteredModels = filteredModels.filter( + (m) => m.model_type !== TRAINED_MODEL_TYPE.TREE_ENSEMBLE + ); } - return filteredModels; } -export const populateInferenceServicesProvider = (client: IScopedClusterClient) => { - return async function populateInferenceServices( - trainedModels: TrainedModelConfigResponse[], - asInternal: boolean = false - ) { - const esClient = asInternal ? client.asInternalUser : client.asCurrentUser; - - try { - // Check if model is used by an inference service - const { endpoints } = await esClient.transport.request<{ - endpoints: InferenceAPIConfigResponse[]; - }>({ - method: 'GET', - path: `/_inference/_all`, - }); - - const inferenceAPIMap = groupBy( - endpoints, - (endpoint) => endpoint.service === 'elser' && endpoint.service_settings.model_id - ); - - for (const model of trainedModels) { - const inferenceApis = inferenceAPIMap[model.model_id]; - model.hasInferenceServices = !!inferenceApis; - if (model.hasInferenceServices && !asInternal) { - model.inference_apis = inferenceApis; - } - } - } catch (e) { - if (!asInternal && e.statusCode === 403) { - // retry with internal user to get an indicator if models has associated inference services, without mentioning the names - await populateInferenceServices(trainedModels, true); - } else { - mlLog.error(e); - } - } - }; -}; - export function trainedModelsRoutes( { router, routeGuard, getEnabledFeatures }: RouteInitialization, cloud: CloudSetup ) { + router.versioned + .get({ + path: `${ML_INTERNAL_BASE_PATH}/trained_models_list`, + access: 'internal', + security: { + authz: { + requiredPrivileges: ['ml:canGetTrainedModels'], + }, + }, + summary: 'Get trained models list', + description: + 'Retrieves a complete list of trained models with stats, pipelines, and indices.', + }) + .addVersion( + { + version: '1', + validate: false, + }, + routeGuard.fullLicenseAPIGuard(async ({ client, mlClient, request, response }) => { + try { + const modelsClient = modelsProvider(client, mlClient, cloud, getEnabledFeatures()); + const models = await modelsClient.getTrainedModelList(); + return response.ok({ + body: models, + }); + } catch (e) { + return response.customError(wrapError(e)); + } + }) + ); + router.versioned .get({ path: `${ML_INTERNAL_BASE_PATH}/trained_models/{modelId?}`, @@ -129,14 +112,7 @@ export function trainedModelsRoutes( routeGuard.fullLicenseAPIGuard(async ({ client, mlClient, request, response }) => { try { const { modelId } = request.params; - const { - with_pipelines: withPipelines, - with_indices: withIndicesRaw, - ...getTrainedModelsRequestParams - } = request.query; - - const withIndices = - request.query.with_indices === 'true' || request.query.with_indices === true; + const { ...getTrainedModelsRequestParams } = request.query; const resp = await mlClient.getTrainedModels({ ...getTrainedModelsRequestParams, @@ -147,126 +123,8 @@ export function trainedModelsRoutes( // @ts-ignore const result = resp.trained_model_configs as TrainedModelConfigResponse[]; - const populateInferenceServices = populateInferenceServicesProvider(client); - await populateInferenceServices(result, false); - - try { - if (withPipelines) { - // Also need to retrieve the list of deployment IDs from stats - const stats = await mlClient.getTrainedModelsStats({ - ...(modelId ? { model_id: modelId } : {}), - size: 10000, - }); - - const modelDeploymentsMap = stats.trained_model_stats.reduce((acc, curr) => { - if (!curr.deployment_stats) return acc; - // @ts-ignore elasticsearch-js client is missing deployment_id - const deploymentId = curr.deployment_stats.deployment_id; - if (acc[curr.model_id]) { - acc[curr.model_id].push(deploymentId); - } else { - acc[curr.model_id] = [deploymentId]; - } - return acc; - }, {} as Record); - - const modelIdsAndAliases: string[] = Array.from( - new Set([ - ...result - .map(({ model_id: id, metadata }) => { - return [id, ...(metadata?.model_aliases ?? [])]; - }) - .flat(), - ...Object.values(modelDeploymentsMap).flat(), - ]) - ); - const modelsClient = modelsProvider(client, mlClient, cloud); - - const modelsPipelinesAndIndices = await Promise.all( - modelIdsAndAliases.map(async (modelIdOrAlias) => { - return { - modelIdOrAlias, - result: await modelsClient.getModelsPipelinesAndIndicesMap(modelIdOrAlias, { - withIndices, - }), - }; - }) - ); - - for (const model of result) { - const modelAliases = model.metadata?.model_aliases ?? []; - const modelMap = modelsPipelinesAndIndices.find( - (d) => d.modelIdOrAlias === model.model_id - )?.result; - - const allRelatedModels = modelsPipelinesAndIndices - .filter( - (m) => - [ - model.model_id, - ...modelAliases, - ...(modelDeploymentsMap[model.model_id] ?? []), - ].findIndex((alias) => alias === m.modelIdOrAlias) > -1 - ) - .map((r) => r?.result) - .filter(isDefined); - const ingestPipelinesFromModelAliases = allRelatedModels - .map((r) => r?.ingestPipelines) - .filter(isDefined) as Array>>; - - model.pipelines = ingestPipelinesFromModelAliases.reduce< - Record - >((allPipelines, modelsToPipelines) => { - for (const [, pipelinesObj] of modelsToPipelines?.entries()) { - Object.entries(pipelinesObj).forEach(([pipelineId, pipelineInfo]) => { - allPipelines[pipelineId] = pipelineInfo; - }); - } - return allPipelines; - }, {}); - - if (modelMap && withIndices) { - model.indices = modelMap.indices; - } - } - } - } catch (e) { - // the user might not have required permissions to fetch pipelines - // log the error to the debug log as this might be a common situation and - // we don't need to fill kibana's log with these messages. - mlLog.debug(e); - } - const filteredModels = filterForEnabledFeatureModels(result, getEnabledFeatures()); - try { - const jobIds = filteredModels - .map((model) => { - const id = model.metadata?.analytics_config?.id; - if (id) { - return `${id}*`; - } - }) - .filter((id) => id !== undefined); - - if (jobIds.length) { - const { data_frame_analytics: jobs } = await mlClient.getDataFrameAnalytics({ - id: jobIds.join(','), - allow_no_match: true, - }); - - filteredModels.forEach((model) => { - const dfaId = model?.metadata?.analytics_config?.id; - if (dfaId !== undefined) { - // if this is a dfa model, set origin_job_exists - model.origin_job_exists = jobs.find((job) => job.id === dfaId) !== undefined; - } - }); - } - } catch (e) { - // Swallow error to prevent blocking trained models result - } - return response.ok({ body: filteredModels, }); @@ -368,9 +226,12 @@ export function trainedModelsRoutes( routeGuard.fullLicenseAPIGuard(async ({ client, request, mlClient, response }) => { try { const { modelId } = request.params; - const result = await modelsProvider(client, mlClient, cloud).getModelsPipelines( - modelId.split(',') - ); + const result = await modelsProvider( + client, + mlClient, + cloud, + getEnabledFeatures() + ).getModelsPipelines(modelId.split(',')); return response.ok({ body: [...result].map(([id, pipelines]) => ({ model_id: id, pipelines })), }); @@ -397,9 +258,14 @@ export function trainedModelsRoutes( version: '1', validate: false, }, - routeGuard.fullLicenseAPIGuard(async ({ client, request, mlClient, response }) => { + routeGuard.fullLicenseAPIGuard(async ({ client, mlClient, response }) => { try { - const body = await modelsProvider(client, mlClient, cloud).getPipelines(); + const body = await modelsProvider( + client, + mlClient, + cloud, + getEnabledFeatures() + ).getPipelines(); return response.ok({ body, }); @@ -433,10 +299,12 @@ export function trainedModelsRoutes( routeGuard.fullLicenseAPIGuard(async ({ client, request, mlClient, response }) => { try { const { pipeline, pipelineName } = request.body; - const body = await modelsProvider(client, mlClient, cloud).createInferencePipeline( - pipeline!, - pipelineName - ); + const body = await modelsProvider( + client, + mlClient, + cloud, + getEnabledFeatures() + ).createInferencePipeline(pipeline!, pipelineName); return response.ok({ body, }); @@ -518,7 +386,12 @@ export function trainedModelsRoutes( if (withPipelines) { // first we need to delete pipelines, otherwise ml api return an error - await modelsProvider(client, mlClient, cloud).deleteModelPipelines(modelId.split(',')); + await modelsProvider( + client, + mlClient, + cloud, + getEnabledFeatures() + ).deleteModelPipelines(modelId.split(',')); } const body = await mlClient.deleteTrainedModel({ @@ -774,7 +647,12 @@ export function trainedModelsRoutes( }, routeGuard.fullLicenseAPIGuard(async ({ response, mlClient, client }) => { try { - const body = await modelsProvider(client, mlClient, cloud).getModelDownloads(); + const body = await modelsProvider( + client, + mlClient, + cloud, + getEnabledFeatures() + ).getModelDownloads(); return response.ok({ body, @@ -810,7 +688,7 @@ export function trainedModelsRoutes( try { const { version } = request.query; - const body = await modelsProvider(client, mlClient, cloud).getELSER( + const body = await modelsProvider(client, mlClient, cloud, getEnabledFeatures()).getELSER( version ? { version: Number(version) as ElserVersion } : undefined ); @@ -848,10 +726,12 @@ export function trainedModelsRoutes( async ({ client, mlClient, request, response, mlSavedObjectService }) => { try { const { modelId } = request.params; - const body = await modelsProvider(client, mlClient, cloud).installElasticModel( - modelId, - mlSavedObjectService - ); + const body = await modelsProvider( + client, + mlClient, + cloud, + getEnabledFeatures() + ).installElasticModel(modelId, mlSavedObjectService); return response.ok({ body, @@ -883,7 +763,12 @@ export function trainedModelsRoutes( routeGuard.fullLicenseAPIGuard( async ({ client, mlClient, request, response, mlSavedObjectService }) => { try { - const body = await modelsProvider(client, mlClient, cloud).getModelsDownloadStatus(); + const body = await modelsProvider( + client, + mlClient, + cloud, + getEnabledFeatures() + ).getModelsDownloadStatus(); return response.ok({ body, @@ -921,10 +806,14 @@ export function trainedModelsRoutes( routeGuard.fullLicenseAPIGuard( async ({ client, mlClient, request, response, mlSavedObjectService }) => { try { - const body = await modelsProvider(client, mlClient, cloud).getCuratedModelConfig( - request.params.modelName as ElasticCuratedModelName, - { version: request.query.version as ElserVersion } - ); + const body = await modelsProvider( + client, + mlClient, + cloud, + getEnabledFeatures() + ).getCuratedModelConfig(request.params.modelName as ElasticCuratedModelName, { + version: request.query.version as ElserVersion, + }); return response.ok({ body, diff --git a/x-pack/plugins/ml/server/saved_objects/util.ts b/x-pack/plugins/ml/server/saved_objects/util.ts index 27562e919b79f..7f3f087ea61be 100644 --- a/x-pack/plugins/ml/server/saved_objects/util.ts +++ b/x-pack/plugins/ml/server/saved_objects/util.ts @@ -12,6 +12,7 @@ import { type IScopedClusterClient, SavedObjectsClient, } from '@kbn/core/server'; +import { DEFAULT_TRAINED_MODELS_PAGE_SIZE } from '../../common/constants/trained_models'; import type { TrainedModelJob, MLSavedObjectService } from './service'; import { ML_JOB_SAVED_OBJECT_TYPE } from '../../common/types/saved_objects'; @@ -86,7 +87,9 @@ export function mlFunctionsFactory(client: IScopedClusterClient) { }, async getTrainedModels() { try { - return await client.asInternalUser.ml.getTrainedModels(); + return await client.asInternalUser.ml.getTrainedModels({ + size: DEFAULT_TRAINED_MODELS_PAGE_SIZE, + }); } catch (error) { return null; } diff --git a/x-pack/plugins/ml/server/shared_services/providers/trained_models.ts b/x-pack/plugins/ml/server/shared_services/providers/trained_models.ts index 36d639066f97a..04f12d82688e1 100644 --- a/x-pack/plugins/ml/server/shared_services/providers/trained_models.ts +++ b/x-pack/plugins/ml/server/shared_services/providers/trained_models.ts @@ -12,6 +12,7 @@ import type { GetModelDownloadConfigOptions, ModelDefinitionResponse, } from '@kbn/ml-trained-models-utils'; +import type { MlFeatures } from '../../../common/constants/app'; import type { MlInferTrainedModelRequest, MlStopTrainedModelDeploymentRequest, @@ -59,7 +60,8 @@ export interface TrainedModelsProvider { export function getTrainedModelsProvider( getGuards: GetGuards, - cloud: CloudSetup + cloud: CloudSetup, + enabledFeatures: MlFeatures ): TrainedModelsProvider { return { trainedModelsProvider(request: KibanaRequest, savedObjectsClient: SavedObjectsClientContract) { @@ -134,7 +136,9 @@ export function getTrainedModelsProvider( .isFullLicense() .hasMlCapabilities(['canGetTrainedModels']) .ok(async ({ scopedClient, mlClient }) => { - return modelsProvider(scopedClient, mlClient, cloud).getELSER(params); + return modelsProvider(scopedClient, mlClient, cloud, enabledFeatures).getELSER( + params + ); }); }, async getCuratedModelConfig(...params: GetCuratedModelConfigParams) { @@ -142,7 +146,12 @@ export function getTrainedModelsProvider( .isFullLicense() .hasMlCapabilities(['canGetTrainedModels']) .ok(async ({ scopedClient, mlClient }) => { - return modelsProvider(scopedClient, mlClient, cloud).getCuratedModelConfig(...params); + return modelsProvider( + scopedClient, + mlClient, + cloud, + enabledFeatures + ).getCuratedModelConfig(...params); }); }, async installElasticModel(modelId: string) { @@ -150,10 +159,12 @@ export function getTrainedModelsProvider( .isFullLicense() .hasMlCapabilities(['canGetTrainedModels']) .ok(async ({ scopedClient, mlClient, mlSavedObjectService }) => { - return modelsProvider(scopedClient, mlClient, cloud).installElasticModel( - modelId, - mlSavedObjectService - ); + return modelsProvider( + scopedClient, + mlClient, + cloud, + enabledFeatures + ).installElasticModel(modelId, mlSavedObjectService); }); }, }; diff --git a/x-pack/plugins/ml/server/shared_services/shared_services.ts b/x-pack/plugins/ml/server/shared_services/shared_services.ts index d4af7166435d4..caaf3abb78815 100644 --- a/x-pack/plugins/ml/server/shared_services/shared_services.ts +++ b/x-pack/plugins/ml/server/shared_services/shared_services.ts @@ -16,7 +16,7 @@ import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-ser import type { IClusterClient, IScopedClusterClient } from '@kbn/core-elasticsearch-server'; import type { UiSettingsServiceStart } from '@kbn/core-ui-settings-server'; import type { CoreAuditService } from '@kbn/core-security-server'; -import type { CompatibleModule } from '../../common/constants/app'; +import type { CompatibleModule, MlFeatures } from '../../common/constants/app'; import type { MlLicense } from '../../common/license'; import { licenseChecks } from './license_checks'; @@ -110,7 +110,8 @@ export function createSharedServices( getDataViews: () => DataViewsPluginStart, getAuditService: () => CoreAuditService | null, isMlReady: () => Promise, - compatibleModuleType: CompatibleModule | null + compatibleModuleType: CompatibleModule | null, + enabledFeatures: MlFeatures ): { sharedServicesProviders: SharedServices; internalServicesProviders: MlServicesProviders; @@ -188,7 +189,7 @@ export function createSharedServices( ...getResultsServiceProvider(getGuards), ...getMlSystemProvider(getGuards, mlLicense, getSpaces, cloud, resolveMlCapabilities), ...getAlertingServiceProvider(getGuards), - ...getTrainedModelsProvider(getGuards, cloud), + ...getTrainedModelsProvider(getGuards, cloud, enabledFeatures), }, /** * Services providers for ML internal usage diff --git a/x-pack/plugins/monitoring/public/alerts/alert_form.test.tsx b/x-pack/plugins/monitoring/public/alerts/alert_form.test.tsx index 2cca4638876c9..f1e84753820fe 100644 --- a/x-pack/plugins/monitoring/public/alerts/alert_form.test.tsx +++ b/x-pack/plugins/monitoring/public/alerts/alert_form.test.tsx @@ -270,6 +270,7 @@ describe('alert_form', () => { actionTypeRegistry={actionTypeRegistry} featureId="alerting" producerId="alerting" + ruleTypeId=".es-query" /> diff --git a/x-pack/plugins/monitoring/server/lib/cluster/get_clusters_from_request.ts b/x-pack/plugins/monitoring/server/lib/cluster/get_clusters_from_request.ts index 52c0c2a6b7334..b753388af7d5d 100644 --- a/x-pack/plugins/monitoring/server/lib/cluster/get_clusters_from_request.ts +++ b/x-pack/plugins/monitoring/server/lib/cluster/get_clusters_from_request.ts @@ -123,25 +123,19 @@ export async function getClustersFromRequest( // update clusters with license check results const getSupportedClusters = flagSupportedClusters(req, CCS_REMOTE_PATTERN); clusters = await getSupportedClusters(clusters); + clusters = initializeClusters(clusters); // add alerts data if (isInCodePath(codePaths, [CODE_PATH_ALERTS])) { - const rulesClient = req.getRulesClient(); - const alertStatus = await fetchStatus( - rulesClient, - undefined, - clusters.map((cluster) => get(cluster, 'elasticsearch.cluster.id', cluster.cluster_uuid)) + const rulesClient = await req.getRulesClient(); + const clustersIds = clusters.map((cluster) => + get(cluster, 'elasticsearch.cluster.id', cluster.cluster_uuid) ); - for (const cluster of clusters) { - if (!rulesClient) { - cluster.alerts = { - list: {}, - alertsMeta: { - enabled: false, - }, - }; - } else { + if (rulesClient) { + const alertStatus = await fetchStatus(rulesClient, undefined, clustersIds); + + for (const cluster of clusters) { try { cluster.alerts = { list: Object.keys(alertStatus).reduce((acc, ruleTypeName) => { @@ -163,12 +157,6 @@ export async function getClustersFromRequest( req.logger.warn( `Unable to fetch alert status because '${err.message}'. Alerts may not properly show up in the UI.` ); - cluster.alerts = { - list: {}, - alertsMeta: { - enabled: true, - }, - }; } } } @@ -284,3 +272,13 @@ export async function getClustersFromRequest( return getClustersSummary(req.server, clusters as EnhancedClusters[], kibanaUuid, isCcrEnabled); } + +const initializeClusters = (clusters: Cluster[]): Cluster[] => { + return clusters.map((cluster) => ({ + ...cluster, + list: {}, + alertsMeta: { + enabled: false, + }, + })); +}; diff --git a/x-pack/plugins/monitoring/server/lib/setup/collection/get_collection_status.test.ts b/x-pack/plugins/monitoring/server/lib/setup/collection/get_collection_status.test.ts index b743e0300aef6..ce03cc5aecf3b 100644 --- a/x-pack/plugins/monitoring/server/lib/setup/collection/get_collection_status.test.ts +++ b/x-pack/plugins/monitoring/server/lib/setup/collection/get_collection_status.test.ts @@ -94,7 +94,7 @@ const mockReq = ( headers: {}, getKibanaStatsCollector: () => null, getUiSettingsService: () => null, - getActionTypeRegistry: () => null, + getActionTypeRegistry: () => [], getRulesClient: () => null, getActionsClient: () => null, }; diff --git a/x-pack/plugins/monitoring/server/plugin.ts b/x-pack/plugins/monitoring/server/plugin.ts index 0a7460457854e..dbf375aa2e057 100644 --- a/x-pack/plugins/monitoring/server/plugin.ts +++ b/x-pack/plugins/monitoring/server/plugin.ts @@ -23,7 +23,9 @@ import { import { get } from 'lodash'; import { DEFAULT_APP_CATEGORIES } from '@kbn/core/server'; import { RouteMethod } from '@kbn/core/server'; +import { ALERTING_FEATURE_ID } from '@kbn/alerting-plugin/common'; import { KibanaFeatureScope } from '@kbn/features-plugin/common'; +import { AlertConsumers } from '@kbn/rule-data-utils'; import { KIBANA_MONITORING_LOGGING_TAG, KIBANA_STATS_TYPE_MONITORING, @@ -265,6 +267,11 @@ export class MonitoringPlugin } registerPluginInUI(plugins: PluginsSetup) { + const alertingFeatures = RULES.map((ruleTypeId) => ({ + ruleTypeId, + consumers: ['monitoring', ALERTING_FEATURE_ID, AlertConsumers.OBSERVABILITY], + })); + plugins.features.registerKibanaFeature({ id: 'monitoring', name: i18n.translate('xpack.monitoring.featureRegistry.monitoringFeatureName', { @@ -275,7 +282,7 @@ export class MonitoringPlugin app: ['monitoring', 'kibana'], catalogue: ['monitoring'], privileges: null, - alerting: RULES, + alerting: alertingFeatures, reserved: { description: i18n.translate('xpack.monitoring.feature.reserved.description', { defaultMessage: 'To grant users access, you should also assign the monitoring_user role.', @@ -292,10 +299,10 @@ export class MonitoringPlugin }, alerting: { rule: { - all: RULES, + all: alertingFeatures, }, alert: { - all: RULES, + all: alertingFeatures, }, }, ui: [], @@ -335,7 +342,7 @@ export class MonitoringPlugin payload: req.body, getKibanaStatsCollector: () => this.legacyShimDependencies.kibanaStatsCollector, getUiSettingsService: () => coreContext.uiSettings.client, - getActionTypeRegistry: () => actionContext?.listTypes(), + getActionTypeRegistry: () => actionContext?.listTypes() ?? [], getRulesClient: () => { try { return plugins.alerting.getRulesClientWithRequest(req); diff --git a/x-pack/plugins/monitoring/server/routes/api/v1/alerts/enable.ts b/x-pack/plugins/monitoring/server/routes/api/v1/alerts/enable.ts index 8b919fd1f86ea..593f3c9b2b4ab 100644 --- a/x-pack/plugins/monitoring/server/routes/api/v1/alerts/enable.ts +++ b/x-pack/plugins/monitoring/server/routes/api/v1/alerts/enable.ts @@ -30,6 +30,7 @@ export function enableAlertsRoute(server: MonitoringCore, npRoute: RouteDependen const actionContext = await context.actions; const alerts = RulesFactory.getAll(); + if (alerts.length) { const { isSufficientlySecure, hasPermanentEncryptionKey } = npRoute.alerting ?.getSecurityHealth @@ -49,9 +50,10 @@ export function enableAlertsRoute(server: MonitoringCore, npRoute: RouteDependen } } - const rulesClient = alertingContext?.getRulesClient(); + const rulesClient = await alertingContext?.getRulesClient(); const actionsClient = actionContext?.getActionsClient(); const types = actionContext?.listTypes(); + if (!rulesClient || !actionsClient || !types) { return response.ok({ body: undefined }); } diff --git a/x-pack/plugins/monitoring/server/routes/api/v1/alerts/status.ts b/x-pack/plugins/monitoring/server/routes/api/v1/alerts/status.ts index 64a0b7b92d85f..a6c7d9b833ee1 100644 --- a/x-pack/plugins/monitoring/server/routes/api/v1/alerts/status.ts +++ b/x-pack/plugins/monitoring/server/routes/api/v1/alerts/status.ts @@ -36,7 +36,7 @@ export function alertStatusRoute(npRoute: RouteDependencies) { try { const { clusterUuid } = request.params; const { alertTypeIds, filters } = request.body; - const rulesClient = (await context.alerting)?.getRulesClient(); + const rulesClient = await (await context.alerting)?.getRulesClient(); if (!rulesClient) { return response.ok({ body: undefined }); } diff --git a/x-pack/plugins/monitoring/server/types.ts b/x-pack/plugins/monitoring/server/types.ts index 95707caf50199..14ef949b93949 100644 --- a/x-pack/plugins/monitoring/server/types.ts +++ b/x-pack/plugins/monitoring/server/types.ts @@ -24,17 +24,14 @@ import type { } from '@kbn/actions-plugin/server'; import type { AlertingApiRequestHandlerContext } from '@kbn/alerting-plugin/server'; import type { RacApiRequestHandlerContext } from '@kbn/rule-registry-plugin/server'; -import { - PluginStartContract as AlertingPluginStartContract, - PluginSetupContract as AlertingPluginSetupContract, -} from '@kbn/alerting-plugin/server'; +import { AlertingServerSetup, AlertingServerStart } from '@kbn/alerting-plugin/server'; import { InfraPluginSetup, InfraRequestHandlerContext } from '@kbn/infra-plugin/server'; -import { PluginSetupContract as AlertingPluginSetup } from '@kbn/alerting-plugin/server'; import { LicensingPluginStart } from '@kbn/licensing-plugin/server'; import { FeaturesPluginSetup } from '@kbn/features-plugin/server'; import { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; import { CloudSetup } from '@kbn/cloud-plugin/server'; import { RouteConfig, RouteMethod, Headers } from '@kbn/core/server'; +import { ActionTypeRegistry } from '@kbn/actions-plugin/server/action_type_registry'; import { ElasticsearchModifiedSource } from '../common/types/es'; import { RulesByType } from '../common/types/alerts'; import { configSchema, MonitoringConfig } from './config'; @@ -53,7 +50,7 @@ export interface PluginsSetup { encryptedSavedObjects?: EncryptedSavedObjectsPluginSetup; usageCollection?: UsageCollectionSetup; features: FeaturesPluginSetup; - alerting?: AlertingPluginSetupContract; + alerting?: AlertingServerSetup; infra: InfraPluginSetup; cloud?: CloudSetup; } @@ -66,7 +63,7 @@ export type RequestHandlerContextMonitoringPlugin = CustomRequestHandlerContext< }>; export interface PluginsStart { - alerting: AlertingPluginStartContract; + alerting: AlertingServerStart; actions: ActionsPluginsStartContact; licensing: LicensingPluginStart; } @@ -76,7 +73,7 @@ export interface RouteDependencies { router: IRouter; licenseService: MonitoringLicenseService; encryptedSavedObjects?: EncryptedSavedObjectsPluginSetup; - alerting?: AlertingPluginSetup; + alerting?: AlertingServerSetup; logger: Logger; } @@ -127,9 +124,11 @@ export interface LegacyRequest { headers: Headers; getKibanaStatsCollector: () => any; getUiSettingsService: () => any; - getActionTypeRegistry: () => any; - getRulesClient: () => any; - getActionsClient: () => any; + getActionTypeRegistry: () => ReturnType; + getRulesClient: () => ReturnType | null; + getActionsClient: () => ReturnType< + ActionsPluginsStartContact['getActionsClientWithRequest'] + > | null; server: LegacyServer; } diff --git a/x-pack/plugins/observability_solution/apm/common/alerting/config/apm_alerting_feature_ids.ts b/x-pack/plugins/observability_solution/apm/common/alerting/config/apm_alerting_feature_ids.ts index ac0afd7e912ca..784ab0b534256 100644 --- a/x-pack/plugins/observability_solution/apm/common/alerting/config/apm_alerting_feature_ids.ts +++ b/x-pack/plugins/observability_solution/apm/common/alerting/config/apm_alerting_feature_ids.ts @@ -5,12 +5,19 @@ * 2.0. */ -import { AlertConsumers, type ValidFeatureId } from '@kbn/rule-data-utils'; +import { + AlertConsumers, + OBSERVABILITY_RULE_TYPE_IDS, + type ValidFeatureId, +} from '@kbn/rule-data-utils'; -export const apmAlertingFeatureIds: ValidFeatureId[] = [ +export const apmAlertingConsumers: ValidFeatureId[] = [ AlertConsumers.LOGS, AlertConsumers.APM, AlertConsumers.SLO, AlertConsumers.OBSERVABILITY, AlertConsumers.INFRASTRUCTURE, + AlertConsumers.ALERTS, ]; + +export const apmAlertingRuleTypeIds: string[] = [...OBSERVABILITY_RULE_TYPE_IDS]; diff --git a/x-pack/plugins/observability_solution/apm/common/utils/formatters/alert_url.test.ts b/x-pack/plugins/observability_solution/apm/common/utils/formatters/alert_url.test.ts new file mode 100644 index 0000000000000..6094b0083f39d --- /dev/null +++ b/x-pack/plugins/observability_solution/apm/common/utils/formatters/alert_url.test.ts @@ -0,0 +1,44 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { getAlertUrlErrorCount, getAlertUrlTransaction } from './alert_url'; +describe('alert_url', () => { + describe('getAlertUrlErrorCount', () => { + it('return the URL where the service name is camelcase', () => { + const url = getAlertUrlErrorCount('serviceName', 'serviceEnv'); + expect(url).toBe('/app/apm/services/serviceName/errors?environment=serviceEnv'); + }); + it('return the URL where the service name is sneak case', () => { + const url = getAlertUrlErrorCount('service_name', 'serviceEnv'); + expect(url).toBe('/app/apm/services/service_name/errors?environment=serviceEnv'); + }); + it('return the URL encoded correctly where the service name has spaces', () => { + const url = getAlertUrlErrorCount('service name', 'serviceEnv'); + expect(url).toBe('/app/apm/services/service%20name/errors?environment=serviceEnv'); + }); + }); + describe('getAlertUrlTransaction', () => { + it('return the URL where the service name is camelcase', () => { + const url = getAlertUrlTransaction('serviceName', 'serviceEnv', 'transactionType'); + expect(url).toBe( + '/app/apm/services/serviceName?transactionType=transactionType&environment=serviceEnv' + ); + }); + it('return the URL where the service name is sneak case', () => { + const url = getAlertUrlTransaction('service_name', 'serviceEnv', 'transactionType'); + expect(url).toBe( + '/app/apm/services/service_name?transactionType=transactionType&environment=serviceEnv' + ); + }); + it('return the URL encoded correctly where the service name has spaces', () => { + const url = getAlertUrlTransaction('service name', 'serviceEnv', 'transactionType'); + expect(url).toBe( + '/app/apm/services/service%20name?transactionType=transactionType&environment=serviceEnv' + ); + }); + }); +}); diff --git a/x-pack/plugins/observability_solution/apm/common/utils/formatters/alert_url.ts b/x-pack/plugins/observability_solution/apm/common/utils/formatters/alert_url.ts index 318413cc44cf9..61ea3b9bc2fb6 100644 --- a/x-pack/plugins/observability_solution/apm/common/utils/formatters/alert_url.ts +++ b/x-pack/plugins/observability_solution/apm/common/utils/formatters/alert_url.ts @@ -13,7 +13,7 @@ const format = ({ pathname, query }: { pathname: string; query: Record format({ - pathname: `/app/apm/services/${serviceName}/errors`, + pathname: `/app/apm/services/${encodeURIComponent(serviceName)}/errors`, query: { environment: serviceEnv ?? ENVIRONMENT_ALL.value, }, @@ -25,7 +25,7 @@ export const getAlertUrlTransaction = ( transactionType: string ) => format({ - pathname: `/app/apm/services/${serviceName}`, + pathname: `/app/apm/services/${encodeURIComponent(serviceName)}`, query: { transactionType, environment: serviceEnv ?? ENVIRONMENT_ALL.value, diff --git a/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/transaction_details/transaction_details.cy.ts b/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/transaction_details/transaction_details.cy.ts index af23fc8a2ad7e..0ef8fb40ceb38 100644 --- a/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/transaction_details/transaction_details.cy.ts +++ b/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/transaction_details/transaction_details.cy.ts @@ -15,8 +15,7 @@ const timeRange = { rangeFrom: start, rangeTo: end, }; -// flaky -describe.skip('Transaction details', () => { +describe('Transaction details', () => { before(() => { synthtrace.index( opbeans({ @@ -34,7 +33,7 @@ describe.skip('Transaction details', () => { cy.loginAsViewerUser(); }); - it('shows transaction name and transaction charts', () => { + it('shows transaction name and transaction charts', { defaultCommandTimeout: 60000 }, () => { cy.intercept('GET', '/internal/apm/services/opbeans-java/transactions/charts/latency?*').as( 'transactionLatencyRequest' ); @@ -60,7 +59,7 @@ describe.skip('Transaction details', () => { '@transactionThroughputRequest', '@transactionFailureRateRequest', ], - { timeout: 30000 } + { timeout: 60000 } ).spread((latencyInterception, throughputInterception, failureRateInterception) => { expect(latencyInterception.request.query.transactionName).to.be.eql('GET /api/product'); @@ -106,7 +105,9 @@ describe.skip('Transaction details', () => { ); cy.contains('Create SLO'); }); - it('shows top errors table', () => { + + // flaky + it.skip('shows top errors table', () => { cy.visitKibana( `/app/apm/services/opbeans-java/transactions/view?${new URLSearchParams({ ...timeRange, diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/alerts_overview/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/alerts_overview/index.tsx index 54ff6402b6777..682634819e623 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/alerts_overview/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/alerts_overview/index.tsx @@ -13,7 +13,10 @@ import { EuiPanel, EuiFlexItem, EuiFlexGroup } from '@elastic/eui'; import { BoolQuery } from '@kbn/es-query'; import { AlertConsumers } from '@kbn/rule-data-utils'; import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { apmAlertingFeatureIds } from '../../../../common/alerting/config/apm_alerting_feature_ids'; +import { + apmAlertingConsumers, + apmAlertingRuleTypeIds, +} from '../../../../common/alerting/config/apm_alerting_feature_ids'; import { ApmPluginStartDeps } from '../../../plugin'; import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; import { SERVICE_NAME } from '../../../../common/es_fields/apm'; @@ -108,7 +111,8 @@ export function AlertsOverview() { alertsTableConfigurationRegistry={alertsTableConfigurationRegistry} id={'service-overview-alerts'} configurationId={AlertConsumers.OBSERVABILITY} - featureIds={apmAlertingFeatureIds} + ruleTypeIds={apmAlertingRuleTypeIds} + consumers={apmAlertingConsumers} query={esQuery} showAlertStatusWithFlapping cellContext={{ observabilityRuleTypeRegistry }} diff --git a/x-pack/plugins/observability_solution/apm/server/assistant_functions/index.ts b/x-pack/plugins/observability_solution/apm/server/assistant_functions/index.ts index 1dff57cef6602..6a65e6126ff22 100644 --- a/x-pack/plugins/observability_solution/apm/server/assistant_functions/index.ts +++ b/x-pack/plugins/observability_solution/apm/server/assistant_functions/index.ts @@ -72,7 +72,10 @@ export function registerAssistantFunctions({ ruleDataClient, plugins, getApmIndices: async () => { - const apmIndices = await plugins.apmDataAccess.setup.getApmIndices(); + const coreContext = await resources.context.core; + const apmIndices = await plugins.apmDataAccess.setup.getApmIndices( + coreContext.savedObjects.client + ); return apmIndices; }, }; diff --git a/x-pack/plugins/observability_solution/apm/server/feature.ts b/x-pack/plugins/observability_solution/apm/server/feature.ts index f9b047c602cda..6e129d298e0a7 100644 --- a/x-pack/plugins/observability_solution/apm/server/feature.ts +++ b/x-pack/plugins/observability_solution/apm/server/feature.ts @@ -15,10 +15,14 @@ import { import { APM_INDEX_SETTINGS_SAVED_OBJECT_TYPE } from '@kbn/apm-data-access-plugin/server/saved_objects/apm_indices'; import { ApmRuleType } from '@kbn/rule-data-utils'; +import { ALERTING_FEATURE_ID } from '@kbn/alerting-plugin/common'; import { KibanaFeatureConfig, KibanaFeatureScope } from '@kbn/features-plugin/common'; import { APM_SERVER_FEATURE_ID } from '../common/rules/apm_rule_types'; -const ruleTypes = Object.values(ApmRuleType); +const alertingFeatures = Object.values(ApmRuleType).map((ruleTypeId) => ({ + ruleTypeId, + consumers: [APM_SERVER_FEATURE_ID, ALERTING_FEATURE_ID], +})); export const APM_FEATURE: KibanaFeatureConfig = { id: APM_SERVER_FEATURE_ID, @@ -33,7 +37,7 @@ export const APM_FEATURE: KibanaFeatureConfig = { management: { insightsAndAlerting: ['triggersActions'], }, - alerting: ruleTypes, + alerting: alertingFeatures, // see x-pack/plugins/features/common/feature_kibana_privileges.ts privileges: { all: { @@ -46,10 +50,10 @@ export const APM_FEATURE: KibanaFeatureConfig = { }, alerting: { alert: { - all: ruleTypes, + all: alertingFeatures, }, rule: { - all: ruleTypes, + all: alertingFeatures, }, }, management: { @@ -67,10 +71,10 @@ export const APM_FEATURE: KibanaFeatureConfig = { }, alerting: { alert: { - read: ruleTypes, + read: alertingFeatures, }, rule: { - read: ruleTypes, + read: alertingFeatures, }, }, management: { diff --git a/x-pack/plugins/observability_solution/apm/server/lib/helpers/get_apm_alerts_client.ts b/x-pack/plugins/observability_solution/apm/server/lib/helpers/get_apm_alerts_client.ts index 528d5bd8cc6a0..95c29472dbc79 100644 --- a/x-pack/plugins/observability_solution/apm/server/lib/helpers/get_apm_alerts_client.ts +++ b/x-pack/plugins/observability_solution/apm/server/lib/helpers/get_apm_alerts_client.ts @@ -12,7 +12,7 @@ import { DataTier } from '@kbn/observability-shared-plugin/common'; import { searchExcludedDataTiers } from '@kbn/observability-plugin/common/ui_settings_keys'; import { estypes } from '@elastic/elasticsearch'; import { getDataTierFilterCombined } from '@kbn/apm-data-access-plugin/server/utils'; -import { apmAlertingFeatureIds } from '../../../common/alerting/config/apm_alerting_feature_ids'; +import { apmAlertingRuleTypeIds } from '../../../common/alerting/config/apm_alerting_feature_ids'; import type { MinimalAPMRouteHandlerResources } from '../../routes/apm_routes/register_apm_server_routes'; export type ApmAlertsClient = Awaited>; @@ -32,7 +32,7 @@ export async function getApmAlertsClient({ const ruleRegistryPluginStart = await plugins.ruleRegistry.start(); const alertsClient = await ruleRegistryPluginStart.getRacClientWithRequest(request); - const apmAlertsIndices = await alertsClient.getAuthorizedAlertsIndices(apmAlertingFeatureIds); + const apmAlertsIndices = await alertsClient.getAuthorizedAlertsIndices(apmAlertingRuleTypeIds); if (!apmAlertsIndices || isEmpty(apmAlertsIndices)) { throw Error('No alert indices exist for "apm"'); diff --git a/x-pack/plugins/observability_solution/apm/server/plugin.ts b/x-pack/plugins/observability_solution/apm/server/plugin.ts index de49ebcebf8b0..1142a5c69a51f 100644 --- a/x-pack/plugins/observability_solution/apm/server/plugin.ts +++ b/x-pack/plugins/observability_solution/apm/server/plugin.ts @@ -16,6 +16,7 @@ import { registerAssistantFunctions } from './assistant_functions'; import { registerDeprecations } from './deprecations'; import { APM_FEATURE, registerFeaturesUsage } from './feature'; import { createApmTelemetry } from './lib/apm_telemetry'; +import { getInternalSavedObjectsClient } from './lib/helpers/get_internal_saved_objects_client'; import { APM_RULE_TYPE_ALERT_CONTEXT, apmRuleTypeAlertFieldMap, @@ -114,6 +115,13 @@ export class APMPlugin }; }) as APMRouteHandlerResources['plugins']; + const apmIndicesPromise = (async () => { + const coreStart = await getCoreStart(); + const soClient = await getInternalSavedObjectsClient(coreStart); + const { getApmIndices } = plugins.apmDataAccess; + return getApmIndices(soClient); + })(); + // This if else block will go away in favour of removing Home Tutorial Integration // Ideally we will directly register a custom integration and pass the configs // for cloud, onPrem and Serverless so that the actual component can take @@ -121,8 +129,7 @@ export class APMPlugin if (currentConfig.serverlessOnboarding && plugins.customIntegrations) { plugins.customIntegrations?.registerCustomIntegration(apmTutorialCustomIntegration); } else { - plugins.apmDataAccess - .getApmIndices() + apmIndicesPromise .then((apmIndices) => { plugins.home?.tutorials.registerTutorial( tutorialProvider({ diff --git a/x-pack/plugins/observability_solution/apm/server/routes/alerts/register_apm_rule_types.ts b/x-pack/plugins/observability_solution/apm/server/routes/alerts/register_apm_rule_types.ts index 4c57ef4a10e1d..ea653b47145a2 100644 --- a/x-pack/plugins/observability_solution/apm/server/routes/alerts/register_apm_rule_types.ts +++ b/x-pack/plugins/observability_solution/apm/server/routes/alerts/register_apm_rule_types.ts @@ -8,10 +8,7 @@ import type { AlertsLocatorParams } from '@kbn/observability-plugin/common'; import { LocatorPublic } from '@kbn/share-plugin/common'; import { IBasePath, Logger, SavedObjectsClientContract } from '@kbn/core/server'; -import { - PluginSetupContract as AlertingPluginSetupContract, - type IRuleTypeAlerts, -} from '@kbn/alerting-plugin/server'; +import type { AlertingServerSetup, IRuleTypeAlerts } from '@kbn/alerting-plugin/server'; import { ObservabilityPluginSetup } from '@kbn/observability-plugin/server'; import { IRuleDataClient } from '@kbn/rule-registry-plugin/server'; import { MlPluginSetup } from '@kbn/ml-plugin/server'; @@ -100,7 +97,7 @@ export const ApmRuleTypeAlertDefinition: IRuleTypeAlerts }; export interface RegisterRuleDependencies { - alerting: AlertingPluginSetupContract; + alerting: AlertingServerSetup; basePath: IBasePath; getApmIndices: (soClient: SavedObjectsClientContract) => Promise; apmConfig: APMConfig; diff --git a/x-pack/plugins/observability_solution/apm/server/routes/alerts/test_utils/index.ts b/x-pack/plugins/observability_solution/apm/server/routes/alerts/test_utils/index.ts index ce3e67baea1d6..9230ca4983698 100644 --- a/x-pack/plugins/observability_solution/apm/server/routes/alerts/test_utils/index.ts +++ b/x-pack/plugins/observability_solution/apm/server/routes/alerts/test_utils/index.ts @@ -9,7 +9,7 @@ import { IBasePath, Logger } from '@kbn/core/server'; import { elasticsearchServiceMock } from '@kbn/core/server/mocks'; import { IRuleDataClient } from '@kbn/rule-registry-plugin/server'; import { ruleRegistryMocks } from '@kbn/rule-registry-plugin/server/mocks'; -import { PluginSetupContract as AlertingPluginSetupContract } from '@kbn/alerting-plugin/server'; +import { AlertingServerSetup } from '@kbn/alerting-plugin/server'; import { ObservabilityPluginSetup } from '@kbn/observability-plugin/server'; import { DEFAULT_FLAPPING_SETTINGS } from '@kbn/alerting-plugin/common'; import { APMConfig, APM_SERVER_FEATURE_ID } from '../../..'; @@ -28,7 +28,7 @@ export const createRuleTypeMocks = () => { registerType: ({ executor }) => { alertExecutor = executor; }, - } as AlertingPluginSetupContract; + } as AlertingServerSetup; const scheduleActions = jest.fn(); const getUuid = jest.fn(); diff --git a/x-pack/plugins/observability_solution/apm/server/routes/apm_routes/register_apm_server_routes.ts b/x-pack/plugins/observability_solution/apm/server/routes/apm_routes/register_apm_server_routes.ts index 59c9cdac2df83..197b4259d3f09 100644 --- a/x-pack/plugins/observability_solution/apm/server/routes/apm_routes/register_apm_server_routes.ts +++ b/x-pack/plugins/observability_solution/apm/server/routes/apm_routes/register_apm_server_routes.ts @@ -115,7 +115,10 @@ export function registerRoutes({ ); const getApmIndices = async () => { - const apmIndices = await plugins.apmDataAccess.setup.getApmIndices(); + const coreContext = await context.core; + const apmIndices = await plugins.apmDataAccess.setup.getApmIndices( + coreContext.savedObjects.client + ); return apmIndices; }; diff --git a/x-pack/plugins/observability_solution/apm/server/routes/assistant_functions/get_observability_alert_details_context/index.ts b/x-pack/plugins/observability_solution/apm/server/routes/assistant_functions/get_observability_alert_details_context/index.ts index f28e3f9df8570..84e51675233c9 100644 --- a/x-pack/plugins/observability_solution/apm/server/routes/assistant_functions/get_observability_alert_details_context/index.ts +++ b/x-pack/plugins/observability_solution/apm/server/routes/assistant_functions/get_observability_alert_details_context/index.ts @@ -38,7 +38,8 @@ export const getAlertDetailsContextHandler = ( return async (requestContext, query) => { const resources = { getApmIndices: async () => { - return resourcePlugins.apmDataAccess.setup.getApmIndices(); + const coreContext = await requestContext.core; + return resourcePlugins.apmDataAccess.setup.getApmIndices(coreContext.savedObjects.client); }, request: requestContext.request, params: { query: { _inspect: false } }, diff --git a/x-pack/plugins/observability_solution/apm/server/routes/fleet/register_fleet_policy_callbacks.ts b/x-pack/plugins/observability_solution/apm/server/routes/fleet/register_fleet_policy_callbacks.ts index 9d00c50b4ab48..2237548f2d325 100644 --- a/x-pack/plugins/observability_solution/apm/server/routes/fleet/register_fleet_policy_callbacks.ts +++ b/x-pack/plugins/observability_solution/apm/server/routes/fleet/register_fleet_policy_callbacks.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Logger, CoreStart } from '@kbn/core/server'; +import { Logger, CoreStart, SavedObjectsClientContract } from '@kbn/core/server'; import { FleetStartContract, PostPackagePolicyCreateCallback, @@ -22,6 +22,7 @@ import { SOURCE_MAP_API_KEY_PATH, } from './get_package_policy_decorators'; import { createInternalESClient } from '../../lib/helpers/create_es_client/create_internal_es_client'; +import { getInternalSavedObjectsClient } from '../../lib/helpers/get_internal_saved_objects_client'; import { APMRouteHandlerResources } from '../apm_routes/register_apm_server_routes'; export async function registerFleetPolicyCallbacks({ @@ -148,7 +149,7 @@ function onPackagePolicyCreateOrUpdate({ coreStart, }: { fleetPluginStart: FleetStartContract; - getApmIndices: () => Promise; + getApmIndices: (soClient: SavedObjectsClientContract) => Promise; coreStart: CoreStart; }): PutPackagePolicyUpdateCallback & PostPackagePolicyCreateCallback { return async (packagePolicy) => { @@ -157,7 +158,8 @@ function onPackagePolicyCreateOrUpdate({ } const { asInternalUser } = coreStart.elasticsearch.client; - const apmIndices = await getApmIndices(); + const savedObjectsClient = await getInternalSavedObjectsClient(coreStart); + const apmIndices = await getApmIndices(savedObjectsClient); const internalESClient = await createInternalESClient({ debug: false, diff --git a/x-pack/plugins/observability_solution/apm/server/routes/transactions/breakdown/index.ts b/x-pack/plugins/observability_solution/apm/server/routes/transactions/breakdown/index.ts index 73da84fe4e98e..a57d437b242aa 100644 --- a/x-pack/plugins/observability_solution/apm/server/routes/transactions/breakdown/index.ts +++ b/x-pack/plugins/observability_solution/apm/server/routes/transactions/breakdown/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { flatten, orderBy, last } from 'lodash'; +import { flatten, orderBy, last, clamp, round } from 'lodash'; import { rangeQuery, kqlQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { asPercent } from '../../../../common/utils/formatters'; @@ -145,9 +145,15 @@ export async function getTransactionBreakdown({ const type = bucket.key as string; return bucket.subtypes.buckets.map((subBucket) => { + const percentageRaw = + (subBucket.total_self_time_per_subtype.value || 0) / sumAllSelfTimes; + // limit percentage from 0% to 100% and + // round to 8 decimal points (results in 6 decimal points after converting to percentages) to prevent displaying scientific notation in charts + const percentage = round(clamp(percentageRaw, 0, 1), 8); + return { name: (subBucket.key as string) || type, - percentage: (subBucket.total_self_time_per_subtype.value || 0) / sumAllSelfTimes, + percentage, }; }); }) diff --git a/x-pack/plugins/observability_solution/apm/server/routes/typings.ts b/x-pack/plugins/observability_solution/apm/server/routes/typings.ts index 126ae48937648..de5aeb6031d1c 100644 --- a/x-pack/plugins/observability_solution/apm/server/routes/typings.ts +++ b/x-pack/plugins/observability_solution/apm/server/routes/typings.ts @@ -16,14 +16,12 @@ import type { import type { RacApiRequestHandlerContext } from '@kbn/rule-registry-plugin/server'; import type { LicensingApiRequestHandlerContext } from '@kbn/licensing-plugin/server'; import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; -import type { RulesClientApi } from '@kbn/alerting-plugin/server/types'; +import { RulesClientApi } from '@kbn/alerting-plugin/server/types'; export type ApmPluginRequestHandlerContext = CustomRequestHandlerContext<{ licensing: Pick; alerting: { - // Pick is a superset of this - // and incompatible with the start contract from the alerting plugin - getRulesClient: () => RulesClientApi; + getRulesClient: () => Promise; }; rac: Pick; }>; diff --git a/x-pack/plugins/observability_solution/apm/server/types.ts b/x-pack/plugins/observability_solution/apm/server/types.ts index 84e0d5462c43b..e99860b9d441f 100644 --- a/x-pack/plugins/observability_solution/apm/server/types.ts +++ b/x-pack/plugins/observability_solution/apm/server/types.ts @@ -24,7 +24,7 @@ import { SpacesPluginSetup, SpacesPluginStart } from '@kbn/spaces-plugin/server' import { HomeServerPluginSetup, HomeServerPluginStart } from '@kbn/home-plugin/server'; import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; import { ActionsPlugin } from '@kbn/actions-plugin/server'; -import { AlertingPlugin } from '@kbn/alerting-plugin/server'; +import type { AlertingServerSetup, AlertingServerStart } from '@kbn/alerting-plugin/server'; import { CloudSetup } from '@kbn/cloud-plugin/server'; import { FeaturesPluginSetup, FeaturesPluginStart } from '@kbn/features-plugin/server'; import { LicensingPluginSetup, LicensingPluginStart } from '@kbn/licensing-plugin/server'; @@ -78,7 +78,7 @@ export interface APMPluginSetupDependencies { observabilityAIAssistant?: ObservabilityAIAssistantServerSetup; // optional dependencies actions?: ActionsPlugin['setup']; - alerting?: AlertingPlugin['setup']; + alerting?: AlertingServerSetup; cloud?: CloudSetup; fleet?: FleetPluginSetup; home?: HomeServerPluginSetup; @@ -105,7 +105,7 @@ export interface APMPluginStartDependencies { observabilityAIAssistant?: ObservabilityAIAssistantServerStart; // optional dependencies actions?: ActionsPlugin['start']; - alerting?: AlertingPlugin['start']; + alerting?: AlertingServerStart; cloud?: undefined; fleet?: FleetPluginStart; home?: HomeServerPluginStart; diff --git a/x-pack/plugins/observability_solution/apm_data_access/kibana.jsonc b/x-pack/plugins/observability_solution/apm_data_access/kibana.jsonc index 42ffe16acc265..4eb0859691ba1 100644 --- a/x-pack/plugins/observability_solution/apm_data_access/kibana.jsonc +++ b/x-pack/plugins/observability_solution/apm_data_access/kibana.jsonc @@ -15,7 +15,9 @@ "requiredPlugins": [ "data" ], - "optionalPlugins": [], + "optionalPlugins": [ + "security" + ], "requiredBundles": [] } } \ No newline at end of file diff --git a/x-pack/plugins/observability_solution/apm_data_access/server/index.ts b/x-pack/plugins/observability_solution/apm_data_access/server/index.ts index 7afaa656591c4..6b6385ded4ce4 100644 --- a/x-pack/plugins/observability_solution/apm_data_access/server/index.ts +++ b/x-pack/plugins/observability_solution/apm_data_access/server/index.ts @@ -91,6 +91,7 @@ export type { APMEventESSearchRequest, APMLogEventESSearchRequest, DocumentSourcesRequest, + ApmDataAccessPrivilegesCheck, HostNamesRequest, GetDocumentTypeParams, } from './types'; diff --git a/x-pack/plugins/observability_solution/apm_data_access/server/lib/check_privileges.ts b/x-pack/plugins/observability_solution/apm_data_access/server/lib/check_privileges.ts new file mode 100644 index 0000000000000..6b8e734a10b4e --- /dev/null +++ b/x-pack/plugins/observability_solution/apm_data_access/server/lib/check_privileges.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 { KibanaRequest } from '@kbn/core-http-server'; +import { SecurityPluginStart } from '@kbn/security-plugin-types-server'; +import { mapValues } from 'lodash'; +import { APMIndices } from '..'; + +export interface ApmDataAccessPrivilegesCheck { + request: KibanaRequest; + security?: SecurityPluginStart; + getApmIndices: () => Promise; +} + +export async function checkPrivileges({ + request, + getApmIndices, + security, +}: ApmDataAccessPrivilegesCheck) { + const authorization = security?.authz; + if (!authorization) { + return true; + } + + const [apmIndices, checkPrivilegesFn] = await Promise.all([ + getApmIndices(), + authorization.checkPrivilegesDynamicallyWithRequest(request), + ]); + + const { hasAllRequested } = await checkPrivilegesFn({ + elasticsearch: { + cluster: [], + index: mapValues(apmIndices, () => ['read']), + }, + }); + + return hasAllRequested; +} diff --git a/x-pack/plugins/observability_solution/apm_data_access/server/lib/helpers/tier_filter.ts b/x-pack/plugins/observability_solution/apm_data_access/server/lib/helpers/tier_filter.ts index c1f8d5e3fce1f..83171dea7f444 100644 --- a/x-pack/plugins/observability_solution/apm_data_access/server/lib/helpers/tier_filter.ts +++ b/x-pack/plugins/observability_solution/apm_data_access/server/lib/helpers/tier_filter.ts @@ -13,10 +13,10 @@ export function getDataTierFilterCombined({ excludedDataTiers, }: { filter?: QueryDslQueryContainer; - excludedDataTiers: DataTier[]; + excludedDataTiers?: DataTier[]; }): QueryDslQueryContainer | undefined { if (!filter) { - return excludedDataTiers.length > 0 ? excludeTiersQuery(excludedDataTiers)[0] : undefined; + return excludedDataTiers?.length ? excludeTiersQuery(excludedDataTiers)[0] : undefined; } return !excludedDataTiers diff --git a/x-pack/plugins/observability_solution/apm_data_access/server/plugin.ts b/x-pack/plugins/observability_solution/apm_data_access/server/plugin.ts index 6bf684985583a..680079d080c82 100644 --- a/x-pack/plugins/observability_solution/apm_data_access/server/plugin.ts +++ b/x-pack/plugins/observability_solution/apm_data_access/server/plugin.ts @@ -5,19 +5,32 @@ * 2.0. */ -import { PluginInitializerContext, CoreSetup, CoreStart, Plugin, Logger } from '@kbn/core/server'; +import { + PluginInitializerContext, + CoreSetup, + CoreStart, + Plugin, + SavedObjectsClientContract, + Logger, +} from '@kbn/core/server'; import { APMDataAccessConfig } from '.'; -import { ApmDataAccessPluginSetup, ApmDataAccessPluginStart } from './types'; +import { + ApmDataAccessPluginSetup, + ApmDataAccessPluginStart, + ApmDataAccessServerDependencies, +} from './types'; import { migrateLegacyAPMIndicesToSpaceAware } from './saved_objects/migrations/migrate_legacy_apm_indices_to_space_aware'; import { apmIndicesSavedObjectDefinition, getApmIndicesSavedObject, } from './saved_objects/apm_indices'; import { getServices } from './services/get_services'; +import { ApmDataAccessPrivilegesCheck, checkPrivileges } from './lib/check_privileges'; export class ApmDataAccessPlugin implements Plugin { + public server?: ApmDataAccessServerDependencies; public config: APMDataAccessConfig; public logger: Logger; @@ -26,34 +39,45 @@ export class ApmDataAccessPlugin this.logger = initContext.logger.get(); } + getApmIndices = async (savedObjectsClient: SavedObjectsClientContract) => { + const apmIndicesFromSavedObject = await getApmIndicesSavedObject(savedObjectsClient); + return { ...this.config.indices, ...apmIndicesFromSavedObject }; + }; + public setup(core: CoreSetup): ApmDataAccessPluginSetup { // register saved object core.savedObjects.registerType(apmIndicesSavedObjectDefinition); - const getApmIndices = async () => { - const [coreStart] = await core.getStartServices(); - const soClient = await coreStart.savedObjects.createInternalRepository(); - - const apmIndicesFromSavedObject = await getApmIndicesSavedObject(soClient); - return { ...this.config.indices, ...apmIndicesFromSavedObject }; - }; - // expose return { apmIndicesFromConfigFile: this.config.indices, - getApmIndices, + getApmIndices: this.getApmIndices, getServices, }; } - public start(core: CoreStart) { + public start(core: CoreStart, plugins: ApmDataAccessServerDependencies) { // TODO: remove in 9.0 migrateLegacyAPMIndicesToSpaceAware({ coreStart: core, logger: this.logger }).catch((e) => { this.logger.error('Failed to run migration making APM indices space aware'); this.logger.error(e); }); - return {}; + const getApmIndicesWithInternalUserFn = async () => { + const soClient = core.savedObjects.createInternalRepository(); + return this.getApmIndices(soClient); + }; + + const startServices = { + hasPrivileges: ({ request }: Pick) => + checkPrivileges({ + request, + getApmIndices: getApmIndicesWithInternalUserFn, + security: plugins.security, + }), + }; + + return { ...startServices }; } public stop() {} diff --git a/x-pack/plugins/observability_solution/apm_data_access/server/types.ts b/x-pack/plugins/observability_solution/apm_data_access/server/types.ts index 968590e780ee8..f10c23c1fd994 100644 --- a/x-pack/plugins/observability_solution/apm_data_access/server/types.ts +++ b/x-pack/plugins/observability_solution/apm_data_access/server/types.ts @@ -5,17 +5,28 @@ * 2.0. */ +import { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; +import type { SecurityPluginStart } from '@kbn/security-plugin-types-server'; import type { APMIndices } from '.'; import { getServices } from './services/get_services'; +import type { ApmDataAccessPrivilegesCheck } from './lib/check_privileges'; export interface ApmDataAccessPluginSetup { apmIndicesFromConfigFile: APMIndices; - getApmIndices: () => Promise; + getApmIndices: (soClient: SavedObjectsClientContract) => Promise; getServices: typeof getServices; } -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface ApmDataAccessPluginStart {} +export interface ApmDataAccessServerDependencies { + security?: SecurityPluginStart; +} + +export interface ApmDataAccessPluginStart { + hasPrivileges: (params: Pick) => Promise; +} +export interface ApmDataAccessServerDependencies { + security?: SecurityPluginStart; +} export type ApmDataAccessServices = ReturnType; export type { ApmDataAccessServicesParams } from './services/get_services'; @@ -27,3 +38,4 @@ export type { APMEventESSearchRequest, APMLogEventESSearchRequest, } from './lib/helpers'; +export type { ApmDataAccessPrivilegesCheck }; diff --git a/x-pack/plugins/observability_solution/apm_data_access/tsconfig.json b/x-pack/plugins/observability_solution/apm_data_access/tsconfig.json index f7ac83af0922e..d4c38fddf967e 100644 --- a/x-pack/plugins/observability_solution/apm_data_access/tsconfig.json +++ b/x-pack/plugins/observability_solution/apm_data_access/tsconfig.json @@ -9,6 +9,7 @@ "@kbn/config-schema", "@kbn/core", "@kbn/i18n", + "@kbn/core-saved-objects-api-server", "@kbn/data-plugin", "@kbn/inspector-plugin", "@kbn/observability-plugin", @@ -17,6 +18,8 @@ "@kbn/apm-types", "@kbn/core-http-server-mocks", "@kbn/apm-utils", + "@kbn/core-http-server", + "@kbn/security-plugin-types-server", "@kbn/utility-types", "@kbn/elastic-agent-utils", "@kbn/observability-utils-common" diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/api_types.ts b/x-pack/plugins/observability_solution/dataset_quality/common/api_types.ts index 51a1421aec918..7220f9014b477 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/common/api_types.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/common/api_types.ts @@ -95,13 +95,24 @@ export const integrationRt = rt.intersection([ export type IntegrationType = rt.TypeOf; +export const checkAndLoadIntegrationResponseRt = rt.union([ + rt.type({ isIntegration: rt.literal(false), areAssetsAvailable: rt.boolean }), + rt.type({ + isIntegration: rt.literal(true), + areAssetsAvailable: rt.literal(true), + integration: integrationRt, + }), +]); + +export type CheckAndLoadIntegrationResponse = rt.TypeOf; + export const getIntegrationsResponseRt = rt.exact( rt.type({ integrations: rt.array(integrationRt), }) ); -export type IntegrationResponse = rt.TypeOf; +export type IntegrationsResponse = rt.TypeOf; export const degradedFieldRt = rt.type({ name: rt.string, diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/data_stream_details/types.ts b/x-pack/plugins/observability_solution/dataset_quality/common/data_stream_details/types.ts index ce74552b581b9..f6372e1dc61a2 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/common/data_stream_details/types.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/common/data_stream_details/types.ts @@ -5,9 +5,7 @@ * 2.0. */ -export interface GetDataStreamIntegrationParams { - integrationName: string; -} +import { Integration } from '../data_streams_stats/integration'; export interface AnalyzeDegradedFieldsParams { dataStream: string; @@ -19,3 +17,13 @@ export interface UpdateFieldLimitParams { dataStream: string; newFieldLimit: number; } + +export interface CheckAndLoadIntegrationParams { + dataStream: string; +} + +export interface IntegrationType { + isIntegration: boolean; + areAssetsAvailable: boolean; + integration?: Integration; +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/degraded_field_flyout/possible_mitigations/field_limit/field_mapping_limit.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/degraded_field_flyout/possible_mitigations/field_limit/field_mapping_limit.tsx index 1056713ac2070..5dc8d6d367010 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/degraded_field_flyout/possible_mitigations/field_limit/field_mapping_limit.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/degraded_field_flyout/possible_mitigations/field_limit/field_mapping_limit.tsx @@ -29,7 +29,11 @@ import { IncreaseFieldMappingLimit } from './increase_field_mapping_limit'; import { FieldLimitDocLink } from './field_limit_documentation_link'; import { MessageCallout } from './message_callout'; -export function FieldMappingLimit({ isIntegration }: { isIntegration: boolean }) { +export function FieldMappingLimit({ + areIntegrationAssetsAvailable, +}: { + areIntegrationAssetsAvailable: boolean; +}) { const accordionId = useGeneratedHtmlId({ prefix: increaseFieldMappingLimitTitle, }); @@ -66,7 +70,7 @@ export function FieldMappingLimit({ isIntegration }: { isIntegration: boolean }) - {isIntegration && ( + {areIntegrationAssetsAvailable && ( <> updateNewFieldLimit(newFieldLimit)} isLoading={isMitigationInProgress} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/degraded_field_flyout/possible_mitigations/index.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/degraded_field_flyout/possible_mitigations/index.tsx index 34f39f25a67ec..d9ca2128521f2 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/degraded_field_flyout/possible_mitigations/index.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/degraded_field_flyout/possible_mitigations/index.tsx @@ -15,7 +15,7 @@ import { PossibleMitigationTitle } from './title'; export function PossibleMitigations() { const { degradedFieldAnalysis, isAnalysisInProgress } = useDegradedFields(); const { integrationDetails } = useDatasetQualityDetailsState(); - const isIntegration = Boolean(integrationDetails?.integration); + const areIntegrationAssetsAvailable = !!integrationDetails?.integration?.areAssetsAvailable; return ( !isAnalysisInProgress && ( @@ -24,7 +24,7 @@ export function PossibleMitigations() { {degradedFieldAnalysis?.isFieldLimitIssue && ( <> - + )} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/degraded_field_flyout/possible_mitigations/manual/component_template_link.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/degraded_field_flyout/possible_mitigations/manual/component_template_link.tsx index 54bbe91f2f2e1..e8768d34cdcca 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/degraded_field_flyout/possible_mitigations/manual/component_template_link.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/degraded_field_flyout/possible_mitigations/manual/component_template_link.tsx @@ -13,7 +13,11 @@ import { useDatasetQualityDetailsState } from '../../../../../hooks'; import { getComponentTemplatePrefixFromIndexTemplate } from '../../../../../../common/utils/component_template_name'; import { otherMitigationsCustomComponentTemplate } from '../../../../../../common/translations'; -export function CreateEditComponentTemplateLink({ isIntegration }: { isIntegration: boolean }) { +export function CreateEditComponentTemplateLink({ + areIntegrationAssetsAvailable, +}: { + areIntegrationAssetsAvailable: boolean; +}) { const { services: { application, @@ -54,7 +58,7 @@ export function CreateEditComponentTemplateLink({ isIntegration }: { isIntegrati name, ]); - const templateUrl = isIntegration ? componentTemplatePath : indexTemplatePath; + const templateUrl = areIntegrationAssetsAvailable ? componentTemplatePath : indexTemplatePath; const onClickHandler = useCallback(async () => { const options = { diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/degraded_field_flyout/possible_mitigations/manual/index.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/degraded_field_flyout/possible_mitigations/manual/index.tsx index f931f3461fb57..34cdbe4b9b838 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/degraded_field_flyout/possible_mitigations/manual/index.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/degraded_field_flyout/possible_mitigations/manual/index.tsx @@ -13,27 +13,27 @@ import { CreateEditPipelineLink } from './pipeline_link'; import { otherMitigationsLoadingAriaText } from '../../../../../../common/translations'; export function ManualMitigations() { - const { integrationDetails, loadingState, dataStreamSettings } = useDatasetQualityDetailsState(); - const isIntegrationPresentInSettings = dataStreamSettings?.integration; - const isIntegration = !!integrationDetails?.integration; - const { dataStreamSettingsLoading, integrationDetailsLoadings } = loadingState; - - const hasIntegrationCheckCompleted = - !dataStreamSettingsLoading && - ((isIntegrationPresentInSettings && !integrationDetailsLoadings) || - !isIntegrationPresentInSettings); + const { + integrationDetails, + loadingState: { integrationDetailsLoaded }, + } = useDatasetQualityDetailsState(); + const areIntegrationAssetsAvailable = !!integrationDetails?.integration?.areAssetsAvailable; return ( - + - + ); } diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/degraded_field_flyout/possible_mitigations/manual/pipeline_link.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/degraded_field_flyout/possible_mitigations/manual/pipeline_link.tsx index 6179a3ed0736c..f4084c52e2efd 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/degraded_field_flyout/possible_mitigations/manual/pipeline_link.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/degraded_field_flyout/possible_mitigations/manual/pipeline_link.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React, { useCallback, useMemo } from 'react'; +import React, { useCallback } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { @@ -34,7 +34,11 @@ const AccordionTitle = () => ( ); -export function CreateEditPipelineLink({ isIntegration }: { isIntegration: boolean }) { +export function CreateEditPipelineLink({ + areIntegrationAssetsAvailable, +}: { + areIntegrationAssetsAvailable: boolean; +}) { const { services: { share: { @@ -50,10 +54,7 @@ export function CreateEditPipelineLink({ isIntegration }: { isIntegration: boole const { datasetDetails } = useDatasetQualityDetailsState(); const { type, name } = datasetDetails; - const pipelineName = useMemo( - () => (isIntegration ? `${type}-${name}@custom` : `${type}@custom`), - [isIntegration, type, name] - ); + const pipelineName = areIntegrationAssetsAvailable ? `${type}-${name}@custom` : `${type}@custom`; const ingestPipelineLocator = locators.get('INGEST_PIPELINES_APP_LOCATOR'); diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/details/dataset_summary.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/details/dataset_summary.tsx index 17032d7866d05..8bbc9aa085420 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/details/dataset_summary.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/details/dataset_summary.tsx @@ -7,7 +7,7 @@ import React, { Fragment } from 'react'; import { ES_FIELD_TYPES, KBN_FIELD_TYPES } from '@kbn/field-types'; -import { EuiBadge, EuiFlexGroup, EuiPanel, EuiText } from '@elastic/eui'; +import { EuiBadge, EuiFlexGroup, EuiPanel, EuiSkeletonRectangle, EuiText } from '@elastic/eui'; import { css } from '@emotion/react'; import { IntegrationActionsMenu } from './integration_actions_menu'; import { @@ -29,7 +29,8 @@ export function DatasetSummary() { const { dataStreamDetailsLoading, dataStreamSettingsLoading, - integrationDetailsLoadings, + integrationDetailsLoading, + integrationDetailsLoaded, integrationDashboardsLoading, } = loadingState; const formattedLastActivity = dataStreamDetails?.lastActivity @@ -39,12 +40,19 @@ export function DatasetSummary() { ? dataFormatter.convert(dataStreamSettings.createdOn) : '-'; - return ( + return !integrationDetailsLoaded ? ( + + ) : ( - - {integrationDetails.integration?.name} + + + {integrationDetails.integration.integration?.name} + ), actionsMenu: ( ), - isLoading: integrationDetailsLoadings, + isLoading: integrationDetailsLoading, }, { fieldTitle: integrationVersionText, - fieldValue: integrationDetails.integration?.version, - isLoading: integrationDetailsLoadings, + fieldValue: integrationDetails.integration.integration?.version, + isLoading: integrationDetailsLoading, }, ] : []), diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/header.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/header.tsx index e45253b6405c8..60a26d4285732 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/header.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/header.tsx @@ -44,7 +44,8 @@ export function Header() { sendTelemetry, }); - const pageTitle = integrationDetails?.integration?.datasets?.[datasetDetails.name] ?? title; + const pageTitle = + integrationDetails?.integration?.integration?.datasets?.[datasetDetails.name] ?? title; return !loadingState.integrationDetailsLoaded ? ( - +

        diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_details_telemetry.ts b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_details_telemetry.ts index f613d3af7fdc4..4d2d838419271 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_details_telemetry.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_details_telemetry.ts @@ -42,7 +42,7 @@ export function useDatasetDetailsTelemetry() { breakdownField, isNonAggregatable, isBreakdownFieldEcs, - integration: integrationDetails.integration, + integration: integrationDetails.integration?.integration, }); } @@ -57,7 +57,7 @@ export function useDatasetDetailsTelemetry() { breakdownField, isNonAggregatable, isBreakdownFieldEcs, - integrationDetails.integration, + integrationDetails.integration?.integration, ]); const startTracking = useCallback(() => { diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_details_state.ts b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_details_state.ts index edd16652374a1..cfea77ff4fa39 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_details_state.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_details_state.ts @@ -51,7 +51,9 @@ export const useDatasetQualityDetailsState = () => { ); const dataStreamSettings = useSelector(service, (state) => - state.matches('initializing.dataStreamSettings.loadingIntegrationsAndDegradedFields') + state.matches('initializing.dataStreamSettings.fetchingDataStreamDegradedFields') || + state.matches('initializing.dataStreamSettings.doneFetchingDegradedFields') || + state.matches('initializing.dataStreamSettings.errorFetchingDegradedFields') ? state.context.dataStreamSettings : undefined ); @@ -59,15 +61,17 @@ export const useDatasetQualityDetailsState = () => { const integrationDetails = { integration: useSelector(service, (state) => state.matches( - 'initializing.dataStreamSettings.loadingIntegrationsAndDegradedFields.integrationDetails.done' - ) + 'initializing.checkAndLoadIntegrationAndDashboards.loadingIntegrationDashboards' + ) || + state.matches( + 'initializing.checkAndLoadIntegrationAndDashboards.unauthorizedToLoadDashboards' + ) || + state.matches('initializing.checkAndLoadIntegrationAndDashboards.done') ? state.context.integration : undefined ), dashboard: useSelector(service, (state) => - state.matches( - 'initializing.dataStreamSettings.loadingIntegrationsAndDegradedFields.integrationDashboards.done' - ) + state.matches('initializing.checkAndLoadIntegrationAndDashboards.done') ? state.context.integrationDashboards : undefined ), @@ -77,7 +81,7 @@ export const useDatasetQualityDetailsState = () => { service, (state) => !state.matches( - 'initializing.dataStreamSettings.loadingIntegrationsAndDegradedFields.integrationDashboards.unauthorized' + 'initializing.checkAndLoadIntegrationAndDashboards.unauthorizedToLoadDashboards' ) ); @@ -106,14 +110,19 @@ export const useDatasetQualityDetailsState = () => { dataStreamSettingsLoading: state.matches( 'initializing.dataStreamSettings.fetchingDataStreamSettings' ), - integrationDetailsLoadings: state.matches( - 'initializing.dataStreamSettings.loadingIntegrationsAndDegradedFields.integrationDetails.fetching' - ), - integrationDetailsLoaded: state.matches( - 'initializing.dataStreamSettings.loadingIntegrationsAndDegradedFields.integrationDetails.done' + integrationDetailsLoading: state.matches( + 'initializing.checkAndLoadIntegrationAndDashboards.checkingAndLoadingIntegration' ), + integrationDetailsLoaded: + state.matches( + 'initializing.checkAndLoadIntegrationAndDashboards.loadingIntegrationDashboards' + ) || + state.matches( + 'initializing.checkAndLoadIntegrationAndDashboards.unauthorizedToLoadDashboards' + ) || + state.matches('initializing.checkAndLoadIntegrationAndDashboards.done'), integrationDashboardsLoading: state.matches( - 'initializing.dataStreamSettings.loadingIntegrationsAndDegradedFields.integrationDashboards.fetching' + 'initializing.checkAndLoadIntegrationAndDashboards.loadingIntegrationDashboards' ), })); diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_docs_chart.ts b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_docs_chart.ts index fb57e6e87a74f..d499535df1662 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_docs_chart.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_docs_chart.ts @@ -81,7 +81,8 @@ export const useDegradedDocsChart = () => { useEffect(() => { const dataStreamName = dataStream ?? DEFAULT_LOGS_DATA_VIEW; const datasetTitle = - integrationDetails?.integration?.datasets?.[datasetDetails.name] ?? datasetDetails.name; + integrationDetails?.integration?.integration?.datasets?.[datasetDetails.name] ?? + datasetDetails.name; const lensAttributes = getLensAttributes({ color: euiTheme.colors.danger, @@ -95,7 +96,7 @@ export const useDegradedDocsChart = () => { euiTheme.colors.danger, setAttributes, dataStream, - integrationDetails?.integration?.datasets, + integrationDetails?.integration?.integration?.datasets, datasetDetails.name, ]); diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_fields.ts b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_fields.ts index 49ceb50abc3cd..47b03074fe17e 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_fields.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_fields.ts @@ -77,10 +77,11 @@ export function useDegradedFields() { return renderedItems.find((item) => item.name === expandedDegradedField); }, [expandedDegradedField, renderedItems]); - const isDegradedFieldsLoading = useSelector(service, (state) => - state.matches( - 'initializing.dataStreamSettings.loadingIntegrationsAndDegradedFields.dataStreamDegradedFields.fetching' - ) + const isDegradedFieldsLoading = useSelector( + service, + (state) => + state.matches('initializing.dataStreamSettings.fetchingDataStreamSettings') || + state.matches('initializing.dataStreamSettings.fetchingDataStreamDegradedFields') ); const closeDegradedFieldFlyout = useCallback( diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/services/data_stream_details/data_stream_details_client.ts b/x-pack/plugins/observability_solution/dataset_quality/public/services/data_stream_details/data_stream_details_client.ts index 827cd4b0a1e49..7279bed2e1859 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/services/data_stream_details/data_stream_details_client.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/services/data_stream_details/data_stream_details_client.ts @@ -8,6 +8,8 @@ import { HttpStart } from '@kbn/core/public'; import { decodeOrThrow } from '@kbn/io-ts-utils'; import { + CheckAndLoadIntegrationResponse, + checkAndLoadIntegrationResponseRt, DataStreamRolloverResponse, dataStreamRolloverResponseRt, DegradedFieldAnalysis, @@ -17,10 +19,8 @@ import { getDataStreamDegradedFieldsResponseRt, getDataStreamsDetailsResponseRt, getDataStreamsSettingsResponseRt, - getIntegrationsResponseRt, IntegrationDashboardsResponse, integrationDashboardsRT, - IntegrationResponse, UpdateFieldLimitResponse, updateFieldLimitResponseRt, } from '../../../common/api_types'; @@ -40,7 +40,7 @@ import { IDataStreamDetailsClient } from './types'; import { Integration } from '../../../common/data_streams_stats/integration'; import { AnalyzeDegradedFieldsParams, - GetDataStreamIntegrationParams, + CheckAndLoadIntegrationParams, UpdateFieldLimitParams, } from '../../../common/data_stream_details/types'; import { DatasetQualityError } from '../../../common/errors'; @@ -139,43 +139,48 @@ export class DataStreamDetailsClient implements IDataStreamDetailsClient { )(response); } - public async getIntegrationDashboards({ integration }: GetIntegrationDashboardsParams) { + public async checkAndLoadIntegration({ dataStream }: CheckAndLoadIntegrationParams) { const response = await this.http - .get( - `/internal/dataset_quality/integrations/${integration}/dashboards` + .get( + `/internal/dataset_quality/data_streams/${dataStream}/integration/check` ) .catch((error) => { - throw new DatasetQualityError(`Failed to fetch integration dashboards": ${error}`, error); + throw new DatasetQualityError( + `Failed to check if data stream belongs to an integration": ${error}`, + error + ); }); - const { dashboards } = decodeOrThrow( - integrationDashboardsRT, + const decodedResponse = decodeOrThrow( + checkAndLoadIntegrationResponseRt, (message: string) => - new DatasetQualityError(`Failed to decode integration dashboards response: ${message}"`) + new DatasetQualityError(`Failed to decode integration check response: ${message}"`) )(response); - return dashboards; + return { + ...decodedResponse, + integration: decodedResponse.isIntegration + ? Integration.create(decodedResponse.integration) + : undefined, + }; } - public async getDataStreamIntegration( - params: GetDataStreamIntegrationParams - ): Promise { - const { integrationName } = params; + public async getIntegrationDashboards({ integration }: GetIntegrationDashboardsParams) { const response = await this.http - .get('/internal/dataset_quality/integrations') + .get( + `/internal/dataset_quality/integrations/${integration}/dashboards` + ) .catch((error) => { - throw new DatasetQualityError(`Failed to fetch integrations: ${error}`, error); + throw new DatasetQualityError(`Failed to fetch integration dashboards": ${error}`, error); }); - const { integrations } = decodeOrThrow( - getIntegrationsResponseRt, + const { dashboards } = decodeOrThrow( + integrationDashboardsRT, (message: string) => - new DatasetQualityError(`Failed to decode integrations response: ${message}`) + new DatasetQualityError(`Failed to decode integration dashboards response: ${message}"`) )(response); - const integration = integrations.find((i) => i.name === integrationName); - - if (integration) return Integration.create(integration); + return dashboards; } public async analyzeDegradedField({ diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/services/data_stream_details/types.ts b/x-pack/plugins/observability_solution/dataset_quality/public/services/data_stream_details/types.ts index 6eac8bd732840..f38c68a68bff5 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/services/data_stream_details/types.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/services/data_stream_details/types.ts @@ -6,7 +6,6 @@ */ import { HttpStart } from '@kbn/core/public'; -import { Integration } from '../../../common/data_streams_stats/integration'; import { GetDataStreamSettingsParams, DataStreamSettings, @@ -19,7 +18,8 @@ import { } from '../../../common/data_streams_stats'; import { AnalyzeDegradedFieldsParams, - GetDataStreamIntegrationParams, + IntegrationType, + CheckAndLoadIntegrationParams, UpdateFieldLimitParams, } from '../../../common/data_stream_details/types'; import { @@ -49,10 +49,8 @@ export interface IDataStreamDetailsClient { getDataStreamDegradedFieldValues( params: GetDataStreamDegradedFieldValuesPathParams ): Promise; + checkAndLoadIntegration(params: CheckAndLoadIntegrationParams): Promise; getIntegrationDashboards(params: GetIntegrationDashboardsParams): Promise; - getDataStreamIntegration( - params: GetDataStreamIntegrationParams - ): Promise; analyzeDegradedField(params: AnalyzeDegradedFieldsParams): Promise; setNewFieldLimit(params: UpdateFieldLimitParams): Promise; rolloverDataStream(params: { dataStream: string }): Promise; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/services/data_streams_stats/data_streams_stats_client.ts b/x-pack/plugins/observability_solution/dataset_quality/public/services/data_streams_stats/data_streams_stats_client.ts index 8e218819315b2..5e4790309a07f 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/services/data_streams_stats/data_streams_stats_client.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/services/data_streams_stats/data_streams_stats_client.ts @@ -17,7 +17,7 @@ import { getDataStreamTotalDocsResponseRt, getIntegrationsResponseRt, getNonAggregatableDatasetsRt, - IntegrationResponse, + IntegrationsResponse, NonAggregatableDatasets, } from '../../../common/api_types'; import { @@ -132,7 +132,7 @@ export class DataStreamsStatsClient implements IDataStreamsStatsClient { public async getIntegrations(): Promise { const response = await this.http - .get('/internal/dataset_quality/integrations') + .get('/internal/dataset_quality/integrations') .catch((error) => { throw new DatasetQualityError(`Failed to fetch integrations: ${error}`, error); }); diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/notifications.ts b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/notifications.ts index f5fdd063492a3..fbd2dd1dc1913 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/notifications.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/notifications.ts @@ -44,17 +44,10 @@ export const fetchIntegrationDashboardsFailedNotifier = (toasts: IToasts, error: }); }; -export const fetchDataStreamIntegrationFailedNotifier = ( - toasts: IToasts, - error: Error, - integrationName?: string -) => { +export const fetchDataStreamIntegrationFailedNotifier = (toasts: IToasts, error: Error) => { toasts.addDanger({ title: i18n.translate('xpack.datasetQuality.details.fetchIntegrationsFailed', { - defaultMessage: "We couldn't get {integrationName} integration info.", - values: { - integrationName, - }, + defaultMessage: "We couldn't get integration info.", }), text: error.message, }); diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/state_machine.ts b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/state_machine.ts index 8ac65a7dca4a7..363919b35f65e 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/state_machine.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/state_machine.ts @@ -28,6 +28,8 @@ import { UpdateFieldLimitResponse, } from '../../../common/api_types'; import { fetchNonAggregatableDatasetsFailedNotifier } from '../common/notifications'; + +import { IntegrationType } from '../../../common/data_stream_details'; import { fetchDataStreamDetailsFailedNotifier, assertBreakdownFieldEcsFailedNotifier, @@ -37,7 +39,6 @@ import { updateFieldLimitFailedNotifier, rolloverDataStreamFailedNotifier, } from './notifications'; -import { Integration } from '../../../common/data_streams_stats/integration'; export const createPureDatasetQualityDetailsControllerStateMachine = ( initialContext: DatasetQualityDetailsControllerContext @@ -151,7 +152,7 @@ export const createPureDatasetQualityDetailsControllerStateMachine = ( invoke: { src: 'loadDataStreamSettings', onDone: { - target: 'loadingIntegrationsAndDegradedFields', + target: 'fetchingDataStreamDegradedFields', actions: ['storeDataStreamSettings'], }, onError: [ @@ -160,111 +161,49 @@ export const createPureDatasetQualityDetailsControllerStateMachine = ( cond: 'isIndexNotFoundError', }, { - target: 'done', + target: 'errorFetchingDataStreamSettings', actions: ['notifyFetchDataStreamSettingsFailed'], }, ], }, }, - loadingIntegrationsAndDegradedFields: { - type: 'parallel', - states: { - dataStreamDegradedFields: { - initial: 'fetching', - states: { - fetching: { - invoke: { - src: 'loadDegradedFields', - onDone: { - target: 'done', - actions: ['storeDegradedFields', 'raiseDegradedFieldsLoaded'], - }, - onError: [ - { - target: '#DatasetQualityDetailsController.indexNotFound', - cond: 'isIndexNotFoundError', - }, - { - target: 'done', - }, - ], - }, - }, - done: { - on: { - UPDATE_DEGRADED_FIELDS_TABLE_CRITERIA: { - target: 'done', - actions: ['storeDegradedFieldTableOptions'], - }, - OPEN_DEGRADED_FIELD_FLYOUT: { - target: - '#DatasetQualityDetailsController.initializing.degradedFieldFlyout.open', - actions: [ - 'storeExpandedDegradedField', - 'resetFieldLimitServerResponse', - ], - }, - TOGGLE_CURRENT_QUALITY_ISSUES: { - target: 'fetching', - actions: ['toggleCurrentQualityIssues'], - }, - }, - }, - }, + errorFetchingDataStreamSettings: {}, + fetchingDataStreamDegradedFields: { + invoke: { + src: 'loadDegradedFields', + onDone: { + target: 'doneFetchingDegradedFields', + actions: ['storeDegradedFields', 'raiseDegradedFieldsLoaded'], }, - integrationDetails: { - initial: 'fetching', - states: { - fetching: { - invoke: { - src: 'loadDataStreamIntegration', - onDone: { - target: 'done', - actions: ['storeDataStreamIntegration'], - }, - onError: { - target: 'done', - actions: ['notifyFetchDatasetIntegrationsFailed'], - }, - }, - }, - done: {}, + onError: [ + { + target: '#DatasetQualityDetailsController.indexNotFound', + cond: 'isIndexNotFoundError', }, - }, - integrationDashboards: { - initial: 'fetching', - states: { - fetching: { - invoke: { - src: 'loadIntegrationDashboards', - onDone: { - target: 'done', - actions: ['storeIntegrationDashboards'], - }, - onError: [ - { - target: 'unauthorized', - cond: 'checkIfActionForbidden', - }, - { - target: 'done', - actions: ['notifyFetchIntegrationDashboardsFailed'], - }, - ], - }, - }, - done: {}, - unauthorized: { - type: 'final', - }, + { + target: 'errorFetchingDegradedFields', }, - }, + ], }, - onDone: { - target: 'done', + }, + doneFetchingDegradedFields: { + on: { + UPDATE_DEGRADED_FIELDS_TABLE_CRITERIA: { + target: 'doneFetchingDegradedFields', + actions: ['storeDegradedFieldTableOptions'], + }, + OPEN_DEGRADED_FIELD_FLYOUT: { + target: + '#DatasetQualityDetailsController.initializing.degradedFieldFlyout.open', + actions: ['storeExpandedDegradedField', 'resetFieldLimitServerResponse'], + }, + TOGGLE_CURRENT_QUALITY_ISSUES: { + target: 'fetchingDataStreamDegradedFields', + actions: ['toggleCurrentQualityIssues'], + }, }, }, - done: {}, + errorFetchingDegradedFields: {}, }, on: { UPDATE_TIME_RANGE: { @@ -272,6 +211,54 @@ export const createPureDatasetQualityDetailsControllerStateMachine = ( }, }, }, + checkAndLoadIntegrationAndDashboards: { + initial: 'checkingAndLoadingIntegration', + states: { + checkingAndLoadingIntegration: { + invoke: { + src: 'checkAndLoadIntegration', + onDone: [ + { + target: 'loadingIntegrationDashboards', + actions: 'storeDataStreamIntegration', + cond: 'isDataStreamIsPartOfIntegration', + }, + { + actions: 'storeDataStreamIntegration', + target: 'done', + }, + ], + onError: { + target: 'done', + actions: ['notifyFetchDatasetIntegrationsFailed'], + }, + }, + }, + loadingIntegrationDashboards: { + invoke: { + src: 'loadIntegrationDashboards', + onDone: { + target: 'done', + actions: ['storeIntegrationDashboards'], + }, + onError: [ + { + target: 'unauthorizedToLoadDashboards', + cond: 'checkIfActionForbidden', + }, + { + target: 'done', + actions: ['notifyFetchIntegrationDashboardsFailed'], + }, + ], + }, + }, + unauthorizedToLoadDashboards: { + type: 'final', + }, + done: {}, + }, + }, degradedFieldFlyout: { initial: 'pending', states: { @@ -522,7 +509,7 @@ export const createPureDatasetQualityDetailsControllerStateMachine = ( } : {}; }), - storeDataStreamIntegration: assign((context, event: DoneInvokeEvent) => { + storeDataStreamIntegration: assign((context, event: DoneInvokeEvent) => { return 'data' in event ? { integration: event.data, @@ -602,6 +589,14 @@ export const createPureDatasetQualityDetailsControllerStateMachine = ( !event.data.isLatestBackingIndexUpdated ); }, + isDataStreamIsPartOfIntegration: (_, event) => { + return ( + 'data' in event && + typeof event.data === 'object' && + 'isIntegration' in event.data && + event.data.isIntegration + ); + }, }, } ); @@ -634,9 +629,7 @@ export const createDatasetQualityDetailsControllerStateMachine = ({ notifyFetchIntegrationDashboardsFailed: (_context, event: DoneInvokeEvent) => fetchIntegrationDashboardsFailedNotifier(toasts, event.data), notifyFetchDatasetIntegrationsFailed: (context, event: DoneInvokeEvent) => { - const integrationName = - 'dataStreamSettings' in context ? context.dataStreamSettings?.integration : undefined; - return fetchDataStreamIntegrationFailedNotifier(toasts, event.data, integrationName); + return fetchDataStreamIntegrationFailedNotifier(toasts, event.data); }, notifySaveNewFieldLimitError: (_context, event: DoneInvokeEvent) => updateFieldLimitFailedNotifier(toasts, event.data), @@ -735,18 +728,15 @@ export const createDatasetQualityDetailsControllerStateMachine = ({ dataStream: context.dataStream, }); }, - loadDataStreamIntegration: (context) => { - if ('dataStreamSettings' in context && context.dataStreamSettings?.integration) { - return dataStreamDetailsClient.getDataStreamIntegration({ - integrationName: context.dataStreamSettings.integration, - }); - } - return Promise.resolve(); + checkAndLoadIntegration: (context) => { + return dataStreamDetailsClient.checkAndLoadIntegration({ + dataStream: context.dataStream, + }); }, loadIntegrationDashboards: (context) => { - if ('dataStreamSettings' in context && context.dataStreamSettings?.integration) { + if ('integration' in context && context.integration && context.integration.integration) { return dataStreamDetailsClient.getIntegrationDashboards({ - integration: context.dataStreamSettings.integration, + integration: context.integration.integration.name, }); } diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/types.ts b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/types.ts index cdebcfbe53d86..d33e5c4f0415e 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/types.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/types.ts @@ -20,7 +20,7 @@ import { UpdateFieldLimitResponse, } from '../../../common/api_types'; import { TableCriteria, TimeRangeConfig } from '../../../common/types'; -import { Integration } from '../../../common/data_streams_stats/integration'; +import { IntegrationType } from '../../../common/data_stream_details'; export interface DataStream { name: string; @@ -53,7 +53,7 @@ export interface WithDefaultControllerState { breakdownField?: string; isBreakdownFieldEcs?: boolean; isIndexNotFoundError?: boolean; - integration?: Integration; + integration?: IntegrationType; expandedDegradedField?: string; isNonAggregatable?: boolean; fieldLimit?: FieldLimit; @@ -84,8 +84,11 @@ export interface WithDataStreamSettings { } export interface WithIntegration { - integration: Integration; - integrationDashboards?: Dashboard[]; + integration: IntegrationType; +} + +export interface WithIntegrationDashboards { + integrationDashboards: Dashboard[]; } export interface WithDegradedFieldValues { @@ -116,15 +119,14 @@ export type DatasetQualityDetailsControllerTypeState = value: | 'initializing' | 'initializing.nonAggregatableDataset.fetching' - | 'initializing.dataStreamSettings.loadingIntegrationsAndDegradedFields.dataStreamDegradedFields.fetching' + | 'initializing.dataStreamDetails.fetching' | 'initializing.dataStreamSettings.fetchingDataStreamSettings' - | 'initializing.dataStreamDetails.fetching'; + | 'initializing.dataStreamSettings.errorFetchingDataStreamSettings' + | 'initializing.checkAndLoadIntegrationAndDashboards.checkingAndLoadingIntegration'; context: WithDefaultControllerState; } | { - value: - | 'initializing.nonAggregatableDataset.done' - | 'initializing.dataStreamSettings.loadingIntegrationsAndDegradedFields.dataStreamDegradedFields.fetching'; + value: 'initializing.nonAggregatableDataset.done'; context: WithDefaultControllerState & WithNonAggregatableDatasetStatus; } | { @@ -139,25 +141,25 @@ export type DatasetQualityDetailsControllerTypeState = value: 'initializing.checkBreakdownFieldIsEcs.done'; context: WithDefaultControllerState & WithBreakdownInEcsCheck; } - | { - value: 'initializing.dataStreamSettings.loadingIntegrationsAndDegradedFields.dataStreamDegradedFields.done'; - context: WithDefaultControllerState & - WithNonAggregatableDatasetStatus & - WithDegradedFieldsData; - } | { value: - | 'initializing.dataStreamSettings.loadingIntegrationsAndDegradedFields' - | 'initializing.dataStreamSettings.loadingIntegrationsAndDegradedFields.integrationDetails.fetching' - | 'initializing.dataStreamSettings.loadingIntegrationsAndDegradedFields.integrationDashboards.fetching' - | 'initializing.dataStreamSettings.loadingIntegrationsAndDegradedFields.integrationDashboards.unauthorized'; + | 'initializing.dataStreamSettings.fetchingDataStreamDegradedFields' + | 'initializing.dataStreamSettings.errorFetchingDegradedFields'; context: WithDefaultControllerState & WithDataStreamSettings; } + | { + value: 'initializing.dataStreamSettings.doneFetchingDegradedFields'; + context: WithDefaultControllerState & WithDataStreamSettings & WithDegradedFieldsData; + } | { value: - | 'initializing.dataStreamSettings.loadingIntegrationsAndDegradedFields.integrationDetails.done' - | 'initializing.dataStreamSettings.loadingIntegrationsAndDegradedFields.integrationDashboards.done'; - context: WithDefaultControllerState & WithDataStreamSettings & WithIntegration; + | 'initializing.checkAndLoadIntegrationAndDashboards.loadingIntegrationDashboards' + | 'initializing.checkAndLoadIntegrationAndDashboards.unauthorizedToLoadDashboards'; + context: WithDefaultControllerState & WithIntegration; + } + | { + value: 'initializing.checkAndLoadIntegrationAndDashboards.done'; + context: WithDefaultControllerState & WithIntegration & WithIntegrationDashboards; } | { value: 'initializing.degradedFieldFlyout.open'; @@ -233,8 +235,8 @@ export type DatasetQualityDetailsControllerEvent = | DoneInvokeEvent | DoneInvokeEvent | DoneInvokeEvent - | DoneInvokeEvent | DoneInvokeEvent | DoneInvokeEvent | DoneInvokeEvent - | DoneInvokeEvent; + | DoneInvokeEvent + | DoneInvokeEvent; diff --git a/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/check_and_load_integration/index.ts b/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/check_and_load_integration/index.ts new file mode 100644 index 0000000000000..a6606028b6cfc --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/check_and_load_integration/index.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 type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import { PackageClient } from '@kbn/fleet-plugin/server'; +import { Logger } from '@kbn/logging'; +import { validateCustomComponentTemplate } from './validate_custom_component_template'; +import { getIntegration, getIntegrations } from '../../integrations/get_integrations'; +import { getComponentTemplatePrefixFromIndexTemplate } from '../../../../common/utils/component_template_name'; +import { CheckAndLoadIntegrationResponse } from '../../../../common/api_types'; +import { dataStreamService } from '../../../services'; + +// The function works on 2 conditions: +// 1. It checks if integration name is present in meta field response of the datastream. +// If yes, it considers it to be an integration. No further checks +// 2. If not, then it does the various checks +export async function checkAndLoadIntegration({ + esClient, + packageClient, + logger, + dataStream, +}: { + esClient: ElasticsearchClient; + packageClient: PackageClient; + logger: Logger; + dataStream: string; +}): Promise { + const [dataStreamInfo] = await dataStreamService.getMatchingDataStreams(esClient, dataStream); + + const indexTemplate = dataStreamInfo?.template; + const isManaged = dataStreamInfo?._meta?.managed; + + const integrationNameFromDataStream = dataStreamInfo?._meta?.package?.name; + + // Index template must be present and isManaged should be true or + // integration name should be present + // Else it's not an integration + if ((!indexTemplate || !isManaged) && !integrationNameFromDataStream) { + return { isIntegration: false, areAssetsAvailable: false }; + } + + // If integration name is present, then we find and return the integration + if (integrationNameFromDataStream) { + try { + const integrationDetailsMatchingDataStream = await getIntegration({ + packageClient, + logger, + packageName: integrationNameFromDataStream, + }); + + if (integrationDetailsMatchingDataStream) { + return { + isIntegration: true, + integration: integrationDetailsMatchingDataStream, + areAssetsAvailable: true, + }; + } + } catch (e) { + // This should ideally not happen. As integration name is present in Data stream + // meta response but the integration itself is not found + // Worst case i could think of is, may be the integration is deleted from the + // system at a later point of time + return { isIntegration: false, areAssetsAvailable: false }; + } + } + + // cleaning the index template name as some have @template suffix + const indexTemplateNameWithoutSuffix = getComponentTemplatePrefixFromIndexTemplate(indexTemplate); + + // Check if index template name has both type and dataset part + const isDedicatedComponentTemplate = indexTemplateNameWithoutSuffix.split('-').length === 2; + + // If only 1 part exists, then it's not a dedicated index template + // Data stream name must starts with this index template, then it's a dedicated index template else not + if (!isDedicatedComponentTemplate || !dataStream.startsWith(indexTemplateNameWithoutSuffix)) { + return { isIntegration: false, areAssetsAvailable: false }; + } + + const isValidCustomComponentTemplate = await validateCustomComponentTemplate({ + esClient, + indexTemplateName: indexTemplate, + }); + + if (!isValidCustomComponentTemplate) { + return { isIntegration: false, areAssetsAvailable: false }; + } + + const datasetName = indexTemplateNameWithoutSuffix.split('-')[1]; + + const allIntegrations = await getIntegrations({ packageClient, logger }); + const integrationFromDataset = allIntegrations.find( + (integration) => datasetName in (integration?.datasets ?? {}) + ); + + if (integrationFromDataset) { + return { isIntegration: true, integration: integrationFromDataset, areAssetsAvailable: true }; + } + + // Since the logic reached the last statement, it means it passed all checks for assets being available + return { isIntegration: false, areAssetsAvailable: true }; +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/check_and_load_integration/validate_custom_component_template.ts b/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/check_and_load_integration/validate_custom_component_template.ts new file mode 100644 index 0000000000000..13213814935f1 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/check_and_load_integration/validate_custom_component_template.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 type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import { createDatasetQualityESClient } from '../../../utils'; +import { getComponentTemplatePrefixFromIndexTemplate } from '../../../../common/utils/component_template_name'; + +export async function validateCustomComponentTemplate({ + esClient, + indexTemplateName, +}: { + esClient: ElasticsearchClient; + indexTemplateName: string; +}): Promise { + const datasetQualityESClient = createDatasetQualityESClient(esClient); + // cleaning the index template name as some have @template suffix + const componentTemplateName = getComponentTemplatePrefixFromIndexTemplate(indexTemplateName); + + try { + const { index_templates: indexTemplates } = await datasetQualityESClient.indexTemplates({ + name: indexTemplateName, + }); + + return indexTemplates.some((template) => + template.index_template.composed_of.includes(componentTemplateName + '@custom') + ); + } catch (error) { + return false; + } +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_stream_details/index.ts b/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_stream_details/index.ts index 288eff11b92a8..0ca2ae94214e8 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_stream_details/index.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_stream_details/index.ts @@ -16,38 +16,12 @@ import { rangeQuery } from '@kbn/observability-plugin/server'; import { MAX_HOSTS_METRIC_VALUE } from '../../../../common/constants'; import { _IGNORED } from '../../../../common/es_fields'; -import { DataStreamDetails, DataStreamSettings } from '../../../../common/api_types'; +import { DataStreamDetails } from '../../../../common/api_types'; import { createDatasetQualityESClient } from '../../../utils'; -import { dataStreamService, datasetQualityPrivileges } from '../../../services'; +import { datasetQualityPrivileges } from '../../../services'; import { getDataStreams } from '../get_data_streams'; import { getDataStreamsMeteringStats } from '../get_data_streams_metering_stats'; -export async function getDataStreamSettings({ - esClient, - dataStream, -}: { - esClient: ElasticsearchClient; - dataStream: string; -}): Promise { - const [createdOn, [dataStreamInfo], datasetUserPrivileges] = await Promise.all([ - getDataStreamCreatedOn(esClient, dataStream), - dataStreamService.getMatchingDataStreams(esClient, dataStream), - datasetQualityPrivileges.getDatasetPrivileges(esClient, dataStream), - ]); - - const integration = dataStreamInfo?._meta?.package?.name; - const lastBackingIndex = dataStreamInfo?.indices?.slice(-1)[0]; - const indexTemplate = dataStreamInfo?.template; - - return { - createdOn, - integration, - datasetUserPrivileges, - lastBackingIndexName: lastBackingIndex?.index_name, - indexTemplate, - }; -} - export async function getDataStreamDetails({ esClient, dataStream, @@ -118,16 +92,6 @@ export async function getDataStreamDetails({ } } -async function getDataStreamCreatedOn(esClient: ElasticsearchClient, dataStream: string) { - const indexSettings = await dataStreamService.getDataStreamIndexSettings(esClient, dataStream); - - const indexesList = Object.values(indexSettings); - - return indexesList - .map((index) => Number(index.settings?.index?.creation_date)) - .sort((a, b) => a - b)[0]; -} - type TermAggregation = Record; const MAX_HOSTS = MAX_HOSTS_METRIC_VALUE + 1; // Adding 1 so that we can show e.g. '50+' diff --git a/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_datastream_settings/get_datastream_created_on.ts b/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_datastream_settings/get_datastream_created_on.ts new file mode 100644 index 0000000000000..d9d22d326bffb --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_datastream_settings/get_datastream_created_on.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 { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import { dataStreamService } from '../../../services'; + +export async function getDataStreamCreatedOn(esClient: ElasticsearchClient, dataStream: string) { + const indexSettings = await dataStreamService.getDataStreamIndexSettings(esClient, dataStream); + + const indexesList = Object.values(indexSettings); + + return indexesList + .map((index) => Number(index.settings?.index?.creation_date)) + .sort((a, b) => a - b)[0]; +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_datastream_settings/index.ts b/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_datastream_settings/index.ts new file mode 100644 index 0000000000000..8044c8a5abf6a --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_datastream_settings/index.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 type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import { datasetQualityPrivileges, dataStreamService } from '../../../services'; +import { DataStreamSettings } from '../../../../common/api_types'; +import { getDataStreamCreatedOn } from './get_datastream_created_on'; + +export async function getDataStreamSettings({ + esClient, + dataStream, +}: { + esClient: ElasticsearchClient; + dataStream: string; +}): Promise { + const [createdOn, [dataStreamInfo], datasetUserPrivileges] = await Promise.all([ + getDataStreamCreatedOn(esClient, dataStream), + dataStreamService.getMatchingDataStreams(esClient, dataStream), + datasetQualityPrivileges.getDatasetPrivileges(esClient, dataStream), + ]); + + const integration = dataStreamInfo?._meta?.package?.name; + const lastBackingIndex = dataStreamInfo?.indices?.at(-1); + const indexTemplate = dataStreamInfo?.template; + + return { + createdOn, + integration, + datasetUserPrivileges, + lastBackingIndexName: lastBackingIndex?.index_name, + indexTemplate, + }; +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/routes.ts b/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/routes.ts index 3a60f0b9a8ef3..c8ed3296908e3 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/routes.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/routes.ts @@ -18,11 +18,12 @@ import { DataStreamDocsStat, UpdateFieldLimitResponse, DataStreamRolloverResponse, + CheckAndLoadIntegrationResponse, } from '../../../common/api_types'; import { rangeRt, typeRt, typesRt } from '../../types/default_api_types'; import { createDatasetQualityServerRoute } from '../create_datasets_quality_server_route'; import { datasetQualityPrivileges } from '../../services'; -import { getDataStreamDetails, getDataStreamSettings } from './get_data_stream_details'; +import { getDataStreamDetails } from './get_data_stream_details'; import { getDataStreams } from './get_data_streams'; import { getDataStreamsStats } from './get_data_streams_stats'; import { getDegradedDocsPaginated } from './get_degraded_docs'; @@ -34,6 +35,8 @@ import { getDataStreamsMeteringStats } from './get_data_streams_metering_stats'; import { getAggregatedDatasetPaginatedResults } from './get_dataset_aggregated_paginated_results'; import { updateFieldLimit } from './update_field_limit'; import { createDatasetQualityESClient } from '../../utils'; +import { getDataStreamSettings } from './get_datastream_settings'; +import { checkAndLoadIntegration } from './check_and_load_integration'; const statsRoute = createDatasetQualityServerRoute({ endpoint: 'GET /internal/dataset_quality/data_streams/stats', @@ -293,6 +296,38 @@ const dataStreamSettingsRoute = createDatasetQualityServerRoute({ }, }); +const checkAndLoadIntegrationRoute = createDatasetQualityServerRoute({ + endpoint: 'GET /internal/dataset_quality/data_streams/{dataStream}/integration/check', + params: t.type({ + path: t.type({ + dataStream: t.string, + }), + }), + options: { + tags: [], + }, + async handler(resources): Promise { + const { context, params, plugins, logger } = resources; + const { dataStream } = params.path; + const coreContext = await context.core; + + // Query dataStreams as the current user as the Kibana internal user may not have all the required permissions + const esClient = coreContext.elasticsearch.client.asCurrentUser; + + const fleetPluginStart = await plugins.fleet.start(); + const packageClient = fleetPluginStart.packageService.asInternalUser; + + const integration = await checkAndLoadIntegration({ + esClient, + packageClient, + logger, + dataStream, + }); + + return integration; + }, +}); + const dataStreamDetailsRoute = createDatasetQualityServerRoute({ endpoint: 'GET /internal/dataset_quality/data_streams/{dataStream}/details', params: t.type({ @@ -418,6 +453,7 @@ export const dataStreamsRouteRepository = { ...degradedFieldValuesRoute, ...dataStreamDetailsRoute, ...dataStreamSettingsRoute, + ...checkAndLoadIntegrationRoute, ...analyzeDegradedFieldRoute, ...updateFieldLimitRoute, ...rolloverDataStream, diff --git a/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/update_field_limit/index.ts b/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/update_field_limit/index.ts index f377ea1e2642c..d00831a58aa7f 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/update_field_limit/index.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/update_field_limit/index.ts @@ -11,7 +11,7 @@ import { createDatasetQualityESClient } from '../../../utils'; import { updateComponentTemplate } from './update_component_template'; import { updateLastBackingIndexSettings } from './update_settings_last_backing_index'; import { UpdateFieldLimitResponse } from '../../../../common/api_types'; -import { getDataStreamSettings } from '../get_data_stream_details'; +import { getDataStreamSettings } from '../get_datastream_settings'; export async function updateFieldLimit({ esClient, diff --git a/x-pack/plugins/observability_solution/dataset_quality/server/routes/integrations/get_integrations.ts b/x-pack/plugins/observability_solution/dataset_quality/server/routes/integrations/get_integrations.ts index 10e89db800a20..b8bf8719783ce 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/server/routes/integrations/get_integrations.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/server/routes/integrations/get_integrations.ts @@ -8,9 +8,29 @@ import { Logger } from '@kbn/core/server'; import { PackageClient } from '@kbn/fleet-plugin/server'; import { PackageNotFoundError } from '@kbn/fleet-plugin/server/errors'; -import { PackageListItem, RegistryDataStream } from '@kbn/fleet-plugin/common'; +import { PackageInfo, RegistryDataStream } from '@kbn/fleet-plugin/common'; import { IntegrationType } from '../../../common/api_types'; +export async function getIntegration({ + packageClient, + logger, + packageName, +}: { + packageClient: PackageClient; + logger: Logger; + packageName: string; +}): Promise { + const latestPackage = await packageClient.getLatestPackageInfo(packageName); + + return { + name: latestPackage.name, + title: latestPackage.title, + version: latestPackage.version, + icons: latestPackage.icons, + datasets: await getDatasets({ packageClient, logger, pkg: latestPackage }), + }; +} + export async function getIntegrations(options: { packageClient: PackageClient; logger: Logger; @@ -36,7 +56,7 @@ export async function getIntegrations(options: { const getDatasets = async (options: { packageClient: PackageClient; logger: Logger; - pkg: PackageListItem; + pkg: Pick; }) => { const { packageClient, logger, pkg } = options; diff --git a/x-pack/plugins/observability_solution/dataset_quality/server/test_helpers/create_dataset_quality_users/helpers/call_kibana.ts b/x-pack/plugins/observability_solution/dataset_quality/server/test_helpers/create_dataset_quality_users/helpers/call_kibana.ts index 879b02f8a93c5..5f36a8a4204f2 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/server/test_helpers/create_dataset_quality_users/helpers/call_kibana.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/server/test_helpers/create_dataset_quality_users/helpers/call_kibana.ts @@ -24,14 +24,18 @@ export async function callKibana({ ...options, baseURL: baseUrl, auth: { username, password }, - headers: { 'kbn-xsrf': 'true', ...options.headers }, + headers: { 'kbn-xsrf': 'true', 'x-elastic-internal-origin': 'kibana', ...options.headers }, }); return data; } const getBaseUrl = once(async (kibanaHostname: string) => { try { - await axios.request({ url: kibanaHostname, maxRedirects: 0 }); + await axios.request({ + url: kibanaHostname, + maxRedirects: 0, + headers: { 'x-elastic-internal-origin': 'kibana' }, + }); } catch (e) { if (isAxiosError(e)) { const location = e.response?.headers?.location ?? ''; diff --git a/x-pack/plugins/observability_solution/dataset_quality/server/utils/create_dataset_quality_es_client.ts b/x-pack/plugins/observability_solution/dataset_quality/server/utils/create_dataset_quality_es_client.ts index 8a78b4163da95..cb6c963435f1e 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/server/utils/create_dataset_quality_es_client.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/server/utils/create_dataset_quality_es_client.ts @@ -13,6 +13,8 @@ import { FieldCapsRequest, FieldCapsResponse, Indices, + IndicesGetIndexTemplateRequest, + IndicesGetIndexTemplateResponse, IndicesGetMappingResponse, IndicesGetSettingsResponse, IndicesPutSettingsRequest, @@ -63,5 +65,10 @@ export function createDatasetQualityESClient(esClient: ElasticsearchClient) { rollover(params: { alias: string }): Promise { return esClient.indices.rollover(params); }, + indexTemplates( + params: IndicesGetIndexTemplateRequest + ): Promise { + return esClient.indices.getIndexTemplate(params); + }, }; } diff --git a/x-pack/plugins/observability_solution/dataset_quality/tsconfig.json b/x-pack/plugins/observability_solution/dataset_quality/tsconfig.json index 8576b08bd9479..57b159cdbd295 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/tsconfig.json +++ b/x-pack/plugins/observability_solution/dataset_quality/tsconfig.json @@ -61,7 +61,8 @@ "@kbn/rison", "@kbn/task-manager-plugin", "@kbn/core-application-browser", - "@kbn/field-utils" + "@kbn/field-utils", + "@kbn/logging" ], "exclude": [ "target/**/*" diff --git a/x-pack/plugins/observability_solution/entity_manager_app/public/pages/overview/index.tsx b/x-pack/plugins/observability_solution/entity_manager_app/public/pages/overview/index.tsx index 8c978db6f6751..d628ab306a1b1 100644 --- a/x-pack/plugins/observability_solution/entity_manager_app/public/pages/overview/index.tsx +++ b/x-pack/plugins/observability_solution/entity_manager_app/public/pages/overview/index.tsx @@ -101,17 +101,29 @@ function EntitySourceForm({ /> + + + + onFieldChange(index, 'display_name', e.target.value)} + /> + + ); } interface EntitySource { id: string; - index_patterns?: string[]; - identity_fields?: string[]; - metadata_fields?: string[]; - filters?: string[]; + index_patterns: string[]; + identity_fields: string[]; + metadata_fields: string[]; + filters: string[]; timestamp_field?: string; + display_name?: string; } const newEntitySource = ({ @@ -126,7 +138,7 @@ const newEntitySource = ({ metadataFields?: string[]; filters?: string[]; timestampField?: string; -}) => ({ +}): EntitySource => ({ id: uuid(), index_patterns: indexPatterns, identity_fields: identityFields, @@ -173,7 +185,7 @@ export function EntityManagerOverviewPage() { .filter( (source) => source.index_patterns.length > 0 && source.identity_fields.length > 0 ) - .map((source) => ({ ...source, type: entityType })), + .map((source) => ({ ...source, type_id: entityType })), }, }, } @@ -320,6 +332,10 @@ export function EntityManagerOverviewPage() { field: 'entity.id', name: 'entity.id', }, + { + field: 'entity.display_name', + name: 'entity.display_name', + }, { field: 'entity.type', name: 'entity.type', @@ -329,16 +345,10 @@ export function EntityManagerOverviewPage() { name: 'entity.last_seen_timestamp', }, ...Array.from(new Set(entitySources.flatMap((source) => source.identity_fields))).map( - (field) => ({ - field, - name: field, - }) + (field) => ({ field, name: field }) ), ...Array.from(new Set(entitySources.flatMap((source) => source.metadata_fields))).map( - (field) => ({ - field: `metadata.${field}`, - name: `metadata.${field}`, - }) + (field) => ({ field, name: field }) ), ]} /> diff --git a/x-pack/plugins/observability_solution/infra/common/alerting/logs/log_threshold/types.ts b/x-pack/plugins/observability_solution/infra/common/alerting/logs/log_threshold/types.ts index b8410a478b6f8..2ae0e0b00a2dd 100644 --- a/x-pack/plugins/observability_solution/infra/common/alerting/logs/log_threshold/types.ts +++ b/x-pack/plugins/observability_solution/infra/common/alerting/logs/log_threshold/types.ts @@ -10,7 +10,7 @@ import * as rt from 'io-ts'; import { persistedLogViewReferenceRT } from '@kbn/logs-shared-plugin/common'; import { commonSearchSuccessResponseFieldsRT } from '../../../utils/elasticsearch_runtime_types'; -export const LOG_DOCUMENT_COUNT_RULE_TYPE_ID = 'logs.alert.document.count'; +export { LOG_THRESHOLD_ALERT_TYPE_ID as LOG_DOCUMENT_COUNT_RULE_TYPE_ID } from '@kbn/rule-data-utils'; const ThresholdTypeRT = rt.keyof({ count: null, diff --git a/x-pack/plugins/observability_solution/infra/common/alerting/metrics/types.ts b/x-pack/plugins/observability_solution/infra/common/alerting/metrics/types.ts index b5a3c084c47cb..d1adb75d51134 100644 --- a/x-pack/plugins/observability_solution/infra/common/alerting/metrics/types.ts +++ b/x-pack/plugins/observability_solution/infra/common/alerting/metrics/types.ts @@ -8,16 +8,12 @@ import { TimeUnitChar } from '@kbn/observability-plugin/common/utils/formatters/ import { InventoryItemType, SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; import { COMPARATORS } from '@kbn/alerting-comparators'; import { LEGACY_COMPARATORS } from '@kbn/observability-plugin/common/utils/convert_legacy_outside_comparator'; +export { INFRA_RULE_TYPE_IDS } from '@kbn/rule-data-utils'; import { SnapshotCustomMetricInput } from '../../http_api'; export const METRIC_THRESHOLD_ALERT_TYPE_ID = 'metrics.alert.threshold'; export const METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID = 'metrics.alert.inventory.threshold'; -export enum InfraRuleType { - MetricThreshold = 'metrics.alert.threshold', - InventoryThreshold = 'metrics.alert.inventory.threshold', -} - export enum Aggregators { COUNT = 'count', AVERAGE = 'avg', diff --git a/x-pack/plugins/observability_solution/infra/common/constants.ts b/x-pack/plugins/observability_solution/infra/common/constants.ts index f871b7a6707ca..c86d39cddb3fb 100644 --- a/x-pack/plugins/observability_solution/infra/common/constants.ts +++ b/x-pack/plugins/observability_solution/infra/common/constants.ts @@ -16,12 +16,13 @@ export const METRICS_FEATURE_ID = AlertConsumers.INFRASTRUCTURE; export const INFRA_ALERT_FEATURE_ID = AlertConsumers.INFRASTRUCTURE; export const LOGS_FEATURE_ID = AlertConsumers.LOGS; -export const INFRA_ALERT_FEATURE_IDS: ValidFeatureId[] = [ +export const INFRA_ALERT_CONSUMERS: ValidFeatureId[] = [ AlertConsumers.INFRASTRUCTURE, AlertConsumers.OBSERVABILITY, AlertConsumers.LOGS, AlertConsumers.SLO, AlertConsumers.APM, + AlertConsumers.ALERTS, ]; export type InfraFeatureId = typeof METRICS_FEATURE_ID | typeof LOGS_FEATURE_ID; diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/add_metrics_callout/constants.ts b/x-pack/plugins/observability_solution/infra/public/components/asset_details/add_metrics_callout/constants.ts index ca56a58875220..01da12c5f59ad 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/add_metrics_callout/constants.ts +++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/add_metrics_callout/constants.ts @@ -62,7 +62,7 @@ const containerDefaultActions = ( return { actions: { primary: { - href: locator?.getRedirectUrl({ category: OnboardingFlow.Infra }), + href: locator?.getRedirectUrl({ category: OnboardingFlow.Hosts }), label: defaultPrimaryActionLabel, }, link: { diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/metrics/container_metrics.tsx b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/metrics/container_metrics.tsx index f49fa026892b1..65d19f7693740 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/metrics/container_metrics.tsx +++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/metrics/container_metrics.tsx @@ -14,6 +14,7 @@ import { MetricsTemplate } from './metrics_template'; import { DockerCharts, KubernetesContainerCharts } from '../../charts'; import { DOCKER_METRIC_TYPES, INTEGRATIONS, KUBERNETES_METRIC_TYPES } from '../../constants'; import { useIntegrationCheck } from '../../hooks/use_integration_check'; +import { AddMetricsCallout } from '../../add_metrics_callout'; export const ContainerMetrics = () => { const ref = useRef(null); @@ -29,7 +30,7 @@ export const ContainerMetrics = () => { }); if (!isDockerContainer && !isKubernetesContainer) { - return null; + return ; } return ( diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/overview/overview.tsx b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/overview/overview.tsx index e4f0eee51dbc0..9ace5606599d7 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/overview/overview.tsx +++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/overview/overview.tsx @@ -27,8 +27,6 @@ import { AddMetricsCallout } from '../../add_metrics_callout'; import { AddMetricsCalloutKey } from '../../add_metrics_callout/constants'; import { useEntitySummary } from '../../hooks/use_entity_summary'; import { isMetricsSignal } from '../../utils/get_data_stream_types'; -import { INTEGRATIONS } from '../../constants'; -import { useIntegrationCheck } from '../../hooks/use_integration_check'; export const Overview = () => { const { dateRange } = useDatePickerContext(); @@ -50,10 +48,6 @@ export const Overview = () => { `infra.dismissedAddMetricsCallout.${addMetricsCalloutId}`, false ); - const isDockerContainer = useIntegrationCheck({ dependsOn: INTEGRATIONS.docker }); - const isKubernetesContainer = useIntegrationCheck({ - dependsOn: INTEGRATIONS.kubernetesContainer, - }); const metadataSummarySection = isFullPageView ? ( @@ -74,13 +68,7 @@ export const Overview = () => { return false; } - const { type } = asset; - const baseCondition = !isMetricsSignal(dataStreams); - - const isRelevantContainer = - type === 'container' && (isDockerContainer || isKubernetesContainer); - - return baseCondition && (type === 'host' || isRelevantContainer); + return !isMetricsSignal(dataStreams); }; const showAddMetricsCallout = shouldShowCallout(); diff --git a/x-pack/plugins/observability_solution/infra/public/components/lens/lens_chart.tsx b/x-pack/plugins/observability_solution/infra/public/components/lens/lens_chart.tsx index b244ff12222d6..56d69fa9b6c7c 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/lens/lens_chart.tsx +++ b/x-pack/plugins/observability_solution/infra/public/components/lens/lens_chart.tsx @@ -25,6 +25,12 @@ import { ChartLoadError } from './chart_load_error'; import { HOST_MISSING_FIELDS } from '../../common/visualizations/constants'; const MIN_HEIGHT = 300; +const DEFAULT_DISABLED_ACTIONS = [ + 'ACTION_CUSTOMIZE_PANEL', + 'ACTION_EXPORT_CSV', + 'embeddable_addToExistingCase', + 'create-ml-ad-job-action', +]; export type LensChartProps = BaseChartProps & Pick & { @@ -33,6 +39,8 @@ export type LensChartProps = BaseChartProps & description?: string; } & { lensAttributes: UseLensAttributesParams; + withDefaultActions?: boolean; + disabledActions?: string[]; }; export const LensChart = React.memo( @@ -52,6 +60,8 @@ export const LensChart = React.memo( height = MIN_HEIGHT, loading = false, lensAttributes, + withDefaultActions = true, + disabledActions = DEFAULT_DISABLED_ACTIONS, }: LensChartProps) => { const { formula, attributes, getExtraActions, error } = useLensAttributes(lensAttributes); @@ -122,6 +132,8 @@ export const LensChart = React.memo( dateRange={dateRange} disableTriggers={disableTriggers} extraActions={extraActions} + withDefaultActions={withDefaultActions} + disabledActions={disabledActions} filters={filters} hidePanelTitles={hidePanelTitles} loading={isLoading} diff --git a/x-pack/plugins/observability_solution/infra/public/components/lens/lens_wrapper.tsx b/x-pack/plugins/observability_solution/infra/public/components/lens/lens_wrapper.tsx index 01d409fc9a1ac..01ce60b593462 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/lens/lens_wrapper.tsx +++ b/x-pack/plugins/observability_solution/infra/public/components/lens/lens_wrapper.tsx @@ -93,7 +93,6 @@ export const LensWrapper = ({

        { }; describe('useAlertsCount', () => { - const featureIds: ValidFeatureId[] = ['infrastructure']; + const ruleTypeIds = ['metrics.alert.inventory.threshold']; + const consumers = ['foo']; beforeAll(() => { mockUseKibana(); @@ -66,7 +67,7 @@ describe('useAlertsCount', () => { it('should return the mocked data from API', async () => { mockedPostAPI.mockResolvedValue(mockedAlertsCountResponse); - const { result } = renderHook(() => useAlertsCount({ featureIds })); + const { result } = renderHook(() => useAlertsCount({ ruleTypeIds })); expect(result.current.loading).toBe(true); expect(result.current.alertsCount).toEqual(undefined); @@ -90,7 +91,8 @@ describe('useAlertsCount', () => { renderHook(() => useAlertsCount({ - featureIds, + ruleTypeIds, + consumers, query, }) ); @@ -101,7 +103,8 @@ describe('useAlertsCount', () => { terms: { field: ALERT_STATUS }, }, }, - feature_ids: featureIds, + rule_type_ids: ruleTypeIds, + consumers, query, size: 0, }); @@ -118,7 +121,7 @@ describe('useAlertsCount', () => { const error = new Error('Fetch Alerts Count Failed'); mockedPostAPI.mockRejectedValueOnce(error); - const { result } = renderHook(() => useAlertsCount({ featureIds })); + const { result } = renderHook(() => useAlertsCount({ ruleTypeIds })); await waitFor(() => expect(result.current.error?.message).toMatch(error.message)); }); diff --git a/x-pack/plugins/observability_solution/infra/public/hooks/use_alerts_count.ts b/x-pack/plugins/observability_solution/infra/public/hooks/use_alerts_count.ts index 5c602d09b7d23..aab542d597f92 100644 --- a/x-pack/plugins/observability_solution/infra/public/hooks/use_alerts_count.ts +++ b/x-pack/plugins/observability_solution/infra/public/hooks/use_alerts_count.ts @@ -12,17 +12,19 @@ import { BASE_RAC_ALERTS_API_PATH } from '@kbn/rule-registry-plugin/common/const import { estypes } from '@elastic/elasticsearch'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import type { HttpSetup } from '@kbn/core/public'; -import { ALERT_STATUS_ACTIVE, ALERT_STATUS_RECOVERED, ValidFeatureId } from '@kbn/rule-data-utils'; +import { ALERT_STATUS_ACTIVE, ALERT_STATUS_RECOVERED } from '@kbn/rule-data-utils'; import { InfraClientCoreStart } from '../types'; interface UseAlertsCountProps { - featureIds: ValidFeatureId[]; + ruleTypeIds: string[]; + consumers?: string[]; query?: estypes.QueryDslQueryContainer; } interface FetchAlertsCountParams { - featureIds: ValidFeatureId[]; + ruleTypeIds: string[]; + consumers?: string[]; query?: estypes.QueryDslQueryContainer; http: HttpSetup; signal: AbortSignal; @@ -35,7 +37,7 @@ export interface AlertsCount { const ALERT_STATUS = 'kibana.alert.status'; -export function useAlertsCount({ featureIds, query }: UseAlertsCountProps) { +export function useAlertsCount({ ruleTypeIds, consumers, query }: UseAlertsCountProps) { const { http } = useKibana().services; const abortCtrlRef = useRef(new AbortController()); @@ -45,13 +47,14 @@ export function useAlertsCount({ featureIds, query }: UseAlertsCountProps) { abortCtrlRef.current.abort(); abortCtrlRef.current = new AbortController(); return fetchAlertsCount({ - featureIds, + ruleTypeIds, + consumers, query, http, signal: abortCtrlRef.current.signal, }); }, - [featureIds, query, http], + [ruleTypeIds, query, http], { loading: true } ); @@ -70,7 +73,8 @@ export function useAlertsCount({ featureIds, query }: UseAlertsCountProps) { } async function fetchAlertsCount({ - featureIds, + ruleTypeIds, + consumers, http, query, signal, @@ -84,7 +88,8 @@ async function fetchAlertsCount({ terms: { field: ALERT_STATUS }, }, }, - feature_ids: featureIds, + rule_type_ids: ruleTypeIds, + consumers, query, size: 0, }), diff --git a/x-pack/plugins/observability_solution/infra/public/pages/logs/settings/indices_configuration_panel.tsx b/x-pack/plugins/observability_solution/infra/public/pages/logs/settings/indices_configuration_panel.tsx index 8f42b4cf1bc6a..0e16a404cbd54 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/logs/settings/indices_configuration_panel.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/logs/settings/indices_configuration_panel.tsx @@ -19,7 +19,7 @@ import { import { EuiCallOut } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { loadRuleAggregations } from '@kbn/triggers-actions-ui-plugin/public'; -import { LOG_THRESHOLD_ALERT_TYPE_ID } from '@kbn/rule-data-utils'; +import { AlertConsumers, LOG_THRESHOLD_ALERT_TYPE_ID } from '@kbn/rule-data-utils'; import { rulesLocatorID, RulesParams } from '@kbn/observability-plugin/public'; import { EuiLink } from '@elastic/eui'; @@ -93,7 +93,8 @@ export const IndicesConfigurationPanel = React.memo<{ if (http) { const { ruleExecutionStatus } = await loadRuleAggregations({ http, - typesFilter: [LOG_THRESHOLD_ALERT_TYPE_ID], + ruleTypeIds: [LOG_THRESHOLD_ALERT_TYPE_ID], + consumers: [AlertConsumers.LOGS, AlertConsumers.ALERTS, AlertConsumers.OBSERVABILITY], }); const numberOfRules = Object.values(ruleExecutionStatus).reduce( (acc, value) => acc + value, diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/tabs/alerts/alerts_tab_content.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/tabs/alerts/alerts_tab_content.tsx index 14da46d12d349..7b0ec7ed2d2f1 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/tabs/alerts/alerts_tab_content.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/tabs/alerts/alerts_tab_content.tsx @@ -6,11 +6,16 @@ */ import React from 'react'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { AlertConsumers } from '@kbn/rule-data-utils'; +import { + AlertConsumers, + INFRA_RULE_TYPE_IDS, + OBSERVABILITY_RULE_TYPE_IDS, +} from '@kbn/rule-data-utils'; import { BrushEndListener, type XYBrushEvent } from '@elastic/charts'; import { useSummaryTimeRange } from '@kbn/observability-plugin/public'; import { useBoolean } from '@kbn/react-hooks'; import type { TimeRange } from '@kbn/es-query'; +import { INFRA_ALERT_CONSUMERS } from '../../../../../../../common/constants'; import { useKibanaContextForPlugin } from '../../../../../../hooks/use_kibana'; import { HeightRetainer } from '../../../../../../components/height_retainer'; import { useUnifiedSearchContext } from '../../../hooks/use_unified_search'; @@ -20,7 +25,6 @@ import { AlertsEsQuery } from '../../../../../../utils/filters/create_alerts_es_ import { ALERTS_PER_PAGE, ALERTS_TABLE_ID, - infraAlertFeatureIds, } from '../../../../../../components/shared/alerts/constants'; import AlertsStatusFilter from '../../../../../../components/shared/alerts/alerts_status_filter'; import { CreateAlertRuleButton } from '../../../../../../components/shared/alerts/links/create_alert_rule_button'; @@ -86,7 +90,8 @@ export const AlertsTabContent = () => { { const { alertsEsQuery } = useAlertsQuery(); const { alertsCount, loading, error } = useAlertsCount({ - featureIds: infraAlertFeatureIds, + ruleTypeIds: INFRA_RULE_TYPE_IDS, + consumers: INFRA_ALERT_CONSUMERS, query: alertsEsQuery, }); diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_host_count.test.ts b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_host_count.test.ts new file mode 100644 index 0000000000000..641194c82888a --- /dev/null +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_host_count.test.ts @@ -0,0 +1,144 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { renderHook } from '@testing-library/react'; +import { useFetcher } from '../../../../hooks/use_fetcher'; +import { useKibanaContextForPlugin } from '../../../../hooks/use_kibana'; +import * as useKibanaContextForPluginHook from '../../../../hooks/use_kibana'; +import * as useUnifiedSearchHooks from './use_unified_search'; +import { useHostCount } from './use_host_count'; + +jest.mock('../../../../hooks/use_fetcher'); +jest.mock('../../../../hooks/use_kibana'); +jest.mock('./use_unified_search'); + +describe('useHostCount', () => { + const useKibanaContextForPluginMock = useKibanaContextForPlugin as jest.MockedFunction< + typeof useKibanaContextForPlugin + >; + + const telemetryMock = { reportHostsViewTotalHostCountRetrieved: jest.fn() }; + + useKibanaContextForPluginMock.mockReturnValue({ + services: { telemetry: telemetryMock }, + } as unknown as ReturnType); + + const useUnifiedSearchContextMock = + useUnifiedSearchHooks.useUnifiedSearchContext as jest.MockedFunction< + typeof useUnifiedSearchHooks.useUnifiedSearchContext + >; + + const mockUseUnifiedContext = (searchCriteria: any) => { + useUnifiedSearchContextMock.mockReturnValue({ + buildQuery: jest.fn(() => 'query'), + parsedDateRange: { from: '', to: '' }, + searchCriteria, + } as unknown as ReturnType); + }; + + describe('when data is fetched', () => { + const fetcherDataMock = { count: 10 }; + + beforeAll(() => { + (useFetcher as jest.Mock).mockReturnValue({ + data: fetcherDataMock, + status: 'success', + error: null, + }); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + describe('and there is no filters or query applied', () => { + it('should call reportHostsViewTotalHostCountRetrieved with the correct data', async () => { + mockUseUnifiedContext({ + query: { query: null }, + filters: [], + panelFilters: [], + }); + + await renderHook(() => useHostCount()); + + expect(telemetryMock.reportHostsViewTotalHostCountRetrieved).toHaveBeenCalledWith({ + total: fetcherDataMock.count, + with_query: false, + with_filters: false, + }); + }); + }); + + describe('and query is applied', () => { + it('should call reportHostsViewTotalHostCountRetrieved with the correct data', async () => { + mockUseUnifiedContext({ query: { query: 'test' }, filters: [], panelFilters: [] }); + + await renderHook(() => useHostCount()); + + expect(telemetryMock.reportHostsViewTotalHostCountRetrieved).toHaveBeenCalledWith({ + total: fetcherDataMock.count, + with_query: true, + with_filters: false, + }); + }); + }); + + describe('and filters are applied', () => { + it('should call reportHostsViewTotalHostCountRetrieved with the correct data', async () => { + mockUseUnifiedContext({ + query: { query: null }, + filters: [{ filter: 'filter' }], + panelFilters: [], + }); + + await renderHook(() => useHostCount()); + + expect(telemetryMock.reportHostsViewTotalHostCountRetrieved).toHaveBeenCalledWith({ + total: fetcherDataMock.count, + with_query: false, + with_filters: true, + }); + }); + }); + + describe('and panel filters are applied', () => { + it('should call reportHostsViewTotalHostCountRetrieved with the correct data', async () => { + mockUseUnifiedContext({ + query: { query: null }, + filters: [{ filter: 'filter' }], + panelFilters: [{ filter: 'filter' }], + }); + + await renderHook(() => useHostCount()); + + expect(telemetryMock.reportHostsViewTotalHostCountRetrieved).toHaveBeenCalledWith({ + total: fetcherDataMock.count, + with_query: false, + with_filters: true, + }); + }); + }); + }); + + describe('when data is fetched with error', () => { + beforeAll(() => { + (useFetcher as jest.Mock).mockReturnValue({ + data: {}, + status: 'error', + error: 'error', + }); + }); + + it('should NOT call reportHostsViewTotalHostCountRetrieved ', async () => { + mockUseUnifiedContext(null); + + await renderHook(() => useHostCount()); + + expect(telemetryMock.reportHostsViewTotalHostCountRetrieved).not.toHaveBeenCalled(); + }); + }); +}); diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_host_count.ts b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_host_count.ts index a09e46ed2792a..fd723fd596146 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_host_count.ts +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_host_count.ts @@ -7,13 +7,16 @@ import createContainer from 'constate'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import { useMemo } from 'react'; +import { useMemo, useEffect } from 'react'; +import { useKibanaContextForPlugin } from '../../../../hooks/use_kibana'; import { GetInfraAssetCountResponsePayloadRT } from '../../../../../common/http_api'; import { isPending, useFetcher } from '../../../../hooks/use_fetcher'; import { useUnifiedSearchContext } from './use_unified_search'; export const useHostCount = () => { - const { buildQuery, parsedDateRange } = useUnifiedSearchContext(); + const { buildQuery, parsedDateRange, searchCriteria } = useUnifiedSearchContext(); + const { services } = useKibanaContextForPlugin(); + const { telemetry } = services; const payload = useMemo( () => @@ -37,6 +40,16 @@ export const useHostCount = () => { [payload] ); + useEffect(() => { + if (data && !error) { + telemetry.reportHostsViewTotalHostCountRetrieved({ + total: data.count ?? 0, + with_query: !!searchCriteria.query.query, + with_filters: searchCriteria.filters.length > 0 || searchCriteria.panelFilters.length > 0, + }); + } + }, [data, error, payload, searchCriteria, telemetry]); + return { errors: error, loading: isPending(status), diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/nodes_overview.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/nodes_overview.tsx index d42670f190fde..c2493df3a3968 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/nodes_overview.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/nodes_overview.tsx @@ -145,6 +145,18 @@ export const NodesOverview = ({ currentTime={currentTime} onFilter={handleDrilldown} /> + {nodeType === assetType && detailsItemId && ( + + )} ); } diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/table_view.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/table_view.tsx index 182c74c124fd9..e41bf377e40e1 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/table_view.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/inventory_view/components/table_view.tsx @@ -17,6 +17,7 @@ import { InfraWaffleMapNode, InfraWaffleMapOptions } from '../../../../common/in import { fieldToName } from '../lib/field_to_display_name'; import { NodeContextMenu } from './waffle/node_context_menu'; import { SnapshotNode, SnapshotNodePath } from '../../../../../common/http_api/snapshot_api'; +import { useAssetDetailsFlyoutState } from '../hooks/use_asset_details_flyout_url_state'; interface Props { nodes: SnapshotNode[]; @@ -49,6 +50,16 @@ export const TableView = (props: Props) => { const { nodes, options, formatter, currentTime, nodeType } = props; const [openPopoverId, setOpenPopoverId] = useState(null); + const [_, setFlyoutUrlState] = useAssetDetailsFlyoutState(); + const isFlyoutMode = nodeType === 'host' || nodeType === 'container'; + + const toggleAssetPopover = (uniqueID: string, nodeId: string) => { + if (isFlyoutMode) { + setFlyoutUrlState({ detailsItemId: nodeId, assetType: nodeType }); + } else { + setOpenPopoverId(uniqueID); + } + }; const closePopover = () => setOpenPopoverId(null); @@ -69,14 +80,14 @@ export const TableView = (props: Props) => { setOpenPopoverId(uniqueID)} + onClick={() => toggleAssetPopover(uniqueID, item.node.id)} > {value} ); - return ( + return !isFlyoutMode ? ( { options={options} /> + ) : ( + button ); }, }, diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/settings/source_configuration_settings.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/settings/source_configuration_settings.tsx index 8deaa805ba9b4..328ef4680680e 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/settings/source_configuration_settings.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/settings/source_configuration_settings.tsx @@ -20,6 +20,7 @@ import { import { loadRuleAggregations } from '@kbn/triggers-actions-ui-plugin/public'; import { HttpSetup } from '@kbn/core-http-browser'; import { + AlertConsumers, METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID, METRIC_THRESHOLD_ALERT_TYPE_ID, } from '@kbn/rule-data-utils'; @@ -56,7 +57,12 @@ export const SourceConfigurationSettings = ({ if (http) { const { ruleExecutionStatus } = await loadRuleAggregations({ http, - typesFilter: [METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID, METRIC_THRESHOLD_ALERT_TYPE_ID], + ruleTypeIds: [METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID, METRIC_THRESHOLD_ALERT_TYPE_ID], + consumers: [ + AlertConsumers.INFRASTRUCTURE, + AlertConsumers.ALERTS, + AlertConsumers.OBSERVABILITY, + ], }); const numberOfRules = Object.values(ruleExecutionStatus).reduce( (acc, value) => acc + value, diff --git a/x-pack/plugins/observability_solution/infra/public/test_utils/entries.ts b/x-pack/plugins/observability_solution/infra/public/test_utils/entries.ts index 0b04c90ee633d..7042a6538dceb 100644 --- a/x-pack/plugins/observability_solution/infra/public/test_utils/entries.ts +++ b/x-pack/plugins/observability_solution/infra/public/test_utils/entries.ts @@ -5,7 +5,7 @@ * 2.0. */ -import faker from 'faker'; +import { faker } from '@faker-js/faker'; import { LogEntry, LogViewColumnConfiguration } from '@kbn/logs-shared-plugin/common'; export function generateFakeEntries( @@ -51,15 +51,15 @@ export function generateFakeEntries( function fakeColumnValue(field: string): string { switch (field) { case 'message': - return faker.fake( - '{{internet.ip}} - [{{date.past}}] "GET {{internet.url}} HTTP/1.1" 200 {{random.number}} "-" "{{internet.userAgent}}"' + return faker.helpers.fake( + '{{internet.ip}} - [{{date.past}}] "GET {{internet.url}} HTTP/1.1" 200 {{number.int}} "-" "{{internet.userAgent}}"' ); case 'event.dataset': - return faker.fake('{{hacker.noun}}.{{hacker.noun}}'); + return faker.helpers.fake('{{hacker.noun}}.{{hacker.noun}}'); case 'log.file.path': return faker.system.filePath(); case 'log.level': - return faker.random.arrayElement(['debug', 'info', 'warn', 'error']); + return faker.helpers.arrayElement(['debug', 'info', 'warn', 'error']); case 'host.name': return faker.hacker.noun(); default: diff --git a/x-pack/plugins/observability_solution/infra/server/config.ts b/x-pack/plugins/observability_solution/infra/server/config.ts new file mode 100644 index 0000000000000..3e3d51f42a5d1 --- /dev/null +++ b/x-pack/plugins/observability_solution/infra/server/config.ts @@ -0,0 +1,113 @@ +/* + * 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 { offeringBasedSchema, schema } from '@kbn/config-schema'; +import { PluginConfigDescriptor } from '@kbn/core-plugins-server'; +import { ConfigDeprecation } from '@kbn/config'; +import { InfraConfig } from './types'; +import { publicConfigKeys } from '../common/plugin_config_types'; + +export type { InfraConfig }; + +export const config: PluginConfigDescriptor = { + schema: schema.object({ + enabled: schema.boolean({ defaultValue: true }), + alerting: schema.object({ + inventory_threshold: schema.object({ + group_by_page_size: schema.number({ defaultValue: 5_000 }), + }), + metric_threshold: schema.object({ + group_by_page_size: schema.number({ defaultValue: 10_000 }), + }), + }), + inventory: schema.object({ + compositeSize: schema.number({ defaultValue: 2000 }), + }), + sources: schema.maybe( + schema.object({ + default: schema.maybe( + schema.object({ + fields: schema.maybe( + schema.object({ + message: schema.maybe(schema.arrayOf(schema.string())), + }) + ), + }) + ), + }) + ), + featureFlags: schema.object({ + customThresholdAlertsEnabled: offeringBasedSchema({ + traditional: schema.boolean({ defaultValue: false }), + serverless: schema.boolean({ defaultValue: false }), + }), + logsUIEnabled: offeringBasedSchema({ + traditional: schema.boolean({ defaultValue: true }), + serverless: schema.boolean({ defaultValue: false }), + }), + metricsExplorerEnabled: offeringBasedSchema({ + traditional: schema.boolean({ defaultValue: true }), + serverless: schema.boolean({ defaultValue: false }), + }), + osqueryEnabled: schema.boolean({ defaultValue: true }), + inventoryThresholdAlertRuleEnabled: offeringBasedSchema({ + traditional: schema.boolean({ defaultValue: true }), + serverless: schema.boolean({ defaultValue: true }), + }), + metricThresholdAlertRuleEnabled: offeringBasedSchema({ + traditional: schema.boolean({ defaultValue: true }), + serverless: schema.boolean({ defaultValue: false }), + }), + logThresholdAlertRuleEnabled: offeringBasedSchema({ + traditional: schema.boolean({ defaultValue: true }), + serverless: schema.boolean({ defaultValue: false }), + }), + alertsAndRulesDropdownEnabled: offeringBasedSchema({ + traditional: schema.boolean({ defaultValue: true }), + serverless: schema.boolean({ defaultValue: true }), + }), + /** + * Depends on optional "profilingDataAccess" and "profiling" + * plugins. Enable both with `xpack.profiling.enabled: true` before + * enabling this feature flag. + */ + profilingEnabled: schema.boolean({ defaultValue: false }), + ruleFormV2Enabled: schema.boolean({ defaultValue: false }), + }), + }), + deprecations: () => [sourceFieldsMessageDeprecation], + exposeToBrowser: publicConfigKeys, +}; + +const sourceFieldsMessageDeprecation: ConfigDeprecation = (settings, fromPath, addDeprecation) => { + const sourceFieldsMessageSetting = settings?.xpack?.infra?.sources?.default?.fields?.message; + + if (sourceFieldsMessageSetting) { + addDeprecation({ + configPath: `${fromPath}.sources.default.fields.message`, + title: i18n.translate('xpack.infra.deprecations.sourcesDefaultFieldsMessage.title', { + defaultMessage: 'The "xpack.infra.sources.default.fields.message" setting is deprecated.', + ignoreTag: true, + }), + message: i18n.translate('xpack.infra.deprecations.sourcesDefaultFieldsMessage.message', { + defaultMessage: + 'Features using this configurations are set to be removed in v9 and this is no longer used.', + }), + level: 'warning', + documentationUrl: `https://www.elastic.co/guide/en/kibana/current/logs-ui-settings-kb.html#general-logs-ui-settings-kb`, + correctiveActions: { + manualSteps: [ + i18n.translate('xpack.infra.deprecations.sourcesDefaultFieldsMessage.manualSteps1', { + defaultMessage: 'Remove "xpack.infra.sources.default.fields.message" from kibana.yml.', + ignoreTag: true, + }), + ], + }, + }); + } +}; diff --git a/x-pack/plugins/observability_solution/infra/server/features.ts b/x-pack/plugins/observability_solution/infra/server/features.ts index b2f83967920e1..77fb8d317fefd 100644 --- a/x-pack/plugins/observability_solution/infra/server/features.ts +++ b/x-pack/plugins/observability_solution/infra/server/features.ts @@ -14,6 +14,7 @@ import { } from '@kbn/rule-data-utils'; import { ES_QUERY_ID } from '@kbn/rule-data-utils'; import { metricsDataSourceSavedObjectName } from '@kbn/metrics-data-access-plugin/server'; +import { ALERTING_FEATURE_ID } from '@kbn/alerting-plugin/common'; import { KibanaFeatureScope } from '@kbn/features-plugin/common'; import { LOG_DOCUMENT_COUNT_RULE_TYPE_ID } from '../common/alerting/logs/log_threshold/types'; import { @@ -31,6 +32,11 @@ const metricRuleTypes = [ ML_ANOMALY_DETECTION_RULE_TYPE_ID, ]; +const metricAlertingFeatures = metricRuleTypes.map((ruleTypeId) => ({ + ruleTypeId, + consumers: [METRICS_FEATURE_ID, ALERTING_FEATURE_ID], +})); + export const METRICS_FEATURE = { id: METRICS_FEATURE_ID, name: i18n.translate('xpack.infra.featureRegistry.linkInfrastructureTitle', { @@ -44,7 +50,7 @@ export const METRICS_FEATURE = { management: { insightsAndAlerting: ['triggersActions'], }, - alerting: metricRuleTypes, + alerting: metricAlertingFeatures, privileges: { all: { app: ['infra', 'metrics', 'kibana'], @@ -56,10 +62,10 @@ export const METRICS_FEATURE = { }, alerting: { rule: { - all: metricRuleTypes, + all: metricAlertingFeatures, }, alert: { - all: metricRuleTypes, + all: metricAlertingFeatures, }, }, management: { @@ -77,10 +83,10 @@ export const METRICS_FEATURE = { }, alerting: { rule: { - read: metricRuleTypes, + read: metricAlertingFeatures, }, alert: { - read: metricRuleTypes, + read: metricAlertingFeatures, }, }, management: { @@ -98,6 +104,11 @@ const logsRuleTypes = [ ML_ANOMALY_DETECTION_RULE_TYPE_ID, ]; +const logsAlertingFeatures = logsRuleTypes.map((ruleTypeId) => ({ + ruleTypeId, + consumers: [LOGS_FEATURE_ID, ALERTING_FEATURE_ID], +})); + export const LOGS_FEATURE = { id: LOGS_FEATURE_ID, name: i18n.translate('xpack.infra.featureRegistry.linkLogsTitle', { @@ -111,7 +122,7 @@ export const LOGS_FEATURE = { management: { insightsAndAlerting: ['triggersActions'], }, - alerting: logsRuleTypes, + alerting: logsAlertingFeatures, privileges: { all: { app: ['infra', 'logs', 'kibana', 'observability-logs-explorer'], @@ -123,10 +134,10 @@ export const LOGS_FEATURE = { }, alerting: { rule: { - all: logsRuleTypes, + all: logsAlertingFeatures, }, alert: { - all: logsRuleTypes, + all: logsAlertingFeatures, }, }, management: { @@ -140,10 +151,10 @@ export const LOGS_FEATURE = { api: ['infra', 'rac'], alerting: { rule: { - read: logsRuleTypes, + read: logsAlertingFeatures, }, alert: { - read: logsRuleTypes, + read: logsAlertingFeatures, }, }, management: { diff --git a/x-pack/plugins/observability_solution/infra/server/index.ts b/x-pack/plugins/observability_solution/infra/server/index.ts index 96ac6dc162c24..c381514900a72 100644 --- a/x-pack/plugins/observability_solution/infra/server/index.ts +++ b/x-pack/plugins/observability_solution/infra/server/index.ts @@ -6,11 +6,9 @@ */ import { PluginInitializerContext } from '@kbn/core/server'; -import { config, InfraConfig } from './plugin'; +export { config, type InfraConfig } from './config'; export type { InfraPluginSetup, InfraPluginStart, InfraRequestHandlerContext } from './types'; -export type { InfraConfig }; -export { config }; export async function plugin(context: PluginInitializerContext) { const { InfraServerPlugin } = await import('./plugin'); diff --git a/x-pack/plugins/observability_solution/infra/server/lib/adapters/framework/adapter_types.ts b/x-pack/plugins/observability_solution/infra/server/lib/adapters/framework/adapter_types.ts index b8dd11a17fb0b..3ee4f9632b359 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/adapters/framework/adapter_types.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/adapters/framework/adapter_types.ts @@ -20,7 +20,7 @@ import { HomeServerPluginSetup } from '@kbn/home-plugin/server'; import { VisTypeTimeseriesSetup } from '@kbn/vis-type-timeseries-plugin/server'; import { FeaturesPluginSetup } from '@kbn/features-plugin/server'; import { SpacesPluginSetup } from '@kbn/spaces-plugin/server'; -import { PluginSetupContract as AlertingPluginContract } from '@kbn/alerting-plugin/server'; +import type { AlertingServerSetup } from '@kbn/alerting-plugin/server'; import { MlPluginSetup } from '@kbn/ml-plugin/server'; import { RuleRegistryPluginSetupContract, @@ -46,7 +46,7 @@ import type { } from '@kbn/entityManager-plugin/server'; export interface InfraServerPluginSetupDeps { - alerting: AlertingPluginContract; + alerting: AlertingServerSetup; data: DataPluginSetup; home: HomeServerPluginSetup; features: FeaturesPluginSetup; diff --git a/x-pack/plugins/observability_solution/infra/server/lib/adapters/framework/kibana_framework_adapter.ts b/x-pack/plugins/observability_solution/infra/server/lib/adapters/framework/kibana_framework_adapter.ts index c16dad5445af4..f245214cfa37a 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/adapters/framework/kibana_framework_adapter.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/adapters/framework/kibana_framework_adapter.ts @@ -13,8 +13,7 @@ import { UI_SETTINGS } from '@kbn/data-plugin/server'; import { TimeseriesVisData } from '@kbn/vis-type-timeseries-plugin/server'; import { DEFAULT_SPACE_ID } from '@kbn/spaces-plugin/common'; import { TSVBMetricModel } from '@kbn/metrics-data-access-plugin/common'; -import { InfraConfig } from '../../../plugin'; -import type { InfraPluginRequestHandlerContext } from '../../../types'; +import type { InfraConfig, InfraPluginRequestHandlerContext } from '../../../types'; import { CallWithRequestParams, InfraDatabaseGetIndicesAliasResponse, diff --git a/x-pack/plugins/observability_solution/infra/server/lib/adapters/source_status/elasticsearch_source_status_adapter.ts b/x-pack/plugins/observability_solution/infra/server/lib/adapters/source_status/elasticsearch_source_status_adapter.ts index 54e2831899482..ff8058011baea 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/adapters/source_status/elasticsearch_source_status_adapter.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/adapters/source_status/elasticsearch_source_status_adapter.ts @@ -5,11 +5,14 @@ * 2.0. */ +import type { DataTier } from '@kbn/observability-shared-plugin/common'; +import { searchExcludedDataTiers } from '@kbn/observability-plugin/common/ui_settings_keys'; +import { excludeTiersQuery } from '@kbn/observability-utils-common/es/queries/exclude_tiers_query'; import type { InfraPluginRequestHandlerContext } from '../../../types'; import { isNoSuchRemoteClusterMessage, NoSuchRemoteClusterError } from '../../sources/errors'; -import { InfraSourceStatusAdapter, SourceIndexStatus } from '../../source_status'; -import { InfraDatabaseGetIndicesResponse } from '../framework'; -import { KibanaFramework } from '../framework/kibana_framework_adapter'; +import type { InfraSourceStatusAdapter, SourceIndexStatus } from '../../source_status'; +import type { InfraDatabaseGetIndicesResponse } from '../framework'; +import type { KibanaFramework } from '../framework/kibana_framework_adapter'; export class InfraElasticsearchSourceStatusAdapter implements InfraSourceStatusAdapter { constructor(private readonly framework: KibanaFramework) {} @@ -46,6 +49,12 @@ export class InfraElasticsearchSourceStatusAdapter implements InfraSourceStatusA requestContext: InfraPluginRequestHandlerContext, indexNames: string ): Promise { + const { uiSettings } = await requestContext.core; + + const excludedDataTiers = await uiSettings.client.get(searchExcludedDataTiers); + + const filter = excludedDataTiers.length ? excludeTiersQuery(excludedDataTiers) : []; + return await this.framework .callWithRequest(requestContext, 'search', { ignore_unavailable: true, @@ -54,6 +63,7 @@ export class InfraElasticsearchSourceStatusAdapter implements InfraSourceStatusA size: 0, terminate_after: 1, track_total_hits: 1, + query: { bool: { filter } }, }) .then( (response) => { diff --git a/x-pack/plugins/observability_solution/infra/server/lib/alerting/inventory_metric_threshold/register_inventory_metric_threshold_rule_type.ts b/x-pack/plugins/observability_solution/infra/server/lib/alerting/inventory_metric_threshold/register_inventory_metric_threshold_rule_type.ts index 7b69d76ba0ce9..f85738248a9c0 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/alerting/inventory_metric_threshold/register_inventory_metric_threshold_rule_type.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/alerting/inventory_metric_threshold/register_inventory_metric_threshold_rule_type.ts @@ -8,7 +8,7 @@ import { schema, Type } from '@kbn/config-schema'; import { i18n } from '@kbn/i18n'; import { DEFAULT_APP_CATEGORIES } from '@kbn/core/server'; -import { GetViewInAppRelativeUrlFnOpts, PluginSetupContract } from '@kbn/alerting-plugin/server'; +import { GetViewInAppRelativeUrlFnOpts, AlertingServerSetup } from '@kbn/alerting-plugin/server'; import { observabilityPaths } from '@kbn/observability-plugin/common'; import { TimeUnitChar } from '@kbn/observability-plugin/common/utils/formatters/duration'; import { @@ -81,7 +81,7 @@ const groupActionVariableDescription = i18n.translate( ); export function registerInventoryThresholdRuleType( - alertingPlugin: PluginSetupContract, + alertingPlugin: AlertingServerSetup, libs: InfraBackendLibs, { featureFlags }: InfraConfig, locators: InfraLocators diff --git a/x-pack/plugins/observability_solution/infra/server/lib/alerting/log_threshold/register_log_threshold_rule_type.ts b/x-pack/plugins/observability_solution/infra/server/lib/alerting/log_threshold/register_log_threshold_rule_type.ts index decac47dbb5f9..d4eb9050499cf 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/alerting/log_threshold/register_log_threshold_rule_type.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/alerting/log_threshold/register_log_threshold_rule_type.ts @@ -7,7 +7,10 @@ import { i18n } from '@kbn/i18n'; import { DEFAULT_APP_CATEGORIES } from '@kbn/core/server'; -import { GetViewInAppRelativeUrlFnOpts, PluginSetupContract } from '@kbn/alerting-plugin/server'; +import type { + GetViewInAppRelativeUrlFnOpts, + AlertingServerSetup, +} from '@kbn/alerting-plugin/server'; import { observabilityPaths } from '@kbn/observability-plugin/common'; import { decodeOrThrow } from '@kbn/io-ts-utils'; import type { InfraConfig } from '../../../../common/plugin_config_types'; @@ -103,7 +106,7 @@ const viewInAppUrlActionVariableDescription = i18n.translate( ); export function registerLogThresholdRuleType( - alertingPlugin: PluginSetupContract, + alertingPlugin: AlertingServerSetup, libs: InfraBackendLibs, { featureFlags }: InfraConfig ) { diff --git a/x-pack/plugins/observability_solution/infra/server/lib/alerting/metric_threshold/register_metric_threshold_rule_type.ts b/x-pack/plugins/observability_solution/infra/server/lib/alerting/metric_threshold/register_metric_threshold_rule_type.ts index 6369465773cf7..3cc272a02c7fe 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/alerting/metric_threshold/register_metric_threshold_rule_type.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/alerting/metric_threshold/register_metric_threshold_rule_type.ts @@ -8,7 +8,10 @@ import { DEFAULT_APP_CATEGORIES } from '@kbn/core/server'; import { schema } from '@kbn/config-schema'; import { i18n } from '@kbn/i18n'; -import { GetViewInAppRelativeUrlFnOpts, PluginSetupContract } from '@kbn/alerting-plugin/server'; +import type { + GetViewInAppRelativeUrlFnOpts, + AlertingServerSetup, +} from '@kbn/alerting-plugin/server'; import { observabilityPaths } from '@kbn/observability-plugin/common'; import { COMPARATORS } from '@kbn/alerting-comparators'; import { LEGACY_COMPARATORS } from '@kbn/observability-plugin/common/utils/convert_legacy_outside_comparator'; @@ -46,7 +49,7 @@ import { MetricsRulesTypeAlertDefinition } from '../register_rule_types'; import { O11Y_AAD_FIELDS } from '../../../../common/constants'; export function registerMetricThresholdRuleType( - alertingPlugin: PluginSetupContract, + alertingPlugin: AlertingServerSetup, libs: InfraBackendLibs, { featureFlags }: InfraConfig, locators: InfraLocators diff --git a/x-pack/plugins/observability_solution/infra/server/lib/alerting/register_rule_types.ts b/x-pack/plugins/observability_solution/infra/server/lib/alerting/register_rule_types.ts index 125c3135a235d..6d06c2c98607e 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/alerting/register_rule_types.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/alerting/register_rule_types.ts @@ -6,7 +6,7 @@ */ import { legacyExperimentalFieldMap } from '@kbn/alerts-as-data-utils'; -import { type IRuleTypeAlerts, PluginSetupContract } from '@kbn/alerting-plugin/server'; +import { type IRuleTypeAlerts, AlertingServerSetup } from '@kbn/alerting-plugin/server'; import { registerMetricThresholdRuleType } from './metric_threshold/register_metric_threshold_rule_type'; import { registerInventoryThresholdRuleType } from './inventory_metric_threshold/register_inventory_metric_threshold_rule_type'; import { registerLogThresholdRuleType } from './log_threshold/register_log_threshold_rule_type'; @@ -36,7 +36,7 @@ export const MetricsRulesTypeAlertDefinition: IRuleTypeAlerts { + const hasPrivileges = async () => { + const apmDataAccessStart = await libs.plugins.apmDataAccess.start(); + return apmDataAccessStart.hasPrivileges({ request }); + }; + const getServices = async () => { const apmDataAccess = libs.plugins.apmDataAccess.setup; const coreContext = await context.core; - const { uiSettings, elasticsearch } = coreContext; + const { savedObjects, uiSettings, elasticsearch } = coreContext; + const savedObjectsClient = savedObjects.client; const esClient = elasticsearch.client.asCurrentUser; const uiSettingsClient = uiSettings.client; const [apmIndices, includeFrozen] = await Promise.all([ - apmDataAccess.getApmIndices(), + apmDataAccess.getApmIndices(savedObjectsClient), uiSettingsClient.get(UI_SETTINGS.SEARCH_INCLUDE_FROZEN), ]); @@ -80,5 +86,5 @@ export const getApmDataAccessClient = ({ }; }; - return { getServices }; + return { hasPrivileges, getServices }; }; diff --git a/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_alerts_client.ts b/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_alerts_client.ts index c884b08ebaebf..99464efd02567 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_alerts_client.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_alerts_client.ts @@ -8,7 +8,7 @@ import { isEmpty } from 'lodash'; import type { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; import { ParsedTechnicalFields } from '@kbn/rule-registry-plugin/common'; import type { KibanaRequest } from '@kbn/core/server'; -import { INFRA_ALERT_FEATURE_IDS } from '../../../common/constants'; +import { OBSERVABILITY_RULE_TYPE_IDS } from '@kbn/rule-data-utils'; import type { InfraBackendLibs } from '../infra_types'; type RequiredParams = ESSearchRequest & { @@ -27,7 +27,9 @@ export async function getInfraAlertsClient({ }) { const [, { ruleRegistry }] = await libs.getStartServices(); const alertsClient = await ruleRegistry.getRacClientWithRequest(request); - const infraAlertsIndices = await alertsClient.getAuthorizedAlertsIndices(INFRA_ALERT_FEATURE_IDS); + const infraAlertsIndices = await alertsClient.getAuthorizedAlertsIndices( + OBSERVABILITY_RULE_TYPE_IDS + ); if (!infraAlertsIndices || isEmpty(infraAlertsIndices)) { throw Error('No alert indices exist for "infrastructure"'); diff --git a/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_metrics_client.test.ts b/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_metrics_client.test.ts new file mode 100644 index 0000000000000..3eb8c47c274d9 --- /dev/null +++ b/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_metrics_client.test.ts @@ -0,0 +1,151 @@ +/* + * 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 } from '@kbn/core-http-server'; +import { DataTier } from '@kbn/observability-shared-plugin/common'; +import { InfraBackendLibs } from '../infra_types'; +import { getInfraMetricsClient } from './get_infra_metrics_client'; +import { InfraPluginRequestHandlerContext } from '../../types'; +import { QueryDslQueryContainer } from '@kbn/data-views-plugin/common/types'; + +const withExcludedDataTiers = (tiers: DataTier[]) => ({ + uiSettings: { + client: { + get: () => Promise.resolve(tiers), + }, + }, +}); + +const mockedInfra = { getMetricsIndices: () => Promise.resolve(['*.indices']) }; + +const infraMetricsTestHarness = + (tiers: DataTier[], input: QueryDslQueryContainer | undefined, output: QueryDslQueryContainer) => + async () => { + const callWithRequest = jest.fn(); + + const mockedCore = withExcludedDataTiers(tiers); + + const context = { + infra: Promise.resolve(mockedInfra), + core: Promise.resolve(mockedCore), + } as unknown as InfraPluginRequestHandlerContext; + + const client = await getInfraMetricsClient({ + libs: { framework: { callWithRequest } } as unknown as InfraBackendLibs, + context, + request: {} as unknown as KibanaRequest, + }); + + await client.search({ + body: { + query: input, + size: 1, + track_total_hits: false, + }, + }); + + expect(callWithRequest).toBeCalledWith( + context, + 'search', + { + body: { + query: output, + size: 1, + track_total_hits: false, + }, + ignore_unavailable: true, + index: ['*.indices'], + }, + {} + ); + }; + +describe('getInfraMetricsClient', () => { + it( + 'defines an empty must_not query if given no data tiers to filter by', + infraMetricsTestHarness([], undefined, { bool: { must_not: [] } }) + ); + + it( + 'includes excluded data tiers in the request filter by default', + infraMetricsTestHarness(['data_frozen'], undefined, { + bool: { + must_not: [ + { + terms: { + _tier: ['data_frozen'], + }, + }, + ], + }, + }) + ); + + it( + 'merges provided filters with the excluded data tier filter', + infraMetricsTestHarness( + ['data_frozen'], + { + bool: { + must_not: { + exists: { + field: 'a-field', + }, + }, + }, + }, + { + bool: { + must_not: [ + { + exists: { + field: 'a-field', + }, + }, + { + terms: { + _tier: ['data_frozen'], + }, + }, + ], + }, + } + ) + ); + + it( + 'merges other query params with the excluded data tiers filter', + infraMetricsTestHarness( + ['data_frozen'], + { + bool: { + must: { + exists: { + field: 'a-field', + }, + }, + }, + }, + { + bool: { + must: { + exists: { + field: 'a-field', + }, + }, + must_not: [ + { + terms: { + _tier: ['data_frozen'], + }, + }, + ], + }, + } + ) + ); +}); diff --git a/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_metrics_client.ts b/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_metrics_client.ts index d560ffc358a5c..96ae89b902285 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_metrics_client.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_metrics_client.ts @@ -6,6 +6,10 @@ */ import type { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; import type { KibanaRequest } from '@kbn/core/server'; +import { searchExcludedDataTiers } from '@kbn/observability-plugin/common/ui_settings_keys'; +import type { DataTier } from '@kbn/observability-shared-plugin/common'; +import { excludeTiersQuery } from '@kbn/observability-utils-common/es/queries/exclude_tiers_query'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; import type { InfraPluginRequestHandlerContext } from '../../types'; import type { InfraBackendLibs } from '../infra_types'; @@ -29,12 +33,25 @@ export async function getInfraMetricsClient({ }) { const { framework } = libs; const infraContext = await context.infra; + const { uiSettings } = await context.core; + + const excludedDataTiers = await uiSettings.client.get(searchExcludedDataTiers); const metricsIndices = await infraContext.getMetricsIndices(); + const excludedQuery = excludedDataTiers.length + ? excludeTiersQuery(excludedDataTiers)[0].bool!.must_not! + : []; + return { search( searchParams: TParams ): Promise> { + const searchFilter = searchParams.body.query?.bool?.must_not ?? []; + + // This flattens arrays by one level, and non-array values can be added as well, so it all + // results in a nice [QueryDsl, QueryDsl, ...] array. + const mustNot = ([] as QueryDslQueryContainer[]).concat(searchFilter, excludedQuery); + return framework.callWithRequest( context, 'search', @@ -42,6 +59,16 @@ export async function getInfraMetricsClient({ ...searchParams, ignore_unavailable: true, index: metricsIndices, + body: { + ...searchParams.body, + query: { + ...searchParams.body.query, + bool: { + ...searchParams.body.query?.bool, + must_not: mustNot, + }, + }, + }, }, request ) as Promise; diff --git a/x-pack/plugins/observability_solution/infra/server/plugin.ts b/x-pack/plugins/observability_solution/infra/server/plugin.ts index b8becb916a4e3..6008954b63bde 100644 --- a/x-pack/plugins/observability_solution/infra/server/plugin.ts +++ b/x-pack/plugins/observability_solution/infra/server/plugin.ts @@ -6,13 +6,7 @@ */ import { Server } from '@hapi/hapi'; -import { schema, offeringBasedSchema } from '@kbn/config-schema'; -import { - CoreStart, - Plugin, - PluginConfigDescriptor, - PluginInitializerContext, -} from '@kbn/core/server'; +import { CoreStart, Plugin, PluginInitializerContext } from '@kbn/core/server'; import { handleEsError } from '@kbn/es-ui-shared-plugin/server'; import { i18n } from '@kbn/i18n'; import { Logger } from '@kbn/logging'; @@ -26,7 +20,6 @@ import { import { type AlertsLocatorParams, alertsLocatorID } from '@kbn/observability-plugin/common'; import { mapValues } from 'lodash'; import { LOGS_FEATURE_ID, METRICS_FEATURE_ID } from '../common/constants'; -import { publicConfigKeys } from '../common/plugin_config_types'; import { LOGS_FEATURE, METRICS_FEATURE } from './features'; import { registerRoutes } from './infra_server'; import { InfraServerPluginSetupDeps, InfraServerPluginStartDeps } from './lib/adapters/framework'; @@ -61,77 +54,6 @@ import { UsageCollector } from './usage/usage_collector'; import { mapSourceToLogView } from './utils/map_source_to_log_view'; import { uiSettings } from '../common/ui_settings'; -export const config: PluginConfigDescriptor = { - schema: schema.object({ - enabled: schema.boolean({ defaultValue: true }), - alerting: schema.object({ - inventory_threshold: schema.object({ - group_by_page_size: schema.number({ defaultValue: 5_000 }), - }), - metric_threshold: schema.object({ - group_by_page_size: schema.number({ defaultValue: 10_000 }), - }), - }), - inventory: schema.object({ - compositeSize: schema.number({ defaultValue: 2000 }), - }), - sources: schema.maybe( - schema.object({ - default: schema.maybe( - schema.object({ - fields: schema.maybe( - schema.object({ - message: schema.maybe(schema.arrayOf(schema.string())), - }) - ), - }) - ), - }) - ), - featureFlags: schema.object({ - customThresholdAlertsEnabled: offeringBasedSchema({ - traditional: schema.boolean({ defaultValue: false }), - serverless: schema.boolean({ defaultValue: false }), - }), - logsUIEnabled: offeringBasedSchema({ - traditional: schema.boolean({ defaultValue: true }), - serverless: schema.boolean({ defaultValue: false }), - }), - metricsExplorerEnabled: offeringBasedSchema({ - traditional: schema.boolean({ defaultValue: true }), - serverless: schema.boolean({ defaultValue: false }), - }), - osqueryEnabled: schema.boolean({ defaultValue: true }), - inventoryThresholdAlertRuleEnabled: offeringBasedSchema({ - traditional: schema.boolean({ defaultValue: true }), - serverless: schema.boolean({ defaultValue: true }), - }), - metricThresholdAlertRuleEnabled: offeringBasedSchema({ - traditional: schema.boolean({ defaultValue: true }), - serverless: schema.boolean({ defaultValue: false }), - }), - logThresholdAlertRuleEnabled: offeringBasedSchema({ - traditional: schema.boolean({ defaultValue: true }), - serverless: schema.boolean({ defaultValue: false }), - }), - alertsAndRulesDropdownEnabled: offeringBasedSchema({ - traditional: schema.boolean({ defaultValue: true }), - serverless: schema.boolean({ defaultValue: true }), - }), - /** - * Depends on optional "profilingDataAccess" and "profiling" - * plugins. Enable both with `xpack.profiling.enabled: true` before - * enabling this feature flag. - */ - profilingEnabled: schema.boolean({ defaultValue: false }), - ruleFormV2Enabled: schema.boolean({ defaultValue: false }), - }), - }), - exposeToBrowser: publicConfigKeys, -}; - -export type { InfraConfig }; - export interface KbnServer extends Server { usage: any; } diff --git a/x-pack/plugins/observability_solution/infra/server/routes/infra/index.ts b/x-pack/plugins/observability_solution/infra/server/routes/infra/index.ts index 3f91a034c8103..1b720eeb31869 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/infra/index.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/infra/index.ts @@ -41,11 +41,12 @@ export const initInfraAssetRoutes = (libs: InfraBackendLibs) => { try { const apmDataAccessClient = getApmDataAccessClient({ request, libs, context }); + const hasApmPrivileges = await apmDataAccessClient.hasPrivileges(); const [infraMetricsClient, alertsClient, apmDataAccessServices] = await Promise.all([ getInfraMetricsClient({ request, libs, context }), getInfraAlertsClient({ libs, request }), - apmDataAccessClient.getServices(), + hasApmPrivileges ? apmDataAccessClient.getServices() : undefined, ]); const hosts = await getHosts({ @@ -96,10 +97,11 @@ export const initInfraAssetRoutes = (libs: InfraBackendLibs) => { try { const apmDataAccessClient = getApmDataAccessClient({ request, libs, context }); + const hasApmPrivileges = await apmDataAccessClient.hasPrivileges(); const [infraMetricsClient, apmDataAccessServices] = await Promise.all([ getInfraMetricsClient({ request, libs, context }), - apmDataAccessClient.getServices(), + hasApmPrivileges ? apmDataAccessClient.getServices() : undefined, ]); const count = await getHostsCount({ diff --git a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/helpers/query.ts b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/helpers/query.ts index 52da69cd7c008..570c1499f3b74 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/helpers/query.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/helpers/query.ts @@ -9,7 +9,6 @@ import { findInventoryModel } from '@kbn/metrics-data-access-plugin/common'; import { termQuery } from '@kbn/observability-plugin/server'; import { ApmDocumentType, type TimeRangeMetadata } from '@kbn/apm-data-access-plugin/common'; import { estypes } from '@elastic/elasticsearch'; -import { castArray } from 'lodash'; import type { ApmDataAccessServicesWrapper } from '../../../../lib/helpers/get_apm_data_access_client'; import { EVENT_MODULE, @@ -18,16 +17,12 @@ import { } from '../../../../../common/constants'; import type { InfraAssetMetricType } from '../../../../../common/http_api/infra'; -export const getFilterByIntegration = ( - integration: typeof SYSTEM_INTEGRATION, - extraFilter: estypes.QueryDslQueryContainer[] = [] -) => { +export const getFilterByIntegration = (integration: typeof SYSTEM_INTEGRATION) => { return { bool: { should: [ ...termQuery(EVENT_MODULE, integration), ...termQuery(METRICSET_MODULE, integration), - ...extraFilter, ], minimum_should_match: 1, }, @@ -68,6 +63,7 @@ export const getDocumentsFilter = async ({ from: number; to: number; }) => { + const filters: estypes.QueryDslQueryContainer[] = [getFilterByIntegration('system')]; const apmDocumentsFilter = apmDataAccessServices && apmDocumentSources ? await getApmDocumentsFilter({ @@ -78,9 +74,9 @@ export const getDocumentsFilter = async ({ }) : undefined; - const filters: estypes.QueryDslQueryContainer[] = [ - getFilterByIntegration('system', apmDocumentsFilter && castArray(apmDocumentsFilter)), - ]; + if (apmDocumentsFilter) { + filters.push(apmDocumentsFilter); + } return filters; }; diff --git a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts.ts b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts.ts index 63fef5d438b00..bb5bd51cfe1f9 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts.ts @@ -49,7 +49,6 @@ export const getHosts = async ({ const [hostMetricsResponse, alertsCountResponse] = await Promise.all([ getAllHosts({ infraMetricsClient, - apmDataAccessServices, apmDocumentSources, from, to, diff --git a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts_alerts_count.ts b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts_alerts_count.ts index d36ff06f35cf0..dbb1a3c2ceb69 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts_alerts_count.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts_alerts_count.ts @@ -12,7 +12,7 @@ import { ALERT_STATUS_ACTIVE, ALERT_UUID, } from '@kbn/rule-data-utils'; -import { HOST_NAME_FIELD, INFRA_ALERT_FEATURE_IDS } from '../../../../../common/constants'; +import { HOST_NAME_FIELD, INFRA_ALERT_CONSUMERS } from '../../../../../common/constants'; import { GetHostParameters } from '../types'; export async function getHostsAlertsCount({ @@ -40,7 +40,7 @@ export async function getHostsAlertsCount({ query: { bool: { filter: [ - ...termsQuery(ALERT_RULE_PRODUCER, ...INFRA_ALERT_FEATURE_IDS), + ...termsQuery(ALERT_RULE_PRODUCER, ...INFRA_ALERT_CONSUMERS), ...termQuery(ALERT_STATUS, ALERT_STATUS_ACTIVE), ...termsQuery(HOST_NAME_FIELD, ...hostNames), ...rangeQuery, diff --git a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts_count.ts b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts_count.ts index e36811ea5b87a..154fd8796520d 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts_count.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts_count.ts @@ -25,14 +25,8 @@ export async function getHostsCount({ }) { assertQueryStructure(query); - const apmDocumentSources = await apmDataAccessServices?.getDocumentSources({ - start: from, - end: to, - }); - const documentsFilter = await getDocumentsFilter({ apmDataAccessServices, - apmDocumentSources, from, to, }); @@ -45,7 +39,7 @@ export async function getHostsCount({ query: { bool: { filter: [query, ...rangeQuery(from, to)], - must: [...documentsFilter], + should: [...documentsFilter], }, }, aggs: { diff --git a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/types.ts b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/types.ts index 8f50d9eb89f13..87679f24271d6 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/types.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/types.ts @@ -13,5 +13,5 @@ import { InfraMetricsClient } from '../../../lib/helpers/get_infra_metrics_clien export interface GetHostParameters extends GetInfraMetricsRequestBodyPayload { infraMetricsClient: InfraMetricsClient; alertsClient: InfraAlertsClient; - apmDataAccessServices: ApmDataAccessServicesWrapper; + apmDataAccessServices?: ApmDataAccessServicesWrapper; } diff --git a/x-pack/plugins/observability_solution/infra/server/routes/metrics_sources/index.ts b/x-pack/plugins/observability_solution/infra/server/routes/metrics_sources/index.ts index 20dcbc1b7e20b..77bdee365e3bf 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/metrics_sources/index.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/metrics_sources/index.ts @@ -208,7 +208,7 @@ export const initMetricsSourceConfigurationRoutes = (libs: InfraBackendLibs) => }, async (context, request, response) => { try { - const modules = castArray(request.query.modules); + const modules = request.query.modules ? castArray(request.query.modules) : []; if (modules.length > MAX_MODULES) { throw Boom.badRequest( diff --git a/x-pack/plugins/observability_solution/infra/server/routes/services/index.ts b/x-pack/plugins/observability_solution/infra/server/routes/services/index.ts index bc6ce91e830ad..9673b31788487 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/services/index.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/services/index.ts @@ -36,6 +36,16 @@ export const initServicesRoute = (libs: InfraBackendLibs) => { const { from, to, size = 10, validatedFilters } = request.query; const apmDataAccessClient = getApmDataAccessClient({ request, libs, context }); + const hasApmPrivileges = await apmDataAccessClient.hasPrivileges(); + + if (!hasApmPrivileges) { + return response.customError({ + statusCode: 403, + body: { + message: 'APM data access service is not available', + }, + }); + } const apmDataAccessServices = await apmDataAccessClient.getServices(); diff --git a/x-pack/plugins/observability_solution/infra/server/services/rules/types.ts b/x-pack/plugins/observability_solution/infra/server/services/rules/types.ts index 68ae0bd95b410..ee2d5967b081b 100644 --- a/x-pack/plugins/observability_solution/infra/server/services/rules/types.ts +++ b/x-pack/plugins/observability_solution/infra/server/services/rules/types.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { PluginSetupContract as AlertingPluginSetup } from '@kbn/alerting-plugin/server'; +import type { AlertingServerSetup } from '@kbn/alerting-plugin/server'; import { IRuleDataClient, RuleRegistryPluginSetupContract } from '@kbn/rule-registry-plugin/server'; export interface RulesServiceSetupDeps { - alerting: AlertingPluginSetup; + alerting: AlertingServerSetup; ruleRegistry: RuleRegistryPluginSetupContract; } diff --git a/x-pack/plugins/observability_solution/infra/tsconfig.json b/x-pack/plugins/observability_solution/infra/tsconfig.json index efd8be77b688c..f927926a00df6 100644 --- a/x-pack/plugins/observability_solution/infra/tsconfig.json +++ b/x-pack/plugins/observability_solution/infra/tsconfig.json @@ -116,7 +116,10 @@ "@kbn/entityManager-plugin", "@kbn/entities-schema", "@kbn/zod", - "@kbn/observability-utils-server" + "@kbn/observability-utils-server", + "@kbn/core-plugins-server", + "@kbn/config", + "@kbn/observability-utils-common" ], "exclude": ["target/**/*"] } diff --git a/x-pack/plugins/observability_solution/inventory/server/lib/create_alerts_client/create_alerts_client.ts b/x-pack/plugins/observability_solution/inventory/server/lib/create_alerts_client/create_alerts_client.ts index 150e946fd98d6..878abd516e5bd 100644 --- a/x-pack/plugins/observability_solution/inventory/server/lib/create_alerts_client/create_alerts_client.ts +++ b/x-pack/plugins/observability_solution/inventory/server/lib/create_alerts_client/create_alerts_client.ts @@ -8,6 +8,7 @@ import { isEmpty } from 'lodash'; import { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; import { ParsedTechnicalFields } from '@kbn/rule-registry-plugin/common'; +import { OBSERVABILITY_RULE_TYPE_IDS } from '@kbn/rule-data-utils'; import { InventoryRouteHandlerResources } from '../../routes/types'; export type AlertsClient = Awaited>; @@ -18,13 +19,7 @@ export async function createAlertsClient({ }: Pick) { const ruleRegistryPluginStart = await plugins.ruleRegistry.start(); const alertsClient = await ruleRegistryPluginStart.getRacClientWithRequest(request); - const alertsIndices = await alertsClient.getAuthorizedAlertsIndices([ - 'logs', - 'infrastructure', - 'apm', - 'slo', - 'observability', - ]); + const alertsIndices = await alertsClient.getAuthorizedAlertsIndices(OBSERVABILITY_RULE_TYPE_IDS); if (!alertsIndices || isEmpty(alertsIndices)) { throw Error('No alert indices exist'); diff --git a/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/events_timeline/events_timeline.tsx b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/events_timeline/events_timeline.tsx index c3f92139bd936..45b245f68b4b0 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/events_timeline/events_timeline.tsx +++ b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/events_timeline/events_timeline.tsx @@ -11,9 +11,6 @@ import { Chart, Axis, AreaSeries, Position, ScaleType, Settings } from '@elastic import { useActiveCursor } from '@kbn/charts-plugin/public'; import { EuiSkeletonText } from '@elastic/eui'; import { getBrushData } from '@kbn/observability-utils-browser/chart/utils'; -import { Group } from '@kbn/observability-alerting-rule-utils'; -import { ALERT_GROUP } from '@kbn/rule-data-utils'; -import { SERVICE_NAME } from '@kbn/observability-shared-plugin/common'; import { AnnotationEvent } from './annotation_event'; import { TIME_LINE_THEME } from './timeline_theme'; import { useFetchEvents } from '../../../../hooks/use_fetch_events'; @@ -27,19 +24,10 @@ export const EventsTimeLine = () => { const baseTheme = dependencies.start.charts.theme.useChartsBaseTheme(); const { globalParams, updateInvestigationParams } = useInvestigation(); - const { alert } = useInvestigation(); - - const filter = useMemo(() => { - const group = (alert?.[ALERT_GROUP] as unknown as Group[])?.find( - ({ field }) => field === SERVICE_NAME - ); - return group ? `{"${SERVICE_NAME}":"${alert?.[SERVICE_NAME]}"}` : ''; - }, [alert]); const { data: events, isLoading } = useFetchEvents({ rangeFrom: globalParams.timeRange.from, rangeTo: globalParams.timeRange.to, - filter, }); const chartRef = useRef(null); diff --git a/x-pack/plugins/observability_solution/investigate_app/server/services/get_alerts_client.ts b/x-pack/plugins/observability_solution/investigate_app/server/services/get_alerts_client.ts index bf1070307742a..c5eaf3f4c3d8e 100644 --- a/x-pack/plugins/observability_solution/investigate_app/server/services/get_alerts_client.ts +++ b/x-pack/plugins/observability_solution/investigate_app/server/services/get_alerts_client.ts @@ -8,6 +8,7 @@ import { isEmpty } from 'lodash'; import { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; import { ParsedTechnicalFields } from '@kbn/rule-registry-plugin/common'; +import { OBSERVABILITY_RULE_TYPE_IDS } from '@kbn/rule-data-utils'; import { InvestigateAppRouteHandlerResources } from '../routes/types'; export type AlertsClient = Awaited>; @@ -18,14 +19,7 @@ export async function getAlertsClient({ }: Pick) { const ruleRegistryPluginStart = await plugins.ruleRegistry.start(); const alertsClient = await ruleRegistryPluginStart.getRacClientWithRequest(request); - const alertsIndices = await alertsClient.getAuthorizedAlertsIndices([ - 'logs', - 'infrastructure', - 'apm', - 'slo', - 'uptime', - 'observability', - ]); + const alertsIndices = await alertsClient.getAuthorizedAlertsIndices(OBSERVABILITY_RULE_TYPE_IDS); if (!alertsIndices || isEmpty(alertsIndices)) { throw Error('No alert indices exist'); diff --git a/x-pack/plugins/observability_solution/investigate_app/tsconfig.json b/x-pack/plugins/observability_solution/investigate_app/tsconfig.json index 0851a13367091..bc67b591a57b8 100644 --- a/x-pack/plugins/observability_solution/investigate_app/tsconfig.json +++ b/x-pack/plugins/observability_solution/investigate_app/tsconfig.json @@ -66,7 +66,6 @@ "@kbn/calculate-auto", "@kbn/ml-random-sampler-utils", "@kbn/charts-plugin", - "@kbn/observability-alerting-rule-utils", "@kbn/observability-utils-browser", "@kbn/usage-collection-plugin", "@kbn/inference-common", diff --git a/x-pack/plugins/observability_solution/logs_data_access/common/constants.ts b/x-pack/plugins/observability_solution/logs_data_access/common/constants.ts index ffe5a83f245e8..1c8a4e9deb4ba 100644 --- a/x-pack/plugins/observability_solution/logs_data_access/common/constants.ts +++ b/x-pack/plugins/observability_solution/logs_data_access/common/constants.ts @@ -5,4 +5,4 @@ * 2.0. */ -export const DEFAULT_LOG_SOURCES = ['logs-*-*', 'logs-*', 'filebeat-*', 'kibana_sample_data_logs*']; +export const DEFAULT_LOG_SOURCES = ['logs-*-*', 'logs-*', 'filebeat-*']; diff --git a/x-pack/plugins/observability_solution/logs_explorer/common/ui_settings.ts b/x-pack/plugins/observability_solution/logs_explorer/common/ui_settings.ts index 65983c3993488..cc9f7f76a3765 100644 --- a/x-pack/plugins/observability_solution/logs_explorer/common/ui_settings.ts +++ b/x-pack/plugins/observability_solution/logs_explorer/common/ui_settings.ts @@ -25,6 +25,13 @@ export const uiSettings: Record = { defaultMessage: 'A list of base patterns to match and explore data views in Logs Explorer. Remote clusters will be automatically matched for the provided base patterns.', }), + deprecation: { + message: i18n.translate('xpack.logsExplorer.allowedDataViewsDeprecationWarning', { + defaultMessage: + 'Logs Explorer is deprecated, and this setting will be removed in Kibana 9.0.', + }), + docLinksKey: 'generalSettings', + }, type: 'array', schema: schema.arrayOf(schema.string()), requiresPageReload: true, diff --git a/x-pack/plugins/observability_solution/logs_shared/public/test_utils/entries.ts b/x-pack/plugins/observability_solution/logs_shared/public/test_utils/entries.ts index 5277f49b1175e..dc6a1526bba0c 100644 --- a/x-pack/plugins/observability_solution/logs_shared/public/test_utils/entries.ts +++ b/x-pack/plugins/observability_solution/logs_shared/public/test_utils/entries.ts @@ -5,7 +5,7 @@ * 2.0. */ -import faker from 'faker'; +import { faker } from '@faker-js/faker'; import { LogEntry } from '../../common/log_entry'; import { LogViewColumnConfiguration } from '../../common/log_views'; @@ -60,15 +60,15 @@ export function generateFakeEntries( function fakeColumnValue(field: string): string { switch (field) { case 'message': - return faker.fake( - '{{internet.ip}} - [{{date.past}}] "GET {{internet.url}} HTTP/1.1" 200 {{random.number}} "-" "{{internet.userAgent}}"' + return faker.helpers.fake( + '{{internet.ip}} - [{{date.past}}] "GET {{internet.url}} HTTP/1.1" 200 {{number.int}} "-" "{{internet.userAgent}}"' ); case 'event.dataset': - return faker.fake('{{hacker.noun}}.{{hacker.noun}}'); + return faker.helpers.fake('{{hacker.noun}}.{{hacker.noun}}'); case 'log.file.path': return faker.system.filePath(); case 'log.level': - return faker.random.arrayElement(['debug', 'info', 'warn', 'error']); + return faker.helpers.arrayElement(['debug', 'info', 'warn', 'error']); case 'host.name': return faker.hacker.noun(); default: diff --git a/x-pack/plugins/observability_solution/logs_shared/server/config.ts b/x-pack/plugins/observability_solution/logs_shared/server/config.ts index c144b8422826f..9dff5723e7633 100644 --- a/x-pack/plugins/observability_solution/logs_shared/server/config.ts +++ b/x-pack/plugins/observability_solution/logs_shared/server/config.ts @@ -26,4 +26,5 @@ export const configSchema = schema.object({ export const config: PluginConfigDescriptor = { schema: configSchema, + deprecations: ({ unused }) => [unused('savedObjects.logView.enabled', { level: 'warning' })], }; diff --git a/x-pack/plugins/observability_solution/logs_shared/server/lib/logs_shared_types.ts b/x-pack/plugins/observability_solution/logs_shared/server/lib/logs_shared_types.ts index d2108bdd6ce9e..4f368c4f64e46 100644 --- a/x-pack/plugins/observability_solution/logs_shared/server/lib/logs_shared_types.ts +++ b/x-pack/plugins/observability_solution/logs_shared/server/lib/logs_shared_types.ts @@ -23,4 +23,5 @@ export interface LogsSharedBackendLibs extends LogsSharedDomainLibs { getStartServices: LogsSharedPluginStartServicesAccessor; getUsageCollector: () => UsageCollector; logger: Logger; + isServerless: boolean; } diff --git a/x-pack/plugins/observability_solution/logs_shared/server/plugin.ts b/x-pack/plugins/observability_solution/logs_shared/server/plugin.ts index d1f6399104fc2..a0a29cebee9b5 100644 --- a/x-pack/plugins/observability_solution/logs_shared/server/plugin.ts +++ b/x-pack/plugins/observability_solution/logs_shared/server/plugin.ts @@ -42,7 +42,7 @@ export class LogsSharedPlugin private logViews: LogViewsService; private usageCollector: UsageCollector; - constructor(context: PluginInitializerContext) { + constructor(private readonly context: PluginInitializerContext) { this.config = context.config.get(); this.logger = context.logger.get(); this.usageCollector = {}; @@ -51,11 +51,13 @@ export class LogsSharedPlugin } public setup(core: LogsSharedPluginCoreSetup, plugins: LogsSharedServerPluginSetupDeps) { + const isServerless = this.context.env.packageInfo.buildFlavor === 'serverless'; + const framework = new KibanaFramework(core, plugins); const logViews = this.logViews.setup(); - if (this.config.savedObjects.logView.enabled) { + if (!isServerless) { // Conditionally register log view saved objects core.savedObjects.registerType(logViewSavedObjectType); } else { @@ -78,6 +80,7 @@ export class LogsSharedPlugin getStartServices: () => core.getStartServices(), getUsageCollector: () => this.usageCollector, logger: this.logger, + isServerless, }; // Register server side APIs diff --git a/x-pack/plugins/observability_solution/logs_shared/server/routes/log_views/get_log_view.ts b/x-pack/plugins/observability_solution/logs_shared/server/routes/log_views/get_log_view.ts index 4e46a06bcfe3d..9370c18243b51 100644 --- a/x-pack/plugins/observability_solution/logs_shared/server/routes/log_views/get_log_view.ts +++ b/x-pack/plugins/observability_solution/logs_shared/server/routes/log_views/get_log_view.ts @@ -14,6 +14,7 @@ export const initGetLogViewRoute = ({ config, framework, getStartServices, + isServerless, }: LogsSharedBackendLibs) => { framework .registerVersionedRoute({ @@ -41,7 +42,7 @@ export const initGetLogViewRoute = ({ * - if the log view saved object is correctly registered, perform a lookup for retrieving it * - else, skip the saved object lookup and immediately get the internal log view if exists. */ - const logView = config.savedObjects.logView.enabled + const logView = !isServerless ? await logViewsClient.getLogView(logViewId) : await logViewsClient.getInternalLogView(logViewId); diff --git a/x-pack/plugins/observability_solution/logs_shared/server/routes/log_views/index.ts b/x-pack/plugins/observability_solution/logs_shared/server/routes/log_views/index.ts index 42c23637fa1b7..4bcaa8d53ad0a 100644 --- a/x-pack/plugins/observability_solution/logs_shared/server/routes/log_views/index.ts +++ b/x-pack/plugins/observability_solution/logs_shared/server/routes/log_views/index.ts @@ -12,7 +12,7 @@ export const initLogViewRoutes = (libs: LogsSharedBackendLibs) => { initGetLogViewRoute(libs); // Register the log view update endpoint only when the Saved object is correctly registered - if (libs.config.savedObjects.logView.enabled) { + if (!libs.isServerless) { initPutLogViewRoute(libs); } }; diff --git a/x-pack/plugins/observability_solution/metrics_data_access/server/lib/adapters/framework/adapter_types.ts b/x-pack/plugins/observability_solution/metrics_data_access/server/lib/adapters/framework/adapter_types.ts index 246988ed96307..6449fcc30b2dc 100644 --- a/x-pack/plugins/observability_solution/metrics_data_access/server/lib/adapters/framework/adapter_types.ts +++ b/x-pack/plugins/observability_solution/metrics_data_access/server/lib/adapters/framework/adapter_types.ts @@ -19,7 +19,7 @@ import { PluginStart as DataViewsPluginStart } from '@kbn/data-views-plugin/serv import { HomeServerPluginSetup } from '@kbn/home-plugin/server'; import { FeaturesPluginSetup } from '@kbn/features-plugin/server'; import { SpacesPluginSetup } from '@kbn/spaces-plugin/server'; -import { PluginSetupContract as AlertingPluginContract } from '@kbn/alerting-plugin/server'; +import type { AlertingServerSetup } from '@kbn/alerting-plugin/server'; import { MlPluginSetup } from '@kbn/ml-plugin/server'; import { RuleRegistryPluginSetupContract } from '@kbn/rule-registry-plugin/server'; import { ObservabilityPluginSetup } from '@kbn/observability-plugin/server'; @@ -27,7 +27,7 @@ import { VersionedRouteConfig } from '@kbn/core-http-server'; import { MetricsDataPluginSetup } from '../../../types'; export interface InfraServerPluginSetupDeps { - alerting: AlertingPluginContract; + alerting: AlertingServerSetup; data: DataPluginSetup; home: HomeServerPluginSetup; features: FeaturesPluginSetup; diff --git a/x-pack/plugins/observability_solution/observability/common/constants.ts b/x-pack/plugins/observability_solution/observability/common/constants.ts index 0286e4bef0825..785f1caf4cb6d 100644 --- a/x-pack/plugins/observability_solution/observability/common/constants.ts +++ b/x-pack/plugins/observability_solution/observability/common/constants.ts @@ -5,7 +5,11 @@ * 2.0. */ -import { AlertConsumers } from '@kbn/rule-data-utils'; +import { + AlertConsumers, + STACK_RULE_TYPE_IDS_SUPPORTED_BY_OBSERVABILITY, + OBSERVABILITY_RULE_TYPE_IDS, +} from '@kbn/rule-data-utils'; import type { ValidFeatureId } from '@kbn/rule-data-utils'; import type { RuleCreationValidConsumer } from '@kbn/triggers-actions-ui-plugin/public'; @@ -20,6 +24,7 @@ export const observabilityAlertFeatureIds: ValidFeatureId[] = [ AlertConsumers.UPTIME, AlertConsumers.SLO, AlertConsumers.OBSERVABILITY, + AlertConsumers.ALERTS, ]; export const observabilityRuleCreationValidConsumers: RuleCreationValidConsumer[] = [ @@ -29,3 +34,8 @@ export const observabilityRuleCreationValidConsumers: RuleCreationValidConsumer[ ]; export const EventsAsUnit = 'events'; + +export const OBSERVABILITY_RULE_TYPE_IDS_WITH_SUPPORTED_STACK_RULE_TYPES = [ + ...OBSERVABILITY_RULE_TYPE_IDS, + ...STACK_RULE_TYPE_IDS_SUPPORTED_BY_OBSERVABILITY, +]; diff --git a/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/alert_search_bar.test.tsx b/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/alert_search_bar.test.tsx index b7da84869679a..d64d8dcbb1a41 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/alert_search_bar.test.tsx +++ b/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/alert_search_bar.test.tsx @@ -12,8 +12,8 @@ import { uiSettingsServiceMock } from '@kbn/core-ui-settings-browser-mocks'; import { ObservabilityAlertSearchBarProps, Services } from './types'; import { ObservabilityAlertSearchBar } from './alert_search_bar'; -import { observabilityAlertFeatureIds } from '../../../common/constants'; import { render } from '../../utils/test_helper'; +import { OBSERVABILITY_RULE_TYPE_IDS_WITH_SUPPORTED_STACK_RULE_TYPES } from '../../../common/constants'; const getAlertsSearchBarMock = jest.fn(); const ALERT_SEARCH_BAR_DATA_TEST_SUBJ = 'alerts-search-bar'; @@ -69,7 +69,7 @@ describe('ObservabilityAlertSearchBar', () => { expect(getAlertsSearchBarMock).toHaveBeenCalledWith( expect.objectContaining({ appName: 'testAppName', - featureIds: observabilityAlertFeatureIds, + ruleTypeIds: OBSERVABILITY_RULE_TYPE_IDS_WITH_SUPPORTED_STACK_RULE_TYPES, rangeFrom: 'now-15m', rangeTo: 'now', query: '', diff --git a/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/alert_search_bar.tsx b/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/alert_search_bar.tsx index 863855bbbb3b8..dd855829edf6f 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/alert_search_bar.tsx +++ b/x-pack/plugins/observability_solution/observability/public/components/alert_search_bar/alert_search_bar.tsx @@ -11,8 +11,8 @@ import React, { useCallback, useEffect } from 'react'; import { i18n } from '@kbn/i18n'; import { Filter, Query } from '@kbn/es-query'; import { getEsQueryConfig } from '@kbn/data-plugin/common'; +import { OBSERVABILITY_RULE_TYPE_IDS_WITH_SUPPORTED_STACK_RULE_TYPES } from '../../../common/constants'; import { AlertsStatusFilter } from './components'; -import { observabilityAlertFeatureIds } from '../../../common/constants'; import { ALERT_STATUS_QUERY, DEFAULT_QUERIES, DEFAULT_QUERY_STRING } from './constants'; import { ObservabilityAlertSearchBarProps } from './types'; import { buildEsQuery } from '../../utils/build_es_query'; @@ -161,7 +161,7 @@ export function ObservabilityAlertSearchBar({ ['services'], @@ -25,7 +24,7 @@ interface GetPersistentControlsParams { export const getPersistentControlsHook = ({ groupingId, - featureIds, + ruleTypeIds, maxGroupingLevels = 3, services: { dataViews, http, notifications }, }: GetPersistentControlsParams) => @@ -43,7 +42,7 @@ export const getPersistentControlsHook = ); const { dataView } = useAlertsDataView({ - featureIds, + ruleTypeIds, dataViewsService: dataViews, http, toasts: notifications.toasts, diff --git a/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/alert_history.tsx b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/alert_history.tsx index dfcf01e4e4c13..614a842963868 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/alert_history.tsx +++ b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/alert_history.tsx @@ -6,7 +6,6 @@ */ import React from 'react'; -import { ALERTING_FEATURE_ID } from '@kbn/alerting-plugin/common'; import { EuiPanel, EuiFlexGroup, @@ -17,12 +16,10 @@ import { EuiLoadingSpinner, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { ALERT_INSTANCE_ID, ALERT_RULE_UUID, type AlertConsumers } from '@kbn/rule-data-utils'; +import { ALERT_INSTANCE_ID, ALERT_RULE_UUID } from '@kbn/rule-data-utils'; import { useAlertsHistory } from '@kbn/observability-alert-details'; import type { Rule } from '@kbn/triggers-actions-ui-plugin/public'; import { convertTo } from '../../../../common/utils/formatters'; -import { useFetchRuleTypes } from '../../../hooks/use_fetch_rule_types'; -import { useGetFilteredRuleTypes } from '../../../hooks/use_get_filtered_rule_types'; import { useKibana } from '../../../utils/kibana_react'; import { TopAlert } from '../../..'; import { getDefaultAlertSummaryTimeRange } from '../../../utils/alert_summary_widget'; @@ -43,19 +40,11 @@ export function AlertHistoryChart({ rule, alert }: Props) { notifications, triggersActionsUi: { getAlertSummaryWidget: AlertSummaryWidget }, } = useKibana().services; + const instanceId = alert.fields[ALERT_INSTANCE_ID]; - const filteredRuleTypes = useGetFilteredRuleTypes(); - const { ruleTypes } = useFetchRuleTypes({ - filterByRuleTypeIds: filteredRuleTypes, - }); - const ruleType = ruleTypes?.find((type) => type.id === rule?.ruleTypeId); - const featureIds = - rule?.consumer === ALERTING_FEATURE_ID && ruleType?.producer - ? [ruleType.producer as AlertConsumers] - : rule - ? [rule.consumer as AlertConsumers] - : []; const ruleId = alert.fields[ALERT_RULE_UUID]; + const ruleTypeIds = [rule.ruleTypeId]; + const consumers = [rule.consumer]; const { data: { avgTimeToRecoverUS, totalTriggeredAlerts }, @@ -63,7 +52,8 @@ export function AlertHistoryChart({ rule, alert }: Props) { isError, } = useAlertsHistory({ http, - featureIds, + ruleTypeIds, + consumers, ruleId: rule.id, dateRange, instanceId, @@ -162,7 +152,8 @@ export function AlertHistoryChart({ rule, alert }: Props) { {esQuery && ( - featureIds={observabilityAlertFeatureIds} + ruleTypeIds={OBSERVABILITY_RULE_TYPE_IDS_WITH_SUPPORTED_STACK_RULE_TYPES} + consumers={observabilityAlertFeatureIds} defaultFilters={ALERT_STATUS_FILTER[alertSearchBarStateProps.status] ?? DEFAULT_FILTERS} from={alertSearchBarStateProps.rangeFrom} to={alertSearchBarStateProps.rangeTo} @@ -149,7 +153,8 @@ export function InternalRelatedAlerts({ alert }: Props) { return ( {esQuery && ( - featureIds={observabilityAlertFeatureIds} + ruleTypeIds={OBSERVABILITY_RULE_TYPE_IDS_WITH_SUPPORTED_STACK_RULE_TYPES} + consumers={observabilityAlertFeatureIds} defaultFilters={ ALERT_STATUS_FILTER[alertSearchBarStateProps.status] ?? DEFAULT_FILTERS } @@ -286,7 +291,8 @@ function InternalAlertsPage() { return ( ; ruleId: string; ruleType: any; @@ -49,7 +49,7 @@ interface Props { export function RuleDetailsTabs({ activeTabId, esQuery, - featureIds, + ruleTypeIds, rule, ruleId, ruleType, @@ -90,12 +90,13 @@ export function RuleDetailsTabs({ - {esQuery && featureIds && ( + {esQuery && ruleTypeIds && ( type.id === rule?.ruleTypeId); - const isEditable = isRuleEditable({ capabilities, rule, ruleType, ruleTypeRegistry }); - const featureIds = - rule?.consumer === ALERTING_FEATURE_ID && ruleType?.producer - ? [ruleType.producer as AlertConsumers] - : rule - ? [rule.consumer as AlertConsumers] - : []; - const ruleStatusMessage = rule?.executionStatus.error?.reason === RuleExecutionStatusErrorReasons.License ? rulesStatusesTranslationsMapping.noLicense @@ -234,7 +229,8 @@ export function RuleDetailsPage() { >; @@ -75,7 +76,8 @@ export function RulesTab({ setRefresh, stateRefresh }: RulesTabProps) { return ( ; interface PluginSetup { - alerting: PluginSetupContract; + alerting: AlertingServerSetup; features: FeaturesPluginSetup; guidedOnboarding?: GuidedOnboardingPluginSetup; ruleRegistry: RuleRegistryPluginSetupContract; @@ -74,21 +66,17 @@ interface PluginSetup { } interface PluginStart { - alerting: PluginStartContract; + alerting: AlertingServerStart; spaces?: SpacesPluginStart; dataViews: DataViewsServerPluginStart; } -const o11yRuleTypes = [ - SLO_BURN_RATE_RULE_TYPE_ID, - OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, - ES_QUERY_ID, - ML_ANOMALY_DETECTION_RULE_TYPE_ID, - METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID, - ...Object.values(ApmRuleType), - SYNTHETICS_STATUS_RULE, - SYNTHETICS_TLS_RULE, -]; +const alertingFeatures = OBSERVABILITY_RULE_TYPE_IDS_WITH_SUPPORTED_STACK_RULE_TYPES.map( + (ruleTypeId) => ({ + ruleTypeId, + consumers: [observabilityFeatureId, ALERTING_FEATURE_ID], + }) +); export class ObservabilityPlugin implements Plugin { private logger: Logger; @@ -141,7 +129,7 @@ export class ObservabilityPlugin implements Plugin { scope: [KibanaFeatureScope.Spaces, KibanaFeatureScope.Security], app: [observabilityFeatureId], catalogue: [observabilityFeatureId], - alerting: o11yRuleTypes, + alerting: alertingFeatures, privileges: { all: { app: [observabilityFeatureId], @@ -153,10 +141,10 @@ export class ObservabilityPlugin implements Plugin { }, alerting: { rule: { - all: o11yRuleTypes, + all: alertingFeatures, }, alert: { - all: o11yRuleTypes, + all: alertingFeatures, }, }, ui: ['read', 'write'], @@ -171,10 +159,10 @@ export class ObservabilityPlugin implements Plugin { }, alerting: { rule: { - read: o11yRuleTypes, + read: alertingFeatures, }, alert: { - read: o11yRuleTypes, + read: alertingFeatures, }, }, ui: ['read'], diff --git a/x-pack/plugins/observability_solution/observability/server/routes/register_routes.ts b/x-pack/plugins/observability_solution/observability/server/routes/register_routes.ts index 9ce2d7c9f1829..e10ce506bc99a 100644 --- a/x-pack/plugins/observability_solution/observability/server/routes/register_routes.ts +++ b/x-pack/plugins/observability_solution/observability/server/routes/register_routes.ts @@ -30,7 +30,7 @@ export interface RegisterRoutesDependencies { assistant: { alertDetailsContextualInsightsService: AlertDetailsContextualInsightsService; }; - getRulesClientWithRequest: (request: KibanaRequest) => RulesClientApi; + getRulesClientWithRequest: (request: KibanaRequest) => Promise; } export function registerRoutes({ repository, core, logger, dependencies }: RegisterRoutes) { diff --git a/x-pack/plugins/observability_solution/observability/server/ui_settings.ts b/x-pack/plugins/observability_solution/observability/server/ui_settings.ts index 1a387f24fbaed..e5695a3c9034d 100644 --- a/x-pack/plugins/observability_solution/observability/server/ui_settings.ts +++ b/x-pack/plugins/observability_solution/observability/server/ui_settings.ts @@ -504,7 +504,7 @@ export const uiSettings: Record = { value: 1.7, description: i18n.translate('xpack.observability.profilingDatacenterPUEUiSettingDescription', { defaultMessage: `Data center power usage effectiveness (PUE) measures how efficiently a data center uses energy. Defaults to 1.7, the average on-premise data center PUE according to the Uptime Institute survey - + You can also use the PUE that corresponds with your cloud provider: '
        • AWS: 1.135
        • @@ -622,8 +622,8 @@ export const uiSettings: Record = { description: i18n.translate( 'xpack.observability.advancedSettings.searchExcludedDataTiersDesc', { - defaultMessage: `{technicalPreviewLabel} Specify the data tiers to exclude from search, such as data_cold and/or data_frozen. - When configured, indices allocated in the selected tiers will be ignored from search requests. Affected apps: APM`, + defaultMessage: `{technicalPreviewLabel} Specify the data tiers to exclude from search, such as data_cold and/or data_frozen. + When configured, indices allocated in the selected tiers will be ignored from search requests. Affected apps: APM, Infrastructure`, values: { technicalPreviewLabel: `[${technicalPreviewLabel}]` }, } ), diff --git a/x-pack/plugins/observability_solution/observability/tsconfig.json b/x-pack/plugins/observability_solution/observability/tsconfig.json index b3c18dc24b8e0..1d88901626da2 100644 --- a/x-pack/plugins/observability_solution/observability/tsconfig.json +++ b/x-pack/plugins/observability_solution/observability/tsconfig.json @@ -111,7 +111,8 @@ "@kbn/core-ui-settings-server-mocks", "@kbn/es-types", "@kbn/logging-mocks", - "@kbn/streams-plugin", + "@kbn/response-ops-rule-form", + "@kbn/streams-plugin" ], "exclude": ["target/**/*"] } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/analytics/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/analytics/index.ts index 049c5a1e65fb0..422ef625cdc64 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/analytics/index.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/analytics/index.ts @@ -10,10 +10,16 @@ import { AssistantScope } from '@kbn/ai-assistant-common'; import type { Message } from '../../common'; import { chatFeedbackEventSchema, ChatFeedback } from './schemas/chat_feedback'; import { insightFeedbackEventSchema, InsightFeedback } from './schemas/insight_feedback'; +import { insightResponseEventSchema, InsightResponse } from './schemas/insight_response'; import { userSentPromptEventSchema } from './schemas/user_sent_prompt'; import { ObservabilityAIAssistantTelemetryEventType } from './telemetry_event_type'; -const schemas = [chatFeedbackEventSchema, insightFeedbackEventSchema, userSentPromptEventSchema]; +const schemas = [ + chatFeedbackEventSchema, + insightFeedbackEventSchema, + userSentPromptEventSchema, + insightResponseEventSchema, +]; export type TelemetryEventTypeWithPayload = | { type: ObservabilityAIAssistantTelemetryEventType.ChatFeedback; payload: ChatFeedback } @@ -21,6 +27,10 @@ export type TelemetryEventTypeWithPayload = | { type: ObservabilityAIAssistantTelemetryEventType.UserSentPromptInChat; payload: Message & { scopes: AssistantScope[] }; + } + | { + type: ObservabilityAIAssistantTelemetryEventType.InsightResponse; + payload: InsightResponse; }; export const registerTelemetryEventTypes = (analytics: AnalyticsServiceSetup) => { diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/analytics/schemas/insight_response.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/analytics/schemas/insight_response.ts new file mode 100644 index 0000000000000..e46eabf7316c0 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/analytics/schemas/insight_response.ts @@ -0,0 +1,25 @@ +/* + * 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 { EventTypeOpts } from '@kbn/core/public'; +import { ObservabilityAIAssistantTelemetryEventType } from '../telemetry_event_type'; + +export interface InsightResponse { + '@timestamp': string; +} + +export const insightResponseEventSchema: EventTypeOpts = { + eventType: ObservabilityAIAssistantTelemetryEventType.InsightResponse, + schema: { + '@timestamp': { + type: 'text', + _meta: { + description: 'The timestamp of the last response from the LLM.', + }, + }, + }, +}; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/analytics/telemetry_event_type.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/analytics/telemetry_event_type.ts index e15ae317a7730..17f9c1d53acde 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/analytics/telemetry_event_type.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/analytics/telemetry_event_type.ts @@ -9,4 +9,5 @@ export enum ObservabilityAIAssistantTelemetryEventType { ChatFeedback = 'observability_ai_assistant_chat_feedback', InsightFeedback = 'observability_ai_assistant_insight_feedback', UserSentPromptInChat = 'observability_ai_assistant_user_sent_prompt_in_chat', + InsightResponse = 'observability_ai_assistant_insight_response', } 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 e5168470be8f1..680a92f559f0a 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 @@ -81,6 +81,17 @@ function ChatContent({ next(initialMessagesRef.current); }, [next]); + useEffect(() => { + if (state !== ChatState.Loading && lastAssistantResponse) { + chatService.sendAnalyticsEvent({ + type: ObservabilityAIAssistantTelemetryEventType.InsightResponse, + payload: { + '@timestamp': lastAssistantResponse['@timestamp'], + }, + }); + } + }, [state, lastAssistantResponse, chatService]); + return ( <> { - this.logger.error(`Failed to register migrate knowledge base entries task: ${error}`); + config: this.config, + }).catch((e) => { + this.logger.error(`Knowledge base migration was not successfully: ${e.message}`); }); service.register(registerFunctions); 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 e80e6fa156b06..5ef72dc8e7b56 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 @@ -126,8 +126,10 @@ async function initializeChatRequest({ const chatRoute = createObservabilityAIAssistantServerRoute({ endpoint: 'POST /internal/observability_ai_assistant/chat', - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, params: t.type({ body: t.intersection([ @@ -174,8 +176,10 @@ const chatRoute = createObservabilityAIAssistantServerRoute({ const chatRecallRoute = createObservabilityAIAssistantServerRoute({ endpoint: 'POST /internal/observability_ai_assistant/chat/recall', - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, params: t.type({ body: t.type({ @@ -282,8 +286,10 @@ async function chatComplete( const chatCompleteRoute = createObservabilityAIAssistantServerRoute({ endpoint: 'POST /internal/observability_ai_assistant/chat/complete', - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, params: chatCompleteInternalRt, handler: async (resources): Promise => { @@ -293,8 +299,10 @@ const chatCompleteRoute = createObservabilityAIAssistantServerRoute({ const publicChatCompleteRoute = createObservabilityAIAssistantServerRoute({ endpoint: 'POST /api/observability_ai_assistant/chat/complete 2023-10-31', - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, params: chatCompletePublicRt, handler: async (resources): Promise => { diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/connectors/route.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/connectors/route.ts index 24d63d3f7fa06..80bc877e6f5f9 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/connectors/route.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/connectors/route.ts @@ -10,8 +10,10 @@ import { createObservabilityAIAssistantServerRoute } from '../create_observabili const listConnectorsRoute = createObservabilityAIAssistantServerRoute({ endpoint: 'GET /internal/observability_ai_assistant/connectors', - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, handler: async (resources): Promise => { const { request, plugins } = resources; 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 7e59be004cac9..e320376bc7357 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 @@ -17,8 +17,10 @@ const getConversationRoute = createObservabilityAIAssistantServerRoute({ conversationId: t.string, }), }), - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, handler: async (resources): Promise => { const { service, request, params } = resources; @@ -40,8 +42,10 @@ const findConversationsRoute = createObservabilityAIAssistantServerRoute({ query: t.string, }), }), - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, handler: async (resources): Promise<{ conversations: Conversation[] }> => { const { service, request, params } = resources; @@ -63,8 +67,10 @@ const createConversationRoute = createObservabilityAIAssistantServerRoute({ conversation: conversationCreateRt, }), }), - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, handler: async (resources): Promise => { const { service, request, params } = resources; @@ -89,8 +95,10 @@ const updateConversationRoute = createObservabilityAIAssistantServerRoute({ conversation: conversationUpdateRt, }), }), - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, handler: async (resources): Promise => { const { service, request, params } = resources; @@ -115,8 +123,10 @@ const updateConversationTitle = createObservabilityAIAssistantServerRoute({ title: t.string, }), }), - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, handler: async (resources): Promise => { const { service, request, params } = resources; @@ -143,8 +153,10 @@ const deleteConversationRoute = createObservabilityAIAssistantServerRoute({ conversationId: t.string, }), }), - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, handler: async (resources): Promise => { const { service, request, params } = resources; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/functions/route.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/functions/route.ts index 1571487765c09..c5f571769dfb6 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/functions/route.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/functions/route.ts @@ -22,8 +22,10 @@ const getFunctionsRoute = createObservabilityAIAssistantServerRoute({ scopes: t.union([t.array(assistantScopeType), assistantScopeType]), }), }), - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, handler: async ( resources @@ -97,8 +99,10 @@ const functionRecallRoute = createObservabilityAIAssistantServerRoute({ }), ]), }), - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, handler: async ( resources @@ -132,8 +136,10 @@ const functionSummariseRoute = createObservabilityAIAssistantServerRoute({ labels: t.record(t.string, t.string), }), }), - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, handler: async (resources): Promise => { const client = await resources.service.getClient({ request: resources.request }); diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/knowledge_base/route.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/knowledge_base/route.ts index 50ce85e3578e9..4ff94393bc525 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/knowledge_base/route.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/knowledge_base/route.ts @@ -20,8 +20,10 @@ import { Instruction, KnowledgeBaseEntry, KnowledgeBaseEntryRole } from '../../. const getKnowledgeBaseStatus = createObservabilityAIAssistantServerRoute({ endpoint: 'GET /internal/observability_ai_assistant/kb/status', - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, handler: async ({ service, @@ -54,11 +56,15 @@ const setupKnowledgeBase = createObservabilityAIAssistantServerRoute({ }), }), options: { - tags: ['access:ai_assistant'], timeout: { idleSocket: moment.duration(20, 'minutes').asMilliseconds(), }, }, + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, + }, handler: async (resources): Promise => { const client = await resources.service.getClient({ request: resources.request }); @@ -74,8 +80,10 @@ const setupKnowledgeBase = createObservabilityAIAssistantServerRoute({ const resetKnowledgeBase = createObservabilityAIAssistantServerRoute({ endpoint: 'POST /internal/observability_ai_assistant/kb/reset', - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, handler: async (resources): Promise<{ result: string }> => { const client = await resources.service.getClient({ request: resources.request }); @@ -92,8 +100,10 @@ const resetKnowledgeBase = createObservabilityAIAssistantServerRoute({ const semanticTextMigrationKnowledgeBase = createObservabilityAIAssistantServerRoute({ endpoint: 'POST /internal/observability_ai_assistant/kb/semantic_text_migration', - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, handler: async (resources): Promise => { const client = await resources.service.getClient({ request: resources.request }); @@ -108,8 +118,10 @@ const semanticTextMigrationKnowledgeBase = createObservabilityAIAssistantServerR const getKnowledgeBaseUserInstructions = createObservabilityAIAssistantServerRoute({ endpoint: 'GET /internal/observability_ai_assistant/kb/user_instructions', - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, handler: async ( resources @@ -133,12 +145,14 @@ const saveKnowledgeBaseUserInstruction = createObservabilityAIAssistantServerRou params: t.type({ body: t.type({ id: t.string, - text: nonEmptyStringRt, + text: t.string, public: toBooleanRt, }), }), - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, handler: async (resources): Promise => { const client = await resources.service.getClient({ request: resources.request }); @@ -156,8 +170,10 @@ const saveKnowledgeBaseUserInstruction = createObservabilityAIAssistantServerRou const getKnowledgeBaseEntries = createObservabilityAIAssistantServerRoute({ endpoint: 'GET /internal/observability_ai_assistant/kb/entries', - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, params: t.type({ query: t.type({ @@ -207,8 +223,10 @@ const saveKnowledgeBaseEntry = createObservabilityAIAssistantServerRoute({ params: t.type({ body: knowledgeBaseEntryRt, }), - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, handler: async (resources): Promise => { const client = await resources.service.getClient({ request: resources.request }); @@ -238,8 +256,10 @@ const deleteKnowledgeBaseEntry = createObservabilityAIAssistantServerRoute({ entryId: t.string, }), }), - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, handler: async (resources): Promise => { const client = await resources.service.getClient({ request: resources.request }); @@ -259,8 +279,10 @@ const importKnowledgeBaseEntries = createObservabilityAIAssistantServerRoute({ entries: t.array(knowledgeBaseEntryRt), }), }), - options: { - tags: ['access:ai_assistant'], + security: { + authz: { + requiredPrivileges: ['ai_assistant'], + }, }, handler: async (resources): Promise => { const client = await resources.service.getClient({ request: resources.request }); diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/types.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/types.ts index 62365536f3823..38a8f0632920b 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/types.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/types.ts @@ -28,7 +28,7 @@ type ObservabilityAIAssistantRequestHandlerContextBase = CustomRequestHandlerCon // these two are here for compatibility with APM functions rac: Pick; alerting: { - getRulesClient: () => RulesClientApi; + getRulesClient: () => Promise; }; }>; @@ -85,5 +85,4 @@ export interface ObservabilityAIAssistantRouteCreateOptions { payload?: number; idleSocket?: number; }; - tags: Array<'access:ai_assistant'>; } 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 8da2a0d843b11..f6aa0dfab2726 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 @@ -5,7 +5,7 @@ * 2.0. */ import type { ActionsClient } from '@kbn/actions-plugin/server/actions_client'; -import type { ElasticsearchClient, IUiSettingsClient, Logger } from '@kbn/core/server'; +import type { CoreSetup, ElasticsearchClient, IUiSettingsClient, Logger } from '@kbn/core/server'; import type { DeeplyMockedKeys } from '@kbn/utility-types-jest'; import { waitFor } from '@testing-library/react'; import { last, merge, repeat } from 'lodash'; @@ -27,7 +27,9 @@ import { CONTEXT_FUNCTION_NAME } from '../../functions/context'; import { ChatFunctionClient } from '../chat_function_client'; import type { KnowledgeBaseService } from '../knowledge_base_service'; import { observableIntoStream } from '../util/observable_into_stream'; -import { CreateChatCompletionResponseChunk } from './adapters/process_openai_stream'; +import type { CreateChatCompletionResponseChunk } from './adapters/process_openai_stream'; +import type { ObservabilityAIAssistantConfig } from '../../config'; +import type { ObservabilityAIAssistantPluginStartDependencies } from '../../types'; type ChunkDelta = CreateChatCompletionResponseChunk['choices'][number]['delta']; @@ -177,6 +179,8 @@ describe('Observability AI Assistant client', () => { functionClientMock.getAdhocInstructions.mockReturnValue([]); return new ObservabilityAIAssistantClient({ + config: {} as ObservabilityAIAssistantConfig, + core: {} as CoreSetup, actionsClient: actionsClientMock, uiSettingsClient: uiSettingsClientMock, esClient: { 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 2bd2fdcf22462..107bed3cac7be 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 @@ -7,7 +7,7 @@ import type { SearchHit } from '@elastic/elasticsearch/lib/api/types'; import { notFound } from '@hapi/boom'; import type { ActionsClient } from '@kbn/actions-plugin/server'; -import type { ElasticsearchClient, IUiSettingsClient } from '@kbn/core/server'; +import type { CoreSetup, ElasticsearchClient, IUiSettingsClient } from '@kbn/core/server'; import type { Logger } from '@kbn/logging'; import type { PublicMethodsOf } from '@kbn/utility-types'; import { SpanKind, context } from '@opentelemetry/api'; @@ -80,13 +80,20 @@ import { LangtraceServiceProvider, withLangtraceChatCompleteSpan, } from './operators/with_langtrace_chat_complete_span'; -import { runSemanticTextKnowledgeBaseMigration } from '../task_manager_definitions/register_migrate_knowledge_base_entries_task'; +import { + runSemanticTextKnowledgeBaseMigration, + scheduleSemanticTextMigration, +} from '../task_manager_definitions/register_migrate_knowledge_base_entries_task'; +import { ObservabilityAIAssistantPluginStartDependencies } from '../../types'; +import { ObservabilityAIAssistantConfig } from '../../config'; const MAX_FUNCTION_CALLS = 8; export class ObservabilityAIAssistantClient { constructor( private readonly dependencies: { + config: ObservabilityAIAssistantConfig; + core: CoreSetup; actionsClient: PublicMethodsOf; uiSettingsClient: IUiSettingsClient; namespace: string; @@ -725,9 +732,23 @@ export class ObservabilityAIAssistantClient { return this.dependencies.knowledgeBaseService.getStatus(); }; - setupKnowledgeBase = (modelId: string | undefined) => { - const { esClient } = this.dependencies; - return this.dependencies.knowledgeBaseService.setup(esClient, modelId); + setupKnowledgeBase = async (modelId: string | undefined) => { + const { esClient, core, logger, knowledgeBaseService } = this.dependencies; + + // setup the knowledge base + const res = await knowledgeBaseService.setup(esClient, modelId); + + core + .getStartServices() + .then(([_, pluginsStart]) => { + logger.debug('Schedule semantic text migration task'); + return scheduleSemanticTextMigration(pluginsStart); + }) + .catch((error) => { + logger.error(`Failed to run semantic text migration task: ${error}`); + }); + + return res; }; resetKnowledgeBase = () => { @@ -739,6 +760,7 @@ export class ObservabilityAIAssistantClient { return runSemanticTextKnowledgeBaseMigration({ esClient: this.dependencies.esClient, logger: this.dependencies.logger, + config: this.dependencies.config, }); }; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/operators/with_langtrace_chat_complete_span.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/operators/with_langtrace_chat_complete_span.ts index 9e32ba4b57bfe..767121928622a 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/operators/with_langtrace_chat_complete_span.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/operators/with_langtrace_chat_complete_span.ts @@ -41,7 +41,10 @@ export function withLangtraceChatCompleteSpan({ 'http.max.retries': 0, // dummy URL 'url.full': 'http://localhost:3000/chat/completions', + 'url.path': '/chat/completions', 'http.timeout': 120 * 1000, + 'gen_ai.operation.name': 'chat_completion', + 'gen_ai.request.model': model, 'llm.prompts': JSON.stringify( messages.map((message) => ({ role: message.message.role, 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 9c26bebdd8388..d98799fcb63a7 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 @@ -5,22 +5,19 @@ * 2.0. */ -import type { PluginStartContract as ActionsPluginStart } from '@kbn/actions-plugin/server/plugin'; -import { createConcreteWriteIndex, getDataStreamAdapter } from '@kbn/alerting-plugin/server'; -import type { CoreSetup, CoreStart, KibanaRequest, Logger } from '@kbn/core/server'; -import type { SecurityPluginStart } from '@kbn/security-plugin/server'; +import type { CoreSetup, KibanaRequest, Logger } from '@kbn/core/server'; import { getSpaceIdFromPath } from '@kbn/spaces-plugin/common'; -import { once } from 'lodash'; import type { AssistantScope } from '@kbn/ai-assistant-common'; +import { once } from 'lodash'; +import pRetry from 'p-retry'; import { ObservabilityAIAssistantScreenContextRequest } from '../../common/types'; import type { ObservabilityAIAssistantPluginStartDependencies } from '../types'; import { ChatFunctionClient } from './chat_function_client'; import { ObservabilityAIAssistantClient } from './client'; -import { conversationComponentTemplate } from './conversation_component_template'; -import { kbComponentTemplate } from './kb_component_template'; import { KnowledgeBaseService } from './knowledge_base_service'; import type { RegistrationCallback, RespondFunctionResources } from './types'; import { ObservabilityAIAssistantConfig } from '../config'; +import { setupConversationAndKbIndexAssets } from './setup_conversation_and_kb_index_assets'; function getResourceName(resource: string) { return `.kibana-observability-ai-assistant-${resource}`; @@ -45,12 +42,15 @@ export const resourceNames = { }, }; +const createIndexAssetsOnce = once( + (logger: Logger, core: CoreSetup) => + pRetry(() => setupConversationAndKbIndexAssets({ logger, core })) +); + export class ObservabilityAIAssistantService { private readonly core: CoreSetup; private readonly logger: Logger; - private kbService?: KnowledgeBaseService; private config: ObservabilityAIAssistantConfig; - private readonly registrations: RegistrationCallback[] = []; constructor({ @@ -65,120 +65,8 @@ export class ObservabilityAIAssistantService { this.core = core; this.logger = logger; this.config = config; - - this.resetInit(); } - init = async () => {}; - - private resetInit = () => { - this.init = once(async () => { - return this.doInit().catch((error) => { - this.resetInit(); // reset the once flag if an error occurs - throw error; - }); - }); - }; - - private doInit = async () => { - try { - this.logger.debug('Setting up index assets'); - const [coreStart] = await this.core.getStartServices(); - - const { asInternalUser } = coreStart.elasticsearch.client; - - await asInternalUser.cluster.putComponentTemplate({ - create: false, - name: resourceNames.componentTemplate.conversations, - template: conversationComponentTemplate, - }); - - await asInternalUser.indices.putIndexTemplate({ - name: resourceNames.indexTemplate.conversations, - composed_of: [resourceNames.componentTemplate.conversations], - create: false, - index_patterns: [resourceNames.indexPatterns.conversations], - template: { - settings: { - number_of_shards: 1, - auto_expand_replicas: '0-1', - hidden: true, - }, - }, - }); - - const conversationAliasName = resourceNames.aliases.conversations; - - await createConcreteWriteIndex({ - esClient: asInternalUser, - logger: this.logger, - totalFieldsLimit: 10000, - indexPatterns: { - alias: conversationAliasName, - pattern: `${conversationAliasName}*`, - basePattern: `${conversationAliasName}*`, - name: `${conversationAliasName}-000001`, - template: resourceNames.indexTemplate.conversations, - }, - dataStreamAdapter: getDataStreamAdapter({ useDataStreamForAlerts: false }), - }); - - // Knowledge base: component template - await asInternalUser.cluster.putComponentTemplate({ - create: false, - name: resourceNames.componentTemplate.kb, - template: kbComponentTemplate, - }); - - // Knowledge base: index template - await asInternalUser.indices.putIndexTemplate({ - name: resourceNames.indexTemplate.kb, - composed_of: [resourceNames.componentTemplate.kb], - create: false, - index_patterns: [resourceNames.indexPatterns.kb], - template: { - settings: { - number_of_shards: 1, - auto_expand_replicas: '0-1', - hidden: true, - }, - }, - }); - - const kbAliasName = resourceNames.aliases.kb; - - // Knowledge base: write index - await createConcreteWriteIndex({ - esClient: asInternalUser, - logger: this.logger, - totalFieldsLimit: 10000, - indexPatterns: { - alias: kbAliasName, - pattern: `${kbAliasName}*`, - basePattern: `${kbAliasName}*`, - name: `${kbAliasName}-000001`, - template: resourceNames.indexTemplate.kb, - }, - dataStreamAdapter: getDataStreamAdapter({ useDataStreamForAlerts: false }), - }); - - this.kbService = new KnowledgeBaseService({ - core: this.core, - logger: this.logger.get('kb'), - config: this.config, - esClient: { - asInternalUser, - }, - }); - - this.logger.info('Successfully set up index assets'); - } catch (error) { - this.logger.error(`Failed setting up index assets: ${error.message}`); - this.logger.debug(error); - throw error; - } - }; - async getClient({ request, scopes, @@ -192,12 +80,11 @@ export class ObservabilityAIAssistantService { controller.abort(); }); - const [_, [coreStart, plugins]] = await Promise.all([ - this.init(), - this.core.getStartServices() as Promise< - [CoreStart, { security: SecurityPluginStart; actions: ActionsPluginStart }, unknown] - >, + const [[coreStart, plugins]] = await Promise.all([ + this.core.getStartServices(), + createIndexAssetsOnce(this.logger, this.core), ]); + // user will not be found when executed from system connector context const user = plugins.security.authc.getCurrentUser(request); @@ -207,12 +94,25 @@ export class ObservabilityAIAssistantService { const { spaceId } = getSpaceIdFromPath(basePath, coreStart.http.basePath.serverBasePath); + const { asInternalUser } = coreStart.elasticsearch.client; + + const kbService = new KnowledgeBaseService({ + core: this.core, + logger: this.logger.get('kb'), + config: this.config, + esClient: { + asInternalUser, + }, + }); + return new ObservabilityAIAssistantClient({ + core: this.core, + config: this.config, actionsClient: await plugins.actions.getActionsClientWithRequest(request), uiSettingsClient: coreStart.uiSettings.asScopedToClient(soClient), namespace: spaceId, esClient: { - asInternalUser: coreStart.elasticsearch.client.asInternalUser, + asInternalUser, asCurrentUser: coreStart.elasticsearch.client.asScoped(request).asCurrentUser, }, logger: this.logger, @@ -222,7 +122,7 @@ export class ObservabilityAIAssistantService { name: user.username, } : undefined, - knowledgeBaseService: this.kbService!, + knowledgeBaseService: kbService, scopes: scopes || ['all'], }); } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/inference_endpoint.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/inference_endpoint.ts index e89028652d9ac..a2993f7353c61 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/inference_endpoint.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/inference_endpoint.ts @@ -9,6 +9,7 @@ import { errors } from '@elastic/elasticsearch'; import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { Logger } from '@kbn/logging'; import moment from 'moment'; +import { ObservabilityAIAssistantConfig } from '../config'; export const AI_ASSISTANT_KB_INFERENCE_ID = 'obs_ai_assistant_kb_inference'; @@ -34,7 +35,7 @@ export async function createInferenceEndpoint({ service: 'elasticsearch', service_settings: { model_id: modelId, - adaptive_allocations: { enabled: true }, + adaptive_allocations: { enabled: true, min_number_of_allocations: 1 }, num_threads: 1, }, task_settings: {}, @@ -45,7 +46,7 @@ export async function createInferenceEndpoint({ } ); } catch (e) { - logger.error( + logger.debug( `Failed to create inference endpoint "${AI_ASSISTANT_KB_INFERENCE_ID}": ${e.message}` ); throw e; @@ -54,44 +55,30 @@ export async function createInferenceEndpoint({ export async function deleteInferenceEndpoint({ esClient, - logger, }: { esClient: { asCurrentUser: ElasticsearchClient; }; - logger: Logger; }) { - try { - const response = await esClient.asCurrentUser.inference.delete({ - inference_id: AI_ASSISTANT_KB_INFERENCE_ID, - force: true, - }); + const response = await esClient.asCurrentUser.inference.delete({ + inference_id: AI_ASSISTANT_KB_INFERENCE_ID, + force: true, + }); - return response; - } catch (e) { - logger.error(`Failed to delete inference endpoint: ${e.message}`); - throw e; - } + return response; } export async function getInferenceEndpoint({ esClient, - logger, }: { esClient: { asInternalUser: ElasticsearchClient }; - logger: Logger; }) { - try { - const response = await esClient.asInternalUser.inference.get({ - inference_id: AI_ASSISTANT_KB_INFERENCE_ID, - }); + const response = await esClient.asInternalUser.inference.get({ + inference_id: AI_ASSISTANT_KB_INFERENCE_ID, + }); - if (response.endpoints.length > 0) { - return response.endpoints[0]; - } - } catch (e) { - logger.error(`Failed to fetch inference endpoint: ${e.message}`); - throw e; + if (response.endpoints.length > 0) { + return response.endpoints[0]; } } @@ -102,3 +89,61 @@ export function isInferenceEndpointMissingOrUnavailable(error: Error) { error.body?.error?.type === 'status_exception') ); } + +export async function getElserModelStatus({ + esClient, + logger, + config, +}: { + esClient: { asInternalUser: ElasticsearchClient }; + logger: Logger; + config: ObservabilityAIAssistantConfig; +}) { + let errorMessage = ''; + const endpoint = await getInferenceEndpoint({ + esClient, + }).catch((error) => { + if (!isInferenceEndpointMissingOrUnavailable(error)) { + throw error; + } + errorMessage = error.message; + }); + + const enabled = config.enableKnowledgeBase; + if (!endpoint) { + return { ready: false, enabled, errorMessage }; + } + + const modelId = endpoint.service_settings?.model_id; + const modelStats = await esClient.asInternalUser.ml + .getTrainedModelsStats({ model_id: modelId }) + .catch((error) => { + logger.debug(`Failed to get model stats: ${error.message}`); + errorMessage = error.message; + }); + + if (!modelStats) { + return { ready: false, enabled, errorMessage }; + } + + const elserModelStats = modelStats.trained_model_stats.find( + (stats) => stats.deployment_stats?.deployment_id === AI_ASSISTANT_KB_INFERENCE_ID + ); + const deploymentState = elserModelStats?.deployment_stats?.state; + const allocationState = elserModelStats?.deployment_stats?.allocation_status.state; + const allocationCount = + elserModelStats?.deployment_stats?.allocation_status.allocation_count ?? 0; + const ready = + deploymentState === 'started' && allocationState === 'fully_allocated' && allocationCount > 0; + + return { + endpoint, + ready, + enabled, + model_stats: { + allocation_count: allocationCount, + deployment_state: deploymentState, + allocation_state: allocationState, + }, + }; +} diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/kb_component_template.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/kb_component_template.ts index 6cf89b0c9e22d..49e856db29d50 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/kb_component_template.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/kb_component_template.ts @@ -62,10 +62,6 @@ export const kbComponentTemplate: ClusterComponentTemplate['component_template'] semantic_text: { type: 'semantic_text', inference_id: AI_ASSISTANT_KB_INFERENCE_ID, - // @ts-expect-error: @elastic/elasticsearch does not have this type yet - model_settings: { - task_type: 'sparse_embedding', - }, }, 'ml.tokens': { type: 'rank_features', diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts index a98cf6f810f2c..1cf1cdc326fdf 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts @@ -20,10 +20,9 @@ import { import { getAccessQuery } from '../util/get_access_query'; import { getCategoryQuery } from '../util/get_category_query'; import { - AI_ASSISTANT_KB_INFERENCE_ID, createInferenceEndpoint, deleteInferenceEndpoint, - getInferenceEndpoint, + getElserModelStatus, isInferenceEndpointMissingOrUnavailable, } from '../inference_endpoint'; import { recallFromSearchConnectors } from './recall_from_search_connectors'; @@ -61,13 +60,13 @@ export class KnowledgeBaseService { }, modelId: string | undefined ) { - await deleteInferenceEndpoint({ esClient, logger: this.dependencies.logger }).catch((e) => {}); // ensure existing inference endpoint is deleted + await deleteInferenceEndpoint({ esClient }).catch((e) => {}); // ensure existing inference endpoint is deleted return createInferenceEndpoint({ esClient, logger: this.dependencies.logger, modelId }); } async reset(esClient: { asCurrentUser: ElasticsearchClient }) { try { - await deleteInferenceEndpoint({ esClient, logger: this.dependencies.logger }); + await deleteInferenceEndpoint({ esClient }); } catch (error) { if (isInferenceEndpointMissingOrUnavailable(error)) { return; @@ -405,7 +404,7 @@ export class KnowledgeBaseService { document: { '@timestamp': new Date().toISOString(), ...doc, - semantic_text: doc.text, + ...(doc.text ? { semantic_text: doc.text } : {}), user, namespace, }, @@ -437,58 +436,10 @@ export class KnowledgeBaseService { }; getStatus = async () => { - let errorMessage = ''; - const endpoint = await getInferenceEndpoint({ + return getElserModelStatus({ esClient: this.dependencies.esClient, logger: this.dependencies.logger, - }).catch((error) => { - if (!isInferenceEndpointMissingOrUnavailable(error)) { - throw error; - } - this.dependencies.logger.error(`Failed to get inference endpoint: ${error.message}`); - errorMessage = error.message; + config: this.dependencies.config, }); - - const enabled = this.dependencies.config.enableKnowledgeBase; - if (!endpoint) { - return { ready: false, enabled, errorMessage }; - } - - const modelId = endpoint.service_settings?.model_id; - const modelStats = await this.dependencies.esClient.asInternalUser.ml - .getTrainedModelsStats({ model_id: modelId }) - .catch((error) => { - this.dependencies.logger.error(`Failed to get model stats: ${error.message}`); - errorMessage = error.message; - }); - - if (!modelStats) { - return { ready: false, enabled, errorMessage }; - } - - const elserModelStats = modelStats.trained_model_stats.find( - (stats) => stats.deployment_stats?.deployment_id === AI_ASSISTANT_KB_INFERENCE_ID - ); - const deploymentState = elserModelStats?.deployment_stats?.state; - const allocationState = elserModelStats?.deployment_stats?.allocation_status.state; - const allocationCount = - elserModelStats?.deployment_stats?.allocation_status.allocation_count ?? 0; - const ready = - deploymentState === 'started' && allocationState === 'fully_allocated' && allocationCount > 0; - - this.dependencies.logger.debug( - `Model deployment state: ${deploymentState}, allocation state: ${allocationState}, ready: ${ready}` - ); - - return { - endpoint, - ready, - enabled, - model_stats: { - allocation_count: allocationCount, - deployment_state: deploymentState, - allocation_state: allocationState, - }, - }; }; } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/setup_conversation_and_kb_index_assets.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/setup_conversation_and_kb_index_assets.ts new file mode 100644 index 0000000000000..30d55400bbbda --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/setup_conversation_and_kb_index_assets.ts @@ -0,0 +1,108 @@ +/* + * 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 { createConcreteWriteIndex, getDataStreamAdapter } from '@kbn/alerting-plugin/server'; +import type { CoreSetup, Logger } from '@kbn/core/server'; +import type { ObservabilityAIAssistantPluginStartDependencies } from '../types'; +import { conversationComponentTemplate } from './conversation_component_template'; +import { kbComponentTemplate } from './kb_component_template'; +import { resourceNames } from '.'; + +export async function setupConversationAndKbIndexAssets({ + logger, + core, +}: { + logger: Logger; + core: CoreSetup; +}) { + try { + logger.debug('Setting up index assets'); + const [coreStart] = await core.getStartServices(); + const { asInternalUser } = coreStart.elasticsearch.client; + + // Conversations: component template + await asInternalUser.cluster.putComponentTemplate({ + create: false, + name: resourceNames.componentTemplate.conversations, + template: conversationComponentTemplate, + }); + + // Conversations: index template + await asInternalUser.indices.putIndexTemplate({ + name: resourceNames.indexTemplate.conversations, + composed_of: [resourceNames.componentTemplate.conversations], + create: false, + index_patterns: [resourceNames.indexPatterns.conversations], + template: { + settings: { + number_of_shards: 1, + auto_expand_replicas: '0-1', + hidden: true, + }, + }, + }); + + // Conversations: write index + const conversationAliasName = resourceNames.aliases.conversations; + await createConcreteWriteIndex({ + esClient: asInternalUser, + logger, + totalFieldsLimit: 10000, + indexPatterns: { + alias: conversationAliasName, + pattern: `${conversationAliasName}*`, + basePattern: `${conversationAliasName}*`, + name: `${conversationAliasName}-000001`, + template: resourceNames.indexTemplate.conversations, + }, + dataStreamAdapter: getDataStreamAdapter({ useDataStreamForAlerts: false }), + }); + + // Knowledge base: component template + await asInternalUser.cluster.putComponentTemplate({ + create: false, + name: resourceNames.componentTemplate.kb, + template: kbComponentTemplate, + }); + + // Knowledge base: index template + await asInternalUser.indices.putIndexTemplate({ + name: resourceNames.indexTemplate.kb, + composed_of: [resourceNames.componentTemplate.kb], + create: false, + index_patterns: [resourceNames.indexPatterns.kb], + template: { + settings: { + number_of_shards: 1, + auto_expand_replicas: '0-1', + hidden: true, + }, + }, + }); + + // Knowledge base: write index + const kbAliasName = resourceNames.aliases.kb; + await createConcreteWriteIndex({ + esClient: asInternalUser, + logger, + totalFieldsLimit: 10000, + indexPatterns: { + alias: kbAliasName, + pattern: `${kbAliasName}*`, + basePattern: `${kbAliasName}*`, + name: `${kbAliasName}-000001`, + template: resourceNames.indexTemplate.kb, + }, + dataStreamAdapter: getDataStreamAdapter({ useDataStreamForAlerts: false }), + }); + + logger.info('Successfully set up index assets'); + } catch (error) { + logger.error(`Failed setting up index assets: ${error.message}`); + logger.debug(error); + } +} diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/task_manager_definitions/register_migrate_knowledge_base_entries_task.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/task_manager_definitions/register_migrate_knowledge_base_entries_task.ts index 3df125ab2ba2d..b75074dc7ea54 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/task_manager_definitions/register_migrate_knowledge_base_entries_task.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/task_manager_definitions/register_migrate_knowledge_base_entries_task.ts @@ -12,8 +12,10 @@ import type { CoreSetup, Logger } from '@kbn/core/server'; import pRetry from 'p-retry'; import { KnowledgeBaseEntry } from '../../../common'; import { resourceNames } from '..'; -import { getInferenceEndpoint } from '../inference_endpoint'; +import { getElserModelStatus } from '../inference_endpoint'; import { ObservabilityAIAssistantPluginStartDependencies } from '../../types'; +import { ObservabilityAIAssistantConfig } from '../../config'; +import { setupConversationAndKbIndexAssets } from '../setup_conversation_and_kb_index_assets'; const TASK_ID = 'obs-ai-assistant:knowledge-base-migration-task-id'; const TASK_TYPE = 'obs-ai-assistant:knowledge-base-migration'; @@ -25,36 +27,66 @@ export async function registerMigrateKnowledgeBaseEntriesTask({ taskManager, logger, core, + config, }: { taskManager: TaskManagerSetupContract; logger: Logger; core: CoreSetup; + config: ObservabilityAIAssistantConfig; }) { - logger.debug(`Register task "${TASK_TYPE}"`); - const [coreStart, pluginsStart] = await core.getStartServices(); - taskManager.registerTaskDefinitions({ - [TASK_TYPE]: { - title: 'Migrate AI Assistant Knowledge Base', - description: `Migrates AI Assistant knowledge base entries`, - timeout: '1h', - maxAttempts: 5, - createTaskRunner() { - return { - async run() { - logger.debug(`Run task: "${TASK_TYPE}"`); - - const esClient = { asInternalUser: coreStart.elasticsearch.client.asInternalUser }; - await runSemanticTextKnowledgeBaseMigration({ esClient, logger }); - }, - }; + try { + logger.debug(`Register task "${TASK_TYPE}"`); + taskManager.registerTaskDefinitions({ + [TASK_TYPE]: { + title: 'Migrate AI Assistant Knowledge Base', + description: `Migrates AI Assistant knowledge base entries`, + timeout: '1h', + maxAttempts: 5, + createTaskRunner() { + return { + async run() { + logger.debug(`Run task: "${TASK_TYPE}"`); + const esClient = coreStart.elasticsearch.client; + + const hasKbIndex = await esClient.asInternalUser.indices.exists({ + index: resourceNames.aliases.kb, + }); + + if (!hasKbIndex) { + logger.debug( + 'Knowledge base index does not exist. Skipping semantic text migration.' + ); + return; + } + + // update fields and mappings + await setupConversationAndKbIndexAssets({ logger, core }); + + // run migration + await runSemanticTextKnowledgeBaseMigration({ esClient, logger, config }); + }, + }; + }, }, - }, - }); + }); + } catch (error) { + logger.error(`Failed to register task "${TASK_TYPE}". Error: ${error}`); + } + + try { + logger.debug(`Scheduled task: "${TASK_TYPE}"`); + await scheduleSemanticTextMigration(pluginsStart); + } catch (error) { + logger.error(`Failed to schedule task "${TASK_TYPE}". Error: ${error}`); + } +} - logger.debug(`Scheduled task: "${TASK_TYPE}"`); - await pluginsStart.taskManager.ensureScheduled({ +export function scheduleSemanticTextMigration( + pluginsStart: ObservabilityAIAssistantPluginStartDependencies +) { + return pluginsStart.taskManager.ensureScheduled({ id: TASK_ID, taskType: TASK_TYPE, scope: ['aiAssistant'], @@ -66,9 +98,11 @@ export async function registerMigrateKnowledgeBaseEntriesTask({ export async function runSemanticTextKnowledgeBaseMigration({ esClient, logger, + config, }: { esClient: { asInternalUser: ElasticsearchClient }; logger: Logger; + config: ObservabilityAIAssistantConfig; }) { logger.debug('Knowledge base migration: Running migration'); @@ -98,7 +132,7 @@ export async function runSemanticTextKnowledgeBaseMigration({ logger.debug(`Knowledge base migration: Found ${response.hits.hits.length} entries to migrate`); - await waitForInferenceEndpoint({ esClient, logger }); + await waitForModel({ esClient, logger, config }); // Limit the number of concurrent requests to avoid overloading the cluster const limiter = pLimit(10); @@ -109,6 +143,7 @@ export async function runSemanticTextKnowledgeBaseMigration({ } return esClient.asInternalUser.update({ + refresh: 'wait_for', index: resourceNames.aliases.kb, id: hit._id, body: { @@ -123,27 +158,29 @@ export async function runSemanticTextKnowledgeBaseMigration({ await Promise.all(promises); logger.debug(`Knowledge base migration: Migrated ${promises.length} entries`); - await runSemanticTextKnowledgeBaseMigration({ esClient, logger }); + await runSemanticTextKnowledgeBaseMigration({ esClient, logger, config }); } catch (e) { - logger.error('Knowledge base migration: Failed to migrate entries'); - logger.error(e); + logger.error(`Knowledge base migration failed: ${e.message}`); } } -async function waitForInferenceEndpoint({ +async function waitForModel({ esClient, logger, + config, }: { esClient: { asInternalUser: ElasticsearchClient }; logger: Logger; + config: ObservabilityAIAssistantConfig; }) { return pRetry( async () => { - const endpoint = await getInferenceEndpoint({ esClient, logger }); - if (!endpoint) { - throw new Error('Inference endpoint not yet ready'); + const { ready } = await getElserModelStatus({ esClient, logger, config }); + if (!ready) { + logger.debug('Elser model is not yet ready. Retrying...'); + throw new Error('Elser model is not yet ready'); } }, - { retries: 20, factor: 2 } + { retries: 30, factor: 2, maxTimeout: 30_000 } ); } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/eventsource_stream_into_observable.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/eventsource_stream_into_observable.ts index 5ff332128f8ac..b2426d8e4eb5d 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/eventsource_stream_into_observable.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/eventsource_stream_into_observable.ts @@ -14,10 +14,10 @@ import { Observable } from 'rxjs'; export function eventsourceStreamIntoObservable(readable: Readable) { return new Observable((subscriber) => { - const parser = createParser((event) => { - if (event.type === 'event') { + const parser = createParser({ + onEvent: (event) => { subscriber.next(event.data); - } + }, }); async function processStream() { diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/get_access_query.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/get_access_query.ts index 6b654731a264b..b517273630f56 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/get_access_query.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/get_access_query.ts @@ -17,12 +17,7 @@ export function getAccessQuery({ filter: [ { bool: { - should: [ - { term: { public: true } }, - ...(user - ? [{ term: user.id ? { 'user.id': user.id } : { 'user.name': user.name } }] - : []), - ], + should: [{ term: { public: true } }, ...getUserAccessFilters(user)], minimum_should_match: 1, }, }, @@ -51,3 +46,23 @@ export function getAccessQuery({ }, ]; } + +function getUserAccessFilters(user?: { name: string; id?: string }) { + if (!user) { + return []; + } + + if (user.id) { + return [ + { term: { 'user.id': user.id } }, + { + bool: { + must_not: { exists: { field: 'user.id' } }, + must: { term: { 'user.name': user.name } }, + }, + }, + ]; + } + + return [{ term: { 'user.name': user.name } }]; +} diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/types.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/types.ts index a8ab57b8ee53c..f44911c172ce4 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/types.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/types.ts @@ -22,10 +22,7 @@ import type { LicensingPluginSetup, LicensingPluginStart } from '@kbn/licensing- import type { CloudSetup, CloudStart } from '@kbn/cloud-plugin/server'; import type { ServerlessPluginSetup, ServerlessPluginStart } from '@kbn/serverless/server'; import type { RuleRegistryPluginStartContract } from '@kbn/rule-registry-plugin/server'; -import type { - PluginSetupContract as AlertingPluginSetup, - PluginStartContract as AlertingPluginStart, -} from '@kbn/alerting-plugin/server'; +import type { AlertingServerSetup, AlertingServerStart } from '@kbn/alerting-plugin/server'; import type { ObservabilityAIAssistantService } from './service'; export interface ObservabilityAIAssistantServerSetup { @@ -51,7 +48,7 @@ export interface ObservabilityAIAssistantPluginSetupDependencies { licensing: LicensingPluginSetup; cloud?: CloudSetup; serverless?: ServerlessPluginSetup; - alerting: AlertingPluginSetup; + alerting: AlertingServerSetup; } export interface ObservabilityAIAssistantPluginStartDependencies { @@ -64,5 +61,5 @@ export interface ObservabilityAIAssistantPluginStartDependencies { ruleRegistry: RuleRegistryPluginStartContract; cloud?: CloudStart; serverless?: ServerlessPluginStart; - alerting: AlertingPluginStart; + alerting: AlertingServerStart; } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/nav_control/index.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/nav_control/index.tsx index b6095ac595cea..fd198c42fda08 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/nav_control/index.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/nav_control/index.tsx @@ -6,7 +6,7 @@ */ import React, { useEffect, useRef, useState } from 'react'; import { AssistantAvatar, useAbortableAsync } from '@kbn/observability-ai-assistant-plugin/public'; -import { EuiButton, EuiLoadingSpinner, EuiToolTip } from '@elastic/eui'; +import { EuiButton, EuiButtonEmpty, EuiLoadingSpinner, EuiToolTip } from '@elastic/eui'; import { css } from '@emotion/react'; import { v4 } from 'uuid'; import useObservable from 'react-use/lib/useObservable'; @@ -24,12 +24,14 @@ interface NavControlWithProviderDeps { appService: AIAssistantAppService; coreStart: CoreStart; pluginsStart: ObservabilityAIAssistantAppPluginStartDependencies; + isServerless?: boolean; } export const NavControlWithProvider = ({ appService, coreStart, pluginsStart, + isServerless, }: NavControlWithProviderDeps) => { return ( - + ); }; -export function NavControl() { +export function NavControl({ isServerless }: { isServerless?: boolean }) { const service = useAIAssistantAppService(); const { @@ -140,22 +142,41 @@ export function NavControl() { return ( <> - { - service.conversations.openNewConversation({ - messages: [], - }); - }} - color="primary" - size="s" - fullWidth={false} - minWidth={0} - > - {chatService.loading ? : } - + {isServerless ? ( + { + service.conversations.openNewConversation({ + messages: [], + }); + }} + color="primary" + size="s" + > + {chatService.loading ? : } + + ) : ( + { + service.conversations.openNewConversation({ + messages: [], + }); + }} + color="primary" + size="s" + fullWidth={false} + minWidth={0} + > + {chatService.loading ? : } + + )} {chatService.value ? ( diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/nav_control/lazy_nav_control.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/nav_control/lazy_nav_control.tsx index adef91ceea53e..9a6fd2f30d918 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/nav_control/lazy_nav_control.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/nav_control/lazy_nav_control.tsx @@ -20,12 +20,14 @@ interface NavControlInitiatorProps { appService: AIAssistantAppService; coreStart: CoreStart; pluginsStart: ObservabilityAIAssistantAppPluginStartDependencies; + isServerless?: boolean; } export const NavControlInitiator = ({ appService, coreStart, pluginsStart, + isServerless, }: NavControlInitiatorProps) => { const { isVisible } = useIsNavControlVisible({ coreStart, pluginsStart }); @@ -38,6 +40,7 @@ export const NavControlInitiator = ({ appService={appService} coreStart={coreStart} pluginsStart={pluginsStart} + isServerless={isServerless} /> ); }; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/plugin.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/plugin.tsx index 1904eebffb2a8..cd1285b0017ce 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/plugin.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/plugin.tsx @@ -41,10 +41,13 @@ export class ObservabilityAIAssistantAppPlugin { logger: Logger; appService: AIAssistantAppService | undefined; + isServerless: boolean; constructor(context: PluginInitializerContext) { this.logger = context.logger.get(); + this.isServerless = context.env.packageInfo.buildFlavor === 'serverless'; } + setup( coreSetup: CoreSetup, _: ObservabilityAIAssistantAppPluginSetupDependencies @@ -111,6 +114,7 @@ export class ObservabilityAIAssistantAppPlugin appService={appService} coreStart={coreStart} pluginsStart={pluginsStart} + isServerless={this.isServerless} />, element, () => {} diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/functions/alerts.ts b/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/functions/alerts.ts index 682f2e2a4b19b..5408dbbf4ab4f 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/functions/alerts.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/functions/alerts.ts @@ -14,8 +14,10 @@ import { ParsedTechnicalFields } from '@kbn/rule-registry-plugin/common'; import { ALERT_STATUS, ALERT_STATUS_ACTIVE, + AlertConsumers, } from '@kbn/rule-registry-plugin/common/technical_rule_data_field_names'; import { omit } from 'lodash'; +import { OBSERVABILITY_RULE_TYPE_IDS_WITH_SUPPORTED_STACK_RULE_TYPES } from '@kbn/observability-plugin/common/constants'; import { FunctionRegistrationParameters } from '.'; const defaultFields = [ @@ -61,15 +63,6 @@ const OMITTED_ALERT_FIELDS = [ 'kibana.version', ] as const; -const DEFAULT_FEATURE_IDS = [ - 'apm', - 'infrastructure', - 'logs', - 'uptime', - 'slo', - 'observability', -] as const; - export function registerAlertsFunction({ functions, resources, @@ -183,7 +176,16 @@ export function registerAlertsFunction({ const kqlQuery = !filter ? [] : [toElasticsearchQuery(fromKueryExpression(filter))]; const response = await alertsClient.find({ - featureIds: DEFAULT_FEATURE_IDS as unknown as string[], + ruleTypeIds: OBSERVABILITY_RULE_TYPE_IDS_WITH_SUPPORTED_STACK_RULE_TYPES, + consumers: [ + AlertConsumers.APM, + AlertConsumers.INFRASTRUCTURE, + AlertConsumers.LOGS, + AlertConsumers.UPTIME, + AlertConsumers.SLO, + AlertConsumers.OBSERVABILITY, + AlertConsumers.ALERTS, + ], query: { bool: { filter: [ @@ -194,17 +196,17 @@ export function registerAlertsFunction({ lte: end, }, }, - }, - ...kqlQuery, - ...(!includeRecovered - ? [ - { - term: { - [ALERT_STATUS]: ALERT_STATUS_ACTIVE, + ...kqlQuery, + ...(!includeRecovered + ? [ + { + term: { + [ALERT_STATUS]: ALERT_STATUS_ACTIVE, + }, }, - }, - ] - : []), + ] + : []), + }, ], }, }, diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/types.ts b/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/types.ts index a1196be6a829a..0a3fc6d9dc12d 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/types.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/types.ts @@ -9,10 +9,7 @@ import type { PluginSetupContract as ActionsPluginSetup, PluginStartContract as ActionsPluginStart, } from '@kbn/actions-plugin/server'; -import type { - PluginSetupContract as AlertingPluginSetup, - PluginStartContract as AlertingPluginStart, -} from '@kbn/alerting-plugin/server'; +import type { AlertingServerSetup, AlertingServerStart } from '@kbn/alerting-plugin/server'; import type { DataViewsServerPluginSetup, DataViewsServerPluginStart, @@ -47,7 +44,7 @@ export interface ObservabilityAIAssistantAppServerSetup {} export interface ObservabilityAIAssistantAppPluginStartDependencies { observabilityAIAssistant: ObservabilityAIAssistantServerStart; ruleRegistry: RuleRegistryPluginStartContract; - alerting: AlertingPluginStart; + alerting: AlertingServerStart; licensing: LicensingPluginStart; actions: ActionsPluginStart; security: SecurityPluginStart; @@ -64,7 +61,7 @@ export interface ObservabilityAIAssistantAppPluginStartDependencies { export interface ObservabilityAIAssistantAppPluginSetupDependencies { observabilityAIAssistant: ObservabilityAIAssistantServerSetup; ruleRegistry: RuleRegistryPluginSetupContract; - alerting: AlertingPluginSetup; + alerting: AlertingServerSetup; licensing: LicensingPluginSetup; actions: ActionsPluginSetup; security: SecurityPluginSetup; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_management/public/routes/components/knowledge_base_edit_user_instruction_flyout.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_management/public/routes/components/knowledge_base_edit_user_instruction_flyout.tsx index 1c05ca6d52b3f..51801c44a6835 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_management/public/routes/components/knowledge_base_edit_user_instruction_flyout.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_management/public/routes/components/knowledge_base_edit_user_instruction_flyout.tsx @@ -31,7 +31,6 @@ export function KnowledgeBaseEditUserInstructionFlyout({ onClose }: { onClose: ( const { mutateAsync: createEntry, isLoading: isSaving } = useCreateKnowledgeBaseUserInstruction(); const [newEntryText, setNewEntryText] = useState(''); const [newEntryId, setNewEntryId] = useState(); - const isSubmitDisabled = newEntryText.trim() === ''; useEffect(() => { const userInstruction = userInstructions?.find((entry) => !entry.public); @@ -118,7 +117,6 @@ export function KnowledgeBaseEditUserInstructionFlyout({ onClose }: { onClose: ( fill isLoading={isSaving} onClick={handleSubmit} - isDisabled={isSubmitDisabled} > {i18n.translate( 'xpack.observabilityAiAssistantManagement.knowledgeBaseNewManualEntryFlyout.saveButtonLabel', diff --git a/x-pack/plugins/observability_solution/observability_logs_explorer/public/plugin.ts b/x-pack/plugins/observability_solution/observability_logs_explorer/public/plugin.ts index 2e6ab0aeeaa0f..843f21b48ad47 100644 --- a/x-pack/plugins/observability_solution/observability_logs_explorer/public/plugin.ts +++ b/x-pack/plugins/observability_solution/observability_logs_explorer/public/plugin.ts @@ -36,13 +36,10 @@ import type { export class ObservabilityLogsExplorerPlugin implements Plugin { - private config: ObservabilityLogsExplorerConfig; private locators?: ObservabilityLogsExplorerLocators; private appStateUpdater = new BehaviorSubject(() => ({})); - constructor(context: PluginInitializerContext) { - this.config = context.config.get(); - } + constructor(context: PluginInitializerContext) {} public setup( core: CoreSetup, @@ -56,9 +53,7 @@ export class ObservabilityLogsExplorerPlugin title: logsExplorerAppTitle, category: DEFAULT_APP_CATEGORIES.observability, euiIconType: 'logoLogging', - visibleIn: this.config.navigation.showAppLink - ? ['globalSearch', 'sideNav'] - : ['globalSearch'], + visibleIn: ['globalSearch'], keywords: ['logs', 'log', 'explorer', 'logs explorer'], updater$: this.appStateUpdater, mount: async (appMountParams: ObservabilityLogsExplorerAppMountParameters) => { diff --git a/x-pack/plugins/observability_solution/observability_logs_explorer/server/config.ts b/x-pack/plugins/observability_solution/observability_logs_explorer/server/config.ts index aa89b9aa273f1..bab368c0eb65c 100644 --- a/x-pack/plugins/observability_solution/observability_logs_explorer/server/config.ts +++ b/x-pack/plugins/observability_solution/observability_logs_explorer/server/config.ts @@ -25,7 +25,7 @@ export const configSchema = schema.object({ export const config: PluginConfigDescriptor = { schema: configSchema, - deprecations: ({ renameFromRoot }) => [ + deprecations: ({ renameFromRoot, unused }) => [ renameFromRoot( 'xpack.discoverLogExplorer.featureFlags.deepLinkVisible', 'xpack.observabilityLogsExplorer.navigation.showAppLink', @@ -41,6 +41,7 @@ export const config: PluginConfigDescriptor = { 'xpack.observabilityLogsExplorer.enabled', { level: 'warning' } ), + unused('navigation.showAppLink', { level: 'warning' }), ], exposeToBrowser: { navigation: { diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/firehose/use_aws_service_get_started_list.ts b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/firehose/use_aws_service_get_started_list.ts index 277c565986d3c..13273475c7697 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/firehose/use_aws_service_get_started_list.ts +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/firehose/use_aws_service_get_started_list.ts @@ -14,7 +14,7 @@ import { DISCOVER_APP_LOCATOR } from '@kbn/discover-plugin/common'; import { AWSIndexName } from '../../../../common/aws_firehose'; import { ObservabilityOnboardingContextValue } from '../../../plugin'; -interface AWSServiceGetStartedConfig { +export interface AWSServiceGetStartedConfig { id: string; indexNameList: AWSIndexName[]; title: string; diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/firehose/visualize_data.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/firehose/visualize_data.tsx index 1b6b281495971..45a2089c2d1c4 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/firehose/visualize_data.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/firehose/visualize_data.tsx @@ -9,19 +9,21 @@ import { EuiIcon, EuiSpacer, EuiText, useGeneratedHtmlId } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useEffect, useState } from 'react'; import useInterval from 'react-use/lib/useInterval'; -import { union } from 'lodash'; +import { unionBy } from 'lodash'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { FormattedMessage } from '@kbn/i18n-react'; import { ObservabilityOnboardingAppServices } from '../../..'; import { FIREHOSE_CLOUDFORMATION_STACK_NAME, FIREHOSE_LOGS_STREAM_NAME, - type AWSIndexName, } from '../../../../common/aws_firehose'; import { FETCH_STATUS, useFetcher } from '../../../hooks/use_fetcher'; import { AccordionWithIcon } from '../shared/accordion_with_icon'; import { GetStartedPanel } from '../shared/get_started_panel'; -import { useAWSServiceGetStartedList } from './use_aws_service_get_started_list'; +import { + type AWSServiceGetStartedConfig, + useAWSServiceGetStartedList, +} from './use_aws_service_get_started_list'; import { AutoRefreshCallout } from './auto_refresh_callout'; import { ProgressCallout } from './progress_callout'; import { HAS_DATA_FETCH_INTERVAL } from './utils'; @@ -36,12 +38,12 @@ interface Props { export function VisualizeData({ onboardingId, selectedCreateStackOption }: Props) { const accordionId = useGeneratedHtmlId({ prefix: 'accordion' }); - const [orderedPopulatedAWSLogsIndexList, setOrderedPopulatedAWSLogsIndexList] = useState< - AWSIndexName[] + const [orderedVisibleAWSServiceList, setOrderedVisibleAWSServiceList] = useState< + AWSServiceGetStartedConfig[] >([]); const [shouldShowDataReceivedToast, setShouldShowDataReceivedToast] = useState(true); const { - data: populatedAWSLogsIndexList, + data: populatedAWSIndexList, status, refetch, } = useFetcher((callApi) => { @@ -60,12 +62,13 @@ export function VisualizeData({ onboardingId, selectedCreateStackOption }: Props context: { cloudServiceProvider }, }, } = useKibana(); + const awsServiceGetStartedConfigList = useAWSServiceGetStartedList(); useEffect(() => { if ( shouldShowDataReceivedToast && - Array.isArray(populatedAWSLogsIndexList) && - populatedAWSLogsIndexList.length > 0 + Array.isArray(populatedAWSIndexList) && + populatedAWSIndexList.length > 0 ) { notifications?.toasts.addSuccess( { @@ -90,17 +93,27 @@ export function VisualizeData({ onboardingId, selectedCreateStackOption }: Props setShouldShowDataReceivedToast(false); } - setOrderedPopulatedAWSLogsIndexList((currentList) => + setOrderedVisibleAWSServiceList((currentList) => /** - * Using union() to ensure items in the array are unique - * add stay in the insertion order to keep the order of - * the AWS services in the UI. + * unionBy() ensures uniqueness of the resulting list + * and preserves the order of the first list passed to it, + * which in turn keeps already visible services in the UI + * in place and new services are only appended to the end. */ - union(currentList, populatedAWSLogsIndexList) + unionBy( + currentList, + awsServiceGetStartedConfigList.filter(({ indexNameList }) => + indexNameList.some((indexName) => populatedAWSIndexList?.includes(indexName)) + ), + 'id' + ) ); - }, [notifications?.toasts, populatedAWSLogsIndexList, shouldShowDataReceivedToast]); - - const awsServiceGetStartedConfigList = useAWSServiceGetStartedList(); + }, [ + awsServiceGetStartedConfigList, + notifications?.toasts, + populatedAWSIndexList, + shouldShowDataReceivedToast, + ]); useInterval(() => { if (REQUEST_PENDING_STATUS_LIST.includes(status)) { @@ -110,7 +123,7 @@ export function VisualizeData({ onboardingId, selectedCreateStackOption }: Props refetch(); }, HAS_DATA_FETCH_INTERVAL); - if (populatedAWSLogsIndexList === undefined) { + if (populatedAWSIndexList === undefined) { return null; } @@ -127,56 +140,48 @@ export function VisualizeData({ onboardingId, selectedCreateStackOption }: Props - {orderedPopulatedAWSLogsIndexList.length === 0 && } - {orderedPopulatedAWSLogsIndexList.length > 0 && } + {orderedVisibleAWSServiceList.length === 0 && } + {orderedVisibleAWSServiceList.length > 0 && }
          - {orderedPopulatedAWSLogsIndexList.map((indexName, index) => { - const getStartedConfig = awsServiceGetStartedConfigList.find(({ indexNameList }) => - indexNameList.includes(indexName) - ); - - if (!getStartedConfig) { - return null; + {orderedVisibleAWSServiceList.map( + ({ id, actionLinks, title, logoURL, previewImage }, index) => { + return ( + } + title={title} + initialIsOpen={true} + borders={ + index === 0 || index === orderedVisibleAWSServiceList.length - 1 + ? 'none' + : 'horizontal' + } + > + + + ); } - - const { id, actionLinks, title, logoURL, previewImage } = getStartedConfig; - - return ( - } - title={title} - initialIsOpen={true} - borders={ - index === 0 || index === orderedPopulatedAWSLogsIndexList.length - 1 - ? 'none' - : 'horizontal' - } - > - - - ); - })} + )}
          ); diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/shared/header_action_menu.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/shared/header_action_menu.tsx index 1864b8ced7f8b..22af649a635a5 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/shared/header_action_menu.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/shared/header_action_menu.tsx @@ -22,15 +22,14 @@ interface Props { export function ObservabilityOnboardingHeaderActionMenu({ setHeaderActionMenu, theme$ }: Props) { const { - services: { config }, + services: { context }, } = useKibana(); const location = useLocation(); const normalizedPathname = location.pathname.replace(/\/$/, ''); const isRootPage = normalizedPathname === ''; - const isServerless = config.serverless.enabled; - if (!isServerless && !isRootPage) { + if (!context.isServerless && !isRootPage) { return ( (); - const { - ui: { enabled: isObservabilityOnboardingUiEnabled }, - } = config; const isServerlessBuild = this.ctx.env.packageInfo.buildFlavor === 'serverless'; const isDevEnvironment = this.ctx.env.mode.dev; const pluginSetupDeps = plugins; - // set xpack.observability_onboarding.ui.enabled: true - // and go to /app/observabilityOnboarding - if (isObservabilityOnboardingUiEnabled) { - core.application.register({ - id: PLUGIN_ID, - title: 'Observability Onboarding', - order: 8500, - euiIconType: 'logoObservability', - category: DEFAULT_APP_CATEGORIES.observability, - keywords: [], - async mount(appMountParameters: AppMountParameters) { - // Load application bundle and Get start service - const [{ renderApp }, [coreStart, corePlugins]] = await Promise.all([ - import('./application/app'), - core.getStartServices(), - ]); + core.application.register({ + id: PLUGIN_ID, + title: 'Observability Onboarding', + order: 8500, + euiIconType: 'logoObservability', + category: DEFAULT_APP_CATEGORIES.observability, + keywords: [], + async mount(appMountParameters: AppMountParameters) { + // Load application bundle and Get start service + const [{ renderApp }, [coreStart, corePlugins]] = await Promise.all([ + import('./application/app'), + core.getStartServices(), + ]); - const { createCallApi } = await import('./services/rest/create_call_api'); + const { createCallApi } = await import('./services/rest/create_call_api'); - createCallApi(core); + createCallApi(core); - return renderApp({ - core: coreStart, - deps: pluginSetupDeps, - appMountParameters, - corePlugins: corePlugins as ObservabilityOnboardingPluginStartDeps, - config, - context: { - isDev: isDevEnvironment, - isCloud: Boolean(pluginSetupDeps.cloud?.isCloudEnabled), - isServerless: - Boolean(pluginSetupDeps.cloud?.isServerlessEnabled) || isServerlessBuild, - stackVersion, - cloudServiceProvider: pluginSetupDeps.cloud?.csp, - }, - }); - }, - visibleIn: [], - }); - } + return renderApp({ + core: coreStart, + deps: pluginSetupDeps, + appMountParameters, + corePlugins: corePlugins as ObservabilityOnboardingPluginStartDeps, + config, + context: { + isDev: isDevEnvironment, + isCloud: Boolean(pluginSetupDeps.cloud?.isCloudEnabled), + isServerless: Boolean(pluginSetupDeps.cloud?.isServerlessEnabled) || isServerlessBuild, + stackVersion, + cloudServiceProvider: pluginSetupDeps.cloud?.csp, + }, + }); + }, + visibleIn: [], + }); this.locators = { onboarding: plugins.share.url.locators.create(new ObservabilityOnboardingLocatorDefinition()), diff --git a/x-pack/plugins/observability_solution/observability_onboarding/server/config.ts b/x-pack/plugins/observability_solution/observability_onboarding/server/config.ts new file mode 100644 index 0000000000000..dcbc070e29047 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_onboarding/server/config.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 { TypeOf, offeringBasedSchema, schema } from '@kbn/config-schema'; +import { PluginConfigDescriptor } from '@kbn/core-plugins-server'; + +const configSchema = schema.object({ + ui: schema.object({ + enabled: schema.boolean({ defaultValue: true }), + }), + serverless: schema.object({ + enabled: offeringBasedSchema({ + serverless: schema.literal(true), + options: { defaultValue: schema.contextRef('serverless') }, + }), + }), +}); + +export type ObservabilityOnboardingConfig = TypeOf; + +// plugin config +export const config: PluginConfigDescriptor = { + exposeToBrowser: { + ui: true, + serverless: true, + }, + schema: configSchema, + deprecations: ({ unused }) => [ + unused('ui.enabled', { level: 'warning' }), + unused('serverless.enabled', { level: 'warning' }), + ], +}; diff --git a/x-pack/plugins/observability_solution/observability_onboarding/server/index.ts b/x-pack/plugins/observability_solution/observability_onboarding/server/index.ts index a985045d68d7a..b8675eadb3f9a 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/server/index.ts +++ b/x-pack/plugins/observability_solution/observability_onboarding/server/index.ts @@ -5,31 +5,9 @@ * 2.0. */ -import { offeringBasedSchema, schema, TypeOf } from '@kbn/config-schema'; -import { PluginConfigDescriptor, PluginInitializerContext } from '@kbn/core/server'; +import { PluginInitializerContext } from '@kbn/core/server'; -const configSchema = schema.object({ - ui: schema.object({ - enabled: schema.boolean({ defaultValue: true }), - }), - serverless: schema.object({ - enabled: offeringBasedSchema({ - serverless: schema.literal(true), - options: { defaultValue: schema.contextRef('serverless') }, - }), - }), -}); - -export type ObservabilityOnboardingConfig = TypeOf; - -// plugin config -export const config: PluginConfigDescriptor = { - exposeToBrowser: { - ui: true, - serverless: true, - }, - schema: configSchema, -}; +export { config, type ObservabilityOnboardingConfig } from './config'; export async function plugin(initializerContext: PluginInitializerContext) { const { ObservabilityOnboardingPlugin } = await import('./plugin'); diff --git a/x-pack/plugins/observability_solution/observability_onboarding/server/plugin.ts b/x-pack/plugins/observability_solution/observability_onboarding/server/plugin.ts index 30aaaf2588388..60b33eb3dd601 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/server/plugin.ts +++ b/x-pack/plugins/observability_solution/observability_onboarding/server/plugin.ts @@ -23,9 +23,9 @@ import { ObservabilityOnboardingPluginStart, ObservabilityOnboardingPluginStartDependencies, } from './types'; -import { ObservabilityOnboardingConfig } from '.'; import { observabilityOnboardingFlow } from './saved_objects/observability_onboarding_status'; import { EsLegacyConfigService } from './services/es_legacy_config_service'; +import { ObservabilityOnboardingConfig } from './config'; export class ObservabilityOnboardingPlugin implements diff --git a/x-pack/plugins/observability_solution/observability_onboarding/server/routes/types.ts b/x-pack/plugins/observability_solution/observability_onboarding/server/routes/types.ts index 689ab14739818..1d30cf05ab255 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/server/routes/types.ts +++ b/x-pack/plugins/observability_solution/observability_onboarding/server/routes/types.ts @@ -13,13 +13,13 @@ import { } from '@kbn/core/server'; import * as t from 'io-ts'; import { ObservabilityOnboardingServerRouteRepository } from '.'; -import { ObservabilityOnboardingConfig } from '..'; import { EsLegacyConfigService } from '../services/es_legacy_config_service'; import { ObservabilityOnboardingPluginSetupDependencies, ObservabilityOnboardingPluginStartDependencies, ObservabilityOnboardingRequestHandlerContext, } from '../types'; +import { ObservabilityOnboardingConfig } from '../config'; export type { ObservabilityOnboardingServerRouteRepository }; diff --git a/x-pack/plugins/observability_solution/observability_onboarding/server/test_helpers/create_observability_onboarding_users/helpers/call_kibana.ts b/x-pack/plugins/observability_solution/observability_onboarding/server/test_helpers/create_observability_onboarding_users/helpers/call_kibana.ts index 879b02f8a93c5..5f36a8a4204f2 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/server/test_helpers/create_observability_onboarding_users/helpers/call_kibana.ts +++ b/x-pack/plugins/observability_solution/observability_onboarding/server/test_helpers/create_observability_onboarding_users/helpers/call_kibana.ts @@ -24,14 +24,18 @@ export async function callKibana({ ...options, baseURL: baseUrl, auth: { username, password }, - headers: { 'kbn-xsrf': 'true', ...options.headers }, + headers: { 'kbn-xsrf': 'true', 'x-elastic-internal-origin': 'kibana', ...options.headers }, }); return data; } const getBaseUrl = once(async (kibanaHostname: string) => { try { - await axios.request({ url: kibanaHostname, maxRedirects: 0 }); + await axios.request({ + url: kibanaHostname, + maxRedirects: 0, + headers: { 'x-elastic-internal-origin': 'kibana' }, + }); } catch (e) { if (isAxiosError(e)) { const location = e.response?.headers?.location ?? ''; diff --git a/x-pack/plugins/observability_solution/observability_onboarding/tsconfig.json b/x-pack/plugins/observability_solution/observability_onboarding/tsconfig.json index 878c501a892cc..3893e1d5c6b57 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/tsconfig.json +++ b/x-pack/plugins/observability_solution/observability_onboarding/tsconfig.json @@ -42,7 +42,8 @@ "@kbn/deeplinks-analytics", "@kbn/custom-integrations-plugin", "@kbn/server-route-repository-utils", - "@kbn/core-application-browser" + "@kbn/core-application-browser", + "@kbn/core-plugins-server" ], "exclude": [ "target/**/*" diff --git a/x-pack/plugins/observability_solution/profiling/e2e/cypress/e2e/profiling_views/differential_functions.cy.ts b/x-pack/plugins/observability_solution/profiling/e2e/cypress/e2e/profiling_views/differential_functions.cy.ts index 2b6d99b0207a4..4b6a2da0c2503 100644 --- a/x-pack/plugins/observability_solution/profiling/e2e/cypress/e2e/profiling_views/differential_functions.cy.ts +++ b/x-pack/plugins/observability_solution/profiling/e2e/cypress/e2e/profiling_views/differential_functions.cy.ts @@ -26,13 +26,12 @@ describe('Differential Functions page', () => { it('shows only the baseline values when comparison data is not available', () => { cy.intercept('GET', '/internal/profiling/topn/functions?*').as('getTopNFunctions'); cy.visitKibana('/app/profiling/functions/differential', { rangeFrom, rangeTo }); - // wait for both apis to finisto move on cy.wait('@getTopNFunctions'); cy.wait('@getTopNFunctions'); [ { id: 'overallPerformance', value: '0%' }, - { id: 'annualizedCo2', value: '74.52 lbs / 33.8 kg' }, - { id: 'annualizedCost', value: '$318.32' }, + { id: 'annualizedCo2', value: '78.48 lbs / 35.6 kg' }, + { id: 'annualizedCost', value: '$335.07' }, { id: 'totalNumberOfSamples', value: '513' }, ].forEach((item) => { cy.get(`[data-test-subj="${item.id}_value"]`).contains(item.value); @@ -50,8 +49,8 @@ describe('Differential Functions page', () => { cy.wait('@getTopNFunctions'); [ { id: 'overallPerformance', value: '0%' }, - { id: 'annualizedCo2', value: '0 lbs / 0 kg', comparisonValue: '74.52 lbs / 33.8 kg' }, - { id: 'annualizedCost', value: '$0', comparisonValue: '$318.32' }, + { id: 'annualizedCo2', value: '0 lbs / 0 kg', comparisonValue: '78.48 lbs / 35.6 kg' }, + { id: 'annualizedCost', value: '$0', comparisonValue: '$335.07' }, { id: 'totalNumberOfSamples', value: '0', comparisonValue: '15,390' }, ].forEach((item) => { cy.get(`[data-test-subj="${item.id}_value"]`).contains(item.value); @@ -69,21 +68,20 @@ describe('Differential Functions page', () => { comparisonRangeFrom, comparisonRangeTo, }); - // wait for both apis to finisto move on cy.wait('@getTopNFunctions'); cy.wait('@getTopNFunctions'); [ { id: 'overallPerformance', value: '65.89%', icon: 'sortUp_success' }, { id: 'annualizedCo2', - value: '74.52 lbs / 33.8 kg', - comparisonValue: '25.35 lbs / 11.5 kg (65.98%)', + value: '78.48 lbs / 35.6 kg', + comparisonValue: '26.68 lbs / 12.1 kg (66.01%)', icon: 'comparison_sortUp_success', }, { id: 'annualizedCost', - value: '$318.32', - comparisonValue: '$108.59 (65.89%)', + value: '$335.07', + comparisonValue: '$114.3 (65.89%)', icon: 'comparison_sortUp_success', }, { @@ -109,21 +107,20 @@ describe('Differential Functions page', () => { comparisonRangeFrom: rangeFrom, comparisonRangeTo: rangeTo, }); - // wait for both apis to finisto move on cy.wait('@getTopNFunctions'); cy.wait('@getTopNFunctions'); [ { id: 'overallPerformance', value: '193.14%', icon: 'sortDown_danger' }, { id: 'annualizedCo2', - value: '25.35 lbs / 11.5 kg', - comparisonValue: '74.52 lbs / 33.8 kg (193.91%)', + value: '26.68 lbs / 12.1 kg', + comparisonValue: '78.48 lbs / 35.6 kg (194.21%)', icon: 'comparison_sortDown_danger', }, { id: 'annualizedCost', - value: '$108.59', - comparisonValue: '$318.32 (193.14%)', + value: '$114.3', + comparisonValue: '$335.07 (193.14%)', icon: 'comparison_sortDown_danger', }, { @@ -143,7 +140,6 @@ describe('Differential Functions page', () => { it('show empty summary when no data is availble', () => { cy.intercept('GET', '/internal/profiling/topn/functions?*').as('getTopNFunctions'); cy.visitKibana('/app/profiling/functions/differential'); - // wait for both apis to finisto move on cy.wait('@getTopNFunctions'); cy.wait('@getTopNFunctions'); [ diff --git a/x-pack/plugins/observability_solution/profiling/e2e/cypress/e2e/profiling_views/functions.cy.ts b/x-pack/plugins/observability_solution/profiling/e2e/cypress/e2e/profiling_views/functions.cy.ts index 0f006e80bb940..c4350f574c2a8 100644 --- a/x-pack/plugins/observability_solution/profiling/e2e/cypress/e2e/profiling_views/functions.cy.ts +++ b/x-pack/plugins/observability_solution/profiling/e2e/cypress/e2e/profiling_views/functions.cy.ts @@ -10,8 +10,7 @@ import { profilingPervCPUWattX86, } from '@kbn/observability-plugin/common'; -// Failing: See https://github.com/elastic/kibana/issues/192697 -describe.skip('Functions page', () => { +describe('Functions page', () => { const rangeFrom = '2023-04-18T00:00:00.000Z'; const rangeTo = '2023-04-18T00:00:30.000Z'; @@ -39,8 +38,8 @@ describe.skip('Functions page', () => { cy.get(firstRowSelector).eq(2).contains('vmlinux'); cy.get(firstRowSelector).eq(3).contains('5.46%'); cy.get(firstRowSelector).eq(4).contains('5.46%'); - cy.get(firstRowSelector).eq(5).contains('3.97 lbs / 1.8 kg'); - cy.get(firstRowSelector).eq(6).contains('$17.37'); + cy.get(firstRowSelector).eq(5).contains('4.19 lbs / 1.9 kg'); + cy.get(firstRowSelector).eq(6).contains('$18.29'); cy.get(firstRowSelector).eq(7).contains('28'); }); @@ -61,22 +60,22 @@ describe.skip('Functions page', () => { { parentKey: 'impactEstimates', key: 'selfCPU', value: '5.46%' }, { parentKey: 'impactEstimates', key: 'samples', value: '28' }, { parentKey: 'impactEstimates', key: 'selfSamples', value: '28' }, - { parentKey: 'impactEstimates', key: 'coreSeconds', value: '1.4 seconds' }, - { parentKey: 'impactEstimates', key: 'selfCoreSeconds', value: '1.4 seconds' }, - { parentKey: 'impactEstimates', key: 'annualizedCoreSeconds', value: '17.03 days' }, - { parentKey: 'impactEstimates', key: 'annualizedSelfCoreSeconds', value: '17.03 days' }, + { parentKey: 'impactEstimates', key: 'coreSeconds', value: '1.47 seconds' }, + { parentKey: 'impactEstimates', key: 'selfCoreSeconds', value: '1.47 seconds' }, + { parentKey: 'impactEstimates', key: 'annualizedCoreSeconds', value: '17.93 days' }, + { parentKey: 'impactEstimates', key: 'annualizedSelfCoreSeconds', value: '17.93 days' }, { parentKey: 'impactEstimates', key: 'co2Emission', value: '~0.00 lbs / ~0.00 kg' }, { parentKey: 'impactEstimates', key: 'selfCo2Emission', value: '~0.00 lbs / ~0.00 kg' }, - { parentKey: 'impactEstimates', key: 'annualizedCo2Emission', value: '3.97 lbs / 1.8 kg' }, + { parentKey: 'impactEstimates', key: 'annualizedCo2Emission', value: '4.19 lbs / 1.9 kg' }, { parentKey: 'impactEstimates', key: 'annualizedSelfCo2Emission', - value: '3.97 lbs / 1.8 kg', + value: '4.19 lbs / 1.9 kg', }, { parentKey: 'impactEstimates', key: 'dollarCost', value: '$~0.00' }, { parentKey: 'impactEstimates', key: 'selfDollarCost', value: '$~0.00' }, - { parentKey: 'impactEstimates', key: 'annualizedDollarCost', value: '$17.37' }, - { parentKey: 'impactEstimates', key: 'annualizedSelfDollarCost', value: '$17.37' }, + { parentKey: 'impactEstimates', key: 'annualizedDollarCost', value: '$18.29' }, + { parentKey: 'impactEstimates', key: 'annualizedSelfDollarCost', value: '$18.29' }, ].forEach(({ parentKey, key, value }) => { cy.get(`[data-test-subj="${parentKey}_${key}"]`).contains(value); }); @@ -93,96 +92,17 @@ describe.skip('Functions page', () => { cy.get(firstRowSelector).eq(2).contains('libjvm.so'); }); - it('Sorting grid', () => { - cy.intercept('GET', '/internal/profiling/topn/functions?*').as('getTopNFunctions'); - cy.visitKibana('/app/profiling/functions', { rangeFrom, rangeTo }); - cy.wait('@getTopNFunctions'); - [ - { - columnKey: 'rank', - columnIndex: 1, - highRank: 4481, - lowRank: 1, - highValue: 4481, - lowValue: 1, - }, - { - columnKey: 'samples', - columnIndex: 7, - highRank: 1, - lowRank: 389, - highValue: 28, - lowValue: 0, - }, - { - columnKey: 'selfCPU', - columnIndex: 3, - highRank: 1, - lowRank: 389, - highValue: '5.46%', - lowValue: '0.00%', - }, - { - columnKey: 'totalCPU', - columnIndex: 4, - highRank: 693, - lowRank: 44, - highValue: '60.43%', - lowValue: '0.19%', - }, - { - columnKey: 'annualizedCo2', - columnIndex: 5, - highRank: 693, - lowRank: 44, - highValue: '44.97 lbs / 20.4 kg', - lowValue: '0 lbs / 0 kg', - }, - { - columnKey: 'annualizedDollarCost', - columnIndex: 6, - highRank: 693, - lowRank: 44, - highValue: '$192.36', - lowValue: '$0.62', - }, - ].forEach(({ columnKey, columnIndex, highRank, highValue, lowRank, lowValue }) => { - cy.get(`[data-test-subj="dataGridHeaderCell-${columnKey}"]`).click(); - cy.contains('Sort High-Low').click(); - const firstRowSelector = '[data-grid-row-index="0"] [data-test-subj="dataGridRowCell"]'; - cy.get(firstRowSelector).eq(1).contains(highRank); - cy.get(firstRowSelector).eq(columnIndex).contains(highValue); - - cy.get(`[data-test-subj="dataGridHeaderCell-${columnKey}"]`).click(); - cy.contains('Sort Low-High').click(); - cy.get(firstRowSelector).eq(1).contains(lowRank); - if (lowValue !== undefined) { - cy.get(firstRowSelector).eq(columnIndex).contains(lowValue); - } else { - cy.get(firstRowSelector).eq(columnIndex).should('not.have.value'); - } - }); - - cy.get(`[data-test-subj="dataGridHeaderCell-frame"]`).click(); - cy.contains('Sort Z-A').click(); - const firstRowSelector = '[data-grid-row-index="0"] [data-test-subj="dataGridRowCell"]'; - cy.get(firstRowSelector).eq(1).contains('1'); - cy.get(firstRowSelector).eq(2).contains('vmlinux'); - - cy.get('[data-test-subj="dataGridHeaderCell-frame"]').click(); - cy.contains('Sort A-Z').click(); - cy.get(firstRowSelector).eq(1).contains('88'); - cy.get(firstRowSelector).eq(2).contains('/'); - }); - describe('Test changing CO2 settings', () => { - after(() => { + function resetSettings() { cy.updateAdvancedSettings({ [profilingCo2PerKWH]: 0.000379069, [profilingDatacenterPUE]: 1.7, [profilingPervCPUWattX86]: 7, }); - }); + } + beforeEach(resetSettings); + afterEach(resetSettings); + it('changes CO2 settings and validate values in the table', () => { cy.intercept('GET', '/internal/profiling/topn/functions?*').as('getTopNFunctions'); cy.visitKibana('/app/profiling/functions', { rangeFrom, rangeTo }); @@ -190,7 +110,7 @@ describe.skip('Functions page', () => { const firstRowSelector = '[data-grid-row-index="0"] [data-test-subj="dataGridRowCell"]'; cy.get(firstRowSelector).eq(1).contains('1'); cy.get(firstRowSelector).eq(2).contains('vmlinux'); - cy.get(firstRowSelector).eq(5).contains('3.97 lbs / 1.8 kg'); + cy.get(firstRowSelector).eq(5).contains('4.19 lbs / 1.9 kg'); cy.contains('Settings').click(); cy.contains('Advanced Settings'); cy.get(`[data-test-subj="management-settings-editField-${profilingCo2PerKWH}"]`) @@ -209,7 +129,7 @@ describe.skip('Functions page', () => { }); cy.go('back'); cy.wait('@getTopNFunctions'); - cy.get(firstRowSelector).eq(5).contains('1.87k lbs / 847.8 kg'); + cy.get(firstRowSelector).eq(5).contains('1.97k lbs / 892.5 kg'); const firstRowSelectorActionButton = '[data-grid-row-index="0"] [data-test-subj="dataGridRowCell"] .euiButtonIcon'; cy.get(firstRowSelectorActionButton).click(); @@ -219,12 +139,12 @@ describe.skip('Functions page', () => { { parentKey: 'impactEstimates', key: 'annualizedCo2Emission', - value: '1.87k lbs / 847.8 kg', + value: '1.97k lbs / 892.5 kg', }, { parentKey: 'impactEstimates', key: 'annualizedSelfCo2Emission', - value: '1.87k lbs / 847.8 kg', + value: '1.97k lbs / 892.5 kg', }, ].forEach(({ parentKey, key, value }) => { cy.get(`[data-test-subj="${parentKey}_${key}"]`).contains(value); diff --git a/x-pack/plugins/observability_solution/profiling/e2e/cypress/e2e/profiling_views/storage_explorer.cy.ts b/x-pack/plugins/observability_solution/profiling/e2e/cypress/e2e/profiling_views/storage_explorer.cy.ts index db752969f14dd..2efb71201301e 100644 --- a/x-pack/plugins/observability_solution/profiling/e2e/cypress/e2e/profiling_views/storage_explorer.cy.ts +++ b/x-pack/plugins/observability_solution/profiling/e2e/cypress/e2e/profiling_views/storage_explorer.cy.ts @@ -95,13 +95,16 @@ describe('Storage explorer page', () => { }); describe('Data breakdown', () => { - it('displays correct values per index', () => { + beforeEach(() => { cy.intercept('GET', '/internal/profiling/storage_explorer/indices_storage_details?*').as( 'indicesDetails' ); + }); + it('displays correct values per index', () => { cy.visitKibana('/app/profiling/storage-explorer', { rangeFrom, rangeTo }); cy.contains('Storage Explorer'); - cy.contains('Data breakdown').click(); + cy.get('[data-test-subj="storageExplorer_dataBreakdownTab"]').click(); + cy.contains('Indices breakdown'); cy.wait('@indicesDetails'); [ { indexName: 'stackframes', docSize: '7,616' }, @@ -113,40 +116,5 @@ describe('Storage explorer page', () => { cy.get(`[data-test-subj="${indexName}_docSize"]`).contains(docSize); }); }); - - it('displays top 10 indices in the table', () => { - cy.intercept('GET', '/internal/profiling/storage_explorer/indices_storage_details?*').as( - 'indicesDetails' - ); - cy.visitKibana('/app/profiling/storage-explorer', { rangeFrom, rangeTo }); - cy.contains('Storage Explorer'); - cy.contains('Data breakdown').click(); - cy.wait('@indicesDetails'); - cy.get('table > tbody tr.euiTableRow').should('have.length', 10); - }); - // Skipping it we should not rely on dom elements from third-level libraries to write our tests - it.skip('displays a chart with percentage of each index', () => { - cy.intercept('GET', '/internal/profiling/storage_explorer/indices_storage_details?*').as( - 'indicesDetails' - ); - cy.visitKibana('/app/profiling/storage-explorer', { rangeFrom, rangeTo }); - cy.contains('Storage Explorer'); - cy.contains('Data breakdown').click(); - cy.wait('@indicesDetails'); - - const indices = [ - { index: 'Stackframes', perc: '32%' }, - { index: 'Samples', perc: '15%' }, - { index: 'Executables', perc: '1%' }, - { index: 'Metrics', perc: '0%' }, - { index: 'Stacktraces', perc: '52%' }, - ]; - - cy.get('.echChartPointerContainer table tbody tr').each(($row, idx) => { - // These are no longer valid elements on charts - cy.wrap($row).find('th').contains(indices[idx].index); - cy.wrap($row).find('td').contains(indices[idx].perc); - }); - }); }); }); diff --git a/x-pack/plugins/observability_solution/profiling/public/views/storage_explorer/index.tsx b/x-pack/plugins/observability_solution/profiling/public/views/storage_explorer/index.tsx index ff111c4bebcd0..5603f19099c7e 100644 --- a/x-pack/plugins/observability_solution/profiling/public/views/storage_explorer/index.tsx +++ b/x-pack/plugins/observability_solution/profiling/public/views/storage_explorer/index.tsx @@ -97,6 +97,7 @@ export function StorageExplorerView() { { setSelectedTab('host_breakdown'); }} @@ -107,6 +108,7 @@ export function StorageExplorerView() { })} { setSelectedTab('data_breakdown'); }} diff --git a/x-pack/plugins/observability_solution/profiling/server/routes/apm.ts b/x-pack/plugins/observability_solution/profiling/server/routes/apm.ts index 4d5a7cca0ff7f..7ad001831c0e4 100644 --- a/x-pack/plugins/observability_solution/profiling/server/routes/apm.ts +++ b/x-pack/plugins/observability_solution/profiling/server/routes/apm.ts @@ -52,7 +52,9 @@ export function registerTopNFunctionsAPMTransactionsRoute({ }); } const core = await context.core; - const { transaction: transactionIndices } = await apmDataAccess.getApmIndices(); + const { transaction: transactionIndices } = await apmDataAccess.getApmIndices( + core.savedObjects.client + ); const esClient = await getClient(context); diff --git a/x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.json b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.json index b4d66229dc495..915fa9e108d4a 100644 --- a/x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.json +++ b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.json @@ -14,8 +14,12 @@ }, "servers": [ { - "url": "http://localhost:5601", - "description": "local" + "url": "https://{kibana_url}", + "variables": { + "kibana_url": { + "default": "localhost:5601" + } + } } ], "tags": [ @@ -102,12 +106,7 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] + } }, "get": { "summary": "Get a paginated list of SLOs", @@ -738,12 +737,7 @@ } } } - }, - "servers": [ - { - "url": "https://localhost:5601" - } - ] + } } } }, @@ -1653,20 +1647,25 @@ "description": "Defines properties for SLO settings.", "type": "object", "properties": { + "syncField": { + "description": "The date field that is used to identify new documents in the source. It is strongly recommended to use a field that contains the ingest timestamp. If you use a different field, you might need to set the delay such that it accounts for data transmission delays. When unspecified, we use the indicator timestamp field.", + "type": "string", + "example": "event.ingested" + }, "syncDelay": { - "description": "The synch delay to apply to the transform. Default 1m", + "description": "The time delay in minutes between the current time and the latest source data time. Increasing the value will delay any alerting. The default value is 1 minute. The minimum value is 1m and the maximum is 359m. It should always be greater then source index refresh interval.", "type": "string", "default": "1m", "example": "5m" }, "frequency": { - "description": "Configure how often the transform runs, default 1m", + "description": "The interval between checks for changes in the source data. The minimum value is 1m and the maximum is 59m. The default value is 1 minute.", "type": "string", "default": "1m", "example": "5m" }, "preventInitialBackfill": { - "description": "Prevents the transform from backfilling data when it starts.", + "description": "Start aggregating data from the time the SLO is created, instead of backfilling data from the beginning of the time window.", "type": "boolean", "default": false, "example": true diff --git a/x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml index fde29b3602be0..96d63163b1d51 100644 --- a/x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml +++ b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml @@ -9,8 +9,10 @@ info: name: Elastic License 2.0 url: https://www.elastic.co/licensing/elastic-license servers: - - url: http://localhost:5601 - description: local + - url: https://{kibana_url} + variables: + kibana_url: + default: localhost:5601 tags: - name: slo description: SLO APIs enable you to define, manage and track service-level objectives @@ -63,8 +65,6 @@ paths: application/json: schema: $ref: '#/components/schemas/409_response' - servers: - - url: https://localhost:5601 get: summary: Get a paginated list of SLOs operationId: findSlosOp @@ -448,8 +448,6 @@ paths: application/json: schema: $ref: '#/components/schemas/403_response' - servers: - - url: https://localhost:5601 components: parameters: kbn_xsrf: @@ -1139,18 +1137,22 @@ components: description: Defines properties for SLO settings. type: object properties: + syncField: + description: The date field that is used to identify new documents in the source. It is strongly recommended to use a field that contains the ingest timestamp. If you use a different field, you might need to set the delay such that it accounts for data transmission delays. When unspecified, we use the indicator timestamp field. + type: string + example: event.ingested syncDelay: - description: The synch delay to apply to the transform. Default 1m + description: The time delay in minutes between the current time and the latest source data time. Increasing the value will delay any alerting. The default value is 1 minute. The minimum value is 1m and the maximum is 359m. It should always be greater then source index refresh interval. type: string default: 1m example: 5m frequency: - description: Configure how often the transform runs, default 1m + description: The interval between checks for changes in the source data. The minimum value is 1m and the maximum is 59m. The default value is 1 minute. type: string default: 1m example: 5m preventInitialBackfill: - description: Prevents the transform from backfilling data when it starts. + description: Start aggregating data from the time the SLO is created, instead of backfilling data from the beginning of the time window. type: boolean default: false example: true diff --git a/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/settings.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/settings.yaml index a50ce0c28c136..e811e18734d51 100644 --- a/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/settings.yaml +++ b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/settings.yaml @@ -2,18 +2,22 @@ title: Settings description: Defines properties for SLO settings. type: object properties: + syncField: + description: The date field that is used to identify new documents in the source. It is strongly recommended to use a field that contains the ingest timestamp. If you use a different field, you might need to set the delay such that it accounts for data transmission delays. When unspecified, we use the indicator timestamp field. + type: string + example: 'event.ingested' syncDelay: - description: The synch delay to apply to the transform. Default 1m + description: The time delay in minutes between the current time and the latest source data time. Increasing the value will delay any alerting. The default value is 1 minute. The minimum value is 1m and the maximum is 359m. It should always be greater then source index refresh interval. type: string default: 1m example: 5m frequency: - description: Configure how often the transform runs, default 1m + description: The interval between checks for changes in the source data. The minimum value is 1m and the maximum is 59m. The default value is 1 minute. type: string default: 1m example: 5m preventInitialBackfill: - description: Prevents the transform from backfilling data when it starts. + description: Start aggregating data from the time the SLO is created, instead of backfilling data from the beginning of the time window. type: boolean default: false example: true diff --git a/x-pack/plugins/observability_solution/slo/docs/openapi/slo/entrypoint.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/entrypoint.yaml index a1f7a8739c07c..413540ecb96c6 100644 --- a/x-pack/plugins/observability_solution/slo/docs/openapi/slo/entrypoint.yaml +++ b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/entrypoint.yaml @@ -12,8 +12,10 @@ tags: - name: slo description: SLO APIs enable you to define, manage and track service-level objectives servers: - - url: "http://localhost:5601" - description: local + - url: https://{kibana_url} + variables: + kibana_url: + default: localhost:5601 paths: "/s/{spaceId}/api/observability/slos": $ref: "paths/s@{spaceid}@api@slos.yaml" @@ -31,17 +33,3 @@ paths: # $ref: "paths/s@{spaceid}@api@slos@_definitions.yaml" "/s/{spaceId}/api/observability/slos/_delete_instances": $ref: "paths/s@{spaceid}@api@slos@_delete_instances.yaml" -# Security is defined when files are joined in oas_docs -# components: -# securitySchemes: -# basicAuth: -# type: http -# scheme: basic -# apiKeyAuth: -# type: apiKey -# in: header -# name: Authorization -# description: 'e.g. Authorization: ApiKey base64AccessApiKey' -# security: -# - basicAuth: [] -# - apiKeyAuth: [] diff --git a/x-pack/plugins/observability_solution/slo/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 index ed489df00d800..68de4d633a820 100644 --- a/x-pack/plugins/observability_solution/slo/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 @@ -46,9 +46,6 @@ post: application/json: schema: $ref: '../components/schemas/409_response.yaml' - servers: - - url: https://localhost:5601 - get: summary: Get a paginated list of SLOs operationId: findSlosOp diff --git a/x-pack/plugins/observability_solution/slo/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 index 3ae6388f09d59..f7d0e3a3c884c 100644 --- a/x-pack/plugins/observability_solution/slo/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 @@ -37,5 +37,3 @@ post: application/json: schema: $ref: '../components/schemas/403_response.yaml' - servers: - - url: https://localhost:5601 diff --git a/x-pack/plugins/observability_solution/slo/kibana.jsonc b/x-pack/plugins/observability_solution/slo/kibana.jsonc index 11eca10c6c8db..1a90f45c8cd9b 100644 --- a/x-pack/plugins/observability_solution/slo/kibana.jsonc +++ b/x-pack/plugins/observability_solution/slo/kibana.jsonc @@ -44,10 +44,11 @@ "optionalPlugins": [ "cloud", "discover", + "embeddableEnhanced", "observabilityAIAssistant", + "security", "serverless", - "spaces", - "security" + "spaces" ], "requiredBundles": [ "controls", diff --git a/x-pack/plugins/observability_solution/slo/public/data/slo/slo.ts b/x-pack/plugins/observability_solution/slo/public/data/slo/slo.ts index ce50190eb7adf..0fccc4deb0f8b 100644 --- a/x-pack/plugins/observability_solution/slo/public/data/slo/slo.ts +++ b/x-pack/plugins/observability_solution/slo/public/data/slo/slo.ts @@ -39,6 +39,7 @@ const baseSlo: Omit = { good: 'http_status: 2xx', total: 'a query', timestampField: 'custom_timestamp', + dataViewId: 'some-data-view-id', }, }, timeWindow: { diff --git a/x-pack/plugins/observability_solution/slo/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 index 968d1f80a0824..9aea7b17f43f1 100644 --- a/x-pack/plugins/observability_solution/slo/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 @@ -9,7 +9,7 @@ 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 { AlertConsumers, SLO_RULE_TYPE_IDS } from '@kbn/rule-data-utils'; import { useSloAlertsQuery } from './slo_alerts_table'; import { SloEmbeddableDeps } from '../types'; @@ -61,7 +61,8 @@ export function SloAlertsSummary({ return ( { - const factory: ReactEmbeddableFactory< - SloOverviewEmbeddableState, - SloOverviewEmbeddableState, - SloOverviewApi - > = { - type: SLO_OVERVIEW_EMBEDDABLE_ID, - deserializeState: (state) => { - return state.rawState as SloOverviewEmbeddableState; - }, - buildEmbeddable: async (state, buildApi, uuid, parentApi) => { - const deps = { ...coreStart, ...pluginsStart }; - async function onEdit() { - try { - const { openSloConfiguration } = await import('./slo_overview_open_configuration'); +}): ReactEmbeddableFactory< + SloOverviewEmbeddableState, + SloOverviewEmbeddableState, + SloOverviewApi +> => ({ + type: SLO_OVERVIEW_EMBEDDABLE_ID, + deserializeState: (state) => { + return state.rawState as SloOverviewEmbeddableState; + }, + buildEmbeddable: async (state, buildApi, uuid, parentApi) => { + const deps = { ...coreStart, ...pluginsStart }; - const result = await openSloConfiguration( - coreStart, - pluginsStart, - sloClient, - api.getSloGroupOverviewConfig() - ); - api.updateSloGroupOverviewConfig(result as GroupSloCustomInput); - } catch (e) { - return Promise.reject(); - } - } - const { titlesApi, titleComparators, serializeTitles } = initializeTitles(state); - const defaultTitle$ = new BehaviorSubject(getOverviewPanelTitle()); - const sloId$ = new BehaviorSubject(state.sloId); - const sloInstanceId$ = new BehaviorSubject(state.sloInstanceId); - const showAllGroupByInstances$ = new BehaviorSubject(state.showAllGroupByInstances); - const overviewMode$ = new BehaviorSubject(state.overviewMode); - const groupFilters$ = new BehaviorSubject(state.groupFilters); - const remoteName$ = new BehaviorSubject(state.remoteName); - const reload$ = new Subject(); + const dynamicActionsApi = deps.embeddableEnhanced?.initializeReactEmbeddableDynamicActions( + uuid, + () => titlesApi.panelTitle.getValue(), + state + ); - const api = buildApi( - { - ...titlesApi, - defaultPanelTitle: defaultTitle$, - getTypeDisplayName: () => - i18n.translate('xpack.slo.editSloOverviewEmbeddableTitle.typeDisplayName', { - defaultMessage: 'criteria', - }), - isEditingEnabled: () => api.getSloGroupOverviewConfig().overviewMode === 'groups', - onEdit: async () => { - onEdit(); - }, - serializeState: () => { - return { - rawState: { - ...serializeTitles(), - sloId: sloId$.getValue(), - sloInstanceId: sloInstanceId$.getValue(), - showAllGroupByInstances: showAllGroupByInstances$.getValue(), - overviewMode: overviewMode$.getValue(), - groupFilters: groupFilters$.getValue(), - remoteName: remoteName$.getValue(), - }, - }; - }, - getSloGroupOverviewConfig: () => { - return { - groupFilters: groupFilters$.getValue(), + const maybeStopDynamicActions = dynamicActionsApi?.startDynamicActions(); + + const { titlesApi, titleComparators, serializeTitles } = initializeTitles(state); + const defaultTitle$ = new BehaviorSubject(getOverviewPanelTitle()); + const sloId$ = new BehaviorSubject(state.sloId); + const sloInstanceId$ = new BehaviorSubject(state.sloInstanceId); + const showAllGroupByInstances$ = new BehaviorSubject(state.showAllGroupByInstances); + const overviewMode$ = new BehaviorSubject(state.overviewMode); + const groupFilters$ = new BehaviorSubject(state.groupFilters); + const remoteName$ = new BehaviorSubject(state.remoteName); + const reload$ = new Subject(); + + const api = buildApi( + { + ...titlesApi, + ...(dynamicActionsApi?.dynamicActionsApi ?? {}), + supportedTriggers: () => [], + defaultPanelTitle: defaultTitle$, + getTypeDisplayName: () => + i18n.translate('xpack.slo.editSloOverviewEmbeddableTitle.typeDisplayName', { + defaultMessage: 'criteria', + }), + isEditingEnabled: () => api.getSloGroupOverviewConfig().overviewMode === 'groups', + onEdit: async function onEdit() { + try { + const { openSloConfiguration } = await import('./slo_overview_open_configuration'); + + const result = await openSloConfiguration( + coreStart, + pluginsStart, + sloClient, + api.getSloGroupOverviewConfig() + ); + api.updateSloGroupOverviewConfig(result as GroupSloCustomInput); + } catch (e) { + return Promise.reject(); + } + }, + serializeState: () => { + return { + rawState: { + ...serializeTitles(), + sloId: sloId$.getValue(), + sloInstanceId: sloInstanceId$.getValue(), + showAllGroupByInstances: showAllGroupByInstances$.getValue(), overviewMode: overviewMode$.getValue(), - }; - }, - updateSloGroupOverviewConfig: (update: GroupSloCustomInput) => { - groupFilters$.next(update.groupFilters); - }, + groupFilters: groupFilters$.getValue(), + remoteName: remoteName$.getValue(), + ...(dynamicActionsApi?.serializeDynamicActions?.() ?? {}), + }, + }; }, - { - sloId: [sloId$, (value) => sloId$.next(value)], - sloInstanceId: [sloInstanceId$, (value) => sloInstanceId$.next(value)], - groupFilters: [groupFilters$, (value) => groupFilters$.next(value)], - showAllGroupByInstances: [ - showAllGroupByInstances$, - (value) => showAllGroupByInstances$.next(value), - ], - remoteName: [remoteName$, (value) => remoteName$.next(value)], - overviewMode: [overviewMode$, (value) => overviewMode$.next(value)], - ...titleComparators, - } - ); - - const fetchSubscription = fetch$(api) - .pipe() - .subscribe((next) => { - reload$.next(next.isReload); - }); + getSloGroupOverviewConfig: () => { + return { + groupFilters: groupFilters$.getValue(), + overviewMode: overviewMode$.getValue(), + }; + }, + updateSloGroupOverviewConfig: (update: GroupSloCustomInput) => { + groupFilters$.next(update.groupFilters); + }, + }, + { + sloId: [sloId$, (value) => sloId$.next(value)], + sloInstanceId: [sloInstanceId$, (value) => sloInstanceId$.next(value)], + groupFilters: [groupFilters$, (value) => groupFilters$.next(value)], + showAllGroupByInstances: [ + showAllGroupByInstances$, + (value) => showAllGroupByInstances$.next(value), + ], + remoteName: [remoteName$, (value) => remoteName$.next(value)], + overviewMode: [overviewMode$, (value) => overviewMode$.next(value)], + ...titleComparators, + ...(dynamicActionsApi?.dynamicActionsComparator ?? { + enhancements: getUnchangingComparator(), + }), + } + ); - return { - api, - Component: () => { - const [ - sloId, - sloInstanceId, - showAllGroupByInstances, - overviewMode, - groupFilters, - remoteName, - ] = useBatchedPublishingSubjects( - sloId$, - sloInstanceId$, - showAllGroupByInstances$, - overviewMode$, - groupFilters$, - remoteName$ - ); + const fetchSubscription = fetch$(api) + .pipe() + .subscribe((next) => { + reload$.next(next.isReload); + }); - useEffect(() => { - return () => { - fetchSubscription.unsubscribe(); - }; - }, []); - const renderOverview = () => { - if (overviewMode === 'groups') { - const groupBy = groupFilters?.groupBy ?? 'status'; - const kqlQuery = groupFilters?.kqlQuery ?? ''; - const groups = groupFilters?.groups ?? []; - return ( -
          css` - width: 100%; - padding: ${euiTheme.size.xs} ${euiTheme.size.base}; - overflow: scroll; + return { + api, + Component: () => { + const [ + sloId, + sloInstanceId, + showAllGroupByInstances, + overviewMode, + groupFilters, + remoteName, + ] = useBatchedPublishingSubjects( + sloId$, + sloInstanceId$, + showAllGroupByInstances$, + overviewMode$, + groupFilters$, + remoteName$ + ); - .euiAccordion__buttonContent { - min-width: ${euiTheme.base * 6}px; - } - `} - > - - css` - margin-top: ${euiTheme.base * 1.25}px; - `} - > - - - -
          - ); - } else { - return ( - - ); - } + useEffect(() => { + return () => { + fetchSubscription.unsubscribe(); + maybeStopDynamicActions?.stopDynamicActions(); }; + }, []); + const renderOverview = () => { + if (overviewMode === 'groups') { + const groupBy = groupFilters?.groupBy ?? 'status'; + const kqlQuery = groupFilters?.kqlQuery ?? ''; + const groups = groupFilters?.groups ?? []; + return ( +
          css` + width: 100%; + padding: ${euiTheme.size.xs} ${euiTheme.size.base}; + overflow: scroll; - const queryClient = new QueryClient(); - - return ( - - - - + + css` + margin-top: ${euiTheme.base * 1.25}px; + `} > - - {showAllGroupByInstances ? ( - - ) : ( - renderOverview() - )} - - - - - - ); - }, - }; - }, - }; - return factory; -}; + + + +
          + ); + } else { + return ( + + ); + } + }; + + const queryClient = new QueryClient(); + + return ( + + + + + + {showAllGroupByInstances ? ( + + ) : ( + renderOverview() + )} + + + + + + ); + }, + }; + }, +}); diff --git a/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/types.ts b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/types.ts index 3c2866077aaa6..d79a0ecd8a4dc 100644 --- a/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/types.ts +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/types.ts @@ -4,15 +4,16 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import type { DynamicActionsSerializedState } from '@kbn/embeddable-enhanced-plugin/public/plugin'; +import { DefaultEmbeddableApi } from '@kbn/embeddable-plugin/public'; +import { Filter } from '@kbn/es-query'; +import type { EmbeddableApiContext, HasSupportedTriggers } from '@kbn/presentation-publishing'; import { - SerializedTitles, - PublishesWritablePanelTitle, - PublishesPanelTitle, HasEditCapabilities, + PublishesPanelTitle, + PublishesWritablePanelTitle, + SerializedTitles, } from '@kbn/presentation-publishing'; -import type { EmbeddableApiContext } from '@kbn/presentation-publishing'; -import { DefaultEmbeddableApi } from '@kbn/embeddable-plugin/public'; -import { Filter } from '@kbn/es-query'; export type OverviewMode = 'single' | 'groups'; export type GroupBy = 'slo.tags' | 'status' | 'slo.indicator.type'; @@ -39,6 +40,7 @@ export type GroupSloCustomInput = SloConfigurationProps & { }; export type SloOverviewEmbeddableState = SerializedTitles & + Partial & Partial & Partial; @@ -46,7 +48,8 @@ export type SloOverviewApi = DefaultEmbeddableApi & PublishesWritablePanelTitle & PublishesPanelTitle & HasSloGroupOverviewConfig & - HasEditCapabilities; + HasEditCapabilities & + HasSupportedTriggers; export interface HasSloGroupOverviewConfig { getSloGroupOverviewConfig: () => GroupSloCustomInput; diff --git a/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_active_alerts.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_active_alerts.ts index 8fa7d3ec88e91..8ca275ae78a1a 100644 --- a/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_active_alerts.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_active_alerts.ts @@ -8,7 +8,10 @@ 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 { + AlertConsumers, + SLO_RULE_TYPE_IDS, +} from '@kbn/rule-registry-plugin/common/technical_rule_data_field_names'; import { useKibana } from './use_kibana'; import { sloKeys } from './query_key_factory'; import { ActiveAlerts } from './active_alerts'; @@ -57,7 +60,8 @@ export function useFetchActiveAlerts({ try { const response = await http.post(`${BASE_RAC_ALERTS_API_PATH}/find`, { body: JSON.stringify({ - feature_ids: [AlertConsumers.SLO, AlertConsumers.OBSERVABILITY], + rule_type_ids: SLO_RULE_TYPE_IDS, + consumers: [AlertConsumers.SLO, AlertConsumers.OBSERVABILITY, AlertConsumers.ALERTS], size: 0, query: { bool: { @@ -69,11 +73,6 @@ export function useFetchActiveAlerts({ }, }, }, - { - term: { - 'kibana.alert.rule.rule_type_id': 'slo.rules.burnRate', - }, - }, { term: { 'kibana.alert.status': 'active', diff --git a/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slos_with_burn_rate_rules.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slos_with_burn_rate_rules.ts index ce1efab910723..65546a3f6c96c 100644 --- a/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slos_with_burn_rate_rules.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slos_with_burn_rate_rules.ts @@ -12,8 +12,9 @@ import { useQuery, } from '@tanstack/react-query'; import type { Rule } from '@kbn/triggers-actions-ui-plugin/public'; -import { BASE_ALERTING_API_PATH } from '@kbn/alerting-plugin/common'; +import { INTERNAL_ALERTING_API_FIND_RULES_PATH } from '@kbn/alerting-plugin/common'; import { HttpSetup } from '@kbn/core/public'; +import { SLO_RULE_TYPE_IDS } from '@kbn/rule-data-utils'; import { useKibana } from './use_kibana'; import { sloKeys } from './query_key_factory'; import { WindowSchema } from '../typings'; @@ -54,17 +55,15 @@ async function fetchRules({ http: HttpSetup; signal?: AbortSignal; }) { - const filter = 'alert.attributes.alertTypeId:slo.rules.burnRate'; - - const query = { + const body = { search, - filter, fields: ['id', 'params.windows', 'name'], per_page: 1000, + rule_type_ids: SLO_RULE_TYPE_IDS, }; - const response = await http.get(`${BASE_ALERTING_API_PATH}/rules/_find`, { - query, + const response = await http.post(INTERNAL_ALERTING_API_FIND_RULES_PATH, { + body: JSON.stringify({ ...body }), signal, }); diff --git a/x-pack/plugins/observability_solution/slo/public/locators/slo_edit.test.ts b/x-pack/plugins/observability_solution/slo/public/locators/slo_edit.test.ts index 40fcae8c840ee..55305a4a3719b 100644 --- a/x-pack/plugins/observability_solution/slo/public/locators/slo_edit.test.ts +++ b/x-pack/plugins/observability_solution/slo/public/locators/slo_edit.test.ts @@ -11,16 +11,21 @@ import { SloEditLocatorDefinition } from './slo_edit'; describe('SloEditLocator', () => { const locator = new SloEditLocatorDefinition(); - it('should return correct url when empty params are provided', async () => { + it('returns the correct url when empty params are provided', async () => { const location = await locator.getLocation({}); expect(location.app).toEqual('slo'); expect(location.path).toEqual('/create?_a=()'); }); - it('should return correct url when slo is provided', async () => { - const location = await locator.getLocation(buildSlo({ id: 'foo' })); + it('returns the correct url when slo id is provided', async () => { + const location = await locator.getLocation({ id: 'existing-slo-id' }); + expect(location.path).toEqual('/edit/existing-slo-id'); + }); + + it('returns the correct url when partial slo input is provided', async () => { + const location = await locator.getLocation(buildSlo({ id: undefined })); expect(location.path).toEqual( - "/edit/foo?_a=(budgetingMethod:occurrences,createdAt:'2022-12-29T10:11:12.000Z',description:'some%20description%20useful',enabled:!t,groupBy:'*',groupings:(),id:foo,indicator:(params:(filter:'baz:%20foo%20and%20bar%20%3E%202',good:'http_status:%202xx',index:some-index,timestampField:custom_timestamp,total:'a%20query'),type:sli.kql.custom),instanceId:'*',meta:(),name:'super%20important%20level%20service',objective:(target:0.98),revision:1,settings:(frequency:'1m',preventInitialBackfill:!f,syncDelay:'1m'),summary:(errorBudget:(consumed:0.064,initial:0.02,isEstimated:!f,remaining:0.936),fiveMinuteBurnRate:0,oneDayBurnRate:0,oneHourBurnRate:0,sliValue:0.99872,status:HEALTHY),tags:!(k8s,production,critical),timeWindow:(duration:'30d',type:rolling),updatedAt:'2022-12-29T10:11:12.000Z',version:2)" + "/create?_a=(budgetingMethod:occurrences,createdAt:'2022-12-29T10:11:12.000Z',description:'some%20description%20useful',enabled:!t,groupBy:'*',groupings:(),indicator:(params:(dataViewId:some-data-view-id,filter:'baz:%20foo%20and%20bar%20%3E%202',good:'http_status:%202xx',index:some-index,timestampField:custom_timestamp,total:'a%20query'),type:sli.kql.custom),instanceId:'*',meta:(),name:'super%20important%20level%20service',objective:(target:0.98),revision:1,settings:(frequency:'1m',preventInitialBackfill:!f,syncDelay:'1m'),summary:(errorBudget:(consumed:0.064,initial:0.02,isEstimated:!f,remaining:0.936),fiveMinuteBurnRate:0,oneDayBurnRate:0,oneHourBurnRate:0,sliValue:0.99872,status:HEALTHY),tags:!(k8s,production,critical),timeWindow:(duration:'30d',type:rolling),updatedAt:'2022-12-29T10:11:12.000Z',version:2)" ); }); }); diff --git a/x-pack/plugins/observability_solution/slo/public/locators/slo_edit.ts b/x-pack/plugins/observability_solution/slo/public/locators/slo_edit.ts index 120bc533e9eea..2233ea9c5718b 100644 --- a/x-pack/plugins/observability_solution/slo/public/locators/slo_edit.ts +++ b/x-pack/plugins/observability_solution/slo/public/locators/slo_edit.ts @@ -5,31 +5,34 @@ * 2.0. */ -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 { setStateToKbnUrl } from '@kbn/kibana-utils-plugin/public'; import { sloEditLocatorID } from '@kbn/observability-plugin/common'; -import type { CreateSLOForm } from '../pages/slo_edit/types'; +import type { LocatorDefinition } from '@kbn/share-plugin/public'; +import { CreateSLOInput } from '@kbn/slo-schema'; import { SLO_CREATE_PATH } from '../../common/locators/paths'; -export type SloEditParams = RecursivePartial; - -export interface SloEditLocatorParams extends SloEditParams, SerializableRecord {} +export type SloEditLocatorParams = RecursivePartial; export class SloEditLocatorDefinition implements LocatorDefinition { public readonly id = sloEditLocatorID; public readonly getLocation = async (slo: SloEditLocatorParams) => { + if (!!slo.id) { + return { + app: 'slo', + path: `/edit/${encodeURIComponent(slo.id)}`, + state: {}, + }; + } + return { app: 'slo', - path: setStateToKbnUrl( + path: setStateToKbnUrl>( '_a', - { - ...slo, - }, + slo, { useHash: false, storeInHashQuery: false }, - slo.id ? `/edit/${encodeURIComponent(String(slo.id))}` : `${SLO_CREATE_PATH}` + SLO_CREATE_PATH ), state: {}, }; diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/overview/overview.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/overview/overview.tsx index 34f3b0132dc8a..9a2f798ab628e 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/overview/overview.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/overview/overview.tsx @@ -8,15 +8,14 @@ import { EuiFlexGrid, EuiPanel, EuiText, useIsWithinBreakpoints } from '@elastic/eui'; import numeral from '@elastic/numeral'; import { i18n } from '@kbn/i18n'; +import { TagsList } from '@kbn/observability-shared-plugin/public'; import { + SLOWithSummaryResponse, occurrencesBudgetingMethodSchema, querySchema, rollingTimeWindowTypeSchema, - SLOWithSummaryResponse, } from '@kbn/slo-schema'; import React from 'react'; -import { TagsList } from '@kbn/observability-shared-plugin/public'; -import { DisplayQuery } from './display_query'; import { useKibana } from '../../../../hooks/use_kibana'; import { BUDGETING_METHOD_OCCURRENCES, @@ -26,9 +25,9 @@ import { toIndicatorTypeLabel, } from '../../../../utils/slo/labels'; import { ApmIndicatorOverview } from './apm_indicator_overview'; -import { SyntheticsIndicatorOverview } from './synthetics_indicator_overview'; - +import { DisplayQuery } from './display_query'; import { OverviewItem } from './overview_item'; +import { SyntheticsIndicatorOverview } from './synthetics_indicator_overview'; export interface Props { slo: SLOWithSummaryResponse; @@ -170,6 +169,19 @@ export function Overview({ slo }: Props) { } /> )} + + + ); diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/slo_detail_alerts.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/slo_detail_alerts.tsx index 3aa94c00b6441..7b31baf0d62b0 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/slo_detail_alerts.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/slo_detail_alerts.tsx @@ -6,7 +6,7 @@ */ import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import React, { Fragment } from 'react'; -import { AlertConsumers } from '@kbn/rule-data-utils'; +import { AlertConsumers, SLO_RULE_TYPE_IDS } from '@kbn/rule-data-utils'; import { ALL_VALUE, SLOWithSummaryResponse } from '@kbn/slo-schema'; import { SLO_ALERTS_TABLE_ID } from '@kbn/observability-shared-plugin/common'; @@ -32,7 +32,8 @@ export function SloDetailsAlerts({ slo }: Props) { configurationId={AlertConsumers.OBSERVABILITY} id={SLO_ALERTS_TABLE_ID} data-test-subj="alertTable" - featureIds={[AlertConsumers.SLO, AlertConsumers.OBSERVABILITY]} + ruleTypeIds={SLO_RULE_TYPE_IDS} + consumers={[AlertConsumers.SLO, AlertConsumers.ALERTS, AlertConsumers.OBSERVABILITY]} query={{ bool: { filter: [ diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/advanced_settings/advanced_settings.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/advanced_settings/advanced_settings.tsx new file mode 100644 index 0000000000000..81a630990a256 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/advanced_settings/advanced_settings.tsx @@ -0,0 +1,174 @@ +/* + * 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 { + EuiAccordion, + EuiCheckbox, + EuiFieldNumber, + EuiFlexGrid, + EuiFlexGroup, + EuiFlexItem, + EuiFormRow, + EuiIcon, + EuiIconTip, + EuiTitle, + useGeneratedHtmlId, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import React from 'react'; +import { Controller, useFormContext } from 'react-hook-form'; +import { CreateSLOForm } from '../../../types'; +import { SyncFieldSelector } from './sync_field_selector'; + +export function AdvancedSettings() { + const { control, getFieldState } = useFormContext(); + const preventBackfillCheckbox = useGeneratedHtmlId({ prefix: 'preventBackfill' }); + const advancedSettingsAccordion = useGeneratedHtmlId({ prefix: 'advancedSettingsAccordion' }); + + return ( + + + + + + + +

          + {i18n.translate('xpack.slo.sloEdit.settings.advancedSettingsLabel', { + defaultMessage: 'Advanced settings', + })} +

          +
          +
          + + } + > + + + + + + + + + {i18n.translate('xpack.slo.sloEdit.settings.syncDelay.label', { + defaultMessage: 'Sync delay (in minutes)', + })}{' '} + + + } + > + ( + onChange(event.target.value)} + /> + )} + /> + + + + + + {i18n.translate('xpack.slo.sloEdit.settings.frequency.label', { + defaultMessage: 'Frequency (in minutes)', + })}{' '} + + + } + > + ( + onChange(event.target.value)} + /> + )} + /> + + + + + + ( + + {i18n.translate('xpack.slo.sloEdit.settings.preventInitialBackfill.label', { + defaultMessage: 'Prevent initial backfill of data', + })}{' '} + + + } + checked={Boolean(field.value)} + onChange={(event: any) => onChange(event.target.checked)} + /> + )} + /> + + +
          + ); +} diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/advanced_settings/sync_field_selector.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/advanced_settings/sync_field_selector.tsx new file mode 100644 index 0000000000000..ddfb51bb28977 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/advanced_settings/sync_field_selector.tsx @@ -0,0 +1,84 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiComboBox, EuiComboBoxOptionOption, EuiFormRow, EuiIconTip } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import React from 'react'; +import { Controller, useFormContext } from 'react-hook-form'; +import { useCreateDataView } from '../../../../../hooks/use_create_data_view'; +import { createOptionsFromFields } from '../../../helpers/create_options'; +import { CreateSLOForm } from '../../../types'; +import { OptionalText } from '../../common/optional_text'; + +const placeholder = i18n.translate('xpack.slo.sloEdit.settings.syncField.placeholder', { + defaultMessage: 'Select a timestamp field', +}); + +export function SyncFieldSelector() { + const { control, watch, getFieldState } = useFormContext(); + const [index, dataViewId] = watch(['indicator.params.index', 'indicator.params.dataViewId']); + const { dataView, loading: isIndexFieldsLoading } = useCreateDataView({ + indexPatternString: index, + dataViewId, + }); + const timestampFields = dataView?.fields?.filter((field) => field.type === 'date') ?? []; + + return ( + + {i18n.translate('xpack.slo.sloEdit.settings.syncField.label', { + defaultMessage: 'Sync field', + })}{' '} + + + } + isInvalid={getFieldState('settings.syncField').invalid} + labelAppend={} + > + { + return ( + + {...field} + placeholder={placeholder} + aria-label={placeholder} + isClearable + isDisabled={isIndexFieldsLoading} + isInvalid={fieldState.invalid} + isLoading={isIndexFieldsLoading} + onChange={(selected: EuiComboBoxOptionOption[]) => { + if (selected.length) { + return field.onChange(selected[0].value); + } + + field.onChange(null); + }} + singleSelection={{ asPlainText: true }} + options={createOptionsFromFields(timestampFields)} + selectedOptions={ + !!timestampFields && !!field.value + ? [{ value: field.value, label: field.value }] + : [] + } + /> + ); + }} + /> + + ); +} diff --git a/x-pack/plugins/observability_solution/slo/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/indicator_section/apm_availability/apm_availability_indicator_type_form.stories.tsx similarity index 84% rename from x-pack/plugins/observability_solution/slo/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/indicator_section/apm_availability/apm_availability_indicator_type_form.stories.tsx index c3c506eb484eb..d40d56941ccfe 100644 --- a/x-pack/plugins/observability_solution/slo/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/indicator_section/apm_availability/apm_availability_indicator_type_form.stories.tsx @@ -9,9 +9,9 @@ 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 '../../../../../utils/kibana_react.storybook_decorator'; import { ApmAvailabilityIndicatorTypeForm as Component } from './apm_availability_indicator_type_form'; -import { SLO_EDIT_FORM_DEFAULT_VALUES } from '../../constants'; +import { SLO_EDIT_FORM_DEFAULT_VALUES } from '../../../constants'; export default { component: Component, diff --git a/x-pack/plugins/observability_solution/slo/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/indicator_section/apm_availability/apm_availability_indicator_type_form.tsx similarity index 88% rename from x-pack/plugins/observability_solution/slo/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/indicator_section/apm_availability/apm_availability_indicator_type_form.tsx index 0dcddcdb232b5..fd00e3d359530 100644 --- a/x-pack/plugins/observability_solution/slo/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/indicator_section/apm_availability/apm_availability_indicator_type_form.tsx @@ -12,14 +12,14 @@ import React from 'react'; import { useFormContext } from 'react-hook-form'; import { useApmDefaultValues } from '../apm_common/use_apm_default_values'; import { DATA_VIEW_FIELD } from '../custom_common/index_selection'; -import { useCreateDataView } from '../../../../hooks/use_create_data_view'; -import { GroupByField } from '../common/group_by_field'; -import { useFetchApmIndex } from '../../../../hooks/use_fetch_apm_indices'; -import { CreateSLOForm } from '../../types'; +import { useCreateDataView } from '../../../../../hooks/use_create_data_view'; +import { GroupByField } from '../../common/group_by_field'; +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'; -import { QueryBuilder } from '../common/query_builder'; -import { formatAllFilters } from '../../helpers/format_filters'; +import { DataPreviewChart } from '../../common/data_preview_chart'; +import { QueryBuilder } from '../../common/query_builder'; +import { formatAllFilters } from '../../../helpers/format_filters'; import { getGroupByCardinalityFilters } from '../apm_common/get_group_by_cardinality_filters'; export function ApmAvailabilityIndicatorTypeForm() { @@ -56,8 +56,8 @@ export function ApmAvailabilityIndicatorTypeForm() { }); return ( - - + + - + - + { const { watch, setValue } = useFormContext>(); diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/apm_latency/apm_latency_indicator_type_form.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/apm_latency/apm_latency_indicator_type_form.stories.tsx similarity index 84% rename from x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/apm_latency/apm_latency_indicator_type_form.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/apm_latency/apm_latency_indicator_type_form.stories.tsx index 3ca02641f9bfa..9b346c94dea9a 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/apm_latency/apm_latency_indicator_type_form.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/apm_latency/apm_latency_indicator_type_form.stories.tsx @@ -9,9 +9,9 @@ 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 '../../../../../utils/kibana_react.storybook_decorator'; import { ApmLatencyIndicatorTypeForm as Component } from './apm_latency_indicator_type_form'; -import { SLO_EDIT_FORM_DEFAULT_VALUES } from '../../constants'; +import { SLO_EDIT_FORM_DEFAULT_VALUES } from '../../../constants'; export default { component: Component, diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/apm_latency/apm_latency_indicator_type_form.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/apm_latency/apm_latency_indicator_type_form.tsx similarity index 91% rename from x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/apm_latency/apm_latency_indicator_type_form.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/apm_latency/apm_latency_indicator_type_form.tsx index 03b47aafe4150..0d7b86d0b88d3 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/apm_latency/apm_latency_indicator_type_form.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/apm_latency/apm_latency_indicator_type_form.tsx @@ -12,14 +12,14 @@ import React from 'react'; import { Controller, useFormContext } from 'react-hook-form'; import { useApmDefaultValues } from '../apm_common/use_apm_default_values'; import { DATA_VIEW_FIELD } from '../custom_common/index_selection'; -import { GroupByField } from '../common/group_by_field'; -import { useCreateDataView } from '../../../../hooks/use_create_data_view'; -import { useFetchApmIndex } from '../../../../hooks/use_fetch_apm_indices'; -import { CreateSLOForm } from '../../types'; +import { GroupByField } from '../../common/group_by_field'; +import { useCreateDataView } from '../../../../../hooks/use_create_data_view'; +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'; -import { QueryBuilder } from '../common/query_builder'; -import { formatAllFilters } from '../../helpers/format_filters'; +import { DataPreviewChart } from '../../common/data_preview_chart'; +import { QueryBuilder } from '../../common/query_builder'; +import { formatAllFilters } from '../../../helpers/format_filters'; import { getGroupByCardinalityFilters } from '../apm_common/get_group_by_cardinality_filters'; export function ApmLatencyIndicatorTypeForm() { @@ -58,8 +58,8 @@ export function ApmLatencyIndicatorTypeForm() { }); return ( - - + + - + (); const index = watch('indicator.params.index'); diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_common/index_selection.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/custom_common/index_selection.stories.tsx similarity index 84% rename from x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_common/index_selection.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/custom_common/index_selection.stories.tsx index 4b8dce62f43bb..b1739a63881f5 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_common/index_selection.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/custom_common/index_selection.stories.tsx @@ -9,9 +9,9 @@ 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 '../../../../../utils/kibana_react.storybook_decorator'; import { IndexSelection as Component } from './index_selection'; -import { SLO_EDIT_FORM_DEFAULT_VALUES } from '../../constants'; +import { SLO_EDIT_FORM_DEFAULT_VALUES } from '../../../constants'; export default { component: Component, diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_common/index_selection.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/custom_common/index_selection.tsx similarity index 63% rename from x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_common/index_selection.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/custom_common/index_selection.tsx index 146d11be84ac8..9d5489ddd283f 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_common/index_selection.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/custom_common/index_selection.tsx @@ -8,37 +8,47 @@ import { EuiFormRow } from '@elastic/eui'; import { DataView } from '@kbn/data-views-plugin/public'; import { i18n } from '@kbn/i18n'; +import { ALL_VALUE } from '@kbn/slo-schema'; +import { DataViewPicker } from '@kbn/unified-search-plugin/public'; import React, { useEffect } from 'react'; import { Controller, useFormContext } from 'react-hook-form'; -import { DataViewPicker } from '@kbn/unified-search-plugin/public'; -import { getDataViewPattern, useAdhocDataViews } from './use_adhoc_data_views'; -import { SLOPublicPluginsStart } from '../../../..'; -import { useKibana } from '../../../../hooks/use_kibana'; -import { CreateSLOForm } from '../../types'; +import { SLOPublicPluginsStart } from '../../../../..'; +import { useKibana } from '../../../../../hooks/use_kibana'; +import { CreateSLOForm } from '../../../types'; +import { getDataViewPatternOrId, useAdhocDataViews } from './use_adhoc_data_views'; const BTN_MAX_WIDTH = 515; export const DATA_VIEW_FIELD = 'indicator.params.dataViewId'; const INDEX_FIELD = 'indicator.params.index'; -const TIMESTAMP_FIELD = 'indicator.params.timestampField'; +const INDICATOR_TIMESTAMP_FIELD = 'indicator.params.timestampField'; +const GROUP_BY_FIELD = 'groupBy'; +const SETTINGS_SYNC_FIELD = 'settings.syncField'; export function IndexSelection({ selectedDataView }: { selectedDataView?: DataView }) { const { control, getFieldState, setValue, watch } = useFormContext(); - const { dataViews: dataViewsService, dataViewFieldEditor } = useKibana().services; - - const { dataViewEditor } = useKibana().services; + const { + dataViews: dataViewsService, + dataViewFieldEditor, + dataViewEditor, + } = useKibana().services; const currentIndexPattern = watch(INDEX_FIELD); const currentDataViewId = watch(DATA_VIEW_FIELD); - const { dataViewsList, isDataViewsLoading, adHocDataViews, setAdHocDataViews, refetch } = - useAdhocDataViews({ - currentIndexPattern, - }); + const { + dataViewsList, + isDataViewsLoading, + adHocDataViews, + setAdHocDataViews, + refetchDataViewsList, + } = useAdhocDataViews({ + currentIndexPattern, + }); useEffect(() => { - const indPatternId = getDataViewPattern({ - byPatten: currentIndexPattern, + const indPatternId = getDataViewPatternOrId({ + byPattern: currentIndexPattern, dataViewsList, adHocDataViews, }); @@ -54,13 +64,24 @@ export function IndexSelection({ selectedDataView }: { selectedDataView?: DataVi setValue, ]); + const updateDataViewDependantFields = (indexPattern?: string, timestampField?: string) => { + setValue(INDEX_FIELD, indexPattern ?? ''); + setValue(INDICATOR_TIMESTAMP_FIELD, timestampField ?? ''); + setValue(GROUP_BY_FIELD, ALL_VALUE); + setValue(SETTINGS_SYNC_FIELD, null); + }; + return ( - + ( { - setValue( - INDEX_FIELD, - getDataViewPattern({ byId: newId, adHocDataViews, dataViewsList })! - ); field.onChange(newId); + dataViewsService.get(newId).then((dataView) => { - if (dataView.timeFieldName) { - setValue(TIMESTAMP_FIELD, dataView.timeFieldName); - } + updateDataViewDependantFields( + getDataViewPatternOrId({ byId: newId, adHocDataViews, dataViewsList })!, + dataView.timeFieldName + ); }); }} onAddField={ @@ -97,8 +116,8 @@ export function IndexSelection({ selectedDataView }: { selectedDataView?: DataVi } currentDataViewId={ field.value ?? - getDataViewPattern({ - byPatten: currentIndexPattern, + getDataViewPatternOrId({ + byPattern: currentIndexPattern, dataViewsList, adHocDataViews, }) @@ -108,17 +127,13 @@ export function IndexSelection({ selectedDataView }: { selectedDataView?: DataVi allowAdHocDataView: true, onSave: (dataView: DataView) => { if (!dataView.isPersisted()) { - setAdHocDataViews([...adHocDataViews, dataView]); - field.onChange(dataView.id); - setValue(INDEX_FIELD, dataView.getIndexPattern()); + setAdHocDataViews((prev) => [...prev, dataView]); } else { - refetch(); - field.onChange(dataView.id); - setValue(INDEX_FIELD, dataView.getIndexPattern()); - } - if (dataView.timeFieldName) { - setValue(TIMESTAMP_FIELD, dataView.timeFieldName); + refetchDataViewsList(); } + + field.onChange(dataView.id); + updateDataViewDependantFields(dataView.getIndexPattern(), dataView.timeFieldName); }, }); }} diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_common/use_adhoc_data_views.ts b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/custom_common/use_adhoc_data_views.ts similarity index 79% rename from x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_common/use_adhoc_data_views.ts rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/custom_common/use_adhoc_data_views.ts index 67792b056408d..986b681c9bca9 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_common/use_adhoc_data_views.ts +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/custom_common/use_adhoc_data_views.ts @@ -8,16 +8,16 @@ import { useEffect, useState } from 'react'; import { DataView, DataViewListItem } from '@kbn/data-views-plugin/common'; import { useFetchDataViews } from '@kbn/observability-plugin/public'; -import { useKibana } from '../../../../hooks/use_kibana'; +import { useKibana } from '../../../../../hooks/use_kibana'; -export const getDataViewPattern = ({ +export const getDataViewPatternOrId = ({ byId, - byPatten, + byPattern, dataViewsList, adHocDataViews, }: { byId?: string; - byPatten?: string; + byPattern?: string; dataViewsList: DataViewListItem[]; adHocDataViews: DataView[]; }) => { @@ -28,20 +28,24 @@ export const getDataViewPattern = ({ if (byId) { return allDataViews.find((dv) => dv.id === byId)?.title; } - if (byPatten) { - return allDataViews.find((dv) => dv.title === byPatten)?.id; + if (byPattern) { + return allDataViews.find((dv) => dv.title === byPattern)?.id; } }; export const useAdhocDataViews = ({ currentIndexPattern }: { currentIndexPattern: string }) => { - const { isLoading: isDataViewsLoading, data: dataViewsList = [], refetch } = useFetchDataViews(); + const { + isLoading: isDataViewsLoading, + data: dataViewsList = [], + refetch: refetchDataViewsList, + } = useFetchDataViews(); const { dataViews: dataViewsService } = useKibana().services; const [adHocDataViews, setAdHocDataViews] = useState([]); useEffect(() => { if (!isDataViewsLoading) { - const missingDataView = getDataViewPattern({ - byPatten: currentIndexPattern, + const missingDataView = getDataViewPatternOrId({ + byPattern: currentIndexPattern, dataViewsList, adHocDataViews, }); @@ -70,6 +74,6 @@ export const useAdhocDataViews = ({ currentIndexPattern }: { currentIndexPattern setAdHocDataViews, dataViewsList, isDataViewsLoading, - refetch, + refetchDataViewsList, }; }; diff --git a/x-pack/plugins/observability_solution/slo/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/indicator_section/custom_kql/custom_kql_indicator_type_form.stories.tsx similarity index 84% rename from x-pack/plugins/observability_solution/slo/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/indicator_section/custom_kql/custom_kql_indicator_type_form.stories.tsx index 5eb0b68070789..1ecf3f57c1496 100644 --- a/x-pack/plugins/observability_solution/slo/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/indicator_section/custom_kql/custom_kql_indicator_type_form.stories.tsx @@ -9,9 +9,9 @@ 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 '../../../../../utils/kibana_react.storybook_decorator'; import { CustomKqlIndicatorTypeForm as Component } from './custom_kql_indicator_type_form'; -import { SLO_EDIT_FORM_DEFAULT_VALUES } from '../../constants'; +import { SLO_EDIT_FORM_DEFAULT_VALUES } from '../../../constants'; export default { component: Component, diff --git a/x-pack/plugins/observability_solution/slo/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/indicator_section/custom_kql/custom_kql_indicator_type_form.tsx similarity index 91% rename from x-pack/plugins/observability_solution/slo/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/indicator_section/custom_kql/custom_kql_indicator_type_form.tsx index 92ba2cac50e7f..ccebca1fbb36f 100644 --- a/x-pack/plugins/observability_solution/slo/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/indicator_section/custom_kql/custom_kql_indicator_type_form.tsx @@ -9,12 +9,12 @@ import { EuiFlexGroup, EuiFlexItem, EuiIconTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { useFormContext } from 'react-hook-form'; +import { useCreateDataView } from '../../../../../hooks/use_create_data_view'; +import { CreateSLOForm } from '../../../types'; +import { DataPreviewChart } from '../../common/data_preview_chart'; +import { GroupByField } from '../../common/group_by_field'; +import { QueryBuilder } from '../../common/query_builder'; import { IndexAndTimestampField } from '../custom_common/index_and_timestamp_field'; -import { GroupByField } from '../common/group_by_field'; -import { useCreateDataView } from '../../../../hooks/use_create_data_view'; -import { CreateSLOForm } from '../../types'; -import { DataPreviewChart } from '../common/data_preview_chart'; -import { QueryBuilder } from '../common/query_builder'; import { DATA_VIEW_FIELD } from '../custom_common/index_selection'; export function CustomKqlIndicatorTypeForm() { @@ -28,7 +28,7 @@ export function CustomKqlIndicatorTypeForm() { }); return ( - + diff --git a/x-pack/plugins/observability_solution/slo/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/indicator_section/custom_metric/custom_metric_type_form.stories.tsx similarity index 89% rename from x-pack/plugins/observability_solution/slo/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/indicator_section/custom_metric/custom_metric_type_form.stories.tsx index 1abbff61a0dc8..771405a539f1b 100644 --- a/x-pack/plugins/observability_solution/slo/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/indicator_section/custom_metric/custom_metric_type_form.stories.tsx @@ -9,9 +9,9 @@ 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 '../../../../../utils/kibana_react.storybook_decorator'; import { CustomMetricIndicatorTypeForm as Component } from './custom_metric_type_form'; -import { SLO_EDIT_FORM_DEFAULT_VALUES_CUSTOM_METRIC } from '../../constants'; +import { SLO_EDIT_FORM_DEFAULT_VALUES_CUSTOM_METRIC } from '../../../constants'; export default { component: Component, diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_metric/custom_metric_type_form.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/custom_metric/custom_metric_type_form.tsx similarity index 91% rename from x-pack/plugins/observability_solution/slo/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/indicator_section/custom_metric/custom_metric_type_form.tsx index ee9bcf8d99649..365205ed6b4bf 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_metric/custom_metric_type_form.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/custom_metric/custom_metric_type_form.tsx @@ -18,11 +18,11 @@ import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; import { useFormContext } from 'react-hook-form'; import { IndexAndTimestampField } from '../custom_common/index_and_timestamp_field'; -import { GroupByField } from '../common/group_by_field'; -import { useCreateDataView } from '../../../../hooks/use_create_data_view'; -import { CreateSLOForm } from '../../types'; -import { DataPreviewChart } from '../common/data_preview_chart'; -import { QueryBuilder } from '../common/query_builder'; +import { GroupByField } from '../../common/group_by_field'; +import { useCreateDataView } from '../../../../../hooks/use_create_data_view'; +import { CreateSLOForm } from '../../../types'; +import { DataPreviewChart } from '../../common/data_preview_chart'; +import { QueryBuilder } from '../../common/query_builder'; import { DATA_VIEW_FIELD } from '../custom_common/index_selection'; import { MetricIndicator } from './metric_indicator'; @@ -55,7 +55,7 @@ export function CustomMetricIndicatorTypeForm() { - + diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_metric/metric_indicator.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/custom_metric/metric_indicator.tsx similarity index 60% rename from x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_metric/metric_indicator.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/custom_metric/metric_indicator.tsx index 03939dce314b6..519167be5db27 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_metric/metric_indicator.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/custom_metric/metric_indicator.tsx @@ -26,10 +26,10 @@ import { Controller, useFieldArray, useFormContext } from 'react-hook-form'; import { aggValueToLabel, CUSTOM_METRIC_AGGREGATION_OPTIONS, -} from '../../helpers/aggregation_options'; -import { createOptionsFromFields, Option } from '../../helpers/create_options'; -import { CreateSLOForm } from '../../types'; -import { QueryBuilder } from '../common/query_builder'; +} from '../../../helpers/aggregation_options'; +import { createOptionsFromFields, Option } from '../../../helpers/create_options'; +import { CreateSLOForm } from '../../../types'; +import { QueryBuilder } from '../../common/query_builder'; interface MetricIndicatorProps { type: 'good' | 'total'; @@ -134,95 +134,28 @@ export function MetricIndicator({ {fields?.map((metric, index, arr) => (
          - - - - - {i18n.translate('xpack.slo.sloEdit.customMetric.aggregationLabel', { - defaultMessage: 'Aggregation', - })}{' '} - {metric.name} - - } - > - ( - { - if (selected.length) { - return field.onChange(selected[0].value); - } - field.onChange(''); - }} - selectedOptions={ - !!indexPattern && - !!field.value && - CUSTOM_METRIC_AGGREGATION_OPTIONS.some((agg) => agg.value === field.value) - ? [ - { - value: field.value, - label: aggValueToLabel(field.value), - }, - ] - : [] - } - onSearchChange={(searchValue: string) => { - setAggregationOptions( - CUSTOM_METRIC_AGGREGATION_OPTIONS.filter(({ value }) => - value.includes(searchValue) - ) - ); - }} - options={aggregationOptions} - /> - )} - /> - - - {watch(`indicator.params.${type}.metrics.${index}.aggregation`) !== 'doc_count' && ( + + + - {metricLabel} {metric.name} {metricTooltip} + {i18n.translate('xpack.slo.sloEdit.customMetric.aggregationLabel', { + defaultMessage: 'Aggregation', + })}{' '} + {metric.name} } > ( metricField.name === field.value) + CUSTOM_METRIC_AGGREGATION_OPTIONS.some( + (agg) => agg.value === field.value + ) ? [ { value: field.value, - label: field.value, + label: aggValueToLabel(field.value), }, ] : [] } onSearchChange={(searchValue: string) => { - setOptions( - createOptionsFromFields(metricFields, ({ value }) => + setAggregationOptions( + CUSTOM_METRIC_AGGREGATION_OPTIONS.filter(({ value }) => value.includes(searchValue) ) ); }} - options={options} + options={aggregationOptions} /> )} /> - )} - - - + {watch(`indicator.params.${type}.metrics.${index}.aggregation`) !== 'doc_count' && ( + + + {metricLabel} {metric.name} {metricTooltip} + + } + > + ( + { + if (selected.length) { + return field.onChange(selected[0].value); + } + field.onChange(''); + }} + selectedOptions={ + !!indexPattern && + !!field.value && + metricFields.some((metricField) => metricField.name === field.value) + ? [ + { + value: field.value, + label: field.value, + }, + ] + : [] + } + onSearchChange={(searchValue: string) => { + setOptions( + createOptionsFromFields(metricFields, ({ value }) => + value.includes(searchValue) + ) + ); + }} + options={options} + /> + )} + /> + + + )} + + + + + + } + /> - - } - /> {index !== arr.length - 1 && }
          ))} diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/histogram/histogram_indicator.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/histogram/histogram_indicator.tsx similarity index 98% rename from x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/histogram/histogram_indicator.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/histogram/histogram_indicator.tsx index 009504e5e6979..3b435fa52494b 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/histogram/histogram_indicator.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/histogram/histogram_indicator.tsx @@ -19,9 +19,9 @@ import { DataView, FieldSpec } from '@kbn/data-views-plugin/common'; import { i18n } from '@kbn/i18n'; import React, { Fragment, useEffect, useState } from 'react'; import { Controller, useFormContext } from 'react-hook-form'; -import { createOptionsFromFields, Option } from '../../helpers/create_options'; -import { CreateSLOForm } from '../../types'; -import { QueryBuilder } from '../common/query_builder'; +import { createOptionsFromFields, Option } from '../../../helpers/create_options'; +import { CreateSLOForm } from '../../../types'; +import { QueryBuilder } from '../../common/query_builder'; interface HistogramIndicatorProps { type: 'good' | 'total'; diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/histogram/histogram_indicator_type_form.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/histogram/histogram_indicator_type_form.tsx similarity index 91% rename from x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/histogram/histogram_indicator_type_form.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/histogram/histogram_indicator_type_form.tsx index 6bb1918dba3c2..2e934c74d9d0e 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/histogram/histogram_indicator_type_form.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/histogram/histogram_indicator_type_form.tsx @@ -18,11 +18,11 @@ import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; import { useFormContext } from 'react-hook-form'; import { IndexAndTimestampField } from '../custom_common/index_and_timestamp_field'; -import { useCreateDataView } from '../../../../hooks/use_create_data_view'; -import { GroupByField } from '../common/group_by_field'; -import { CreateSLOForm } from '../../types'; -import { DataPreviewChart } from '../common/data_preview_chart'; -import { QueryBuilder } from '../common/query_builder'; +import { useCreateDataView } from '../../../../../hooks/use_create_data_view'; +import { GroupByField } from '../../common/group_by_field'; +import { CreateSLOForm } from '../../../types'; +import { DataPreviewChart } from '../../common/data_preview_chart'; +import { QueryBuilder } from '../../common/query_builder'; import { DATA_VIEW_FIELD } from '../custom_common/index_selection'; import { HistogramIndicator } from './histogram_indicator'; @@ -49,7 +49,7 @@ export function HistogramIndicatorTypeForm() { - + diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/synthetics_availability/synthetics_availability_indicator_type_form.test.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/synthetics_availability/synthetics_availability_indicator_type_form.test.tsx similarity index 100% rename from x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/synthetics_availability/synthetics_availability_indicator_type_form.test.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/synthetics_availability/synthetics_availability_indicator_type_form.test.tsx diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/synthetics_availability/synthetics_availability_indicator_type_form.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/synthetics_availability/synthetics_availability_indicator_type_form.tsx similarity index 93% rename from x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/synthetics_availability/synthetics_availability_indicator_type_form.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/synthetics_availability/synthetics_availability_indicator_type_form.tsx index 07f2f86663292..88dbb16d667b6 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/synthetics_availability/synthetics_availability_indicator_type_form.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/synthetics_availability/synthetics_availability_indicator_type_form.tsx @@ -17,12 +17,12 @@ import moment from 'moment'; import React, { useEffect, useState } from 'react'; import { useFormContext } from 'react-hook-form'; import { DATA_VIEW_FIELD } from '../custom_common/index_selection'; -import { useCreateDataView } from '../../../../hooks/use_create_data_view'; -import { formatAllFilters } from '../../helpers/format_filters'; -import { CreateSLOForm } from '../../types'; -import { DataPreviewChart } from '../common/data_preview_chart'; -import { GroupByCardinality } from '../common/group_by_cardinality'; -import { QueryBuilder } from '../common/query_builder'; +import { useCreateDataView } from '../../../../../hooks/use_create_data_view'; +import { formatAllFilters } from '../../../helpers/format_filters'; +import { CreateSLOForm } from '../../../types'; +import { DataPreviewChart } from '../../common/data_preview_chart'; +import { GroupByCardinality } from '../../common/group_by_cardinality'; +import { QueryBuilder } from '../../common/query_builder'; import { FieldSelector } from '../synthetics_common/field_selector'; export function SyntheticsAvailabilityIndicatorTypeForm() { @@ -74,8 +74,8 @@ export function SyntheticsAvailabilityIndicatorTypeForm() { }, [currentMonitors, setValue]); return ( - - + + - + {fields?.map((metric, index, arr) => ( - - - - - + + + - + + + + + + } + /> - - } - /> {index !== arr.length - 1 && } ))} diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/timeslice_metric/metric_input.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/timeslice_metric/metric_input.tsx similarity index 97% rename from x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/timeslice_metric/metric_input.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/timeslice_metric/metric_input.tsx index ebb539b97dab2..ef798305b20d6 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/timeslice_metric/metric_input.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/timeslice_metric/metric_input.tsx @@ -16,9 +16,9 @@ import { FieldSpec } from '@kbn/data-views-plugin/common'; import { i18n } from '@kbn/i18n'; import React, { useEffect, useState } from 'react'; import { Controller, useFormContext } from 'react-hook-form'; -import { AGGREGATION_OPTIONS, aggValueToLabel } from '../../helpers/aggregation_options'; -import { createOptionsFromFields, Option } from '../../helpers/create_options'; -import { CreateSLOForm } from '../../types'; +import { AGGREGATION_OPTIONS, aggValueToLabel } from '../../../helpers/aggregation_options'; +import { createOptionsFromFields, Option } from '../../../helpers/create_options'; +import { CreateSLOForm } from '../../../types'; const fieldLabel = i18n.translate('xpack.slo.sloEdit.sliType.timesliceMetric.fieldLabel', { defaultMessage: 'Field', diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/timeslice_metric/timeslice_metric_indicator.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/timeslice_metric/timeslice_metric_indicator.tsx similarity index 88% rename from x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/timeslice_metric/timeslice_metric_indicator.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/timeslice_metric/timeslice_metric_indicator.tsx index 86eede0ba65e2..73bc3135d91ac 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/timeslice_metric/timeslice_metric_indicator.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/indicator_section/timeslice_metric/timeslice_metric_indicator.tsx @@ -19,15 +19,15 @@ import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; import { useFormContext } from 'react-hook-form'; import { IndexAndTimestampField } from '../custom_common/index_and_timestamp_field'; -import { useKibana } from '../../../../hooks/use_kibana'; -import { GroupByField } from '../common/group_by_field'; -import { CreateSLOForm } from '../../types'; -import { DataPreviewChart } from '../common/data_preview_chart'; -import { QueryBuilder } from '../common/query_builder'; +import { useKibana } from '../../../../../hooks/use_kibana'; +import { GroupByField } from '../../common/group_by_field'; +import { CreateSLOForm } from '../../../types'; +import { DataPreviewChart } from '../../common/data_preview_chart'; +import { QueryBuilder } from '../../common/query_builder'; import { DATA_VIEW_FIELD } from '../custom_common/index_selection'; import { MetricIndicator } from './metric_indicator'; -import { COMPARATOR_MAPPING } from '../../constants'; -import { useCreateDataView } from '../../../../hooks/use_create_data_view'; +import { COMPARATOR_MAPPING } from '../../../constants'; +import { useCreateDataView } from '../../../../../hooks/use_create_data_view'; export { NEW_TIMESLICE_METRIC } from './metric_indicator'; @@ -54,7 +54,7 @@ export function TimesliceMetricIndicatorTypeForm() { - + diff --git a/x-pack/plugins/observability_solution/slo/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 index 7ffc274ffce12..9082d5367670e 100644 --- a/x-pack/plugins/observability_solution/slo/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 @@ -5,43 +5,56 @@ * 2.0. */ -import { EuiFlexGroup, EuiSpacer, EuiSteps } from '@elastic/eui'; +import { EuiFlexGroup, EuiSteps } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import type { GetSLOResponse } from '@kbn/slo-schema'; +import type { CreateSLOInput, GetSLOResponse } from '@kbn/slo-schema'; +import { RecursivePartial } from '@kbn/utility-types'; import React from 'react'; import { FormProvider, useForm } from 'react-hook-form'; -import { RecursivePartial } from '@kbn/utility-types'; -import { SloEditFormFooter } from './slo_edit_form_footer'; import { SLO_EDIT_FORM_DEFAULT_VALUES } from '../constants'; -import { transformSloResponseToCreateSloForm } from '../helpers/process_slo_form_values'; +import { + transformPartialSLOStateToFormState, + transformSloResponseToCreateSloForm, +} from '../helpers/process_slo_form_values'; import { useParseUrlState } from '../hooks/use_parse_url_state'; import { useSectionFormValidation } from '../hooks/use_section_form_validation'; import { useShowSections } from '../hooks/use_show_sections'; import { CreateSLOForm } from '../types'; import { SloEditFormDescriptionSection } from './slo_edit_form_description_section'; +import { SloEditFormFooter } from './slo_edit_form_footer'; import { SloEditFormIndicatorSection } from './slo_edit_form_indicator_section'; import { SloEditFormObjectiveSection } from './slo_edit_form_objective_section'; export interface Props { slo?: GetSLOResponse; - initialValues?: RecursivePartial; + initialValues?: RecursivePartial; onSave?: () => void; } -export const maxWidth = 900; - export function SloEditForm({ slo, initialValues, onSave }: Props) { const isEditMode = slo !== undefined; + const isFlyoutMode = initialValues !== undefined && onSave !== undefined; - const sloFormValuesFromUrlState = useParseUrlState() ?? (initialValues as CreateSLOForm); + const sloFormValuesFromFlyoutState = isFlyoutMode + ? transformPartialSLOStateToFormState(initialValues) + : undefined; + const sloFormValuesFromUrlState = useParseUrlState(); const sloFormValuesFromSloResponse = transformSloResponseToCreateSloForm(slo); - const methods = useForm({ - defaultValues: sloFormValuesFromUrlState ?? SLO_EDIT_FORM_DEFAULT_VALUES, - values: sloFormValuesFromUrlState ? sloFormValuesFromUrlState : sloFormValuesFromSloResponse, + const form = useForm({ + defaultValues: isFlyoutMode + ? sloFormValuesFromFlyoutState + : sloFormValuesFromUrlState + ? sloFormValuesFromUrlState + : sloFormValuesFromSloResponse ?? SLO_EDIT_FORM_DEFAULT_VALUES, + values: isFlyoutMode + ? sloFormValuesFromFlyoutState + : sloFormValuesFromUrlState + ? sloFormValuesFromUrlState + : sloFormValuesFromSloResponse, mode: 'all', }); - const { watch, getFieldState, getValues, formState } = methods; + const { watch, getFieldState, getValues, formState } = form; const { isIndicatorSectionValid, isObjectiveSectionValid, isDescriptionSectionValid } = useSectionFormValidation({ @@ -59,41 +72,37 @@ export function SloEditForm({ slo, initialValues, onSave }: Props) { ); return ( - <> - - - , - status: isIndicatorSectionValid ? 'complete' : 'incomplete', - }, - { - title: i18n.translate('xpack.slo.sloEdit.objectives.title', { - defaultMessage: 'Set objectives', - }), - children: showObjectiveSection ? : null, - status: showObjectiveSection && isObjectiveSectionValid ? 'complete' : 'incomplete', - }, - { - title: i18n.translate('xpack.slo.sloEdit.description.title', { - defaultMessage: 'Describe SLO', - }), - children: showDescriptionSection ? : null, - status: - showDescriptionSection && isDescriptionSectionValid ? 'complete' : 'incomplete', - }, - ]} - /> - - + + + , + status: isIndicatorSectionValid ? 'complete' : 'incomplete', + }, + { + title: i18n.translate('xpack.slo.sloEdit.objectives.title', { + defaultMessage: 'Set objectives', + }), + children: showObjectiveSection ? : null, + status: showObjectiveSection && isObjectiveSectionValid ? 'complete' : 'incomplete', + }, + { + title: i18n.translate('xpack.slo.sloEdit.description.title', { + defaultMessage: 'Describe SLO', + }), + children: showDescriptionSection ? : null, + status: + showDescriptionSection && isDescriptionSectionValid ? 'complete' : 'incomplete', + }, + ]} + /> - - - - + + + ); } diff --git a/x-pack/plugins/observability_solution/slo/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 index a210021674f6b..f242669e566d2 100644 --- a/x-pack/plugins/observability_solution/slo/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 @@ -9,8 +9,6 @@ import { EuiComboBox, EuiComboBoxOptionOption, EuiFieldText, - EuiFlexGroup, - EuiFlexItem, EuiFormRow, EuiPanel, EuiTextArea, @@ -20,9 +18,9 @@ import { i18n } from '@kbn/i18n'; import React from 'react'; import { Controller, useFormContext } from 'react-hook-form'; import { useFetchSLOSuggestions } from '../hooks/use_fetch_suggestions'; -import { OptionalText } from './common/optional_text'; import { CreateSLOForm } from '../types'; -import { maxWidth } from './slo_edit_form'; +import { OptionalText } from './common/optional_text'; +import { MAX_WIDTH } from '../constants'; export function SloEditFormDescriptionSection() { const { control, getFieldState } = useFormContext(); @@ -37,129 +35,117 @@ export function SloEditFormDescriptionSection() { hasBorder={false} hasShadow={false} paddingSize="none" - style={{ maxWidth }} + style={{ maxWidth: MAX_WIDTH }} data-test-subj="sloEditFormDescriptionSection" > - - - - ( - - )} + + ( + - - + )} + /> +
          - - } - > - ( - + } + > + ( + - - + )} + /> +
          - - - ( - { - if (selected.length) { - return field.onChange(selected.map((opts) => opts.value)); - } + + ( + { + if (selected.length) { + return field.onChange(selected.map((opts) => opts.value)); + } - field.onChange([]); - }} - onCreateOption={( - searchValue: string, - options: EuiComboBoxOptionOption[] = [] - ) => { - const normalizedSearchValue = searchValue.trim().toLowerCase(); + field.onChange([]); + }} + onCreateOption={(searchValue: string, options: EuiComboBoxOptionOption[] = []) => { + const normalizedSearchValue = searchValue.trim().toLowerCase(); - if (!normalizedSearchValue) { - return; - } - const values = field.value ?? []; + if (!normalizedSearchValue) { + return; + } + const values = field.value ?? []; - if ( - values.findIndex( - (tag) => tag.trim().toLowerCase() === normalizedSearchValue - ) === -1 - ) { - field.onChange([...values, searchValue]); - } - }} - isClearable - data-test-subj="sloEditTagsSelector" - /> - )} + if ( + values.findIndex((tag) => tag.trim().toLowerCase() === normalizedSearchValue) === + -1 + ) { + field.onChange([...values, searchValue]); + } + }} + isClearable + data-test-subj="sloEditTagsSelector" /> - - -
          + )} + /> + ); } diff --git a/x-pack/plugins/observability_solution/slo/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 index 156f45c2c982c..4d30bef7ac692 100644 --- a/x-pack/plugins/observability_solution/slo/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 @@ -7,19 +7,20 @@ import { EuiFormRow, EuiPanel, EuiSelect, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; +import { assertNever } from '@kbn/std'; import React, { useMemo } from 'react'; import { Controller, useFormContext } from 'react-hook-form'; import { SLI_OPTIONS } from '../constants'; import { useUnregisterFields } from '../hooks/use_unregister_fields'; import { CreateSLOForm } from '../types'; -import { ApmAvailabilityIndicatorTypeForm } from './apm_availability/apm_availability_indicator_type_form'; -import { ApmLatencyIndicatorTypeForm } from './apm_latency/apm_latency_indicator_type_form'; -import { SyntheticsAvailabilityIndicatorTypeForm } from './synthetics_availability/synthetics_availability_indicator_type_form'; -import { CustomKqlIndicatorTypeForm } from './custom_kql/custom_kql_indicator_type_form'; -import { CustomMetricIndicatorTypeForm } from './custom_metric/custom_metric_type_form'; -import { HistogramIndicatorTypeForm } from './histogram/histogram_indicator_type_form'; -import { maxWidth } from './slo_edit_form'; -import { TimesliceMetricIndicatorTypeForm } from './timeslice_metric/timeslice_metric_indicator'; +import { MAX_WIDTH } from '../constants'; +import { ApmAvailabilityIndicatorTypeForm } from './indicator_section/apm_availability/apm_availability_indicator_type_form'; +import { ApmLatencyIndicatorTypeForm } from './indicator_section/apm_latency/apm_latency_indicator_type_form'; +import { CustomKqlIndicatorTypeForm } from './indicator_section/custom_kql/custom_kql_indicator_type_form'; +import { CustomMetricIndicatorTypeForm } from './indicator_section/custom_metric/custom_metric_type_form'; +import { HistogramIndicatorTypeForm } from './indicator_section/histogram/histogram_indicator_type_form'; +import { SyntheticsAvailabilityIndicatorTypeForm } from './indicator_section/synthetics_availability/synthetics_availability_indicator_type_form'; +import { TimesliceMetricIndicatorTypeForm } from './indicator_section/timeslice_metric/timeslice_metric_indicator'; interface SloEditFormIndicatorSectionProps { isEditMode: boolean; @@ -48,7 +49,7 @@ export function SloEditFormIndicatorSection({ isEditMode }: SloEditFormIndicator case 'sli.metric.timeslice': return ; default: - return null; + assertNever(indicatorType); } }, [indicatorType]); @@ -57,7 +58,7 @@ export function SloEditFormIndicatorSection({ isEditMode }: SloEditFormIndicator hasBorder={false} hasShadow={false} paddingSize="none" - style={{ maxWidth }} + style={{ maxWidth: MAX_WIDTH }} data-test-subj="sloEditFormIndicatorSection" > {!isEditMode && ( @@ -78,7 +79,7 @@ export function SloEditFormIndicatorSection({ isEditMode }: SloEditFormIndicator )} /> - + )} {indicatorTypeForm} diff --git a/x-pack/plugins/observability_solution/slo/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 index 15c51b1b86ce4..65e4a25a86c39 100644 --- a/x-pack/plugins/observability_solution/slo/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 @@ -7,15 +7,14 @@ import { EuiCallOut, - EuiCheckbox, EuiFieldNumber, EuiFlexGrid, + EuiFlexGroup, EuiFlexItem, EuiFormRow, EuiIconTip, EuiPanel, EuiSelect, - EuiSpacer, useGeneratedHtmlId, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -30,7 +29,8 @@ import { TIMEWINDOW_TYPE_OPTIONS, } from '../constants'; import { CreateSLOForm } from '../types'; -import { maxWidth } from './slo_edit_form'; +import { MAX_WIDTH } from '../constants'; +import { AdvancedSettings } from './indicator_section/advanced_settings/advanced_settings'; import { SloEditFormObjectiveSectionTimeslices } from './slo_edit_form_objective_section_timeslices'; export function SloEditFormObjectiveSection() { @@ -44,7 +44,6 @@ export function SloEditFormObjectiveSection() { const budgetingSelect = useGeneratedHtmlId({ prefix: 'budgetingSelect' }); const timeWindowTypeSelect = useGeneratedHtmlId({ prefix: 'timeWindowTypeSelect' }); const timeWindowSelect = useGeneratedHtmlId({ prefix: 'timeWindowSelect' }); - const preventBackfillCheckbox = useGeneratedHtmlId({ prefix: 'preventBackfill' }); const timeWindowType = watch('timeWindow.type'); const indicator = watch('indicator.type'); @@ -91,237 +90,199 @@ export function SloEditFormObjectiveSection() { hasBorder={false} hasShadow={false} paddingSize="none" - style={{ maxWidth }} + style={{ maxWidth: MAX_WIDTH }} data-test-subj="sloEditFormObjectiveSection" > - - - - {i18n.translate('xpack.slo.sloEdit.timeWindowType.label', { - defaultMessage: 'Time window', - })}{' '} - - - } - > - ( - - )} - /> - - - - - {i18n.translate('xpack.slo.sloEdit.timeWindowDuration.label', { - defaultMessage: 'Duration', - })}{' '} - - - } - > - ( - - )} - /> - - - - - - {indicator === 'sli.metric.timeslice' && ( - - -

          - + + + + {i18n.translate('xpack.slo.sloEdit.timeWindowType.label', { + defaultMessage: 'Time window', + })}{' '} + + + } + > + ( + + )} /> -

          -
          - -
          - )} - - {indicator === 'sli.synthetics.availability' && ( - - -

          - + + + + {i18n.translate('xpack.slo.sloEdit.timeWindowDuration.label', { + defaultMessage: 'Duration', + })}{' '} + + + } + > + ( + + )} /> -

          -
          - -
          - )} + +
          + - - - - {i18n.translate('xpack.slo.sloEdit.budgetingMethod.label', { - defaultMessage: 'Budgeting method', - })}{' '} - - - } - > - ( - + +

          + - )} - /> - - +

          +
          +
          + )} - {watch('budgetingMethod') === 'timeslices' ? ( - - ) : null} -
          + {indicator === 'sli.synthetics.availability' && ( + + +

          + +

          +
          +
          + )} - + + + + {i18n.translate('xpack.slo.sloEdit.budgetingMethod.label', { + defaultMessage: 'Budgeting method', + })}{' '} + + + } + > + ( + + )} + /> + + - - - - {i18n.translate('xpack.slo.sloEdit.targetSlo.label', { - defaultMessage: 'Target / SLO (%)', - })}{' '} - - - } - > - ( - onChange(event.target.value)} - /> - )} - /> - - - + {watch('budgetingMethod') === 'timeslices' ? ( + + ) : null} + - + + + + {i18n.translate('xpack.slo.sloEdit.targetSlo.label', { + defaultMessage: 'Target / SLO (%)', + })}{' '} + + + } + > + ( + onChange(event.target.value)} + /> + )} + /> + + + - - - - ( - - {i18n.translate('xpack.slo.sloEdit.settings.preventInitialBackfill.label', { - defaultMessage: 'Prevent initial backfill of data', - })} - - - } - checked={Boolean(field.value)} - onChange={(event: any) => onChange(event.target.checked)} - /> - )} - /> - - - + +
          ); } diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/constants.ts b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/constants.ts index 123ebdc660947..55dfec93f8a33 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/constants.ts +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/constants.ts @@ -33,6 +33,8 @@ import { import { SYNTHETICS_DEFAULT_GROUPINGS, SYNTHETICS_INDEX_PATTERN } from '../../../common/constants'; import { CreateSLOForm } from './types'; +export const MAX_WIDTH = 900; + export const SLI_OPTIONS: Array<{ value: IndicatorType; text: string; @@ -205,6 +207,13 @@ export const SYNTHETICS_AVAILABILITY_DEFAULT_VALUES: SyntheticsAvailabilityIndic }, }; +export const SETTINGS_DEFAULT_VALUES = { + frequency: 1, + preventInitialBackfill: false, + syncDelay: 1, + syncField: null, +}; + export const SLO_EDIT_FORM_DEFAULT_VALUES: CreateSLOForm = { name: '', description: '', @@ -219,9 +228,7 @@ export const SLO_EDIT_FORM_DEFAULT_VALUES: CreateSLOForm = { target: 99, }, groupBy: ALL_VALUE, - settings: { - preventInitialBackfill: false, - }, + settings: SETTINGS_DEFAULT_VALUES, }; export const SLO_EDIT_FORM_DEFAULT_VALUES_CUSTOM_METRIC: CreateSLOForm = { @@ -238,9 +245,7 @@ export const SLO_EDIT_FORM_DEFAULT_VALUES_CUSTOM_METRIC: CreateSLOForm = { target: 99, }, groupBy: ALL_VALUE, - settings: { - preventInitialBackfill: false, - }, + settings: SETTINGS_DEFAULT_VALUES, }; export const SLO_EDIT_FORM_DEFAULT_VALUES_SYNTHETICS_AVAILABILITY: CreateSLOForm = { @@ -257,9 +262,7 @@ export const SLO_EDIT_FORM_DEFAULT_VALUES_SYNTHETICS_AVAILABILITY: CreateSLOForm target: 99, }, groupBy: SYNTHETICS_DEFAULT_GROUPINGS, - settings: { - preventInitialBackfill: false, - }, + settings: SETTINGS_DEFAULT_VALUES, }; export const COMPARATOR_GT = i18n.translate('xpack.slo.sloEdit.sliType.timesliceMetric.gtLabel', { diff --git a/x-pack/plugins/observability_solution/slo/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 index 3f7ac0ce83beb..78f63a4b8f7bc 100644 --- a/x-pack/plugins/observability_solution/slo/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 @@ -26,7 +26,10 @@ Object { "target": 99, }, "settings": Object { + "frequency": 1, "preventInitialBackfill": false, + "syncDelay": 1, + "syncField": null, }, "tags": Array [], "timeWindow": Object { @@ -74,7 +77,10 @@ Object { "target": 99, }, "settings": Object { + "frequency": 1, "preventInitialBackfill": false, + "syncDelay": 1, + "syncField": null, }, "tags": Array [], "timeWindow": Object { @@ -104,7 +110,10 @@ Object { "target": 99, }, "settings": Object { + "frequency": 1, "preventInitialBackfill": false, + "syncDelay": 1, + "syncField": null, }, "tags": Array [], "timeWindow": Object { @@ -146,7 +155,10 @@ Object { "target": 99, }, "settings": Object { + "frequency": 1, "preventInitialBackfill": false, + "syncDelay": 1, + "syncField": null, }, "tags": Array [], "timeWindow": Object { @@ -178,7 +190,10 @@ Object { "timesliceWindow": "2", }, "settings": Object { + "frequency": 1, "preventInitialBackfill": false, + "syncDelay": 1, + "syncField": null, }, "tags": Array [], "timeWindow": Object { @@ -208,7 +223,10 @@ Object { "target": 99, }, "settings": Object { + "frequency": 1, "preventInitialBackfill": false, + "syncDelay": 1, + "syncField": null, }, "tags": Array [], "timeWindow": Object { @@ -218,6 +236,105 @@ Object { } `; +exports[`Transform partial URL state into form state settings handles optional 'syncField' URL state 1`] = ` +Object { + "budgetingMethod": "occurrences", + "description": "", + "groupBy": "*", + "indicator": Object { + "params": Object { + "filter": "", + "good": "", + "index": "", + "timestampField": "", + "total": "", + }, + "type": "sli.kql.custom", + }, + "name": "", + "objective": Object { + "target": 99, + }, + "settings": Object { + "frequency": 1, + "preventInitialBackfill": false, + "syncDelay": 1, + "syncField": "override-field", + }, + "tags": Array [], + "timeWindow": Object { + "duration": "30d", + "type": "rolling", + }, +} +`; + +exports[`Transform partial URL state into form state settings handles partial 'settings' URL state 1`] = ` +Object { + "budgetingMethod": "occurrences", + "description": "", + "groupBy": "*", + "indicator": Object { + "params": Object { + "filter": "", + "good": "", + "index": "", + "timestampField": "", + "total": "", + }, + "type": "sli.kql.custom", + }, + "name": "", + "objective": Object { + "target": 99, + }, + "settings": Object { + "frequency": 1, + "preventInitialBackfill": false, + "syncDelay": 12, + "syncField": null, + }, + "tags": Array [], + "timeWindow": Object { + "duration": "30d", + "type": "rolling", + }, +} +`; + +exports[`Transform partial URL state into form state settings handles the 'settings' URL state 1`] = ` +Object { + "budgetingMethod": "occurrences", + "description": "", + "groupBy": "*", + "indicator": Object { + "params": Object { + "filter": "", + "good": "", + "index": "", + "timestampField": "", + "total": "", + }, + "type": "sli.kql.custom", + }, + "name": "", + "objective": Object { + "target": 99, + }, + "settings": Object { + "frequency": 1, + "preventInitialBackfill": true, + "syncDelay": 180, + "syncField": null, + }, + "tags": Array [], + "timeWindow": Object { + "duration": "30d", + "type": "rolling", + }, +} +`; + exports[`Transform partial URL state into form state with 'indicator' in URL state handles partial APM Availability state 1`] = ` Object { "budgetingMethod": "occurrences", @@ -239,7 +356,10 @@ Object { "target": 99, }, "settings": Object { + "frequency": 1, "preventInitialBackfill": false, + "syncDelay": 1, + "syncField": null, }, "tags": Array [], "timeWindow": Object { @@ -271,7 +391,10 @@ Object { "target": 99, }, "settings": Object { + "frequency": 1, "preventInitialBackfill": false, + "syncDelay": 1, + "syncField": null, }, "tags": Array [], "timeWindow": Object { @@ -301,7 +424,10 @@ Object { "target": 99, }, "settings": Object { + "frequency": 1, "preventInitialBackfill": false, + "syncDelay": 1, + "syncField": null, }, "tags": Array [], "timeWindow": Object { @@ -331,7 +457,10 @@ Object { "target": 99, }, "settings": Object { + "frequency": 1, "preventInitialBackfill": false, + "syncDelay": 1, + "syncField": null, }, "tags": Array [], "timeWindow": Object { diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/helpers/format_filters.test.ts b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/helpers/format_filters.test.ts index 16ad733619e65..c79571d4ab77b 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/helpers/format_filters.test.ts +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/helpers/format_filters.test.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { getGroupByCardinalityFilters } from '../components/synthetics_availability/synthetics_availability_indicator_type_form'; +import { getGroupByCardinalityFilters } from '../components/indicator_section/synthetics_availability/synthetics_availability_indicator_type_form'; import { formatAllFilters } from './format_filters'; describe('formatAllFilters', () => { diff --git a/x-pack/plugins/observability_solution/slo/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 index a69cd1152985c..7518e1c679c87 100644 --- a/x-pack/plugins/observability_solution/slo/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 @@ -5,7 +5,7 @@ * 2.0. */ -import { transformPartialUrlStateToFormState as transform } from './process_slo_form_values'; +import { transformPartialSLOStateToFormState as transform } from './process_slo_form_values'; describe('Transform partial URL state into form state', () => { describe("with 'indicator' in URL state", () => { @@ -121,4 +121,20 @@ describe('Transform partial URL state into form state', () => { }) ).toMatchSnapshot(); }); + + describe('settings', () => { + it("handles the 'settings' URL state", () => { + expect( + transform({ settings: { preventInitialBackfill: true, syncDelay: '3h' } }) + ).toMatchSnapshot(); + }); + + it("handles partial 'settings' URL state", () => { + expect(transform({ settings: { syncDelay: '12m' } })).toMatchSnapshot(); + }); + + it("handles optional 'syncField' URL state", () => { + expect(transform({ settings: { syncField: 'override-field' } })).toMatchSnapshot(); + }); + }); }); diff --git a/x-pack/plugins/observability_solution/slo/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 index 8bbbcf9d2fee9..81d6714dac2e5 100644 --- a/x-pack/plugins/observability_solution/slo/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 @@ -9,13 +9,14 @@ import { CreateSLOInput, GetSLOResponse, Indicator, UpdateSLOInput } from '@kbn/ import { assertNever } from '@kbn/std'; import { RecursivePartial } from '@kbn/utility-types'; import { cloneDeep } from 'lodash'; -import { toDuration } from '../../../utils/slo/duration'; +import { toDuration, toMinutes } from '../../../utils/slo/duration'; import { APM_AVAILABILITY_DEFAULT_VALUES, APM_LATENCY_DEFAULT_VALUES, CUSTOM_KQL_DEFAULT_VALUES, CUSTOM_METRIC_DEFAULT_VALUES, HISTOGRAM_DEFAULT_VALUES, + SETTINGS_DEFAULT_VALUES, SLO_EDIT_FORM_DEFAULT_VALUES, SLO_EDIT_FORM_DEFAULT_VALUES_SYNTHETICS_AVAILABILITY, SYNTHETICS_AVAILABILITY_DEFAULT_VALUES, @@ -52,6 +53,13 @@ export function transformSloResponseToCreateSloForm( tags: values.tags, settings: { preventInitialBackfill: values.settings?.preventInitialBackfill ?? false, + syncDelay: values.settings?.syncDelay + ? toMinutes(toDuration(values.settings.syncDelay)) + : SETTINGS_DEFAULT_VALUES.syncDelay, + frequency: values.settings?.frequency + ? toMinutes(toDuration(values.settings.frequency)) + : SETTINGS_DEFAULT_VALUES.frequency, + syncField: values.settings?.syncField ?? null, }, }; } @@ -80,7 +88,10 @@ export function transformCreateSLOFormToCreateSLOInput(values: CreateSLOForm): C tags: values.tags, groupBy: [values.groupBy].flat(), settings: { - preventInitialBackfill: values.settings?.preventInitialBackfill ?? false, + preventInitialBackfill: values.settings.preventInitialBackfill, + syncDelay: `${values.settings.syncDelay ?? SETTINGS_DEFAULT_VALUES.syncDelay}m`, + frequency: `${values.settings.frequency ?? SETTINGS_DEFAULT_VALUES.frequency}m`, + syncField: values.settings.syncField, }, }; } @@ -109,7 +120,10 @@ export function transformValuesToUpdateSLOInput(values: CreateSLOForm): UpdateSL tags: values.tags, groupBy: [values.groupBy].flat(), settings: { - preventInitialBackfill: values.settings?.preventInitialBackfill ?? false, + preventInitialBackfill: values.settings.preventInitialBackfill, + syncDelay: `${values.settings.syncDelay ?? SETTINGS_DEFAULT_VALUES.syncDelay}m`, + frequency: `${values.settings.frequency ?? SETTINGS_DEFAULT_VALUES.frequency}m`, + syncField: values.settings.syncField, }, }; } @@ -165,7 +179,7 @@ function transformPartialIndicatorState( } } -export function transformPartialUrlStateToFormState( +export function transformPartialSLOStateToFormState( values: RecursivePartial ): CreateSLOForm { let state: CreateSLOForm; @@ -189,8 +203,8 @@ export function transformPartialUrlStateToFormState( if (values.description) { state.description = values.description; } - if (!!values.tags) { - state.tags = values.tags as string[]; + if (values.tags) { + state.tags = [values.tags].flat().filter((tag) => !!tag) as string[]; } if (values.objective) { @@ -220,8 +234,19 @@ export function transformPartialUrlStateToFormState( state.timeWindow = { duration: values.timeWindow.duration, type: values.timeWindow.type }; } - if (!!values.settings?.preventInitialBackfill) { - state.settings = { preventInitialBackfill: values.settings.preventInitialBackfill }; + if (!!values.settings) { + if (values.settings.preventInitialBackfill) { + state.settings.preventInitialBackfill = values.settings.preventInitialBackfill; + } + if (values.settings.syncDelay) { + state.settings.syncDelay = toMinutes(toDuration(values.settings.syncDelay)); + } + if (values.settings.frequency) { + state.settings.frequency = toMinutes(toDuration(values.settings.frequency)); + } + if (values.settings.syncField) { + state.settings.syncField = values.settings.syncField; + } } return state; diff --git a/x-pack/plugins/observability_solution/slo/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 index 2c305feda3c06..9ada81ea84387 100644 --- a/x-pack/plugins/observability_solution/slo/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 @@ -10,7 +10,7 @@ import { CreateSLOInput } from '@kbn/slo-schema'; import { RecursivePartial } from '@kbn/utility-types'; import { useHistory } from 'react-router-dom'; import { useMemo } from 'react'; -import { transformPartialUrlStateToFormState } from '../helpers/process_slo_form_values'; +import { transformPartialSLOStateToFormState } from '../helpers/process_slo_form_values'; import { CreateSLOForm } from '../types'; export function useParseUrlState(): CreateSLOForm | undefined { @@ -25,6 +25,6 @@ export function useParseUrlState(): CreateSLOForm | undefined { const urlState = urlStateStorage.get>('_a'); - return !!urlState ? transformPartialUrlStateToFormState(urlState) : undefined; + return !!urlState ? transformPartialSLOStateToFormState(urlState) : undefined; }, [history]); } diff --git a/x-pack/plugins/observability_solution/slo/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 index 7d75359f4cd40..94ffc92adedb4 100644 --- a/x-pack/plugins/observability_solution/slo/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 @@ -220,8 +220,10 @@ export function useSectionFormValidation({ getFieldState, getValues, formState, 'objective.target', 'objective.timesliceTarget', 'objective.timesliceWindow', + 'settings.syncDelay', + 'settings.frequency', ] as const - ).every((field) => getFieldState(field).error === undefined); + ).every((field) => !getFieldState(field).invalid); const isDescriptionSectionValid = !getFieldState('name').invalid && diff --git a/x-pack/plugins/observability_solution/slo/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 index 9d7752f190344..eb7a77f822660 100644 --- a/x-pack/plugins/observability_solution/slo/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 @@ -19,8 +19,8 @@ import { CUSTOM_METRIC_DEFAULT_VALUES, HISTOGRAM_DEFAULT_VALUES, SLO_EDIT_FORM_DEFAULT_VALUES, - TIMESLICE_METRIC_DEFAULT_VALUES, SLO_EDIT_FORM_DEFAULT_VALUES_SYNTHETICS_AVAILABILITY, + TIMESLICE_METRIC_DEFAULT_VALUES, } from '../constants'; import { CreateSLOForm } from '../types'; diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/shared_flyout/slo_add_form_flyout.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/shared_flyout/slo_add_form_flyout.tsx index 98c76b190aa1a..f71d7caa80d17 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/shared_flyout/slo_add_form_flyout.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/shared_flyout/slo_add_form_flyout.tsx @@ -7,12 +7,11 @@ import { EuiFlyout, EuiFlyoutBody, EuiFlyoutFooter, EuiFlyoutHeader, EuiTitle } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; +import { CreateSLOInput } from '@kbn/slo-schema'; import { RecursivePartial } from '@kbn/utility-types'; -import { merge } from 'lodash'; import React from 'react'; import { OutPortal, createHtmlPortalNode } from 'react-reverse-portal'; import { SloEditForm } from '../components/slo_edit_form'; -import { CreateSLOForm } from '../types'; export const sloEditFormFooterPortal = createHtmlPortalNode(); @@ -22,7 +21,7 @@ export default function SloAddFormFlyout({ initialValues, }: { onClose: () => void; - initialValues?: RecursivePartial; + initialValues?: RecursivePartial; }) { return ( - + diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/slo_edit.test.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/slo_edit.test.tsx index abc60d6a00352..8d52ed914302c 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/slo_edit.test.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/slo_edit.test.tsx @@ -423,11 +423,11 @@ describe('SLO Edit Page', () => { jest.spyOn(Router, 'useParams').mockReturnValue({ sloId: '123' }); history.push( - '/slos/123/edit?_a=(name:%27updated-name%27,indicator:(params:(environment:prod,service:cartService),type:sli.apm.transactionDuration),objective:(target:0.92))' + '/slos/edit/123?_a=(name:%27updated-name%27,indicator:(params:(environment:prod,service:cartService),type:sli.apm.transactionDuration),objective:(target:0.92))' ); jest .spyOn(Router, 'useLocation') - .mockReturnValue({ pathname: '/slos/123/edit', search: '', state: '', hash: '' }); + .mockReturnValue({ pathname: '/slos/edit/123', search: '', state: '', hash: '' }); useFetchSloMock.mockReturnValue({ isLoading: false, data: slo }); @@ -463,8 +463,7 @@ describe('SLO Edit Page', () => { jest.spyOn(Router, 'useParams').mockReturnValue({ sloId: '123' }); jest .spyOn(Router, 'useLocation') - .mockReturnValue({ pathname: '/slos/123/edit', search: '', state: '', hash: '' }); - + .mockReturnValue({ pathname: '/slos/edit/123', search: '', state: '', hash: '' }); useFetchSloMock.mockReturnValue({ isLoading: false, data: slo }); const { getByTestId } = render(); diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/slo_edit.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/slo_edit.tsx index b014bdb1d6dec..0a563bbe75b44 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/slo_edit.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/slo_edit.tsx @@ -12,10 +12,10 @@ import { useParams } from 'react-router-dom'; import { paths } from '../../../common/locators/paths'; import { HeaderMenu } from '../../components/header_menu/header_menu'; import { useFetchSloDetails } from '../../hooks/use_fetch_slo_details'; +import { useKibana } from '../../hooks/use_kibana'; import { useLicense } from '../../hooks/use_license'; import { usePermissions } from '../../hooks/use_permissions'; import { usePluginContext } from '../../hooks/use_plugin_context'; -import { useKibana } from '../../hooks/use_kibana'; import { SloEditForm } from './components/slo_edit_form'; export function SloEditPage() { diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/types.ts b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/types.ts index 5eef9a2d0e5ba..6584e52404bc5 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/types.ts +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/types.ts @@ -25,5 +25,8 @@ export interface CreateSLOForm { groupBy: string[] | string; settings: { preventInitialBackfill: boolean; + syncDelay: number; // in minutes + frequency: number; // in minutes + syncField: string | null; }; } diff --git a/x-pack/plugins/observability_solution/slo/public/types.ts b/x-pack/plugins/observability_solution/slo/public/types.ts index 964fb9b289ea3..80439c4a4134c 100644 --- a/x-pack/plugins/observability_solution/slo/public/types.ts +++ b/x-pack/plugins/observability_solution/slo/public/types.ts @@ -15,6 +15,7 @@ import { DataViewFieldEditorStart } from '@kbn/data-view-field-editor-plugin/pub import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; import type { DiscoverStart } from '@kbn/discover-plugin/public'; import type { DiscoverSharedPublicStart } from '@kbn/discover-shared-plugin/public'; +import type { EmbeddableEnhancedPluginStart } from '@kbn/embeddable-enhanced-plugin/public'; import type { EmbeddableSetup, EmbeddableStart } from '@kbn/embeddable-plugin/public'; import { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; import type { LensPublicStart } from '@kbn/lens-plugin/public'; @@ -82,6 +83,7 @@ export interface SLOPublicPluginsStart { discover?: DiscoverStart; discoverShared: DiscoverSharedPublicStart; embeddable: EmbeddableStart; + embeddableEnhanced?: EmbeddableEnhancedPluginStart; fieldFormats: FieldFormatsStart; lens: LensPublicStart; licensing: LicensingPluginStart; diff --git a/x-pack/plugins/observability_solution/slo/public/utils/slo/remote_slo_urls.test.ts b/x-pack/plugins/observability_solution/slo/public/utils/slo/remote_slo_urls.test.ts index 3c0495fd1bc9b..6f44d13150819 100644 --- a/x-pack/plugins/observability_solution/slo/public/utils/slo/remote_slo_urls.test.ts +++ b/x-pack/plugins/observability_solution/slo/public/utils/slo/remote_slo_urls.test.ts @@ -51,7 +51,7 @@ describe('remote SLO URLs Utils', () => { `"https://cloud.elast.co/app/slos/edit/fixed-id"` ); expect(createRemoteSloCloneUrl(remoteSlo)).toMatchInlineSnapshot( - `"https://cloud.elast.co/app/slos/create?_a=(budgetingMethod:occurrences,createdAt:%272022-12-29T10:11:12.000Z%27,description:%27some%20description%20useful%27,enabled:!t,groupBy:%27*%27,groupings:(),indicator:(params:(filter:%27baz:%20foo%20and%20bar%20%3E%202%27,good:%27http_status:%202xx%27,index:some-index,timestampField:custom_timestamp,total:%27a%20query%27),type:sli.kql.custom),instanceId:%27*%27,meta:(),name:%27[Copy]%20super%20important%20level%20service%27,objective:(target:0.98),remote:(kibanaUrl:%27https:/cloud.elast.co/kibana%27,remoteName:remote_cluster),revision:1,settings:(frequency:%271m%27,preventInitialBackfill:!f,syncDelay:%271m%27),summary:(errorBudget:(consumed:0.064,initial:0.02,isEstimated:!f,remaining:0.936),fiveMinuteBurnRate:0,oneDayBurnRate:0,oneHourBurnRate:0,sliValue:0.99872,status:HEALTHY),tags:!(k8s,production,critical),timeWindow:(duration:%2730d%27,type:rolling),updatedAt:%272022-12-29T10:11:12.000Z%27,version:2)"` + `"https://cloud.elast.co/app/slos/create?_a=(budgetingMethod:occurrences,createdAt:%272022-12-29T10:11:12.000Z%27,description:%27some%20description%20useful%27,enabled:!t,groupBy:%27*%27,groupings:(),indicator:(params:(dataViewId:some-data-view-id,filter:%27baz:%20foo%20and%20bar%20%3E%202%27,good:%27http_status:%202xx%27,index:some-index,timestampField:custom_timestamp,total:%27a%20query%27),type:sli.kql.custom),instanceId:%27*%27,meta:(),name:%27[Copy]%20super%20important%20level%20service%27,objective:(target:0.98),remote:(kibanaUrl:%27https:/cloud.elast.co/kibana%27,remoteName:remote_cluster),revision:1,settings:(frequency:%271m%27,preventInitialBackfill:!f,syncDelay:%271m%27),summary:(errorBudget:(consumed:0.064,initial:0.02,isEstimated:!f,remaining:0.936),fiveMinuteBurnRate:0,oneDayBurnRate:0,oneHourBurnRate:0,sliValue:0.99872,status:HEALTHY),tags:!(k8s,production,critical),timeWindow:(duration:%2730d%27,type:rolling),updatedAt:%272022-12-29T10:11:12.000Z%27,version:2)"` ); }); @@ -71,7 +71,7 @@ describe('remote SLO URLs Utils', () => { `"https://cloud.elast.co/s/my-custom-space/app/slos/edit/fixed-id"` ); expect(createRemoteSloCloneUrl(remoteSlo, 'my-custom-space')).toMatchInlineSnapshot( - `"https://cloud.elast.co/s/my-custom-space/app/slos/create?_a=(budgetingMethod:occurrences,createdAt:%272022-12-29T10:11:12.000Z%27,description:%27some%20description%20useful%27,enabled:!t,groupBy:%27*%27,groupings:(),indicator:(params:(filter:%27baz:%20foo%20and%20bar%20%3E%202%27,good:%27http_status:%202xx%27,index:some-index,timestampField:custom_timestamp,total:%27a%20query%27),type:sli.kql.custom),instanceId:%27*%27,meta:(),name:%27[Copy]%20super%20important%20level%20service%27,objective:(target:0.98),remote:(kibanaUrl:%27https:/cloud.elast.co/kibana%27,remoteName:remote_cluster),revision:1,settings:(frequency:%271m%27,preventInitialBackfill:!f,syncDelay:%271m%27),summary:(errorBudget:(consumed:0.064,initial:0.02,isEstimated:!f,remaining:0.936),fiveMinuteBurnRate:0,oneDayBurnRate:0,oneHourBurnRate:0,sliValue:0.99872,status:HEALTHY),tags:!(k8s,production,critical),timeWindow:(duration:%2730d%27,type:rolling),updatedAt:%272022-12-29T10:11:12.000Z%27,version:2)"` + `"https://cloud.elast.co/s/my-custom-space/app/slos/create?_a=(budgetingMethod:occurrences,createdAt:%272022-12-29T10:11:12.000Z%27,description:%27some%20description%20useful%27,enabled:!t,groupBy:%27*%27,groupings:(),indicator:(params:(dataViewId:some-data-view-id,filter:%27baz:%20foo%20and%20bar%20%3E%202%27,good:%27http_status:%202xx%27,index:some-index,timestampField:custom_timestamp,total:%27a%20query%27),type:sli.kql.custom),instanceId:%27*%27,meta:(),name:%27[Copy]%20super%20important%20level%20service%27,objective:(target:0.98),remote:(kibanaUrl:%27https:/cloud.elast.co/kibana%27,remoteName:remote_cluster),revision:1,settings:(frequency:%271m%27,preventInitialBackfill:!f,syncDelay:%271m%27),summary:(errorBudget:(consumed:0.064,initial:0.02,isEstimated:!f,remaining:0.936),fiveMinuteBurnRate:0,oneDayBurnRate:0,oneHourBurnRate:0,sliValue:0.99872,status:HEALTHY),tags:!(k8s,production,critical),timeWindow:(duration:%2730d%27,type:rolling),updatedAt:%272022-12-29T10:11:12.000Z%27,version:2)"` ); }); }); 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 index d432dc5c52d34..ace1a1318ce29 100644 --- 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 @@ -5,14 +5,14 @@ * 2.0. */ -import { PluginSetupContract } from '@kbn/alerting-plugin/server'; +import type { AlertingServerSetup } from '@kbn/alerting-plugin/server'; import { IBasePath, Logger } from '@kbn/core/server'; import { IRuleDataService } from '@kbn/rule-registry-plugin/server'; import { CustomThresholdLocators } from '@kbn/observability-plugin/server'; import { sloBurnRateRuleType } from './slo_burn_rate'; export function registerBurnRateRule( - alertingPlugin: PluginSetupContract, + alertingPlugin: AlertingServerSetup, basePath: IBasePath, logger: Logger, ruleDataService: IRuleDataService, diff --git a/x-pack/plugins/observability_solution/slo/server/plugin.ts b/x-pack/plugins/observability_solution/slo/server/plugin.ts index 7699cbe5f1404..99cd4a2230a94 100644 --- a/x-pack/plugins/observability_solution/slo/server/plugin.ts +++ b/x-pack/plugins/observability_solution/slo/server/plugin.ts @@ -14,10 +14,11 @@ import { PluginInitializerContext, SavedObjectsClient, } from '@kbn/core/server'; -import { KibanaFeatureScope } from '@kbn/features-plugin/common'; -import { i18n } from '@kbn/i18n'; import { AlertsLocatorDefinition, sloFeatureId } from '@kbn/observability-plugin/common'; import { SLO_BURN_RATE_RULE_TYPE_ID } from '@kbn/rule-data-utils'; +import { ALERTING_FEATURE_ID } from '@kbn/alerting-plugin/common'; +import { KibanaFeatureScope } from '@kbn/features-plugin/common'; +import { i18n } from '@kbn/i18n'; import { mapValues } from 'lodash'; import { registerSloUsageCollector } from './lib/collectors/register'; import { registerBurnRateRule } from './lib/rules/register_burn_rate_rule'; @@ -61,6 +62,11 @@ export class SLOPlugin const savedObjectTypes = [SO_SLO_TYPE, SO_SLO_SETTINGS_TYPE]; + const alertingFeatures = sloRuleTypes.map((ruleTypeId) => ({ + ruleTypeId, + consumers: [sloFeatureId, ALERTING_FEATURE_ID], + })); + plugins.features.registerKibanaFeature({ id: sloFeatureId, name: i18n.translate('xpack.slo.featureRegistry.linkSloTitle', { @@ -71,7 +77,7 @@ export class SLOPlugin scope: [KibanaFeatureScope.Spaces, KibanaFeatureScope.Security], app: [sloFeatureId, 'kibana'], catalogue: [sloFeatureId, 'observability'], - alerting: sloRuleTypes, + alerting: alertingFeatures, privileges: { all: { app: [sloFeatureId, 'kibana'], @@ -83,10 +89,10 @@ export class SLOPlugin }, alerting: { rule: { - all: sloRuleTypes, + all: alertingFeatures, }, alert: { - all: sloRuleTypes, + all: alertingFeatures, }, }, ui: ['read', 'write'], @@ -101,10 +107,10 @@ export class SLOPlugin }, alerting: { rule: { - read: sloRuleTypes, + read: alertingFeatures, }, alert: { - read: sloRuleTypes, + read: alertingFeatures, }, }, ui: ['read'], diff --git a/x-pack/plugins/observability_solution/slo/server/services/create_slo.ts b/x-pack/plugins/observability_solution/slo/server/services/create_slo.ts index e7c09c352bd66..a8e01fb4681f4 100644 --- a/x-pack/plugins/observability_solution/slo/server/services/create_slo.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/create_slo.ts @@ -9,6 +9,7 @@ import { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/typ import { ElasticsearchClient, IBasePath, IScopedClusterClient, Logger } from '@kbn/core/server'; import { ALL_VALUE, CreateSLOParams, CreateSLOResponse } from '@kbn/slo-schema'; import { asyncForEach } from '@kbn/std'; +import { merge } from 'lodash'; import { v4 as uuidv4 } from 'uuid'; import { SLO_MODEL_VERSION, @@ -46,8 +47,10 @@ export class CreateSLO { const slo = this.toSLO(params); validateSLO(slo); - await this.assertSLOInexistant(slo); - await assertExpectedIndicatorSourceIndexPrivileges(slo, this.esClient); + await Promise.all([ + this.assertSLOInexistant(slo), + assertExpectedIndicatorSourceIndexPrivileges(slo, this.esClient), + ]); const rollbackOperations = []; const createPromise = this.repository.create(slo); @@ -201,11 +204,14 @@ export class CreateSLO { return { ...params, id: params.id ?? uuidv4(), - settings: { - syncDelay: params.settings?.syncDelay ?? new Duration(1, DurationUnit.Minute), - frequency: params.settings?.frequency ?? new Duration(1, DurationUnit.Minute), - preventInitialBackfill: params.settings?.preventInitialBackfill ?? false, - }, + settings: merge( + { + syncDelay: new Duration(1, DurationUnit.Minute), + frequency: new Duration(1, DurationUnit.Minute), + preventInitialBackfill: false, + }, + params.settings + ), revision: params.revision ?? 1, enabled: true, tags: params.tags ?? [], diff --git a/x-pack/plugins/observability_solution/slo/server/services/get_slos_overview.ts b/x-pack/plugins/observability_solution/slo/server/services/get_slos_overview.ts index 32660b68f4693..fb2be7bcbf74d 100644 --- a/x-pack/plugins/observability_solution/slo/server/services/get_slos_overview.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/get_slos_overview.ts @@ -15,7 +15,7 @@ import { import { RulesClientApi } from '@kbn/alerting-plugin/server/types'; import { AlertsClient } from '@kbn/rule-registry-plugin/server'; import moment from 'moment'; -import { observabilityAlertFeatureIds } from '@kbn/observability-plugin/common'; +import { AlertConsumers, SLO_RULE_TYPE_IDS } from '@kbn/rule-data-utils'; import { typedSearch } from '../utils/queries'; import { getElasticsearchQueryOrThrow, parseStringFilters } from './transform_generators'; import { getListOfSummaryIndices, getSloSettings } from './slo_settings'; @@ -108,21 +108,16 @@ export class GetSLOsOverview { const [rules, alerts] = await Promise.all([ this.rulesClient.find({ options: { - search: 'alert.attributes.alertTypeId:("slo.rules.burnRate")', + ruleTypeIds: SLO_RULE_TYPE_IDS, + consumers: [AlertConsumers.SLO, AlertConsumers.ALERTS, AlertConsumers.OBSERVABILITY], }, }), this.racClient.getAlertSummary({ - featureIds: observabilityAlertFeatureIds, + ruleTypeIds: SLO_RULE_TYPE_IDS, + consumers: [AlertConsumers.SLO, AlertConsumers.ALERTS, AlertConsumers.OBSERVABILITY], gte: moment().subtract(24, 'hours').toISOString(), lte: moment().toISOString(), - filter: [ - { - term: { - 'kibana.alert.rule.rule_type_id': 'slo.rules.burnRate', - }, - }, - ], }), ]); diff --git a/x-pack/plugins/observability_solution/slo/server/services/slo_repository.ts b/x-pack/plugins/observability_solution/slo/server/services/slo_repository.ts index 4f9cf439e8ed1..afbdb999fc064 100644 --- a/x-pack/plugins/observability_solution/slo/server/services/slo_repository.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/slo_repository.ts @@ -9,6 +9,7 @@ import { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import { Logger } from '@kbn/core/server'; import { ALL_VALUE, Paginated, Pagination, sloDefinitionSchema } from '@kbn/slo-schema'; import { isLeft } from 'fp-ts/lib/Either'; +import { merge } from 'lodash'; import { SLO_MODEL_VERSION } from '../../common/constants'; import { SLODefinition, StoredSLODefinition } from '../domain/models'; import { SLONotFound } from '../errors'; @@ -155,10 +156,10 @@ export class KibanaSavedObjectsSLORepository implements SLORepository { // We would need to call the _reset api on this SLO. version: storedSLO.version ?? 1, // settings.preventInitialBackfill was added in 8.15.0 - settings: { - ...storedSLO.settings, - preventInitialBackfill: storedSLO.settings?.preventInitialBackfill ?? false, - }, + settings: merge( + { preventInitialBackfill: false, syncDelay: '1m', frequency: '1m' }, + storedSLO.settings + ), }); if (isLeft(result)) { diff --git a/x-pack/plugins/observability_solution/slo/server/services/transform_generators/__snapshots__/transform_generator.test.ts.snap b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/__snapshots__/transform_generator.test.ts.snap index 7d8e989c1140d..f49785cf936c5 100644 --- a/x-pack/plugins/observability_solution/slo/server/services/transform_generators/__snapshots__/transform_generator.test.ts.snap +++ b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/__snapshots__/transform_generator.test.ts.snap @@ -63,3 +63,11 @@ Object { }, } `; + +exports[`Transform Generator settings builds the transform settings 1`] = ` +Object { + "frequency": "2m", + "sync_delay": "10m", + "sync_field": "my_timestamp_sync_field", +} +`; diff --git a/x-pack/plugins/observability_solution/slo/server/services/transform_generators/apm_transaction_duration.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/apm_transaction_duration.ts index d1f05605dab36..99361fa776789 100644 --- a/x-pack/plugins/observability_solution/slo/server/services/transform_generators/apm_transaction_duration.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/apm_transaction_duration.ts @@ -42,7 +42,7 @@ export class ApmTransactionDurationTransformGenerator extends TransformGenerator this.buildDestination(slo), this.buildGroupBy(slo, slo.indicator), this.buildAggregations(slo, slo.indicator), - this.buildSettings(slo), + this.buildSettings(slo, '@timestamp'), slo ); } diff --git a/x-pack/plugins/observability_solution/slo/server/services/transform_generators/apm_transaction_error_rate.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/apm_transaction_error_rate.ts index 6adbd1d3eae9f..a65e4ae1d50dd 100644 --- a/x-pack/plugins/observability_solution/slo/server/services/transform_generators/apm_transaction_error_rate.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/apm_transaction_error_rate.ts @@ -41,7 +41,7 @@ export class ApmTransactionErrorRateTransformGenerator extends TransformGenerato this.buildDestination(slo), this.buildGroupBy(slo, slo.indicator), this.buildAggregations(slo), - this.buildSettings(slo), + this.buildSettings(slo, '@timestamp'), slo ); } diff --git a/x-pack/plugins/observability_solution/slo/server/services/transform_generators/transform_generator.test.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/transform_generator.test.ts index e70d406d75396..2df8a1e40eebb 100644 --- a/x-pack/plugins/observability_solution/slo/server/services/transform_generators/transform_generator.test.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/transform_generator.test.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { Duration, DurationUnit } from '../../domain/models'; import { createAPMTransactionErrorRateIndicator, createSLO } from '../fixtures/slo'; import { ApmTransactionErrorRateTransformGenerator } from './apm_transaction_error_rate'; import { dataViewsService } from '@kbn/data-views-plugin/server/mocks'; @@ -45,4 +46,46 @@ describe('Transform Generator', () => { expect(runtimeMappings).toEqual({}); }); }); + + describe('settings', () => { + const defaultSettings = { + syncDelay: new Duration(10, DurationUnit.Minute), + frequency: new Duration(2, DurationUnit.Minute), + preventInitialBackfill: true, + }; + + it('builds the transform settings', async () => { + const slo = createSLO({ + settings: { + ...defaultSettings, + syncField: 'my_timestamp_sync_field', + }, + }); + const settings = generator.buildSettings(slo); + expect(settings).toMatchSnapshot(); + }); + + it('builds the transform settings using the provided settings.syncField', async () => { + const slo = createSLO({ + settings: { + ...defaultSettings, + syncField: 'my_timestamp_sync_field', + }, + }); + const settings = generator.buildSettings(slo, '@timestamp'); + expect(settings.sync_field).toEqual('my_timestamp_sync_field'); + }); + + it('builds the transform settings using provided fallback when no settings.syncField is configured', async () => { + const slo = createSLO({ settings: defaultSettings }); + const settings = generator.buildSettings(slo, '@timestamp2'); + expect(settings.sync_field).toEqual('@timestamp2'); + }); + + it("builds the transform settings using '@timestamp' default fallback when no settings.syncField is configured", async () => { + const slo = createSLO({ settings: defaultSettings }); + const settings = generator.buildSettings(slo); + expect(settings.sync_field).toEqual('@timestamp'); + }); + }); }); diff --git a/x-pack/plugins/observability_solution/slo/server/services/transform_generators/transform_generator.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/transform_generator.ts index 6c44471fd6566..ea27ebbc7aa38 100644 --- a/x-pack/plugins/observability_solution/slo/server/services/transform_generators/transform_generator.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/transform_generator.ts @@ -88,8 +88,9 @@ export abstract class TransformGenerator { ): TransformSettings { return { frequency: slo.settings.frequency.format(), - sync_field: sourceIndexTimestampField, // timestamp field defined in the source index sync_delay: slo.settings.syncDelay.format(), + // 8.17: use settings.syncField if truthy or default to sourceIndexTimestampField which is the indicator timestampField + sync_field: !!slo.settings.syncField ? slo.settings.syncField : sourceIndexTimestampField, }; } } diff --git a/x-pack/plugins/observability_solution/slo/server/services/update_slo.ts b/x-pack/plugins/observability_solution/slo/server/services/update_slo.ts index d1dfb2e70e00c..402ca82acecd4 100644 --- a/x-pack/plugins/observability_solution/slo/server/services/update_slo.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/update_slo.ts @@ -43,9 +43,10 @@ export class UpdateSLO { public async execute(sloId: string, params: UpdateSLOParams): Promise { const originalSlo = await this.repository.findById(sloId); - let updatedSlo: SLODefinition = Object.assign({}, originalSlo, params, { + let updatedSlo: SLODefinition = Object.assign({}, originalSlo, { + ...params, groupBy: !!params.groupBy ? params.groupBy : originalSlo.groupBy, - settings: mergePartialSettings(originalSlo.settings, params.settings), + settings: Object.assign({}, originalSlo.settings, params.settings), }); if (isEqual(originalSlo, updatedSlo)) { @@ -263,13 +264,3 @@ export class UpdateSLO { return updateSLOResponseSchema.encode(slo); } } - -/** - * Settings are merged by overwriting the original settings with the optional new partial settings. - */ -function mergePartialSettings( - originalSettings: SLODefinition['settings'], - newPartialSettings: UpdateSLOParams['settings'] -) { - return Object.assign({}, originalSettings, newPartialSettings); -} diff --git a/x-pack/plugins/observability_solution/slo/server/types.ts b/x-pack/plugins/observability_solution/slo/server/types.ts index b9269f49c4d9f..9a40547820182 100644 --- a/x-pack/plugins/observability_solution/slo/server/types.ts +++ b/x-pack/plugins/observability_solution/slo/server/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { PluginSetupContract, PluginStartContract } from '@kbn/alerting-plugin/server'; +import type { AlertingServerSetup, AlertingServerStart } from '@kbn/alerting-plugin/server'; import { CloudSetup } from '@kbn/cloud-plugin/server'; import { DataViewsServerPluginStart } from '@kbn/data-views-plugin/server'; import { FeaturesPluginSetup } from '@kbn/features-plugin/server'; @@ -31,7 +31,7 @@ export interface SLOServerSetup {} export interface SLOServerStart {} export interface SLOPluginSetupDependencies { - alerting: PluginSetupContract; + alerting: AlertingServerSetup; ruleRegistry: RuleRegistryPluginSetupContract; share: SharePluginSetup; features: FeaturesPluginSetup; @@ -44,7 +44,7 @@ export interface SLOPluginSetupDependencies { } export interface SLOPluginStartDependencies { - alerting: PluginStartContract; + alerting: AlertingServerStart; taskManager: TaskManagerStartContract; spaces?: SpacesPluginStart; ruleRegistry: RuleRegistryPluginStartContract; diff --git a/x-pack/plugins/observability_solution/slo/tsconfig.json b/x-pack/plugins/observability_solution/slo/tsconfig.json index 3b01431c3fb45..125a8463be595 100644 --- a/x-pack/plugins/observability_solution/slo/tsconfig.json +++ b/x-pack/plugins/observability_solution/slo/tsconfig.json @@ -30,6 +30,7 @@ "@kbn/alerting-plugin", "@kbn/rison", "@kbn/embeddable-plugin", + "@kbn/embeddable-enhanced-plugin", "@kbn/lens-plugin", "@kbn/ui-theme", "@kbn/es-query", diff --git a/x-pack/plugins/observability_solution/synthetics/common/constants/synthetics_alerts.ts b/x-pack/plugins/observability_solution/synthetics/common/constants/synthetics_alerts.ts index 4f525bda17564..8a5812f46c6cb 100644 --- a/x-pack/plugins/observability_solution/synthetics/common/constants/synthetics_alerts.ts +++ b/x-pack/plugins/observability_solution/synthetics/common/constants/synthetics_alerts.ts @@ -8,6 +8,8 @@ import type { ActionGroup } from '@kbn/alerting-plugin/common'; import { i18n } from '@kbn/i18n'; +export { SYNTHETICS_STATUS_RULE, SYNTHETICS_TLS_RULE } from '@kbn/rule-data-utils'; + export type MonitorStatusActionGroup = | ActionGroup<'xpack.synthetics.alerts.actionGroups.monitorStatus'> | ActionGroup<'xpack.synthetics.alerts.actionGroups.tls'>; @@ -34,14 +36,6 @@ export const ACTION_GROUP_DEFINITIONS: { TLS_CERTIFICATE, }; -export const SYNTHETICS_STATUS_RULE = 'xpack.synthetics.alerts.monitorStatus'; -export const SYNTHETICS_TLS_RULE = 'xpack.synthetics.alerts.tls'; - -export const SYNTHETICS_ALERT_RULE_TYPES = { - MONITOR_STATUS: SYNTHETICS_STATUS_RULE, - TLS: SYNTHETICS_TLS_RULE, -}; - -export const SYNTHETICS_RULE_TYPES = [SYNTHETICS_STATUS_RULE, SYNTHETICS_TLS_RULE]; - export const SYNTHETICS_RULE_TYPES_ALERT_CONTEXT = 'observability.uptime'; + +export { SYNTHETICS_RULE_TYPE_IDS as SYNTHETICS_RULE_TYPES } from '@kbn/rule-data-utils'; diff --git a/x-pack/plugins/observability_solution/synthetics/common/rules/alert_actions.test.ts b/x-pack/plugins/observability_solution/synthetics/common/rules/alert_actions.test.ts index dd7ad03b9ac32..3bb2c9a4f5aef 100644 --- a/x-pack/plugins/observability_solution/synthetics/common/rules/alert_actions.test.ts +++ b/x-pack/plugins/observability_solution/synthetics/common/rules/alert_actions.test.ts @@ -291,4 +291,77 @@ describe('Alert Actions factory', () => { }, ]); }); + + it('generate expected action for email opsgenie connector', async () => { + const resp = populateAlertActions({ + groupId: SYNTHETICS_MONITOR_STATUS.id, + defaultActions: [ + { + frequency: { + notifyWhen: 'onActionGroupChange', + summary: false, + throttle: null, + }, + actionTypeId: '.opsgenie', + group: 'xpack.synthetics.alerts.actionGroups.monitorStatus', + params: {}, + id: 'f2a3b195-ed76-499a-805d-82d24d4eeba9', + }, + ] as unknown as ActionConnector[], + defaultEmail: { + to: ['test@email.com'], + }, + translations: { + defaultActionMessage: SyntheticsMonitorStatusTranslations.defaultActionMessage, + defaultRecoveryMessage: SyntheticsMonitorStatusTranslations.defaultRecoveryMessage, + defaultSubjectMessage: SyntheticsMonitorStatusTranslations.defaultSubjectMessage, + defaultRecoverySubjectMessage: + SyntheticsMonitorStatusTranslations.defaultRecoverySubjectMessage, + }, + }); + expect(resp).toEqual([ + { + frequency: { + notifyWhen: 'onActionGroupChange', + summary: false, + throttle: null, + }, + group: 'recovered', + id: 'f2a3b195-ed76-499a-805d-82d24d4eeba9', + params: { + subAction: 'closeAlert', + subActionParams: { + alias: '{{rule.id}}:{{alert.id}}', + description: + 'The alert for monitor "{{context.monitorName}}" from {{context.locationNames}} is no longer active: {{context.recoveryReason}}. - Elastic Synthetics\n\nDetails:\n\n- Monitor name: {{context.monitorName}} \n- {{context.monitorUrlLabel}}: {{{context.monitorUrl}}} \n- Monitor type: {{context.monitorType}} \n- From: {{context.locationNames}} \n- Last error received: {{{context.lastErrorMessage}}} \n{{{context.linkMessage}}}', + message: + 'Monitor "{{context.monitorName}}" ({{context.locationNames}}) {{context.recoveryStatus}} - Elastic Synthetics', + priority: 'P2', + tags: ['{{rule.tags}}'], + }, + }, + }, + { + frequency: { + notifyWhen: 'onActionGroupChange', + summary: false, + throttle: null, + }, + group: 'xpack.synthetics.alerts.actionGroups.monitorStatus', + id: 'f2a3b195-ed76-499a-805d-82d24d4eeba9', + params: { + subAction: 'createAlert', + subActionParams: { + alias: '{{rule.id}}:{{alert.id}}', + description: + 'Monitor "{{context.monitorName}}" is {{{context.status}}} from {{context.locationNames}}.{{{context.pendingLastRunAt}}} - Elastic Synthetics\n\nDetails:\n\n- Monitor name: {{context.monitorName}} \n- {{context.monitorUrlLabel}}: {{{context.monitorUrl}}} \n- Monitor type: {{context.monitorType}} \n- Checked at: {{context.checkedAt}} \n- From: {{context.locationNames}} \n- Reason: {{{context.reason}}} \n- Error received: {{{context.lastErrorMessage}}} \n{{{context.linkMessage}}}', + message: + 'Monitor "{{context.monitorName}}" ({{context.locationNames}}) is down - Elastic Synthetics', + priority: 'P2', + tags: ['{{rule.tags}}'], + }, + }, + }, + ]); + }); }); diff --git a/x-pack/plugins/observability_solution/synthetics/common/rules/alert_actions.ts b/x-pack/plugins/observability_solution/synthetics/common/rules/alert_actions.ts index 9b6d9d0992baa..a9981cd257ee6 100644 --- a/x-pack/plugins/observability_solution/synthetics/common/rules/alert_actions.ts +++ b/x-pack/plugins/observability_solution/synthetics/common/rules/alert_actions.ts @@ -14,10 +14,12 @@ import type { WebhookActionParams, EmailActionParams, SlackApiActionParams, + OpsgenieActionParams, } from '@kbn/stack-connectors-plugin/server/connector_types'; import { RuleAction as RuleActionOrig } from '@kbn/alerting-plugin/common'; import { v4 as uuidv4 } from 'uuid'; +import { OpsgenieSubActions } from '@kbn/stack-connectors-plugin/common'; import { ActionConnector, ActionTypeId } from './types'; import { DefaultEmail } from '../runtime_types'; @@ -31,6 +33,7 @@ export const SERVICE_NOW_ACTION_ID: ActionTypeId = '.servicenow'; export const JIRA_ACTION_ID: ActionTypeId = '.jira'; export const WEBHOOK_ACTION_ID: ActionTypeId = '.webhook'; export const EMAIL_ACTION_ID: ActionTypeId = '.email'; +export const OPSGENIE_ACTION_ID: ActionTypeId = '.opsgenie'; export type RuleAction = Omit; @@ -128,6 +131,14 @@ export function populateAlertActions({ actions.push(recoveredAction); } break; + case OPSGENIE_ACTION_ID: + // @ts-expect-error + action.params = getOpsgenieActionParams(translations); + // @ts-expect-error + recoveredAction.params = getOpsgenieActionParams(translations, true); + actions.push(recoveredAction); + break; + default: action.params = { message: translations.defaultActionMessage, @@ -293,3 +304,24 @@ function getEmailActionParams( }, }; } + +function getOpsgenieActionParams( + { + defaultActionMessage, + defaultSubjectMessage, + defaultRecoverySubjectMessage, + defaultRecoveryMessage, + }: Translations, + isRecovery?: boolean +): OpsgenieActionParams { + return { + subAction: isRecovery ? OpsgenieSubActions.CloseAlert : OpsgenieSubActions.CreateAlert, + subActionParams: { + alias: '{{rule.id}}:{{alert.id}}', + tags: ['{{rule.tags}}'], + message: isRecovery ? defaultRecoverySubjectMessage : defaultSubjectMessage, + description: isRecovery ? defaultRecoveryMessage : defaultActionMessage, + priority: 'P2', + }, + } as OpsgenieActionParams; +} diff --git a/x-pack/plugins/observability_solution/synthetics/common/rules/types.ts b/x-pack/plugins/observability_solution/synthetics/common/rules/types.ts index a1888a100c178..0186bc8dc5252 100644 --- a/x-pack/plugins/observability_solution/synthetics/common/rules/types.ts +++ b/x-pack/plugins/observability_solution/synthetics/common/rules/types.ts @@ -16,6 +16,7 @@ import type { TeamsConnectorTypeId, WebhookConnectorTypeId, EmailConnectorTypeId, + OpsgenieConnectorTypeId, } from '@kbn/stack-connectors-plugin/server/connector_types'; import type { ActionConnector as RawActionConnector } from '@kbn/triggers-actions-ui-plugin/public'; @@ -31,6 +32,7 @@ export type ActionTypeId = | typeof ServiceNowConnectorTypeId | typeof JiraConnectorTypeId | typeof WebhookConnectorTypeId - | typeof EmailConnectorTypeId; + | typeof EmailConnectorTypeId + | typeof OpsgenieConnectorTypeId; export type ActionConnector = Omit & { config?: SlackApiConfig }; diff --git a/x-pack/plugins/observability_solution/synthetics/e2e/synthetics/journeys/management_list.journey.ts b/x-pack/plugins/observability_solution/synthetics/e2e/synthetics/journeys/management_list.journey.ts index c81fe084194d5..7794099093c5e 100644 --- a/x-pack/plugins/observability_solution/synthetics/e2e/synthetics/journeys/management_list.journey.ts +++ b/x-pack/plugins/observability_solution/synthetics/e2e/synthetics/journeys/management_list.journey.ts @@ -69,6 +69,7 @@ journey(`MonitorManagementList`, async ({ page, params }) => { await page.click('span >> text="Journey / Page"'); await page.click('[aria-label="Apply the selected filters for Type"]'); expect(page.url()).toBe(`${pageBaseUrl}?monitorTypes=%5B%22browser%22%5D`); + await page.waitForTimeout(5000); await page.click('[placeholder="Search by name, URL, host, tag, project or location"]'); await Promise.all([ page.waitForNavigation({ diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/stats_overview/stats_overview_embeddable_factory.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/stats_overview/stats_overview_embeddable_factory.tsx index 83b37f080d422..df311819399f3 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/stats_overview/stats_overview_embeddable_factory.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/stats_overview/stats_overview_embeddable_factory.tsx @@ -67,6 +67,7 @@ export const getStatsOverviewEmbeddableFactory = ( i18n.translate('xpack.synthetics.editSloOverviewEmbeddableTitle.typeDisplayName', { defaultMessage: 'filters', }), + isEditingEnabled: () => true, onEdit: async () => { try { diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/alerts/tls_rule_ui.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/alerts/tls_rule_ui.tsx index a4e653bb1ddb0..eb97a0d5f3962 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/alerts/tls_rule_ui.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/alerts/tls_rule_ui.tsx @@ -9,8 +9,7 @@ import { useDispatch, useSelector } from 'react-redux'; import React, { useEffect } from 'react'; import { RuleTypeParamsExpressionProps } from '@kbn/triggers-actions-ui-plugin/public'; import { AlertTlsComponent } from './alert_tls'; -import { getDynamicSettings } from '../../state/settings/api'; -import { selectDynamicSettings } from '../../state/settings'; +import { getDynamicSettingsAction, selectDynamicSettings } from '../../state/settings'; import { TLSParams } from '../../../../../common/runtime_types/alerts/tls'; import { DYNAMIC_SETTINGS_DEFAULTS } from '../../../../../common/constants'; @@ -24,7 +23,7 @@ export const TLSRuleComponent: React.FC<{ useEffect(() => { if (typeof settings === 'undefined') { - dispatch(getDynamicSettings()); + dispatch(getDynamicSettingsAction.get()); } }, [dispatch, settings]); diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/components/permissions.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/components/permissions.tsx index 65b9732e217e9..4bc09bc9884d0 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/components/permissions.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/components/permissions.tsx @@ -33,15 +33,21 @@ export const FleetPermissionsCallout = () => { export const NoPermissionsTooltip = ({ canEditSynthetics = true, canUsePublicLocations = true, + canManagePrivateLocations = true, children, }: { canEditSynthetics?: boolean; canUsePublicLocations?: boolean; + canManagePrivateLocations?: boolean; children: ReactNode; }) => { const { isServiceAllowed } = useEnablement(); - const disabledMessage = getRestrictionReasonLabel(canEditSynthetics, canUsePublicLocations); + const disabledMessage = getRestrictionReasonLabel( + canEditSynthetics, + canUsePublicLocations, + canManagePrivateLocations + ); if (!isServiceAllowed) { return ( @@ -64,13 +70,18 @@ export const NoPermissionsTooltip = ({ function getRestrictionReasonLabel( canEditSynthetics = true, - canUsePublicLocations = true + canUsePublicLocations = true, + canManagePrivateLocations = true ): string | undefined { const message = !canEditSynthetics ? CANNOT_PERFORM_ACTION_SYNTHETICS : undefined; if (message) { return message; } + if (!canManagePrivateLocations) { + return NEED_PERMISSIONS_PRIVATE_LOCATIONS; + } + return !canUsePublicLocations ? CANNOT_PERFORM_ACTION_PUBLIC_LOCATIONS : undefined; } diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_details/hooks/use_fetch_active_alerts.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_details/hooks/use_fetch_active_alerts.ts index f81601e3ed413..ee00905ec7bd7 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_details/hooks/use_fetch_active_alerts.ts +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_details/hooks/use_fetch_active_alerts.ts @@ -6,7 +6,10 @@ */ 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 { + AlertConsumers, + SYNTHETICS_RULE_TYPE_IDS, +} from '@kbn/rule-registry-plugin/common/technical_rule_data_field_names'; import { useFetcher } from '@kbn/observability-shared-plugin/public'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { useParams } from 'react-router-dom'; @@ -25,7 +28,8 @@ export function useFetchActiveAlerts() { const { loading, data } = useFetcher(async () => { return await http.post(`${BASE_RAC_ALERTS_API_PATH}/find`, { body: JSON.stringify({ - feature_ids: [AlertConsumers.UPTIME], + rule_type_ids: SYNTHETICS_RULE_TYPE_IDS, + consumers: [AlertConsumers.UPTIME, AlertConsumers.ALERTS, AlertConsumers.OBSERVABILITY], size: 0, track_total_hits: true, query: { diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_details/monitor_alerts/monitor_detail_alerts.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_details/monitor_alerts/monitor_detail_alerts.tsx index 1737aa21b27d2..cb071a877d6ee 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_details/monitor_alerts/monitor_detail_alerts.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_details/monitor_alerts/monitor_detail_alerts.tsx @@ -6,7 +6,7 @@ */ import { EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiLoadingSpinner } from '@elastic/eui'; import React from 'react'; -import { AlertConsumers } from '@kbn/rule-data-utils'; +import { AlertConsumers, SYNTHETICS_RULE_TYPE_IDS } from '@kbn/rule-data-utils'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { useParams } from 'react-router-dom'; import { useRefreshedRangeFromUrl } from '../../../hooks'; @@ -44,7 +44,8 @@ export function MonitorDetailsAlerts() { configurationId={AlertConsumers.OBSERVABILITY} id={MONITOR_ALERTS_TABLE_ID} data-test-subj="monitorAlertsTable" - featureIds={[AlertConsumers.UPTIME]} + ruleTypeIds={SYNTHETICS_RULE_TYPE_IDS} + consumers={[AlertConsumers.UPTIME, AlertConsumers.ALERTS, AlertConsumers.OBSERVABILITY]} query={{ bool: { filter: [ diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_create_slo.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_create_slo.ts index c75bc5e489208..03c2c2ace9210 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_create_slo.ts +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/hooks/use_create_slo.ts @@ -41,10 +41,6 @@ export function useCreateSLO({ tags: [], }, }, - budgetingMethod: 'occurrences', - objective: { - target: 0.99, - }, tags: tags || [], groupBy: ['monitor.name', 'observer.geo.name', 'monitor.id'], }, diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/private_locations/locations_table.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/private_locations/locations_table.tsx index 8f8fe31a638cf..ac6b471c9046f 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/private_locations/locations_table.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/private_locations/locations_table.tsx @@ -52,7 +52,7 @@ export const PrivateLocationsTable = ({ const { locationMonitors, loading } = useLocationMonitors(); - const { canSave } = useSyntheticsSettingsContext(); + const { canSave, canManagePrivateLocations } = useSyntheticsSettingsContext(); const tagsList = privateLocations.reduce((acc, item) => { const tags = item.tags || []; @@ -128,13 +128,16 @@ export const PrivateLocationsTable = ({ const renderToolRight = () => { return [ - + setIsAddingNew(true)} iconType="plusInCircle" > diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/private_locations/manage_private_locations.test.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/private_locations/manage_private_locations.test.tsx index 24c32569f1f2a..5cabd6cf13742 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/private_locations/manage_private_locations.test.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/private_locations/manage_private_locations.test.tsx @@ -119,6 +119,7 @@ describe('', () => { const privateLocationName = 'Test private location'; jest.spyOn(settingsHooks, 'useSyntheticsSettingsContext').mockReturnValue({ canSave, + canManagePrivateLocations: true, } as SyntheticsSettingsContextValues); jest.spyOn(locationHooks, 'usePrivateLocationsAPI').mockReturnValue({ diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/contexts/synthetics_settings_context.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/contexts/synthetics_settings_context.tsx index d380d95c90aa4..518920ee0fd52 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/contexts/synthetics_settings_context.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/contexts/synthetics_settings_context.tsx @@ -45,6 +45,7 @@ export interface SyntheticsAppProps { export interface SyntheticsSettingsContextValues { canSave: boolean; + canManagePrivateLocations: boolean; basePath: string; dateRangeStart: string; dateRangeEnd: string; @@ -74,6 +75,7 @@ const defaultContext: SyntheticsSettingsContextValues = { isLogsAvailable: true, isDev: false, canSave: false, + canManagePrivateLocations: false, }; export const SyntheticsSettingsContext = createContext(defaultContext); @@ -96,6 +98,8 @@ export const SyntheticsSettingsContextProvider: React.FC { return { @@ -109,6 +113,7 @@ export const SyntheticsSettingsContextProvider: React.FC; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/hooks/use_breadcrumbs.test.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/hooks/use_breadcrumbs.test.tsx index c97cefc194069..687c2e833151d 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/hooks/use_breadcrumbs.test.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/hooks/use_breadcrumbs.test.tsx @@ -63,6 +63,7 @@ describe('useBreadcrumbs', () => { setBreadcrumbs: core.chrome.setBreadcrumbs, isInfraAvailable: false, isLogsAvailable: false, + canManagePrivateLocations: false, }} > diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/lib/alert_types/monitor_status.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/lib/alert_types/monitor_status.tsx index 794747853642c..7c8824a8d56c9 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/lib/alert_types/monitor_status.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/lib/alert_types/monitor_status.tsx @@ -7,7 +7,7 @@ import React from 'react'; -import { ALERT_REASON } from '@kbn/rule-data-utils'; +import { ALERT_REASON, SYNTHETICS_ALERT_RULE_TYPES } from '@kbn/rule-data-utils'; import type { ObservabilityRuleTypeModel } from '@kbn/observability-plugin/public'; import type { RuleTypeParamsExpressionProps } from '@kbn/triggers-actions-ui-plugin/public'; @@ -15,7 +15,6 @@ import { getSyntheticsErrorRouteFromMonitorId } from '../../../../../common/util import { STATE_ID } from '../../../../../common/field_names'; import { SyntheticsMonitorStatusTranslations } from '../../../../../common/rules/synthetics/translations'; import type { StatusRuleParams } from '../../../../../common/rules/status_rule'; -import { SYNTHETICS_ALERT_RULE_TYPES } from '../../../../../common/constants/synthetics_alerts'; import type { AlertTypeInitializer } from './types'; const { defaultActionMessage, defaultRecoveryMessage, description } = diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/lib/alert_types/tls.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/lib/alert_types/tls.tsx index 896a84cd1688c..10c45ece27a9f 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/lib/alert_types/tls.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/lib/alert_types/tls.tsx @@ -6,13 +6,12 @@ */ import React from 'react'; -import { ALERT_REASON } from '@kbn/rule-data-utils'; +import { ALERT_REASON, SYNTHETICS_ALERT_RULE_TYPES } from '@kbn/rule-data-utils'; import { ObservabilityRuleTypeModel } from '@kbn/observability-plugin/public'; import type { RuleTypeParamsExpressionProps } from '@kbn/triggers-actions-ui-plugin/public'; import { ValidationResult } from '@kbn/triggers-actions-ui-plugin/public'; import { TlsTranslations } from '../../../../../common/rules/synthetics/translations'; import { CERTIFICATES_ROUTE } from '../../../../../common/constants/ui'; -import { SYNTHETICS_ALERT_RULE_TYPES } from '../../../../../common/constants/synthetics_alerts'; import type { TLSParams } from '../../../../../common/runtime_types/alerts/tls'; import type { AlertTypeInitializer } from './types'; diff --git a/x-pack/plugins/observability_solution/synthetics/server/alert_rules/status_rule/monitor_status_rule.ts b/x-pack/plugins/observability_solution/synthetics/server/alert_rules/status_rule/monitor_status_rule.ts index ff4516a861225..1e3f8bf35e06b 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/alert_rules/status_rule/monitor_status_rule.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/alert_rules/status_rule/monitor_status_rule.ts @@ -10,16 +10,14 @@ import { isEmpty } from 'lodash'; import { GetViewInAppRelativeUrlFnOpts, AlertsClientError } from '@kbn/alerting-plugin/server'; import { observabilityPaths } from '@kbn/observability-plugin/common'; import apm from 'elastic-apm-node'; +import { SYNTHETICS_ALERT_RULE_TYPES } from '@kbn/rule-data-utils'; import { AlertOverviewStatus } from '../../../common/runtime_types/alert_rules/common'; import { StatusRuleExecutorOptions } from './types'; import { syntheticsRuleFieldMap } from '../../../common/rules/synthetics_rule_field_map'; import { SyntheticsPluginsSetupDependencies, SyntheticsServerSetup } from '../../types'; import { StatusRuleExecutor } from './status_rule_executor'; import { StatusRulePramsSchema } from '../../../common/rules/status_rule'; -import { - MONITOR_STATUS, - SYNTHETICS_ALERT_RULE_TYPES, -} from '../../../common/constants/synthetics_alerts'; +import { MONITOR_STATUS } from '../../../common/constants/synthetics_alerts'; import { setRecoveredAlertsContext, updateState, diff --git a/x-pack/plugins/observability_solution/synthetics/server/alert_rules/tls_rule/tls_rule.ts b/x-pack/plugins/observability_solution/synthetics/server/alert_rules/tls_rule/tls_rule.ts index 5f8fc43c5d91c..111d590a4fd76 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/alert_rules/tls_rule/tls_rule.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/alert_rules/tls_rule/tls_rule.ts @@ -14,6 +14,7 @@ import { AlertsClientError, } from '@kbn/alerting-plugin/server'; import { asyncForEach } from '@kbn/std'; +import { SYNTHETICS_ALERT_RULE_TYPES } from '@kbn/rule-data-utils'; import { getAlertDetailsUrl, observabilityPaths } from '@kbn/observability-plugin/common'; import { schema } from '@kbn/config-schema'; import { ObservabilityUptimeAlert } from '@kbn/alerts-as-data-utils'; @@ -22,10 +23,7 @@ import { SyntheticsPluginsSetupDependencies, SyntheticsServerSetup } from '../.. import { getCertSummary, getTLSAlertDocument, setTLSRecoveredAlertsContext } from './message_utils'; import { SyntheticsCommonState } from '../../../common/runtime_types/alert_rules/common'; import { TLSRuleExecutor } from './tls_rule_executor'; -import { - SYNTHETICS_ALERT_RULE_TYPES, - TLS_CERTIFICATE, -} from '../../../common/constants/synthetics_alerts'; +import { TLS_CERTIFICATE } from '../../../common/constants/synthetics_alerts'; import { SyntheticsRuleTypeAlertDefinition, updateState } from '../common'; import { ALERT_DETAILS_URL, getActionVariables } from '../action_variables'; import { SyntheticsMonitorClient } from '../../synthetics_service/synthetics_monitor/synthetics_monitor_client'; diff --git a/x-pack/plugins/observability_solution/synthetics/server/feature.ts b/x-pack/plugins/observability_solution/synthetics/server/feature.ts index 5a4c4d508853b..0e8a08e8aed13 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/feature.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/feature.ts @@ -11,9 +11,10 @@ import { SubFeaturePrivilegeGroupConfig, SubFeaturePrivilegeGroupType, } from '@kbn/features-plugin/common'; +import { ALERTING_FEATURE_ID } from '@kbn/alerting-plugin/common'; +import { UPTIME_RULE_TYPE_IDS, SYNTHETICS_RULE_TYPE_IDS } from '@kbn/rule-data-utils'; import { KibanaFeatureScope } from '@kbn/features-plugin/common'; import { syntheticsMonitorType, syntheticsParamType } from '../common/types/saved_objects'; -import { SYNTHETICS_RULE_TYPES } from '../common/constants/synthetics_alerts'; import { legacyPrivateLocationsSavedObjectName, privateLocationSavedObjectName, @@ -25,22 +26,22 @@ import { } from './saved_objects/synthetics_settings'; import { syntheticsApiKeyObjectType } from './saved_objects/service_api_key'; -const UPTIME_RULE_TYPES = [ - 'xpack.uptime.alerts.tls', - 'xpack.uptime.alerts.tlsCertificate', - 'xpack.uptime.alerts.monitorStatus', - 'xpack.uptime.alerts.durationAnomaly', -]; +export const PRIVATE_LOCATION_WRITE_API = 'private-location-write'; -const ruleTypes = [...UPTIME_RULE_TYPES, ...SYNTHETICS_RULE_TYPES]; +const ruleTypes = [...UPTIME_RULE_TYPE_IDS, ...SYNTHETICS_RULE_TYPE_IDS]; + +const alertingFeatures = ruleTypes.map((ruleTypeId) => ({ + ruleTypeId, + consumers: [PLUGIN.ID, ALERTING_FEATURE_ID], +})); const elasticManagedLocationsEnabledPrivilege: SubFeaturePrivilegeGroupConfig = { groupType: 'independent' as SubFeaturePrivilegeGroupType, privileges: [ { id: 'elastic_managed_locations_enabled', - name: i18n.translate('xpack.synthetics.features.elasticManagedLocations', { - defaultMessage: 'Elastic managed locations enabled', + name: i18n.translate('xpack.synthetics.features.elasticManagedLocations.label', { + defaultMessage: 'Enabled', }), includeIn: 'all', savedObject: { @@ -52,6 +53,25 @@ const elasticManagedLocationsEnabledPrivilege: SubFeaturePrivilegeGroupConfig = ], }; +const canManagePrivateLocationsPrivilege: SubFeaturePrivilegeGroupConfig = { + groupType: 'independent' as SubFeaturePrivilegeGroupType, + privileges: [ + { + id: 'can_manage_private_locations', + name: i18n.translate('xpack.synthetics.features.canManagePrivateLocations', { + defaultMessage: 'Can manage', + }), + includeIn: 'all', + api: [PRIVATE_LOCATION_WRITE_API], + savedObject: { + all: [privateLocationSavedObjectName, legacyPrivateLocationsSavedObjectName], + read: [], + }, + ui: ['canManagePrivateLocations'], + }, + ], +}; + export const syntheticsFeature = { id: PLUGIN.ID, name: PLUGIN.NAME, @@ -63,7 +83,7 @@ export const syntheticsFeature = { management: { insightsAndAlerting: ['triggersActions'], }, - alerting: ruleTypes, + alerting: alertingFeatures, privileges: { all: { app: ['uptime', 'kibana', 'synthetics'], @@ -74,20 +94,19 @@ export const syntheticsFeature = { syntheticsSettingsObjectType, syntheticsMonitorType, syntheticsApiKeyObjectType, - privateLocationSavedObjectName, - legacyPrivateLocationsSavedObjectName, syntheticsParamType, + // uptime settings object is also registered here since feature is shared between synthetics and uptime uptimeSettingsObjectType, ], - read: [], + read: [privateLocationSavedObjectName, legacyPrivateLocationsSavedObjectName], }, alerting: { rule: { - all: ruleTypes, + all: alertingFeatures, }, alert: { - all: ruleTypes, + all: alertingFeatures, }, }, management: { @@ -114,10 +133,10 @@ export const syntheticsFeature = { }, alerting: { rule: { - read: ruleTypes, + read: alertingFeatures, }, alert: { - read: ruleTypes, + read: alertingFeatures, }, }, management: { @@ -128,10 +147,24 @@ export const syntheticsFeature = { }, subFeatures: [ { - name: i18n.translate('xpack.synthetics.features.app', { - defaultMessage: 'Synthetics', + name: i18n.translate('xpack.synthetics.features.app.elastic', { + defaultMessage: 'Elastic managed locations', + }), + description: i18n.translate('xpack.synthetics.features.app.elasticDescription', { + defaultMessage: + 'This feature enables users to create monitors that execute tests from Elastic managed infrastructure around the globe. There is an additional charge to use Elastic Managed testing locations. See the Elastic Cloud Pricing https://www.elastic.co/pricing page for current prices.', }), privilegeGroups: [elasticManagedLocationsEnabledPrivilege], }, + { + name: i18n.translate('xpack.synthetics.features.app.private', { + defaultMessage: 'Private locations', + }), + description: i18n.translate('xpack.synthetics.features.app.private,description', { + defaultMessage: + 'This feature allows you to manage your private locations, for example adding, or deleting them.', + }), + privilegeGroups: [canManagePrivateLocationsPrivilege], + }, ], }; diff --git a/x-pack/plugins/observability_solution/synthetics/server/lib.ts b/x-pack/plugins/observability_solution/synthetics/server/lib.ts index 94150c0fb8ee5..8a703e1c051e8 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/lib.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/lib.ts @@ -158,7 +158,7 @@ export class SyntheticsEsClient { esError, esRequestParams: { index: SYNTHETICS_INDEX_PATTERN, ...request }, esRequestStatus: RequestStatus.OK, - esResponse: res.body.responses[index], + esResponse: res?.body.responses[index], kibanaRequest: this.request!, operationName: operationName ?? '', startTime: startTimeNow, @@ -168,9 +168,10 @@ export class SyntheticsEsClient { } return { - responses: res.body?.responses as unknown as Array< - InferSearchResponseOf - >, + responses: + (res?.body?.responses as unknown as Array< + InferSearchResponseOf + >) ?? [], }; } diff --git a/x-pack/plugins/observability_solution/synthetics/server/routes/default_alerts/default_alert_service.ts b/x-pack/plugins/observability_solution/synthetics/server/routes/default_alerts/default_alert_service.ts index 2e2263f6e3965..d13395a42ca1a 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/routes/default_alerts/default_alert_service.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/routes/default_alerts/default_alert_service.ts @@ -99,7 +99,7 @@ export class DefaultAlertService { } async getExistingAlert(ruleType: DefaultRuleType) { - const rulesClient = (await this.context.alerting)?.getRulesClient(); + const rulesClient = await (await this.context.alerting)?.getRulesClient(); const { data } = await rulesClient.find({ options: { @@ -123,7 +123,7 @@ export class DefaultAlertService { } const actions = await this.getAlertActions(ruleType); - const rulesClient = (await this.context.alerting)?.getRulesClient(); + const rulesClient = await (await this.context.alerting)?.getRulesClient(); const { actions: actionsFromRules = [], systemActions = [], @@ -158,7 +158,7 @@ export class DefaultAlertService { minimumRuleInterval ); } else { - const rulesClient = (await this.context.alerting)?.getRulesClient(); + const rulesClient = await (await this.context.alerting)?.getRulesClient(); await rulesClient.bulkDeleteRules({ filter: `alert.attributes.alertTypeId:"${SYNTHETICS_STATUS_RULE}" AND alert.attributes.tags:"SYNTHETICS_DEFAULT_ALERT"`, }); @@ -174,7 +174,7 @@ export class DefaultAlertService { minimumRuleInterval ); } else { - const rulesClient = (await this.context.alerting)?.getRulesClient(); + const rulesClient = await (await this.context.alerting)?.getRulesClient(); await rulesClient.bulkDeleteRules({ filter: `alert.attributes.alertTypeId:"${SYNTHETICS_TLS_RULE}" AND alert.attributes.tags:"SYNTHETICS_DEFAULT_ALERT"`, }); @@ -182,7 +182,7 @@ export class DefaultAlertService { } async upsertDefaultAlert(ruleType: DefaultRuleType, name: string, interval: string) { - const rulesClient = (await this.context.alerting)?.getRulesClient(); + const rulesClient = await (await this.context.alerting)?.getRulesClient(); const alert = await this.getExistingAlert(ruleType); if (alert) { diff --git a/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/add_monitor_project.ts b/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/add_monitor_project.ts index 8311a6407bf6a..db8fbdd661f76 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/add_monitor_project.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/add_monitor_project.ts @@ -14,7 +14,7 @@ import { ProjectMonitor } from '../../../common/runtime_types'; import { SYNTHETICS_API_URLS } from '../../../common/constants'; import { ProjectMonitorFormatter } from '../../synthetics_service/project_monitor/project_monitor_formatter'; -const MAX_PAYLOAD_SIZE = 1048576 * 50; // 20MiB +const MAX_PAYLOAD_SIZE = 1048576 * 50; // 50MiB export const addSyntheticsProjectMonitorRoute: SyntheticsRestApiRouteFactory = () => ({ method: 'PUT', diff --git a/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/edit_monitor.ts b/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/edit_monitor.ts index d460b71037950..2b815313c79c9 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/edit_monitor.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/edit_monitor.ts @@ -305,7 +305,7 @@ export const syncEditedMonitor = async ({ }; export const validatePermissions = async ( - { server, response, request }: RouteContext, + routeContext: RouteContext, monitorLocations: MonitorLocations ) => { const hasPublicLocations = monitorLocations?.some((loc) => loc.isServiceManaged); @@ -313,19 +313,26 @@ export const validatePermissions = async ( return; } - const elasticManagedLocationsEnabled = - Boolean( - ( - await server.coreStart?.capabilities.resolveCapabilities(request, { - capabilityPath: 'uptime.*', - }) - ).uptime.elasticManagedLocationsEnabled - ) ?? true; + const { elasticManagedLocationsEnabled } = await validateLocationPermissions(routeContext); if (!elasticManagedLocationsEnabled) { return ELASTIC_MANAGED_LOCATIONS_DISABLED; } }; +export const validateLocationPermissions = async ({ server, request }: RouteContext) => { + const uptimeFeature = await server.coreStart?.capabilities.resolveCapabilities(request, { + capabilityPath: 'uptime.*', + }); + const elasticManagedLocationsEnabled = + Boolean(uptimeFeature.uptime.elasticManagedLocationsEnabled) ?? true; + const canManagePrivateLocations = Boolean(uptimeFeature.uptime.canManagePrivateLocations) ?? true; + + return { + canManagePrivateLocations, + elasticManagedLocationsEnabled, + }; +}; + const getInvalidOriginError = (monitor: SyntheticsMonitor) => { return { body: { diff --git a/x-pack/plugins/observability_solution/synthetics/server/routes/overview_trends/overview_trends.ts b/x-pack/plugins/observability_solution/synthetics/server/routes/overview_trends/overview_trends.ts index d68fc71c59b11..66be7171b2fe4 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/routes/overview_trends/overview_trends.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/routes/overview_trends/overview_trends.ts @@ -53,6 +53,7 @@ export async function fetchTrends( export const createOverviewTrendsRoute: SyntheticsRestApiRouteFactory = () => ({ method: 'POST', + writeAccess: false, path: SYNTHETICS_API_URLS.OVERVIEW_TRENDS, validate: { body: schema.arrayOf( diff --git a/x-pack/plugins/observability_solution/synthetics/server/routes/settings/private_locations/add_private_location.ts b/x-pack/plugins/observability_solution/synthetics/server/routes/settings/private_locations/add_private_location.ts index 1feb120b2ea14..fa88de31e3ec8 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/routes/settings/private_locations/add_private_location.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/routes/settings/private_locations/add_private_location.ts @@ -6,6 +6,7 @@ */ import { schema, TypeOf } from '@kbn/config-schema'; +import { PRIVATE_LOCATION_WRITE_API } from '../../../feature'; import { migrateLegacyPrivateLocations } from './migrate_legacy_private_locations'; import { SyntheticsRestApiRouteFactory } from '../../types'; import { getPrivateLocationsAndAgentPolicies } from './get_private_locations'; @@ -38,10 +39,12 @@ export const addPrivateLocationRoute: SyntheticsRestApiRouteFactory { - await migrateLegacyPrivateLocations(routeContext); + const { response, request, savedObjectsClient, syntheticsMonitorClient, server } = routeContext; + const internalSOClient = server.coreStart.savedObjects.createInternalRepository(); - const { response, request, savedObjectsClient, syntheticsMonitorClient } = routeContext; + await migrateLegacyPrivateLocations(internalSOClient, server.logger); const location = request.body as PrivateLocationObject; diff --git a/x-pack/plugins/observability_solution/synthetics/server/routes/settings/private_locations/delete_private_location.ts b/x-pack/plugins/observability_solution/synthetics/server/routes/settings/private_locations/delete_private_location.ts index bac3907eac871..d01b255dd2b32 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/routes/settings/private_locations/delete_private_location.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/routes/settings/private_locations/delete_private_location.ts @@ -7,6 +7,7 @@ import { schema } from '@kbn/config-schema'; import { isEmpty } from 'lodash'; +import { PRIVATE_LOCATION_WRITE_API } from '../../../feature'; import { migrateLegacyPrivateLocations } from './migrate_legacy_private_locations'; import { getMonitorsByLocation } from './get_location_monitors'; import { getPrivateLocationsAndAgentPolicies } from './get_private_locations'; @@ -25,10 +26,13 @@ export const deletePrivateLocationRoute: SyntheticsRestApiRouteFactory { - await migrateLegacyPrivateLocations(routeContext); - const { savedObjectsClient, syntheticsMonitorClient, request, response, server } = routeContext; + const internalSOClient = server.coreStart.savedObjects.createInternalRepository(); + + await migrateLegacyPrivateLocations(internalSOClient, server.logger); + const { locationId } = request.params as { locationId: string }; const { locations } = await getPrivateLocationsAndAgentPolicies( diff --git a/x-pack/plugins/observability_solution/synthetics/server/routes/settings/private_locations/get_private_locations.ts b/x-pack/plugins/observability_solution/synthetics/server/routes/settings/private_locations/get_private_locations.ts index d884bba5c2b0a..90d2e861379ad 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/routes/settings/private_locations/get_private_locations.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/routes/settings/private_locations/get_private_locations.ts @@ -31,9 +31,11 @@ export const getPrivateLocationsRoute: SyntheticsRestApiRouteFactory< }, }, handler: async (routeContext) => { - await migrateLegacyPrivateLocations(routeContext); + const { savedObjectsClient, syntheticsMonitorClient, request, response, server } = routeContext; + + const internalSOClient = server.coreStart.savedObjects.createInternalRepository(); + await migrateLegacyPrivateLocations(internalSOClient, server.logger); - const { savedObjectsClient, syntheticsMonitorClient, request, response } = routeContext; const { id } = request.params as { id?: string }; const { locations, agentPolicies } = await getPrivateLocationsAndAgentPolicies( diff --git a/x-pack/plugins/observability_solution/synthetics/server/routes/settings/private_locations/migrate_legacy_private_locations.test.ts b/x-pack/plugins/observability_solution/synthetics/server/routes/settings/private_locations/migrate_legacy_private_locations.test.ts index 2305853aab3f1..f1e3101523c23 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/routes/settings/private_locations/migrate_legacy_private_locations.test.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/routes/settings/private_locations/migrate_legacy_private_locations.test.ts @@ -6,42 +6,28 @@ */ import { migrateLegacyPrivateLocations } from './migrate_legacy_private_locations'; -import { SyntheticsServerSetup } from '../../../types'; -import { coreMock, savedObjectsClientMock } from '@kbn/core/server/mocks'; +import { savedObjectsRepositoryMock } from '@kbn/core/server/mocks'; import { loggerMock } from '@kbn/logging-mocks'; -import { - type ISavedObjectsRepository, - SavedObjectsClientContract, -} from '@kbn/core-saved-objects-api-server'; +import { type ISavedObjectsRepository } from '@kbn/core-saved-objects-api-server'; +import { Logger } from '@kbn/logging'; describe('migrateLegacyPrivateLocations', () => { - let serverMock: SyntheticsServerSetup; - let savedObjectsClient: jest.Mocked; - let repositoryMock: ISavedObjectsRepository; + let loggerMockVal: Logger; + let repositoryMock: jest.Mocked; beforeEach(() => { - const coreStartMock = coreMock.createStart(); - serverMock = { - coreStart: coreStartMock, - logger: loggerMock.create(), - } as any; - savedObjectsClient = savedObjectsClientMock.create(); - repositoryMock = coreMock.createStart().savedObjects.createInternalRepository(); - - coreStartMock.savedObjects.createInternalRepository.mockReturnValue(repositoryMock); + repositoryMock = savedObjectsRepositoryMock.create(); + loggerMockVal = loggerMock.create(); }); it('should get the legacy private locations', async () => { - savedObjectsClient.get.mockResolvedValueOnce({ + repositoryMock.get.mockResolvedValueOnce({ attributes: { locations: [{ id: '1', label: 'Location 1' }] }, } as any); - savedObjectsClient.find.mockResolvedValueOnce({ total: 1 } as any); + repositoryMock.find.mockResolvedValueOnce({ total: 1 } as any); - await migrateLegacyPrivateLocations({ - server: serverMock, - savedObjectsClient, - } as any); + await migrateLegacyPrivateLocations(repositoryMock, loggerMockVal); - expect(savedObjectsClient.get).toHaveBeenCalledWith( + expect(repositoryMock.get).toHaveBeenCalledWith( 'synthetics-privates-locations', 'synthetics-privates-locations-singleton' ); @@ -49,43 +35,36 @@ describe('migrateLegacyPrivateLocations', () => { it('should log and return if an error occurs while getting legacy private locations', async () => { const error = new Error('Get error'); - savedObjectsClient.get.mockRejectedValueOnce(error); - - await migrateLegacyPrivateLocations({ - server: serverMock, - savedObjectsClient, + repositoryMock.get.mockResolvedValueOnce({ + attributes: { locations: [{ id: '1', label: 'Location 1' }] }, } as any); + repositoryMock.bulkCreate.mockRejectedValueOnce(error); + + await migrateLegacyPrivateLocations(repositoryMock, loggerMockVal); - expect(serverMock.logger.error).toHaveBeenCalledWith( - `Error getting legacy private locations: ${error}` + expect(loggerMockVal.error).toHaveBeenCalledWith( + 'Error migrating legacy private locations: Error: Get error' ); - expect(repositoryMock.bulkCreate).not.toHaveBeenCalled(); }); it('should return if there are no legacy locations', async () => { - savedObjectsClient.get.mockResolvedValueOnce({ + repositoryMock.get.mockResolvedValueOnce({ attributes: { locations: [] }, } as any); - await migrateLegacyPrivateLocations({ - server: serverMock, - savedObjectsClient: savedObjectsClientMock, - } as any); + await migrateLegacyPrivateLocations(repositoryMock, loggerMockVal); expect(repositoryMock.bulkCreate).not.toHaveBeenCalled(); }); it('should bulk create new private locations if there are legacy locations', async () => { const legacyLocations = [{ id: '1', label: 'Location 1' }]; - savedObjectsClient.get.mockResolvedValueOnce({ + repositoryMock.get.mockResolvedValueOnce({ attributes: { locations: legacyLocations }, } as any); - savedObjectsClient.find.mockResolvedValueOnce({ total: 1 } as any); + repositoryMock.find.mockResolvedValueOnce({ total: 1 } as any); - await migrateLegacyPrivateLocations({ - server: serverMock, - savedObjectsClient, - } as any); + await migrateLegacyPrivateLocations(repositoryMock, loggerMockVal); expect(repositoryMock.bulkCreate).toHaveBeenCalledWith( legacyLocations.map((location) => ({ @@ -100,17 +79,14 @@ describe('migrateLegacyPrivateLocations', () => { it('should delete legacy private locations if bulk create count matches', async () => { const legacyLocations = [{ id: '1', label: 'Location 1' }]; - savedObjectsClient.get.mockResolvedValueOnce({ + repositoryMock.get.mockResolvedValueOnce({ attributes: { locations: legacyLocations }, } as any); - savedObjectsClient.find.mockResolvedValueOnce({ total: 1 } as any); + repositoryMock.find.mockResolvedValueOnce({ total: 1 } as any); - await migrateLegacyPrivateLocations({ - server: serverMock, - savedObjectsClient, - } as any); + await migrateLegacyPrivateLocations(repositoryMock, loggerMockVal); - expect(savedObjectsClient.delete).toHaveBeenCalledWith( + expect(repositoryMock.delete).toHaveBeenCalledWith( 'synthetics-privates-locations', 'synthetics-privates-locations-singleton', {} diff --git a/x-pack/plugins/observability_solution/synthetics/server/routes/settings/private_locations/migrate_legacy_private_locations.ts b/x-pack/plugins/observability_solution/synthetics/server/routes/settings/private_locations/migrate_legacy_private_locations.ts index cd73e27b950e3..e823e7764f540 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/routes/settings/private_locations/migrate_legacy_private_locations.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/routes/settings/private_locations/migrate_legacy_private_locations.ts @@ -6,6 +6,8 @@ */ import { SavedObject } from '@kbn/core-saved-objects-server'; +import type { ISavedObjectsRepository } from '@kbn/core-saved-objects-api-server'; +import { Logger } from '@kbn/logging'; import { type PrivateLocationAttributes, SyntheticsPrivateLocationsAttributes, @@ -15,21 +17,20 @@ import { legacyPrivateLocationsSavedObjectName, privateLocationSavedObjectName, } from '../../../../common/saved_objects/private_locations'; -import { RouteContext } from '../../types'; -export const migrateLegacyPrivateLocations = async ({ - server, - savedObjectsClient, -}: RouteContext) => { +export const migrateLegacyPrivateLocations = async ( + soClient: ISavedObjectsRepository, + logger: Logger +) => { try { let obj: SavedObject | undefined; try { - obj = await savedObjectsClient.get( + obj = await soClient.get( legacyPrivateLocationsSavedObjectName, legacyPrivateLocationsSavedObjectId ); } catch (e) { - server.logger.error(`Error getting legacy private locations: ${e}`); + // we don't need to do anything if the legacy object doesn't exist return; } const legacyLocations = obj?.attributes.locations ?? []; @@ -37,8 +38,6 @@ export const migrateLegacyPrivateLocations = async ({ return; } - const soClient = server.coreStart.savedObjects.createInternalRepository(); - await soClient.bulkCreate( legacyLocations.map((location) => ({ id: location.id, @@ -51,20 +50,21 @@ export const migrateLegacyPrivateLocations = async ({ } ); - const { total } = await savedObjectsClient.find({ + const { total } = await soClient.find({ type: privateLocationSavedObjectName, fields: [], perPage: 0, + namespaces: ['*'], }); if (total === legacyLocations.length) { - await savedObjectsClient.delete( + await soClient.delete( legacyPrivateLocationsSavedObjectName, legacyPrivateLocationsSavedObjectId, {} ); } } catch (e) { - server.logger.error(`Error migrating legacy private locations: ${e}`); + logger.error(`Error migrating legacy private locations: ${e}`); } }; diff --git a/x-pack/plugins/observability_solution/synthetics/server/routes/types.ts b/x-pack/plugins/observability_solution/synthetics/server/routes/types.ts index fa481d16b92bf..837197d72d23a 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/routes/types.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/routes/types.ts @@ -38,6 +38,7 @@ export type SupportedMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'; export interface UMServerRoute { method: SupportedMethod; writeAccess?: boolean; + requiredPrivileges?: string[]; handler: T; validation?: VersionedRouteValidation; streamHandler?: ( diff --git a/x-pack/plugins/observability_solution/synthetics/server/runtime_types/private_locations.ts b/x-pack/plugins/observability_solution/synthetics/server/runtime_types/private_locations.ts index f695662e811e3..b7eaea482db92 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/runtime_types/private_locations.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/runtime_types/private_locations.ts @@ -21,6 +21,7 @@ export const PrivateLocationAttributesCodec = t.intersection([ lon: t.number, }), namespace: t.string, + spaces: t.array(t.string), }), ]); diff --git a/x-pack/plugins/observability_solution/synthetics/server/synthetics_route_wrapper.ts b/x-pack/plugins/observability_solution/synthetics/server/synthetics_route_wrapper.ts index 697cf93d74213..da3887ac94d56 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/synthetics_route_wrapper.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/synthetics_route_wrapper.ts @@ -24,7 +24,11 @@ export const syntheticsRouteWrapper: SyntheticsRouteWrapper = ( }, security: { authz: { - requiredPrivileges: ['uptime-read', ...(uptimeRoute?.writeAccess ? ['uptime-write'] : [])], + requiredPrivileges: [ + 'uptime-read', + ...(uptimeRoute.requiredPrivileges ?? []), + ...(uptimeRoute?.writeAccess ? ['uptime-write'] : []), + ], }, }, handler: async (context, request, response) => { diff --git a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/service_api_client.test.ts b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/service_api_client.test.ts index 93b3ca2fb3742..cab8157ca3567 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/service_api_client.test.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/service_api_client.test.ts @@ -470,6 +470,61 @@ describe('callAPI', () => { url: 'https://service.dev/monitors/sync', }); }); + + it('splits the payload into multiple requests if the payload is too large', async () => { + const requests: number[] = []; + const axiosSpy = (axios as jest.MockedFunction).mockImplementation((req: any) => { + requests.push(req.data.monitors.length); + if (req.data.monitors.length > 100) { + // throw 413 error + return Promise.reject({ response: { status: 413 } }); + } + + return Promise.resolve({} as any); + }); + + const apiClient = new ServiceAPIClient( + logger, + { + manifestUrl: 'http://localhost:8080/api/manifest', + tls: { certificate: 'test-certificate', key: 'test-key' } as any, + }, + { + isDev: true, + stackVersion: '8.7.0', + cloud: { cloudId: 'test-id', deploymentId: 'deployment-id' }, + } as SyntheticsServerSetup + ); + + apiClient.locations = testLocations; + + const output = { hosts: ['https://localhost:9200'], api_key: '12345' }; + + const monitors = new Array(250).fill({ + ...request1[0], + locations: [ + { + id: 'us_central', + isServiceManaged: true, + }, + ], + }); + + await apiClient.syncMonitors({ + monitors, + output, + license: licenseMock.license, + location: { + id: 'us_central', + url: 'https://service.dev', + label: 'Test location', + isServiceManaged: true, + }, + }); + + expect(axiosSpy).toHaveBeenCalledTimes(7); + expect(requests).toEqual([250, 125, 125, 63, 62, 63, 62]); + }); }); const testLocations: PublicLocations = [ diff --git a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/service_api_client.ts b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/service_api_client.ts index 73f286e40d310..3f9959440b3e9 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/service_api_client.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/service_api_client.ts @@ -6,7 +6,7 @@ */ import axios, { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios'; -import { forkJoin, from as rxjsFrom, Observable, of } from 'rxjs'; +import { concat, forkJoin, from as rxjsFrom, Observable, of } from 'rxjs'; import { catchError, tap } from 'rxjs'; import * as https from 'https'; import { SslConfig } from '@kbn/server-http-tools'; @@ -215,21 +215,47 @@ export class ServiceAPIClient { const monitorsByLocation = this.processServiceData(serviceData); - monitorsByLocation.forEach(({ location: { url, id }, monitors, data }) => { - const promise = this.callServiceEndpoint(data, method, url, endpoint); - promises.push( - rxjsFrom(promise).pipe( + monitorsByLocation.forEach(({ location: { url, id }, data }) => { + const sendRequest = (payload: ServicePayload): Observable => { + const promise = this.callServiceEndpoint(payload, method, url, endpoint); + return rxjsFrom(promise).pipe( tap((result) => { - this.logSuccessMessage(url, method, monitors.length, result); + this.logSuccessMessage(url, method, payload.monitors.length, result); }), catchError((err: AxiosError<{ reason: string; status: number }>) => { + if (err.response?.status === 413 && payload.monitors.length > 1) { + // If payload is too large, split it and retry + const mid = Math.ceil(payload.monitors.length / 2); + const firstHalfMonitors = payload.monitors.slice(0, mid); + const secondHalfMonitors = payload.monitors.slice(mid); + + this.logger.debug( + `Payload of ${payload.monitors.length} monitors is too large for location ${id}, splitting in half, in chunks of ${mid}` + ); + + return concat( + sendRequest({ + ...payload, + monitors: firstHalfMonitors, + }), // Retry with the first half + sendRequest({ + ...payload, + monitors: secondHalfMonitors, + }) // Retry with the second half + ); + } + pushErrors.push({ locationId: id, error: err.response?.data! }); - this.logServiceError(err, url, method, monitors.length); - // we don't want to throw an unhandled exception here + this.logServiceError(err, url, method, payload.monitors.length); + + // Return an empty observable to prevent unhandled exceptions return of(true); }) - ) - ); + ); + }; + + // Start with the initial data payload + promises.push(sendRequest(data)); }); const result = await forkJoin(promises).toPromise(); diff --git a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/synthetics_service.ts b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/synthetics_service.ts index be72ca4d9a496..c223de84c42dc 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/synthetics_service.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/synthetics_service.ts @@ -152,7 +152,9 @@ export class SyntheticsService { service.locations = result.locations; service.apiClient.locations = result.locations; this.logger.debug( - `Fetched ${service.locations} Synthetics service locations from manifest: ${this.config.manifestUrl}` + `Fetched ${service.locations + .map((loc) => loc.id) + .join(',')} Synthetics service locations from manifest: ${this.config.manifestUrl}` ); } catch (e) { this.logger.error(e); @@ -167,7 +169,7 @@ export class SyntheticsService { [SYNTHETICS_SERVICE_SYNC_MONITORS_TASK_TYPE]: { title: 'Synthetics Service - Sync Saved Monitors', description: 'This task periodically pushes saved monitors to Synthetics Service.', - timeout: '1m', + timeout: '2m', maxAttempts: 3, createTaskRunner: ({ taskInstance }: { taskInstance: ConcreteTaskInstance }) => { @@ -670,10 +672,10 @@ export class SyntheticsService { if (lastRunAt) { // log if it has missed last schedule - const diff = moment(lastRunAt).diff(current, 'minutes'); + const diff = moment(current).diff(lastRunAt, 'minutes'); const syncInterval = Number((this.config.syncInterval ?? '5m').split('m')[0]); if (diff > syncInterval) { - const message = `Synthetics monitor sync task has missed its schedule, it last ran ${diff} ago.`; + const message = `Synthetics monitor sync task has missed its schedule, it last ran ${diff} minutes ago.`; this.logger.warn(message); sendErrorTelemetryEvents(this.logger, this.server.telemetry, { message, @@ -681,11 +683,8 @@ export class SyntheticsService { type: 'syncTaskMissedSchedule', stackVersion: this.server.stackVersion, }); - } else { - this.logger.debug( - `Synthetics monitor sync task is running as expected, it last ran ${diff} minutes ago.` - ); } + this.logger.debug(`Synthetics monitor sync task last ran ${diff} minutes ago.`); } state.lastRunAt = current.toISOString(); } catch (e) { diff --git a/x-pack/plugins/observability_solution/synthetics/server/types.ts b/x-pack/plugins/observability_solution/synthetics/server/types.ts index e024721101d1f..1a8016830c085 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/types.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/types.ts @@ -17,10 +17,7 @@ import { Logger, SavedObjectsClientContract, } from '@kbn/core/server'; -import { - PluginStartContract as AlertingPluginStart, - PluginSetupContract as AlertingPluginSetup, -} from '@kbn/alerting-plugin/server'; +import { AlertingServerSetup, AlertingServerStart } from '@kbn/alerting-plugin/server'; import { SharePluginSetup } from '@kbn/share-plugin/server'; import { ObservabilityPluginSetup } from '@kbn/observability-plugin/server'; import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; @@ -62,14 +59,14 @@ export interface SyntheticsServerSetup { basePath: IBasePath; isDev?: boolean; coreStart: CoreStart; - alerting: AlertingPluginSetup; + alerting: AlertingServerSetup; pluginsStart: SyntheticsPluginsStartDependencies; isElasticsearchServerless: boolean; } export interface SyntheticsPluginsSetupDependencies { features: FeaturesPluginSetup; - alerting: AlertingPluginSetup; + alerting: AlertingServerSetup; observability: ObservabilityPluginSetup; usageCollection: UsageCollectionSetup; ml: MlSetup; @@ -90,7 +87,7 @@ export interface SyntheticsPluginsStartDependencies { taskManager: TaskManagerStartContract; telemetry: TelemetryPluginStart; spaces?: SpacesPluginStart; - alerting: AlertingPluginStart; + alerting: AlertingServerStart; } export type UptimeRequestHandlerContext = CustomRequestHandlerContext<{ diff --git a/x-pack/plugins/observability_solution/uptime/common/constants/synthetics_alerts.ts b/x-pack/plugins/observability_solution/uptime/common/constants/synthetics_alerts.ts index 223b8909de96e..5de01b708ea2c 100644 --- a/x-pack/plugins/observability_solution/uptime/common/constants/synthetics_alerts.ts +++ b/x-pack/plugins/observability_solution/uptime/common/constants/synthetics_alerts.ts @@ -42,6 +42,4 @@ export const SYNTHETICS_ALERT_RULE_TYPES = { TLS: SYNTHETICS_TLS_RULE, }; -export const SYNTHETICS_RULE_TYPES = [SYNTHETICS_STATUS_RULE, SYNTHETICS_TLS_RULE]; - export const SYNTHETICS_RULE_TYPES_ALERT_CONTEXT = 'observability.uptime'; diff --git a/x-pack/plugins/observability_solution/uptime/common/constants/uptime_alerts.ts b/x-pack/plugins/observability_solution/uptime/common/constants/uptime_alerts.ts index 71f6bd1b183fb..1a84cf461b3e4 100644 --- a/x-pack/plugins/observability_solution/uptime/common/constants/uptime_alerts.ts +++ b/x-pack/plugins/observability_solution/uptime/common/constants/uptime_alerts.ts @@ -41,9 +41,4 @@ export const CLIENT_ALERT_TYPES = { DURATION_ANOMALY: 'xpack.uptime.alerts.durationAnomaly', }; -export const UPTIME_RULE_TYPES = [ - 'xpack.uptime.alerts.tls', - 'xpack.uptime.alerts.tlsCertificate', - 'xpack.uptime.alerts.monitorStatus', - 'xpack.uptime.alerts.durationAnomaly', -]; +export { UPTIME_RULE_TYPE_IDS as UPTIME_RULE_TYPES } from '@kbn/rule-data-utils'; diff --git a/x-pack/plugins/observability_solution/uptime/server/legacy_uptime/routes/monitors/monitors_details.ts b/x-pack/plugins/observability_solution/uptime/server/legacy_uptime/routes/monitors/monitors_details.ts index 357d008c4b901..9cfc38b8730cc 100644 --- a/x-pack/plugins/observability_solution/uptime/server/legacy_uptime/routes/monitors/monitors_details.ts +++ b/x-pack/plugins/observability_solution/uptime/server/legacy_uptime/routes/monitors/monitors_details.ts @@ -23,7 +23,7 @@ export const createGetMonitorDetailsRoute: UMRestApiRouteFactory = (libs: UMServ handler: async ({ uptimeEsClient, context, request }): Promise => { const { monitorId, dateStart, dateEnd } = request.query; - const rulesClient = (await context.alerting)?.getRulesClient(); + const rulesClient = await (await context.alerting)?.getRulesClient(); return await libs.requests.getMonitorDetails({ uptimeEsClient, diff --git a/x-pack/plugins/reporting/README.md b/x-pack/plugins/reporting/README.md index 7e4d1beefde19..708b3de190875 100644 --- a/x-pack/plugins/reporting/README.md +++ b/x-pack/plugins/reporting/README.md @@ -14,5 +14,3 @@ Although historically related to reporting, the CsvGenerator class has now be mo There are several improvements made for reporting in serverless environments. Most changes are reflected in `reporting/server/config/schema.ts` for reference. PNG and PDF reports are currently not possible in serverless. Those export types are not enabled in serverless configuration, and are left out of Reporting's internal registry of export types. - -The setting `xpack.reporting.roles.enabled` is `false` by default for serverless. This setting enables backwards-compatible functionality for reporting privileges, this type of BWC is not needed in serverless. diff --git a/x-pack/plugins/reporting/public/index.ts b/x-pack/plugins/reporting/public/index.ts index 59f1f4e359851..c78b27d77ef91 100644 --- a/x-pack/plugins/reporting/public/index.ts +++ b/x-pack/plugins/reporting/public/index.ts @@ -13,13 +13,6 @@ import { ReportingPublicPlugin } from './plugin'; * Setup contract for the Reporting plugin. */ export interface ReportingSetup { - /** - * Used to inform plugins if Reporting config is compatible with UI Capabilities / Application Sub-Feature Controls - * - * @returns boolean - */ - usesUiCapabilities: () => boolean; - /** * A set of React components for displaying a Reporting share menu in an application */ diff --git a/x-pack/plugins/reporting/public/management/__test__/report_listing.test.helpers.tsx b/x-pack/plugins/reporting/public/management/__test__/report_listing.test.helpers.tsx index 19337a6f46deb..846b06a631e7e 100644 --- a/x-pack/plugins/reporting/public/management/__test__/report_listing.test.helpers.tsx +++ b/x-pack/plugins/reporting/public/management/__test__/report_listing.test.helpers.tsx @@ -73,9 +73,6 @@ export const mockConfig: ClientConfigType = { enabled: true, }, }, - roles: { - enabled: false, - }, statefulSettings: { enabled: true }, }; diff --git a/x-pack/plugins/reporting/public/mocks.ts b/x-pack/plugins/reporting/public/mocks.ts index b1a447f48a8c0..1888674e68ce2 100644 --- a/x-pack/plugins/reporting/public/mocks.ts +++ b/x-pack/plugins/reporting/public/mocks.ts @@ -17,7 +17,6 @@ const createSetupContract = (): Setup => { const coreSetup = coreMock.createSetup(); const apiClient = new ReportingAPIClient(coreSetup.http, coreSetup.uiSettings, '7.15.0'); return { - usesUiCapabilities: jest.fn().mockImplementation(() => true), components: getSharedComponents(apiClient, Rx.from(coreSetup.getStartServices())), }; }; diff --git a/x-pack/plugins/reporting/public/plugin.ts b/x-pack/plugins/reporting/public/plugin.ts index 95b53b081d408..8dc9e2d96f717 100644 --- a/x-pack/plugins/reporting/public/plugin.ts +++ b/x-pack/plugins/reporting/public/plugin.ts @@ -86,7 +86,6 @@ export class ReportingPublicPlugin private getContract(apiClient: ReportingAPIClient, startServices$: StartServices$) { this.contract = { - usesUiCapabilities: () => this.config.roles?.enabled === false, components: getSharedComponents(apiClient, startServices$), }; @@ -125,7 +124,6 @@ export class ReportingPublicPlugin ]; }) ); - const usesUiCapabilities = !this.config.roles.enabled; const apiClient = new ReportingAPIClient(core.http, core.uiSettings, this.kibanaVersion); this.apiClient = apiClient; @@ -206,7 +204,6 @@ export class ReportingPublicPlugin core, apiClient, startServices$, - usesUiCapabilities, csvConfig: this.config.csv, }) ); @@ -218,7 +215,6 @@ export class ReportingPublicPlugin apiClient, license, application, - usesUiCapabilities, startServices$, }) ); @@ -229,7 +225,6 @@ export class ReportingPublicPlugin apiClient, license, application, - usesUiCapabilities, startServices$, }) ); diff --git a/x-pack/plugins/reporting/server/config/create_config.test.ts b/x-pack/plugins/reporting/server/config/create_config.test.ts index bd65ad245e89d..f2502db6dcdf0 100644 --- a/x-pack/plugins/reporting/server/config/create_config.test.ts +++ b/x-pack/plugins/reporting/server/config/create_config.test.ts @@ -92,9 +92,6 @@ describe('Reporting server createConfig', () => { "pollInterval": 3000, "timeout": 120000, }, - "roles": Object { - "enabled": false, - }, "statefulSettings": Object { "enabled": true, }, diff --git a/x-pack/plugins/reporting/server/config/index.test.ts b/x-pack/plugins/reporting/server/config/index.test.ts deleted file mode 100644 index d6b0f31ddc5f3..0000000000000 --- a/x-pack/plugins/reporting/server/config/index.test.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 { config } from '.'; -import { applyDeprecations, configDeprecationFactory } from '@kbn/config'; -import { configDeprecationsMock } from '@kbn/core/server/mocks'; - -const CONFIG_PATH = 'xpack.reporting'; - -const deprecationContext = configDeprecationsMock.createContext(); - -const applyReportingDeprecations = (settings: Record = {}) => { - const deprecations = config.deprecations!(configDeprecationFactory); - const deprecationMessages: string[] = []; - const _config: any = {}; - _config[CONFIG_PATH] = settings; - const { config: migrated } = applyDeprecations( - _config, - deprecations.map((deprecation) => ({ - deprecation, - path: CONFIG_PATH, - context: deprecationContext, - })), - () => - ({ message }) => - deprecationMessages.push(message) - ); - return { - messages: deprecationMessages, - migrated, - }; -}; - -describe('deprecations', () => { - it('logs a warning of roles.enabled for defaults', () => { - const { messages } = applyReportingDeprecations({}); - expect(messages).toMatchInlineSnapshot(` - Array [ - "The default mechanism for Reporting privileges will work differently in future versions, which will affect the behavior of this cluster. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", - ] - `); - }); - - it('logs a warning if roles.enabled: true is set', () => { - const { messages } = applyReportingDeprecations({ roles: { enabled: true } }); - expect(messages).toMatchInlineSnapshot(` - Array [ - "The default mechanism for Reporting privileges will work differently in future versions, which will affect the behavior of this cluster. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", - ] - `); - }); - - it('does not log a warning recommended settings are used', () => { - const { messages } = applyReportingDeprecations({ - roles: { enabled: false }, - }); - expect(messages).toMatchInlineSnapshot(`Array []`); - }); -}); diff --git a/x-pack/plugins/reporting/server/config/index.ts b/x-pack/plugins/reporting/server/config/index.ts index c99e2667eb6df..7ea68941caac9 100644 --- a/x-pack/plugins/reporting/server/config/index.ts +++ b/x-pack/plugins/reporting/server/config/index.ts @@ -5,68 +5,27 @@ * 2.0. */ -import { get } from 'lodash'; - import { PluginConfigDescriptor } from '@kbn/core/server'; -import { i18n } from '@kbn/i18n'; import { ConfigSchema, ReportingConfigType } from '@kbn/reporting-server'; export const config: PluginConfigDescriptor = { exposeToBrowser: { csv: { scroll: true }, poll: true, - roles: true, export_types: true, statefulSettings: true, }, schema: ConfigSchema, deprecations: ({ unused }) => [ unused('csv.enablePanelActionDownload', { level: 'warning' }), // unused since 9.0 + unused('roles.enabled', { level: 'warning' }), // unused since 9.0 + unused('roles.allow', { level: 'warning' }), // unused since 9.0 unused('queue.indexInterval', { level: 'warning' }), // unused since 8.15 unused('capture.browser.chromium.maxScreenshotDimension', { level: 'warning' }), // unused since 7.8 unused('capture.browser.type', { level: 'warning' }), unused('poll.jobCompletionNotifier.intervalErrorMultiplier', { level: 'warning' }), // unused since 7.10 unused('poll.jobsRefresh.intervalErrorMultiplier', { level: 'warning' }), // unused since 7.10 unused('capture.viewport', { level: 'warning' }), // deprecated as unused since 7.16 - (settings, fromPath, addDeprecation) => { - const reporting = get(settings, fromPath); - if (reporting?.roles?.enabled !== false) { - addDeprecation({ - configPath: `${fromPath}.roles.enabled`, - level: 'warning', - title: i18n.translate('xpack.reporting.deprecations.reportingRoles.title', { - defaultMessage: `The "{fromPath}.roles" setting is deprecated`, - values: { fromPath }, - }), - // TODO: once scheduled reports is released, restate this to say that we have no access to scheduled reporting. - // https://github.com/elastic/kibana/issues/79905 - message: i18n.translate('xpack.reporting.deprecations.reportingRoles.description', { - defaultMessage: - `The default mechanism for Reporting privileges will work differently in future versions,` + - ` which will affect the behavior of this cluster. Set "xpack.reporting.roles.enabled" to` + - ` "false" to adopt the future behavior before upgrading.`, - }), - correctiveActions: { - manualSteps: [ - i18n.translate('xpack.reporting.deprecations.reportingRoles.manualStepOne', { - defaultMessage: `Set "xpack.reporting.roles.enabled" to "false" in kibana.yml.`, - }), - i18n.translate('xpack.reporting.deprecations.reportingRoles.manualStepTwo', { - defaultMessage: `Remove "xpack.reporting.roles.allow" in kibana.yml, if present.`, - }), - i18n.translate('xpack.reporting.deprecations.reportingRoles.manualStepThree', { - defaultMessage: - `Go to Management > Security > Roles to create one or more roles that grant` + - ` the Kibana application privilege for Reporting.`, - }), - i18n.translate('xpack.reporting.deprecations.reportingRoles.manualStepFour', { - defaultMessage: `Grant Reporting privileges to users by assigning one of the new roles.`, - }), - ], - }, - }); - } - }, ], exposeToUsage: { capture: { maxAttempts: true }, @@ -76,7 +35,6 @@ export const config: PluginConfigDescriptor = { }, kibanaServer: false, // show as [redacted] queue: { indexInterval: true, pollEnabled: true, timeout: true }, - roles: { enabled: true }, }, }; diff --git a/x-pack/plugins/reporting/server/core.ts b/x-pack/plugins/reporting/server/core.ts index 283488dd5a973..117849365de9a 100644 --- a/x-pack/plugins/reporting/server/core.ts +++ b/x-pack/plugins/reporting/server/core.ts @@ -92,7 +92,6 @@ export class ReportingCore { private pluginStartDeps?: ReportingInternalStart; private readonly pluginSetup$ = new Rx.ReplaySubject(); // observe async background setupDeps each are done private readonly pluginStart$ = new Rx.ReplaySubject(); // observe async background startDeps - private deprecatedAllowedRoles: string[] | false = false; // DEPRECATED. If `false`, the deprecated features have been disableed private executeTask: ExecuteReportTask; private config: ReportingConfigType; private executing: Set; @@ -114,11 +113,9 @@ export class ReportingCore { this.getExportTypes().forEach((et) => { this.exportTypesRegistry.register(et); }); - this.deprecatedAllowedRoles = config.roles.enabled ? config.roles.allow : false; this.executeTask = new ExecuteReportTask(this, config, this.logger); this.getContract = () => ({ - usesUiCapabilities: () => config.roles.enabled === false, registerExportTypes: (id) => id, getSpaceId: this.getSpaceId.bind(this), }); @@ -257,15 +254,6 @@ export class ReportingCore { return this.config; } - /* - * If deprecated feature has not been disabled, - * this returns an array of allowed role names - * that have access to Reporting. - */ - public getDeprecatedAllowedRoles(): string[] | false { - return this.deprecatedAllowedRoles; - } - /* * Track usage of API endpoints */ diff --git a/x-pack/plugins/reporting/server/deprecations/__snapshots__/reporting_role.test.ts.snap b/x-pack/plugins/reporting/server/deprecations/__snapshots__/reporting_role.test.ts.snap deleted file mode 100644 index 92456f9eec706..0000000000000 --- a/x-pack/plugins/reporting/server/deprecations/__snapshots__/reporting_role.test.ts.snap +++ /dev/null @@ -1,119 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`roles mapped to a deprecated role includes steps to remove the incompatible config, when applicable 1`] = ` -Array [ - Object { - "correctiveActions": Object { - "manualSteps": Array [ - "Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" in kibana.yml.", - "Remove \\"xpack.reporting.roles.allow\\" in kibana.yml, if present.", - "Go to Management > Security > Roles to create one or more roles that grant the Kibana application privilege for Reporting.", - "Grant Reporting privileges to users by assigning one of the new roles.", - "Remove the \\"reporting_user\\" role from all users and add the custom role. The affected users are: reportron[reporting_user].", - ], - }, - "deprecationType": "feature", - "documentationUrl": "https://www.elastic.co/guide/en/kibana/branch/kibana-privileges.html", - "level": "warning", - "message": "The default mechanism for Reporting privileges will work differently in future versions, and this cluster has users who have a deprecated role for this privilege. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", - "title": "The \\"reporting_user\\" role is deprecated: check user roles", - }, -] -`; - -exports[`roles mapped to a deprecated role logs a deprecation when a role was found that maps to a deprecated custom role from the roles.allow setting 1`] = ` -Array [ - Object { - "correctiveActions": Object { - "manualSteps": Array [ - "Go to Management > Security > Roles to create one or more roles that grant the Kibana application privilege for Reporting.", - "Grant Reporting privileges to users by assigning one of the new roles.", - "Remove the \\"reporting_user\\" role from all role mappings and add the custom role. The affected role mappings are: dungeon_master[my_test_reporting_user].", - ], - }, - "deprecationType": "feature", - "documentationUrl": "https://www.elastic.co/guide/en/kibana/branch/kibana-privileges.html", - "level": "warning", - "message": "The default mechanism for Reporting privileges will work differently in future versions, and this cluster has role mappings that are mapped to a deprecated role for this privilege. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", - "title": "The \\"reporting_user\\" role is deprecated: check role mappings", - }, -] -`; - -exports[`roles mapped to a deprecated role logs a deprecation when a role was found that maps to the deprecated reporting_user role 1`] = ` -Array [ - Object { - "correctiveActions": Object { - "manualSteps": Array [ - "Go to Management > Security > Roles to create one or more roles that grant the Kibana application privilege for Reporting.", - "Grant Reporting privileges to users by assigning one of the new roles.", - "Remove the \\"reporting_user\\" role from all role mappings and add the custom role. The affected role mappings are: dungeon_master[reporting_user].", - ], - }, - "deprecationType": "feature", - "documentationUrl": "https://www.elastic.co/guide/en/kibana/branch/kibana-privileges.html", - "level": "warning", - "message": "The default mechanism for Reporting privileges will work differently in future versions, and this cluster has role mappings that are mapped to a deprecated role for this privilege. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", - "title": "The \\"reporting_user\\" role is deprecated: check role mappings", - }, -] -`; - -exports[`users assigned to a deprecated role includes steps to remove the incompatible config, when applicable 1`] = ` -Array [ - Object { - "correctiveActions": Object { - "manualSteps": Array [ - "Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" in kibana.yml.", - "Remove \\"xpack.reporting.roles.allow\\" in kibana.yml, if present.", - "Go to Management > Security > Roles to create one or more roles that grant the Kibana application privilege for Reporting.", - "Grant Reporting privileges to users by assigning one of the new roles.", - "Remove the \\"reporting_user\\" role from all users and add the custom role. The affected users are: reportron[reporting_user].", - ], - }, - "deprecationType": "feature", - "documentationUrl": "https://www.elastic.co/guide/en/kibana/branch/kibana-privileges.html", - "level": "warning", - "message": "The default mechanism for Reporting privileges will work differently in future versions, and this cluster has users who have a deprecated role for this privilege. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", - "title": "The \\"reporting_user\\" role is deprecated: check user roles", - }, -] -`; - -exports[`users assigned to a deprecated role logs a deprecation when a user was found with a deprecated custom role from the roles.allow setting 1`] = ` -Array [ - Object { - "correctiveActions": Object { - "manualSteps": Array [ - "Go to Management > Security > Roles to create one or more roles that grant the Kibana application privilege for Reporting.", - "Grant Reporting privileges to users by assigning one of the new roles.", - "Remove the \\"reporting_user\\" role from all users and add the custom role. The affected users are: reportron[my_test_reporting_user].", - ], - }, - "deprecationType": "feature", - "documentationUrl": "https://www.elastic.co/guide/en/kibana/branch/kibana-privileges.html", - "level": "warning", - "message": "The default mechanism for Reporting privileges will work differently in future versions, and this cluster has users who have a deprecated role for this privilege. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", - "title": "The \\"reporting_user\\" role is deprecated: check user roles", - }, -] -`; - -exports[`users assigned to a deprecated role logs a deprecation when a user was found with a deprecated reporting_user role 1`] = ` -Array [ - Object { - "correctiveActions": Object { - "manualSteps": Array [ - "Go to Management > Security > Roles to create one or more roles that grant the Kibana application privilege for Reporting.", - "Grant Reporting privileges to users by assigning one of the new roles.", - "Remove the \\"reporting_user\\" role from all users and add the custom role. The affected users are: reportron[reporting_user].", - ], - }, - "deprecationType": "feature", - "documentationUrl": "https://www.elastic.co/guide/en/kibana/branch/kibana-privileges.html", - "level": "warning", - "message": "The default mechanism for Reporting privileges will work differently in future versions, and this cluster has users who have a deprecated role for this privilege. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", - "title": "The \\"reporting_user\\" role is deprecated: check user roles", - }, -] -`; diff --git a/x-pack/plugins/reporting/server/deprecations/index.ts b/x-pack/plugins/reporting/server/deprecations/index.ts index bca439532b3b0..b00cd4db68515 100644 --- a/x-pack/plugins/reporting/server/deprecations/index.ts +++ b/x-pack/plugins/reporting/server/deprecations/index.ts @@ -5,24 +5,12 @@ * 2.0. */ import { CoreSetup } from '@kbn/core/server'; -import { ReportingCore } from '../core'; - import { getDeprecationsInfo as getIlmPolicyDeprecationsInfo } from './migrate_existing_indices_ilm_policy'; -import { getDeprecationsInfo as getReportingRoleDeprecationsInfo } from './reporting_role'; -export const registerDeprecations = ({ - core, - reportingCore, -}: { - core: CoreSetup; - reportingCore: ReportingCore; -}) => { +export const registerDeprecations = ({ core }: { core: CoreSetup }) => { core.deprecations.registerDeprecations({ getDeprecations: async (ctx) => { - return [ - ...(await getIlmPolicyDeprecationsInfo(ctx)), - ...(await getReportingRoleDeprecationsInfo(ctx, { reportingCore })), - ]; + return await getIlmPolicyDeprecationsInfo(ctx); }, }); }; diff --git a/x-pack/plugins/reporting/server/deprecations/reporting_role.test.ts b/x-pack/plugins/reporting/server/deprecations/reporting_role.test.ts deleted file mode 100644 index 4f58767e78b06..0000000000000 --- a/x-pack/plugins/reporting/server/deprecations/reporting_role.test.ts +++ /dev/null @@ -1,177 +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 { GetDeprecationsContext, IScopedClusterClient } from '@kbn/core/server'; -import { elasticsearchServiceMock } from '@kbn/core/server/mocks'; -import { createMockConfigSchema } from '@kbn/reporting-mocks-server'; -import { ReportingCore } from '..'; -import { createMockPluginSetup, createMockReportingCore } from '../test_helpers'; -import { getDeprecationsInfo } from './reporting_role'; - -let reportingCore: ReportingCore; -let context: GetDeprecationsContext; -let esClient: jest.Mocked; - -beforeEach(async () => { - reportingCore = await createMockReportingCore( - createMockConfigSchema({ roles: { enabled: false } }) - ); - - esClient = elasticsearchServiceMock.createScopedClusterClient(); - esClient.asCurrentUser.security.getUser = jest.fn().mockResolvedValue({ - xyz: { username: 'normal_user', roles: ['data_analyst'] }, - }); - esClient.asCurrentUser.security.getRoleMapping = jest.fn().mockResolvedValue({}); - - context = { esClient } as unknown as GetDeprecationsContext; -}); - -test('logs no deprecations when setup has no issues', async () => { - expect(await getDeprecationsInfo(context, { reportingCore })).toMatchInlineSnapshot(`Array []`); -}); - -describe('users assigned to a deprecated role', () => { - test('logs a deprecation when a user was found with a deprecated reporting_user role', async () => { - esClient.asCurrentUser.security.getUser = jest.fn().mockResolvedValue({ - reportron: { - username: 'reportron', - roles: ['kibana_admin', 'reporting_user'], - }, - }); - - reportingCore = await createMockReportingCore(createMockConfigSchema()); - - expect(await getDeprecationsInfo(context, { reportingCore })).toMatchSnapshot(); - }); - - test('logs a deprecation when a user was found with a deprecated custom role from the roles.allow setting', async () => { - reportingCore = await createMockReportingCore( - createMockConfigSchema({ roles: { allow: ['my_test_reporting_user'] } }) - ); - esClient.asCurrentUser.security.getUser = jest.fn().mockResolvedValue({ - reportron: { username: 'reportron', roles: ['kibana_admin', 'my_test_reporting_user'] }, - }); - - expect(await getDeprecationsInfo(context, { reportingCore })).toMatchSnapshot(); - }); - - test('includes steps to remove the incompatible config, when applicable', async () => { - esClient.asCurrentUser.security.getUser = jest.fn().mockResolvedValue({ - reportron: { - username: 'reportron', - roles: ['kibana_admin', 'reporting_user'], - }, - }); - - reportingCore = await createMockReportingCore( - createMockConfigSchema({ roles: { enabled: true } }) - ); - - expect(await getDeprecationsInfo(context, { reportingCore })).toMatchSnapshot(); - }); -}); - -describe('roles mapped to a deprecated role', () => { - test('logs a deprecation when a role was found that maps to the deprecated reporting_user role', async () => { - esClient.asCurrentUser.security.getRoleMapping = jest - .fn() - .mockResolvedValue({ dungeon_master: { roles: ['reporting_user'] } }); - - reportingCore = await createMockReportingCore(createMockConfigSchema()); - - expect(await getDeprecationsInfo(context, { reportingCore })).toMatchSnapshot(); - }); - - test('logs a deprecation when a role was found that maps to a deprecated custom role from the roles.allow setting', async () => { - reportingCore = await createMockReportingCore( - createMockConfigSchema({ roles: { allow: ['my_test_reporting_user'] } }) - ); - esClient.asCurrentUser.security.getRoleMapping = jest - .fn() - .mockResolvedValue({ dungeon_master: { roles: ['my_test_reporting_user'] } }); - - expect(await getDeprecationsInfo(context, { reportingCore })).toMatchSnapshot(); - }); - - test('includes steps to remove the incompatible config, when applicable', async () => { - esClient.asCurrentUser.security.getUser = jest.fn().mockResolvedValue({ - reportron: { - username: 'reportron', - roles: ['kibana_admin', 'reporting_user'], - }, - }); - - reportingCore = await createMockReportingCore( - createMockConfigSchema({ roles: { enabled: true } }) - ); - - expect(await getDeprecationsInfo(context, { reportingCore })).toMatchSnapshot(); - }); -}); - -describe('check deprecations when security is disabled', () => { - test('logs no deprecations: roles not enabled', async () => { - reportingCore = await createMockReportingCore( - createMockConfigSchema({ roles: { enabled: false } }), - createMockPluginSetup({ security: null }) - ); - expect(await getDeprecationsInfo(context, { reportingCore })).toMatchInlineSnapshot(`Array []`); - }); - - test('logs no deprecations: roles enabled', async () => { - const mockReportingConfig = createMockConfigSchema(); // roles.enabled: true is default in 7.x / 8.0 - reportingCore = await createMockReportingCore( - mockReportingConfig, - createMockPluginSetup({ security: null }) - ); - - expect(await getDeprecationsInfo(context, { reportingCore })).toMatchInlineSnapshot(`Array []`); - }); - - test('logs no deprecations on serverless', async () => { - reportingCore = await createMockReportingCore( - createMockConfigSchema({ statefulSettings: { enabled: false } }) - ); - expect(await getDeprecationsInfo(context, { reportingCore })).toMatchInlineSnapshot(`Array []`); - }); -}); - -it('insufficient permissions', async () => { - const permissionsError = new Error('you shall not pass'); - (permissionsError as unknown as { statusCode: number }).statusCode = 403; - esClient.asCurrentUser.security.getUser = jest.fn().mockRejectedValue(permissionsError); - esClient.asCurrentUser.security.getRoleMapping = jest.fn().mockRejectedValue(permissionsError); - - expect(await getDeprecationsInfo(context, { reportingCore })).toMatchInlineSnapshot(` - Array [ - Object { - "correctiveActions": Object { - "manualSteps": Array [ - "Make sure you have a \\"manage_security\\" cluster privilege assigned.", - ], - }, - "deprecationType": "feature", - "documentationUrl": "https://www.elastic.co/guide/en/kibana/test-branch/xpack-security.html#_required_permissions_7", - "level": "fetch_error", - "message": "You do not have enough permissions to fix this deprecation.", - "title": "The \\"reporting_user\\" role is deprecated: check user roles", - }, - Object { - "correctiveActions": Object { - "manualSteps": Array [ - "Make sure you have a \\"manage_security\\" cluster privilege assigned.", - ], - }, - "deprecationType": "feature", - "documentationUrl": "https://www.elastic.co/guide/en/kibana/test-branch/xpack-security.html#_required_permissions_7", - "level": "fetch_error", - "message": "You do not have enough permissions to fix this deprecation.", - "title": "The \\"reporting_user\\" role is deprecated: check role mappings", - }, - ] - `); -}); diff --git a/x-pack/plugins/reporting/server/deprecations/reporting_role.ts b/x-pack/plugins/reporting/server/deprecations/reporting_role.ts deleted file mode 100644 index 31633760aeb84..0000000000000 --- a/x-pack/plugins/reporting/server/deprecations/reporting_role.ts +++ /dev/null @@ -1,239 +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 { - SecurityGetRoleMappingResponse, - SecurityGetUserResponse, -} from '@elastic/elasticsearch/lib/api/types'; -import { i18n } from '@kbn/i18n'; -import type { - DeprecationsDetails, - DocLinksServiceSetup, - ElasticsearchClient, - GetDeprecationsContext, -} from '@kbn/core/server'; -import { ReportingCore } from '..'; -import { deprecations } from '../lib/deprecations'; - -const REPORTING_USER_ROLE_NAME = 'reporting_user'; -const getDocumentationUrl = (branch: string) => { - // TODO: remove when docs support "main" - const docBranch = branch === 'main' ? 'master' : branch; - return `https://www.elastic.co/guide/en/kibana/${docBranch}/kibana-privileges.html`; -}; - -interface ExtraDependencies { - reportingCore: ReportingCore; -} - -export async function getDeprecationsInfo( - { esClient }: GetDeprecationsContext, - { reportingCore }: ExtraDependencies -): Promise { - const client = esClient.asCurrentUser; - const { security, docLinks } = reportingCore.getPluginSetupDeps(); - - // Nothing to do if security is disabled - if (!security?.license.isEnabled()) { - return []; - } - - const config = reportingCore.getConfig(); - const deprecatedRoles = config.roles.allow || ['reporting_user']; - - return [ - ...(await getUsersDeprecations(client, reportingCore, deprecatedRoles, docLinks)), - ...(await getRoleMappingsDeprecations(client, reportingCore, deprecatedRoles, docLinks)), - ]; -} - -async function getUsersDeprecations( - client: ElasticsearchClient, - reportingCore: ReportingCore, - deprecatedRoles: string[], - docLinks: DocLinksServiceSetup -): Promise { - const usingDeprecatedConfig = !reportingCore.getContract().usesUiCapabilities(); - const strings = { - title: i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.title', { - defaultMessage: `The "{reportingUserRoleName}" role is deprecated: check user roles`, - values: { reportingUserRoleName: REPORTING_USER_ROLE_NAME }, - }), - message: i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.description', { - defaultMessage: - `The default mechanism for Reporting privileges will work differently in future versions, and` + - ` this cluster has users who have a deprecated role for this privilege.` + - ` Set "xpack.reporting.roles.enabled" to "false" to adopt the future behavior before upgrading.`, - }), - manualSteps: (usersRoles: string) => [ - ...(usingDeprecatedConfig - ? [ - i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.manualStepOne', { - defaultMessage: `Set "xpack.reporting.roles.enabled" to "false" in kibana.yml.`, - }), - i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.manualStepTwo', { - defaultMessage: `Remove "xpack.reporting.roles.allow" in kibana.yml, if present.`, - }), - ] - : []), - - i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.manualStepThree', { - defaultMessage: - `Go to Management > Security > Roles to create one or more roles that grant` + - ` the Kibana application privilege for Reporting.`, - }), - i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.manualStepFour', { - defaultMessage: `Grant Reporting privileges to users by assigning one of the new roles.`, - }), - i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.manualStepFive', { - defaultMessage: - `Remove the "reporting_user" role from all users and add the custom role.` + - ` The affected users are: {usersRoles}.`, - values: { usersRoles }, - }), - ], - }; - - let users: SecurityGetUserResponse; - try { - users = await client.security.getUser(); - } catch (err) { - const { logger } = reportingCore.getPluginSetupDeps(); - if (deprecations.getErrorStatusCode(err) === 403) { - logger.warn( - `Failed to retrieve users when checking for deprecations:` + - ` the "manage_security" cluster privilege is required.` - ); - } else { - logger.error( - `Failed to retrieve users when checking for deprecations,` + - ` unexpected error: ${deprecations.getDetailedErrorMessage(err)}.` - ); - } - return deprecations.deprecationError(strings.title, err, docLinks); - } - - const reportingUsers = Object.entries(users).reduce((userSet, current) => { - const [userName, user] = current; - const foundRole = user.roles.find((role) => deprecatedRoles.includes(role)); - if (foundRole) { - userSet.push(`${userName}[${foundRole}]`); - } - return userSet; - }, [] as string[]); - - if (reportingUsers.length === 0) { - return []; - } - - return [ - { - title: strings.title, - message: strings.message, - correctiveActions: { manualSteps: strings.manualSteps(reportingUsers.join(', ')) }, - level: 'warning', - deprecationType: 'feature', - documentationUrl: getDocumentationUrl(reportingCore.getKibanaPackageInfo().branch), - }, - ]; -} - -async function getRoleMappingsDeprecations( - client: ElasticsearchClient, - reportingCore: ReportingCore, - deprecatedRoles: string[], - docLinks: DocLinksServiceSetup -): Promise { - const usingDeprecatedConfig = !reportingCore.getContract().usesUiCapabilities(); - const strings = { - title: i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.title', { - defaultMessage: `The "{reportingUserRoleName}" role is deprecated: check role mappings`, - values: { reportingUserRoleName: REPORTING_USER_ROLE_NAME }, - }), - message: i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.description', { - defaultMessage: - `The default mechanism for Reporting privileges will work differently in future versions, and` + - ` this cluster has role mappings that are mapped to a deprecated role for this privilege.` + - ` Set "xpack.reporting.roles.enabled" to "false" to adopt the future behavior before upgrading.`, - }), - manualSteps: (roleMappings: string) => [ - ...(usingDeprecatedConfig - ? [ - i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.manualStepOne', { - defaultMessage: `Set "xpack.reporting.roles.enabled" to "false" in kibana.yml.`, - }), - i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.manualStepTwo', { - defaultMessage: `Remove "xpack.reporting.roles.allow" in kibana.yml, if present.`, - }), - ] - : []), - - i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.manualStepThree', { - defaultMessage: - `Go to Management > Security > Roles to create one or more roles that grant` + - ` the Kibana application privilege for Reporting.`, - }), - i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.manualStepFour', { - defaultMessage: `Grant Reporting privileges to users by assigning one of the new roles.`, - }), - i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.manualStepFive', { - defaultMessage: - `Remove the "reporting_user" role from all role mappings and add the custom role.` + - ` The affected role mappings are: {roleMappings}.`, - values: { roleMappings }, - }), - ], - }; - - let roleMappings: SecurityGetRoleMappingResponse; - try { - roleMappings = await client.security.getRoleMapping(); - } catch (err) { - const { logger } = reportingCore.getPluginSetupDeps(); - if (deprecations.getErrorStatusCode(err) === 403) { - logger.warn( - `Failed to retrieve role mappings when checking for deprecations:` + - ` the "manage_security" cluster privilege is required.` - ); - } else { - logger.error( - `Failed to retrieve role mappings when checking for deprecations,` + - ` unexpected error: ${deprecations.getDetailedErrorMessage(err)}.` - ); - } - return deprecations.deprecationError(strings.title, err, docLinks); - } - - const roleMappingsWithReportingRole: string[] = Object.entries(roleMappings).reduce( - (roleSet, current) => { - const [roleName, role] = current; - const foundMapping = role.roles?.find((roll) => deprecatedRoles.includes(roll)); - if (foundMapping) { - roleSet.push(`${roleName}[${foundMapping}]`); - } - return roleSet; - }, - [] as string[] - ); - - if (roleMappingsWithReportingRole.length === 0) { - return []; - } - - return [ - { - title: strings.title, - message: strings.message, - correctiveActions: { - manualSteps: strings.manualSteps(roleMappingsWithReportingRole.join(', ')), - }, - level: 'warning', - deprecationType: 'feature', - documentationUrl: getDocumentationUrl(reportingCore.getKibanaPackageInfo().branch), - }, - ]; -} diff --git a/x-pack/plugins/reporting/server/features.ts b/x-pack/plugins/reporting/server/features.ts index 5fb03f7428b26..a7971494b6c1a 100644 --- a/x-pack/plugins/reporting/server/features.ts +++ b/x-pack/plugins/reporting/server/features.ts @@ -5,29 +5,17 @@ * 2.0. */ -import { DEFAULT_APP_CATEGORIES, type Logger } from '@kbn/core/server'; +import { DEFAULT_APP_CATEGORIES } from '@kbn/core/server'; import { i18n } from '@kbn/i18n'; import type { FeaturesPluginSetup } from '@kbn/features-plugin/server'; import { KibanaFeatureScope } from '@kbn/features-plugin/common'; interface FeatureRegistrationOpts { features: FeaturesPluginSetup; - deprecatedRoles: string[] | false; isServerless: boolean; - logger: Logger; } -/** - * If xpack.reporting.roles.enabled === true, register Reporting as a feature - * that is controlled by user role names. Also, for Serverless register a - * 'shell' Reporting Kibana feature. - */ -export function registerFeatures({ - isServerless, - features, - deprecatedRoles, - logger, -}: FeatureRegistrationOpts) { +export function registerFeatures({ isServerless, features }: FeatureRegistrationOpts) { // Register a 'shell' feature specifically for Serverless. If granted, it will automatically provide access to // reporting capabilities in other features, such as Discover, Dashboards, and Visualizations. On its own, this // feature doesn't grant any additional privileges. @@ -48,29 +36,5 @@ export function registerFeatures({ }); } - if (deprecatedRoles !== false) { - // refer to roles.allow configuration (deprecated path) - const allowedRoles = ['superuser', ...(deprecatedRoles ?? [])]; - const privileges = allowedRoles.map((role) => ({ - requiredClusterPrivileges: [], - requiredRoles: [role], - ui: [], - })); - - // self-register as an elasticsearch feature (deprecated) - features.registerElasticsearchFeature({ - id: 'reporting', - catalogue: ['reporting'], - management: { - insightsAndAlerting: ['reporting'], - }, - privileges, - }); - } else { - logger.debug( - `Reporting roles configuration is disabled. Please assign access to Reporting use Kibana feature controls for applications.` - ); - // trigger application to register Reporting as a subfeature - features.enableReportingUiCapabilities(); - } + features.enableReportingUiCapabilities(); } diff --git a/x-pack/plugins/reporting/server/mocks/index.ts b/x-pack/plugins/reporting/server/mocks/index.ts index ea9d448aff167..6f52d1a4c77c3 100644 --- a/x-pack/plugins/reporting/server/mocks/index.ts +++ b/x-pack/plugins/reporting/server/mocks/index.ts @@ -9,7 +9,6 @@ import { ReportingStart } from '../types'; export const reportingMock = { createStart: (): ReportingStart => ({ - usesUiCapabilities: () => false, registerExportTypes: () => {}, }), }; diff --git a/x-pack/plugins/reporting/server/plugin.ts b/x-pack/plugins/reporting/server/plugin.ts index 51ba41adadac8..12bfb3decb805 100644 --- a/x-pack/plugins/reporting/server/plugin.ts +++ b/x-pack/plugins/reporting/server/plugin.ts @@ -71,7 +71,7 @@ export class ReportingPlugin }); registerUiSettings(core); - registerDeprecations({ core, reportingCore }); + registerDeprecations({ core }); registerReportingUsageCollector(reportingCore, plugins.usageCollection); registerReportingEventTypes(core); @@ -80,12 +80,9 @@ export class ReportingPlugin // async background setup (async () => { - // Feature registration relies on config, depending on whether deprecated roles are enabled, so it cannot be setup before here. registerFeatures({ features: plugins.features, - deprecatedRoles: reportingCore.getDeprecatedAllowedRoles(), isServerless: this.initContext.env.packageInfo.buildFlavor === 'serverless', - logger: this.logger, }); this.logger.debug('Setup complete'); })().catch((e) => { diff --git a/x-pack/plugins/reporting/server/routes/common/authorized_user_pre_routing.test.ts b/x-pack/plugins/reporting/server/routes/common/authorized_user_pre_routing.test.ts index b66effef8961c..3236e7602df3d 100644 --- a/x-pack/plugins/reporting/server/routes/common/authorized_user_pre_routing.test.ts +++ b/x-pack/plugins/reporting/server/routes/common/authorized_user_pre_routing.test.ts @@ -21,7 +21,8 @@ import { authorizedUserPreRouting } from './authorized_user_pre_routing'; let mockCore: ReportingCore; let mockSetupDeps: ReportingInternalSetup; let mockStartDeps: ReportingInternalStart; -let mockReportingConfig = createMockConfigSchema({ roles: { enabled: false } }); + +const mockReportingConfig = createMockConfigSchema(); const getMockContext = () => ({ @@ -112,88 +113,4 @@ describe('authorized_user_pre_routing', function () { body: `Sorry, you aren't authenticated`, }); }); - - describe('Deprecated: security roles for access control', () => { - beforeEach(async () => { - mockReportingConfig = createMockConfigSchema({ - roles: { - allow: ['reporting_user'], - enabled: true, - }, - }); - }); - - it(`should return with 403 when security is enabled but user doesn't have the allowed role`, async function () { - mockStartDeps = await createMockPluginStart( - { - securityService: { - authc: { - getCurrentUser: () => ({ id: '123', roles: ['peasant'], username: 'Tom Riddle' }), - }, - }, - }, - mockReportingConfig - ); - mockCore = await createMockReportingCore(mockReportingConfig, mockSetupDeps, mockStartDeps); - const mockHandler = () => { - throw new Error('Handler callback should not be called'); - }; - - expect( - await authorizedUserPreRouting(mockCore, mockHandler)( - getMockContext(), - getMockRequest(), - getMockResponseFactory() - ) - ).toMatchObject({ - body: `Ask your administrator for access to reporting features. Learn more.`, - }); - }); - - it('should return from handler when security is enabled and user has explicitly allowed role', async function () { - mockStartDeps = await createMockPluginStart( - { - securityService: { - authc: { - getCurrentUser: () => ({ username: 'friendlyuser', roles: ['reporting_user'] }), - }, - }, - }, - mockReportingConfig - ); - mockCore = await createMockReportingCore(mockReportingConfig, mockSetupDeps, mockStartDeps); - - let handlerCalled = false; - await authorizedUserPreRouting(mockCore, (user: unknown) => { - expect(user).toMatchObject({ roles: ['reporting_user'], username: 'friendlyuser' }); - handlerCalled = true; - return Promise.resolve({ status: 200, options: {} }); - })(getMockContext(), getMockRequest(), getMockResponseFactory()); - expect(handlerCalled).toBe(true); - }); - - it('should return from handler when security is enabled and user has superuser role', async function () { - mockStartDeps = await createMockPluginStart( - { - securityService: { - authc: { getCurrentUser: () => ({ username: 'friendlyuser', roles: ['superuser'] }) }, - }, - }, - mockReportingConfig - ); - mockCore = await createMockReportingCore(mockReportingConfig, mockSetupDeps, mockStartDeps); - - const handler = jest.fn().mockResolvedValue({ status: 200, options: {} }); - await authorizedUserPreRouting(mockCore, handler)( - getMockContext(), - getMockRequest(), - getMockResponseFactory() - ); - - expect(handler).toHaveBeenCalled(); - const [[user]] = handler.mock.calls; - expect(user).toMatchObject({ roles: ['superuser'], username: 'friendlyuser' }); - }); - }); }); diff --git a/x-pack/plugins/reporting/server/routes/common/authorized_user_pre_routing.ts b/x-pack/plugins/reporting/server/routes/common/authorized_user_pre_routing.ts index c6d82894772fd..3fdf41831c593 100644 --- a/x-pack/plugins/reporting/server/routes/common/authorized_user_pre_routing.ts +++ b/x-pack/plugins/reporting/server/routes/common/authorized_user_pre_routing.ts @@ -6,15 +6,12 @@ */ import { RequestHandler, RouteMethod } from '@kbn/core/server'; -import { i18n } from '@kbn/i18n'; import { AuthenticatedUser } from '@kbn/security-plugin/server'; import { ReportingCore } from '../../core'; import { ReportingRequestHandlerContext } from '../../types'; import { getUser } from './get_user'; -const superuserRole = 'superuser'; - type ReportingRequestUser = AuthenticatedUser | false; export type RequestHandlerUser = RequestHandler< @@ -30,7 +27,7 @@ export const authorizedUserPreRouting = ( reporting: ReportingCore, handler: RequestHandlerUser ): RequestHandler => { - const { logger, security: securitySetup, docLinks } = reporting.getPluginSetupDeps(); // ReportingInternalSetup.security?: SecurityPluginSetup | undefined + const { logger, security: securitySetup } = reporting.getPluginSetupDeps(); // ReportingInternalSetup.security?: SecurityPluginSetup | undefined return async (context, req, res) => { const { securityService } = await reporting.getPluginStartDeps(); @@ -45,30 +42,6 @@ export const authorizedUserPreRouting = ( } } - const deprecatedAllowedRoles = reporting.getDeprecatedAllowedRoles(); - if (user && deprecatedAllowedRoles !== false) { - // check allowance with the configured set of roleas + "superuser" - const allowedRoles = deprecatedAllowedRoles || []; - const authorizedRoles = [superuserRole, ...allowedRoles]; - - if (!user.roles.find((role) => authorizedRoles.includes(role))) { - const body = i18n.translate('xpack.reporting.userAccessError.message', { - defaultMessage: `Ask your administrator for access to reporting features. {grantUserAccessDocs}.`, - values: { - grantUserAccessDocs: - `` + - i18n.translate('xpack.reporting.userAccessError.learnMoreLink', { - defaultMessage: 'Learn more', - }) + - '', - }, - }); - // user's roles do not allow - return res.forbidden({ body }); - } - } - return handler(user, context, req, res); } catch (err) { logger.error(err); diff --git a/x-pack/plugins/reporting/server/routes/common/jobs/job_management_pre_routing.test.ts b/x-pack/plugins/reporting/server/routes/common/jobs/job_management_pre_routing.test.ts index d275fb2cbbaf5..c5e4da96efb26 100644 --- a/x-pack/plugins/reporting/server/routes/common/jobs/job_management_pre_routing.test.ts +++ b/x-pack/plugins/reporting/server/routes/common/jobs/job_management_pre_routing.test.ts @@ -20,7 +20,7 @@ import { jobManagementPreRouting } from './job_management_pre_routing'; jest.mock('../../../lib/content_stream'); jest.mock('./jobs_query'); -const mockReportingConfig = createMockConfigSchema({ roles: { enabled: false } }); +const mockReportingConfig = createMockConfigSchema(); let mockCore: ReportingCore; let mockSetupDeps: ReportingInternalSetup; let mockStartDeps: ReportingInternalStart; diff --git a/x-pack/plugins/reporting/server/routes/internal/generate/generate_from_jobparams.ts b/x-pack/plugins/reporting/server/routes/internal/generate/generate_from_jobparams.ts index 7f547702475cd..f8ee55cc12fb5 100644 --- a/x-pack/plugins/reporting/server/routes/internal/generate/generate_from_jobparams.ts +++ b/x-pack/plugins/reporting/server/routes/internal/generate/generate_from_jobparams.ts @@ -18,8 +18,7 @@ export function registerGenerationRoutesInternal(reporting: ReportingCore, logge const setupDeps = reporting.getPluginSetupDeps(); const { router } = setupDeps; - const useKibanaAccessControl = reporting.getDeprecatedAllowedRoles() === false; // true if Reporting's deprecated access control feature is disabled - const kibanaAccessControlTags = useKibanaAccessControl ? ['access:generateReport'] : []; + const kibanaAccessControlTags = ['access:generateReport']; const registerInternalPostGenerationEndpoint = () => { const path = `${GENERATE_PREFIX}/{exportType}`; diff --git a/x-pack/plugins/reporting/server/routes/internal/management/integration_tests/jobs.test.ts b/x-pack/plugins/reporting/server/routes/internal/management/integration_tests/jobs.test.ts index a9b2094fea023..ad65976d99f55 100644 --- a/x-pack/plugins/reporting/server/routes/internal/management/integration_tests/jobs.test.ts +++ b/x-pack/plugins/reporting/server/routes/internal/management/integration_tests/jobs.test.ts @@ -76,7 +76,7 @@ describe(`Reporting Job Management Routes: Internal`, () => { }; const coreSetupMock = coreMock.createSetup(); - const mockConfigSchema = createMockConfigSchema({ roles: { enabled: false } }); + const mockConfigSchema = createMockConfigSchema(); beforeEach(async () => { ({ server, httpSetup } = await setupServer(reportingSymbol)); @@ -350,45 +350,6 @@ describe(`Reporting Job Management Routes: Internal`, () => { }); }); - describe('Deprecated: role-based access control', () => { - it('fails on users without the appropriate role', async () => { - mockStartDeps = await createMockPluginStart( - { - licensing: { - ...licensingMock.createStart(), - license$: new BehaviorSubject({ isActive: true, isAvailable: true, type: 'gold' }), - }, - securityService: { - authc: { - getCurrentUser: () => ({ id: '123', roles: ['peasant'], username: 'Tom Riddle' }), - }, - }, - }, - mockConfigSchema - ); - - reportingCore = await createMockReportingCore( - createMockConfigSchema({ roles: { enabled: true } }), - mockSetupDeps, - mockStartDeps - ); - - registerJobInfoRoutes(reportingCore); - - await server.start(); - - await supertest(httpSetup.server.listener) - .get(`${INTERNAL_ROUTES.JOBS.DOWNLOAD_PREFIX}/dope`) - .expect(403) - .then(({ body }) => - expect(body.message).toMatchInlineSnapshot(` - "Ask your administrator for access to reporting features. Learn more." - `) - ); - }); - }); - describe('usage counters', () => { it('increments the info api counter', async () => { mockEsClient.search.mockResponseOnce(getCompleteHits()); diff --git a/x-pack/plugins/reporting/server/routes/public/generate_from_jobparams.ts b/x-pack/plugins/reporting/server/routes/public/generate_from_jobparams.ts index 276c9da8a30b4..1f901634f3f00 100644 --- a/x-pack/plugins/reporting/server/routes/public/generate_from_jobparams.ts +++ b/x-pack/plugins/reporting/server/routes/public/generate_from_jobparams.ts @@ -16,8 +16,7 @@ export function registerGenerationRoutesPublic(reporting: ReportingCore, logger: const setupDeps = reporting.getPluginSetupDeps(); const { router } = setupDeps; - const useKibanaAccessControl = reporting.getDeprecatedAllowedRoles() === false; // true if Reporting's deprecated access control feature is disabled - const kibanaAccessControlTags = useKibanaAccessControl ? ['access:generateReport'] : []; + const kibanaAccessControlTags = ['access:generateReport']; const registerPublicPostGenerationEndpoint = () => { const path = `${PUBLIC_ROUTES.GENERATE_PREFIX}/{exportType}`; diff --git a/x-pack/plugins/reporting/server/routes/public/integration_tests/jobs.test.ts b/x-pack/plugins/reporting/server/routes/public/integration_tests/jobs.test.ts index 8e15ab314e723..8afb1d2aa25b0 100644 --- a/x-pack/plugins/reporting/server/routes/public/integration_tests/jobs.test.ts +++ b/x-pack/plugins/reporting/server/routes/public/integration_tests/jobs.test.ts @@ -72,7 +72,7 @@ describe(`Reporting Job Management Routes: Public`, () => { }; const coreSetupMock = coreMock.createSetup(); - const mockConfigSchema = createMockConfigSchema({ roles: { enabled: false } }); + const mockConfigSchema = createMockConfigSchema(); beforeEach(async () => { ({ server, httpSetup } = await setupServer(reportingSymbol)); diff --git a/x-pack/plugins/reporting/server/types.ts b/x-pack/plugins/reporting/server/types.ts index 40415a3aaacf4..221ec83e0b3e2 100644 --- a/x-pack/plugins/reporting/server/types.ts +++ b/x-pack/plugins/reporting/server/types.ts @@ -37,10 +37,6 @@ import type { AuthenticatedUser } from '@kbn/core-security-common'; */ export interface ReportingSetup { registerExportTypes: ExportTypesRegistry['register']; - /** - * Used to inform plugins if Reporting config is compatible with UI Capabilities / Application Sub-Feature Controls - */ - usesUiCapabilities: () => boolean; } /** diff --git a/x-pack/plugins/reporting/tsconfig.json b/x-pack/plugins/reporting/tsconfig.json index 68a7ded4ee1e8..e4e579802912b 100644 --- a/x-pack/plugins/reporting/tsconfig.json +++ b/x-pack/plugins/reporting/tsconfig.json @@ -30,7 +30,6 @@ "@kbn/test-jest-helpers", "@kbn/rison", "@kbn/task-manager-plugin", - "@kbn/config", "@kbn/core-http-server", "@kbn/core-test-helpers-test-utils", "@kbn/safer-lodash-set", diff --git a/x-pack/plugins/rule_registry/common/schemas/8.17.0/index.ts b/x-pack/plugins/rule_registry/common/schemas/8.17.0/index.ts new file mode 100644 index 0000000000000..cc1d73de3c4ae --- /dev/null +++ b/x-pack/plugins/rule_registry/common/schemas/8.17.0/index.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 { ALERT_SUPPRESSION_TERMS } from '@kbn/rule-data-utils'; +import { SearchTypes } from '@kbn/data-plugin/common'; +import { AlertWithCommonFields880 } from '../8.8.0'; + +import { SuppressionFields8130 } from '../8.13.0'; + +/* DO NOT MODIFY THIS SCHEMA TO ADD NEW FIELDS. These types represent the alerts that shipped in 8.13.0. +Any changes to these types should be bug fixes so the types more accurately represent the alerts from 8.13.0. + +If you are adding new fields for a new release of Kibana, create a new sibling folder to this one +for the version to be released and add the field(s) to the schema in that folder. + +Then, update `../index.ts` to import from the new folder that has the latest schemas, add the +new schemas to the union of all alert schemas, and re-export the new schemas as the `*Latest` schemas. +*/ + +export interface SuppressionFields8170 + extends Omit { + [ALERT_SUPPRESSION_TERMS]: Array<{ + field: string; + value: SearchTypes | null; + }>; +} + +export type AlertWithSuppressionFields8170 = AlertWithCommonFields880 & SuppressionFields8170; diff --git a/x-pack/plugins/rule_registry/common/schemas/index.ts b/x-pack/plugins/rule_registry/common/schemas/index.ts index 5c168a4b899cc..5a94d250392ef 100644 --- a/x-pack/plugins/rule_registry/common/schemas/index.ts +++ b/x-pack/plugins/rule_registry/common/schemas/index.ts @@ -13,11 +13,11 @@ import type { CommonAlertFields880, } from './8.8.0'; -import type { AlertWithSuppressionFields8130, SuppressionFields8130 } from './8.13.0'; +import type { AlertWithSuppressionFields8170, SuppressionFields8170 } from './8.17.0'; export type { - AlertWithSuppressionFields8130 as AlertWithSuppressionFieldsLatest, - SuppressionFields8130 as SuppressionFieldsLatest, + AlertWithSuppressionFields8170 as AlertWithSuppressionFieldsLatest, + SuppressionFields8170 as SuppressionFieldsLatest, CommonAlertFieldName880 as CommonAlertFieldNameLatest, CommonAlertIdFieldName870 as CommonAlertIdFieldNameLatest, CommonAlertFields880 as CommonAlertFieldsLatest, diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.mock.ts b/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.mock.ts index 66ef6a73013f4..d58d5398f907c 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.mock.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.mock.ts @@ -20,7 +20,6 @@ const createAlertsClientMock = () => { bulkUpdateCases: jest.fn(), find: jest.fn(), getGroupAggregations: jest.fn(), - getFeatureIdsByRegistrationContexts: jest.fn(), getBrowserFields: jest.fn(), getAlertSummary: jest.fn(), ensureAllAlertsAuthorizedRead: jest.fn(), diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.test.ts b/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.test.ts new file mode 100644 index 0000000000000..77215955277dc --- /dev/null +++ b/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.test.ts @@ -0,0 +1,244 @@ +/* + * 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 { coreMock, loggingSystemMock } from '@kbn/core/server/mocks'; +import { alertingAuthorizationMock } from '@kbn/alerting-plugin/server/authorization/alerting_authorization.mock'; +import { ruleDataServiceMock } from '../rule_data_plugin_service/rule_data_plugin_service.mock'; +import { AlertsClient, ConstructorOptions } from './alerts_client'; +import { fromKueryExpression } from '@kbn/es-query'; + +describe('AlertsClient', () => { + const alertingAuthMock = alertingAuthorizationMock.create(); + const ruleDataService = ruleDataServiceMock.create(); + const requestHandlerContext = coreMock.createRequestHandlerContext(); + const esClientMock = requestHandlerContext.elasticsearch.client.asCurrentUser; + + let alertsClient: AlertsClient; + + beforeEach(() => { + jest.clearAllMocks(); + alertingAuthMock.getSpaceId.mockReturnValue('space-1'); + alertingAuthMock.getAllAuthorizedRuleTypesFindOperation.mockResolvedValue( + new Map([ + [ + 'test-rule-type-1', + { + id: 'test-rule-type-1', + authorizedConsumers: { foo: { all: true, read: true } }, + }, + ], + ]) + ); + + alertingAuthMock.getAuthorizationFilter.mockResolvedValue({ + filter: fromKueryExpression( + 'alert.attributes.alertTypeId: test-rule-type-1 AND alert.attributes.consumer: foo' + ), + ensureRuleTypeIsAuthorized: jest.fn(), + }); + + const alertsClientParams: ConstructorOptions = { + logger: loggingSystemMock.create().get(), + authorization: alertingAuthMock, + esClient: esClientMock, + ruleDataService, + getRuleType: jest.fn(), + getRuleList: jest.fn(), + getAlertIndicesAlias: jest.fn(), + }; + + alertsClient = new AlertsClient(alertsClientParams); + }); + + describe('find', () => { + it('creates the ruleTypeIds filter correctly', async () => { + await alertsClient.find({ ruleTypeIds: ['test-rule-type-1', 'test-rule-type-2'] }); + + expect(esClientMock.search.mock.calls[0][0]).toMatchInlineSnapshot(` + Object { + "body": Object { + "_source": undefined, + "aggs": undefined, + "fields": Array [ + "kibana.alert.rule.rule_type_id", + "kibana.alert.rule.consumer", + "kibana.alert.workflow_status", + "kibana.space_ids", + ], + "query": Object { + "bool": Object { + "filter": Array [ + Object { + "arguments": Array [ + Object { + "arguments": Array [ + Object { + "isQuoted": false, + "type": "literal", + "value": "alert.attributes.alertTypeId", + }, + Object { + "isQuoted": false, + "type": "literal", + "value": "test-rule-type-1", + }, + ], + "function": "is", + "type": "function", + }, + Object { + "arguments": Array [ + Object { + "isQuoted": false, + "type": "literal", + "value": "alert.attributes.consumer", + }, + Object { + "isQuoted": false, + "type": "literal", + "value": "foo", + }, + ], + "function": "is", + "type": "function", + }, + ], + "function": "and", + "type": "function", + }, + Object { + "term": Object { + "kibana.space_ids": "space-1", + }, + }, + Object { + "terms": Object { + "kibana.alert.rule.rule_type_id": Array [ + "test-rule-type-1", + "test-rule-type-2", + ], + }, + }, + ], + "must": Array [], + "must_not": Array [], + "should": Array [], + }, + }, + "runtime_mappings": undefined, + "size": undefined, + "sort": Array [ + Object { + "@timestamp": Object { + "order": "asc", + "unmapped_type": "date", + }, + }, + ], + "track_total_hits": undefined, + }, + "ignore_unavailable": true, + "index": ".alerts-*", + "seq_no_primary_term": true, + } + `); + }); + + it('creates the consumers filter correctly', async () => { + await alertsClient.find({ consumers: ['test-consumer-1', 'test-consumer-2'] }); + + expect(esClientMock.search.mock.calls[0][0]).toMatchInlineSnapshot(` + Object { + "body": Object { + "_source": undefined, + "aggs": undefined, + "fields": Array [ + "kibana.alert.rule.rule_type_id", + "kibana.alert.rule.consumer", + "kibana.alert.workflow_status", + "kibana.space_ids", + ], + "query": Object { + "bool": Object { + "filter": Array [ + Object { + "arguments": Array [ + Object { + "arguments": Array [ + Object { + "isQuoted": false, + "type": "literal", + "value": "alert.attributes.alertTypeId", + }, + Object { + "isQuoted": false, + "type": "literal", + "value": "test-rule-type-1", + }, + ], + "function": "is", + "type": "function", + }, + Object { + "arguments": Array [ + Object { + "isQuoted": false, + "type": "literal", + "value": "alert.attributes.consumer", + }, + Object { + "isQuoted": false, + "type": "literal", + "value": "foo", + }, + ], + "function": "is", + "type": "function", + }, + ], + "function": "and", + "type": "function", + }, + Object { + "term": Object { + "kibana.space_ids": "space-1", + }, + }, + Object { + "terms": Object { + "kibana.alert.rule.consumer": Array [ + "test-consumer-1", + "test-consumer-2", + ], + }, + }, + ], + "must": Array [], + "must_not": Array [], + "should": Array [], + }, + }, + "runtime_mappings": undefined, + "size": undefined, + "sort": Array [ + Object { + "@timestamp": Object { + "order": "asc", + "unmapped_type": "date", + }, + }, + ], + "track_total_hits": undefined, + }, + "ignore_unavailable": true, + "index": ".alerts-*", + "seq_no_primary_term": true, + } + `); + }); + }); +}); diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts b/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts index ea80a365ccd95..3a898b07fb461 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts @@ -15,29 +15,23 @@ import { ALERT_STATUS, getEsQueryConfig, getSafeSortIds, - isValidFeatureId, STATUS_VALUES, - ValidFeatureId, ALERT_STATUS_RECOVERED, ALERT_END, ALERT_STATUS_ACTIVE, ALERT_CASE_IDS, MAX_CASES_PER_ALERT, - AlertConsumers, + isSiemRuleType, } from '@kbn/rule-data-utils'; import { AggregateName, AggregationsAggregate, - AggregationsMultiBucketAggregateBase, MappingRuntimeFields, QueryDslQueryContainer, SortCombinations, } from '@elastic/elasticsearch/lib/api/types'; -import type { - RuleTypeParams, - PluginStartContract as AlertingStart, -} from '@kbn/alerting-plugin/server'; +import type { RuleTypeParams, AlertingServerStart } from '@kbn/alerting-plugin/server'; import { ReadOperations, AlertingAuthorization, @@ -68,6 +62,8 @@ import { MAX_ALERTS_PAGES, MAX_PAGINATED_ALERTS, } from './constants'; +import { getRuleTypeIdsFilter } from '../lib/get_rule_type_ids_filter'; +import { getConsumersFilter } from '../lib/get_consumers_filter'; // TODO: Fix typings https://github.com/elastic/kibana/issues/101776 type NonNullableProps = Omit & { @@ -97,7 +93,7 @@ export interface ConstructorOptions { ruleDataService: IRuleDataService; getRuleType: RuleTypeRegistry['get']; getRuleList: RuleTypeRegistry['list']; - getAlertIndicesAlias: AlertingStart['getAlertIndicesAlias']; + getAlertIndicesAlias: AlertingServerStart['getAlertIndicesAlias']; } export interface UpdateOptions { @@ -138,7 +134,8 @@ interface GetAlertSummaryParams { id?: string; gte: string; lte: string; - featureIds: string[]; + ruleTypeIds: string[]; + consumers?: string[]; filter?: estypes.QueryDslQueryContainer[]; fixedInterval?: string; } @@ -154,7 +151,8 @@ interface SearchAlertsParams { operation: WriteOperations.Update | ReadOperations.Find | ReadOperations.Get; sort?: estypes.SortOptions[]; lastSortIds?: Array; - featureIds?: string[]; + ruleTypeIds?: string[]; + consumers?: string[]; runtimeMappings?: MappingRuntimeFields; } @@ -172,7 +170,7 @@ export class AlertsClient { private readonly ruleDataService: IRuleDataService; private readonly getRuleType: RuleTypeRegistry['get']; private readonly getRuleList: RuleTypeRegistry['list']; - private getAlertIndicesAlias!: AlertingStart['getAlertIndicesAlias']; + private getAlertIndicesAlias!: AlertingServerStart['getAlertIndicesAlias']; constructor(options: ConstructorOptions) { this.logger = options.logger; @@ -295,7 +293,8 @@ export class AlertsClient { operation, sort, lastSortIds = [], - featureIds, + ruleTypeIds, + consumers, runtimeMappings, }: SearchAlertsParams) { try { @@ -316,7 +315,8 @@ export class AlertsClient { alertSpaceId, operation, config, - featureIds ? new Set(featureIds) : undefined + ruleTypeIds, + consumers ), aggs, _source, @@ -372,7 +372,9 @@ export class AlertsClient { return result; } catch (error) { - const errorMessage = `Unable to retrieve alert details for alert with id of "${id}" or with query "${query}" and operation ${operation} \nError: ${error}`; + const errorMessage = `Unable to retrieve alert details for alert with id of "${id}" or with query "${JSON.stringify( + query + )}" and operation ${operation} \nError: ${error}`; this.logger.error(errorMessage); throw Boom.notFound(errorMessage); } @@ -457,16 +459,17 @@ export class AlertsClient { alertSpaceId: string, operation: WriteOperations.Update | ReadOperations.Get | ReadOperations.Find, config: EsQueryConfig, - featuresIds?: Set + ruleTypeIds?: string[], + consumers?: string[] ) { try { - const authzFilter = (await getAuthzFilter( - this.authorization, - operation, - featuresIds - )) as Filter; + const authzFilter = (await getAuthzFilter(this.authorization, operation)) as Filter; const spacesFilter = getSpacesFilter(alertSpaceId) as unknown as Filter; + const ruleTypeIdsFilter = getRuleTypeIdsFilter(ruleTypeIds) as unknown as Filter; + const consumersFilter = getConsumersFilter(consumers) as unknown as Filter; + let esQuery; + if (id != null) { esQuery = { query: `_id:${id}`, language: 'kuery' }; } else if (typeof query === 'string') { @@ -474,12 +477,14 @@ export class AlertsClient { } else if (query != null && typeof query === 'object') { esQuery = []; } + const builtQuery = buildEsQuery( undefined, esQuery == null ? { query: ``, language: 'kuery' } : esQuery, - [authzFilter, spacesFilter], + [authzFilter, spacesFilter, ruleTypeIdsFilter, consumersFilter], config ); + if (query != null && typeof query === 'object') { return { ...builtQuery, @@ -639,15 +644,16 @@ export class AlertsClient { public async getAlertSummary({ gte, lte, - featureIds, + ruleTypeIds, + consumers, filter, fixedInterval = '1m', }: GetAlertSummaryParams) { try { - const indexToUse = await this.getAuthorizedAlertsIndices(featureIds); + const indexToUse = await this.getAuthorizedAlertsIndices(ruleTypeIds); if (isEmpty(indexToUse)) { - throw Boom.badRequest('no featureIds were provided for getting alert summary'); + throw Boom.badRequest('no ruleTypeIds were provided for getting alert summary'); } // first search for the alert by id, then use the alert info to check if user has access to it @@ -710,7 +716,8 @@ export class AlertsClient { }, }, size: 0, - featureIds, + ruleTypeIds, + consumers, }); let activeAlertCount = 0; @@ -981,7 +988,8 @@ export class AlertsClient { TAggregations = Record >({ aggs, - featureIds, + ruleTypeIds, + consumers, index, query, search_after: searchAfter, @@ -992,7 +1000,8 @@ export class AlertsClient { runtimeMappings, }: { aggs?: object; - featureIds?: string[]; + ruleTypeIds?: string[]; + consumers?: string[]; index?: string; query?: object; search_after?: Array; @@ -1004,15 +1013,16 @@ export class AlertsClient { }) { try { let indexToUse = index; - if (featureIds && !isEmpty(featureIds)) { - const tempIndexToUse = await this.getAuthorizedAlertsIndices(featureIds); + if (ruleTypeIds && !isEmpty(ruleTypeIds)) { + const tempIndexToUse = await this.getAuthorizedAlertsIndices(ruleTypeIds); if (!isEmpty(tempIndexToUse)) { indexToUse = (tempIndexToUse ?? []).join(); } } const alertsSearchResponse = await this.searchAlerts({ - featureIds, + ruleTypeIds, + consumers, query, aggs, _source, @@ -1042,7 +1052,8 @@ export class AlertsClient { * Performs a `find` query to extract aggregations on alert groups */ public async getGroupAggregations({ - featureIds, + ruleTypeIds, + consumers, groupByField, aggregations, filters, @@ -1051,9 +1062,15 @@ export class AlertsClient { sort = [{ unitsCount: { order: 'desc' } }], }: { /** - * The feature ids the alerts belong to, used for authorization + * The rule type IDs the alerts belong to. + * Used for filtering. + */ + ruleTypeIds: string[]; + /** + * The consumers the alerts belong to. + * Used for filtering. */ - featureIds: string[]; + consumers?: string[]; /** * The field to group by * @example "kibana.alert.rule.name" @@ -1093,9 +1110,10 @@ export class AlertsClient { } const searchResult = await this.find< never, - { groupByFields: AggregationsMultiBucketAggregateBase<{ key: string }> } + { groupByFields: estypes.AggregationsMultiBucketAggregateBase<{ key: string }> } >({ - featureIds, + ruleTypeIds, + consumers, aggs: { groupByFields: { terms: { @@ -1163,14 +1181,15 @@ export class AlertsClient { return searchResult; } - public async getAuthorizedAlertsIndices(featureIds: string[]): Promise { + public async getAuthorizedAlertsIndices(ruleTypeIds?: string[]): Promise { try { - const authorizedRuleTypes = await this.authorization.getAuthorizedRuleTypes( - AlertingAuthorizationEntity.Alert, - new Set(featureIds) - ); + const authorizedRuleTypes = await this.authorization.getAllAuthorizedRuleTypesFindOperation({ + authorizationEntity: AlertingAuthorizationEntity.Alert, + ruleTypeIds, + }); + const indices = this.getAlertIndicesAlias( - authorizedRuleTypes.map((art: { id: any }) => art.id), + Array.from(authorizedRuleTypes.keys()).map((id) => id), this.spaceId ); @@ -1182,48 +1201,13 @@ export class AlertsClient { } } - public async getFeatureIdsByRegistrationContexts( - RegistrationContexts: string[] - ): Promise { - try { - const featureIds = - this.ruleDataService.findFeatureIdsByRegistrationContexts(RegistrationContexts); - if (featureIds.length > 0) { - // ATTENTION FUTURE DEVELOPER when you are a super user the augmentedRuleTypes.authorizedRuleTypes will - // return all of the features that you can access and does not care about your featureIds - const augmentedRuleTypes = await this.authorization.getAugmentedRuleTypesWithAuthorization( - featureIds, - [ReadOperations.Find, ReadOperations.Get, WriteOperations.Update], - AlertingAuthorizationEntity.Alert - ); - // As long as the user can read a minimum of one type of rule type produced by the provided feature, - // the user should be provided that features' alerts index. - // Limiting which alerts that user can read on that index will be done via the findAuthorizationFilter - const authorizedFeatures = new Set(); - for (const ruleType of augmentedRuleTypes.authorizedRuleTypes) { - authorizedFeatures.add(ruleType.producer); - } - const validAuthorizedFeatures = Array.from(authorizedFeatures).filter( - (feature): feature is ValidFeatureId => - featureIds.includes(feature) && isValidFeatureId(feature) - ); - return validAuthorizedFeatures; - } - return featureIds; - } catch (exc) { - const errMessage = `getFeatureIdsByRegistrationContexts failed to get feature ids: ${exc}`; - this.logger.error(errMessage); - throw Boom.failedDependency(errMessage); - } - } - public async getBrowserFields({ - featureIds, + ruleTypeIds, indices, metaFields, allowNoIndex, }: { - featureIds: string[]; + ruleTypeIds: string[]; indices: string[]; metaFields: string[]; allowNoIndex: boolean; @@ -1231,13 +1215,15 @@ export class AlertsClient { const indexPatternsFetcherAsInternalUser = new IndexPatternsFetcher(this.esClient); const ruleTypeList = this.getRuleList(); const fieldsForAAD = new Set(); - for (const rule of ruleTypeList) { - if (featureIds.includes(rule.producer) && rule.hasFieldsForAAD) { + + for (const rule of ruleTypeList.values()) { + if (ruleTypeIds.includes(rule.id) && rule.hasFieldsForAAD) { (rule.fieldsForAAD ?? []).forEach((f) => { fieldsForAAD.add(f); }); } } + const { fields } = await indexPatternsFetcherAsInternalUser.getFieldsForWildcard({ pattern: indices, metaFields, @@ -1252,11 +1238,12 @@ export class AlertsClient { } public async getAADFields({ ruleTypeId }: { ruleTypeId: string }) { - const { producer, fieldsForAAD = [] } = this.getRuleType(ruleTypeId); - if (producer === AlertConsumers.SIEM) { + const { fieldsForAAD = [] } = this.getRuleType(ruleTypeId); + if (isSiemRuleType(ruleTypeId)) { throw Boom.badRequest(`Security solution rule type is not supported`); } - const indices = await this.getAuthorizedAlertsIndices([producer]); + + const indices = await this.getAuthorizedAlertsIndices([ruleTypeId]); const indexPatternsFetcherAsInternalUser = new IndexPatternsFetcher(this.esClient); const { fields = [] } = await indexPatternsFetcherAsInternalUser.getFieldsForWildcard({ pattern: indices ?? [], diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client_factory.test.ts b/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client_factory.test.ts index 367ead5744d55..8613f6135d30a 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client_factory.test.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client_factory.test.ts @@ -21,7 +21,7 @@ const alertingAuthMock = alertingAuthorizationMock.create(); const alertsClientFactoryParams: AlertsClientFactoryProps = { logger: loggingSystemMock.create().get(), - getAlertingAuthorization: (_: KibanaRequest) => alertingAuthMock, + getAlertingAuthorization: (_: KibanaRequest) => Promise.resolve(alertingAuthMock), securityPluginSetup, esClient: {} as ElasticsearchClient, ruleDataService: ruleDataServiceMock.create(), diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client_factory.ts b/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client_factory.ts index 934074cc4a2ed..91449954db61c 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client_factory.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client_factory.ts @@ -8,10 +8,7 @@ import { PublicMethodsOf } from '@kbn/utility-types'; import { ElasticsearchClient, KibanaRequest, Logger } from '@kbn/core/server'; import type { RuleTypeRegistry } from '@kbn/alerting-plugin/server/types'; -import { - AlertingAuthorization, - PluginStartContract as AlertingStart, -} from '@kbn/alerting-plugin/server'; +import { AlertingAuthorization, AlertingServerStart } from '@kbn/alerting-plugin/server'; import { SecurityPluginSetup } from '@kbn/security-plugin/server'; import { IRuleDataService } from '../rule_data_plugin_service'; import { AlertsClient } from './alerts_client'; @@ -19,12 +16,14 @@ import { AlertsClient } from './alerts_client'; export interface AlertsClientFactoryProps { logger: Logger; esClient: ElasticsearchClient; - getAlertingAuthorization: (request: KibanaRequest) => PublicMethodsOf; + getAlertingAuthorization: ( + request: KibanaRequest + ) => Promise>; securityPluginSetup: SecurityPluginSetup | undefined; ruleDataService: IRuleDataService | null; getRuleType: RuleTypeRegistry['get']; getRuleList: RuleTypeRegistry['list']; - getAlertIndicesAlias: AlertingStart['getAlertIndicesAlias']; + getAlertIndicesAlias: AlertingServerStart['getAlertIndicesAlias']; } export class AlertsClientFactory { @@ -33,12 +32,12 @@ export class AlertsClientFactory { private esClient!: ElasticsearchClient; private getAlertingAuthorization!: ( request: KibanaRequest - ) => PublicMethodsOf; + ) => Promise>; private securityPluginSetup!: SecurityPluginSetup | undefined; private ruleDataService!: IRuleDataService | null; private getRuleType!: RuleTypeRegistry['get']; private getRuleList!: RuleTypeRegistry['list']; - private getAlertIndicesAlias!: AlertingStart['getAlertIndicesAlias']; + private getAlertIndicesAlias!: AlertingServerStart['getAlertIndicesAlias']; public initialize(options: AlertsClientFactoryProps) { /** @@ -61,10 +60,11 @@ export class AlertsClientFactory { public async create(request: KibanaRequest): Promise { const { securityPluginSetup, getAlertingAuthorization, logger } = this; + const authorization = await getAlertingAuthorization(request); return new AlertsClient({ logger, - authorization: getAlertingAuthorization(request), + authorization, auditLogger: securityPluginSetup?.audit.asScoped(request), esClient: this.esClient, ruleDataService: this.ruleDataService!, diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/tests/bulk_update.test.ts b/x-pack/plugins/rule_registry/server/alert_data_client/tests/bulk_update.test.ts index 28cd76ca6dffe..8d2e6cffa0cc5 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/tests/bulk_update.test.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/tests/bulk_update.test.ts @@ -17,7 +17,6 @@ import { loggingSystemMock } from '@kbn/core/server/mocks'; import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { alertingAuthorizationMock } from '@kbn/alerting-plugin/server/authorization/alerting_authorization.mock'; import { auditLoggerMock } from '@kbn/security-plugin/server/audit/mocks'; -import { AlertingAuthorizationEntity } from '@kbn/alerting-plugin/server'; import { ruleDataServiceMock } from '../../rule_data_plugin_service/rule_data_plugin_service.mock'; const alertingAuthMock = alertingAuthorizationMock.create(); @@ -36,39 +35,38 @@ const alertsClientParams: jest.Mocked = { }; const DEFAULT_SPACE = 'test_default_space_id'; +const authorizedRuleTypes = new Map([ + [ + 'apm.error_rate', + { + producer: 'apm', + id: 'apm.error_rate', + alerts: { + context: 'observability.apm', + }, + authorizedConsumers: {}, + }, + ], +]); beforeEach(() => { jest.resetAllMocks(); - alertingAuthMock.getSpaceId.mockImplementation(() => 'test_default_space_id'); - // @ts-expect-error - alertingAuthMock.getAuthorizationFilter.mockImplementation(async () => - Promise.resolve({ filter: [] }) - ); - // @ts-expect-error - alertingAuthMock.getAugmentedRuleTypesWithAuthorization.mockImplementation(async () => { - const authorizedRuleTypes = new Set(); - authorizedRuleTypes.add({ producer: 'apm' }); - return Promise.resolve({ authorizedRuleTypes }); + alertingAuthMock.getSpaceId.mockImplementation(() => DEFAULT_SPACE); + alertingAuthMock.getAuthorizationFilter.mockResolvedValue({ + filter: undefined, + ensureRuleTypeIsAuthorized: jest.fn(), }); - alertingAuthMock.ensureAuthorized.mockImplementation( - // @ts-expect-error - async ({ - ruleTypeId, - consumer, - operation, - entity, - }: { - ruleTypeId: string; - consumer: string; - operation: string; - entity: typeof AlertingAuthorizationEntity.Alert; - }) => { - if (ruleTypeId === 'apm.error_rate' && consumer === 'apm') { - return Promise.resolve(); - } - return Promise.reject(new Error(`Unauthorized for ${ruleTypeId} and ${consumer}`)); + alertingAuthMock.getAllAuthorizedRuleTypes.mockResolvedValue({ + hasAllRequested: true, + authorizedRuleTypes, + }); + + alertingAuthMock.ensureAuthorized.mockImplementation(async ({ ruleTypeId, consumer }) => { + if (ruleTypeId === 'apm.error_rate' && consumer === 'apm') { + return Promise.resolve(); } - ); + return Promise.reject(new Error(`Unauthorized for ${ruleTypeId} and ${consumer}`)); + }); }); const fakeAlertId = 'myfakeid1'; @@ -337,7 +335,7 @@ describe('bulkUpdate()', () => { }) ).rejects.toThrowErrorMatchingInlineSnapshot(` "queryAndAuditAllAlerts threw an error: Unable to retrieve alerts with query \\"kibana.alert.status: active\\" and operation update - Error: Unable to retrieve alert details for alert with id of \\"null\\" or with query \\"kibana.alert.status: active\\" and operation update + Error: Unable to retrieve alert details for alert with id of \\"null\\" or with query \\"\\"kibana.alert.status: active\\"\\" and operation update Error: Error: Unauthorized for fake.rule and apm" `); @@ -404,7 +402,7 @@ describe('bulkUpdate()', () => { }) ).rejects.toThrowErrorMatchingInlineSnapshot(` "queryAndAuditAllAlerts threw an error: Unable to retrieve alerts with query \\"kibana.alert.status: active\\" and operation update - Error: Unable to retrieve alert details for alert with id of \\"null\\" or with query \\"kibana.alert.status: active\\" and operation update + Error: Unable to retrieve alert details for alert with id of \\"null\\" or with query \\"\\"kibana.alert.status: active\\"\\" and operation update Error: Error: Unauthorized for fake.rule and apm" `); diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/tests/find_alerts.test.ts b/x-pack/plugins/rule_registry/server/alert_data_client/tests/find_alerts.test.ts index 57e877f568cd9..c554ee4d61f99 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/tests/find_alerts.test.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/tests/find_alerts.test.ts @@ -16,62 +16,107 @@ import { loggingSystemMock } from '@kbn/core/server/mocks'; import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { alertingAuthorizationMock } from '@kbn/alerting-plugin/server/authorization/alerting_authorization.mock'; import { auditLoggerMock } from '@kbn/security-plugin/server/audit/mocks'; -import { AlertingAuthorizationEntity } from '@kbn/alerting-plugin/server'; import { ruleDataServiceMock } from '../../rule_data_plugin_service/rule_data_plugin_service.mock'; +import { JsonObject } from '@kbn/utility-types'; -const alertingAuthMock = alertingAuthorizationMock.create(); -const esClientMock = elasticsearchClientMock.createElasticsearchClient(); -const auditLogger = auditLoggerMock.create(); +describe('find()', () => { + const alertingAuthMock = alertingAuthorizationMock.create(); + const esClientMock = elasticsearchClientMock.createElasticsearchClient(); + const auditLogger = auditLoggerMock.create(); -const alertsClientParams: jest.Mocked = { - logger: loggingSystemMock.create().get(), - authorization: alertingAuthMock, - esClient: esClientMock, - auditLogger, - ruleDataService: ruleDataServiceMock.create(), - getRuleType: jest.fn(), - getRuleList: jest.fn(), - getAlertIndicesAlias: jest.fn(), -}; + const alertsClientParams: jest.Mocked = { + logger: loggingSystemMock.create().get(), + authorization: alertingAuthMock, + esClient: esClientMock, + auditLogger, + ruleDataService: ruleDataServiceMock.create(), + getRuleType: jest.fn(), + getRuleList: jest.fn(), + getAlertIndicesAlias: jest.fn(), + }; -const DEFAULT_SPACE = 'test_default_space_id'; + const DEFAULT_SPACE = 'test_default_space_id'; + const authorizedRuleTypes = new Map([ + [ + 'apm.error_rate', + { + producer: 'apm', + id: 'apm.error_rate', + alerts: { + context: 'observability.apm', + }, + authorizedConsumers: {}, + }, + ], + ]); -beforeEach(() => { - jest.resetAllMocks(); - alertingAuthMock.getSpaceId.mockImplementation(() => DEFAULT_SPACE); - // @ts-expect-error - alertingAuthMock.getAuthorizationFilter.mockImplementation(async () => - Promise.resolve({ filter: [] }) - ); - // @ts-expect-error - alertingAuthMock.getAugmentedRuleTypesWithAuthorization.mockImplementation(async () => { - const authorizedRuleTypes = new Set(); - authorizedRuleTypes.add({ producer: 'apm' }); - return Promise.resolve({ authorizedRuleTypes }); - }); + const filter = { + bool: { + filter: [ + { + bool: { + should: [ + { + bool: { + filter: [ + { + bool: { + should: [{ match: { 'kibana.alert.rule.rule_type_id': '.es-query' } }], + minimum_should_match: 1, + }, + }, + { + bool: { + should: [ + { + bool: { + should: [{ match: { 'kibana.alert.rule.consumer': 'stackAlerts' } }], + minimum_should_match: 1, + }, + }, + { + bool: { + should: [{ match: { 'kibana.alert.rule.consumer': 'alerts' } }], + minimum_should_match: 1, + }, + }, + ], + minimum_should_match: 1, + }, + }, + ], + }, + }, + ], + minimum_should_match: 1, + }, + }, + { term: { 'kibana.space_ids': 'default' } }, + { terms: { 'kibana.alert.rule.rule_type_id': ['.es-query'] } }, + ], + }, + }; - alertingAuthMock.ensureAuthorized.mockImplementation( - // @ts-expect-error - async ({ - ruleTypeId, - consumer, - operation, - entity, - }: { - ruleTypeId: string; - consumer: string; - operation: string; - entity: typeof AlertingAuthorizationEntity.Alert; - }) => { + beforeEach(() => { + jest.resetAllMocks(); + alertingAuthMock.getSpaceId.mockImplementation(() => DEFAULT_SPACE); + alertingAuthMock.getAuthorizationFilter.mockResolvedValue({ + filter: filter as unknown as JsonObject, + ensureRuleTypeIsAuthorized: jest.fn(), + }); + alertingAuthMock.getAllAuthorizedRuleTypes.mockResolvedValue({ + hasAllRequested: true, + authorizedRuleTypes, + }); + + alertingAuthMock.ensureAuthorized.mockImplementation(async ({ ruleTypeId, consumer }) => { if (ruleTypeId === 'apm.error_rate' && consumer === 'apm') { return Promise.resolve(); } return Promise.reject(new Error(`Unauthorized for ${ruleTypeId} and ${consumer}`)); - } - ); -}); + }); + }); -describe('find()', () => { test('calls ES client with given params', async () => { const alertsClient = new AlertsClient(alertsClientParams); const searchAlertsSpy = jest.spyOn(alertsClient as any, 'searchAlerts'); @@ -111,19 +156,25 @@ describe('find()', () => { }); const query = { match: { [ALERT_WORKFLOW_STATUS]: 'open' } }; const index = '.alerts-observability.apm.alerts'; - const featureIds = ['siem']; + const ruleTypeIds = ['siem.esqlRule', 'siem.eqlRule']; + const consumers = ['siem']; + const result = await alertsClient.find({ query, index, - featureIds, + ruleTypeIds, + consumers, }); + expect(searchAlertsSpy).toHaveBeenCalledWith( expect.objectContaining({ query, index, - featureIds, + ruleTypeIds, + consumers, }) ); + expect(result).toMatchInlineSnapshot(` Object { "_shards": Object { @@ -176,12 +227,100 @@ describe('find()', () => { "query": Object { "bool": Object { "filter": Array [ - Object {}, + Object { + "bool": Object { + "filter": Array [ + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "bool": Object { + "filter": Array [ + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "kibana.alert.rule.rule_type_id": ".es-query", + }, + }, + ], + }, + }, + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "kibana.alert.rule.consumer": "stackAlerts", + }, + }, + ], + }, + }, + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "kibana.alert.rule.consumer": "alerts", + }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + Object { + "term": Object { + "kibana.space_ids": "default", + }, + }, + Object { + "terms": Object { + "kibana.alert.rule.rule_type_id": Array [ + ".es-query", + ], + }, + }, + ], + }, + }, Object { "term": Object { "kibana.space_ids": "test_default_space_id", }, }, + Object { + "terms": Object { + "kibana.alert.rule.rule_type_id": Array [ + "siem.esqlRule", + "siem.eqlRule", + ], + }, + }, + Object { + "terms": Object { + "kibana.alert.rule.consumer": Array [ + "siem", + ], + }, + }, ], "must": Array [ Object { @@ -310,7 +449,80 @@ describe('find()', () => { "query": Object { "bool": Object { "filter": Array [ - Object {}, + Object { + "bool": Object { + "filter": Array [ + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "bool": Object { + "filter": Array [ + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "kibana.alert.rule.rule_type_id": ".es-query", + }, + }, + ], + }, + }, + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "kibana.alert.rule.consumer": "stackAlerts", + }, + }, + ], + }, + }, + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "kibana.alert.rule.consumer": "alerts", + }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + Object { + "term": Object { + "kibana.space_ids": "default", + }, + }, + Object { + "terms": Object { + "kibana.alert.rule.rule_type_id": Array [ + ".es-query", + ], + }, + }, + ], + }, + }, Object { "term": Object { "kibana.space_ids": "test_default_space_id", @@ -437,7 +649,7 @@ describe('find()', () => { index: '.alerts-observability.apm.alerts', }) ).rejects.toThrowErrorMatchingInlineSnapshot(` - "Unable to retrieve alert details for alert with id of \\"undefined\\" or with query \\"[object Object]\\" and operation find + "Unable to retrieve alert details for alert with id of \\"undefined\\" or with query \\"{\\"match\\":{\\"kibana.alert.workflow_status\\":\\"open\\"}}\\" and operation find Error: Error: Unauthorized for fake.rule and apm" `); @@ -467,7 +679,7 @@ describe('find()', () => { index: '.alerts-observability.apm.alerts', }) ).rejects.toThrowErrorMatchingInlineSnapshot(` - "Unable to retrieve alert details for alert with id of \\"undefined\\" or with query \\"[object Object]\\" and operation find + "Unable to retrieve alert details for alert with id of \\"undefined\\" or with query \\"{\\"match\\":{\\"kibana.alert.workflow_status\\":\\"open\\"}}\\" and operation find Error: Error: something went wrong" `); }); diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/tests/get.test.ts b/x-pack/plugins/rule_registry/server/alert_data_client/tests/get.test.ts index b48e68c3bf255..b0fcb505d95b6 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/tests/get.test.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/tests/get.test.ts @@ -17,7 +17,6 @@ import { loggingSystemMock } from '@kbn/core/server/mocks'; import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { alertingAuthorizationMock } from '@kbn/alerting-plugin/server/authorization/alerting_authorization.mock'; import { auditLoggerMock } from '@kbn/security-plugin/server/audit/mocks'; -import { AlertingAuthorizationEntity } from '@kbn/alerting-plugin/server'; import { ruleDataServiceMock } from '../../rule_data_plugin_service/rule_data_plugin_service.mock'; const alertingAuthMock = alertingAuthorizationMock.create(); @@ -36,41 +35,38 @@ const alertsClientParams: jest.Mocked = { }; const DEFAULT_SPACE = 'test_default_space_id'; +const authorizedRuleTypes = new Map([ + [ + 'apm.error_rate', + { + producer: 'apm', + id: 'apm.error_rate', + alerts: { + context: 'observability.apm', + }, + authorizedConsumers: {}, + }, + ], +]); beforeEach(() => { jest.resetAllMocks(); alertingAuthMock.getSpaceId.mockImplementation(() => DEFAULT_SPACE); - // @ts-expect-error - alertingAuthMock.getAuthorizationFilter.mockImplementation(async () => - Promise.resolve({ filter: [] }) - ); - - // @ts-expect-error - alertingAuthMock.getAugmentedRuleTypesWithAuthorization.mockImplementation(async () => { - const authorizedRuleTypes = new Set(); - authorizedRuleTypes.add({ producer: 'apm' }); - return Promise.resolve({ authorizedRuleTypes }); + alertingAuthMock.getAuthorizationFilter.mockResolvedValue({ + filter: undefined, + ensureRuleTypeIsAuthorized: jest.fn(), + }); + alertingAuthMock.getAllAuthorizedRuleTypes.mockResolvedValue({ + hasAllRequested: true, + authorizedRuleTypes, }); - alertingAuthMock.ensureAuthorized.mockImplementation( - // @ts-expect-error - async ({ - ruleTypeId, - consumer, - operation, - entity, - }: { - ruleTypeId: string; - consumer: string; - operation: string; - entity: typeof AlertingAuthorizationEntity.Alert; - }) => { - if (ruleTypeId === 'apm.error_rate' && consumer === 'apm') { - return Promise.resolve(); - } - return Promise.reject(new Error(`Unauthorized for ${ruleTypeId} and ${consumer}`)); + alertingAuthMock.ensureAuthorized.mockImplementation(async ({ ruleTypeId, consumer }) => { + if (ruleTypeId === 'apm.error_rate' && consumer === 'apm') { + return Promise.resolve(); } - ); + return Promise.reject(new Error(`Unauthorized for ${ruleTypeId} and ${consumer}`)); + }); }); describe('get()', () => { @@ -150,7 +146,6 @@ describe('get()', () => { ], }, }, - Object {}, Object { "term": Object { "kibana.space_ids": "test_default_space_id", diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/tests/get_aad_fields.test.ts b/x-pack/plugins/rule_registry/server/alert_data_client/tests/get_aad_fields.test.ts index 777b3d3e26742..0a7b11e2be9b0 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/tests/get_aad_fields.test.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/tests/get_aad_fields.test.ts @@ -5,7 +5,6 @@ * 2.0. */ -import { AlertConsumers } from '@kbn/rule-data-utils'; import { AlertsClient, ConstructorOptions } from '../alerts_client'; import { loggingSystemMock } from '@kbn/core/server/mocks'; import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; @@ -38,13 +37,12 @@ beforeEach(() => { describe('getAADFields()', () => { test('should throw an error when a rule type belong to security solution', async () => { getRuleTypeMock.mockImplementation(() => ({ - producer: AlertConsumers.SIEM, fieldsForAAD: [], })); const alertsClient = new AlertsClient(alertsClientParams); await expect( - alertsClient.getAADFields({ ruleTypeId: 'security-type' }) + alertsClient.getAADFields({ ruleTypeId: 'siem.esqlRule' }) ).rejects.toThrowErrorMatchingInlineSnapshot(`"Security solution rule type is not supported"`); }); }); diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/tests/get_alerts_group_aggregations.test.ts b/x-pack/plugins/rule_registry/server/alert_data_client/tests/get_alerts_group_aggregations.test.ts index c351de1283c2b..2bcafffdeebab 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/tests/get_alerts_group_aggregations.test.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/tests/get_alerts_group_aggregations.test.ts @@ -5,13 +5,11 @@ * 2.0. */ -import { AlertConsumers } from '@kbn/rule-data-utils'; import { AlertsClient, ConstructorOptions } from '../alerts_client'; import { loggingSystemMock } from '@kbn/core/server/mocks'; import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { alertingAuthorizationMock } from '@kbn/alerting-plugin/server/authorization/alerting_authorization.mock'; import { auditLoggerMock } from '@kbn/security-plugin/server/audit/mocks'; -import { AlertingAuthorizationEntity } from '@kbn/alerting-plugin/server'; import { ruleDataServiceMock } from '../../rule_data_plugin_service/rule_data_plugin_service.mock'; import { DEFAULT_ALERTS_GROUP_BY_FIELD_SIZE, MAX_ALERTS_GROUPING_QUERY_SIZE } from '../constants'; @@ -33,40 +31,38 @@ const alertsClientParams: jest.Mocked = { }; const DEFAULT_SPACE = 'test_default_space_id'; +const authorizedRuleTypes = new Map([ + [ + 'apm.error_rate', + { + producer: 'apm', + id: 'apm.error_rate', + alerts: { + context: 'observability.apm', + }, + authorizedConsumers: {}, + }, + ], +]); beforeEach(() => { jest.resetAllMocks(); alertingAuthMock.getSpaceId.mockImplementation(() => DEFAULT_SPACE); - // @ts-expect-error - alertingAuthMock.getAuthorizationFilter.mockImplementation(async () => - Promise.resolve({ filter: [] }) - ); - // @ts-expect-error - alertingAuthMock.getAugmentedRuleTypesWithAuthorization.mockImplementation(async () => { - const authorizedRuleTypes = new Set(); - authorizedRuleTypes.add({ producer: 'apm' }); - return Promise.resolve({ authorizedRuleTypes }); + alertingAuthMock.getAuthorizationFilter.mockResolvedValue({ + filter: undefined, + ensureRuleTypeIsAuthorized: jest.fn(), + }); + alertingAuthMock.getAllAuthorizedRuleTypes.mockResolvedValue({ + hasAllRequested: true, + authorizedRuleTypes, }); - alertingAuthMock.ensureAuthorized.mockImplementation( - // @ts-expect-error - async ({ - ruleTypeId, - consumer, - operation, - entity, - }: { - ruleTypeId: string; - consumer: string; - operation: string; - entity: typeof AlertingAuthorizationEntity.Alert; - }) => { - if (ruleTypeId === 'apm.error_rate' && consumer === 'apm') { - return Promise.resolve(); - } - return Promise.reject(new Error(`Unauthorized for ${ruleTypeId} and ${consumer}`)); + alertingAuthMock.ensureAuthorized.mockImplementation(async ({ ruleTypeId, consumer }) => { + if (ruleTypeId === 'apm.error_rate' && consumer === 'apm') { + return Promise.resolve(); } - ); + return Promise.reject(new Error(`Unauthorized for ${ruleTypeId} and ${consumer}`)); + }); }); describe('getGroupAggregations()', () => { @@ -74,7 +70,9 @@ describe('getGroupAggregations()', () => { const alertsClient = new AlertsClient(alertsClientParams); alertsClient.find = jest.fn().mockResolvedValue({ aggregations: {} }); - const featureIds = [AlertConsumers.STACK_ALERTS]; + const ruleTypeIds = ['.es-query']; + const consumers = ['stackAlerts']; + const groupByField = 'kibana.alert.rule.name'; const aggregations = { usersCount: { @@ -86,7 +84,8 @@ describe('getGroupAggregations()', () => { const filters = [{ range: { '@timestamp': { gte: 'now-1d/d', lte: 'now/d' } } }]; await alertsClient.getGroupAggregations({ - featureIds, + ruleTypeIds, + consumers, groupByField, aggregations, filters, @@ -95,7 +94,8 @@ describe('getGroupAggregations()', () => { }); expect(alertsClient.find).toHaveBeenCalledWith({ - featureIds, + ruleTypeIds, + consumers, aggs: { groupByFields: { terms: { @@ -157,7 +157,7 @@ describe('getGroupAggregations()', () => { }); const result = await alertsClient.getGroupAggregations({ - featureIds: [AlertConsumers.STACK_ALERTS], + ruleTypeIds: ['.es-query'], groupByField: 'kibana.alert.rule.name', aggregations: {}, filters: [], @@ -176,7 +176,7 @@ describe('getGroupAggregations()', () => { await expect(() => alertsClient.getGroupAggregations({ - featureIds: ['apm', 'infrastructure', 'logs', 'observability', 'slo', 'uptime'], + ruleTypeIds: ['apm', 'infrastructure', 'logs', 'observability', 'slo', 'uptime'], groupByField: 'kibana.alert.rule.name', pageIndex: 101, pageSize: 50, @@ -186,7 +186,7 @@ describe('getGroupAggregations()', () => { ); await expect(() => alertsClient.getGroupAggregations({ - featureIds: ['apm', 'infrastructure', 'logs', 'observability', 'slo', 'uptime'], + ruleTypeIds: ['apm', 'infrastructure', 'logs', 'observability', 'slo', 'uptime'], groupByField: 'kibana.alert.rule.name', pageIndex: 10, pageSize: 5000, diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/tests/get_alerts_summary.test.ts b/x-pack/plugins/rule_registry/server/alert_data_client/tests/get_alerts_summary.test.ts new file mode 100644 index 0000000000000..deb3b82058843 --- /dev/null +++ b/x-pack/plugins/rule_registry/server/alert_data_client/tests/get_alerts_summary.test.ts @@ -0,0 +1,311 @@ +/* + * 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 { AlertsClient, ConstructorOptions } from '../alerts_client'; +import { loggingSystemMock } from '@kbn/core/server/mocks'; +import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; +import { alertingAuthorizationMock } from '@kbn/alerting-plugin/server/authorization/alerting_authorization.mock'; +import { auditLoggerMock } from '@kbn/security-plugin/server/audit/mocks'; +import { ruleDataServiceMock } from '../../rule_data_plugin_service/rule_data_plugin_service.mock'; +import { JsonObject } from '@kbn/utility-types'; + +jest.mock('uuid', () => ({ v4: () => 'unique-value' })); + +const alertingAuthMock = alertingAuthorizationMock.create(); +const esClientMock = elasticsearchClientMock.createElasticsearchClient(); +const auditLogger = auditLoggerMock.create(); + +const alertsClientParams: jest.Mocked = { + logger: loggingSystemMock.create().get(), + authorization: alertingAuthMock, + esClient: esClientMock, + auditLogger, + ruleDataService: ruleDataServiceMock.create(), + getRuleType: jest.fn(), + getRuleList: jest.fn(), + getAlertIndicesAlias: jest.fn().mockReturnValue(['stack-index']), +}; + +const DEFAULT_SPACE = 'test_default_space_id'; +const authorizedRuleTypes = new Map([ + [ + '.es-query', + { + producer: 'stackAlerts', + id: '.es-query', + alerts: { + context: 'stack', + }, + authorizedConsumers: {}, + }, + ], +]); + +const filter = { + bool: { + filter: [ + { + bool: { + should: [ + { + bool: { + filter: [ + { + bool: { + should: [{ match: { 'kibana.alert.rule.rule_type_id': '.es-query' } }], + minimum_should_match: 1, + }, + }, + { + bool: { + should: [ + { + bool: { + should: [{ match: { 'kibana.alert.rule.consumer': 'stackAlerts' } }], + minimum_should_match: 1, + }, + }, + { + bool: { + should: [{ match: { 'kibana.alert.rule.consumer': 'alerts' } }], + minimum_should_match: 1, + }, + }, + ], + minimum_should_match: 1, + }, + }, + ], + }, + }, + ], + minimum_should_match: 1, + }, + }, + { term: { 'kibana.space_ids': 'default' } }, + { terms: { 'kibana.alert.rule.rule_type_id': ['.es-query'] } }, + ], + }, +}; + +describe('getAlertSummary()', () => { + beforeEach(() => { + jest.clearAllMocks(); + alertingAuthMock.getSpaceId.mockImplementation(() => DEFAULT_SPACE); + alertingAuthMock.getAllAuthorizedRuleTypesFindOperation.mockResolvedValue(authorizedRuleTypes); + alertingAuthMock.getAuthorizationFilter.mockResolvedValue({ + filter: filter as unknown as JsonObject, + ensureRuleTypeIsAuthorized: jest.fn(), + }); + }); + + test('calls find() with the correct params', async () => { + const alertsClient = new AlertsClient(alertsClientParams) as jest.Mocked; + alertsClient.find = jest.fn().mockResolvedValue({ aggregations: {} }); + + const ruleTypeIds = ['.es-query']; + const consumers = ['stackAlerts']; + + await alertsClient.getAlertSummary({ + gte: 'now-1d/d', + lte: 'now/d', + ruleTypeIds, + consumers, + }); + + expect(esClientMock.search.mock.calls).toMatchInlineSnapshot(` + Array [ + Array [ + Object { + "body": Object { + "_source": undefined, + "aggs": Object { + "active_alerts_bucket": Object { + "date_histogram": Object { + "extended_bounds": Object { + "max": "now/d", + "min": "now-1d/d", + }, + "field": "kibana.alert.time_range", + "fixed_interval": "1m", + "hard_bounds": Object { + "max": "now/d", + "min": "now-1d/d", + }, + "min_doc_count": 0, + }, + }, + "count": Object { + "terms": Object { + "field": "kibana.alert.status", + }, + }, + "recovered_alerts": Object { + "aggs": Object { + "container": Object { + "date_histogram": Object { + "extended_bounds": Object { + "max": "now/d", + "min": "now-1d/d", + }, + "field": "kibana.alert.end", + "fixed_interval": "1m", + "min_doc_count": 0, + }, + }, + }, + "filter": Object { + "term": Object { + "kibana.alert.status": "recovered", + }, + }, + }, + }, + "fields": Array [ + "kibana.alert.rule.rule_type_id", + "kibana.alert.rule.consumer", + "kibana.alert.workflow_status", + "kibana.space_ids", + ], + "query": Object { + "bool": Object { + "filter": Array [ + Object { + "bool": Object { + "filter": Array [ + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "bool": Object { + "filter": Array [ + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "kibana.alert.rule.rule_type_id": ".es-query", + }, + }, + ], + }, + }, + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "kibana.alert.rule.consumer": "stackAlerts", + }, + }, + ], + }, + }, + Object { + "bool": Object { + "minimum_should_match": 1, + "should": Array [ + Object { + "match": Object { + "kibana.alert.rule.consumer": "alerts", + }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + ], + }, + }, + Object { + "term": Object { + "kibana.space_ids": "default", + }, + }, + Object { + "terms": Object { + "kibana.alert.rule.rule_type_id": Array [ + ".es-query", + ], + }, + }, + ], + }, + }, + Object { + "term": Object { + "kibana.space_ids": "test_default_space_id", + }, + }, + Object { + "terms": Object { + "kibana.alert.rule.rule_type_id": Array [ + ".es-query", + ], + }, + }, + Object { + "terms": Object { + "kibana.alert.rule.consumer": Array [ + "stackAlerts", + ], + }, + }, + ], + "must": Array [ + Object { + "bool": Object { + "filter": Array [ + Object { + "range": Object { + "kibana.alert.time_range": Object { + "gt": "now-1d/d", + "lt": "now/d", + }, + }, + }, + ], + }, + }, + ], + "must_not": Array [], + "should": Array [], + }, + }, + "runtime_mappings": undefined, + "size": 0, + "sort": Array [ + Object { + "@timestamp": Object { + "order": "asc", + "unmapped_type": "date", + }, + }, + ], + "track_total_hits": undefined, + }, + "ignore_unavailable": true, + "index": "stack-index", + "seq_no_primary_term": true, + }, + ], + ] + `); + }); +}); diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/tests/update.test.ts b/x-pack/plugins/rule_registry/server/alert_data_client/tests/update.test.ts index bd6a1b2695cd1..4b9587b8e0ca1 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/tests/update.test.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/tests/update.test.ts @@ -16,7 +16,6 @@ import { loggingSystemMock } from '@kbn/core/server/mocks'; import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { alertingAuthorizationMock } from '@kbn/alerting-plugin/server/authorization/alerting_authorization.mock'; import { auditLoggerMock } from '@kbn/security-plugin/server/audit/mocks'; -import { AlertingAuthorizationEntity } from '@kbn/alerting-plugin/server'; import { ruleDataServiceMock } from '../../rule_data_plugin_service/rule_data_plugin_service.mock'; const alertingAuthMock = alertingAuthorizationMock.create(); @@ -35,41 +34,38 @@ const alertsClientParams: jest.Mocked = { }; const DEFAULT_SPACE = 'test_default_space_id'; +const authorizedRuleTypes = new Map([ + [ + 'apm.error_rate', + { + producer: 'apm', + id: 'apm.error_rate', + alerts: { + context: 'observability.apm', + }, + authorizedConsumers: {}, + }, + ], +]); beforeEach(() => { jest.resetAllMocks(); alertingAuthMock.getSpaceId.mockImplementation(() => DEFAULT_SPACE); - // @ts-expect-error - alertingAuthMock.getAuthorizationFilter.mockImplementation(async () => - Promise.resolve({ filter: [] }) - ); - - // @ts-expect-error - alertingAuthMock.getAugmentedRuleTypesWithAuthorization.mockImplementation(async () => { - const authorizedRuleTypes = new Set(); - authorizedRuleTypes.add({ producer: 'apm' }); - return Promise.resolve({ authorizedRuleTypes }); + alertingAuthMock.getAuthorizationFilter.mockResolvedValue({ + filter: undefined, + ensureRuleTypeIsAuthorized: jest.fn(), + }); + alertingAuthMock.getAllAuthorizedRuleTypes.mockResolvedValue({ + hasAllRequested: true, + authorizedRuleTypes, }); - alertingAuthMock.ensureAuthorized.mockImplementation( - // @ts-expect-error - async ({ - ruleTypeId, - consumer, - operation, - entity, - }: { - ruleTypeId: string; - consumer: string; - operation: string; - entity: typeof AlertingAuthorizationEntity.Alert; - }) => { - if (ruleTypeId === 'apm.error_rate' && consumer === 'apm') { - return Promise.resolve(); - } - return Promise.reject(new Error(`Unauthorized for ${ruleTypeId} and ${consumer}`)); + alertingAuthMock.ensureAuthorized.mockImplementation(async ({ ruleTypeId, consumer }) => { + if (ruleTypeId === 'apm.error_rate' && consumer === 'apm') { + return Promise.resolve(); } - ); + return Promise.reject(new Error(`Unauthorized for ${ruleTypeId} and ${consumer}`)); + }); }); describe('update()', () => { diff --git a/x-pack/plugins/rule_registry/server/lib/get_authz_filter.ts b/x-pack/plugins/rule_registry/server/lib/get_authz_filter.ts index e1524b99f88d9..58ea503aa6ed4 100644 --- a/x-pack/plugins/rule_registry/server/lib/get_authz_filter.ts +++ b/x-pack/plugins/rule_registry/server/lib/get_authz_filter.ts @@ -19,17 +19,15 @@ import { export async function getAuthzFilter( authorization: PublicMethodsOf, - operation: WriteOperations.Update | ReadOperations.Get | ReadOperations.Find, - featuresIds?: Set + operation: WriteOperations.Update | ReadOperations.Get | ReadOperations.Find ) { - const { filter } = await authorization.getAuthorizationFilter( - AlertingAuthorizationEntity.Alert, - { + const { filter } = await authorization.getAuthorizationFilter({ + authorizationEntity: AlertingAuthorizationEntity.Alert, + filterOpts: { type: AlertingAuthorizationFilterType.ESDSL, fieldNames: { consumer: ALERT_RULE_CONSUMER, ruleTypeId: ALERT_RULE_TYPE_ID }, }, operation, - featuresIds - ); + }); return filter; } diff --git a/x-pack/plugins/rule_registry/server/lib/get_consumers_filter.test.tsx b/x-pack/plugins/rule_registry/server/lib/get_consumers_filter.test.tsx new file mode 100644 index 0000000000000..600177e1c33ea --- /dev/null +++ b/x-pack/plugins/rule_registry/server/lib/get_consumers_filter.test.tsx @@ -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 { getConsumersFilter } from './get_consumers_filter'; + +describe('getConsumersFilter()', () => { + it('should return a consumers filter', () => { + expect(getConsumersFilter(['foo', 'bar'])).toStrictEqual({ + terms: { + 'kibana.alert.rule.consumer': ['foo', 'bar'], + }, + }); + }); + + it('should return undefined if no consumers are provided', () => { + expect(getConsumersFilter()).toBeUndefined(); + }); + + it('should return undefined if an empty array is provided', () => { + expect(getConsumersFilter([])).toBeUndefined(); + }); +}); diff --git a/x-pack/plugins/rule_registry/server/lib/get_consumers_filter.tsx b/x-pack/plugins/rule_registry/server/lib/get_consumers_filter.tsx new file mode 100644 index 0000000000000..c5089416b7ef5 --- /dev/null +++ b/x-pack/plugins/rule_registry/server/lib/get_consumers_filter.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 { ALERT_RULE_CONSUMER } from '../../common/technical_rule_data_field_names'; + +export function getConsumersFilter(consumers?: string[]) { + return consumers && consumers.length > 0 + ? { terms: { [ALERT_RULE_CONSUMER]: consumers } } + : undefined; +} diff --git a/x-pack/plugins/rule_registry/server/lib/get_rule_type_ids_filter.test.tsx b/x-pack/plugins/rule_registry/server/lib/get_rule_type_ids_filter.test.tsx new file mode 100644 index 0000000000000..7254f25256c2f --- /dev/null +++ b/x-pack/plugins/rule_registry/server/lib/get_rule_type_ids_filter.test.tsx @@ -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 { getRuleTypeIdsFilter } from './get_rule_type_ids_filter'; + +describe('getRuleTypeIdsFilter()', () => { + it('should return a rule type ids filter', () => { + expect(getRuleTypeIdsFilter(['foo', 'bar'])).toStrictEqual({ + terms: { + 'kibana.alert.rule.rule_type_id': ['foo', 'bar'], + }, + }); + }); + + it('should return undefined if no rule type ids are provided', () => { + expect(getRuleTypeIdsFilter()).toBeUndefined(); + }); + + it('should return undefined if an empty array is provided', () => { + expect(getRuleTypeIdsFilter([])).toBeUndefined(); + }); +}); diff --git a/x-pack/plugins/rule_registry/server/lib/get_rule_type_ids_filter.tsx b/x-pack/plugins/rule_registry/server/lib/get_rule_type_ids_filter.tsx new file mode 100644 index 0000000000000..f204d6d17acff --- /dev/null +++ b/x-pack/plugins/rule_registry/server/lib/get_rule_type_ids_filter.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 { ALERT_RULE_TYPE_ID } from '../../common/technical_rule_data_field_names'; + +export function getRuleTypeIdsFilter(ruleTypeIds?: string[]) { + return ruleTypeIds && ruleTypeIds.length > 0 + ? { terms: { [ALERT_RULE_TYPE_ID]: ruleTypeIds } } + : undefined; +} diff --git a/x-pack/plugins/rule_registry/server/plugin.ts b/x-pack/plugins/rule_registry/server/plugin.ts index 60ee2256ae377..ae1159843b170 100644 --- a/x-pack/plugins/rule_registry/server/plugin.ts +++ b/x-pack/plugins/rule_registry/server/plugin.ts @@ -18,10 +18,7 @@ import { ServiceStatusLevels, } from '@kbn/core/server'; -import type { - PluginSetupContract as AlertingSetup, - PluginStartContract as AlertingStart, -} from '@kbn/alerting-plugin/server'; +import type { AlertingServerSetup, AlertingServerStart } from '@kbn/alerting-plugin/server'; import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; import type { SpacesPluginStart } from '@kbn/spaces-plugin/server'; import type { @@ -40,11 +37,11 @@ import { ruleRegistrySearchStrategyProvider, RULE_SEARCH_STRATEGY_NAME } from '. export interface RuleRegistryPluginSetupDependencies { security?: SecurityPluginSetup; data: DataPluginSetup; - alerting: AlertingSetup; + alerting: AlertingServerSetup; } export interface RuleRegistryPluginStartDependencies { - alerting: AlertingStart; + alerting: AlertingServerStart; data: DataPluginStart; spaces?: SpacesPluginStart; } @@ -56,7 +53,7 @@ export interface RuleRegistryPluginSetupContract { export interface RuleRegistryPluginStartContract { getRacClientWithRequest: (req: KibanaRequest) => Promise; - alerting: AlertingStart; + alerting: AlertingServerStart; } export class RuleRegistryPlugin @@ -165,7 +162,7 @@ export class RuleRegistryPlugin logger, esClient: core.elasticsearch.client.asInternalUser, // NOTE: Alerts share the authorization client with the alerting plugin - getAlertingAuthorization(request: KibanaRequest) { + async getAlertingAuthorization(request: KibanaRequest) { return plugins.alerting.getAlertingAuthorizationWithRequest(request); }, securityPluginSetup: security, @@ -175,7 +172,7 @@ export class RuleRegistryPlugin getAlertIndicesAlias: plugins.alerting.getAlertIndicesAlias, }); - const getRacClientWithRequest = (request: KibanaRequest) => { + const getRacClientWithRequest = async (request: KibanaRequest) => { return alertsClientFactory.create(request); }; @@ -190,7 +187,7 @@ export class RuleRegistryPlugin return function alertsRouteHandlerContext(context, request): RacApiRequestHandlerContext { return { getAlertsClient: async () => { - const createdClient = alertsClientFactory.create(request); + const createdClient = await alertsClientFactory.create(request); return createdClient; }, }; diff --git a/x-pack/plugins/rule_registry/server/routes/__mocks__/request_responses.ts b/x-pack/plugins/rule_registry/server/routes/__mocks__/request_responses.ts index d3857c4c49f17..7f214c95b0fcc 100644 --- a/x-pack/plugins/rule_registry/server/routes/__mocks__/request_responses.ts +++ b/x-pack/plugins/rule_registry/server/routes/__mocks__/request_responses.ts @@ -12,7 +12,7 @@ export const getReadIndexRequest = () => requestMock.create({ method: 'get', path: `${BASE_RAC_ALERTS_API_PATH}/index`, - query: { features: 'siem' }, + query: { ruleTypeIds: 'siem.esqlRule' }, }); export const getReadRequest = () => @@ -33,18 +33,18 @@ export const getUpdateRequest = () => }, }); -export const getReadFeatureIdsRequest = () => +export const getFindRequest = () => requestMock.create({ - method: 'get', - path: `${BASE_RAC_ALERTS_API_PATH}/_feature_ids`, - query: { registrationContext: ['security'] }, + method: 'post', + path: `${BASE_RAC_ALERTS_API_PATH}/find`, + body: { rule_type_ids: ['siem.esqlRule'], consumers: ['siem'] }, }); export const getO11yBrowserFields = () => requestMock.create({ method: 'get', path: `${BASE_RAC_ALERTS_API_PATH}/browser_fields`, - query: { featureIds: ['apm', 'logs'] }, + query: { ruleTypeIds: ['apm.anomaly', 'logs.alert.document.count'] }, }); export const getMetricThresholdAADFields = () => @@ -59,7 +59,14 @@ export const getAlertsGroupAggregationsRequest = () => method: 'post', path: `${BASE_RAC_ALERTS_API_PATH}/_group_aggregations`, body: { - featureIds: ['apm', 'infrastructure', 'logs', 'observability', 'slo', 'uptime'], + ruleTypeIds: [ + 'apm.anomaly', + 'logs.alert.document.count', + 'metrics.alert.threshold', + 'slo.rules.burnRate', + 'xpack.uptime.alerts.durationAnomaly', + ], + consumers: ['apm'], groupByField: 'kibana.alert.rule.name', aggregations: { unitsCount: { diff --git a/x-pack/plugins/rule_registry/server/routes/__mocks__/response_adapters.ts b/x-pack/plugins/rule_registry/server/routes/__mocks__/response_adapters.ts index 6afba9e232c5e..1fef218202f2d 100644 --- a/x-pack/plugins/rule_registry/server/routes/__mocks__/response_adapters.ts +++ b/x-pack/plugins/rule_registry/server/routes/__mocks__/response_adapters.ts @@ -39,6 +39,8 @@ const buildResponses = (method: Method, calls: MockCall[]): ResponseCall[] => { status: call.statusCode, body: call.body, })); + case 'notFound': + return calls.map(([call]) => ({ status: 404, body: call.body })); default: throw new Error(`Encountered unexpected call to response.${method}`); } diff --git a/x-pack/plugins/rule_registry/server/routes/find.test.ts b/x-pack/plugins/rule_registry/server/routes/find.test.ts new file mode 100644 index 0000000000000..c84868c39f889 --- /dev/null +++ b/x-pack/plugins/rule_registry/server/routes/find.test.ts @@ -0,0 +1,56 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { findAlertsByQueryRoute } from './find'; +import { requestContextMock } from './__mocks__/request_context'; +import { getFindRequest } from './__mocks__/request_responses'; +import { serverMock } from './__mocks__/server'; + +describe('findAlertsByQueryRoute', () => { + let server: ReturnType; + let { clients, context } = requestContextMock.createTools(); + + beforeEach(async () => { + server = serverMock.create(); + ({ clients, context } = requestContextMock.createTools()); + + // @ts-expect-error: More properties are not needed + clients.rac.find.mockResolvedValue({ hits: { hits: [] } }); + + findAlertsByQueryRoute(server.router); + }); + + test('returns 200 when querying for alerts', async () => { + const response = await server.inject(getFindRequest(), context); + + expect(response.status).toEqual(200); + expect(response.body).toEqual({ hits: { hits: [] } }); + }); + + test('calls the alerts client correctly', async () => { + const response = await server.inject(getFindRequest(), context); + + expect(response.status).toEqual(200); + expect(clients.rac.find).toHaveBeenCalledWith({ + _source: undefined, + aggs: undefined, + consumers: ['siem'], + index: undefined, + query: undefined, + ruleTypeIds: ['siem.esqlRule'], + search_after: undefined, + size: undefined, + sort: undefined, + track_total_hits: undefined, + }); + }); + + test('accepts not defined ryleTypeIds and consumers', async () => { + const response = await server.inject({ ...getFindRequest(), body: {} }, context); + expect(response.status).toEqual(200); + }); +}); diff --git a/x-pack/plugins/rule_registry/server/routes/find.ts b/x-pack/plugins/rule_registry/server/routes/find.ts index 4ce4567dd35bd..d41de4d64f71f 100644 --- a/x-pack/plugins/rule_registry/server/routes/find.ts +++ b/x-pack/plugins/rule_registry/server/routes/find.ts @@ -25,7 +25,8 @@ export const findAlertsByQueryRoute = (router: IRouter t.exact( t.partial({ aggs: t.record(t.string, t.intersection([metricsAggsSchemas, bucketAggsSchemas])), - feature_ids: t.union([t.array(t.string), t.undefined]), + rule_type_ids: t.union([t.array(t.string), t.undefined]), + consumers: t.union([t.array(t.string), t.undefined]), index: t.string, query: t.object, search_after: t.union([t.array(t.number), t.array(t.string), t.undefined]), @@ -50,7 +51,8 @@ export const findAlertsByQueryRoute = (router: IRouter try { const { aggs, - feature_ids: featureIds, + rule_type_ids: ruleTypeIds, + consumers, index, query, // eslint-disable-next-line @typescript-eslint/naming-convention @@ -65,7 +67,8 @@ export const findAlertsByQueryRoute = (router: IRouter const alertsClient = await racContext.getAlertsClient(); const alerts = await alertsClient.find({ aggs, - featureIds, + ruleTypeIds, + consumers, index, query, search_after, diff --git a/x-pack/plugins/rule_registry/server/routes/get_alert_index.test.ts b/x-pack/plugins/rule_registry/server/routes/get_alert_index.test.ts index b8ef01847d8ea..28d901dc5a137 100644 --- a/x-pack/plugins/rule_registry/server/routes/get_alert_index.test.ts +++ b/x-pack/plugins/rule_registry/server/routes/get_alert_index.test.ts @@ -31,6 +31,28 @@ describe('getAlertsIndexRoute', () => { expect(response.body).toEqual({ index_name: ['alerts-security.alerts'] }); }); + test('accepts an array of string ', async () => { + const ruleTypeIds = ['foo', 'bar']; + + await server.inject({ ...getReadIndexRequest(), query: { ruleTypeIds } }, context); + + expect(clients.rac.getAuthorizedAlertsIndices).toHaveBeenCalledWith(ruleTypeIds); + }); + + test('accepts a single string', async () => { + const ruleTypeIds = 'foo'; + + await server.inject({ ...getReadIndexRequest(), query: { ruleTypeIds } }, context); + + expect(clients.rac.getAuthorizedAlertsIndices).toHaveBeenCalledWith([ruleTypeIds]); + }); + + test('accepts not defined ryleTypeIds', async () => { + await server.inject({ ...getReadIndexRequest(), query: {} }, context); + + expect(clients.rac.getAuthorizedAlertsIndices).toHaveBeenCalledWith(undefined); + }); + describe('request validation', () => { test('rejects invalid query params', async () => { await expect( @@ -38,12 +60,12 @@ describe('getAlertsIndexRoute', () => { requestMock.create({ method: 'get', path: `${BASE_RAC_ALERTS_API_PATH}/index`, - query: { features: 4 }, + query: { ruleTypeIds: 4 }, }), context ) ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Request was rejected with message: 'Invalid value \\"4\\" supplied to \\"features\\"'"` + `"Request was rejected with message: 'Invalid value \\"4\\" supplied to \\"ruleTypeIds\\"'"` ); }); diff --git a/x-pack/plugins/rule_registry/server/routes/get_alert_index.ts b/x-pack/plugins/rule_registry/server/routes/get_alert_index.ts index aa3ec89fde7c8..e83d784bd4fb7 100644 --- a/x-pack/plugins/rule_registry/server/routes/get_alert_index.ts +++ b/x-pack/plugins/rule_registry/server/routes/get_alert_index.ts @@ -8,7 +8,6 @@ import { IRouter } from '@kbn/core/server'; import * as t from 'io-ts'; import { transformError } from '@kbn/securitysolution-es-utils'; -import { validFeatureIds } from '@kbn/rule-data-utils'; import { buildRouteValidation } from './utils/route_validation'; import { RacRequestHandlerContext } from '../types'; @@ -22,7 +21,7 @@ export const getAlertsIndexRoute = (router: IRouter) = query: buildRouteValidation( t.exact( t.partial({ - features: t.string, + ruleTypeIds: t.union([t.string, t.array(t.string)]), }) ) ), @@ -40,10 +39,17 @@ export const getAlertsIndexRoute = (router: IRouter) = try { const racContext = await context.rac; const alertsClient = await racContext.getAlertsClient(); - const { features } = request.query; - const indexName = await alertsClient.getAuthorizedAlertsIndices( - features?.split(',') ?? validFeatureIds - ); + const { ruleTypeIds } = request.query; + + const ruleTypeIdsAsArray = + ruleTypeIds != null + ? Array.isArray(ruleTypeIds) + ? ruleTypeIds + : [ruleTypeIds] + : ruleTypeIds; + + const indexName = await alertsClient.getAuthorizedAlertsIndices(ruleTypeIdsAsArray); + return response.ok({ body: { index_name: indexName }, }); diff --git a/x-pack/plugins/rule_registry/server/routes/get_alert_summary.test.ts b/x-pack/plugins/rule_registry/server/routes/get_alert_summary.test.ts index e15f2d40dc826..961b33310bfc7 100644 --- a/x-pack/plugins/rule_registry/server/routes/get_alert_summary.test.ts +++ b/x-pack/plugins/rule_registry/server/routes/get_alert_summary.test.ts @@ -35,7 +35,7 @@ describe('getAlertSummaryRoute', () => { requestMock.create({ method: 'post', path: `${BASE_RAC_ALERTS_API_PATH}/_alert_summary`, - body: { gte: 4, lte: 3, featureIds: ['logs'] }, + body: { gte: 4, lte: 3, ruleTypeIds: ['logs'] }, }), context ) @@ -52,7 +52,7 @@ describe('getAlertSummaryRoute', () => { body: { gte: '2020-12-16T15:00:00.000Z', lte: '2020-12-16', - featureIds: ['logs'], + ruleTypeIds: ['logs'], }, }), context @@ -76,7 +76,7 @@ describe('getAlertSummaryRoute', () => { body: { gte: '2020-12-16T15:00:00.000Z', lte: '2020-12-16T16:00:00.000Z', - featureIds: ['logs'], + ruleTypeIds: ['logs'], fixed_interval: 'xx', }, }), @@ -102,7 +102,7 @@ describe('getAlertSummaryRoute', () => { body: { gte: '2020-12-16T15:00:00.000Z', lte: '2020-12-16T16:00:00.000Z', - featureIds: ['logs'], + ruleTypeIds: ['logs'], boop: 'unknown', }, }), @@ -112,5 +112,68 @@ describe('getAlertSummaryRoute', () => { `"Request was rejected with message: 'invalid keys \\"boop\\"'"` ); }); + + test('rejects without ruleTypeIds', async () => { + await expect( + server.inject( + requestMock.create({ + method: 'post', + path: `${BASE_RAC_ALERTS_API_PATH}/_alert_summary`, + body: { + gte: '2020-12-16T15:00:00.000Z', + lte: '2020-12-16T16:00:00.000Z', + }, + }), + context + ) + ).rejects.toThrowErrorMatchingInlineSnapshot( + `"Request was rejected with message: 'Invalid value \\"undefined\\" supplied to \\"ruleTypeIds\\"'"` + ); + }); + + test('accepts consumers', async () => { + await expect( + server.inject( + requestMock.create({ + method: 'post', + path: `${BASE_RAC_ALERTS_API_PATH}/_alert_summary`, + body: { + gte: '2020-12-16T15:00:00.000Z', + lte: '2020-12-16T16:00:00.000Z', + consumers: ['foo'], + ruleTypeIds: ['bar'], + }, + }), + context + ) + ).resolves.not.toThrow(); + }); + + test('calls the alerts client correctly', async () => { + await expect( + server.inject( + requestMock.create({ + method: 'post', + path: `${BASE_RAC_ALERTS_API_PATH}/_alert_summary`, + body: { + gte: '2020-12-16T15:00:00.000Z', + lte: '2020-12-16T16:00:00.000Z', + consumers: ['foo'], + ruleTypeIds: ['bar'], + }, + }), + context + ) + ).resolves.not.toThrow(); + + expect(clients.rac.getAlertSummary).toHaveBeenCalledWith({ + consumers: ['foo'], + filter: undefined, + fixedInterval: undefined, + gte: '2020-12-16T15:00:00.000Z', + lte: '2020-12-16T16:00:00.000Z', + ruleTypeIds: ['bar'], + }); + }); }); }); diff --git a/x-pack/plugins/rule_registry/server/routes/get_alert_summary.ts b/x-pack/plugins/rule_registry/server/routes/get_alert_summary.ts index e33b0137a932e..9be3de57fdc0a 100644 --- a/x-pack/plugins/rule_registry/server/routes/get_alert_summary.ts +++ b/x-pack/plugins/rule_registry/server/routes/get_alert_summary.ts @@ -27,13 +27,14 @@ export const getAlertSummaryRoute = (router: IRouter) t.type({ gte: t.string, lte: t.string, - featureIds: t.array(t.string), + ruleTypeIds: t.array(t.string), }) ), t.exact( t.partial({ fixed_interval: t.string, filter: t.array(t.object), + consumers: t.array(t.string), }) ), ]) @@ -52,7 +53,14 @@ export const getAlertSummaryRoute = (router: IRouter) try { const racContext = await context.rac; const alertsClient = await racContext.getAlertsClient(); - const { gte, lte, featureIds, filter, fixed_interval: fixedInterval } = request.body; + const { + gte, + lte, + ruleTypeIds, + consumers, + filter, + fixed_interval: fixedInterval, + } = request.body; if ( !( moment(gte, 'YYYY-MM-DDTHH:mm:ss.SSSZ', true).isValid() && @@ -71,7 +79,8 @@ export const getAlertSummaryRoute = (router: IRouter) const aggs = await alertsClient.getAlertSummary({ gte, lte, - featureIds, + ruleTypeIds, + consumers, filter: filter as estypes.QueryDslQueryContainer[], fixedInterval, }); diff --git a/x-pack/plugins/rule_registry/server/routes/get_alerts_group_aggregations.test.ts b/x-pack/plugins/rule_registry/server/routes/get_alerts_group_aggregations.test.ts index 1ce32adc37e62..5bf3a4a1622cd 100644 --- a/x-pack/plugins/rule_registry/server/routes/get_alerts_group_aggregations.test.ts +++ b/x-pack/plugins/rule_registry/server/routes/get_alerts_group_aggregations.test.ts @@ -200,7 +200,7 @@ describe('getAlertsGroupAggregations', () => { context ) ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Request was rejected with message: 'Invalid value \\"undefined\\" supplied to \\"featureIds\\"'"` + `"Request was rejected with message: 'Invalid value \\"undefined\\" supplied to \\"ruleTypeIds\\"'"` ); }); @@ -211,7 +211,13 @@ describe('getAlertsGroupAggregations', () => { method: 'post', path: `${BASE_RAC_ALERTS_API_PATH}/_group_aggregations`, body: { - featureIds: ['apm', 'infrastructure', 'logs', 'observability', 'slo', 'uptime'], + ruleTypeIds: [ + 'apm.anomaly', + 'logs.alert.document.count', + 'metrics.alert.threshold', + 'slo.rules.burnRate', + 'xpack.uptime.alerts.durationAnomaly', + ], groupByField: 'kibana.alert.rule.name', aggregations: { scriptedAggregation: { @@ -231,7 +237,13 @@ describe('getAlertsGroupAggregations', () => { method: 'post', path: `${BASE_RAC_ALERTS_API_PATH}/_group_aggregations`, body: { - featureIds: ['apm', 'infrastructure', 'logs', 'observability', 'slo', 'uptime'], + ruleTypeIds: [ + 'apm.anomaly', + 'logs.alert.document.count', + 'metrics.alert.threshold', + 'slo.rules.burnRate', + 'xpack.uptime.alerts.durationAnomaly', + ], groupByField: 'kibana.alert.rule.name', filters: [ { @@ -256,7 +268,13 @@ describe('getAlertsGroupAggregations', () => { method: 'post', path: `${BASE_RAC_ALERTS_API_PATH}/_group_aggregations`, body: { - featureIds: ['apm', 'infrastructure', 'logs', 'observability', 'slo', 'uptime'], + ruleTypeIds: [ + 'apm.anomaly', + 'logs.alert.document.count', + 'metrics.alert.threshold', + 'slo.rules.burnRate', + 'xpack.uptime.alerts.durationAnomaly', + ], groupByField: 'kibana.alert.rule.name', aggregations: {}, runtimeMappings: {}, @@ -280,4 +298,84 @@ describe('getAlertsGroupAggregations', () => { message: 'Unable to get alerts', }); }); + + test('rejects without ruleTypeIds', async () => { + await expect( + server.inject( + requestMock.create({ + method: 'post', + path: `${BASE_RAC_ALERTS_API_PATH}/_group_aggregations`, + body: { + groupByField: 'kibana.alert.rule.name', + }, + }), + context + ) + ).rejects.toThrowErrorMatchingInlineSnapshot( + `"Request was rejected with message: 'Invalid value \\"undefined\\" supplied to \\"ruleTypeIds\\"'"` + ); + }); + + test('accepts consumers', async () => { + await expect( + server.inject( + requestMock.create({ + method: 'post', + path: `${BASE_RAC_ALERTS_API_PATH}/_group_aggregations`, + body: { + ruleTypeIds: [ + 'apm.anomaly', + 'logs.alert.document.count', + 'metrics.alert.threshold', + 'slo.rules.burnRate', + 'xpack.uptime.alerts.durationAnomaly', + ], + groupByField: 'kibana.alert.rule.name', + consumers: ['foo'], + }, + }), + context + ) + ).resolves.not.toThrow(); + }); + + test('calls the alerts client correctly', async () => { + await expect( + server.inject( + requestMock.create({ + method: 'post', + path: `${BASE_RAC_ALERTS_API_PATH}/_group_aggregations`, + body: { + ruleTypeIds: [ + 'apm.anomaly', + 'logs.alert.document.count', + 'metrics.alert.threshold', + 'slo.rules.burnRate', + 'xpack.uptime.alerts.durationAnomaly', + ], + groupByField: 'kibana.alert.rule.name', + consumers: ['foo'], + }, + }), + context + ) + ).resolves.not.toThrow(); + + expect(clients.rac.getGroupAggregations).toHaveBeenCalledWith({ + aggregations: undefined, + consumers: ['foo'], + filters: undefined, + groupByField: 'kibana.alert.rule.name', + pageIndex: 0, + pageSize: 10, + ruleTypeIds: [ + 'apm.anomaly', + 'logs.alert.document.count', + 'metrics.alert.threshold', + 'slo.rules.burnRate', + 'xpack.uptime.alerts.durationAnomaly', + ], + sort: undefined, + }); + }); }); diff --git a/x-pack/plugins/rule_registry/server/routes/get_alerts_group_aggregations.ts b/x-pack/plugins/rule_registry/server/routes/get_alerts_group_aggregations.ts index 34c56b7691a1f..6924025f2b33a 100644 --- a/x-pack/plugins/rule_registry/server/routes/get_alerts_group_aggregations.ts +++ b/x-pack/plugins/rule_registry/server/routes/get_alerts_group_aggregations.ts @@ -22,17 +22,24 @@ export const getAlertsGroupAggregations = (router: IRouter { const { - featureIds, + ruleTypeIds, + consumers, groupByField, aggregations, filters, @@ -58,7 +66,8 @@ export const getAlertsGroupAggregations = (router: IRouter { - let server: ReturnType; - let { clients, context } = requestContextMock.createTools(); - const path = `${BASE_RAC_ALERTS_API_PATH}/browser_fields`; - - beforeEach(async () => { - server = serverMock.create(); - ({ clients, context } = requestContextMock.createTools()); - }); - - describe('when racClient returns o11y indices', () => { - beforeEach(() => { - clients.rac.getAuthorizedAlertsIndices.mockResolvedValue([ - '.alerts-observability.logs.alerts-default', - ]); - - getBrowserFieldsByFeatureId(server.router); - }); - - test('route registered', async () => { - const response = await server.inject(getO11yBrowserFields(), context); - - expect(response.status).toEqual(200); - }); - - test('rejects invalid featureId type', async () => { - await expect( - server.inject( - requestMock.create({ - method: 'get', - path, - query: { featureIds: undefined }, - }), - context - ) - ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Request was rejected with message: 'Invalid value \\"undefined\\" supplied to \\"featureIds\\"'"` - ); - }); - - test('returns error status if rac client "getAuthorizedAlertsIndices" fails', async () => { - clients.rac.getAuthorizedAlertsIndices.mockRejectedValue(new Error('Unable to get index')); - const response = await server.inject(getO11yBrowserFields(), context); - - expect(response.status).toEqual(500); - expect(response.body).toEqual({ - attributes: { success: false }, - message: 'Unable to get index', - }); - }); - }); -}); diff --git a/x-pack/plugins/rule_registry/server/routes/get_browser_fields_by_rule_type_ids.test.ts b/x-pack/plugins/rule_registry/server/routes/get_browser_fields_by_rule_type_ids.test.ts new file mode 100644 index 0000000000000..819ed89bc7c08 --- /dev/null +++ b/x-pack/plugins/rule_registry/server/routes/get_browser_fields_by_rule_type_ids.test.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { BASE_RAC_ALERTS_API_PATH } from '../../common/constants'; +import { getBrowserFieldsByFeatureId } from './get_browser_fields_by_rule_type_ids'; +import { requestContextMock } from './__mocks__/request_context'; +import { getO11yBrowserFields } from './__mocks__/request_responses'; +import { requestMock, serverMock } from './__mocks__/server'; + +describe('getBrowserFieldsByFeatureId', () => { + let server: ReturnType; + let { clients, context } = requestContextMock.createTools(); + const path = `${BASE_RAC_ALERTS_API_PATH}/browser_fields`; + + beforeEach(async () => { + server = serverMock.create(); + ({ clients, context } = requestContextMock.createTools()); + + clients.rac.getAuthorizedAlertsIndices.mockResolvedValue([ + '.alerts-observability.logs.alerts-default', + ]); + + clients.rac.getBrowserFields.mockResolvedValue({ browserFields: {}, fields: [] }); + + getBrowserFieldsByFeatureId(server.router); + }); + + test('route registered', async () => { + const response = await server.inject(getO11yBrowserFields(), context); + + expect(response.status).toEqual(200); + }); + + test('it calls getAuthorizedAlertsIndices with o11y rule types', async () => { + const response = await server.inject(getO11yBrowserFields(), context); + + expect(response.status).toEqual(200); + expect(clients.rac.getAuthorizedAlertsIndices).toHaveBeenCalledWith([ + 'apm.anomaly', + 'logs.alert.document.count', + ]); + }); + + test('it calls getAuthorizedAlertsIndices only for o11y rule types when siem rule types are mixed', async () => { + const response = await server.inject( + { + ...getO11yBrowserFields(), + query: { ruleTypeIds: ['apm.anomaly', 'siem.esqlRuleType'] }, + }, + context + ); + + expect(response.status).toEqual(200); + expect(clients.rac.getAuthorizedAlertsIndices).toHaveBeenCalledWith(['apm.anomaly']); + }); + + test('it does not call getAuthorizedAlertsIndices with siem rule types', async () => { + const response = await server.inject( + { + ...getO11yBrowserFields(), + query: { ruleTypeIds: ['siem.esqlRuleType'] }, + }, + context + ); + + expect(response.status).toEqual(200); + expect(clients.rac.getAuthorizedAlertsIndices).not.toHaveBeenCalledWith(); + }); + + test('accepts an array of string ', async () => { + const ruleTypeIds = ['foo', 'bar']; + + await server.inject({ ...getO11yBrowserFields(), query: { ruleTypeIds } }, context); + + expect(clients.rac.getAuthorizedAlertsIndices).toHaveBeenCalledWith(ruleTypeIds); + }); + + test('accepts a single string', async () => { + const ruleTypeIds = 'foo'; + + await server.inject({ ...getO11yBrowserFields(), query: { ruleTypeIds } }, context); + + expect(clients.rac.getAuthorizedAlertsIndices).toHaveBeenCalledWith([ruleTypeIds]); + }); + + test('returns 404 when getAuthorizedAlertsIndices returns an empty array', async () => { + clients.rac.getAuthorizedAlertsIndices.mockResolvedValue([]); + + const response = await server.inject(getO11yBrowserFields(), context); + + expect(response.status).toEqual(404); + }); + + test('rejects invalid ruleTypeIds', async () => { + await expect( + server.inject( + requestMock.create({ + method: 'get', + path, + query: { ruleTypeIds: undefined }, + }), + context + ) + ).rejects.toThrowErrorMatchingInlineSnapshot( + `"Request was rejected with message: 'Invalid value \\"undefined\\" supplied to \\"ruleTypeIds\\"'"` + ); + }); + + test('returns error status if rac client "getAuthorizedAlertsIndices" fails', async () => { + clients.rac.getAuthorizedAlertsIndices.mockRejectedValue(new Error('Unable to get index')); + const response = await server.inject(getO11yBrowserFields(), context); + + expect(response.status).toEqual(500); + expect(response.body).toEqual({ + attributes: { success: false }, + message: 'Unable to get index', + }); + }); +}); diff --git a/x-pack/plugins/rule_registry/server/routes/get_browser_fields_by_feature_id.ts b/x-pack/plugins/rule_registry/server/routes/get_browser_fields_by_rule_type_ids.ts similarity index 83% rename from x-pack/plugins/rule_registry/server/routes/get_browser_fields_by_feature_id.ts rename to x-pack/plugins/rule_registry/server/routes/get_browser_fields_by_rule_type_ids.ts index 20a3781be6973..4c27095ae77c6 100644 --- a/x-pack/plugins/rule_registry/server/routes/get_browser_fields_by_feature_id.ts +++ b/x-pack/plugins/rule_registry/server/routes/get_browser_fields_by_rule_type_ids.ts @@ -9,6 +9,7 @@ import { IRouter } from '@kbn/core/server'; import { transformError } from '@kbn/securitysolution-es-utils'; import * as t from 'io-ts'; +import { isSiemRuleType } from '@kbn/rule-data-utils'; import { RacRequestHandlerContext } from '../types'; import { BASE_RAC_ALERTS_API_PATH } from '../../common/constants'; import { buildRouteValidation } from './utils/route_validation'; @@ -21,7 +22,7 @@ export const getBrowserFieldsByFeatureId = (router: IRouter fId !== 'siem' - ); + const { ruleTypeIds = [] } = request.query; + + const onlyO11yRuleTypeIds = ( + Array.isArray(ruleTypeIds) ? ruleTypeIds : [ruleTypeIds] + ).filter((ruleTypeId) => !isSiemRuleType(ruleTypeId)); + const o11yIndices = - (onlyO11yFeatureIds - ? await alertsClient.getAuthorizedAlertsIndices(onlyO11yFeatureIds) + (onlyO11yRuleTypeIds + ? await alertsClient.getAuthorizedAlertsIndices(onlyO11yRuleTypeIds) : []) ?? []; + if (o11yIndices.length === 0) { return response.notFound({ body: { - message: `No alerts-observability indices found for featureIds [${featureIds}]`, + message: `No alerts-observability indices found for rule type ids [${onlyO11yRuleTypeIds}]`, attributes: { success: false }, }, }); @@ -58,10 +62,11 @@ export const getBrowserFieldsByFeatureId = (router: IRouter { - let server: ReturnType; - let { clients, context } = requestContextMock.createTools(); - - beforeEach(async () => { - server = serverMock.create(); - ({ clients, context } = requestContextMock.createTools()); - - clients.rac.getFeatureIdsByRegistrationContexts.mockResolvedValue(['siem']); - - getFeatureIdsByRegistrationContexts(server.router); - }); - - test('returns 200 when querying for features ids', async () => { - const response = await server.inject(getReadFeatureIdsRequest(), context); - - expect(response.status).toEqual(200); - expect(response.body).toEqual(['siem']); - }); - - describe('request validation', () => { - test('rejects invalid query params', async () => { - await expect( - server.inject( - requestMock.create({ - method: 'get', - path: `${BASE_RAC_ALERTS_API_PATH}/_feature_ids`, - query: { registrationContext: 4 }, - }), - context - ) - ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Request was rejected with message: 'Invalid value \\"4\\" supplied to \\"registrationContext\\"'"` - ); - }); - - test('rejects unknown query params', async () => { - await expect( - server.inject( - requestMock.create({ - method: 'get', - path: `${BASE_RAC_ALERTS_API_PATH}/_feature_ids`, - query: { boop: 'siem' }, - }), - context - ) - ).rejects.toThrowErrorMatchingInlineSnapshot( - `"Request was rejected with message: 'invalid keys \\"boop\\"'"` - ); - }); - }); - - test('returns error status if rac client "getFeatureIdsByRegistrationContexts" fails', async () => { - clients.rac.getFeatureIdsByRegistrationContexts.mockRejectedValue( - new Error('Unable to get feature ids') - ); - const response = await server.inject(getReadFeatureIdsRequest(), context); - - expect(response.status).toEqual(500); - expect(response.body).toEqual({ - attributes: { success: false }, - message: 'Unable to get feature ids', - }); - }); -}); diff --git a/x-pack/plugins/rule_registry/server/routes/get_feature_ids_by_registration_contexts.ts b/x-pack/plugins/rule_registry/server/routes/get_feature_ids_by_registration_contexts.ts deleted file mode 100644 index 43bd491daafbe..0000000000000 --- a/x-pack/plugins/rule_registry/server/routes/get_feature_ids_by_registration_contexts.ts +++ /dev/null @@ -1,71 +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 { IRouter } from '@kbn/core/server'; -import * as t from 'io-ts'; -import { transformError } from '@kbn/securitysolution-es-utils'; - -import { RacRequestHandlerContext } from '../types'; -import { BASE_RAC_ALERTS_API_PATH } from '../../common/constants'; -import { buildRouteValidation } from './utils/route_validation'; - -export const getFeatureIdsByRegistrationContexts = (router: IRouter) => { - router.get( - { - path: `${BASE_RAC_ALERTS_API_PATH}/_feature_ids`, - validate: { - query: buildRouteValidation( - t.exact( - t.partial({ - registrationContext: t.union([t.string, t.array(t.string)]), - }) - ) - ), - }, - security: { - authz: { - requiredPrivileges: ['rac'], - }, - }, - options: { - access: 'internal', - }, - }, - async (context, request, response) => { - try { - const racContext = await context.rac; - const alertsClient = await racContext.getAlertsClient(); - const { registrationContext = [] } = request.query; - const featureIds = await alertsClient.getFeatureIdsByRegistrationContexts( - Array.isArray(registrationContext) ? registrationContext : [registrationContext] - ); - return response.ok({ - body: featureIds, - }); - } catch (exc) { - const err = transformError(exc); - const contentType = { - 'content-type': 'application/json', - }; - const defaultedHeaders = { - ...contentType, - }; - - return response.customError({ - headers: defaultedHeaders, - statusCode: err.statusCode, - body: { - message: err.message, - attributes: { - success: false, - }, - }, - }); - } - } - ); -}; diff --git a/x-pack/plugins/rule_registry/server/routes/index.ts b/x-pack/plugins/rule_registry/server/routes/index.ts index ae9f113ee0ac1..72ecfc4c9b8ef 100644 --- a/x-pack/plugins/rule_registry/server/routes/index.ts +++ b/x-pack/plugins/rule_registry/server/routes/index.ts @@ -13,8 +13,7 @@ import { updateAlertByIdRoute } from './update_alert_by_id'; import { getAlertsIndexRoute } from './get_alert_index'; import { bulkUpdateAlertsRoute } from './bulk_update_alerts'; import { findAlertsByQueryRoute } from './find'; -import { getFeatureIdsByRegistrationContexts } from './get_feature_ids_by_registration_contexts'; -import { getBrowserFieldsByFeatureId } from './get_browser_fields_by_feature_id'; +import { getBrowserFieldsByFeatureId } from './get_browser_fields_by_rule_type_ids'; import { getAlertSummaryRoute } from './get_alert_summary'; import { getAADFieldsByRuleType } from './get_aad_fields_by_rule_type'; @@ -25,7 +24,6 @@ export function defineRoutes(router: IRouter) { bulkUpdateAlertsRoute(router); findAlertsByQueryRoute(router); getAlertsGroupAggregations(router); - getFeatureIdsByRegistrationContexts(router); getBrowserFieldsByFeatureId(router); getAlertSummaryRoute(router); getAADFieldsByRuleType(router); diff --git a/x-pack/plugins/rule_registry/server/rule_data_plugin_service/rule_data_plugin_service.mock.ts b/x-pack/plugins/rule_registry/server/rule_data_plugin_service/rule_data_plugin_service.mock.ts index 9b279a541b3e9..cfbfafd0092bf 100644 --- a/x-pack/plugins/rule_registry/server/rule_data_plugin_service/rule_data_plugin_service.mock.ts +++ b/x-pack/plugins/rule_registry/server/rule_data_plugin_service/rule_data_plugin_service.mock.ts @@ -17,7 +17,6 @@ export const ruleDataServiceMock = { initializeIndex: jest.fn(), findIndexByName: jest.fn(), findIndexByFeature: jest.fn(), - findFeatureIdsByRegistrationContexts: jest.fn(), }), }; diff --git a/x-pack/plugins/rule_registry/server/rule_data_plugin_service/rule_data_plugin_service.ts b/x-pack/plugins/rule_registry/server/rule_data_plugin_service/rule_data_plugin_service.ts index efe4a5dd4f32f..91192848830ec 100644 --- a/x-pack/plugins/rule_registry/server/rule_data_plugin_service/rule_data_plugin_service.ts +++ b/x-pack/plugins/rule_registry/server/rule_data_plugin_service/rule_data_plugin_service.ts @@ -78,12 +78,6 @@ export interface IRuleDataService { * Note: features are used in RBAC. */ findIndexByFeature(featureId: ValidFeatureId, dataset: Dataset): IndexInfo | null; - - /** - * Looks up Kibana "feature" associated with the given registration context. - * Note: features are used in RBAC. - */ - findFeatureIdsByRegistrationContexts(registrationContexts: string[]): string[]; } // TODO: This is a leftover. Remove its usage from the "observability" plugin and delete it. @@ -248,17 +242,6 @@ export class RuleDataService implements IRuleDataService { return this.indicesByBaseName.get(baseName) ?? null; } - public findFeatureIdsByRegistrationContexts(registrationContexts: string[]): string[] { - const featureIds: string[] = []; - registrationContexts.forEach((rc) => { - const featureId = this.registrationContextByFeatureId.get(rc); - if (featureId) { - featureIds.push(featureId); - } - }); - return featureIds; - } - public findIndexByFeature(featureId: ValidFeatureId, dataset: Dataset): IndexInfo | null { const foundIndices = this.indicesByFeatureId.get(featureId) ?? []; if (dataset && foundIndices.length > 0) { diff --git a/x-pack/plugins/rule_registry/server/search_strategy/search_strategy.test.ts b/x-pack/plugins/rule_registry/server/search_strategy/search_strategy.test.ts index 4dabfb3feb390..1086714ab758a 100644 --- a/x-pack/plugins/rule_registry/server/search_strategy/search_strategy.test.ts +++ b/x-pack/plugins/rule_registry/server/search_strategy/search_strategy.test.ts @@ -4,12 +4,11 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { of } from 'rxjs'; +import { lastValueFrom, of } from 'rxjs'; import { merge } from 'lodash'; import { loggerMock } from '@kbn/logging-mocks'; -import { AlertConsumers } from '@kbn/rule-data-utils'; import { ALERT_EVENTS_FIELDS } from '@kbn/alerts-as-data-utils'; -import { ruleRegistrySearchStrategyProvider, EMPTY_RESPONSE } from './search_strategy'; +import { ruleRegistrySearchStrategyProvider } from './search_strategy'; import { dataPluginMock } from '@kbn/data-plugin/server/mocks'; import { SearchStrategyDependencies } from '@kbn/data-plugin/server'; import { alertsMock } from '@kbn/alerting-plugin/server/mocks'; @@ -18,6 +17,9 @@ import { spacesMock } from '@kbn/spaces-plugin/server/mocks'; import type { RuleRegistrySearchRequest } from '../../common'; import * as getAuthzFilterImport from '../lib/get_authz_filter'; import { getIsKibanaRequest } from '../lib/get_is_kibana_request'; +import { alertingAuthorizationMock } from '@kbn/alerting-plugin/server/authorization/alerting_authorization.mock'; +import { Boom } from '@hapi/boom'; +import { KbnSearchError } from '@kbn/data-plugin/server/search/report_search_error'; jest.mock('../lib/get_is_kibana_request'); @@ -53,8 +55,10 @@ describe('ruleRegistrySearchStrategyProvider()', () => { const security = securityMock.createSetup(); const spaces = spacesMock.createStart(); const logger = loggerMock.create(); + const authorizationMock = alertingAuthorizationMock.create(); const getAuthorizedRuleTypesMock = jest.fn(); const getAlertIndicesAliasMock = jest.fn(); + const response = getBasicResponse({ rawResponse: { hits: { @@ -73,13 +77,19 @@ describe('ruleRegistrySearchStrategyProvider()', () => { const searchStrategySearch = jest.fn().mockImplementation(() => of(response)); beforeEach(() => { + jest.clearAllMocks(); + getAuthorizedRuleTypesMock.mockResolvedValue([]); getAlertIndicesAliasMock.mockReturnValue(['test']); - const authorizationMock = { - getAuthorizedRuleTypes: getAuthorizedRuleTypesMock, - } as never; alerting.getAlertingAuthorizationWithRequest.mockResolvedValue(authorizationMock); alerting.getAlertIndicesAlias = getAlertIndicesAliasMock; + alerting.listTypes.mockReturnValue( + // @ts-expect-error: rule type properties are not needed for the test + new Map([ + ['.es-query', {}], + ['siem.esqlRule', {}], + ]) + ); data.search.getSearchStrategy.mockImplementation(() => { return { @@ -115,7 +125,7 @@ describe('ruleRegistrySearchStrategyProvider()', () => { getAuthorizedRuleTypesMock.mockResolvedValue([]); getAlertIndicesAliasMock.mockReturnValue(['observability-logs']); const request: RuleRegistrySearchRequest = { - featureIds: [AlertConsumers.LOGS], + ruleTypeIds: ['.es-query'], }; const options = {}; const deps = { @@ -124,16 +134,16 @@ describe('ruleRegistrySearchStrategyProvider()', () => { const strategy = ruleRegistrySearchStrategyProvider(data, alerting, logger, security, spaces); - const result = await strategy - .search(request, options, deps as unknown as SearchStrategyDependencies) - .toPromise(); + const result = await lastValueFrom( + strategy.search(request, options, deps as unknown as SearchStrategyDependencies) + ); expect(result).toEqual(response); }); it('should return an empty response if no valid indices are found', async () => { const request: RuleRegistrySearchRequest = { - featureIds: [AlertConsumers.LOGS], + ruleTypeIds: ['.es-query'], }; const options = {}; const deps = { @@ -145,15 +155,30 @@ describe('ruleRegistrySearchStrategyProvider()', () => { const strategy = ruleRegistrySearchStrategyProvider(data, alerting, logger, security, spaces); - const result = await strategy - .search(request, options, deps as unknown as SearchStrategyDependencies) - .toPromise(); - expect(result).toBe(EMPTY_RESPONSE); + const result = await lastValueFrom( + strategy.search(request, options, deps as unknown as SearchStrategyDependencies) + ); + + expect(result).toMatchInlineSnapshot(` + Object { + "inspect": Object { + "dsl": Array [ + "{}", + ], + }, + "rawResponse": Object { + "hits": Object { + "hits": Array [], + "total": 0, + }, + }, + } + `); }); - it('should not apply rbac filters for siem', async () => { + it('should not apply rbac filters for siem rule types', async () => { const request: RuleRegistrySearchRequest = { - featureIds: [AlertConsumers.SIEM], + ruleTypeIds: ['siem.esqlRule'], }; const options = {}; const deps = { @@ -165,15 +190,16 @@ describe('ruleRegistrySearchStrategyProvider()', () => { const strategy = ruleRegistrySearchStrategyProvider(data, alerting, logger, security, spaces); - await strategy - .search(request, options, deps as unknown as SearchStrategyDependencies) - .toPromise(); + await lastValueFrom( + strategy.search(request, options, deps as unknown as SearchStrategyDependencies) + ); + expect(getAuthzFilterSpy).not.toHaveBeenCalled(); }); - it('should throw an error if requesting multiple featureIds and one is SIEM', async () => { + it('should throw an error if requesting multiple rule types and one is for siem', async () => { const request: RuleRegistrySearchRequest = { - featureIds: [AlertConsumers.SIEM, AlertConsumers.LOGS], + ruleTypeIds: ['.es-query', 'siem.esqlRule'], }; const options = {}; const deps = { @@ -186,19 +212,70 @@ describe('ruleRegistrySearchStrategyProvider()', () => { const strategy = ruleRegistrySearchStrategyProvider(data, alerting, logger, security, spaces); let err; + try { - await strategy - .search(request, options, deps as unknown as SearchStrategyDependencies) - .toPromise(); + await lastValueFrom( + strategy.search(request, options, deps as unknown as SearchStrategyDependencies) + ); } catch (e) { err = e; } - expect(err).toBeDefined(); + + expect(err.statusCode).toBe(400); + expect(err.message).toBe( + 'The privateRuleRegistryAlertsSearchStrategy search strategy is unable to accommodate requests containing multiple rule types with mixed authorization.' + ); + }); + + it('should not throw an error with empty rule type ids', async () => { + const request: RuleRegistrySearchRequest = { + ruleTypeIds: [], + }; + + const options = {}; + const deps = { + request: {}, + }; + + getAuthorizedRuleTypesMock.mockResolvedValue([]); + getAlertIndicesAliasMock.mockReturnValue([]); + + const strategy = ruleRegistrySearchStrategyProvider(data, alerting, logger, security, spaces); + + await expect( + lastValueFrom( + strategy.search(request, options, deps as unknown as SearchStrategyDependencies) + ) + ).resolves.not.toThrow(); + }); + + it('should filter out invalid rule types', async () => { + const request: RuleRegistrySearchRequest = { + ruleTypeIds: ['.es-query', 'not-exist'], + }; + + const options = {}; + const deps = { + request: {}, + }; + + const strategy = ruleRegistrySearchStrategyProvider(data, alerting, logger, security, spaces); + + await expect( + lastValueFrom( + strategy.search(request, options, deps as unknown as SearchStrategyDependencies) + ) + ).resolves.not.toThrow(); + + expect(authorizationMock.getAllAuthorizedRuleTypesFindOperation).toHaveBeenCalledWith({ + authorizationEntity: 'alert', + ruleTypeIds: ['.es-query'], + }); }); it('should use internal user when requesting o11y alerts as RBAC is applied', async () => { const request: RuleRegistrySearchRequest = { - featureIds: [AlertConsumers.LOGS], + ruleTypeIds: ['.es-query'], }; const options = {}; const deps = { @@ -209,16 +286,17 @@ describe('ruleRegistrySearchStrategyProvider()', () => { const strategy = ruleRegistrySearchStrategyProvider(data, alerting, logger, security, spaces); - await strategy - .search(request, options, deps as unknown as SearchStrategyDependencies) - .toPromise(); + await lastValueFrom( + strategy.search(request, options, deps as unknown as SearchStrategyDependencies) + ); + expect(data.search.searchAsInternalUser.search).toHaveBeenCalled(); expect(searchStrategySearch).not.toHaveBeenCalled(); }); it('should use scoped user when requesting siem alerts as RBAC is not applied', async () => { const request: RuleRegistrySearchRequest = { - featureIds: [AlertConsumers.SIEM], + ruleTypeIds: ['siem.esqlRule'], }; const options = {}; const deps = { @@ -230,16 +308,17 @@ describe('ruleRegistrySearchStrategyProvider()', () => { const strategy = ruleRegistrySearchStrategyProvider(data, alerting, logger, security, spaces); - await strategy - .search(request, options, deps as unknown as SearchStrategyDependencies) - .toPromise(); + await lastValueFrom( + strategy.search(request, options, deps as unknown as SearchStrategyDependencies) + ); + expect(data.search.searchAsInternalUser.search as jest.Mock).not.toHaveBeenCalled(); expect(searchStrategySearch).toHaveBeenCalled(); }); it('should support pagination', async () => { const request: RuleRegistrySearchRequest = { - featureIds: [AlertConsumers.LOGS], + ruleTypeIds: ['.es-query'], pagination: { pageSize: 10, pageIndex: 0, @@ -254,9 +333,10 @@ describe('ruleRegistrySearchStrategyProvider()', () => { const strategy = ruleRegistrySearchStrategyProvider(data, alerting, logger, security, spaces); - await strategy - .search(request, options, deps as unknown as SearchStrategyDependencies) - .toPromise(); + await lastValueFrom( + strategy.search(request, options, deps as unknown as SearchStrategyDependencies) + ); + expect((data.search.searchAsInternalUser.search as jest.Mock).mock.calls.length).toBe(1); expect( (data.search.searchAsInternalUser.search as jest.Mock).mock.calls[0][0].params.body.size @@ -268,7 +348,7 @@ describe('ruleRegistrySearchStrategyProvider()', () => { it('should support sorting', async () => { const request: RuleRegistrySearchRequest = { - featureIds: [AlertConsumers.LOGS], + ruleTypeIds: ['.es-query'], sort: [ { test: { @@ -286,9 +366,10 @@ describe('ruleRegistrySearchStrategyProvider()', () => { const strategy = ruleRegistrySearchStrategyProvider(data, alerting, logger, security, spaces); - await strategy - .search(request, options, deps as unknown as SearchStrategyDependencies) - .toPromise(); + await lastValueFrom( + strategy.search(request, options, deps as unknown as SearchStrategyDependencies) + ); + expect((data.search.searchAsInternalUser.search as jest.Mock).mock.calls.length).toBe(1); expect( (data.search.searchAsInternalUser.search as jest.Mock).mock.calls[0][0].params.body.sort @@ -297,7 +378,7 @@ describe('ruleRegistrySearchStrategyProvider()', () => { it('passes the query ids if provided', async () => { const request: RuleRegistrySearchRequest = { - featureIds: [AlertConsumers.SIEM], + ruleTypeIds: ['siem.esqlRule'], query: { ids: { values: ['test-id'] }, }, @@ -311,21 +392,24 @@ describe('ruleRegistrySearchStrategyProvider()', () => { const strategy = ruleRegistrySearchStrategyProvider(data, alerting, logger, security, spaces); - await strategy - .search(request, options, deps as unknown as SearchStrategyDependencies) - .toPromise(); + await lastValueFrom( + strategy.search(request, options, deps as unknown as SearchStrategyDependencies) + ); + const arg0 = searchStrategySearch.mock.calls[0][0]; expect(arg0.params.body.fields.length).toEqual( // +2 because of fields.push({ field: 'kibana.alert.*', include_unmapped: false }); and // fields.push({ field: 'signal.*', include_unmapped: false }); ALERT_EVENTS_FIELDS.length + 2 ); + expect.arrayContaining([ expect.objectContaining({ x: 2, y: 3, }), ]); + expect(arg0).toEqual( expect.objectContaining({ id: undefined, @@ -355,9 +439,9 @@ describe('ruleRegistrySearchStrategyProvider()', () => { ); }); - it('passes the fields if provided', async () => { + it('passes the fields if provided for siem rule types', async () => { const request: RuleRegistrySearchRequest = { - featureIds: [AlertConsumers.SIEM], + ruleTypeIds: ['siem.esqlRule'], query: { ids: { values: ['test-id'] }, }, @@ -372,42 +456,264 @@ describe('ruleRegistrySearchStrategyProvider()', () => { const strategy = ruleRegistrySearchStrategyProvider(data, alerting, logger, security, spaces); - await strategy - .search(request, options, deps as unknown as SearchStrategyDependencies) - .toPromise(); + await lastValueFrom( + strategy.search(request, options, deps as unknown as SearchStrategyDependencies) + ); const arg0 = searchStrategySearch.mock.calls[0][0]; - expect(arg0.params.body.fields.length).toEqual( + const fields = arg0.params.body.fields; + + expect(fields.length).toEqual( // +2 because of fields.push({ field: 'kibana.alert.*', include_unmapped: false }); and // fields.push({ field: 'signal.*', include_unmapped: false }); + my-super-field ALERT_EVENTS_FIELDS.length + 3 ); - expect(arg0).toEqual( - expect.objectContaining({ - id: undefined, - params: expect.objectContaining({ - allow_no_indices: true, - body: expect.objectContaining({ - _source: false, - fields: expect.arrayContaining([ - expect.objectContaining({ - field: 'my-super-field', - include_unmapped: true, - }), - ]), - from: 0, - query: { - ids: { - values: ['test-id'], + + const siemField = fields.find((field: { field: string }) => field.field === 'signal.*'); + const kibanaField = fields.find((field: { field: string }) => field.field === 'kibana.alert.*'); + const myField = fields.find((field: { field: string }) => field.field === 'my-super-field'); + + expect(siemField).toMatchInlineSnapshot(` + Object { + "field": "signal.*", + "include_unmapped": false, + } + `); + + expect(kibanaField).toMatchInlineSnapshot(` + Object { + "field": "kibana.alert.*", + "include_unmapped": false, + } + `); + + expect(myField).toMatchInlineSnapshot(` + Object { + "field": "my-super-field", + "include_unmapped": true, + } + `); + }); + + it('passes the fields if provided for o11y rule types', async () => { + const request: RuleRegistrySearchRequest = { + ruleTypeIds: ['.es-query'], + query: { + ids: { values: ['test-id'] }, + }, + fields: [{ field: 'my-super-field', include_unmapped: true }], + }; + const options = {}; + const deps = { + request: {}, + }; + getAuthorizedRuleTypesMock.mockResolvedValue([]); + getAlertIndicesAliasMock.mockReturnValue(['security-siem']); + + const strategy = ruleRegistrySearchStrategyProvider(data, alerting, logger, security, spaces); + + await lastValueFrom( + strategy.search(request, options, deps as unknown as SearchStrategyDependencies) + ); + + const arg0 = (data.search.searchAsInternalUser.search as jest.Mock).mock.calls[0][0]; + const fields = arg0.params.body.fields; + + expect(fields.length).toEqual( + // +2 because of fields.push({ field: 'kibana.alert.*', include_unmapped: false }); and + // fields.push({ field: '*', include_unmapped: false }); + my-super-field + 3 + ); + + const allField = fields.find((field: { field: string }) => field.field === '*'); + const kibanaField = fields.find((field: { field: string }) => field.field === 'kibana.alert.*'); + const myField = fields.find((field: { field: string }) => field.field === 'my-super-field'); + + expect(allField).toMatchInlineSnapshot(` + Object { + "field": "*", + "include_unmapped": true, + } + `); + + expect(kibanaField).toMatchInlineSnapshot(` + Object { + "field": "kibana.alert.*", + "include_unmapped": false, + } + `); + + expect(myField).toMatchInlineSnapshot(` + Object { + "field": "my-super-field", + "include_unmapped": true, + } + `); + }); + + it('should handle Boom errors correctly', async () => { + getAuthzFilterSpy.mockRejectedValue(new Boom('boom error message', { statusCode: 400 })); + + const request: RuleRegistrySearchRequest = { + ruleTypeIds: ['.es-query'], + }; + + const options = {}; + const deps = { + request: {}, + }; + + const strategy = ruleRegistrySearchStrategyProvider(data, alerting, logger, security, spaces); + + let err; + + try { + await lastValueFrom( + strategy.search(request, options, deps as unknown as SearchStrategyDependencies) + ); + } catch (e) { + err = e; + } + + expect(err.statusCode).toBe(400); + expect(err.message).toBe('boom error message'); + }); + + it('should handle KbnSearchError errors correctly', async () => { + getAuthzFilterSpy.mockRejectedValue(new KbnSearchError('kbn search error message', 403)); + + const request: RuleRegistrySearchRequest = { + ruleTypeIds: ['.es-query'], + }; + + const options = {}; + const deps = { + request: {}, + }; + + const strategy = ruleRegistrySearchStrategyProvider(data, alerting, logger, security, spaces); + + let err; + + try { + await lastValueFrom( + strategy.search(request, options, deps as unknown as SearchStrategyDependencies) + ); + } catch (e) { + err = e; + } + + expect(err.statusCode).toBe(403); + expect(err.message).toBe('kbn search error message'); + }); + + it('should convert errors to KbnSearchError errors correctly', async () => { + getAuthzFilterSpy.mockRejectedValue(new Error('plain error message')); + + const request: RuleRegistrySearchRequest = { + ruleTypeIds: ['.es-query'], + }; + + const options = {}; + const deps = { + request: {}, + }; + + const strategy = ruleRegistrySearchStrategyProvider(data, alerting, logger, security, spaces); + + let err; + + try { + await lastValueFrom( + strategy.search(request, options, deps as unknown as SearchStrategyDependencies) + ); + } catch (e) { + err = e; + } + + expect(err.statusCode).toBe(500); + expect(err.message).toBe('plain error message'); + }); + + it('should apply the rule type IDs filter', async () => { + const request: RuleRegistrySearchRequest = { + ruleTypeIds: ['siem.esqlRule'], + }; + + const options = {}; + const deps = { + request: {}, + }; + + getAuthorizedRuleTypesMock.mockResolvedValue([]); + getAlertIndicesAliasMock.mockReturnValue(['security-siem']); + + const strategy = ruleRegistrySearchStrategyProvider(data, alerting, logger, security, spaces); + + await lastValueFrom( + strategy.search(request, options, deps as unknown as SearchStrategyDependencies) + ); + + const arg0 = searchStrategySearch.mock.calls[0][0]; + expect(arg0.params.body.query).toMatchInlineSnapshot(` + Object { + "bool": Object { + "filter": Array [ + Object { + "terms": Object { + "kibana.alert.rule.rule_type_id": Array [ + "siem.esqlRule", + ], }, }, - size: 1000, - sort: [], - }), - ignore_unavailable: true, - index: ['security-siem'], - }), - }) + ], + }, + } + `); + }); + + it('should apply the consumers filter', async () => { + const request: RuleRegistrySearchRequest = { + ruleTypeIds: ['siem.esqlRule'], + consumers: ['alerts'], + }; + + const options = {}; + const deps = { + request: {}, + }; + + getAuthorizedRuleTypesMock.mockResolvedValue([]); + getAlertIndicesAliasMock.mockReturnValue(['security-siem']); + + const strategy = ruleRegistrySearchStrategyProvider(data, alerting, logger, security, spaces); + + await lastValueFrom( + strategy.search(request, options, deps as unknown as SearchStrategyDependencies) ); + + const arg0 = searchStrategySearch.mock.calls[0][0]; + expect(arg0.params.body.query).toMatchInlineSnapshot(` + Object { + "bool": Object { + "filter": Array [ + Object { + "terms": Object { + "kibana.alert.rule.consumer": Array [ + "alerts", + ], + }, + }, + Object { + "terms": Object { + "kibana.alert.rule.rule_type_id": Array [ + "siem.esqlRule", + ], + }, + }, + ], + }, + } + `); }); }); diff --git a/x-pack/plugins/rule_registry/server/search_strategy/search_strategy.ts b/x-pack/plugins/rule_registry/server/search_strategy/search_strategy.ts index a497008086c88..246b38aaf733d 100644 --- a/x-pack/plugins/rule_registry/server/search_strategy/search_strategy.ts +++ b/x-pack/plugins/rule_registry/server/search_strategy/search_strategy.ts @@ -4,28 +4,36 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { map, mergeMap, catchError } from 'rxjs'; + +import Boom from '@hapi/boom'; +import { map, mergeMap, catchError, of } from 'rxjs'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { Logger } from '@kbn/core/server'; -import { from, of } from 'rxjs'; -import { isValidFeatureId, AlertConsumers } from '@kbn/rule-data-utils'; +import { from } from 'rxjs'; import { ENHANCED_ES_SEARCH_STRATEGY } from '@kbn/data-plugin/common'; import { ISearchStrategy, PluginStart } from '@kbn/data-plugin/server'; import { ReadOperations, - PluginStartContract as AlertingStart, + AlertingServerStart, AlertingAuthorizationEntity, } from '@kbn/alerting-plugin/server'; import { SecurityPluginSetup } from '@kbn/security-plugin/server'; import { SpacesPluginStart } from '@kbn/spaces-plugin/server'; import { buildAlertFieldsRequest } from '@kbn/alerts-as-data-utils'; +import { partition } from 'lodash'; +import { isSiemRuleType } from '@kbn/rule-data-utils'; +import { KbnSearchError } from '@kbn/data-plugin/server/search/report_search_error'; import type { RuleRegistrySearchRequest, RuleRegistrySearchResponse } from '../../common'; import { MAX_ALERT_SEARCH_SIZE } from '../../common/constants'; import { AlertAuditAction, alertAuditEvent } from '..'; import { getSpacesFilter, getAuthzFilter } from '../lib'; +import { getRuleTypeIdsFilter } from '../lib/get_rule_type_ids_filter'; +import { getConsumersFilter } from '../lib/get_consumers_filter'; export const EMPTY_RESPONSE: RuleRegistrySearchResponse = { - rawResponse: {} as RuleRegistrySearchResponse['rawResponse'], + rawResponse: { + hits: { total: 0, hits: [] }, + } as unknown as RuleRegistrySearchResponse['rawResponse'], }; export const RULE_SEARCH_STRATEGY_NAME = 'privateRuleRegistryAlertsSearchStrategy'; @@ -35,7 +43,7 @@ const EXCLUDED_RULE_TYPE_IDS = ['siem.notifications']; export const ruleRegistrySearchStrategyProvider = ( data: PluginStart, - alerting: AlertingStart, + alerting: AlertingServerStart, logger: Logger, security?: SecurityPluginSetup, spaces?: SpacesPluginStart @@ -44,57 +52,69 @@ export const ruleRegistrySearchStrategyProvider = ( const requestUserEs = data.search.getSearchStrategy(ENHANCED_ES_SEARCH_STRATEGY); return { search: (request, options, deps) => { + let params = {}; + // SIEM uses RBAC fields in their alerts but also utilizes ES DLS which // is different than every other solution so we need to special case // those requests. - let siemRequest = false; - let params = {}; - if (request.featureIds.length === 1 && request.featureIds[0] === AlertConsumers.SIEM) { - siemRequest = true; - } else if (request.featureIds.includes(AlertConsumers.SIEM)) { - throw new Error( - `The ${RULE_SEARCH_STRATEGY_NAME} search strategy is unable to accommodate requests containing multiple feature IDs and one of those IDs is SIEM.` + const isAnyRuleTypeESAuthorized = request.ruleTypeIds.some(isSiemRuleType); + const isEachRuleTypeESAuthorized = + // every returns true for empty arrays + request.ruleTypeIds.length > 0 && request.ruleTypeIds.every(isSiemRuleType); + + const registeredRuleTypes = alerting.listTypes(); + + const [validRuleTypeIds, invalidRuleTypeIds] = partition(request.ruleTypeIds, (ruleTypeId) => + registeredRuleTypes.has(ruleTypeId) + ); + + if (isAnyRuleTypeESAuthorized && !isEachRuleTypeESAuthorized) { + throw new KbnSearchError( + `The ${RULE_SEARCH_STRATEGY_NAME} search strategy is unable to accommodate requests containing multiple rule types with mixed authorization.`, + 400 ); } - request.featureIds.forEach((featureId) => { - if (!isValidFeatureId(featureId)) { - logger.warn( - `Found invalid feature '${featureId}' while using ${RULE_SEARCH_STRATEGY_NAME} search strategy. No alert data from this feature will be searched.` - ); - } + + invalidRuleTypeIds.forEach((ruleTypeId) => { + logger.warn( + `Found invalid rule type '${ruleTypeId}' while using ${RULE_SEARCH_STRATEGY_NAME} search strategy. No alert data from this rule type will be searched.` + ); }); const securityAuditLogger = security?.audit.asScoped(deps.request); const getActiveSpace = async () => spaces?.spacesService.getActiveSpace(deps.request); - const getAsync = async (featureIds: string[]) => { + + const getAsync = async (ruleTypeIds: string[]) => { const [space, authorization] = await Promise.all([ getActiveSpace(), alerting.getAlertingAuthorizationWithRequest(deps.request), ]); + let authzFilter; - const fIds = new Set(featureIds); - if (!siemRequest && featureIds.length > 0) { + + if (!isAnyRuleTypeESAuthorized && ruleTypeIds.length > 0) { authzFilter = (await getAuthzFilter( authorization, - ReadOperations.Find, - fIds + ReadOperations.Find )) as estypes.QueryDslQueryContainer; } - const authorizedRuleTypes = - featureIds.length > 0 - ? await authorization.getAuthorizedRuleTypes(AlertingAuthorizationEntity.Alert, fIds) - : []; + const authorizedRuleTypes = await authorization.getAllAuthorizedRuleTypesFindOperation({ + authorizationEntity: AlertingAuthorizationEntity.Alert, + ruleTypeIds, + }); return { space, authzFilter, authorizedRuleTypes }; }; - return from(getAsync(request.featureIds)).pipe( + return from(getAsync(validRuleTypeIds)).pipe( mergeMap(({ space, authzFilter, authorizedRuleTypes }) => { - const allRuleTypes = authorizedRuleTypes.map((art: { id: string }) => art.id); - const ruleTypes = (allRuleTypes ?? []).filter( + const authorizedRuleTypesIds = Array.from(authorizedRuleTypes.keys()); + const ruleTypes = (authorizedRuleTypesIds ?? []).filter( (ruleTypeId: string) => !EXCLUDED_RULE_TYPE_IDS.includes(ruleTypeId) ); + const indices = alerting.getAlertIndicesAlias(ruleTypes, space?.id); + if (indices.length === 0) { return of(EMPTY_RESPONSE); } @@ -104,13 +124,26 @@ export const ruleRegistrySearchStrategyProvider = ( ? request.query?.bool?.filter : [request.query?.bool?.filter] : []; + if (authzFilter) { filter.push(authzFilter); } + if (space?.id) { filter.push(getSpacesFilter(space.id) as estypes.QueryDslQueryContainer); } + const ruleTypeFilter = getRuleTypeIdsFilter(request.ruleTypeIds); + const consumersFilter = getConsumersFilter(request.consumers); + + if (consumersFilter) { + filter.push(consumersFilter); + } + + if (ruleTypeFilter) { + filter.push(ruleTypeFilter); + } + const sort = request.sort ?? []; const query = { @@ -123,10 +156,11 @@ export const ruleRegistrySearchStrategyProvider = ( }, }), }; + let fields = request?.fields ?? []; fields.push({ field: 'kibana.alert.*', include_unmapped: false }); - if (siemRequest) { + if (isAnyRuleTypeESAuthorized) { fields.push({ field: 'signal.*', include_unmapped: false }); fields = fields.concat(buildAlertFieldsRequest([], false)); } else { @@ -149,7 +183,7 @@ export const ruleRegistrySearchStrategyProvider = ( ...(request.runtimeMappings ? { runtime_mappings: request.runtimeMappings } : {}), }, }; - return (siemRequest ? requestUserEs : internalUserEs).search( + return (isAnyRuleTypeESAuthorized ? requestUserEs : internalUserEs).search( { id: request.id, params }, options, deps @@ -180,7 +214,6 @@ export const ruleRegistrySearchStrategyProvider = ( return response; }), catchError((err) => { - // check if auth error, if yes, write to ecs logger if (securityAuditLogger != null && err?.output?.statusCode === 403) { securityAuditLogger.log( alertAuditEvent({ @@ -191,7 +224,15 @@ export const ruleRegistrySearchStrategyProvider = ( ); } - throw err; + if (Boom.isBoom(err)) { + throw new KbnSearchError(err.output.payload.message, err.output.statusCode); + } + + if (err instanceof KbnSearchError) { + throw err; + } + + throw new KbnSearchError(err.message, 500); }) ); }, diff --git a/x-pack/plugins/rule_registry/server/utils/create_persistence_rule_type_wrapper.ts b/x-pack/plugins/rule_registry/server/utils/create_persistence_rule_type_wrapper.ts index 9900c889ae73e..892ba70d247ed 100644 --- a/x-pack/plugins/rule_registry/server/utils/create_persistence_rule_type_wrapper.ts +++ b/x-pack/plugins/rule_registry/server/utils/create_persistence_rule_type_wrapper.ts @@ -27,6 +27,7 @@ import { ALERT_RULE_EXECUTION_TIMESTAMP, } from '@kbn/rule-data-utils'; import { mapKeys, snakeCase } from 'lodash/fp'; + import type { IRuleDataClient } from '..'; import { getCommonAlertFields } from './get_common_alert_fields'; import { CreatePersistenceRuleTypeWrapper } from './persistence_types'; @@ -471,9 +472,11 @@ export const createPersistenceRuleTypeWrapper: CreatePersistenceRuleTypeWrapper }, {}); // filter out alerts that were already suppressed - // alert was suppressed if its suppression ends is older than suppression end of existing alert - // if existing alert was created earlier during the same rule execution - then alerts can be counted as not suppressed yet - // as they are processed for the first against this existing alert + // alert was suppressed if its suppression ends is older + // than suppression end of existing alert + // if existing alert was created earlier during the same + // rule execution - then alerts can be counted as not suppressed yet + // as they are processed for the first time against this existing alert const nonSuppressedAlerts = filteredDuplicates.filter((alert) => { const existingAlert = existingAlertsByInstanceId[alert._source[ALERT_INSTANCE_ID]]; @@ -544,7 +547,15 @@ export const createPersistenceRuleTypeWrapper: CreatePersistenceRuleTypeWrapper ]; }); - let enrichedAlerts = newAlerts; + // we can now augment and enrich + // the sub alerts (if any) the same as we would + // any other newAlert + let enrichedAlerts = newAlerts.some((newAlert) => newAlert.subAlerts != null) + ? newAlerts.flatMap((newAlert) => { + const { subAlerts, ...everything } = newAlert; + return [everything, ...(subAlerts ?? [])]; + }) + : newAlerts; if (enrichAlerts) { try { diff --git a/x-pack/plugins/rule_registry/server/utils/persistence_types.ts b/x-pack/plugins/rule_registry/server/utils/persistence_types.ts index 328e5185a2b80..f6e1ae5942b37 100644 --- a/x-pack/plugins/rule_registry/server/utils/persistence_types.ts +++ b/x-pack/plugins/rule_registry/server/utils/persistence_types.ts @@ -45,6 +45,10 @@ export type SuppressedAlertService = ( alerts: Array<{ _id: string; _source: T; + subAlerts?: Array<{ + _id: string; + _source: T; + }>; }>, suppressionWindow: string, enrichAlerts?: ( diff --git a/x-pack/plugins/search_indices/public/components/index_documents/add_documents_code_example.test.tsx b/x-pack/plugins/search_indices/public/components/index_documents/add_documents_code_example.test.tsx new file mode 100644 index 0000000000000..c5fdc7428e690 --- /dev/null +++ b/x-pack/plugins/search_indices/public/components/index_documents/add_documents_code_example.test.tsx @@ -0,0 +1,132 @@ +/* + * 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 { render } from '@testing-library/react'; +import { + AddDocumentsCodeExample, + basicExampleTexts, + exampleTextsWithCustomMapping, +} from './add_documents_code_example'; +import { generateSampleDocument } from '../../utils/document_generation'; +import { MappingProperty } from '@elastic/elasticsearch/lib/api/types'; + +jest.mock('../../utils/language', () => ({ + getDefaultCodingLanguage: jest.fn().mockReturnValue('python'), +})); + +jest.mock('../../hooks/use_asset_base_path', () => ({ + useAssetBasePath: jest.fn().mockReturnValue('/plugins/'), +})); + +jest.mock('../../utils/document_generation', () => ({ + generateSampleDocument: jest.fn(), +})); + +jest.mock('../../hooks/use_elasticsearch_url', () => ({ + useElasticsearchUrl: jest.fn(), +})); + +jest.mock('@kbn/search-api-keys-components', () => ({ + useSearchApiKey: jest.fn().mockReturnValue({ apiKey: 'test-api-key' }), +})); + +jest.mock('../../hooks/use_kibana', () => ({ + useKibana: jest.fn().mockReturnValue({ + services: { + application: {}, + share: {}, + console: {}, + }, + }), +})); + +jest.mock('../../contexts/usage_tracker_context', () => ({ + useUsageTracker: jest.fn().mockReturnValue({ + count: jest.fn(), + click: jest.fn(), + }), +})); + +describe('AddDocumentsCodeExample', () => { + afterEach(() => { + jest.clearAllMocks(); + }); + + describe('generateSampleDocument', () => { + it('pass basic examples when mapping is default', () => { + const indexName = 'test-index'; + const mappingProperties: Record = { + vector: { type: 'dense_vector', dims: 3 }, + text: { type: 'text' }, + }; + + render( + + ); + + expect(generateSampleDocument).toHaveBeenCalledTimes(3); + + basicExampleTexts.forEach((text, index) => { + expect(generateSampleDocument).toHaveBeenNthCalledWith(index + 1, mappingProperties, text); + }); + }); + + it('pass basic examples when mapping is not passed', () => { + const indexName = 'test-index'; + + render(); + + expect(generateSampleDocument).toHaveBeenCalledTimes(3); + + const mappingProperties: Record = { + vector: { type: 'dense_vector', dims: 3 }, + text: { type: 'text' }, + }; + + basicExampleTexts.forEach((text, index) => { + expect(generateSampleDocument).toHaveBeenNthCalledWith(index + 1, mappingProperties, text); + }); + }); + + it('pass basic examples when mapping is default with extra vector fields', () => { + const indexName = 'test-index'; + const mappingProperties: Record = { + vector: { type: 'dense_vector', dims: 3, similarity: 'extra' }, + text: { type: 'text' }, + }; + + render( + + ); + + expect(generateSampleDocument).toHaveBeenCalledTimes(3); + + basicExampleTexts.forEach((text, index) => { + expect(generateSampleDocument).toHaveBeenNthCalledWith(index + 1, mappingProperties, text); + }); + }); + + it('pass examples text when mapping is custom', () => { + const indexName = 'test-index'; + const mappingProperties: Record = { + text: { type: 'text' }, + test: { type: 'boolean' }, + }; + + render( + + ); + + expect(generateSampleDocument).toHaveBeenCalledTimes(3); + + exampleTextsWithCustomMapping.forEach((text, index) => { + expect(generateSampleDocument).toHaveBeenNthCalledWith(index + 1, mappingProperties, text); + }); + }); + }); +}); diff --git a/x-pack/plugins/search_indices/public/components/index_documents/add_documents_code_example.tsx b/x-pack/plugins/search_indices/public/components/index_documents/add_documents_code_example.tsx index e84ca5bd47be0..d96055b5dc184 100644 --- a/x-pack/plugins/search_indices/public/components/index_documents/add_documents_code_example.tsx +++ b/x-pack/plugins/search_indices/public/components/index_documents/add_documents_code_example.tsx @@ -6,10 +6,11 @@ */ import React, { useCallback, useMemo, useState } from 'react'; -import { MappingProperty } from '@elastic/elasticsearch/lib/api/types'; +import { MappingDenseVectorProperty, MappingProperty } from '@elastic/elasticsearch/lib/api/types'; import { EuiFlexGroup, EuiFlexItem, EuiPanel } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { TryInConsoleButton } from '@kbn/try-in-console'; +import { isEqual } from 'lodash'; import { useSearchApiKey } from '@kbn/search-api-keys-components'; import { useKibana } from '../../hooks/use_kibana'; @@ -24,6 +25,13 @@ import { CodeSample } from '../shared/code_sample'; import { generateSampleDocument } from '../../utils/document_generation'; import { getDefaultCodingLanguage } from '../../utils/language'; +export const basicExampleTexts = [ + 'Yellowstone National Park', + 'Yosemite National Park', + 'Rocky Mountain National Park', +]; +export const exampleTextsWithCustomMapping = [1, 2, 3].map((num) => `Example text ${num}`); + export interface AddDocumentsCodeExampleProps { indexName: string; mappingProperties: Record; @@ -56,10 +64,19 @@ export const AddDocumentsCodeExample = ({ [usageTracker] ); const sampleDocuments = useMemo(() => { - return [1, 2, 3].map((num) => - generateSampleDocument(codeSampleMappings, `Example text ${num}`) - ); - }, [codeSampleMappings]); + // If the default mapping was used, we need to exclude generated vector fields + const copyCodeSampleMappings = { + ...codeSampleMappings, + vector: { + type: codeSampleMappings.vector?.type, + dims: (codeSampleMappings.vector as MappingDenseVectorProperty)?.dims, + }, + }; + const isDefaultMapping = isEqual(copyCodeSampleMappings, ingestCodeExamples.defaultMapping); + const sampleTexts = isDefaultMapping ? basicExampleTexts : exampleTextsWithCustomMapping; + + return sampleTexts.map((text) => generateSampleDocument(codeSampleMappings, text)); + }, [codeSampleMappings, ingestCodeExamples.defaultMapping]); const { apiKey } = useSearchApiKey(); const codeParams: IngestCodeSnippetParameters = useMemo(() => { return { diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.test.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.test.tsx index 1c91dcfd1aec3..4866c6fef802f 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.test.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.test.tsx @@ -11,8 +11,60 @@ import { EndpointInfo } from './endpoint_info'; describe('RenderEndpoint component tests', () => { it('renders the component with inference id', () => { - render(); + const mockProvider = { + inference_id: 'cohere-2', + service: 'cohere', + service_settings: { + similarity: 'cosine', + dimensions: 384, + model_id: 'embed-english-light-v3.0', + rate_limit: { + requests_per_minute: 10000, + }, + embedding_type: 'byte', + }, + task_settings: {}, + } as any; + + render(); expect(screen.getByText('cohere-2')).toBeInTheDocument(); }); + + it('renders correctly without model_id in service_settings', () => { + const mockProvider = { + inference_id: 'azure-openai-1', + service: 'azureopenai', + service_settings: { + resource_name: 'resource-xyz', + deployment_id: 'deployment-123', + api_version: 'v1', + }, + } as any; + + render(); + + expect(screen.getByText('azure-openai-1')).toBeInTheDocument(); + }); + + it('renders with tech preview badge when endpoint is reranker type', () => { + const mockProvider = { + inference_id: 'elastic-rerank', + task_type: 'rerank', + service: 'elasticsearch', + service_settings: { + num_allocations: 1, + num_threads: 1, + model_id: '.rerank-v1', + }, + task_settings: { + return_documents: true, + }, + } as any; + + render(); + + expect(screen.getByText('elastic-rerank')).toBeInTheDocument(); + expect(screen.getByText('TECH PREVIEW')).toBeInTheDocument(); + }); }); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.tsx index 26b12328dafd4..7d5311815880f 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.tsx @@ -7,19 +7,38 @@ import { EuiBetaBadge, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import React from 'react'; +import { InferenceAPIConfigResponse } from '@kbn/ml-trained-models-utils'; import { isEndpointPreconfigured } from '../../../../utils/preconfigured_endpoint_helper'; import * as i18n from './translations'; +import { isProviderTechPreview } from '../../../../utils/reranker_helper'; export interface EndpointInfoProps { inferenceId: string; + provider: InferenceAPIConfigResponse; } -export const EndpointInfo: React.FC = ({ inferenceId }) => ( +export const EndpointInfo: React.FC = ({ inferenceId, provider }) => ( - - {inferenceId} - + + + + {inferenceId} + + + {isProviderTechPreview(provider) ? ( + + + + + + ) : null} + diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/translations.ts b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/translations.ts index 70b1576a9ddc0..7e3af28fdcbdc 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/translations.ts +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/translations.ts @@ -13,3 +13,10 @@ export const PRECONFIGURED_LABEL = i18n.translate( defaultMessage: 'PRECONFIGURED', } ); + +export const TECH_PREVIEW_LABEL = i18n.translate( + 'xpack.searchInferenceEndpoints.elasticsearch.endpointInfo.techPreview', + { + defaultMessage: 'TECH PREVIEW', + } +); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.test.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.test.tsx index 85718478f65fd..60fb799074f14 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.test.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.test.tsx @@ -67,6 +67,19 @@ const inferenceEndpoints = [ }, task_settings: {}, }, + { + inference_id: 'elastic-rerank', + task_type: 'rerank', + service: 'elasticsearch', + service_settings: { + num_allocations: 1, + num_threads: 1, + model_id: '.rerank-v1', + }, + task_settings: { + return_documents: true, + }, + }, ] as InferenceAPIConfigResponse[]; jest.mock('../../hooks/use_delete_endpoint', () => ({ @@ -82,9 +95,10 @@ describe('When the tabular page is loaded', () => { const rows = screen.getAllByRole('row'); expect(rows[1]).toHaveTextContent('.elser-2-elasticsearch'); expect(rows[2]).toHaveTextContent('.multilingual-e5-small-elasticsearch'); - expect(rows[3]).toHaveTextContent('local-model'); - expect(rows[4]).toHaveTextContent('my-elser-model-05'); - expect(rows[5]).toHaveTextContent('third-party-model'); + expect(rows[3]).toHaveTextContent('elastic-rerank'); + expect(rows[4]).toHaveTextContent('local-model'); + expect(rows[5]).toHaveTextContent('my-elser-model-05'); + expect(rows[6]).toHaveTextContent('third-party-model'); }); it('should display all service and model ids in the table', () => { @@ -98,13 +112,16 @@ describe('When the tabular page is loaded', () => { expect(rows[2]).toHaveTextContent('.multilingual-e5-small'); expect(rows[3]).toHaveTextContent('Elasticsearch'); - expect(rows[3]).toHaveTextContent('.own_model'); + expect(rows[3]).toHaveTextContent('.rerank-v1'); expect(rows[4]).toHaveTextContent('Elasticsearch'); - expect(rows[4]).toHaveTextContent('.elser_model_2'); + expect(rows[4]).toHaveTextContent('.own_model'); - expect(rows[5]).toHaveTextContent('OpenAI'); - expect(rows[5]).toHaveTextContent('.own_model'); + expect(rows[5]).toHaveTextContent('Elasticsearch'); + expect(rows[5]).toHaveTextContent('.elser_model_2'); + + expect(rows[6]).toHaveTextContent('OpenAI'); + expect(rows[6]).toHaveTextContent('.own_model'); }); it('should only disable delete action for preconfigured endpoints', () => { @@ -131,4 +148,18 @@ describe('When the tabular page is loaded', () => { expect(rows[4]).not.toHaveTextContent(preconfigured); expect(rows[5]).not.toHaveTextContent(preconfigured); }); + + it('should show tech preview badge only for reranker-v1 model', () => { + render(); + + const techPreview = 'TECH PREVIEW'; + + const rows = screen.getAllByRole('row'); + expect(rows[1]).not.toHaveTextContent(techPreview); + expect(rows[2]).not.toHaveTextContent(techPreview); + expect(rows[3]).toHaveTextContent(techPreview); + expect(rows[4]).not.toHaveTextContent(techPreview); + expect(rows[5]).not.toHaveTextContent(techPreview); + expect(rows[6]).not.toHaveTextContent(techPreview); + }); }); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.tsx index 0ea17fa6408a0..a999dca2ac0a5 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.tsx @@ -53,9 +53,9 @@ export const TabularPage: React.FC = ({ inferenceEndpoints }) field: 'endpoint', name: i18n.ENDPOINT, 'data-test-subj': 'endpointCell', - render: (endpoint: string) => { + render: (endpoint: string, additionalInfo: InferenceEndpointUI) => { if (endpoint) { - return ; + return ; } return null; diff --git a/x-pack/plugins/search_inference_endpoints/public/utils/reranker_helper.test.ts b/x-pack/plugins/search_inference_endpoints/public/utils/reranker_helper.test.ts new file mode 100644 index 0000000000000..3eb3fa46634db --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/utils/reranker_helper.test.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 { isProviderTechPreview } from './reranker_helper'; + +describe('Reranker Tech preview badge', () => { + const mockProvider = { + inference_id: 'elastic-rerank', + task_type: 'rerank', + service: 'elasticsearch', + service_settings: { + num_allocations: 1, + num_threads: 1, + model_id: '.rerank-v1', + }, + task_settings: { + return_documents: true, + }, + } as any; + + it('return true for reranker', () => { + expect(isProviderTechPreview(mockProvider)).toEqual(true); + }); + + it('return false for other provider', () => { + const otherProviderServiceSettings = { + ...mockProvider.service_settings, + model_id: '.elser_model_2', + }; + const otherProvider = { + ...mockProvider, + task_type: 'sparse_embedding', + service_settings: otherProviderServiceSettings, + } as any; + expect(isProviderTechPreview(otherProvider)).toEqual(false); + }); + + it('return false for other provider without model_id', () => { + const mockThirdPartyProvider = { + inference_id: 'azure-openai-1', + service: 'azureopenai', + service_settings: { + resource_name: 'resource-xyz', + deployment_id: 'deployment-123', + api_version: 'v1', + }, + } as any; + expect(isProviderTechPreview(mockThirdPartyProvider)).toEqual(false); + }); +}); diff --git a/x-pack/plugins/search_inference_endpoints/public/utils/reranker_helper.ts b/x-pack/plugins/search_inference_endpoints/public/utils/reranker_helper.ts new file mode 100644 index 0000000000000..ac930971fa458 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/utils/reranker_helper.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { InferenceAPIConfigResponse } from '@kbn/ml-trained-models-utils'; +export const isProviderTechPreview = (provider: InferenceAPIConfigResponse) => { + if (hasModelId(provider)) { + return provider.task_type === 'rerank' && provider.service_settings?.model_id?.startsWith('.'); + } + + return false; +}; + +function hasModelId( + service: InferenceAPIConfigResponse +): service is Extract { + return 'model_id' in service.service_settings; +} diff --git a/x-pack/plugins/search_solution/search_navigation/public/classic_navigation.test.ts b/x-pack/plugins/search_solution/search_navigation/public/classic_navigation.test.ts index 1b17296f54c73..45c6e4c02ace4 100644 --- a/x-pack/plugins/search_solution/search_navigation/public/classic_navigation.test.ts +++ b/x-pack/plugins/search_solution/search_navigation/public/classic_navigation.test.ts @@ -30,7 +30,7 @@ describe('classicNavigationFactory', function () { }, { id: 'enterpriseSearchContent:webCrawlers', - title: 'Web crawlers', + title: 'Web Crawlers', url: '/app/enterprise_search/content/crawlers', }, ]; diff --git a/x-pack/plugins/searchprofiler/common/constants.ts b/x-pack/plugins/searchprofiler/common/constants.ts index a50ed281c2bd0..0d586e9b1fb68 100644 --- a/x-pack/plugins/searchprofiler/common/constants.ts +++ b/x-pack/plugins/searchprofiler/common/constants.ts @@ -9,6 +9,8 @@ import { LicenseType } from '@kbn/licensing-plugin/common/types'; const basicLicense: LicenseType = 'basic'; +export const API_BASE_PATH = '/api/searchprofiler'; + /** @internal */ export const PLUGIN = Object.freeze({ id: 'searchprofiler', diff --git a/x-pack/plugins/searchprofiler/public/application/components/profile_query_editor/profile_query_editor.tsx b/x-pack/plugins/searchprofiler/public/application/components/profile_query_editor/profile_query_editor.tsx index a88f1040caa3a..d80cbc4f0394d 100644 --- a/x-pack/plugins/searchprofiler/public/application/components/profile_query_editor/profile_query_editor.tsx +++ b/x-pack/plugins/searchprofiler/public/application/components/profile_query_editor/profile_query_editor.tsx @@ -16,11 +16,12 @@ import { EuiFlexGroup, EuiSpacer, EuiFlexItem, + EuiToolTip, } from '@elastic/eui'; import { decompressFromEncodedURIComponent } from 'lz-string'; -import { useRequestProfile } from '../../hooks'; +import { useHasIndices, useRequestProfile } from '../../hooks'; import { useAppContext } from '../../contexts/app_context'; import { useProfilerActionContext } from '../../contexts/profiler_context'; import { Editor, type EditorProps } from './editor'; @@ -46,6 +47,8 @@ export const ProfileQueryEditor = memo(() => { const { getLicenseStatus, notifications, location } = useAppContext(); + const { data: indicesData, isLoading, error: indicesDataError } = useHasIndices(); + const queryParams = new URLSearchParams(location.search); const indexName = queryParams.get('index'); const searchProfilerQueryURI = queryParams.get('load_from'); @@ -86,6 +89,32 @@ export const ProfileQueryEditor = memo(() => { ); const licenseEnabled = getLicenseStatus().valid; + const hasIndices = isLoading || indicesDataError ? false : indicesData?.hasIndices; + + const isDisabled = !licenseEnabled || !hasIndices; + const tooltipContent = !licenseEnabled + ? i18n.translate('xpack.searchProfiler.formProfileButton.noLicenseTooltip', { + defaultMessage: 'You need an active license to use Search Profiler', + }) + : i18n.translate('xpack.searchProfiler.formProfileButton.noIndicesTooltip', { + defaultMessage: 'You must have at least one index to use Search Profiler', + }); + + const button = ( + + + {i18n.translate('xpack.searchProfiler.formProfileButtonLabel', { + defaultMessage: 'Profile', + })} + + + ); + return ( {/* Form */} @@ -135,18 +164,13 @@ export const ProfileQueryEditor = memo(() => { - handleProfileClick()} - > - - {i18n.translate('xpack.searchProfiler.formProfileButtonLabel', { - defaultMessage: 'Profile', - })} - - + {isDisabled ? ( + + {button} + + ) : ( + button + )}
          diff --git a/x-pack/plugins/searchprofiler/public/application/hooks/index.ts b/x-pack/plugins/searchprofiler/public/application/hooks/index.ts index 9c1b3bfb8e9ed..156ad6bc8b163 100644 --- a/x-pack/plugins/searchprofiler/public/application/hooks/index.ts +++ b/x-pack/plugins/searchprofiler/public/application/hooks/index.ts @@ -6,3 +6,4 @@ */ export { useRequestProfile } from './use_request_profile'; +export { useHasIndices } from './use_has_indices'; diff --git a/x-pack/plugins/searchprofiler/public/application/hooks/use_has_indices.ts b/x-pack/plugins/searchprofiler/public/application/hooks/use_has_indices.ts new file mode 100644 index 0000000000000..43938d14a421f --- /dev/null +++ b/x-pack/plugins/searchprofiler/public/application/hooks/use_has_indices.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 { useRequest } from '@kbn/es-ui-shared-plugin/public'; +import { API_BASE_PATH } from '../../../common/constants'; +import { useAppContext } from '../contexts/app_context'; + +interface ReturnValue { + hasIndices: boolean; +} + +export const useHasIndices = () => { + const { http } = useAppContext(); + return useRequest(http, { + path: `${API_BASE_PATH}/has_indices`, + method: 'get', + }); +}; diff --git a/x-pack/plugins/searchprofiler/server/routes/profile.ts b/x-pack/plugins/searchprofiler/server/routes/profile.ts index 9e76bf0df96a1..7141a51c2c7f5 100644 --- a/x-pack/plugins/searchprofiler/server/routes/profile.ts +++ b/x-pack/plugins/searchprofiler/server/routes/profile.ts @@ -6,12 +6,13 @@ */ import { schema } from '@kbn/config-schema'; +import { API_BASE_PATH } from '../../common/constants'; import { RouteDependencies } from '../types'; export const register = ({ router, getLicenseStatus, log }: RouteDependencies) => { router.post( { - path: '/api/searchprofiler/profile', + path: `${API_BASE_PATH}/profile`, validate: { body: schema.object({ query: schema.object({}, { unknowns: 'allow' }), @@ -56,6 +57,48 @@ export const register = ({ router, getLicenseStatus, log }: RouteDependencies) = log.error(err); const { statusCode, body: errorBody } = err; + return response.customError({ + statusCode: statusCode || 500, + body: errorBody + ? { + message: errorBody.error?.reason, + attributes: errorBody, + } + : err, + }); + } + } + ); + router.get( + { + path: `${API_BASE_PATH}/has_indices`, + validate: false, + }, + async (ctx, _request, response) => { + const currentLicenseStatus = getLicenseStatus(); + if (!currentLicenseStatus.valid) { + return response.forbidden({ + body: { + message: currentLicenseStatus.message!, + }, + }); + } + + try { + const client = (await ctx.core).elasticsearch.client.asCurrentUser; + const resp = await client.cat.indices({ format: 'json' }); + + const hasIndices = resp.length > 0; + + return response.ok({ + body: { + hasIndices, + }, + }); + } catch (err) { + log.error(err); + const { statusCode, body: errorBody } = err; + return response.customError({ statusCode: statusCode || 500, body: errorBody diff --git a/x-pack/plugins/security/server/usage_collector/security_usage_collector.test.ts b/x-pack/plugins/security/server/usage_collector/security_usage_collector.test.ts index 19378bfd8488b..72b9e44da3f43 100644 --- a/x-pack/plugins/security/server/usage_collector/security_usage_collector.test.ts +++ b/x-pack/plugins/security/server/usage_collector/security_usage_collector.test.ts @@ -26,6 +26,7 @@ describe('Security UsageCollector', () => { allowAccessAgreement = true, allowAuditLogging = true, allowRbac = true, + allowFips = true, isLicenseAvailable, }: Partial & { isLicenseAvailable: boolean }) => { const license = licenseMock.create(); @@ -34,6 +35,7 @@ describe('Security UsageCollector', () => { allowAccessAgreement, allowAuditLogging, allowRbac, + allowFips, } as SecurityLicenseFeatures); return license; }; @@ -44,6 +46,7 @@ describe('Security UsageCollector', () => { accessAgreementEnabled: false, authProviderCount: 1, enabledAuthProviders: ['basic'], + fipsModeEnabled: false, loginSelectorEnabled: false, httpAuthSchemes: ['apikey', 'bearer'], sessionIdleTimeoutInMinutes: 4320, @@ -106,6 +109,7 @@ describe('Security UsageCollector', () => { accessAgreementEnabled: false, authProviderCount: 0, enabledAuthProviders: [], + fipsModeEnabled: false, loginSelectorEnabled: false, httpAuthSchemes: [], sessionIdleTimeoutInMinutes: 0, @@ -426,6 +430,55 @@ describe('Security UsageCollector', () => { }); }); + describe('fipsMode enabled', () => { + it('reports when fipsMode is enabled', async () => { + const config = createSecurityConfig( + ConfigSchema.validate({ + fipsMode: { + enabled: true, + }, + }) + ); + const usageCollection = usageCollectionPluginMock.createSetupContract(); + const license = createSecurityLicense({ + isLicenseAvailable: true, + allowFips: true, + }); + registerSecurityUsageCollector({ usageCollection, config, license }); + + const usage = await usageCollection + .getCollectorByType('security') + ?.fetch(collectorFetchContext); + + expect(usage).toEqual({ + ...DEFAULT_USAGE, + fipsModeEnabled: true, + }); + }); + + it('does not report fipsMode when the license does not permit it', async () => { + const config = createSecurityConfig( + ConfigSchema.validate({ + fipsMode: { + enabled: true, + }, + }) + ); + const usageCollection = usageCollectionPluginMock.createSetupContract(); + const license = createSecurityLicense({ isLicenseAvailable: true, allowFips: false }); + registerSecurityUsageCollector({ usageCollection, config, license }); + + const usage = await usageCollection + .getCollectorByType('security') + ?.fetch(collectorFetchContext); + + expect(usage).toEqual({ + ...DEFAULT_USAGE, + fipsModeEnabled: false, + }); + }); + }); + describe('http auth schemes', () => { it('reports customized http auth schemes', async () => { const config = createSecurityConfig( diff --git a/x-pack/plugins/security/server/usage_collector/security_usage_collector.ts b/x-pack/plugins/security/server/usage_collector/security_usage_collector.ts index fc761fb13a50e..575fea2bf32c4 100644 --- a/x-pack/plugins/security/server/usage_collector/security_usage_collector.ts +++ b/x-pack/plugins/security/server/usage_collector/security_usage_collector.ts @@ -16,6 +16,7 @@ interface Usage { accessAgreementEnabled: boolean; authProviderCount: number; enabledAuthProviders: string[]; + fipsModeEnabled: boolean; httpAuthSchemes: string[]; sessionIdleTimeoutInMinutes: number; sessionLifespanInMinutes: number; @@ -93,6 +94,12 @@ export function registerSecurityUsageCollector({ usageCollection, config, licens }, }, }, + fipsModeEnabled: { + type: 'boolean', + _meta: { + description: 'Indicates if Kibana is being run in FIPS mode.', + }, + }, httpAuthSchemes: { type: 'array', items: { @@ -139,7 +146,8 @@ export function registerSecurityUsageCollector({ usageCollection, config, licens }, }, fetch: () => { - const { allowRbac, allowAccessAgreement, allowAuditLogging } = license.getFeatures(); + const { allowRbac, allowAccessAgreement, allowAuditLogging, allowFips } = + license.getFeatures(); if (!allowRbac) { return { auditLoggingEnabled: false, @@ -147,6 +155,7 @@ export function registerSecurityUsageCollector({ usageCollection, config, licens accessAgreementEnabled: false, authProviderCount: 0, enabledAuthProviders: [], + fipsModeEnabled: false, httpAuthSchemes: [], sessionIdleTimeoutInMinutes: 0, sessionLifespanInMinutes: 0, @@ -171,6 +180,8 @@ export function registerSecurityUsageCollector({ usageCollection, config, licens WELL_KNOWN_AUTH_SCHEMES.includes(scheme.toLowerCase()) ); + const fipsModeEnabled = allowFips && config.fipsMode.enabled; + const sessionExpirations = config.session.getExpirationTimeouts(undefined); // use `undefined` to get global expiration values const sessionIdleTimeoutInMinutes = sessionExpirations.idleTimeout?.asMinutes() ?? 0; const sessionLifespanInMinutes = sessionExpirations.lifespan?.asMinutes() ?? 0; @@ -202,6 +213,7 @@ export function registerSecurityUsageCollector({ usageCollection, config, licens accessAgreementEnabled, authProviderCount, enabledAuthProviders, + fipsModeEnabled, httpAuthSchemes, sessionIdleTimeoutInMinutes, sessionLifespanInMinutes, diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/error_state/index.ts b/x-pack/plugins/security_solution/common/api/endpoint/workflow_insights/index.ts similarity index 76% rename from x-pack/plugins/enterprise_search/public/applications/shared/error_state/index.ts rename to x-pack/plugins/security_solution/common/api/endpoint/workflow_insights/index.ts index b8e1783dbe901..dd8538a5d03cc 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/error_state/index.ts +++ b/x-pack/plugins/security_solution/common/api/endpoint/workflow_insights/index.ts @@ -5,4 +5,5 @@ * 2.0. */ -export { ErrorStatePrompt, ErrorStateCallout } from './error_state_prompt'; +export * from './workflow_insights'; +export * from './workflow_insights.gen'; diff --git a/x-pack/plugins/security_solution/common/api/endpoint/workflow_insights/workflow_insights.gen.ts b/x-pack/plugins/security_solution/common/api/endpoint/workflow_insights/workflow_insights.gen.ts new file mode 100644 index 0000000000000..646a1e565e3a8 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/endpoint/workflow_insights/workflow_insights.gen.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. + */ + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Workflow Insights API + * version: 1 + */ + +import { z } from '@kbn/zod'; +import { ArrayFromString } from '@kbn/zod-helpers'; + +import { SuccessResponse } from '../model/schema/common.gen'; + +export type GetWorkflowInsightsRequestQuery = z.infer; +export const GetWorkflowInsightsRequestQuery = z.object({ + size: z.coerce.number().int().optional(), + from: z.coerce.number().int().optional(), + ids: ArrayFromString(z.string()).optional(), + categories: ArrayFromString(z.literal('endpoint')).optional(), + types: ArrayFromString(z.enum(['incompatible_antivirus', 'noisy_process_tree'])).optional(), + sourceTypes: ArrayFromString(z.literal('llm-connector')).optional(), + sourceIds: ArrayFromString(z.string()).optional(), + targetTypes: ArrayFromString(z.literal('endpoint')).optional(), + targetIds: ArrayFromString(z.string()).optional(), + actionTypes: ArrayFromString(z.enum(['refreshed', 'remediated', 'suppressed', 'dismissed'])), +}); +export type GetWorkflowInsightsRequestQueryInput = z.input; + +export type GetWorkflowInsightsResponse = z.infer; +export const GetWorkflowInsightsResponse = SuccessResponse; + +export type UpdateWorkflowInsightRequestParams = z.infer; +export const UpdateWorkflowInsightRequestParams = z.object({ + insightId: z.string().min(1), +}); +export type UpdateWorkflowInsightRequestParamsInput = z.input< + typeof UpdateWorkflowInsightRequestParams +>; + +export type UpdateWorkflowInsightRequestBody = z.infer; +export const UpdateWorkflowInsightRequestBody = z.object({ + '@timestamp': z.string().optional(), + message: z.string().optional(), + category: z.literal('endpoint').optional(), + type: z.enum(['incompatible_antivirus', 'noisy_process_tree']).optional(), + source: z + .object({ + type: z.literal('llm-connector').optional(), + id: z.string().optional(), + data_range_start: z.string().optional(), + data_range_end: z.string().optional(), + }) + .optional(), + target: z + .object({ + type: z.literal('endpoint').optional(), + ids: z.array(z.string()).optional(), + }) + .optional(), + action: z + .object({ + type: z.enum(['refreshed', 'remediated', 'suppressed', 'dismissed']).optional(), + timestamp: z.string().optional(), + }) + .optional(), + value: z.string().optional(), + remediation: z + .object({ + exception_list_items: z + .array( + z.object({ + list_id: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + entries: z.array(z.unknown()).optional(), + tags: z.array(z.string()).optional(), + os_types: z.array(z.string()).optional(), + }) + ) + .optional(), + }) + .optional(), + metadata: z + .object({ + notes: z.object({}).catchall(z.string()).optional(), + message_variables: z.array(z.string()).optional(), + }) + .optional(), +}); +export type UpdateWorkflowInsightRequestBodyInput = z.input< + typeof UpdateWorkflowInsightRequestBody +>; + +export type UpdateWorkflowInsightResponse = z.infer; +export const UpdateWorkflowInsightResponse = SuccessResponse; diff --git a/x-pack/plugins/security_solution/common/api/endpoint/workflow_insights/workflow_insights.schema.yaml b/x-pack/plugins/security_solution/common/api/endpoint/workflow_insights/workflow_insights.schema.yaml new file mode 100644 index 0000000000000..00de6de8502e5 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/endpoint/workflow_insights/workflow_insights.schema.yaml @@ -0,0 +1,218 @@ +openapi: 3.0.0 +info: + title: Workflow Insights API + version: '1' +paths: + /internal/api/endpoint/workflow_insights: + get: + summary: Retrieve workflow insights + operationId: GetWorkflowInsights + x-codegen-enabled: true + x-labels: [ess, serverless] + x-internal: true + parameters: + - name: size + in: query + required: false + schema: + type: integer + - name: from + in: query + required: false + schema: + type: integer + - name: ids + in: query + required: false + schema: + type: array + items: + type: string + - name: categories + in: query + required: false + schema: + type: array + items: + type: string + enum: + - endpoint + - name: types + in: query + required: false + schema: + type: array + items: + type: string + enum: + - incompatible_antivirus + - noisy_process_tree + - name: sourceTypes + in: query + required: false + schema: + type: array + items: + type: string + enum: + - llm-connector + - name: sourceIds + in: query + required: false + schema: + type: array + items: + type: string + - name: targetTypes + in: query + required: false + schema: + type: array + items: + type: string + enum: + - endpoint + - name: targetIds + in: query + required: false + schema: + type: array + items: + type: string + - name: actionTypes + in: query + required: true + schema: + type: array + items: + type: string + enum: + - refreshed + - remediated + - suppressed + - dismissed + + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse' + + /internal/api/endpoint/workflow_insights/{insightId}: + put: + summary: Update a workflow insight + operationId: UpdateWorkflowInsight + x-codegen-enabled: true + x-labels: [ess, serverless] + x-internal: true + parameters: + - name: insightId + in: path + required: true + schema: + type: string + minLength: 1 + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + '@timestamp': + type: string + message: + type: string + category: + type: string + enum: + - endpoint + type: + type: string + enum: + - incompatible_antivirus + - noisy_process_tree + source: + type: object + properties: + type: + type: string + enum: + - llm-connector + id: + type: string + data_range_start: + type: string + data_range_end: + type: string + target: + type: object + properties: + type: + type: string + enum: + - endpoint + ids: + type: array + items: + type: string + action: + type: object + properties: + type: + type: string + enum: + - refreshed + - remediated + - suppressed + - dismissed + timestamp: + type: string + value: + type: string + remediation: + type: object + properties: + exception_list_items: + type: array + items: + type: object + properties: + list_id: + type: string + name: + type: string + description: + type: string + entries: + type: array + items: {} + tags: + type: array + items: + type: string + os_types: + type: array + items: + type: string + metadata: + type: object + properties: + notes: + type: object + additionalProperties: + type: string + message_variables: + type: array + items: + type: string + + responses: + '200': + description: Updated successfully + content: + application/json: + schema: + $ref: '../model/schema/common.schema.yaml#/components/schemas/SuccessResponse' diff --git a/x-pack/plugins/security_solution/common/api/endpoint/workflow_insights/workflow_insights.test.ts b/x-pack/plugins/security_solution/common/api/endpoint/workflow_insights/workflow_insights.test.ts new file mode 100644 index 0000000000000..280c2abcff069 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/endpoint/workflow_insights/workflow_insights.test.ts @@ -0,0 +1,293 @@ +/* + * 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 { schema } from '@kbn/config-schema'; + +import { + GetWorkflowInsightsRequestSchema, + UpdateWorkflowInsightRequestSchema, +} from './workflow_insights'; + +describe('Workflow Insights', () => { + describe('GetWorkflowInsightsRequestSchema', () => { + const validateQuery = (query: Record) => { + return schema.object(GetWorkflowInsightsRequestSchema).validate(query); + }; + + it('should validate successfully with valid parameters', () => { + const validQuery = { + query: { + size: 10, + from: 0, + ids: ['valid-id-1', 'valid-id-2'], + categories: ['endpoint'], + types: ['incompatible_antivirus'], + sourceTypes: ['llm-connector'], + sourceIds: ['source-1', 'source-2'], + targetTypes: ['endpoint'], + targetIds: ['target-1', 'target-2'], + actionTypes: ['refreshed', 'remediated'], + }, + }; + + expect(() => validateQuery(validQuery)).not.toThrow(); + }); + + it('should throw an error for invalid types', () => { + const invalidQuery = { + query: { + size: 'not-a-number', // Invalid size + actionTypes: ['invalid-action'], // Invalid action type + }, + }; + + expect(() => validateQuery(invalidQuery)).toThrowErrorMatchingInlineSnapshot( + '"[query.size]: expected value of type [number] but got [string]"' + ); + }); + + it('should throw an error if ids contain empty strings', () => { + const invalidQuery = { + query: { + ids: ['valid-id', ''], + actionTypes: ['refreshed'], + }, + }; + + expect(() => validateQuery(invalidQuery)).toThrowErrorMatchingInlineSnapshot( + '"[query.ids.1]: value has length [0] but it must have a minimum length of [1]."' + ); + }); + + it('should throw an error if sourceIds contain empty strings', () => { + const invalidQuery = { + query: { + sourceIds: ['valid-source', ' '], + actionTypes: ['refreshed'], + }, + }; + + expect(() => validateQuery(invalidQuery)).toThrowErrorMatchingInlineSnapshot( + '"[query.sourceIds.1]: sourceId cannot be an empty string"' + ); + }); + + it('should validate successfully when optional fields are omitted', () => { + const validQuery = { + query: {}, + }; + + expect(() => validateQuery(validQuery)).not.toThrow(); + }); + + it('should throw an error for unsupported categories or types', () => { + const invalidQuery = { + query: { + categories: ['unsupported-category'], + types: ['unsupported-type'], + actionTypes: ['refreshed'], + }, + }; + + expect(() => validateQuery(invalidQuery)).toThrowErrorMatchingInlineSnapshot( + '"[query.categories.0]: expected value to equal [endpoint]"' + ); + }); + }); + + describe('UpdateWorkflowInsightRequestSchema', () => { + const validateRequest = (request: Record) => { + return schema.object(UpdateWorkflowInsightRequestSchema).validate(request); + }; + + it('should validate successfully with valid parameters', () => { + const validRequest = { + params: { + insightId: 'valid-insight-id', + }, + body: { + '@timestamp': '2024-11-29T00:00:00Z', + message: 'Valid message', + category: 'endpoint', + type: 'incompatible_antivirus', + source: { + type: 'llm-connector', + id: 'source-id', + data_range_start: '2024-11-01T00:00:00Z', + data_range_end: '2024-11-30T00:00:00Z', + }, + target: { + type: 'endpoint', + ids: ['target-id-1', 'target-id-2'], + }, + action: { + type: 'refreshed', + timestamp: '2024-11-29T00:00:00Z', + }, + value: 'Valid value', + remediation: { + exception_list_items: [ + { + list_id: 'list-id', + name: 'Exception 1', + description: 'Description', + entries: [{ key: 'value' }], + tags: ['tag1'], + os_types: ['windows'], + }, + ], + }, + metadata: { + notes: { note1: 'Value 1' }, + message_variables: ['var1', 'var2'], + }, + }, + }; + + expect(() => validateRequest(validRequest)).not.toThrow(); + }); + + it('should throw an error if insightId is missing', () => { + const invalidRequest = { + params: {}, + body: {}, + }; + + expect(() => validateRequest(invalidRequest)).toThrowErrorMatchingInlineSnapshot( + '"[params.insightId]: expected value of type [string] but got [undefined]"' + ); + }); + + it('should throw an error if insightId is an empty string', () => { + const invalidRequest = { + params: { + insightId: '', + }, + body: {}, + }; + + expect(() => validateRequest(invalidRequest)).toThrowErrorMatchingInlineSnapshot( + '"[params.insightId]: value has length [0] but it must have a minimum length of [1]."' + ); + }); + + it('should throw an error if category is invalid', () => { + const invalidRequest = { + params: { + insightId: 'valid-insight-id', + }, + body: { + category: 'invalid-category', // Invalid category + type: 'incompatible_antivirus', + action: { type: 'refreshed' }, + }, + }; + + expect(() => validateRequest(invalidRequest)).toThrowErrorMatchingInlineSnapshot( + '"[body.category]: expected value to equal [endpoint]"' + ); + }); + + it('should throw an error if type is invalid', () => { + const invalidRequest = { + params: { + insightId: 'valid-insight-id', + }, + body: { + type: 'invalid-type', // Invalid type + action: { type: 'refreshed' }, + }, + }; + + expect(() => validateRequest(invalidRequest)).toThrowErrorMatchingInlineSnapshot(` + "[body.type]: types that failed validation: + - [body.type.0]: expected value to equal [incompatible_antivirus] + - [body.type.1]: expected value to equal [noisy_process_tree]" + `); + }); + + it('should throw an error if target ids contain empty strings', () => { + const invalidRequest = { + params: { + insightId: 'valid-insight-id', + }, + body: { + target: { + type: 'endpoint', + ids: ['valid-id', ''], // Invalid empty string in ids + }, + action: { type: 'refreshed' }, + }, + }; + + expect(() => validateRequest(invalidRequest)).toThrowErrorMatchingInlineSnapshot( + '"[body.target.ids.1]: value has length [0] but it must have a minimum length of [1]."' + ); + }); + + it('should validate successfully when optional fields are omitted', () => { + const validRequest = { + params: { + insightId: 'valid-insight-id', + }, + body: { + action: { type: 'refreshed' }, + }, + }; + + expect(() => validateRequest(validRequest)).not.toThrow(); + }); + + it('should throw an error for unsupported action types', () => { + const invalidRequest = { + params: { + insightId: 'valid-insight-id', + }, + body: { + action: { + type: 'unsupported-action', // Invalid action type + }, + }, + }; + + expect(() => validateRequest(invalidRequest)).toThrowErrorMatchingInlineSnapshot(` + "[body.action.type]: types that failed validation: + - [body.action.type.0]: expected value to equal [refreshed] + - [body.action.type.1]: expected value to equal [remediated] + - [body.action.type.2]: expected value to equal [suppressed] + - [body.action.type.3]: expected value to equal [dismissed]" + `); + }); + + it('should throw an error if remediation list items contain invalid data', () => { + const invalidRequest = { + params: { + insightId: 'valid-insight-id', + }, + body: { + remediation: { + exception_list_items: [ + { + list_id: 'list-id', + name: 'Exception 1', + description: 'Description', + entries: 'invalid-entries', // Invalid entries + tags: ['tag1'], + os_types: ['windows'], + }, + ], + }, + action: { type: 'refreshed' }, + }, + }; + + expect(() => validateRequest(invalidRequest)).toThrowErrorMatchingInlineSnapshot( + '"[body.remediation.exception_list_items.0.entries]: could not parse array value from json input"' + ); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/common/api/endpoint/workflow_insights/workflow_insights.ts b/x-pack/plugins/security_solution/common/api/endpoint/workflow_insights/workflow_insights.ts new file mode 100644 index 0000000000000..982dce0d6fbac --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/endpoint/workflow_insights/workflow_insights.ts @@ -0,0 +1,133 @@ +/* + * 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 { schema, type TypeOf } from '@kbn/config-schema'; + +const arrayWithNonEmptyString = (field: string) => + schema.arrayOf( + schema.string({ + minLength: 1, + validate: (id) => { + if (id.trim() === '') { + return `${field} cannot be an empty string`; + } + }, + }) + ); + +export const UpdateWorkflowInsightRequestSchema = { + params: schema.object({ + insightId: schema.string({ + minLength: 1, + validate: (id) => { + if (id.trim() === '') { + return 'insightId cannot be an empty string'; + } + }, + }), + }), + body: schema.object({ + '@timestamp': schema.maybe(schema.string()), + message: schema.maybe(schema.string()), + category: schema.maybe(schema.oneOf([schema.literal('endpoint')])), + type: schema.maybe( + schema.oneOf([schema.literal('incompatible_antivirus'), schema.literal('noisy_process_tree')]) + ), + source: schema.maybe( + schema.object({ + type: schema.maybe(schema.oneOf([schema.literal('llm-connector')])), + id: schema.maybe(schema.string()), + data_range_start: schema.maybe(schema.string()), + data_range_end: schema.maybe(schema.string()), + }) + ), + target: schema.maybe( + schema.object({ + type: schema.maybe(schema.oneOf([schema.literal('endpoint')])), + ids: schema.maybe(arrayWithNonEmptyString('target.id')), + }) + ), + action: schema.maybe( + schema.object({ + type: schema.maybe( + schema.oneOf([ + schema.literal('refreshed'), + schema.literal('remediated'), + schema.literal('suppressed'), + schema.literal('dismissed'), + ]) + ), + timestamp: schema.maybe(schema.string()), + }) + ), + value: schema.maybe(schema.string()), + remediation: schema.maybe( + schema.object({ + exception_list_items: schema.maybe( + schema.arrayOf( + schema.object({ + list_id: schema.maybe(schema.string()), + name: schema.maybe(schema.string()), + description: schema.maybe(schema.string()), + entries: schema.maybe(schema.arrayOf(schema.any())), + tags: schema.maybe(arrayWithNonEmptyString('tag')), + os_types: schema.maybe(arrayWithNonEmptyString('os_type')), + }) + ) + ), + }) + ), + metadata: schema.maybe( + schema.object({ + notes: schema.maybe(schema.recordOf(schema.string(), schema.string())), + message_variables: schema.maybe(arrayWithNonEmptyString('message_variable')), + }) + ), + }), +}; + +export const GetWorkflowInsightsRequestSchema = { + query: schema.object({ + size: schema.maybe(schema.number()), + from: schema.maybe(schema.number()), + ids: schema.maybe(arrayWithNonEmptyString('ids')), + categories: schema.maybe(schema.arrayOf(schema.oneOf([schema.literal('endpoint')]))), + types: schema.maybe( + schema.arrayOf( + schema.oneOf([ + schema.literal('incompatible_antivirus'), + schema.literal('noisy_process_tree'), + ]) + ) + ), + sourceTypes: schema.maybe(schema.arrayOf(schema.oneOf([schema.literal('llm-connector')]))), + sourceIds: schema.maybe(arrayWithNonEmptyString('sourceId')), + targetTypes: schema.maybe(schema.arrayOf(schema.oneOf([schema.literal('endpoint')]))), + targetIds: schema.maybe(arrayWithNonEmptyString('targetId')), + actionTypes: schema.maybe( + schema.arrayOf( + schema.oneOf([ + schema.literal('refreshed'), + schema.literal('remediated'), + schema.literal('suppressed'), + schema.literal('dismissed'), + ]) + ) + ), + }), +}; + +export type GetWorkflowInsightsRequestQueryParams = TypeOf< + typeof GetWorkflowInsightsRequestSchema.query +>; + +export type UpdateWorkflowInsightsRequestParams = TypeOf< + typeof UpdateWorkflowInsightRequestSchema.params +>; +export type UpdateWorkflowInsightsRequestBody = TypeOf< + typeof UpdateWorkflowInsightRequestSchema.body +>; diff --git a/x-pack/plugins/security_solution/common/api/quickstart_client.gen.ts b/x-pack/plugins/security_solution/common/api/quickstart_client.gen.ts index d86a04f343a89..994fb70deaa25 100644 --- a/x-pack/plugins/security_solution/common/api/quickstart_client.gen.ts +++ b/x-pack/plugins/security_solution/common/api/quickstart_client.gen.ts @@ -205,6 +205,13 @@ import type { GetEndpointSuggestionsRequestBodyInput, GetEndpointSuggestionsResponse, } from './endpoint/suggestions/get_suggestions.gen'; +import type { + GetWorkflowInsightsRequestQueryInput, + GetWorkflowInsightsResponse, + UpdateWorkflowInsightRequestParamsInput, + UpdateWorkflowInsightRequestBodyInput, + UpdateWorkflowInsightResponse, +} from './endpoint/workflow_insights/workflow_insights.gen'; import type { BulkUpsertAssetCriticalityRecordsRequestBodyInput, BulkUpsertAssetCriticalityRecordsResponse, @@ -352,6 +359,7 @@ import type { CreateRuleMigrationRequestBodyInput, CreateRuleMigrationResponse, GetAllStatsRuleMigrationResponse, + GetRuleMigrationRequestQueryInput, GetRuleMigrationRequestParamsInput, GetRuleMigrationResponse, GetRuleMigrationResourcesRequestQueryInput, @@ -359,6 +367,8 @@ import type { GetRuleMigrationResourcesResponse, GetRuleMigrationStatsRequestParamsInput, GetRuleMigrationStatsResponse, + GetRuleMigrationTranslationStatsRequestParamsInput, + GetRuleMigrationTranslationStatsResponse, InstallMigrationRulesRequestParamsInput, InstallMigrationRulesRequestBodyInput, InstallMigrationRulesResponse, @@ -1415,6 +1425,8 @@ finalize it. [ELASTIC_HTTP_VERSION_HEADER]: '1', }, method: 'GET', + + query: props.query, }) .catch(catchAxiosErrorFormatAndThrow); } @@ -1453,6 +1465,24 @@ finalize it. }) .catch(catchAxiosErrorFormatAndThrow); } + /** + * Retrieves the translation stats of a SIEM rules migration using the migration id provided + */ + async getRuleMigrationTranslationStats(props: GetRuleMigrationTranslationStatsProps) { + this.log.info(`${new Date().toISOString()} Calling API GetRuleMigrationTranslationStats`); + return this.kbnClient + .request({ + path: replaceParams( + '/internal/siem_migrations/rules/{migration_id}/translation_stats', + props.params + ), + headers: { + [ELASTIC_HTTP_VERSION_HEADER]: '1', + }, + method: 'GET', + }) + .catch(catchAxiosErrorFormatAndThrow); + } /** * Get the details of an existing saved Timeline or Timeline template. */ @@ -1487,6 +1517,20 @@ finalize it. }) .catch(catchAxiosErrorFormatAndThrow); } + async getWorkflowInsights(props: GetWorkflowInsightsProps) { + this.log.info(`${new Date().toISOString()} Calling API GetWorkflowInsights`); + return this.kbnClient + .request({ + path: '/internal/api/endpoint/workflow_insights', + headers: { + [ELASTIC_HTTP_VERSION_HEADER]: '1', + }, + method: 'GET', + + query: props.query, + }) + .catch(catchAxiosErrorFormatAndThrow); + } /** * Import detection rules from an `.ndjson` file, including actions and exception lists. The request must include: - The `Content-Type: multipart/form-data` HTTP header. @@ -2139,6 +2183,19 @@ detection engine rules. }) .catch(catchAxiosErrorFormatAndThrow); } + async updateWorkflowInsight(props: UpdateWorkflowInsightProps) { + this.log.info(`${new Date().toISOString()} Calling API UpdateWorkflowInsight`); + return this.kbnClient + .request({ + path: replaceParams('/internal/api/endpoint/workflow_insights/{insightId}', props.params), + headers: { + [ELASTIC_HTTP_VERSION_HEADER]: '1', + }, + method: 'PUT', + body: props.body, + }) + .catch(catchAxiosErrorFormatAndThrow); + } async uploadAssetCriticalityRecords(props: UploadAssetCriticalityRecordsProps) { this.log.info(`${new Date().toISOString()} Calling API UploadAssetCriticalityRecords`); return this.kbnClient @@ -2334,6 +2391,7 @@ export interface GetRuleExecutionResultsProps { params: GetRuleExecutionResultsRequestParamsInput; } export interface GetRuleMigrationProps { + query: GetRuleMigrationRequestQueryInput; params: GetRuleMigrationRequestParamsInput; } export interface GetRuleMigrationResourcesProps { @@ -2343,12 +2401,18 @@ export interface GetRuleMigrationResourcesProps { export interface GetRuleMigrationStatsProps { params: GetRuleMigrationStatsRequestParamsInput; } +export interface GetRuleMigrationTranslationStatsProps { + params: GetRuleMigrationTranslationStatsRequestParamsInput; +} export interface GetTimelineProps { query: GetTimelineRequestQueryInput; } export interface GetTimelinesProps { query: GetTimelinesRequestQueryInput; } +export interface GetWorkflowInsightsProps { + query: GetWorkflowInsightsRequestQueryInput; +} export interface ImportRulesProps { query: ImportRulesRequestQueryInput; attachment: FormData; @@ -2451,6 +2515,10 @@ export interface UpdateRuleProps { export interface UpdateRuleMigrationProps { body: UpdateRuleMigrationRequestBodyInput; } +export interface UpdateWorkflowInsightProps { + params: UpdateWorkflowInsightRequestParamsInput; + body: UpdateWorkflowInsightRequestBodyInput; +} export interface UploadAssetCriticalityRecordsProps { attachment: FormData; } diff --git a/x-pack/plugins/security_solution/common/endpoint/constants.ts b/x-pack/plugins/security_solution/common/endpoint/constants.ts index b53c7ae761547..6aae156e9ac11 100644 --- a/x-pack/plugins/security_solution/common/endpoint/constants.ts +++ b/x-pack/plugins/security_solution/common/endpoint/constants.ts @@ -129,3 +129,11 @@ export const ENDPOINT_PACKAGE_POLICIES_STATS_STRATEGY = 'endpointPackagePolicies /** The list of OS types that support. Value usually found in ECS `host.os.type` */ export const SUPPORTED_HOST_OS_TYPE = Object.freeze(['macos', 'windows', 'linux'] as const); export type SupportedHostOsType = (typeof SUPPORTED_HOST_OS_TYPE)[number]; + +/** + * Workflow Insights + */ + +export const BASE_WORKFLOW_INSIGHTS_ROUTE = `/workflow_insights`; +export const WORKFLOW_INSIGHTS_ROUTE = `${BASE_INTERNAL_ENDPOINT_ROUTE}${BASE_WORKFLOW_INSIGHTS_ROUTE}`; +export const WORKFLOW_INSIGHTS_UPDATE_ROUTE = `${WORKFLOW_INSIGHTS_ROUTE}/{insightId}`; diff --git a/x-pack/plugins/security_solution/common/endpoint/types/workflow_insights.ts b/x-pack/plugins/security_solution/common/endpoint/types/workflow_insights.ts index 11cbc1bfd7cd8..3212193c981cb 100644 --- a/x-pack/plugins/security_solution/common/endpoint/types/workflow_insights.ts +++ b/x-pack/plugins/security_solution/common/endpoint/types/workflow_insights.ts @@ -74,5 +74,5 @@ export interface SearchParams { sourceIds?: string[]; targetTypes?: TargetType[]; targetIds?: string[]; - actionTypes: ActionType[]; + actionTypes?: ActionType[]; } diff --git a/x-pack/plugins/security_solution/common/experimental_features.ts b/x-pack/plugins/security_solution/common/experimental_features.ts index 3697359365619..095324840fc5c 100644 --- a/x-pack/plugins/security_solution/common/experimental_features.ts +++ b/x-pack/plugins/security_solution/common/experimental_features.ts @@ -12,6 +12,17 @@ export type ExperimentalFeatures = { [K in keyof typeof allowedExperimentalValue * This object is then used to validate and parse the value entered. */ export const allowedExperimentalValues = Object.freeze({ + /* + * Enables experimental feature flag for eql sequence alert suppression. + * + * Ticket: https://github.com/elastic/security-team/issues/9608 + * Owners: https://github.com/orgs/elastic/teams/security-detection-engine + * Added: on October 1st, 2024 in https://github.com/elastic/kibana/pull/189725 + * Turned: on (TBD) + * Expires: on (TBD) + */ + alertSuppressionForSequenceEqlRuleEnabled: true, + // FIXME:PT delete? excludePoliciesInFilterEnabled: false, diff --git a/x-pack/plugins/security_solution/common/siem_migrations/constants.ts b/x-pack/plugins/security_solution/common/siem_migrations/constants.ts index 565091e39a8db..789947150a67e 100644 --- a/x-pack/plugins/security_solution/common/siem_migrations/constants.ts +++ b/x-pack/plugins/security_solution/common/siem_migrations/constants.ts @@ -15,6 +15,8 @@ export const SIEM_RULE_MIGRATION_PATH = `${SIEM_RULE_MIGRATIONS_PATH}/{migration export const SIEM_RULE_MIGRATION_START_PATH = `${SIEM_RULE_MIGRATION_PATH}/start` as const; export const SIEM_RULE_MIGRATION_RETRY_PATH = `${SIEM_RULE_MIGRATION_PATH}/retry` as const; export const SIEM_RULE_MIGRATION_STATS_PATH = `${SIEM_RULE_MIGRATION_PATH}/stats` as const; +export const SIEM_RULE_MIGRATION_TRANSLATION_STATS_PATH = + `${SIEM_RULE_MIGRATION_PATH}/translation_stats` as const; export const SIEM_RULE_MIGRATION_STOP_PATH = `${SIEM_RULE_MIGRATION_PATH}/stop` as const; export const SIEM_RULE_MIGRATION_INSTALL_PATH = `${SIEM_RULE_MIGRATION_PATH}/install` as const; export const SIEM_RULE_MIGRATION_INSTALL_TRANSLATED_PATH = @@ -44,3 +46,11 @@ export enum SiemMigrationRuleTranslationResult { export const DEFAULT_TRANSLATION_RISK_SCORE = 21; export const DEFAULT_TRANSLATION_SEVERITY: Severity = 'low'; + +export const DEFAULT_TRANSLATION_FIELDS = { + risk_score: DEFAULT_TRANSLATION_RISK_SCORE, + severity: DEFAULT_TRANSLATION_SEVERITY, + from: 'now-360s', + to: 'now', + interval: '5m', +} as const; diff --git a/x-pack/plugins/security_solution/common/siem_migrations/model/api/rules/rule_migration.gen.ts b/x-pack/plugins/security_solution/common/siem_migrations/model/api/rules/rule_migration.gen.ts index 77a0fc94408f9..aa69f3b3c27f0 100644 --- a/x-pack/plugins/security_solution/common/siem_migrations/model/api/rules/rule_migration.gen.ts +++ b/x-pack/plugins/security_solution/common/siem_migrations/model/api/rules/rule_migration.gen.ts @@ -24,6 +24,7 @@ import { RuleMigrationComments, RuleMigrationTaskStats, RuleMigration, + RuleMigrationTranslationStats, RuleMigrationResourceData, RuleMigrationResourceType, RuleMigrationResource, @@ -44,6 +45,13 @@ export const CreateRuleMigrationResponse = z.object({ export type GetAllStatsRuleMigrationResponse = z.infer; export const GetAllStatsRuleMigrationResponse = z.array(RuleMigrationTaskStats); +export type GetRuleMigrationRequestQuery = z.infer; +export const GetRuleMigrationRequestQuery = z.object({ + page: z.coerce.number().optional(), + per_page: z.coerce.number().optional(), + search_term: z.string().optional(), +}); +export type GetRuleMigrationRequestQueryInput = z.input; export type GetRuleMigrationRequestParams = z.infer; export const GetRuleMigrationRequestParams = z.object({ @@ -52,7 +60,13 @@ export const GetRuleMigrationRequestParams = z.object({ export type GetRuleMigrationRequestParamsInput = z.input; export type GetRuleMigrationResponse = z.infer; -export const GetRuleMigrationResponse = z.array(RuleMigration); +export const GetRuleMigrationResponse = z.object({ + /** + * The total number of rules in migration. + */ + total: z.number(), + data: z.array(RuleMigration), +}); export type GetRuleMigrationResourcesRequestQuery = z.infer< typeof GetRuleMigrationResourcesRequestQuery >; @@ -88,6 +102,21 @@ export type GetRuleMigrationStatsRequestParamsInput = z.input< export type GetRuleMigrationStatsResponse = z.infer; export const GetRuleMigrationStatsResponse = RuleMigrationTaskStats; +export type GetRuleMigrationTranslationStatsRequestParams = z.infer< + typeof GetRuleMigrationTranslationStatsRequestParams +>; +export const GetRuleMigrationTranslationStatsRequestParams = z.object({ + migration_id: NonEmptyString, +}); +export type GetRuleMigrationTranslationStatsRequestParamsInput = z.input< + typeof GetRuleMigrationTranslationStatsRequestParams +>; + +export type GetRuleMigrationTranslationStatsResponse = z.infer< + typeof GetRuleMigrationTranslationStatsResponse +>; +export const GetRuleMigrationTranslationStatsResponse = RuleMigrationTranslationStats; + export type InstallMigrationRulesRequestParams = z.infer; export const InstallMigrationRulesRequestParams = z.object({ migration_id: NonEmptyString, diff --git a/x-pack/plugins/security_solution/common/siem_migrations/model/api/rules/rule_migration.schema.yaml b/x-pack/plugins/security_solution/common/siem_migrations/model/api/rules/rule_migration.schema.yaml index f57a809bb204e..a062b75d41699 100644 --- a/x-pack/plugins/security_solution/common/siem_migrations/model/api/rules/rule_migration.schema.yaml +++ b/x-pack/plugins/security_solution/common/siem_migrations/model/api/rules/rule_migration.schema.yaml @@ -185,15 +185,40 @@ paths: schema: description: The migration id to start $ref: '../../common.schema.yaml#/components/schemas/NonEmptyString' + - name: page + in: query + required: false + schema: + type: number + - name: per_page + in: query + required: false + schema: + type: number + - name: search_term + in: query + required: false + schema: + type: string + responses: 200: description: Indicates rule migration have been retrieved correctly. content: application/json: schema: - type: array - items: - $ref: '../../rule_migration.schema.yaml#/components/schemas/RuleMigration' + type: object + required: + - total + - data + properties: + total: + type: number + description: The total number of rules in migration. + data: + type: array + items: + $ref: '../../rule_migration.schema.yaml#/components/schemas/RuleMigration' 204: description: Indicates the migration id was not found. @@ -256,7 +281,7 @@ paths: in: path required: true schema: - description: The migration id to start + description: The migration id to fetch stats for $ref: '../../common.schema.yaml#/components/schemas/NonEmptyString' responses: 200: @@ -268,6 +293,31 @@ paths: 204: description: Indicates the migration id was not found. + /internal/siem_migrations/rules/{migration_id}/translation_stats: + get: + summary: Gets a rule migration translation stats + operationId: GetRuleMigrationTranslationStats + x-codegen-enabled: true + description: Retrieves the translation stats of a SIEM rules migration using the migration id provided + tags: + - SIEM Rule Migrations + parameters: + - name: migration_id + in: path + required: true + schema: + description: The migration id to fetch translation stats for + $ref: '../../common.schema.yaml#/components/schemas/NonEmptyString' + responses: + 200: + description: Indicates the migration stats has been retrieved correctly. + content: + application/json: + schema: + $ref: '../../rule_migration.schema.yaml#/components/schemas/RuleMigrationTranslationStats' + 204: + description: Indicates the migration id was not found. + /internal/siem_migrations/rules/{migration_id}/stop: put: summary: Stops an existing rule migration diff --git a/x-pack/plugins/security_solution/common/siem_migrations/model/rule_migration.gen.ts b/x-pack/plugins/security_solution/common/siem_migrations/model/rule_migration.gen.ts index 82e3c5549fd86..61706077d9549 100644 --- a/x-pack/plugins/security_solution/common/siem_migrations/model/rule_migration.gen.ts +++ b/x-pack/plugins/security_solution/common/siem_migrations/model/rule_migration.gen.ts @@ -242,6 +242,38 @@ export const RuleMigrationTaskStats = z.object({ last_updated_at: z.string(), }); +/** + * The rule migration translation stats object. + */ +export type RuleMigrationTranslationStats = z.infer; +export const RuleMigrationTranslationStats = z.object({ + /** + * The migration id + */ + id: NonEmptyString, + /** + * The rules migration translation stats. + */ + rules: z.object({ + /** + * The total number of rules to migrate. + */ + total: z.number().int(), + /** + * The number of rules that matched Elastic prebuilt rules. + */ + prebuilt: z.number().int(), + /** + * The number of rules that did not match Elastic prebuilt rules and will be installed as custom rules. + */ + custom: z.number().int(), + /** + * The number of rules that can be installed. + */ + installable: z.number().int(), + }), +}); + /** * The type of the rule migration resource. */ diff --git a/x-pack/plugins/security_solution/common/siem_migrations/model/rule_migration.schema.yaml b/x-pack/plugins/security_solution/common/siem_migrations/model/rule_migration.schema.yaml index 82892b4fa0722..fdcbb7b04515a 100644 --- a/x-pack/plugins/security_solution/common/siem_migrations/model/rule_migration.schema.yaml +++ b/x-pack/plugins/security_solution/common/siem_migrations/model/rule_migration.schema.yaml @@ -197,7 +197,39 @@ components: - running - stopped - finished - + + RuleMigrationTranslationStats: + type: object + description: The rule migration translation stats object. + required: + - id + - rules + properties: + id: + description: The migration id + $ref: './common.schema.yaml#/components/schemas/NonEmptyString' + rules: + type: object + description: The rules migration translation stats. + required: + - total + - prebuilt + - custom + - installable + properties: + total: + type: integer + description: The total number of rules to migrate. + prebuilt: + type: integer + description: The number of rules that matched Elastic prebuilt rules. + custom: + type: integer + description: The number of rules that did not match Elastic prebuilt rules and will be installed as custom rules. + installable: + type: integer + description: The number of rules that can be installed. + RuleMigrationTranslationResult: type: string description: The rule translation result. diff --git a/x-pack/plugins/security_solution/docs/siem_migration/img/agent_graph.png b/x-pack/plugins/security_solution/docs/siem_migration/img/agent_graph.png index a4039ef4a7446..ecccb602e2016 100644 Binary files a/x-pack/plugins/security_solution/docs/siem_migration/img/agent_graph.png and b/x-pack/plugins/security_solution/docs/siem_migration/img/agent_graph.png differ diff --git a/x-pack/plugins/security_solution/public/assistant/content/quick_prompts/index.tsx b/x-pack/plugins/security_solution/public/assistant/content/quick_prompts/index.tsx index adb952d661214..1bf997eb4de2f 100644 --- a/x-pack/plugins/security_solution/public/assistant/content/quick_prompts/index.tsx +++ b/x-pack/plugins/security_solution/public/assistant/content/quick_prompts/index.tsx @@ -12,7 +12,6 @@ import { import { APP_UI_ID } from '../../../../common'; import * as i18n from './translations'; import { - KNOWLEDGE_BASE_CATEGORY, PROMPT_CONTEXT_ALERT_CATEGORY, PROMPT_CONTEXT_DETECTION_RULES_CATEGORY, PROMPT_CONTEXT_EVENT_CATEGORY, @@ -34,16 +33,6 @@ export const BASE_SECURITY_QUICK_PROMPTS: PromptResponse[] = [ promptType: PromptTypeEnum.quick, consumer: APP_UI_ID, }, - { - name: i18n.ESQL_QUERY_GENERATION_TITLE, - content: i18n.ESQL_QUERY_GENERATION_PROMPT, - color: '#9170B8', - categories: [KNOWLEDGE_BASE_CATEGORY], - isDefault: true, - id: i18n.ESQL_QUERY_GENERATION_TITLE, - promptType: PromptTypeEnum.quick, - consumer: APP_UI_ID, - }, { name: i18n.RULE_CREATION_TITLE, content: i18n.RULE_CREATION_PROMPT, diff --git a/x-pack/plugins/security_solution/public/assistant/content/quick_prompts/translations.ts b/x-pack/plugins/security_solution/public/assistant/content/quick_prompts/translations.ts index 41b9e7ddb197b..1d122b0169be2 100644 --- a/x-pack/plugins/security_solution/public/assistant/content/quick_prompts/translations.ts +++ b/x-pack/plugins/security_solution/public/assistant/content/quick_prompts/translations.ts @@ -22,21 +22,6 @@ export const ALERT_SUMMARIZATION_PROMPT = i18n.translate( } ); -export const ESQL_QUERY_GENERATION_TITLE = i18n.translate( - 'xpack.securitySolution.assistant.quickPrompts.esqlQueryGenerationTitle', - { - defaultMessage: 'ES|QL Query Generation', - } -); - -export const ESQL_QUERY_GENERATION_PROMPT = i18n.translate( - 'xpack.securitySolution.assistant.quickPrompts.esqlQueryGenerationPrompt', - { - defaultMessage: - "As an expert user of Elastic Security, please generate an accurate and valid ESQL query to detect the use case below. Your response should be formatted to be able to use immediately in an Elastic Security timeline or detection rule. Take your time with the answer, check your knowledge really well on all the functions I am asking for. For ES|QL answers specifically, you should only ever answer with what's available in your private knowledge. I cannot afford for queries to be inaccurate. Assume I am using the Elastic Common Schema and Elastic Agent.\n\nEnsure the answers are formatted in a way which is easily copyable as a separate code block in markdown.", - } -); - export const RULE_CREATION_TITLE = i18n.translate( 'xpack.securitySolution.assistant.quickPrompts.ruleCreationTitle', { diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/alerts_tab/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/alerts_tab/index.tsx index 97bec48eaaae6..1976d97c9c8d5 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/alerts_tab/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/results/attack_discovery_panel/tabs/alerts_tab/index.tsx @@ -6,9 +6,11 @@ */ import type { AttackDiscovery, Replacements } from '@kbn/elastic-assistant-common'; -import { AlertConsumers } from '@kbn/rule-registry-plugin/common/technical_rule_data_field_names'; +import { SECURITY_SOLUTION_RULE_TYPE_IDS } from '@kbn/securitysolution-rules'; +import type { AlertsTableStateProps } from '@kbn/triggers-actions-ui-plugin/public/application/sections/alerts_table/alerts_table_state'; import React, { useMemo } from 'react'; +import { AlertConsumers } from '@kbn/rule-data-utils'; import { ALERTS_TABLE_REGISTRY_CONFIG_IDS } from '../../../../../../../common/constants'; import { useKibana } from '../../../../../../common/lib/kibana'; @@ -39,12 +41,13 @@ const AlertsTabComponent: React.FC = ({ attackDiscovery, replacements }) const configId = ALERTS_TABLE_REGISTRY_CONFIG_IDS.CASE; // show the same row-actions as in the case view - const alertStateProps = useMemo( + const alertStateProps: AlertsTableStateProps = useMemo( () => ({ alertsTableConfigurationRegistry: triggersActionsUi.alertsTableConfigurationRegistry, configurationId: configId, id: `attack-discovery-alerts-${attackDiscovery.id}`, - featureIds: [AlertConsumers.SIEM], + ruleTypeIds: SECURITY_SOLUTION_RULE_TYPE_IDS, + consumers: [AlertConsumers.SIEM], query: alertIdsQuery, showAlertStatusWithFlapping: false, }), diff --git a/x-pack/plugins/security_solution/public/cases/components/use_insert_timeline/index.test.tsx b/x-pack/plugins/security_solution/public/cases/components/use_insert_timeline/index.test.tsx index f49f6fe0e28ad..9f67c91d5eac9 100644 --- a/x-pack/plugins/security_solution/public/cases/components/use_insert_timeline/index.test.tsx +++ b/x-pack/plugins/security_solution/public/cases/components/use_insert_timeline/index.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { renderHook } from '@testing-library/react-hooks'; +import { renderHook } from '@testing-library/react'; import { mockTimelineModel } from '../../../common/mock/timeline_results'; import { useFormatUrl } from '../../../common/components/link_to'; diff --git a/x-pack/plugins/security_solution/public/cloud_security_posture/components/csp_details/alerts_findings_details_table.tsx b/x-pack/plugins/security_solution/public/cloud_security_posture/components/csp_details/alerts_findings_details_table.tsx index 6567fb41a93f4..2b1a2002667c2 100644 --- a/x-pack/plugins/security_solution/public/cloud_security_posture/components/csp_details/alerts_findings_details_table.tsx +++ b/x-pack/plugins/security_solution/public/cloud_security_posture/components/csp_details/alerts_findings_details_table.tsx @@ -19,6 +19,8 @@ import { METRIC_TYPE } from '@kbn/analytics'; import { buildEntityAlertsQuery } from '@kbn/cloud-security-posture-common/utils/helpers'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; import { TableId } from '@kbn/securitysolution-data-table'; +import type { AlertsByStatus } from '../../../overview/components/detection_response/alerts_by_status/types'; +import { DETECTION_RESPONSE_ALERTS_BY_STATUS_ID } from '../../../overview/components/detection_response/alerts_by_status/types'; import { OPEN_IN_ALERTS_TITLE_HOSTNAME, OPEN_IN_ALERTS_TITLE_STATUS, @@ -34,6 +36,7 @@ import { getSeverityColor } from '../../../detections/components/alerts_kpis/sev import { SeverityBadge } from '../../../common/components/severity_badge'; import { ALERT_PREVIEW_BANNER } from '../../../flyout/document_details/preview/constants'; import { FILTER_OPEN, FILTER_ACKNOWLEDGED } from '../../../../common/types'; +import { useNonClosedAlerts } from '../../hooks/use_non_closed_alerts'; type AlertSeverity = 'low' | 'medium' | 'high' | 'critical'; @@ -68,6 +71,8 @@ export const AlertsDetailsTable = memo( ); }, []); + const [currentFilter, setCurrentFilter] = useState(''); + const [pageIndex, setPageIndex] = useState(0); const [pageSize, setPageSize] = useState(10); @@ -89,12 +94,46 @@ export const AlertsDetailsTable = memo( const { to, from } = useGlobalTime(); const { signalIndexName } = useSignalIndex(); - const { data } = useQueryAlerts({ - query: buildEntityAlertsQuery(field, to, from, value, 500), + const { data, setQuery } = useQueryAlerts({ + query: buildEntityAlertsQuery(field, to, from, value, 500, ''), queryName: ALERTS_QUERY_NAMES.BY_RULE_BY_STATUS, indexName: signalIndexName, }); + const { filteredAlertsData: alertsData } = useNonClosedAlerts({ + field, + value, + to, + from, + queryId: `${DETECTION_RESPONSE_ALERTS_BY_STATUS_ID}`, + }); + + const severityMap = new Map(); + (Object.keys(alertsData || {}) as AlertsByStatus[]).forEach((status) => { + if (alertsData?.[status]?.severities) { + alertsData?.[status]?.severities.forEach((severity) => { + const currentSeverity = severityMap.get(severity.key) || 0; + severityMap.set(severity.key, currentSeverity + severity.value); + }); + } + }); + + const alertStats = Array.from(severityMap, ([key, count]) => ({ + key: capitalize(key), + count, + color: getSeverityColor(key), + filter: () => { + setCurrentFilter(key); + setQuery(buildEntityAlertsQuery(field, to, from, value, 500, key)); + }, + isCurrentFilter: currentFilter === key, + reset: (event: React.MouseEvent) => { + setCurrentFilter(''); + setQuery(buildEntityAlertsQuery(field, to, from, value, 500, '')); + event?.stopPropagation(); + }, + })); + const alertDataResults = (data?.hits?.hits as AlertsDetailsFields[])?.map( (item: AlertsDetailsFields) => { return { @@ -108,19 +147,6 @@ export const AlertsDetailsTable = memo( } ); - const severitiesMap = alertDataResults?.map((item) => item.severity) || []; - - const alertStats = Object.entries( - severitiesMap.reduce((acc: Record, item) => { - acc[item] = (acc[item] || 0) + 1; - return acc; - }, {}) - ).map(([key, count]) => ({ - key: capitalize(key), - count, - color: getSeverityColor(key), - })); - const { pageOfItems, totalItemCount } = alertsPagination(alertDataResults || []); const pagination = { diff --git a/x-pack/plugins/security_solution/public/cloud_security_posture/components/csp_details/misconfiguration_findings_details_table.tsx b/x-pack/plugins/security_solution/public/cloud_security_posture/components/csp_details/misconfiguration_findings_details_table.tsx index 00430c2b87262..61c89e196a183 100644 --- a/x-pack/plugins/security_solution/public/cloud_security_posture/components/csp_details/misconfiguration_findings_details_table.tsx +++ b/x-pack/plugins/security_solution/public/cloud_security_posture/components/csp_details/misconfiguration_findings_details_table.tsx @@ -10,8 +10,12 @@ import type { Criteria, EuiBasicTableColumn } from '@elastic/eui'; import { EuiSpacer, EuiPanel, EuiText, EuiBasicTable, EuiIcon } from '@elastic/eui'; import { useMisconfigurationFindings } from '@kbn/cloud-security-posture/src/hooks/use_misconfiguration_findings'; import { i18n } from '@kbn/i18n'; -import type { CspFinding, CspFindingResult } from '@kbn/cloud-security-posture-common'; -import { buildEntityFlyoutPreviewQuery } from '@kbn/cloud-security-posture-common'; +import { + MISCONFIGURATION_STATUS, + type CspFinding, + type CspFindingResult, + buildMisconfigurationEntityFlyoutPreviewQuery, +} from '@kbn/cloud-security-posture-common'; import { euiThemeVars } from '@kbn/ui-theme'; import { DistributionBar } from '@kbn/security-solution-distribution-bar'; import type { CspBenchmarkRuleMetadata } from '@kbn/cloud-security-posture-common/schema/rules/latest'; @@ -25,11 +29,17 @@ import { import { METRIC_TYPE } from '@kbn/analytics'; import { useGetNavigationUrlParams } from '@kbn/cloud-security-posture/src/hooks/use_get_navigation_url_params'; import { SecurityPageName } from '@kbn/deeplinks-security'; +import { useHasMisconfigurations } from '@kbn/cloud-security-posture/src/hooks/use_has_misconfigurations'; import { SecuritySolutionLinkAnchor } from '../../../common/components/links'; type MisconfigurationFindingDetailFields = Pick; -const getFindingsStats = (passedFindingsStats: number, failedFindingsStats: number) => { +const getFindingsStats = ( + passedFindingsStats: number, + failedFindingsStats: number, + filterFunction: (filter: string) => void, + currentFilter: string +) => { if (passedFindingsStats === 0 && failedFindingsStats === 0) return []; return [ { @@ -41,6 +51,14 @@ const getFindingsStats = (passedFindingsStats: number, failedFindingsStats: numb ), count: passedFindingsStats, color: euiThemeVars.euiColorSuccess, + filter: () => { + filterFunction(MISCONFIGURATION_STATUS.PASSED); + }, + isCurrentFilter: currentFilter === MISCONFIGURATION_STATUS.PASSED, + reset: (event: React.MouseEvent) => { + filterFunction(''); + event?.stopPropagation(); + }, }, { key: i18n.translate( @@ -51,6 +69,14 @@ const getFindingsStats = (passedFindingsStats: number, failedFindingsStats: numb ), count: failedFindingsStats, color: euiThemeVars.euiColorVis9, + filter: () => { + filterFunction(MISCONFIGURATION_STATUS.FAILED); + }, + isCurrentFilter: currentFilter === MISCONFIGURATION_STATUS.FAILED, + reset: (event: React.MouseEvent) => { + filterFunction(''); + event?.stopPropagation(); + }, }, ]; }; @@ -67,15 +93,16 @@ export const MisconfigurationFindingsDetailsTable = memo( ); }, []); + const [currentFilter, setCurrentFilter] = useState(''); + const { data } = useMisconfigurationFindings({ - query: buildEntityFlyoutPreviewQuery(field, value), + query: buildMisconfigurationEntityFlyoutPreviewQuery(field, value, currentFilter), sort: [], enabled: true, pageSize: 1, }); - const passedFindings = data?.count.passed || 0; - const failedFindings = data?.count.failed || 0; + const { passedFindings, failedFindings } = useHasMisconfigurations(field, value); const [pageIndex, setPageIndex] = useState(0); const [pageSize, setPageSize] = useState(10); @@ -129,6 +156,13 @@ export const MisconfigurationFindingsDetailsTable = memo( const linkWidth = 40; const resultWidth = 74; + const misconfgurationStats = getFindingsStats( + passedFindings, + failedFindings, + setCurrentFilter, + currentFilter + ); + const columns: Array> = [ { field: 'rule', @@ -202,7 +236,7 @@ export const MisconfigurationFindingsDetailsTable = memo( - + (''); + const { data } = useVulnerabilitiesFindings({ - query: buildEntityFlyoutPreviewQuery('host.name', value), + query: buildVulnerabilityEntityFlyoutPreviewQuery('host.name', value, currentFilter), sort: [], enabled: true, pageSize: 1, }); - const { CRITICAL = 0, HIGH = 0, MEDIUM = 0, LOW = 0, NONE = 0 } = data?.count || {}; + const { counts } = useHasVulnerabilities('host.name', value); + + const { critical = 0, high = 0, medium = 0, low = 0, none = 0 } = counts || {}; const [pageIndex, setPageIndex] = useState(0); const [pageSize, setPageSize] = useState(10); @@ -120,6 +127,18 @@ export const VulnerabilitiesFindingsDetailsTable = memo(({ value }: { value: str ); }; + const vulnerabilityStats = getVulnerabilityStats( + { + critical, + high, + medium, + low, + none, + }, + setCurrentFilter, + currentFilter + ); + const columns: Array> = [ { field: 'vulnerability', @@ -220,15 +239,7 @@ export const VulnerabilitiesFindingsDetailsTable = memo(({ value }: { value: str - + { // @ts-ignore const tourIds = [SecurityStepId.alertsCases]; describe.each(tourIds)('%s', (tourId: SecurityStepId) => { - it('if guidedOnboardingApi?.isGuideStepActive$ is false, isTourShown should be false', () => { + it('if guidedOnboardingApi?.isGuideStepActive$ is false, isTourShown should be false', async () => { (useKibana as jest.Mock).mockReturnValue({ services: { guidedOnboarding: { @@ -57,66 +58,80 @@ describe('useTourContext', () => { const { result } = renderHook(() => useTourContext(), { wrapper: TourContextProvider, }); - expect(result.current.isTourShown(tourId)).toBe(false); + await waitFor(() => { + expect(result.current.isTourShown(tourId)).toBe(false); + }); }); - it('if guidedOnboardingApi?.isGuideStepActive$ is true, isTourShown should be true', () => { + it('if guidedOnboardingApi?.isGuideStepActive$ is true, isTourShown should be true', async () => { const { result } = renderHook(() => useTourContext(), { wrapper: TourContextProvider, }); - expect(result.current.isTourShown(tourId)).toBe(true); + await waitFor(() => { + expect(result.current.isTourShown(tourId)).toBe(true); + }); }); it('endTourStep calls completeGuideStep with correct tourId', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => useTourContext(), { - wrapper: TourContextProvider, - }); - await waitForNextUpdate(); + const { result } = renderHook(() => useTourContext(), { + wrapper: TourContextProvider, + }); + act(() => { result.current.endTourStep(tourId); + }); + await waitFor(() => { expect(mockCompleteGuideStep).toHaveBeenCalledWith(siemGuideId, tourId); }); }); - it('activeStep is initially 1', () => { + it('activeStep is initially 1', async () => { const { result } = renderHook(() => useTourContext(), { wrapper: TourContextProvider, }); - expect(result.current.activeStep).toBe(1); + await waitFor(() => { + expect(result.current.activeStep).toBe(1); + }); }); it('incrementStep properly increments for each tourId, and if attempted to increment beyond length of tour config steps resets activeStep to 1', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => useTourContext(), { - wrapper: TourContextProvider, - }); - await waitForNextUpdate(); - const stepCount = securityTourConfig[tourId].length; + const { result } = renderHook(() => useTourContext(), { + wrapper: TourContextProvider, + }); + const stepCount = securityTourConfig[tourId].length; + act(() => { for (let i = 0; i < stepCount - 1; i++) { result.current.incrementStep(tourId); } - const lastStep = stepCount ? stepCount : 1; + }); + const lastStep = stepCount ? stepCount : 1; + await waitFor(() => { expect(result.current.activeStep).toBe(lastStep); + }); + act(() => { result.current.incrementStep(tourId); + }); + await waitFor(() => { expect(result.current.activeStep).toBe(1); }); }); it('setStep sets activeStep to step number argument', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => useTourContext(), { - wrapper: TourContextProvider, - }); - await waitForNextUpdate(); + const { result } = renderHook(() => useTourContext(), { + wrapper: TourContextProvider, + }); + act(() => { result.current.setStep(tourId, 6); + }); + await waitFor(() => { expect(result.current.activeStep).toBe(6); }); }); it('does not setStep sets activeStep to non-existing step number', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => useTourContext(), { - wrapper: TourContextProvider, - }); - await waitForNextUpdate(); - // @ts-expect-error testing invalid step - result.current.setStep(tourId, 88); + const { result } = renderHook(() => useTourContext(), { + wrapper: TourContextProvider, + }); + + act(() => { + result.current.setStep(tourId, 88 as AlertsCasesTourSteps); + }); + await waitFor(() => { expect(result.current.activeStep).toBe(1); }); }); diff --git a/x-pack/plugins/security_solution/public/common/components/guided_onboarding_tour/tour.tsx b/x-pack/plugins/security_solution/public/common/components/guided_onboarding_tour/tour.tsx index a4fca35acf56b..f622439dccd35 100644 --- a/x-pack/plugins/security_solution/public/common/components/guided_onboarding_tour/tour.tsx +++ b/x-pack/plugins/security_solution/public/common/components/guided_onboarding_tour/tour.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import type { ReactChild } from 'react'; +import type { FC, ReactNode } from 'react'; import React, { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react'; import useObservable from 'react-use/lib/useObservable'; @@ -39,7 +39,7 @@ const initialState: TourContextValue = { const TourContext = createContext(initialState); -export const RealTourContextProvider = ({ children }: { children: ReactChild }) => { +export const RealTourContextProvider: FC<{ children: ReactNode }> = ({ children }) => { const { guidedOnboarding } = useKibana().services; const [hidden, setHidden] = useState(false); @@ -131,7 +131,7 @@ export const RealTourContextProvider = ({ children }: { children: ReactChild }) return {children}; }; -export const TourContextProvider = ({ children }: { children: ReactChild }) => { +export const TourContextProvider: FC<{ children: ReactNode }> = ({ children }) => { const { pathname } = useLocation(); const ContextProvider = useMemo( diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/use_breadcrumbs_nav.test.ts b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/use_breadcrumbs_nav.test.ts index c20d1f4623fa7..e052d47b676da 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/use_breadcrumbs_nav.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/navigation/breadcrumbs/use_breadcrumbs_nav.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { renderHook } from '@testing-library/react-hooks'; +import { renderHook } from '@testing-library/react'; import type { ChromeBreadcrumb } from '@kbn/core/public'; import type { GetSecuritySolutionUrl } from '../../link_to'; import { SecurityPageName } from '../../../../../common/constants'; diff --git a/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/use_security_solution_navigation.test.tsx b/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/use_security_solution_navigation.test.tsx index 0aed8dc19663b..c20b845f62ce8 100644 --- a/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/use_security_solution_navigation.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/navigation/use_security_solution_navigation/use_security_solution_navigation.test.tsx @@ -6,8 +6,7 @@ */ import React from 'react'; -import { render } from '@testing-library/react'; -import { renderHook } from '@testing-library/react-hooks'; +import { render, renderHook } from '@testing-library/react'; import { of } from 'rxjs'; import { useSecuritySolutionNavigation } from './use_security_solution_navigation'; diff --git a/x-pack/plugins/security_solution/public/common/components/page/use_refetch_by_session.test.tsx b/x-pack/plugins/security_solution/public/common/components/page/use_refetch_by_session.test.tsx index da5610d8c9ab2..1e7e66de24b80 100644 --- a/x-pack/plugins/security_solution/public/common/components/page/use_refetch_by_session.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/page/use_refetch_by_session.test.tsx @@ -4,17 +4,14 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import type { MutableRefObject } from 'react'; import React from 'react'; -import type { RenderHookResult } from '@testing-library/react-hooks'; -import { renderHook } from '@testing-library/react-hooks'; +import type { RenderHookResult } from '@testing-library/react'; +import { renderHook } from '@testing-library/react'; import { TestProviders } from '../../mock'; import { useKibana } from '../../lib/kibana'; import { InputsModelId } from '../../store/inputs/constants'; import { useRefetchByRestartingSession } from './use_refetch_by_session'; import { inputsActions } from '../../store/actions'; -import type { Refetch } from '../../store/inputs/model'; -import type { ISessionService } from '@kbn/data-plugin/public'; const wrapper = ({ children }: { children: React.ReactNode }) => ( {children} @@ -45,13 +42,8 @@ jest.mock('../../store/actions', () => { describe(`useRefetchByRestartingSession`, () => { let res: RenderHookResult< - { - children: React.ReactNode; - }, - { - session: MutableRefObject; - refetchByRestartingSession: Refetch; - } + ReturnType, + Parameters[0] >; const mockSessionStart = jest.fn().mockReturnValue('mockSessionId'); const mockSession = { diff --git a/x-pack/plugins/security_solution/public/common/icons/siem_migrations.tsx b/x-pack/plugins/security_solution/public/common/icons/siem_migrations.tsx new file mode 100644 index 0000000000000..072b0acf9d30a --- /dev/null +++ b/x-pack/plugins/security_solution/public/common/icons/siem_migrations.tsx @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import type { SVGProps } from 'react'; +import React from 'react'; +export const SiemMigrationsIcon: React.FC> = ({ ...props }) => ( + + + + + + + + + + + + + + +); diff --git a/x-pack/plugins/security_solution/public/dashboards/containers/use_fetch_security_dashboards.test.ts b/x-pack/plugins/security_solution/public/dashboards/containers/use_fetch_security_dashboards.test.ts index ced91801747c8..77dce4f64d57a 100644 --- a/x-pack/plugins/security_solution/public/dashboards/containers/use_fetch_security_dashboards.test.ts +++ b/x-pack/plugins/security_solution/public/dashboards/containers/use_fetch_security_dashboards.test.ts @@ -5,7 +5,7 @@ * 2.0. */ import type { HttpStart } from '@kbn/core/public'; -import { renderHook, act } from '@testing-library/react-hooks'; +import { waitFor, renderHook } from '@testing-library/react'; import { DashboardContextProvider } from '../context/dashboard_context'; import { useFetchSecurityDashboards } from './use_fetch_security_dashboards'; import { getTagsByName } from '../../common/containers/tags/api'; @@ -26,14 +26,6 @@ const renderUseFetchSecurityDashboards = () => wrapper: DashboardContextProvider, }); -const asyncRenderUseFetchSecurityDashboards = async () => { - const renderedHook = renderUseFetchSecurityDashboards(); - await act(async () => { - await renderedHook.waitForNextUpdate(); - }); - return renderedHook; -}; - describe('useFetchSecurityDashboards', () => { beforeAll(() => { useKibana().services.http = mockHttp as unknown as HttpStart; @@ -49,34 +41,43 @@ describe('useFetchSecurityDashboards', () => { }); it('should fetch Security Solution tags', async () => { - await asyncRenderUseFetchSecurityDashboards(); - expect(getTagsByName).toHaveBeenCalledTimes(1); + renderUseFetchSecurityDashboards(); + + await waitFor(() => { + expect(getTagsByName).toHaveBeenCalledTimes(1); + }); }); it('should fetch Security Solution dashboards', async () => { - await asyncRenderUseFetchSecurityDashboards(); + renderUseFetchSecurityDashboards(); - expect(getDashboardsByTagIds).toHaveBeenCalledTimes(1); - expect(getDashboardsByTagIds).toHaveBeenCalledWith( - { - http: mockHttp, - tagIds: [MOCK_TAG_ID], - }, - expect.any(Object) - ); + await waitFor(() => { + expect(getDashboardsByTagIds).toHaveBeenCalledTimes(1); + expect(getDashboardsByTagIds).toHaveBeenCalledWith( + { + http: mockHttp, + tagIds: [MOCK_TAG_ID], + }, + expect.any(Object) + ); + }); }); it('should fetch Security Solution dashboards with abort signal', async () => { - await asyncRenderUseFetchSecurityDashboards(); + renderUseFetchSecurityDashboards(); - expect(getDashboardsByTagIds).toHaveBeenCalledTimes(1); - expect((getDashboardsByTagIds as jest.Mock).mock.calls[0][1]).toEqual(mockAbortSignal); + await waitFor(() => { + expect(getDashboardsByTagIds).toHaveBeenCalledTimes(1); + expect((getDashboardsByTagIds as jest.Mock).mock.calls[0][1]).toEqual(mockAbortSignal); + }); }); it('should return Security Solution dashboards', async () => { - const { result } = await asyncRenderUseFetchSecurityDashboards(); + const { result } = renderUseFetchSecurityDashboards(); - expect(result.current.isLoading).toEqual(false); - expect(result.current.dashboards).toEqual(DEFAULT_DASHBOARDS_RESPONSE); + await waitFor(() => { + expect(result.current.isLoading).toEqual(false); + expect(result.current.dashboards).toEqual(DEFAULT_DASHBOARDS_RESPONSE); + }); }); }); diff --git a/x-pack/plugins/security_solution/public/dashboards/containers/use_fetch_security_tags.test.ts b/x-pack/plugins/security_solution/public/dashboards/containers/use_fetch_security_tags.test.ts index e3da086796794..15dfd3c7c9366 100644 --- a/x-pack/plugins/security_solution/public/dashboards/containers/use_fetch_security_tags.test.ts +++ b/x-pack/plugins/security_solution/public/dashboards/containers/use_fetch_security_tags.test.ts @@ -6,7 +6,7 @@ */ import type { HttpStart } from '@kbn/core/public'; -import { act, renderHook } from '@testing-library/react-hooks'; +import { waitFor, renderHook } from '@testing-library/react'; import { INTERNAL_TAGS_URL, SECURITY_TAG_DESCRIPTION, @@ -28,14 +28,6 @@ const mockAbortSignal = {} as unknown as AbortSignal; const mockCreateTag = jest.fn(); const renderUseCreateSecurityDashboardLink = () => renderHook(() => useFetchSecurityTags(), {}); -const asyncRenderUseCreateSecurityDashboardLink = async () => { - const renderedHook = renderUseCreateSecurityDashboardLink(); - await act(async () => { - await renderedHook.waitForNextUpdate(); - }); - return renderedHook; -}; - describe('useFetchSecurityTags', () => { beforeAll(() => { useKibana().services.http = { get: mockGet } as unknown as HttpStart; @@ -54,25 +46,31 @@ describe('useFetchSecurityTags', () => { test('should fetch Security Solution tags', async () => { mockGet.mockResolvedValue([]); - await asyncRenderUseCreateSecurityDashboardLink(); - expect(mockGet).toHaveBeenCalledWith( - INTERNAL_TAGS_URL, - expect.objectContaining({ - query: { name: SECURITY_TAG_NAME }, - signal: mockAbortSignal, - }) - ); + renderUseCreateSecurityDashboardLink(); + + await waitFor(() => { + expect(mockGet).toHaveBeenCalledWith( + INTERNAL_TAGS_URL, + expect.objectContaining({ + query: { name: SECURITY_TAG_NAME }, + signal: mockAbortSignal, + }) + ); + }); }); test('should create a Security Solution tag if no Security Solution tags were found', async () => { mockGet.mockResolvedValue([]); - await asyncRenderUseCreateSecurityDashboardLink(); - expect(mockCreateTag).toHaveBeenCalledWith({ - name: SECURITY_TAG_NAME, - description: SECURITY_TAG_DESCRIPTION, - color: '#FFFFFF', + renderUseCreateSecurityDashboardLink(); + + await waitFor(() => { + expect(mockCreateTag).toHaveBeenCalledWith({ + name: SECURITY_TAG_NAME, + description: SECURITY_TAG_DESCRIPTION, + color: '#FFFFFF', + }); }); }); @@ -84,9 +82,11 @@ describe('useFetchSecurityTags', () => { type: 'tag', ...tag.attributes, })); - const { result } = await asyncRenderUseCreateSecurityDashboardLink(); + const { result } = renderUseCreateSecurityDashboardLink(); - expect(mockCreateTag).not.toHaveBeenCalled(); - expect(result.current.tags).toEqual(expect.objectContaining(expected)); + await waitFor(() => { + expect(mockCreateTag).not.toHaveBeenCalled(); + expect(result.current.tags).toEqual(expect.objectContaining(expected)); + }); }); }); diff --git a/x-pack/plugins/security_solution/public/dashboards/hooks/use_create_security_dashboard_link.test.tsx b/x-pack/plugins/security_solution/public/dashboards/hooks/use_create_security_dashboard_link.test.tsx index 36aa70bc5678c..749f1626e257b 100644 --- a/x-pack/plugins/security_solution/public/dashboards/hooks/use_create_security_dashboard_link.test.tsx +++ b/x-pack/plugins/security_solution/public/dashboards/hooks/use_create_security_dashboard_link.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { renderHook, act } from '@testing-library/react-hooks'; +import { act, waitFor, renderHook } from '@testing-library/react'; import { useKibana } from '../../common/lib/kibana'; import { useCreateSecurityDashboardLink } from './use_create_security_dashboard_link'; import { DashboardContextProvider } from '../context/dashboard_context'; @@ -34,15 +34,6 @@ const renderUseCreateSecurityDashboardLink = () => ), }); -const asyncRenderUseCreateSecurityDashboard = async () => { - const renderedHook = renderUseCreateSecurityDashboardLink(); - - await act(async () => { - await renderedHook.waitForNextUpdate(); - }); - return renderedHook; -}; - describe('useCreateSecurityDashboardLink', () => { beforeAll(() => { (useKibana as jest.Mock).mockReturnValue({ @@ -61,40 +52,51 @@ describe('useCreateSecurityDashboardLink', () => { describe('useSecurityDashboardsTableItems', () => { it('should fetch Security Solution tags when renders', async () => { - await asyncRenderUseCreateSecurityDashboard(); + renderUseCreateSecurityDashboardLink(); - expect(getTagsByName).toHaveBeenCalledTimes(1); + await waitFor(() => { + expect(getTagsByName).toHaveBeenCalledTimes(1); + }); }); it('should return a memoized value when rerendered', async () => { - const { result, rerender } = await asyncRenderUseCreateSecurityDashboard(); + const { result, rerender } = renderUseCreateSecurityDashboardLink(); const result1 = result.current; act(() => rerender()); const result2 = result.current; - expect(result1).toEqual(result2); + + await waitFor(() => { + expect(result1).toEqual(result2); + }); }); it('should not re-request tag id when re-rendered', async () => { - const { rerender } = await asyncRenderUseCreateSecurityDashboard(); + const { rerender } = renderUseCreateSecurityDashboardLink(); + + await waitFor(() => { + expect(getTagsByName).toHaveBeenCalledTimes(1); + }); - expect(getTagsByName).toHaveBeenCalledTimes(1); act(() => rerender()); - expect(getTagsByName).toHaveBeenCalledTimes(1); + + await waitFor(() => { + expect(getTagsByName).toHaveBeenCalledTimes(1); + }); }); it('should return isLoading while requesting', async () => { - const { result, waitForNextUpdate } = renderUseCreateSecurityDashboardLink(); - - expect(result.current.isLoading).toEqual(true); - expect(result.current.url).toEqual('/app/security/dashboards/create'); + const { result } = renderUseCreateSecurityDashboardLink(); - await act(async () => { - await waitForNextUpdate(); + await waitFor(() => { + expect(result.current.isLoading).toEqual(true); + expect(result.current.url).toEqual('/app/security/dashboards/create'); }); - expect(result.current.isLoading).toEqual(false); - expect(result.current.url).toEqual('/app/security/dashboards/create'); + await waitFor(() => { + expect(result.current.isLoading).toEqual(false); + expect(result.current.url).toEqual('/app/security/dashboards/create'); + }); }); }); }); diff --git a/x-pack/plugins/security_solution/public/dashboards/hooks/use_dashboard_renderer.test.tsx b/x-pack/plugins/security_solution/public/dashboards/hooks/use_dashboard_renderer.test.tsx index ef4737a985b24..f73e126a78c5b 100644 --- a/x-pack/plugins/security_solution/public/dashboards/hooks/use_dashboard_renderer.test.tsx +++ b/x-pack/plugins/security_solution/public/dashboards/hooks/use_dashboard_renderer.test.tsx @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { renderHook, act } from '@testing-library/react-hooks'; + +import { renderHook, act } from '@testing-library/react'; import type { DashboardApi } from '@kbn/dashboard-plugin/public'; import { useDashboardRenderer } from './use_dashboard_renderer'; @@ -14,11 +15,11 @@ jest.mock('../../common/lib/kibana'); const mockDashboardContainer = {} as DashboardApi; describe('useDashboardRenderer', () => { - it('should set dashboard container correctly when dashboard is loaded', async () => { + it('should set dashboard container correctly when dashboard is loaded', () => { const { result } = renderHook(() => useDashboardRenderer()); - await act(async () => { - await result.current.handleDashboardLoaded(mockDashboardContainer); + act(() => { + result.current.handleDashboardLoaded(mockDashboardContainer); }); expect(result.current.dashboardContainer).toEqual(mockDashboardContainer); diff --git a/x-pack/plugins/security_solution/public/dashboards/hooks/use_dashboard_view_prompt_state.test.tsx b/x-pack/plugins/security_solution/public/dashboards/hooks/use_dashboard_view_prompt_state.test.tsx index 6fd7fb3e2de10..eabd904b38fdf 100644 --- a/x-pack/plugins/security_solution/public/dashboards/hooks/use_dashboard_view_prompt_state.test.tsx +++ b/x-pack/plugins/security_solution/public/dashboards/hooks/use_dashboard_view_prompt_state.test.tsx @@ -4,8 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import type { EuiEmptyPromptProps } from '@elastic/eui'; -import { renderHook } from '@testing-library/react-hooks'; +import { renderHook } from '@testing-library/react'; import { DashboardViewPromptState, useDashboardViewPromptState, @@ -13,18 +12,14 @@ import { describe('useDashboardViewPromptState', () => { it('returns empty state', () => { - const { result } = renderHook< - DashboardViewPromptState | null, - Partial | null - >(() => useDashboardViewPromptState(null)); + const { result } = renderHook(() => useDashboardViewPromptState(null)); expect(result.current).toBeNull(); }); it('returns NoReadPermission state', () => { - const { result } = renderHook< - DashboardViewPromptState | null, - Partial | null - >(() => useDashboardViewPromptState(DashboardViewPromptState.NoReadPermission)); + const { result } = renderHook(() => + useDashboardViewPromptState(DashboardViewPromptState.NoReadPermission) + ); expect(result.current).toMatchInlineSnapshot(` Object { "body":

          diff --git a/x-pack/plugins/security_solution/public/dashboards/hooks/use_security_dashboards_table.test.tsx b/x-pack/plugins/security_solution/public/dashboards/hooks/use_security_dashboards_table.test.tsx index 1026c69da8d8e..b7d76849a7303 100644 --- a/x-pack/plugins/security_solution/public/dashboards/hooks/use_security_dashboards_table.test.tsx +++ b/x-pack/plugins/security_solution/public/dashboards/hooks/use_security_dashboards_table.test.tsx @@ -6,8 +6,7 @@ */ import React from 'react'; -import { renderHook, act } from '@testing-library/react-hooks'; -import { render } from '@testing-library/react'; +import { render, waitFor, renderHook } from '@testing-library/react'; import type { DashboardStart } from '@kbn/dashboard-plugin/public'; import { EuiBasicTable } from '@elastic/eui'; import { useKibana } from '../../common/lib/kibana'; @@ -28,21 +27,20 @@ import type { HttpStart } from '@kbn/core/public'; jest.mock('../../common/lib/kibana'); jest.mock('../../common/containers/tags/api'); jest.mock('../../common/containers/dashboards/api'); + +const useKibanaMock = useKibana as jest.Mocked; + const spyUseGetSecuritySolutionUrl = jest.spyOn(linkTo, 'useGetSecuritySolutionUrl'); const spyTrack = jest.spyOn(telemetry, 'track'); const { id: mockReturnDashboardId, attributes: { title: mockReturnDashboardTitle, description: mockReturnDashboardDescription }, } = DEFAULT_DASHBOARDS_RESPONSE[0]; -const renderUseSecurityDashboardsTableItems = async () => { - const renderedHook = renderHook(() => useSecurityDashboardsTableItems(), { + +const renderUseSecurityDashboardsTableItems = () => { + return renderHook(useSecurityDashboardsTableItems, { wrapper: DashboardContextProvider, }); - await act(async () => { - // needed to let dashboard items to be updated from saved objects response - await renderedHook.waitForNextUpdate(); - }); - return renderedHook; }; const renderUseDashboardsTableColumns = () => @@ -50,101 +48,137 @@ const renderUseDashboardsTableColumns = () => wrapper: TestProviders, }); +const tagsColumn = { + field: 'id', // set existing field to prevent test error + name: 'Tags', + 'data-test-subj': 'dashboardTableTagsCell', +}; + +beforeEach(() => { + jest.clearAllMocks(); +}); + describe('Security Dashboards Table hooks', () => { - const mockGetRedirectUrl = jest.fn(() => '/path'); - useKibana().services.dashboard = { - locator: { getRedirectUrl: mockGetRedirectUrl }, - } as unknown as DashboardStart; - useKibana().services.http = {} as unknown as HttpStart; - - const mockTaggingGetTableColumnDefinition = useKibana().services.savedObjectsTagging?.ui - .getTableColumnDefinition as jest.Mock; - const tagsColumn = { - field: 'id', // set existing field to prevent test error - name: 'Tags', - 'data-test-subj': 'dashboardTableTagsCell', - }; - mockTaggingGetTableColumnDefinition.mockReturnValue(tagsColumn); - - afterEach(() => { - jest.clearAllMocks(); + let mockTaggingGetTableColumnDefinition: jest.Mock; + + beforeEach(() => { + useKibanaMock().services.dashboard = { + locator: { getRedirectUrl: jest.fn(() => '/path') }, + } as unknown as DashboardStart; + useKibanaMock().services.http = {} as unknown as HttpStart; + + mockTaggingGetTableColumnDefinition = useKibanaMock().services.savedObjectsTagging?.ui + .getTableColumnDefinition as jest.Mock; + + mockTaggingGetTableColumnDefinition.mockReturnValue(tagsColumn); }); describe('useSecurityDashboardsTableItems', () => { it('should request when renders', async () => { - await renderUseSecurityDashboardsTableItems(); - expect(getDashboardsByTagIds).toHaveBeenCalledTimes(1); + renderUseSecurityDashboardsTableItems(); + + await waitFor(() => { + expect(getDashboardsByTagIds).toHaveBeenCalledTimes(1); + }); }); it('should not request again when rerendered', async () => { - const { rerender } = await renderUseSecurityDashboardsTableItems(); + const { rerender } = renderUseSecurityDashboardsTableItems(); + + await waitFor(() => { + expect(getDashboardsByTagIds).toHaveBeenCalledTimes(1); + }); + + rerender(); - expect(getDashboardsByTagIds).toHaveBeenCalledTimes(1); - act(() => rerender()); - expect(getDashboardsByTagIds).toHaveBeenCalledTimes(1); + await waitFor(() => { + return expect(getDashboardsByTagIds).toHaveBeenCalledTimes(1); + }); }); it('should return a memoized value when rerendered', async () => { - const { result, rerender } = await renderUseSecurityDashboardsTableItems(); + const { result, rerender } = renderUseSecurityDashboardsTableItems(); + + waitFor(() => expect(result.current.isLoading).toBe(false)); const result1 = result.current.items; - act(() => rerender()); - const result2 = result.current.items; - expect(result1).toBe(result2); + rerender(); + + await waitFor(() => { + expect(result.current.isLoading).toBe(false); + expect(result1).toBe(result.current.items); + }); }); it('should return dashboard items', async () => { - const { result } = await renderUseSecurityDashboardsTableItems(); + const { result } = renderUseSecurityDashboardsTableItems(); const [dashboard1] = DEFAULT_DASHBOARDS_RESPONSE; - expect(result.current.items).toStrictEqual([ - { - ...dashboard1, - title: dashboard1.attributes.title, - description: dashboard1.attributes.description, - }, - ]); + + await waitFor(() => { + expect(result.current.items).toStrictEqual([ + { + ...dashboard1, + title: dashboard1.attributes.title, + description: dashboard1.attributes.description, + }, + ]); + }); }); }); describe('useDashboardsTableColumns', () => { - it('should call getTableColumnDefinition to get tags column', () => { + it('should call getTableColumnDefinition to get tags column', async () => { renderUseDashboardsTableColumns(); - expect(mockTaggingGetTableColumnDefinition).toHaveBeenCalled(); + await waitFor(() => { + expect(mockTaggingGetTableColumnDefinition).toHaveBeenCalled(); + }); }); - it('should return dashboard columns', () => { + it('should return dashboard columns', async () => { const { result } = renderUseDashboardsTableColumns(); - expect(result.current).toEqual([ - expect.objectContaining({ - field: 'title', - name: 'Title', - }), - expect.objectContaining({ - field: 'description', - name: 'Description', - }), - expect.objectContaining(tagsColumn), - ]); + await waitFor(() => { + expect(result.current).toEqual([ + expect.objectContaining({ + field: 'title', + name: 'Title', + }), + expect.objectContaining({ + field: 'description', + name: 'Description', + }), + expect.objectContaining(tagsColumn), + ]); + }); }); it('returns a memoized value', async () => { const { result, rerender } = renderUseDashboardsTableColumns(); const result1 = result.current; - act(() => rerender()); + + rerender(); + const result2 = result.current; - expect(result1).toBe(result2); + await waitFor(() => { + expect(result1).toBe(result2); + }); }); }); it('should render a table with consistent items and columns', async () => { - const { result: itemsResult } = await renderUseSecurityDashboardsTableItems(); + const { result: itemsResult } = renderUseSecurityDashboardsTableItems(); const { result: columnsResult } = renderUseDashboardsTableColumns(); + await waitFor(() => { + expect(itemsResult.current.isLoading).toBe(false); + expect(itemsResult.current.items).toHaveLength(1); + expect(columnsResult.current).toHaveLength(3); + }); + const result = render( , { @@ -152,22 +186,28 @@ describe('Security Dashboards Table hooks', () => { } ); - expect(result.getAllByText('Title').length).toBeGreaterThan(0); - expect(result.getAllByText('Description').length).toBeGreaterThan(0); - expect(result.getAllByText('Tags').length).toBeGreaterThan(0); + expect(await result.findAllByText('Title')).toHaveLength(1); + expect(await result.findAllByText('Description')).toHaveLength(1); + expect(await result.findAllByText('Tags')).toHaveLength(1); - expect(result.getByText(mockReturnDashboardTitle)).toBeInTheDocument(); - expect(result.getByText(mockReturnDashboardDescription)).toBeInTheDocument(); + expect(await result.findByText(mockReturnDashboardTitle)).toBeInTheDocument(); + expect(await result.findByText(mockReturnDashboardDescription)).toBeInTheDocument(); - expect(result.queryAllByTestId('dashboardTableTitleCell')).toHaveLength(1); - expect(result.queryAllByTestId('dashboardTableDescriptionCell')).toHaveLength(1); - expect(result.queryAllByTestId('dashboardTableTagsCell')).toHaveLength(1); + expect(await result.findAllByTestId('dashboardTableTitleCell')).toHaveLength(1); + expect(await result.findAllByTestId('dashboardTableDescriptionCell')).toHaveLength(1); + expect(await result.findAllByTestId('dashboardTableTagsCell')).toHaveLength(1); }); it('should send telemetry when dashboard title clicked', async () => { - const { result: itemsResult } = await renderUseSecurityDashboardsTableItems(); + const { result: itemsResult } = renderUseSecurityDashboardsTableItems(); const { result: columnsResult } = renderUseDashboardsTableColumns(); + await waitFor(() => { + expect(itemsResult.current.isLoading).toBe(false); + expect(itemsResult.current.items).toHaveLength(1); + expect(columnsResult.current).toHaveLength(3); + }); + const result = render( , { @@ -176,22 +216,33 @@ describe('Security Dashboards Table hooks', () => { ); result.getByText(mockReturnDashboardTitle).click(); - expect(spyTrack).toHaveBeenCalledWith(METRIC_TYPE.CLICK, TELEMETRY_EVENT.DASHBOARD); + + await waitFor(() => { + expect(spyTrack).toHaveBeenCalledWith(METRIC_TYPE.CLICK, TELEMETRY_EVENT.DASHBOARD); + }); }); it('should land on SecuritySolution dashboard view page when dashboard title clicked', async () => { const mockGetSecuritySolutionUrl = jest.fn(); spyUseGetSecuritySolutionUrl.mockImplementation(() => mockGetSecuritySolutionUrl); - const { result: itemsResult } = await renderUseSecurityDashboardsTableItems(); + const { result: itemsResult } = renderUseSecurityDashboardsTableItems(); const { result: columnsResult } = renderUseDashboardsTableColumns(); + await waitFor(() => { + expect(itemsResult.current.isLoading).toBe(false); + expect(itemsResult.current.items).toHaveLength(1); + expect(columnsResult.current).toHaveLength(3); + }); + render(, { wrapper: TestProviders, }); - expect(mockGetSecuritySolutionUrl).toHaveBeenCalledWith({ - deepLinkId: SecurityPageName.dashboards, - path: mockReturnDashboardId, + await waitFor(() => { + expect(mockGetSecuritySolutionUrl).toHaveBeenCalledWith({ + deepLinkId: SecurityPageName.dashboards, + path: mockReturnDashboardId, + }); }); }); }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/esql_query_edit/validators/esql_query_validator_factory.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/esql_query_edit/validators/esql_query_validator_factory.ts index 90cdaff14cc9b..c5b54db172a18 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/esql_query_edit/validators/esql_query_validator_factory.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation/components/esql_query_edit/validators/esql_query_validator_factory.ts @@ -7,10 +7,7 @@ import type { QueryClient } from '@tanstack/react-query'; import type { DatatableColumn } from '@kbn/expressions-plugin/common'; -import type { ESQLAstQueryExpression, ESQLCommandOption } from '@kbn/esql-ast'; -import { parse } from '@kbn/esql-ast'; -import { isAggregatingQuery } from '@kbn/securitysolution-utils'; -import { isColumnItem, isOptionItem } from '@kbn/esql-validation-autocomplete'; +import { parseEsqlQuery } from '@kbn/securitysolution-utils'; import type { FormData, ValidationError, ValidationFunc } from '../../../../../shared_imports'; import type { FieldValueQueryBar } from '../../../../rule_creation_ui/components/query_bar_field'; import { fetchEsqlQueryColumns } from '../../../logic/esql_query_columns'; @@ -79,59 +76,6 @@ function hasIdColumn(columns: DatatableColumn[]): boolean { return columns.some(({ id }) => '_id' === id); } -/** - * check if esql query valid for Security rule: - * - if it's non aggregation query it must have metadata operator - */ -function parseEsqlQuery(query: string) { - const { root, errors } = parse(query); - const isEsqlQueryAggregating = isAggregatingQuery(root); - - return { - errors, - isEsqlQueryAggregating, - hasMetadataOperator: computeHasMetadataOperator(root), - }; -} - -/** - * checks whether query has metadata _id operator - */ -function computeHasMetadataOperator(astExpression: ESQLAstQueryExpression): boolean { - // Check whether the `from` command has `metadata` operator - const metadataOption = getMetadataOption(astExpression); - if (!metadataOption) { - return false; - } - - // Check whether the `metadata` operator has `_id` argument - const idColumnItem = metadataOption.args.find( - (fromArg) => isColumnItem(fromArg) && fromArg.name === '_id' - ); - if (!idColumnItem) { - return false; - } - - return true; -} - -function getMetadataOption(astExpression: ESQLAstQueryExpression): ESQLCommandOption | undefined { - const fromCommand = astExpression.commands.find((x) => x.name === 'from'); - - if (!fromCommand?.args) { - return undefined; - } - - // Check whether the `from` command has `metadata` operator - for (const fromArg of fromCommand.args) { - if (isOptionItem(fromArg) && fromArg.name === 'metadata') { - return fromArg; - } - } - - return undefined; -} - function constructSyntaxError(error: Error): ValidationError { return { code: ESQL_ERROR_CODES.INVALID_SYNTAX, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/index.tsx index ac5c91aa8a25a..2d2ef8c8930d6 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_about_rule/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiAccordion, EuiFlexItem, EuiSpacer, EuiFormRow } from '@elastic/eui'; +import { EuiAccordion, EuiFlexItem, EuiSpacer, EuiFormRow, EuiToolTip } from '@elastic/eui'; import type { FC } from 'react'; import React, { memo, useCallback, useEffect, useState, useMemo } from 'react'; import styled from 'styled-components'; @@ -13,6 +13,7 @@ import styled from 'styled-components'; import type { DataViewBase } from '@kbn/es-query'; import type { Severity, Type } from '@kbn/securitysolution-io-ts-alerting-types'; +import type { RuleSource } from '../../../../../common/api/detection_engine'; import { isThreatMatchRule, isEsqlRule } from '../../../../../common/detection_engine/utils'; import type { RuleStepProps, @@ -55,6 +56,7 @@ interface StepAboutRuleProps extends RuleStepProps { timestampOverride: string; form: FormHook; esqlQuery?: string | undefined; + ruleSource?: RuleSource; } interface StepAboutRuleReadOnlyProps { @@ -85,6 +87,7 @@ const StepAboutRuleComponent: FC = ({ isLoading, form, esqlQuery, + ruleSource, }) => { const { data } = useKibana().services; @@ -280,31 +283,51 @@ const StepAboutRuleComponent: FC = ({ }} /> - + + + - + + + (({ }, }))<{ $isVisible: boolean }>``; -// eslint-disable-next-line complexity const StepDefineRuleComponent: FC = ({ dataSourceType, defaultSavedQuery, @@ -172,7 +171,6 @@ const StepDefineRuleComponent: FC = ({ watch: ['ruleType', 'queryBar', 'machineLearningJobId'], }); - const { isSuppressionEnabled: isAlertSuppressionEnabled } = useAlertSuppression(ruleType); const [openTimelineSearch, setOpenTimelineSearch] = useState(false); const [indexModified, setIndexModified] = useState(false); const [threatIndexModified, setThreatIndexModified] = useState(false); @@ -358,10 +356,9 @@ const StepDefineRuleComponent: FC = ({ * purpose and so are treated as if the field is always selected. */ const areSuppressionFieldsSelected = isThresholdRule || Boolean(alertSuppressionFields?.length); - const areSuppressionFieldsDisabledBySequence = - isEqlRule(ruleType) && - isEqlSequenceQuery(queryBar?.query?.query as string) && - alertSuppressionFields?.length === 0; + const { isSuppressionEnabled: isAlertSuppressionEnabled } = useAlertSuppression( + isEqlSequenceQuery(queryBar?.query?.query as string) + ); /** If we don't have ML field information, users can't meaningfully interact with suppression fields */ const areSuppressionFieldsDisabledByMlFields = @@ -369,30 +366,21 @@ const StepDefineRuleComponent: FC = ({ /** Suppression fields are generally disabled if either: * - License is insufficient (i.e. less than platinum) - * - An EQL Sequence is used * - ML Field information is not available */ const areSuppressionFieldsDisabled = - !isAlertSuppressionLicenseValid || - areSuppressionFieldsDisabledBySequence || - areSuppressionFieldsDisabledByMlFields; + !isAlertSuppressionLicenseValid || areSuppressionFieldsDisabledByMlFields; const isSuppressionGroupByDisabled = (areSuppressionFieldsDisabled || isEsqlSuppressionLoading) && !areSuppressionFieldsSelected; const suppressionGroupByDisabledText = useMemo(() => { - if (areSuppressionFieldsDisabledBySequence) { - return i18n.EQL_SEQUENCE_SUPPRESSION_DISABLE_TOOLTIP; - } else if (areSuppressionFieldsDisabledByMlFields) { + if (areSuppressionFieldsDisabledByMlFields) { return i18n.MACHINE_LEARNING_SUPPRESSION_DISABLED_LABEL; } else { return alertSuppressionUpsellingMessage; } - }, [ - alertSuppressionUpsellingMessage, - areSuppressionFieldsDisabledByMlFields, - areSuppressionFieldsDisabledBySequence, - ]); + }, [alertSuppressionUpsellingMessage, areSuppressionFieldsDisabledByMlFields]); const suppressionGroupByFields = useMemo(() => { if (isEsqlRule(ruleType)) { @@ -824,13 +812,14 @@ const StepDefineRuleReadOnlyComponent: FC = ({ }) => { const dataForDescription: Partial = getStepDataDataSource(data); const transformFields = useExperimentalFeatureFieldsTransform(); + const fieldsToDisplay = transformFields(dataForDescription); return ( diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/schema.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/schema.tsx index f0db9f0342736..323e321eee8d9 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/schema.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/schema.tsx @@ -16,8 +16,6 @@ import { customValidators, } from '../../../../common/components/threat_match/helpers'; import { - isEqlRule, - isEqlSequenceQuery, isEsqlRule, isNewTermsRule, isThreatMatchRule, @@ -44,7 +42,6 @@ import { THREAT_MATCH_INDEX_HELPER_TEXT, THREAT_MATCH_REQUIRED, THREAT_MATCH_EMPTIES, - EQL_SEQUENCE_SUPPRESSION_GROUPBY_VALIDATION_TEXT, } from './translations'; import { queryRequiredValidatorFactory } from '../../validators/query_required_validator_factory'; import { kueryValidatorFactory } from '../../validators/kuery_validator_factory'; @@ -587,7 +584,6 @@ export const schema: FormSchema = { validator: (...args: Parameters) => { const [{ formData }] = args; const needsValidation = isSuppressionRuleConfiguredWithGroupBy(formData.ruleType); - if (!needsValidation) { return; } @@ -595,25 +591,6 @@ export const schema: FormSchema = { return alertSuppressionFieldsValidatorFactory()(...args); }, }, - { - validator: ( - ...args: Parameters - ): ReturnType> | undefined => { - const [{ formData, value }] = args; - - if (!isEqlRule(formData.ruleType) || !Array.isArray(value) || value.length === 0) { - return; - } - - const query: string = formData.queryBar?.query?.query ?? ''; - - if (isEqlSequenceQuery(query)) { - return { - message: EQL_SEQUENCE_SUPPRESSION_GROUPBY_VALIDATION_TEXT, - }; - } - }, - }, ], }, [ALERT_SUPPRESSION_DURATION_FIELD_NAME]: { diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/translations.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/translations.tsx index 897331d20da73..362f586dc5abd 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/translations.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/translations.tsx @@ -176,22 +176,6 @@ export const getEnableThresholdSuppressionLabel = (fields: string[] | undefined) ) ); -export const EQL_SEQUENCE_SUPPRESSION_DISABLE_TOOLTIP = i18n.translate( - 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.eqlSequenceSuppressionDisableText', - { - defaultMessage: 'Suppression is not supported for EQL sequence queries.', - } -); - -export const EQL_SEQUENCE_SUPPRESSION_GROUPBY_VALIDATION_TEXT = i18n.translate( - 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.eqlSequenceSuppressionValidationText', - { - defaultMessage: - '{EQL_SEQUENCE_SUPPRESSION_DISABLE_TOOLTIP} Change the EQL query to a non-sequence query, or remove the suppression fields.', - values: { EQL_SEQUENCE_SUPPRESSION_DISABLE_TOOLTIP }, - } -); - export const MACHINE_LEARNING_SUPPRESSION_DISABLED_LABEL = i18n.translate( 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.machineLearningSuppressionDisabledLabel', { 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 c035fef5af6e4..d896fa676d31d 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,6 +7,14 @@ import { useCallback } from 'react'; import type { DefineStepRule } from '../../../../detections/pages/detection_engine/rules/types'; +import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; +import { isEqlRule, isEqlSequenceQuery } from '../../../../../common/detection_engine/utils'; +import { + ALERT_SUPPRESSION_FIELDS_FIELD_NAME, + ALERT_SUPPRESSION_DURATION_TYPE_FIELD_NAME, + ALERT_SUPPRESSION_DURATION_FIELD_NAME, + ALERT_SUPPRESSION_MISSING_FIELDS_FIELD_NAME, +} from '../../../rule_creation/components/alert_suppression_edit'; /** * transforms DefineStepRule fields according to experimental feature flags @@ -14,9 +22,30 @@ import type { DefineStepRule } from '../../../../detections/pages/detection_engi export const useExperimentalFeatureFieldsTransform = >(): (( fields: T ) => T) => { - const transformer = useCallback((fields: T) => { - return fields; - }, []); + const isAlertSuppressionForSequenceEqlRuleEnabled = useIsExperimentalFeatureEnabled( + 'alertSuppressionForSequenceEqlRuleEnabled' + ); + const transformer = useCallback( + (fields: T) => { + const isSuppressionDisabled = + isEqlRule(fields.ruleType) && + isEqlSequenceQuery(fields.queryBar?.query?.query as string) && + !isAlertSuppressionForSequenceEqlRuleEnabled; + + // reset any alert suppression values hidden behind feature flag + if (isSuppressionDisabled) { + return { + ...fields, + [ALERT_SUPPRESSION_FIELDS_FIELD_NAME]: [], + [ALERT_SUPPRESSION_DURATION_TYPE_FIELD_NAME]: undefined, + [ALERT_SUPPRESSION_DURATION_FIELD_NAME]: undefined, + [ALERT_SUPPRESSION_MISSING_FIELDS_FIELD_NAME]: undefined, + }; + } + return fields; + }, + [isAlertSuppressionForSequenceEqlRuleEnabled] + ); return transformer; }; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/rule_editing/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/rule_editing/index.tsx index dbc753ca33d37..594b9d2a35598 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/rule_editing/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/rule_editing/index.tsx @@ -42,6 +42,7 @@ import { useUserData } from '../../../../detections/components/user_info'; import { StepPanel } from '../../../rule_creation/components/step_panel'; import { StepAboutRule } from '../../components/step_about_rule'; import { StepDefineRule } from '../../components/step_define_rule'; +import { useExperimentalFeatureFieldsTransform } from '../../components/step_define_rule/use_experimental_feature_fields_transform'; import { StepScheduleRule } from '../../components/step_schedule_rule'; import { StepRuleActions } from '../../../rule_creation/components/step_rule_actions'; import { formatRule } from '../rule_creation/helpers'; @@ -52,6 +53,7 @@ import { MaxWidthEuiFlexItem, } from '../../../../detections/pages/detection_engine/rules/helpers'; import * as ruleI18n from '../../../../detections/pages/detection_engine/rules/translations'; +import type { DefineStepRule } from '../../../../detections/pages/detection_engine/rules/types'; import { RuleStep } from '../../../../detections/pages/detection_engine/rules/types'; import * as i18n from './translations'; import { SecurityPageName } from '../../../../app/types'; @@ -276,6 +278,7 @@ const EditRulePageComponent: FC<{ rule: RuleResponse }> = ({ rule }) => { form={aboutStepForm} esqlQuery={esqlQueryForAboutStep} key="aboutStep" + ruleSource={rule.rule_source} /> )} @@ -341,6 +344,7 @@ const EditRulePageComponent: FC<{ rule: RuleResponse }> = ({ rule }) => { [ isPrebuiltRulesCustomizationEnabled, rule?.immutable, + rule.rule_source, rule?.id, activeStep, loading, @@ -368,11 +372,16 @@ const EditRulePageComponent: FC<{ rule: RuleResponse }> = ({ rule }) => { const { startTransaction } = useStartTransaction(); + const defineFieldsTransform = useExperimentalFeatureFieldsTransform(); + const saveChanges = useCallback(async () => { startTransaction({ name: SINGLE_RULE_ACTIONS.SAVE }); + const localDefineStepData: DefineStepRule = defineFieldsTransform({ + ...defineStepData, + }); const updatedRule = await updateRule({ ...formatRule( - defineStepData, + localDefineStepData, aboutStepData, scheduleStepData, actionsStepData, @@ -390,8 +399,9 @@ const EditRulePageComponent: FC<{ rule: RuleResponse }> = ({ rule }) => { }, [ aboutStepData, actionsStepData, - addSuccess, defineStepData, + defineFieldsTransform, + addSuccess, navigateToApp, rule?.exceptions_list, ruleId, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_bulk_action_mutation.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_bulk_action_mutation.ts index 7d8f42adad31b..376b26684d4a5 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_bulk_action_mutation.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_bulk_action_mutation.ts @@ -101,6 +101,7 @@ export const useBulkActionMutation = ( invalidateFetchRuleByIdQuery(); invalidateFetchRuleManagementFilters(); invalidateFetchCoverageOverviewQuery(); + invalidateFetchPrebuiltRulesUpgradeReviewQuery(); break; } diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_update_rule_mutation.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_update_rule_mutation.ts index 5eedf122a6ac6..812b97b669378 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_update_rule_mutation.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/hooks/use_update_rule_mutation.ts @@ -17,6 +17,7 @@ import { useInvalidateFindRulesQuery } from './use_find_rules_query'; import { useUpdateRuleByIdCache } from './use_fetch_rule_by_id_query'; import { useInvalidateFetchRuleManagementFiltersQuery } from './use_fetch_rule_management_filters_query'; import { useInvalidateFetchCoverageOverviewQuery } from './use_fetch_coverage_overview_query'; +import { useInvalidateFetchPrebuiltRulesUpgradeReviewQuery } from './prebuilt_rules/use_fetch_prebuilt_rules_upgrade_review_query'; export const UPDATE_RULE_MUTATION_KEY = ['PUT', DETECTION_ENGINE_RULES_URL]; @@ -26,6 +27,7 @@ export const useUpdateRuleMutation = ( const invalidateFindRulesQuery = useInvalidateFindRulesQuery(); const invalidateFetchRuleManagementFilters = useInvalidateFetchRuleManagementFiltersQuery(); const invalidateFetchCoverageOverviewQuery = useInvalidateFetchCoverageOverviewQuery(); + const invalidatePrebuiltRulesUpdateReview = useInvalidateFetchPrebuiltRulesUpgradeReviewQuery(); const updateRuleCache = useUpdateRuleByIdCache(); return useMutation( @@ -37,6 +39,7 @@ export const useUpdateRuleMutation = ( invalidateFindRulesQuery(); invalidateFetchRuleManagementFilters(); invalidateFetchCoverageOverviewQuery(); + invalidatePrebuiltRulesUpdateReview(); const [response] = args; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_definition_section.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_definition_section.tsx index 70f267ac94ba4..3e08f4ce3acc8 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_definition_section.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_definition_section.tsx @@ -843,7 +843,7 @@ export const RuleDefinitionSection = ({ ruleType: rule.type, }); - const { isSuppressionEnabled } = useAlertSuppression(rule.type); + const { isSuppressionEnabled } = useAlertSuppression(); const definitionSectionListItems = prepareDefinitionSectionListItems( rule, 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 27615ef2d489a..7877a86385cde 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,37 +6,23 @@ */ import { renderHook } from '@testing-library/react'; -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', () => { - ( - [ - 'new_terms', - 'threat_match', - 'saved_query', - 'query', - 'threshold', - 'eql', - 'esql', - 'machine_learning', - ] as Type[] - ).forEach((ruleType) => { - it(`should return the isSuppressionEnabled true for ${ruleType} rule type that exists in SUPPRESSIBLE_ALERT_RULES`, () => { - const { result } = renderHook(() => useAlertSuppression(ruleType)); - - expect(result.current.isSuppressionEnabled).toBe(true); - }); + jest + .spyOn(useIsExperimentalFeatureEnabledMock, 'useIsExperimentalFeatureEnabled') + .mockReturnValue(false); + it(`should return the isSuppressionEnabled true if query for all rule types is not an eql sequence query`, () => { + const { result } = renderHook(() => useAlertSuppression()); + expect(result.current.isSuppressionEnabled).toBe(true); }); - it('should return false if rule type is undefined', () => { - const { result } = renderHook(() => useAlertSuppression(undefined)); - expect(result.current.isSuppressionEnabled).toBe(false); - }); - - it('should return false if rule type is not a suppressible rule', () => { - const { result } = renderHook(() => useAlertSuppression('OTHER_RULE_TYPE' as Type)); - + jest + .spyOn(useIsExperimentalFeatureEnabledMock, 'useIsExperimentalFeatureEnabled') + .mockReturnValue(false); + it('should return isSuppressionEnabled false for eql sequence query when feature flag is disabled', () => { + const { result } = renderHook(() => useAlertSuppression(true)); expect(result.current.isSuppressionEnabled).toBe(false); }); }); 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 6e1b2a4d6163f..dae422a8e81c5 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 @@ -5,21 +5,24 @@ * 2.0. */ 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 => { +export const useAlertSuppression = (isEqlSequenceQuery = false): UseAlertSuppressionReturn => { + const isAlertSuppressionForSequenceEQLRuleEnabled = useIsExperimentalFeatureEnabled( + 'alertSuppressionForSequenceEqlRuleEnabled' + ); + const isSuppressionEnabledForRuleType = useCallback(() => { - if (!ruleType) { - return false; + if (isEqlSequenceQuery) { + return isAlertSuppressionForSequenceEQLRuleEnabled; } - return isSuppressibleAlertRule(ruleType); - }, [ruleType]); + return true; + }, [isAlertSuppressionForSequenceEQLRuleEnabled, isEqlSequenceQuery]); return { isSuppressionEnabled: isSuppressionEnabledForRuleType(), diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/add_rules/translations.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/add_rules/translations.tsx index e9c43e411ee37..e6352a5d76825 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/add_rules/translations.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/add_rules/translations.tsx @@ -10,6 +10,6 @@ import { i18n } from '@kbn/i18n'; export const PAGE_TITLE = i18n.translate( 'xpack.securitySolution.detectionEngine.rules.addRules.pageTitle', { - defaultMessage: 'Add Elastic Rules', + defaultMessage: 'Add Elastic rules', } ); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/grouping_settings/group_take_action_items.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/grouping_settings/group_take_action_items.test.tsx index 5518926f4ab61..7e1c9e0a1cfbb 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/grouping_settings/group_take_action_items.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/grouping_settings/group_take_action_items.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { act, renderHook } from '@testing-library/react-hooks'; +import { waitFor, renderHook } from '@testing-library/react'; import React from 'react'; import { TestProviders } from '../../../../common/mock'; import { useGroupTakeActionsItems } from '.'; @@ -20,68 +20,58 @@ describe('useGroupTakeActionsItems', () => { selectedGroup: 'test', }; it('returns all take actions items if showAlertStatusActions is true and currentStatus is undefined', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => - useGroupTakeActionsItems({ - showAlertStatusActions: true, - }), - { - wrapper: wrapperContainer, - } - ); - await waitForNextUpdate(); - expect(result.current(getActionItemsParams).length).toEqual(3); - }); + const { result } = renderHook( + () => + useGroupTakeActionsItems({ + showAlertStatusActions: true, + }), + { + wrapper: wrapperContainer, + } + ); + await waitFor(() => expect(result.current(getActionItemsParams).length).toEqual(3)); }); it('returns all take actions items if currentStatus is []', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => - useGroupTakeActionsItems({ - currentStatus: [], - showAlertStatusActions: true, - }), - { - wrapper: wrapperContainer, - } - ); - await waitForNextUpdate(); - expect(result.current(getActionItemsParams).length).toEqual(3); - }); + const { result } = renderHook( + () => + useGroupTakeActionsItems({ + currentStatus: [], + showAlertStatusActions: true, + }), + { + wrapper: wrapperContainer, + } + ); + await waitFor(() => expect(result.current(getActionItemsParams).length).toEqual(3)); }); it('returns all take actions items if currentStatus.length > 1', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => - useGroupTakeActionsItems({ - currentStatus: ['open', 'closed'], - showAlertStatusActions: true, - }), - { - wrapper: wrapperContainer, - } - ); - await waitForNextUpdate(); - expect(result.current(getActionItemsParams).length).toEqual(3); - }); + const { result } = renderHook( + () => + useGroupTakeActionsItems({ + currentStatus: ['open', 'closed'], + showAlertStatusActions: true, + }), + { + wrapper: wrapperContainer, + } + ); + await waitFor(() => expect(result.current(getActionItemsParams).length).toEqual(3)); }); it('returns acknowledged & closed take actions items if currentStatus === ["open"]', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => - useGroupTakeActionsItems({ - currentStatus: ['open'], - showAlertStatusActions: true, - }), - { - wrapper: wrapperContainer, - } - ); - await waitForNextUpdate(); + const { result } = renderHook( + () => + useGroupTakeActionsItems({ + currentStatus: ['open'], + showAlertStatusActions: true, + }), + { + wrapper: wrapperContainer, + } + ); + await waitFor(() => { const currentParams = result.current(getActionItemsParams); expect(currentParams.length).toEqual(2); expect(currentParams[0].key).toEqual('acknowledge'); @@ -90,18 +80,17 @@ describe('useGroupTakeActionsItems', () => { }); it('returns open & acknowledged take actions items if currentStatus === ["closed"]', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => - useGroupTakeActionsItems({ - currentStatus: ['closed'], - showAlertStatusActions: true, - }), - { - wrapper: wrapperContainer, - } - ); - await waitForNextUpdate(); + const { result } = renderHook( + () => + useGroupTakeActionsItems({ + currentStatus: ['closed'], + showAlertStatusActions: true, + }), + { + wrapper: wrapperContainer, + } + ); + await waitFor(() => { const currentParams = result.current(getActionItemsParams); expect(currentParams.length).toEqual(2); expect(currentParams[0].key).toEqual('open'); @@ -110,18 +99,17 @@ describe('useGroupTakeActionsItems', () => { }); it('returns open & closed take actions items if currentStatus === ["acknowledged"]', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => - useGroupTakeActionsItems({ - currentStatus: ['acknowledged'], - showAlertStatusActions: true, - }), - { - wrapper: wrapperContainer, - } - ); - await waitForNextUpdate(); + const { result } = renderHook( + () => + useGroupTakeActionsItems({ + currentStatus: ['acknowledged'], + showAlertStatusActions: true, + }), + { + wrapper: wrapperContainer, + } + ); + await waitFor(() => { const currentParams = result.current(getActionItemsParams); expect(currentParams.length).toEqual(2); expect(currentParams[0].key).toEqual('open'); @@ -130,33 +118,28 @@ describe('useGroupTakeActionsItems', () => { }); it('returns empty take actions items if showAlertStatusActions is false', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => - useGroupTakeActionsItems({ - showAlertStatusActions: false, - }), - { - wrapper: wrapperContainer, - } - ); - await waitForNextUpdate(); - expect(result.current(getActionItemsParams).length).toEqual(0); - }); + const { result } = renderHook( + () => + useGroupTakeActionsItems({ + showAlertStatusActions: false, + }), + { + wrapper: wrapperContainer, + } + ); + await waitFor(() => expect(result.current(getActionItemsParams).length).toEqual(0)); }); + it('returns array take actions items if showAlertStatusActions is true', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => - useGroupTakeActionsItems({ - showAlertStatusActions: true, - }), - { - wrapper: wrapperContainer, - } - ); - await waitForNextUpdate(); - expect(result.current(getActionItemsParams).length).toEqual(3); - }); + const { result } = renderHook( + () => + useGroupTakeActionsItems({ + showAlertStatusActions: true, + }), + { + wrapper: wrapperContainer, + } + ); + await waitFor(() => expect(result.current(getActionItemsParams).length).toEqual(3)); }); }); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx index 0ca0e99bb7fd0..7a39c6ea0439f 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx @@ -12,7 +12,7 @@ import type { FC } from 'react'; import React, { useRef, useEffect, useState, useCallback, useMemo } from 'react'; import type { AlertsTableStateProps } from '@kbn/triggers-actions-ui-plugin/public/application/sections/alerts_table/alerts_table_state'; import type { Alert } from '@kbn/triggers-actions-ui-plugin/public/types'; -import { ALERT_BUILDING_BLOCK_TYPE } from '@kbn/rule-data-utils'; +import { ALERT_BUILDING_BLOCK_TYPE, AlertConsumers } from '@kbn/rule-data-utils'; import styled from 'styled-components'; import { useDispatch } from 'react-redux'; import { getEsQueryConfig } from '@kbn/data-plugin/public'; @@ -22,6 +22,7 @@ import { tableDefaults, TableId, } from '@kbn/securitysolution-data-table'; +import { SECURITY_SOLUTION_RULE_TYPE_IDS } from '@kbn/securitysolution-rules'; import type { RunTimeMappings } from '@kbn/timelines-plugin/common/search_strategy'; import { useGlobalTime } from '../../../common/containers/use_global_time'; import { useLicense } from '../../../common/hooks/use_license'; @@ -55,7 +56,7 @@ const { updateIsLoading, updateTotalCount } = dataTableActions; const DEFAULT_DATA_GRID_HEIGHT = 600; -const ALERT_TABLE_FEATURE_ID: AlertsTableStateProps['featureIds'] = ['siem']; +const ALERT_TABLE_CONSUMERS: AlertsTableStateProps['consumers'] = [AlertConsumers.SIEM]; // Highlight rows with building block alerts const shouldHighlightRow = (alert: Alert) => !!alert[ALERT_BUILDING_BLOCK_TYPE]; @@ -283,7 +284,8 @@ export const AlertsTableComponent: FC = ({ configurationId: configId, // stores separate configuration based on the view of the table id: `detection-engine-alert-table-${configId}-${tableView}`, - featureIds: ALERT_TABLE_FEATURE_ID, + ruleTypeIds: SECURITY_SOLUTION_RULE_TYPE_IDS, + consumers: ALERT_TABLE_CONSUMERS, query: finalBoolQuery, gridStyle, shouldHighlightRow, diff --git a/x-pack/plugins/security_solution/public/detections/components/detection_engine_filters/detection_engine_filters.tsx b/x-pack/plugins/security_solution/public/detections/components/detection_engine_filters/detection_engine_filters.tsx index 6c60aec51382e..5a01ea1f939d2 100644 --- a/x-pack/plugins/security_solution/public/detections/components/detection_engine_filters/detection_engine_filters.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/detection_engine_filters/detection_engine_filters.tsx @@ -7,12 +7,12 @@ import React, { useCallback, useMemo } from 'react'; import type { FilterControlConfig } from '@kbn/alerts-ui-shared'; -import { AlertConsumers } from '@kbn/rule-data-utils'; import { createKbnUrlStateStorage, Storage } from '@kbn/kibana-utils-plugin/public'; import { ControlGroupRenderer } from '@kbn/controls-plugin/public'; import type { AlertFilterControlsProps } from '@kbn/alerts-ui-shared/src/alert_filter_controls'; import { AlertFilterControls } from '@kbn/alerts-ui-shared/src/alert_filter_controls'; import { useHistory } from 'react-router-dom'; +import { SECURITY_SOLUTION_RULE_TYPE_IDS } from '@kbn/securitysolution-rules'; import type { DataViewSpec } from '@kbn/data-plugin/common'; import { useKibana } from '../../../common/lib/kibana'; import { DEFAULT_DETECTION_PAGE_FILTERS } from '../../../../common/constants'; @@ -78,7 +78,7 @@ export const DetectionEngineFilters = ({ controlsUrlState={filterControlsUrlState} setControlsUrlState={setFilterControlsUrlState} spaceId={spaceId} - featureIds={[AlertConsumers.SIEM]} + ruleTypeIds={SECURITY_SOLUTION_RULE_TYPE_IDS} chainingSystem="HIERARCHICAL" defaultControls={DEFAULT_DETECTION_PAGE_FILTERS} dataViewSpec={dataViewSpec} diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/translations.ts b/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/translations.ts index aa36b18beecdf..a4b8c9d63c542 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/translations.ts +++ b/x-pack/plugins/security_solution/public/detections/components/rules/pre_packaged_rules/translations.ts @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n'; export const PRE_BUILT_TITLE = i18n.translate( 'xpack.securitySolution.detectionEngine.rules.prePackagedRules.emptyPromptTitle', { - defaultMessage: 'Load Elastic prebuilt detection rules', + defaultMessage: 'Install and enable Elastic prebuilt detection rules', } ); @@ -18,7 +18,7 @@ export const PRE_BUILT_MSG = i18n.translate( 'xpack.securitySolution.detectionEngine.rules.prePackagedRules.emptyPromptMessage', { defaultMessage: - 'Elastic Security comes with prebuilt detection rules that run in the background and create alerts when their conditions are met. By default, all prebuilt rules except the Endpoint Security rule are disabled. You can select additional rules you want to enable.', + 'Elastic Security comes with prebuilt detection rules that run in the background and create alerts when their conditions are met. To start using them, choose rules to install and enable.', } ); diff --git a/x-pack/plugins/security_solution/public/entity_analytics/pages/entity_store_management_page.tsx b/x-pack/plugins/security_solution/public/entity_analytics/pages/entity_store_management_page.tsx index c0b9d8d697e53..3cf3eb58355c6 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/pages/entity_store_management_page.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/pages/entity_store_management_page.tsx @@ -427,7 +427,7 @@ const AssetCriticalityIssueCallout: React.FC<{ errorMessage?: string | ReactNode const msg = errorMessage ?? ( ); diff --git a/x-pack/plugins/security_solution/public/explore/containers/authentications/index.test.tsx b/x-pack/plugins/security_solution/public/explore/containers/authentications/index.test.tsx index f37ec404274b1..a98a1fdf90949 100644 --- a/x-pack/plugins/security_solution/public/explore/containers/authentications/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/containers/authentications/index.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { act, renderHook } from '@testing-library/react-hooks'; +import { renderHook, act } from '@testing-library/react'; import { useAuthentications } from '.'; import { AuthStackByField } from '../../../../common/search_strategy'; import { TestProviders } from '../../../common/mock'; diff --git a/x-pack/plugins/security_solution/public/explore/containers/fields/index.test.ts b/x-pack/plugins/security_solution/public/explore/containers/fields/index.test.ts index 03084ef42dd8d..41cb8ba827b22 100644 --- a/x-pack/plugins/security_solution/public/explore/containers/fields/index.test.ts +++ b/x-pack/plugins/security_solution/public/explore/containers/fields/index.test.ts @@ -6,7 +6,7 @@ */ import { useKibana } from '../../../common/lib/kibana'; import { useIsFieldInIndexPattern } from '.'; -import { renderHook } from '@testing-library/react-hooks'; +import { renderHook } from '@testing-library/react'; import { getRequiredMapsFields } from '../../network/components/embeddables/map_config'; jest.mock('../../../common/lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/details/index.test.tsx b/x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/details/index.test.tsx index e4800a89f1092..bd35049b067e5 100644 --- a/x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/details/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/details/index.test.tsx @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { act, renderHook } from '@testing-library/react-hooks'; + +import { renderHook, act } from '@testing-library/react'; import { TestProviders } from '../../../../../common/mock'; import { ID, useHostDetails } from '.'; import { useSearchStrategy } from '../../../../../common/containers/use_search_strategy'; diff --git a/x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/index.test.tsx b/x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/index.test.tsx index 456caaf0d01c5..fa7312d50fc1d 100644 --- a/x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/containers/hosts/index.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { act, renderHook } from '@testing-library/react-hooks'; +import { renderHook, act } from '@testing-library/react'; import { TestProviders } from '../../../../common/mock'; import { useAllHost } from '.'; import { HostsType } from '../../store/model'; diff --git a/x-pack/plugins/security_solution/public/explore/hosts/containers/uncommon_processes/index.test.tsx b/x-pack/plugins/security_solution/public/explore/hosts/containers/uncommon_processes/index.test.tsx index 452f2aba5a8da..1e80b44378875 100644 --- a/x-pack/plugins/security_solution/public/explore/hosts/containers/uncommon_processes/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/containers/uncommon_processes/index.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { act, renderHook } from '@testing-library/react-hooks'; +import { renderHook, act } from '@testing-library/react'; import { TestProviders } from '../../../../common/mock'; import { useUncommonProcesses } from '.'; import { HostsType } from '../../store/model'; diff --git a/x-pack/plugins/security_solution/public/explore/network/containers/details/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/details/index.test.tsx index dde6ff13a4a81..53176cf558c53 100644 --- a/x-pack/plugins/security_solution/public/explore/network/containers/details/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/details/index.test.tsx @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { act, renderHook } from '@testing-library/react-hooks'; + +import { renderHook, act } from '@testing-library/react'; import { TestProviders } from '../../../../common/mock'; import { ID, useNetworkDetails } from '.'; import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; diff --git a/x-pack/plugins/security_solution/public/explore/network/containers/network_dns/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/network_dns/index.test.tsx index 8efcfc5dbee6d..8dab09fc001d1 100644 --- a/x-pack/plugins/security_solution/public/explore/network/containers/network_dns/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/network_dns/index.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { act, renderHook } from '@testing-library/react-hooks'; +import { renderHook, act } from '@testing-library/react'; import { TestProviders } from '../../../../common/mock'; import { ID, useNetworkDns } from '.'; import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; diff --git a/x-pack/plugins/security_solution/public/explore/network/containers/network_http/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/network_http/index.test.tsx index e7232359b0336..cd63ec78e1413 100644 --- a/x-pack/plugins/security_solution/public/explore/network/containers/network_http/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/network_http/index.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { act, renderHook } from '@testing-library/react-hooks'; +import { renderHook, act } from '@testing-library/react'; import { TestProviders } from '../../../../common/mock'; import { useNetworkHttp, ID } from '.'; import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; diff --git a/x-pack/plugins/security_solution/public/explore/network/containers/network_top_countries/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/network_top_countries/index.test.tsx index fb67611f43a74..a360fdc770605 100644 --- a/x-pack/plugins/security_solution/public/explore/network/containers/network_top_countries/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/network_top_countries/index.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { act, renderHook } from '@testing-library/react-hooks'; +import { renderHook, act } from '@testing-library/react'; import { TestProviders } from '../../../../common/mock'; import { ID, useNetworkTopCountries } from '.'; import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; diff --git a/x-pack/plugins/security_solution/public/explore/network/containers/network_top_n_flow/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/network_top_n_flow/index.test.tsx index 24c8a25e8bcd7..ed42e3307f06d 100644 --- a/x-pack/plugins/security_solution/public/explore/network/containers/network_top_n_flow/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/network_top_n_flow/index.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { act, renderHook } from '@testing-library/react-hooks'; +import { renderHook, act } from '@testing-library/react'; import { TestProviders } from '../../../../common/mock'; import { ID, useNetworkTopNFlow } from '.'; import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; diff --git a/x-pack/plugins/security_solution/public/explore/network/containers/tls/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/tls/index.test.tsx index b6fa06590f626..30fc83531feb1 100644 --- a/x-pack/plugins/security_solution/public/explore/network/containers/tls/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/tls/index.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { act, renderHook } from '@testing-library/react-hooks'; +import { renderHook, act } from '@testing-library/react'; import { TestProviders } from '../../../../common/mock'; import { ID, useNetworkTls } from '.'; import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; diff --git a/x-pack/plugins/security_solution/public/explore/network/containers/users/index.test.tsx b/x-pack/plugins/security_solution/public/explore/network/containers/users/index.test.tsx index a7f3eb69fc5ba..14b9c6d601375 100644 --- a/x-pack/plugins/security_solution/public/explore/network/containers/users/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/containers/users/index.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { act, renderHook } from '@testing-library/react-hooks'; +import { renderHook, act } from '@testing-library/react'; import { TestProviders } from '../../../../common/mock'; import { useNetworkUsers, ID } from '.'; import { useSearchStrategy } from '../../../../common/containers/use_search_strategy'; diff --git a/x-pack/plugins/security_solution/public/explore/users/containers/users/observed_details/index.test.tsx b/x-pack/plugins/security_solution/public/explore/users/containers/users/observed_details/index.test.tsx index f0e2536096421..951bfb20165e6 100644 --- a/x-pack/plugins/security_solution/public/explore/users/containers/users/observed_details/index.test.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/containers/users/observed_details/index.test.tsx @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { act, renderHook } from '@testing-library/react-hooks'; + +import { renderHook, act } from '@testing-library/react'; import { TestProviders } from '../../../../../common/mock'; import { useObservedUserDetails } from '.'; import { useSearchStrategy } from '../../../../../common/containers/use_search_strategy'; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/misconfiguration_insight.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/misconfiguration_insight.tsx index e7ebb371fb020..6ccada3134f9b 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/misconfiguration_insight.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/misconfiguration_insight.tsx @@ -10,7 +10,7 @@ import { EuiFlexItem, type EuiFlexGroupProps, useEuiTheme } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { css } from '@emotion/css'; import { useMisconfigurationPreview } from '@kbn/cloud-security-posture/src/hooks/use_misconfiguration_preview'; -import { buildEntityFlyoutPreviewQuery } from '@kbn/cloud-security-posture-common'; +import { buildGenericEntityFlyoutPreviewQuery } from '@kbn/cloud-security-posture-common'; import { MISCONFIGURATION_INSIGHT, uiMetricService, @@ -58,7 +58,7 @@ export const MisconfigurationsInsight: React.FC = const { scopeId, isPreview } = useDocumentDetailsContext(); const { euiTheme } = useEuiTheme(); const { data } = useMisconfigurationPreview({ - query: buildEntityFlyoutPreviewQuery(fieldName, name), + query: buildGenericEntityFlyoutPreviewQuery(fieldName, name), sort: [], enabled: true, pageSize: 1, diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/vulnerabilities_insight.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/vulnerabilities_insight.tsx index 1dab4660194b9..8991124a77e24 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/vulnerabilities_insight.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/vulnerabilities_insight.tsx @@ -10,7 +10,7 @@ import { EuiFlexItem, type EuiFlexGroupProps, useEuiTheme } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { css } from '@emotion/css'; import { useVulnerabilitiesPreview } from '@kbn/cloud-security-posture/src/hooks/use_vulnerabilities_preview'; -import { buildEntityFlyoutPreviewQuery } from '@kbn/cloud-security-posture-common'; +import { buildGenericEntityFlyoutPreviewQuery } from '@kbn/cloud-security-posture-common'; import { getVulnerabilityStats, hasVulnerabilitiesData } from '@kbn/cloud-security-posture'; import { uiMetricService, @@ -53,7 +53,7 @@ export const VulnerabilitiesInsight: React.FC = ({ const { scopeId, isPreview } = useDocumentDetailsContext(); const { euiTheme } = useEuiTheme(); const { data } = useVulnerabilitiesPreview({ - query: buildEntityFlyoutPreviewQuery('host.name', hostName), + query: buildGenericEntityFlyoutPreviewQuery('host.name', hostName), sort: [], enabled: true, pageSize: 1, diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/execute_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/execute_action.test.tsx index 7e2a5bf622233..cd125348a688b 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/execute_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/execute_action.test.tsx @@ -73,6 +73,7 @@ describe('When using execute action from response actions console', () => { endpointAgentId: 'a.b.c', endpointCapabilities: [...capabilities], endpointPrivileges, + platform: 'linux', }), }, }; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/get_file_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/get_file_action.test.tsx index 101c24c84e678..11fa0213394ce 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/get_file_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/get_file_action.test.tsx @@ -71,6 +71,7 @@ describe('When using get-file action from response actions console', () => { endpointAgentId: 'a.b.c', endpointCapabilities: [...ENDPOINT_CAPABILITIES], endpointPrivileges, + platform: 'linux', }; render = async (capabilities: EndpointCapabilities[] = [...ENDPOINT_CAPABILITIES]) => { diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/get_processes_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/get_processes_action.test.tsx index d1922a7bf6e59..48a837a574432 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/get_processes_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/get_processes_action.test.tsx @@ -59,6 +59,7 @@ describe('When using processes action from response actions console', () => { canSuspendProcess: true, canGetRunningProcesses: true, }, + platform: 'linux', }); }; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/isolate_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/isolate_action.test.tsx index b022fe15d5ed2..d702bfca9945d 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/isolate_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/isolate_action.test.tsx @@ -67,6 +67,7 @@ describe('When using isolate action from response actions console', () => { loading: false, canIsolateHost: true, }, + platform: 'linux', }), }, }; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/kill_process_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/kill_process_action.test.tsx index f1cf6937eef06..5f4a40b50d8a3 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/kill_process_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/kill_process_action.test.tsx @@ -63,6 +63,7 @@ describe.skip('When using the kill-process action from response actions console' canSuspendProcess: true, canGetRunningProcesses: true, }, + platform: 'linux', }); }; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/release_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/release_action.test.tsx index 75278dd0f2c01..8e98d05247947 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/release_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/release_action.test.tsx @@ -46,6 +46,7 @@ const prepareTest = () => { canUnIsolateHost: true, loading: false, }, + platform: 'linux', }), }, }; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/scan_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/scan_action.test.tsx index e0fde4a2133d2..f82ad0aa19b68 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/scan_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/scan_action.test.tsx @@ -83,6 +83,7 @@ describe('When using scan action from response actions console', () => { endpointAgentId: 'agent-a', endpointCapabilities: [...ENDPOINT_CAPABILITIES], endpointPrivileges, + platform: 'linux', }; render = async (capabilities: EndpointCapabilities[] = [...ENDPOINT_CAPABILITIES]) => { diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/status_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/status_action.test.tsx index 47f1c0b9a47e3..b1367ee132eeb 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/status_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/status_action.test.tsx @@ -111,6 +111,7 @@ describe.skip('When using processes action from response actions console', () => ...getEndpointAuthzInitialState(), loading: false, }, + platform: 'linux', }), }, }; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/suspend_process_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/suspend_process_action.test.tsx index 1492acd862879..dd69a31ad36ed 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/suspend_process_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/suspend_process_action.test.tsx @@ -73,6 +73,7 @@ describe('When using the suspend-process action from response actions console', canSuspendProcess: true, canGetRunningProcesses: true, }, + platform: 'linux', }), }, }; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/upload_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/upload_action.test.tsx index a6493430615ff..ced1ea4d0e0ad 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/upload_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/upload_action.test.tsx @@ -88,6 +88,7 @@ describe.skip('When using `upload` response action', () => { endpointAgentId: 'a.b.c', endpointCapabilities, endpointPrivileges, + platform: 'linux', }), }, }; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/lib/console_commands_definition.ts b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/lib/console_commands_definition.ts index c81674bd4f7b8..efc52fd59c326 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/lib/console_commands_definition.ts +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/lib/console_commands_definition.ts @@ -153,6 +153,8 @@ export interface GetEndpointConsoleCommandsOptions { /** Applicable only for Endpoint Agents */ endpointCapabilities: ImmutableArray; endpointPrivileges: EndpointPrivileges; + /** Host's platform: windows, linux, macos */ + platform: string; } export const getEndpointConsoleCommands = ({ @@ -160,6 +162,7 @@ export const getEndpointConsoleCommands = ({ agentType, endpointCapabilities, endpointPrivileges, + platform, }: GetEndpointConsoleCommandsOptions): CommandDefinition[] => { const featureFlags = ExperimentalFeaturesService.get(); @@ -523,7 +526,7 @@ export const getEndpointConsoleCommands = ({ switch (agentType) { case 'sentinel_one': - return adjustCommandsForSentinelOne({ commandList: consoleCommands }); + return adjustCommandsForSentinelOne({ commandList: consoleCommands, platform }); case 'crowdstrike': return adjustCommandsForCrowdstrike({ commandList: consoleCommands }); default: @@ -543,8 +546,10 @@ const disableCommand = (command: CommandDefinition, agentType: ResponseActionAge /** @private */ const adjustCommandsForSentinelOne = ({ commandList, + platform, }: { commandList: CommandDefinition[]; + platform: string; }): CommandDefinition[] => { const featureFlags = ExperimentalFeaturesService.get(); const isKillProcessEnabled = featureFlags.responseActionsSentinelOneKillProcessEnabled; @@ -580,6 +585,28 @@ const adjustCommandsForSentinelOne = ({ ) ) { disableCommand(command, 'sentinel_one'); + } else { + // processes is not currently supported for Windows hosts + if (command.name === 'processes' && platform.toLowerCase() === 'windows') { + const message = i18n.translate( + 'xpack.securitySolution.consoleCommandsDefinition.sentineloneProcessesWindowRestriction', + { + defaultMessage: + 'Processes command is not currently supported for SentinelOne hosts running on Windows', + } + ); + + command.helpDisabled = true; + command.about = getCommandAboutInfo({ + aboutInfo: command.about, + isSupported: false, + dataTestSubj: 'sentineloneProcessesWindowsWarningTooltip', + tooltipContent: message, + }); + command.validate = () => { + return message; + }; + } } return command; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/lib/get_command_about_info.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/lib/get_command_about_info.tsx index ddb5e345acc21..2b22d0067dc5b 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/lib/get_command_about_info.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/lib/get_command_about_info.tsx @@ -6,6 +6,7 @@ */ import React from 'react'; +import type { EuiToolTipProps } from '@elastic/eui'; import { EuiIconTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; @@ -17,23 +18,28 @@ const UNSUPPORTED_COMMAND_INFO = i18n.translate( } ); -const DisabledTooltip = React.memo(() => { - return ; -}); -DisabledTooltip.displayName = 'DisabledTooltip'; - export const getCommandAboutInfo = ({ aboutInfo, isSupported, + tooltipContent = UNSUPPORTED_COMMAND_INFO, + dataTestSubj, }: { - aboutInfo: string; + aboutInfo: React.ReactNode; isSupported: boolean; + tooltipContent?: EuiToolTipProps['content']; + dataTestSubj?: string; }) => { return isSupported ? ( aboutInfo ) : ( <> - {aboutInfo} + {aboutInfo}{' '} + ); }; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/lib/integration_tests/console_commands_definition.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/lib/integration_tests/console_commands_definition.test.tsx index 7c1e5cf118df0..caf33de458f83 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/lib/integration_tests/console_commands_definition.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/lib/integration_tests/console_commands_definition.test.tsx @@ -52,6 +52,7 @@ describe('When displaying Endpoint Response Actions', () => { endpointAgentId: '123', endpointCapabilities: endpointMetadata.Endpoint.capabilities ?? [], endpointPrivileges: getEndpointPrivilegesInitialStateMock(), + platform: 'linux', }); }); @@ -89,6 +90,8 @@ describe('When displaying Endpoint Response Actions', () => { responseActionsCrowdstrikeManualHostIsolationEnabled: true, responseActionsSentinelOneV1Enabled: true, responseActionsSentinelOneGetFileEnabled: true, + responseActionsSentinelOneKillProcessEnabled: true, + responseActionsSentinelOneProcessesEnabled: true, }); commands = getEndpointConsoleCommands({ @@ -96,6 +99,7 @@ describe('When displaying Endpoint Response Actions', () => { endpointAgentId: '123', endpointCapabilities: endpointMetadata.Endpoint.capabilities ?? [], endpointPrivileges: getEndpointPrivilegesInitialStateMock(), + platform: 'linux', }); }); @@ -110,13 +114,34 @@ describe('When displaying Endpoint Response Actions', () => { }); it('should display response action commands in the help panel in expected order', () => { - render({ commands }); + const { queryByTestId } = render({ commands }); consoleSelectors.openHelpPanel(); const commandsInPanel = helpPanelSelectors.getHelpCommandNames( HELP_GROUPS.responseActions.label ); - expect(commandsInPanel).toEqual(['isolate', 'release', 'get-file --path']); + expect(commandsInPanel).toEqual([ + 'isolate', + 'release', + 'processes', + 'kill-process --processName', + 'get-file --path', + ]); + expect(queryByTestId('sentineloneProcessesWindowsWarningTooltip')).toBeNull(); + }); + + it('should display warning icon on processes command if host is running on windows', () => { + commands = getEndpointConsoleCommands({ + agentType: 'sentinel_one', + endpointAgentId: '123', + endpointCapabilities: endpointMetadata.Endpoint.capabilities ?? [], + endpointPrivileges: getEndpointPrivilegesInitialStateMock(), + platform: 'windows', + }); + const { getByTestId } = render({ commands }); + consoleSelectors.openHelpPanel(); + + expect(getByTestId('sentineloneProcessesWindowsWarningTooltip')).not.toBeNull(); }); }); @@ -130,6 +155,7 @@ describe('When displaying Endpoint Response Actions', () => { endpointAgentId: '123', endpointCapabilities: endpointMetadata.Endpoint.capabilities ?? [], endpointPrivileges: getEndpointPrivilegesInitialStateMock(), + platform: 'linux', }); }); diff --git a/x-pack/plugins/security_solution/public/management/hooks/use_with_show_responder.tsx b/x-pack/plugins/security_solution/public/management/hooks/use_with_show_responder.tsx index f7622681112bd..e3e830efcb047 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/use_with_show_responder.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/use_with_show_responder.tsx @@ -71,6 +71,7 @@ export const useWithShowResponder = (): ShowResponseActionsConsole => { endpointAgentId: agentId, endpointCapabilities: capabilities, endpointPrivileges, + platform, }), 'data-test-subj': `${agentType}ResponseActionsConsole`, storagePrefix: 'xpack.securitySolution.Responder', diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx index bb6102e8051c4..579561573488c 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx @@ -56,7 +56,7 @@ export const useEndpointActionItems = ( const endpointMetadata = endpointInfo.metadata; const isIsolated = isEndpointHostIsolated(endpointMetadata); const endpointId = endpointMetadata.agent.id; - const endpointHostName = endpointMetadata.host.hostname; + const endpointHostName = endpointMetadata.host.hostname.toLowerCase(); const fleetAgentId = endpointMetadata.elastic.agent.id; const { show, selected_endpoint: _selectedEndpoint, ...currentUrlParams } = allCurrentUrlParams; const endpointActionsPath = getEndpointDetailsPath({ diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx index d0b05404dc16d..57b0dde41177d 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx @@ -1306,7 +1306,7 @@ describe('when on the endpoint list page', () => { it('navigates to the Security Solution Host Details page', async () => { const hostLink = await renderResult.findByTestId('hostLink'); expect(hostLink.getAttribute('href')).toEqual( - `${APP_PATH}/hosts/${hostInfo[0].metadata.host.hostname}` + `${APP_PATH}/hosts/${hostInfo[0].metadata.host.hostname.toLowerCase()}` ); }); it('navigates to the correct Ingest Agent Policy page', async () => { diff --git a/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/alerts/alerts_card.test.tsx b/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/alerts/alerts_card.test.tsx index 3e83bcb851f82..4fec865e36f24 100644 --- a/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/alerts/alerts_card.test.tsx +++ b/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/alerts/alerts_card.test.tsx @@ -14,6 +14,7 @@ const props = { checkComplete: jest.fn(), isCardComplete: jest.fn(), setExpandedCardId: jest.fn(), + isCardAvailable: jest.fn(), }; describe('AlertsCard', () => { @@ -31,7 +32,8 @@ describe('AlertsCard', () => { expect(getByTestId('alertsCardDescription')).toBeInTheDocument(); }); - it('card callout should be rendered if integrations cards is not complete', () => { + it('card callout should be rendered if integrations card is available but not complete', () => { + props.isCardAvailable.mockReturnValueOnce(true); props.isCardComplete.mockReturnValueOnce(false); const { getByText } = render( @@ -43,7 +45,20 @@ describe('AlertsCard', () => { expect(getByText('To view alerts add integrations first.')).toBeInTheDocument(); }); - it('card button should be disabled if integrations cards is not complete', () => { + it('card callout should not be rendered if integrations card is not available', () => { + props.isCardAvailable.mockReturnValueOnce(false); + + const { queryByText } = render( + + + + ); + + expect(queryByText('To view alerts add integrations first.')).not.toBeInTheDocument(); + }); + + it('card button should be disabled if integrations card is available but not complete', () => { + props.isCardAvailable.mockReturnValueOnce(true); props.isCardComplete.mockReturnValueOnce(false); const { getByTestId } = render( @@ -54,4 +69,17 @@ describe('AlertsCard', () => { expect(getByTestId('alertsCardButton').querySelector('button')).toBeDisabled(); }); + + it('card button should be enabled if integrations card is complete', () => { + props.isCardAvailable.mockReturnValueOnce(true); + props.isCardComplete.mockReturnValueOnce(true); + + const { getByTestId } = render( + + + + ); + + expect(getByTestId('alertsCardButton').querySelector('button')).not.toBeDisabled(); + }); }); diff --git a/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/alerts/alerts_card.tsx b/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/alerts/alerts_card.tsx index 890505f3f618b..bdcf662a5643c 100644 --- a/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/alerts/alerts_card.tsx +++ b/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/alerts/alerts_card.tsx @@ -21,12 +21,18 @@ export const AlertsCard: OnboardingCardComponent = ({ isCardComplete, setExpandedCardId, setComplete, + isCardAvailable, }) => { const isIntegrationsCardComplete = useMemo( () => isCardComplete(OnboardingCardId.integrations), [isCardComplete] ); + const isIntegrationsCardAvailable = useMemo( + () => isCardAvailable(OnboardingCardId.integrations), + [isCardAvailable] + ); + const expandIntegrationsCard = useCallback(() => { setExpandedCardId(OnboardingCardId.integrations, { scroll: true }); }, [setExpandedCardId]); @@ -43,7 +49,7 @@ export const AlertsCard: OnboardingCardComponent = ({ {i18n.ALERTS_CARD_DESCRIPTION} - {!isIntegrationsCardComplete && ( + {isIntegrationsCardAvailable && !isIntegrationsCardComplete && ( <> setComplete(true)} deepLinkId={SecurityPageName.alerts} fill - isDisabled={!isIntegrationsCardComplete} + isDisabled={isIntegrationsCardAvailable && !isIntegrationsCardComplete} > {i18n.ALERTS_CARD_VIEW_ALERTS_BUTTON} diff --git a/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/assistant/assistant_card.tsx b/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/assistant/assistant_card.tsx index 1d91413dbae3c..c971bd2a6f0b7 100644 --- a/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/assistant/assistant_card.tsx +++ b/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/assistant/assistant_card.tsx @@ -23,12 +23,18 @@ export const AssistantCard: OnboardingCardComponent = ({ setExpandedCardId, checkCompleteMetadata, checkComplete, + isCardAvailable, }) => { const isIntegrationsCardComplete = useMemo( () => isCardComplete(OnboardingCardId.integrations), [isCardComplete] ); + const isIntegrationsCardAvailable = useMemo( + () => isCardAvailable(OnboardingCardId.integrations), + [isCardAvailable] + ); + const expandIntegrationsCard = useCallback(() => { setExpandedCardId(OnboardingCardId.integrations, { scroll: true }); }, [setExpandedCardId]); @@ -45,13 +51,7 @@ export const AssistantCard: OnboardingCardComponent = ({ {i18n.ASSISTANT_CARD_DESCRIPTION} - {isIntegrationsCardComplete ? ( - - ) : ( + {isIntegrationsCardAvailable && !isIntegrationsCardComplete ? ( = ({ } /> + ) : ( + )} diff --git a/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/attack_discovery/attack_discover_card.test.tsx b/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/attack_discovery/attack_discover_card.test.tsx index 19b327f77487c..c28ae75b92c71 100644 --- a/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/attack_discovery/attack_discover_card.test.tsx +++ b/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/attack_discovery/attack_discover_card.test.tsx @@ -14,6 +14,7 @@ const props = { checkComplete: jest.fn(), isCardComplete: jest.fn(), setExpandedCardId: jest.fn(), + isCardAvailable: jest.fn(), }; describe('RulesCard', () => { diff --git a/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/dashboards/dashboards_card.test.tsx b/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/dashboards/dashboards_card.test.tsx index f7aa198eccab4..d654fd9ca5a08 100644 --- a/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/dashboards/dashboards_card.test.tsx +++ b/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/dashboards/dashboards_card.test.tsx @@ -17,9 +17,10 @@ const props = { checkComplete: jest.fn(), isCardComplete: jest.fn(), setExpandedCardId: jest.fn(), + isCardAvailable: jest.fn(), }; -describe('RulesCard', () => { +describe('DashboardsCard', () => { beforeEach(() => { jest.clearAllMocks(); }); @@ -34,7 +35,8 @@ describe('RulesCard', () => { expect(getByTestId('dashboardsDescription')).toBeInTheDocument(); }); - it('card callout should be rendered if integrations cards is not complete', () => { + it('card callout should be rendered if integrations card is available but not complete', () => { + props.isCardAvailable.mockReturnValueOnce(true); props.isCardComplete.mockReturnValueOnce(false); const { getByText } = render( @@ -46,7 +48,20 @@ describe('RulesCard', () => { expect(getByText('To view dashboards add integrations first.')).toBeInTheDocument(); }); - it('card button should be disabled if integrations cards is not complete', () => { + it('card callout should not be rendered if integrations card is not available', () => { + props.isCardAvailable.mockReturnValueOnce(false); + + const { queryByText } = render( + + + + ); + + expect(queryByText('To view dashboards add integrations first.')).not.toBeInTheDocument(); + }); + + it('card button should be disabled if integrations card is available but not complete', () => { + props.isCardAvailable.mockReturnValueOnce(true); props.isCardComplete.mockReturnValueOnce(false); const { getByTestId } = render( @@ -57,7 +72,22 @@ describe('RulesCard', () => { expect(getByTestId('dashboardsCardButton').querySelector('button')).toBeDisabled(); }); + + it('card button should be enabled if integrations card is complete', () => { + props.isCardAvailable.mockReturnValueOnce(true); + props.isCardComplete.mockReturnValueOnce(true); + + const { getByTestId } = render( + + + + ); + + expect(getByTestId('dashboardsCardButton').querySelector('button')).not.toBeDisabled(); + }); + it('should expand integrations card when callout link is clicked', () => { + props.isCardAvailable.mockReturnValueOnce(true); props.isCardComplete.mockReturnValueOnce(false); // To show the callout const { getByTestId } = render( diff --git a/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/dashboards/dashboards_card.tsx b/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/dashboards/dashboards_card.tsx index 94449cce5ad0e..db7f6dc9a1f7f 100644 --- a/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/dashboards/dashboards_card.tsx +++ b/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/dashboards/dashboards_card.tsx @@ -21,12 +21,18 @@ export const DashboardsCard: OnboardingCardComponent = ({ isCardComplete, setComplete, setExpandedCardId, + isCardAvailable, }) => { const isIntegrationsCardComplete = useMemo( () => isCardComplete(OnboardingCardId.integrations), [isCardComplete] ); + const isIntegrationsCardAvailable = useMemo( + () => isCardAvailable(OnboardingCardId.integrations), + [isCardAvailable] + ); + const expandIntegrationsCard = useCallback(() => { setExpandedCardId(OnboardingCardId.integrations, { scroll: true }); }, [setExpandedCardId]); @@ -46,7 +52,7 @@ export const DashboardsCard: OnboardingCardComponent = ({ {i18n.DASHBOARDS_CARD_DESCRIPTION} - {!isIntegrationsCardComplete && ( + {isIntegrationsCardAvailable && !isIntegrationsCardComplete && ( <> {i18n.DASHBOARDS_CARD_GO_TO_DASHBOARDS_BUTTON} diff --git a/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/integrations/integrations_card.test.tsx b/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/integrations/integrations_card.test.tsx index 296d5391fd611..c01fbfa96123d 100644 --- a/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/integrations/integrations_card.test.tsx +++ b/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/integrations/integrations_card.test.tsx @@ -15,6 +15,7 @@ const props = { checkComplete: jest.fn(), isCardComplete: jest.fn(), setExpandedCardId: jest.fn(), + isCardAvailable: jest.fn(), }; describe('IntegrationsCard', () => { diff --git a/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/rules/rules_card.test.tsx b/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/rules/rules_card.test.tsx index f7156adc34eba..e32d13b787a51 100644 --- a/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/rules/rules_card.test.tsx +++ b/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/rules/rules_card.test.tsx @@ -13,6 +13,7 @@ const props = { setComplete: jest.fn(), checkComplete: jest.fn(), isCardComplete: jest.fn(), + isCardAvailable: jest.fn(), setExpandedCardId: jest.fn(), }; @@ -31,7 +32,8 @@ describe('RulesCard', () => { expect(getByTestId('rulesCardDescription')).toBeInTheDocument(); }); - it('card callout should be rendered if integrations cards is not complete', () => { + it('card callout should be rendered if integrations card is available but not complete', () => { + props.isCardAvailable.mockReturnValueOnce(true); props.isCardComplete.mockReturnValueOnce(false); const { getByText } = render( @@ -43,7 +45,20 @@ describe('RulesCard', () => { expect(getByText('To add Elastic rules add integrations first.')).toBeInTheDocument(); }); - it('card button should be disabled if integrations cards is not complete', () => { + it('card callout should not be rendered if integrations card is not available', () => { + props.isCardAvailable.mockReturnValueOnce(false); + + const { queryByText } = render( + + + + ); + + expect(queryByText('To add Elastic rules add integrations first.')).not.toBeInTheDocument(); + }); + + it('card button should be disabled if integrations card is available but not complete', () => { + props.isCardAvailable.mockReturnValueOnce(true); props.isCardComplete.mockReturnValueOnce(false); const { getByTestId } = render( @@ -54,4 +69,17 @@ describe('RulesCard', () => { expect(getByTestId('rulesCardButton').querySelector('button')).toBeDisabled(); }); + + it('card button should be enabled if integrations card is complete', () => { + props.isCardAvailable.mockReturnValueOnce(true); + props.isCardComplete.mockReturnValueOnce(true); + + const { getByTestId } = render( + + + + ); + + expect(getByTestId('rulesCardButton').querySelector('button')).not.toBeDisabled(); + }); }); diff --git a/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/rules/rules_card.tsx b/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/rules/rules_card.tsx index 1fc74109ca824..c1eb789d6a46f 100644 --- a/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/rules/rules_card.tsx +++ b/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/cards/rules/rules_card.tsx @@ -17,12 +17,21 @@ import { CardSubduedText } from '../common/card_subdued_text'; import rulesImageSrc from './images/rules.png'; import * as i18n from './translations'; -export const RulesCard: OnboardingCardComponent = ({ isCardComplete, setExpandedCardId }) => { +export const RulesCard: OnboardingCardComponent = ({ + isCardComplete, + setExpandedCardId, + isCardAvailable, +}) => { const isIntegrationsCardComplete = useMemo( () => isCardComplete(OnboardingCardId.integrations), [isCardComplete] ); + const isIntegrationsCardAvailable = useMemo( + () => isCardAvailable(OnboardingCardId.integrations), + [isCardAvailable] + ); + const expandIntegrationsCard = useCallback(() => { setExpandedCardId(OnboardingCardId.integrations, { scroll: true }); }, [setExpandedCardId]); @@ -39,7 +48,7 @@ export const RulesCard: OnboardingCardComponent = ({ isCardComplete, setExpanded {i18n.RULES_CARD_DESCRIPTION} - {!isIntegrationsCardComplete && ( + {isIntegrationsCardAvailable && !isIntegrationsCardComplete && ( <> {i18n.RULES_CARD_ADD_RULES_BUTTON} diff --git a/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/hooks/use_expanded_card.test.ts b/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/hooks/use_expanded_card.test.ts index 26612d83b565f..0c053b5ea0b69 100644 --- a/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/hooks/use_expanded_card.test.ts +++ b/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/hooks/use_expanded_card.test.ts @@ -6,12 +6,9 @@ */ import { renderHook, act } from '@testing-library/react-hooks'; -import { useExpandedCard } from './use_expanded_card'; -import { HEIGHT_ANIMATION_DURATION } from '../onboarding_card_panel.styles'; -import type { OnboardingCardId } from '../../../constants'; import { waitFor } from '@testing-library/react'; - -const scrollTimeout = HEIGHT_ANIMATION_DURATION + 50; +import type { OnboardingCardId } from '../../../constants'; +import { useExpandedCard } from './use_expanded_card'; const mockSetCardDetail = jest.fn(); jest.mock('../../hooks/use_url_detail', () => ({ @@ -28,6 +25,7 @@ describe('useExpandedCard Hook', () => { const mockCardId = 'card-1' as OnboardingCardId; const mockScrollTo = jest.fn(); global.window.scrollTo = mockScrollTo; + jest.useFakeTimers(); const mockGetElementById = jest.fn().mockReturnValue({ focus: jest.fn(), @@ -46,13 +44,10 @@ describe('useExpandedCard Hook', () => { it('should scroll to the expanded card id from the hash', async () => { // Ensure that scroll and focus were triggered - await waitFor( - () => { - expect(mockGetElementById).toHaveBeenCalledWith(mockCardId); - expect(mockScrollTo).toHaveBeenCalledWith({ top: 60, behavior: 'smooth' }); - }, - { timeout: scrollTimeout } - ); + await waitFor(() => { + expect(mockGetElementById).toHaveBeenCalledWith(mockCardId); + expect(mockScrollTo).toHaveBeenCalledWith({ top: 60, behavior: 'smooth' }); + }); }); }); @@ -78,13 +73,10 @@ describe('useExpandedCard Hook', () => { it('should not scroll', async () => { // Ensure that scroll and focus were triggered - await waitFor( - () => { - expect(mockGetElementById).not.toHaveBeenCalled(); - expect(mockScrollTo).not.toHaveBeenCalled(); - }, - { timeout: scrollTimeout } - ); + await waitFor(() => { + expect(mockGetElementById).not.toHaveBeenCalled(); + expect(mockScrollTo).not.toHaveBeenCalled(); + }); }); }); @@ -102,13 +94,10 @@ describe('useExpandedCard Hook', () => { it('should scroll', async () => { // Ensure that scroll and focus were triggered - await waitFor( - () => { - expect(mockGetElementById).toHaveBeenCalledWith(mockCardId); - expect(mockScrollTo).toHaveBeenCalledWith({ top: 160, behavior: 'smooth' }); - }, - { timeout: scrollTimeout } - ); + await waitFor(() => { + expect(mockGetElementById).toHaveBeenCalledWith(mockCardId); + expect(mockScrollTo).toHaveBeenCalledWith({ top: 160, behavior: 'smooth' }); + }); }); }); }); diff --git a/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/onboarding_body.tsx b/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/onboarding_body.tsx index 0b55db750c080..947a0dff46343 100644 --- a/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/onboarding_body.tsx +++ b/x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/onboarding_body.tsx @@ -14,6 +14,7 @@ import { OnboardingCardGroup } from './onboarding_card_group'; import { OnboardingCardPanel } from './onboarding_card_panel'; import { useExpandedCard } from './hooks/use_expanded_card'; import { useCompletedCards } from './hooks/use_completed_cards'; +import type { IsCardAvailable } from '../../types'; export const OnboardingBody = React.memo(() => { const bodyConfig = useBodyConfig(); @@ -47,6 +48,12 @@ export const OnboardingBody = React.memo(() => { [checkCardComplete] ); + const isCardAvailable = useCallback( + (cardId: OnboardingCardId) => + bodyConfig.some((group) => group.cards.some((card) => card.id === cardId)), + [bodyConfig] + ); + return ( {bodyConfig.map((group, index) => ( @@ -72,6 +79,7 @@ export const OnboardingBody = React.memo(() => { setComplete={createSetCardComplete(id)} checkComplete={createCheckCardComplete(id)} isCardComplete={isCardComplete} + isCardAvailable={isCardAvailable} setExpandedCardId={setExpandedCardId} checkCompleteMetadata={cardCheckCompleteResult?.metadata} /> diff --git a/x-pack/plugins/security_solution/public/onboarding/types.ts b/x-pack/plugins/security_solution/public/onboarding/types.ts index d79dd73ced799..d9c5aa2c9bc20 100644 --- a/x-pack/plugins/security_solution/public/onboarding/types.ts +++ b/x-pack/plugins/security_solution/public/onboarding/types.ts @@ -42,6 +42,7 @@ export type CheckCompleteResponse = export type SetComplete = (isComplete: boolean) => void; export type IsCardComplete = (cardId: OnboardingCardId) => boolean; +export type IsCardAvailable = (cardId: OnboardingCardId) => boolean; export type SetExpandedCardId = ( cardId: OnboardingCardId | null, options?: { scroll?: boolean } @@ -60,6 +61,10 @@ export type OnboardingCardComponent = React.Component * Function to check if a specific card is complete. */ isCardComplete: IsCardComplete; + /** + * Function to check if a specific card is rendered. + */ + isCardAvailable: IsCardAvailable; /** * Function to expand a specific card ID and scroll to it. */ diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/use_alerts_by_status.test.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/use_alerts_by_status.test.tsx index b7df916c60342..109878a1a8ba3 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/use_alerts_by_status.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/use_alerts_by_status.test.tsx @@ -5,12 +5,11 @@ * 2.0. */ -import type { PropsWithChildren } from 'react'; -import { renderHook } from '@testing-library/react-hooks'; +import { renderHook } from '@testing-library/react'; import { TestProviders } from '../../../../common/mock'; import { ALERTS_QUERY_NAMES } from '../../../../detections/containers/detection_engine/alerts/constants'; import { from, mockAlertsData, alertsByStatusQuery, parsedMockAlertsData, to } from './mock_data'; -import type { UseAlertsByStatus, UseAlertsByStatusProps } from './use_alerts_by_status'; +import type { UseAlertsByStatusProps } from './use_alerts_by_status'; import { useAlertsByStatus } from './use_alerts_by_status'; const dateNow = new Date('2022-04-08T12:00:00.000Z').valueOf(); @@ -43,7 +42,7 @@ jest.mock('../../../../common/containers/use_global_time', () => { // helper function to render the hook const renderUseAlertsByStatus = (props: Partial = {}) => - renderHook, ReturnType>( + renderHook( () => useAlertsByStatus({ queryId: 'test', diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/use_alerts_by_status_visualization_data.test.ts b/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/use_alerts_by_status_visualization_data.test.ts index 44ad581103393..a805a44f05456 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/use_alerts_by_status_visualization_data.test.ts +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/alerts_by_status/use_alerts_by_status_visualization_data.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { renderHook } from '@testing-library/react-hooks'; +import { renderHook } from '@testing-library/react'; import { useVisualizationResponse } from '../../../../common/components/visualization_actions/use_visualization_response'; import { acknowledgedAlertsVisualizationId, diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_by_status/use_cases_by_status.test.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_by_status/use_cases_by_status.test.tsx index 4c0796dacd3b6..bdb43e4044b8a 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_by_status/use_cases_by_status.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_by_status/use_cases_by_status.test.tsx @@ -5,12 +5,10 @@ * 2.0. */ -import type { PropsWithChildren } from 'react'; -import { renderHook, act } from '@testing-library/react-hooks'; +import { waitFor, renderHook } from '@testing-library/react'; import { mockCasesContract } from '@kbn/cases-plugin/public/mocks'; import { useKibana } from '../../../../common/lib/kibana'; import { TestProviders } from '../../../../common/mock'; -import type { UseCasesByStatusProps, UseCasesByStatusResults } from './use_cases_by_status'; import { useCasesByStatus } from './use_cases_by_status'; const dateNow = new Date('2022-04-08T12:00:00.000Z').valueOf(); @@ -40,14 +38,6 @@ mockGetCasesMetrics.mockResolvedValue({ }, }); -mockGetCasesMetrics.mockResolvedValueOnce({ - status: { - open: 0, - inProgress: 0, - closed: 0, - }, -}); - const mockUseKibana = { services: { cases: { @@ -67,81 +57,88 @@ describe('useCasesByStatus', () => { beforeEach(() => { jest.clearAllMocks(); }); - test('init', () => { - const { result } = renderHook< - PropsWithChildren, - UseCasesByStatusResults - >(() => useCasesByStatus({}), { + test('init', async () => { + mockGetCasesMetrics.mockResolvedValueOnce({ + status: { + open: 0, + inProgress: 0, + closed: 0, + }, + }); + + const { result } = renderHook(() => useCasesByStatus({}), { wrapper: TestProviders, }); - expect(result.current).toEqual({ - closed: 0, - inProgress: 0, - isLoading: true, - open: 0, - totalCounts: 0, - updatedAt: dateNow, + + await waitFor(() => { + expect(result.current).toEqual({ + closed: 0, + inProgress: 0, + isLoading: true, + open: 0, + totalCounts: 0, + updatedAt: dateNow, + }); }); }); test('fetch data', async () => { - const { result, waitForNextUpdate } = renderHook< - PropsWithChildren, - UseCasesByStatusResults - >(() => useCasesByStatus({ skip: false }), { + const { result } = renderHook(() => useCasesByStatus({ skip: false }), { wrapper: TestProviders, }); - await waitForNextUpdate(); - expect(result.current).toEqual({ - closed: 3, - inProgress: 2, - isLoading: false, - open: 1, - totalCounts: 6, - updatedAt: dateNow, + await waitFor(() => { + expect(result.current.isLoading).toBe(false); + expect(result.current).toEqual({ + closed: 3, + inProgress: 2, + isLoading: false, + open: 1, + totalCounts: 6, + updatedAt: dateNow, + }); }); }); test('it should call setQuery when fetching', async () => { - const { waitForNextUpdate } = renderHook< - PropsWithChildren, - UseCasesByStatusResults - >(() => useCasesByStatus({ skip: false }), { + renderHook(() => useCasesByStatus({ skip: false }), { wrapper: TestProviders, }); - await waitForNextUpdate(); - expect(mockSetQuery).toHaveBeenCalled(); + await waitFor(() => expect(mockSetQuery).toHaveBeenCalled()); }); test('it should call deleteQuery when unmounting', async () => { - const { waitForNextUpdate, unmount } = renderHook< - PropsWithChildren, - UseCasesByStatusResults - >(() => useCasesByStatus({ skip: false }), { + // muting setState warning that happens on unmount + // because it's a noop and going to be removed + // in the next version of React + const consoleError = jest.spyOn(console, 'error').mockImplementation(() => {}); + const { unmount } = renderHook(() => useCasesByStatus({ skip: false }), { wrapper: TestProviders, }); - await waitForNextUpdate(); unmount(); - expect(mockDeleteQuery).toHaveBeenCalled(); + waitFor(() => { + expect(mockDeleteQuery).toHaveBeenCalled(); + }); + + consoleError.mockRestore(); }); test('skip', async () => { const abortSpy = jest.spyOn(AbortController.prototype, 'abort'); const localProps = { skip: false }; - const { rerender, waitForNextUpdate } = renderHook< - PropsWithChildren, - UseCasesByStatusResults - >(() => useCasesByStatus(localProps), { + const { rerender } = renderHook(() => useCasesByStatus(localProps), { wrapper: TestProviders, }); - await waitForNextUpdate(); localProps.skip = true; - act(() => rerender()); - act(() => rerender()); - expect(abortSpy).toHaveBeenCalledTimes(2); + + rerender(); + rerender(); + + await waitFor(() => { + expect(abortSpy).toHaveBeenCalledTimes(2); + }); }); }); diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_table/use_case_items.test.ts b/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_table/use_case_items.test.ts index 9076c0daa7da6..ef278f81004db 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_table/use_case_items.test.ts +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/cases_table/use_case_items.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { act, renderHook } from '@testing-library/react-hooks'; +import { waitFor, renderHook } from '@testing-library/react'; import { mockCasesResult, parsedCasesItems } from './mock_data'; import { useCaseItems } from './use_case_items'; @@ -32,6 +32,7 @@ const mockKibana = { }, }, }; + jest.mock('../../../../common/lib/kibana', () => ({ useKibana: () => mockKibana, })); @@ -51,7 +52,7 @@ jest.mock('../../../../common/containers/use_global_time', () => { }); const renderUseCaseItems = (overrides: Partial = {}) => - renderHook>(() => + renderHook, UseCaseItems>(() => useCaseItems({ skip: false, ...overrides }) ); @@ -63,59 +64,55 @@ describe('useCaseItems', () => { }); it('should return default values', async () => { - const { result, waitForNextUpdate } = renderUseCaseItems(); - - await waitForNextUpdate(); - - expect(result.current).toEqual({ - items: [], - isLoading: false, - updatedAt: dateNow, - }); - - expect(mockCasesApi).toBeCalledWith({ - from: '2020-07-07T08:20:18.966Z', - to: '2020-07-08T08:20:18.966Z', - owner: 'securitySolution', - sortField: 'createdAt', - sortOrder: 'desc', - page: 1, - perPage: 4, + const { result } = renderUseCaseItems(); + + await waitFor(() => { + expect(result.current).toEqual({ + items: [], + isLoading: false, + updatedAt: dateNow, + }); + + expect(mockCasesApi).toBeCalledWith({ + from: '2020-07-07T08:20:18.966Z', + to: '2020-07-08T08:20:18.966Z', + owner: 'securitySolution', + sortField: 'createdAt', + sortOrder: 'desc', + page: 1, + perPage: 4, + }); }); }); it('should return parsed items', async () => { mockCasesApi.mockReturnValue(mockCasesResult); - const { result, waitForNextUpdate } = renderUseCaseItems(); - - await waitForNextUpdate(); - - expect(result.current).toEqual({ - items: parsedCasesItems, - isLoading: false, - updatedAt: dateNow, - }); + const { result } = renderUseCaseItems(); + + await waitFor(() => + expect(result.current).toEqual({ + items: parsedCasesItems, + isLoading: false, + updatedAt: dateNow, + }) + ); }); test('it should call setQuery when fetching', async () => { mockCasesApi.mockReturnValue(mockCasesResult); - const { waitForNextUpdate } = renderUseCaseItems(); + renderUseCaseItems(); - await waitForNextUpdate(); - - expect(mockSetQuery).toHaveBeenCalled(); + await waitFor(() => expect(mockSetQuery).toHaveBeenCalled()); }); test('it should call deleteQuery when unmounting', async () => { - const { waitForNextUpdate, unmount } = renderUseCaseItems(); + const { unmount } = renderUseCaseItems(); - await waitForNextUpdate(); + unmount(); - act(() => { - unmount(); + await waitFor(() => { + expect(mockDeleteQuery).toHaveBeenCalled(); }); - - expect(mockDeleteQuery).toHaveBeenCalled(); }); it('should return new updatedAt', async () => { @@ -124,15 +121,15 @@ describe('useCaseItems', () => { mockDateNow.mockReturnValueOnce(dateNow); mockCasesApi.mockReturnValue(mockCasesResult); - const { result, waitForNextUpdate } = renderUseCaseItems(); - - await waitForNextUpdate(); + const { result } = renderUseCaseItems(); - expect(mockDateNow).toHaveBeenCalled(); - expect(result.current).toEqual({ - items: parsedCasesItems, - isLoading: false, - updatedAt: newDateNow, + await waitFor(() => { + expect(mockDateNow).toHaveBeenCalled(); + expect(result.current).toEqual({ + items: parsedCasesItems, + isLoading: false, + updatedAt: newDateNow, + }); }); }); diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/hooks/use_navigate_to_timeline.test.ts b/x-pack/plugins/security_solution/public/overview/components/detection_response/hooks/use_navigate_to_timeline.test.ts index ce779a2c29202..49f3281f14e1d 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/hooks/use_navigate_to_timeline.test.ts +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/hooks/use_navigate_to_timeline.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { renderHook } from '@testing-library/react-hooks'; +import { renderHook } from '@testing-library/react'; import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; import { updateProviders } from '../../../../timelines/store/actions'; diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/host_alerts_table/use_host_alerts_items.test.ts b/x-pack/plugins/security_solution/public/overview/components/detection_response/host_alerts_table/use_host_alerts_items.test.ts index d38f0a4bfaa77..c536628bfe48f 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/host_alerts_table/use_host_alerts_items.test.ts +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/host_alerts_table/use_host_alerts_items.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { renderHook } from '@testing-library/react-hooks'; +import { renderHook } from '@testing-library/react'; import { mockQuery, @@ -51,7 +51,7 @@ jest.mock('../../../../common/containers/use_global_time', () => { }); const renderUseHostAlertsItems = (overrides: Partial = {}) => - renderHook>(() => + renderHook, UseHostAlertsItemsProps>(() => useHostAlertsItems({ skip: false, signalIndexName, diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/use_rule_alerts_items.test.ts b/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/use_rule_alerts_items.test.ts index bf60d795c26f1..3765373c4f9dc 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/use_rule_alerts_items.test.ts +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/rule_alerts_table/use_rule_alerts_items.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { renderHook } from '@testing-library/react-hooks'; +import { renderHook } from '@testing-library/react'; import { ALERTS_QUERY_NAMES } from '../../../../detections/containers/detection_engine/alerts/constants'; import { @@ -49,7 +49,7 @@ jest.mock('../../../../common/containers/use_global_time', () => { // helper function to render the hook const renderUseRuleAlertsItems = (props: Partial = {}) => - renderHook>(() => + renderHook, UseRuleAlertsItemsProps>(() => useRuleAlertsItems({ queryId: 'test', signalIndexName: 'signal-alerts', diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/soc_trends/hooks/use_cases_mttr.test.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/soc_trends/hooks/use_cases_mttr.test.tsx index 8658571d03901..8fd3602b8e62e 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/soc_trends/hooks/use_cases_mttr.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/soc_trends/hooks/use_cases_mttr.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import type { UseCasesMttr } from './use_cases_mttr'; import { useCasesMttr } from './use_cases_mttr'; -import { act, renderHook } from '@testing-library/react-hooks'; +import { act, waitFor, renderHook } from '@testing-library/react'; import { TestProviders } from '../../../../../common/mock'; import { useKibana as useKibanaMock } from '../../../../../common/lib/kibana/__mocks__'; import * as i18n from '../translations'; @@ -53,12 +53,13 @@ describe('useCasesMttr', () => { afterEach(() => { jest.clearAllMocks(); }); + it('loads initial state', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => useCasesMttr(props), { - wrapper: wrapperContainer, - }); - await waitForNextUpdate(); + const { result } = renderHook(() => useCasesMttr(props), { + wrapper: wrapperContainer, + }); + + await waitFor(() => { expect(result.current).toEqual({ stat: '-', isLoading: true, @@ -71,16 +72,15 @@ describe('useCasesMttr', () => { }); }); }); + it('finds positive percentage change', async () => { useKibanaMock().services.cases.api.cases.getCasesMetrics = mockGetCasesMetrics .mockReturnValueOnce({ mttr: 10000 }) .mockReturnValue({ mttr: 5000 }); - await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => useCasesMttr(props), { - wrapper: wrapperContainer, - }); - await waitForNextUpdate(); - await waitForNextUpdate(); + const { result } = renderHook(() => useCasesMttr(props), { + wrapper: wrapperContainer, + }); + await waitFor(() => expect(result.current).toEqual({ stat: '2h', isLoading: false, @@ -95,19 +95,17 @@ describe('useCasesMttr', () => { }), }, ...basicData, - }); - }); + }) + ); }); it('finds negative percentage change', async () => { useKibanaMock().services.cases.api.cases.getCasesMetrics = mockGetCasesMetrics .mockReturnValueOnce({ mttr: 5000 }) .mockReturnValue({ mttr: 10000 }); - await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => useCasesMttr(props), { - wrapper: wrapperContainer, - }); - await waitForNextUpdate(); - await waitForNextUpdate(); + const { result } = renderHook(() => useCasesMttr(props), { + wrapper: wrapperContainer, + }); + await waitFor(() => expect(result.current).toEqual({ stat: '1h', isLoading: false, @@ -122,19 +120,17 @@ describe('useCasesMttr', () => { }), }, ...basicData, - }); - }); + }) + ); }); it('finds zero percentage change', async () => { useKibanaMock().services.cases.api.cases.getCasesMetrics = mockGetCasesMetrics.mockReturnValue({ mttr: 10000, }); - await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => useCasesMttr(props), { - wrapper: wrapperContainer, - }); - await waitForNextUpdate(); - await waitForNextUpdate(); + const { result } = renderHook(() => useCasesMttr(props), { + wrapper: wrapperContainer, + }); + await waitFor(() => expect(result.current).toEqual({ stat: '2h', isLoading: false, @@ -144,19 +140,17 @@ describe('useCasesMttr', () => { note: i18n.NO_CHANGE('case resolution time'), }, ...basicData, - }); - }); + }) + ); }); it('handles null mttr - current time range', async () => { useKibanaMock().services.cases.api.cases.getCasesMetrics = mockGetCasesMetrics .mockReturnValueOnce({ mttr: null }) .mockReturnValue({ mttr: 10000 }); - await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => useCasesMttr(props), { - wrapper: wrapperContainer, - }); - await waitForNextUpdate(); - await waitForNextUpdate(); + const { result } = renderHook(() => useCasesMttr(props), { + wrapper: wrapperContainer, + }); + await waitFor(() => expect(result.current).toEqual({ stat: '-', isLoading: false, @@ -166,19 +160,17 @@ describe('useCasesMttr', () => { note: i18n.NO_DATA_CURRENT('case'), }, ...basicData, - }); - }); + }) + ); }); it('handles null mttr - compare time range', async () => { useKibanaMock().services.cases.api.cases.getCasesMetrics = mockGetCasesMetrics .mockReturnValueOnce({ mttr: 10000 }) .mockReturnValue({ mttr: null }); - await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => useCasesMttr(props), { - wrapper: wrapperContainer, - }); - await waitForNextUpdate(); - await waitForNextUpdate(); + const { result } = renderHook(() => useCasesMttr(props), { + wrapper: wrapperContainer, + }); + await waitFor(() => expect(result.current).toEqual({ stat: '2h', isLoading: false, @@ -188,8 +180,8 @@ describe('useCasesMttr', () => { note: i18n.NO_DATA_COMPARE('case'), }, ...basicData, - }); - }); + }) + ); }); it('handles null mttr - current & compare time range', async () => { useKibanaMock().services.cases.api.cases.getCasesMetrics = mockGetCasesMetrics @@ -198,13 +190,11 @@ describe('useCasesMttr', () => { .mockReturnValue({ mttr: null, }); - await act(async () => { - let ourProps = props; - const { result, rerender, waitForNextUpdate } = renderHook(() => useCasesMttr(ourProps), { - wrapper: wrapperContainer, - }); - await waitForNextUpdate(); - await waitForNextUpdate(); + let ourProps = props; + const { result, rerender } = renderHook(() => useCasesMttr(ourProps), { + wrapper: wrapperContainer, + }); + await waitFor(() => expect(result.current).toEqual({ stat: '2h', isLoading: false, @@ -214,14 +204,16 @@ describe('useCasesMttr', () => { note: i18n.NO_CHANGE('case resolution time'), }, ...basicData, - }); - ourProps = { - ...props, - from: '2020-07-08T08:20:18.966Z', - to: '2020-07-09T08:20:18.966Z', - }; - rerender(); - await waitForNextUpdate(); + }) + ); + + ourProps = { + ...props, + from: '2020-07-08T08:20:18.966Z', + to: '2020-07-09T08:20:18.966Z', + }; + rerender(); + await waitFor(() => expect(result.current).toEqual({ stat: '-', isLoading: false, @@ -231,8 +223,8 @@ describe('useCasesMttr', () => { note: i18n.NO_DATA('case'), }, ...basicData, - }); - }); + }) + ); }); it('handles undefined mttr - current & compare time range', async () => { useKibanaMock().services.cases.api.cases.getCasesMetrics = mockGetCasesMetrics @@ -241,13 +233,12 @@ describe('useCasesMttr', () => { .mockReturnValue({ mttr: undefined, }); - await act(async () => { - let ourProps = props; - const { result, rerender, waitForNextUpdate } = renderHook(() => useCasesMttr(ourProps), { - wrapper: wrapperContainer, - }); - await waitForNextUpdate(); - await waitForNextUpdate(); + let ourProps = props; + const { result, rerender } = renderHook(() => useCasesMttr(ourProps), { + wrapper: wrapperContainer, + }); + + await waitFor(() => expect(result.current).toEqual({ stat: '2h', isLoading: false, @@ -257,15 +248,21 @@ describe('useCasesMttr', () => { note: i18n.NO_CHANGE('case resolution time'), }, ...basicData, - }); - ourProps = { - ...props, - from: '2020-07-08T08:20:18.966Z', - to: '2020-07-09T08:20:18.966Z', - }; + }) + ); + + ourProps = { + ...props, + from: '2020-07-08T08:20:18.966Z', + to: '2020-07-09T08:20:18.966Z', + }; + + act(() => { rerender(); rerender(); - await waitForNextUpdate(); + }); + + await waitFor(() => expect(result.current).toEqual({ stat: '-', isLoading: false, @@ -275,7 +272,7 @@ describe('useCasesMttr', () => { note: i18n.NO_DATA('case'), }, ...basicData, - }); - }); + }) + ); }); }); diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/soc_trends/hooks/use_critical_alerts.test.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/soc_trends/hooks/use_critical_alerts.test.tsx index 7a63e93e6c765..16607879a8fe8 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/soc_trends/hooks/use_critical_alerts.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/soc_trends/hooks/use_critical_alerts.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import type { UseCriticalAlerts } from './use_critical_alerts'; import { useCriticalAlerts } from './use_critical_alerts'; -import { act, renderHook } from '@testing-library/react-hooks'; +import { waitFor, renderHook } from '@testing-library/react'; import { TestProviders } from '../../../../../common/mock'; import * as i18n from '../translations'; import { useQueryAlerts } from '../../../../../detections/containers/detection_engine/alerts/use_query'; @@ -66,14 +66,20 @@ describe('useCriticalAlerts', () => { jest.clearAllMocks(); }); it('loads initial state', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => useCriticalAlerts(props), { - wrapper: wrapperContainer, - }); - await waitForNextUpdate(); + // mock useQuery into state before data fetch + mockUseQueryAlerts.mockReturnValue({ + ...basicReturn, + data: null, + }); + + const { result } = renderHook(() => useCriticalAlerts(props), { + wrapper: wrapperContainer, + }); + + await waitFor(() => { expect(result.current).toEqual({ stat: '-', - isLoading: true, + isLoading: false, percentage: { percent: null, color: 'hollow', @@ -95,12 +101,10 @@ describe('useCriticalAlerts', () => { ...basicReturn, } ); - await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => useCriticalAlerts(props), { - wrapper: wrapperContainer, - }); - await waitForNextUpdate(); - await waitForNextUpdate(); + const { result } = renderHook(() => useCriticalAlerts(props), { + wrapper: wrapperContainer, + }); + await waitFor(() => expect(result.current).toEqual({ stat: '100', isLoading: false, @@ -115,8 +119,8 @@ describe('useCriticalAlerts', () => { }), }, ...basicData, - }); - }); + }) + ); }); it('finds negative percentage change', async () => { mockUseQueryAlerts.mockImplementation((args) => @@ -130,12 +134,10 @@ describe('useCriticalAlerts', () => { ...basicReturn, } ); - await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => useCriticalAlerts(props), { - wrapper: wrapperContainer, - }); - await waitForNextUpdate(); - await waitForNextUpdate(); + const { result } = renderHook(() => useCriticalAlerts(props), { + wrapper: wrapperContainer, + }); + await waitFor(() => expect(result.current).toEqual({ stat: '50', isLoading: false, @@ -150,20 +152,18 @@ describe('useCriticalAlerts', () => { }), }, ...basicData, - }); - }); + }) + ); }); it('finds zero percentage change', async () => { mockUseQueryAlerts.mockImplementation((args) => ({ data: { aggregations: { open: { critical: { doc_count: 100 } } } }, ...basicReturn, })); - await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => useCriticalAlerts(props), { - wrapper: wrapperContainer, - }); - await waitForNextUpdate(); - await waitForNextUpdate(); + const { result } = renderHook(() => useCriticalAlerts(props), { + wrapper: wrapperContainer, + }); + await waitFor(() => expect(result.current).toEqual({ stat: '100', isLoading: false, @@ -173,8 +173,8 @@ describe('useCriticalAlerts', () => { note: i18n.NO_CHANGE('open critical alert count'), }, ...basicData, - }); - }); + }) + ); }); it('handles null data - current time range', async () => { mockUseQueryAlerts.mockImplementation((args) => @@ -188,12 +188,10 @@ describe('useCriticalAlerts', () => { ...basicReturn, } ); - await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => useCriticalAlerts(props), { - wrapper: wrapperContainer, - }); - await waitForNextUpdate(); - await waitForNextUpdate(); + const { result } = renderHook(() => useCriticalAlerts(props), { + wrapper: wrapperContainer, + }); + await waitFor(() => expect(result.current).toEqual({ stat: '-', isLoading: false, @@ -203,8 +201,8 @@ describe('useCriticalAlerts', () => { note: i18n.NO_DATA_CURRENT('alerts'), }, ...basicData, - }); - }); + }) + ); }); it('handles null data - compare time range', async () => { mockUseQueryAlerts.mockImplementation((args) => @@ -218,12 +216,10 @@ describe('useCriticalAlerts', () => { ...basicReturn, } ); - await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => useCriticalAlerts(props), { - wrapper: wrapperContainer, - }); - await waitForNextUpdate(); - await waitForNextUpdate(); + const { result } = renderHook(() => useCriticalAlerts(props), { + wrapper: wrapperContainer, + }); + await waitFor(() => expect(result.current).toEqual({ stat: '100', isLoading: false, @@ -233,8 +229,8 @@ describe('useCriticalAlerts', () => { note: i18n.NO_DATA_COMPARE('alerts'), }, ...basicData, - }); - }); + }) + ); }); it('handles null data - current & compare time range', async () => { mockUseQueryAlerts.mockImplementation((args) => @@ -249,16 +245,12 @@ describe('useCriticalAlerts', () => { ...basicReturn, } ); - await act(async () => { - let ourProps = props; - const { result, rerender, waitForNextUpdate } = renderHook( - () => useCriticalAlerts(ourProps), - { - wrapper: wrapperContainer, - } - ); - await waitForNextUpdate(); - await waitForNextUpdate(); + let ourProps = props; + const { result, rerender } = renderHook(() => useCriticalAlerts(ourProps), { + wrapper: wrapperContainer, + }); + + await waitFor(() => expect(result.current).toEqual({ stat: '100', isLoading: false, @@ -268,16 +260,18 @@ describe('useCriticalAlerts', () => { note: i18n.NO_CHANGE('open critical alert count'), }, ...basicData, - }); - ourProps = { - ...props, - from: '2020-09-08T08:20:18.966Z', - to: '2020-09-09T08:20:18.966Z', - fromCompare: '2020-09-07T08:20:18.966Z', - toCompare: '2020-09-08T08:20:18.966Z', - }; - rerender(); - await waitForNextUpdate(); + }) + ); + + ourProps = { + ...props, + from: '2020-09-08T08:20:18.966Z', + to: '2020-09-09T08:20:18.966Z', + fromCompare: '2020-09-07T08:20:18.966Z', + toCompare: '2020-09-08T08:20:18.966Z', + }; + rerender(); + await waitFor(() => expect(result.current).toEqual({ stat: '-', isLoading: false, @@ -287,8 +281,8 @@ describe('useCriticalAlerts', () => { note: i18n.NO_DATA('alerts'), }, ...basicData, - }); - }); + }) + ); }); it('handles undefined data - current & compare time range', async () => { mockUseQueryAlerts.mockImplementation((args) => @@ -303,16 +297,11 @@ describe('useCriticalAlerts', () => { ...basicReturn, } ); - await act(async () => { - let ourProps = props; - const { result, rerender, waitForNextUpdate } = renderHook( - () => useCriticalAlerts(ourProps), - { - wrapper: wrapperContainer, - } - ); - await waitForNextUpdate(); - await waitForNextUpdate(); + let ourProps = props; + const { result, rerender } = renderHook(() => useCriticalAlerts(ourProps), { + wrapper: wrapperContainer, + }); + await waitFor(() => expect(result.current).toEqual({ stat: '100', isLoading: false, @@ -322,16 +311,17 @@ describe('useCriticalAlerts', () => { note: i18n.NO_CHANGE('open critical alert count'), }, ...basicData, - }); - ourProps = { - ...props, - from: '2020-09-08T08:20:18.966Z', - to: '2020-09-09T08:20:18.966Z', - fromCompare: '2020-09-07T08:20:18.966Z', - toCompare: '2020-09-08T08:20:18.966Z', - }; - rerender(); - await waitForNextUpdate(); + }) + ); + ourProps = { + ...props, + from: '2020-09-08T08:20:18.966Z', + to: '2020-09-09T08:20:18.966Z', + fromCompare: '2020-09-07T08:20:18.966Z', + toCompare: '2020-09-08T08:20:18.966Z', + }; + rerender(); + await waitFor(() => expect(result.current).toEqual({ stat: '-', isLoading: false, @@ -341,7 +331,7 @@ describe('useCriticalAlerts', () => { note: i18n.NO_DATA('alerts'), }, ...basicData, - }); - }); + }) + ); }); }); diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/soc_trends/hooks/use_soc_trends.test.tsx b/x-pack/plugins/security_solution/public/overview/components/detection_response/soc_trends/hooks/use_soc_trends.test.tsx index b008668f9865a..0a4d7e8249a55 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/soc_trends/hooks/use_soc_trends.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/soc_trends/hooks/use_soc_trends.test.tsx @@ -6,8 +6,9 @@ */ import React from 'react'; +import { renderHook, waitFor } from '@testing-library/react'; + import { useSocTrends } from './use_soc_trends'; -import { act, renderHook } from '@testing-library/react-hooks'; import { TestProviders } from '../../../../../common/mock'; import { useGlobalTime } from '../../../../../common/containers/use_global_time'; import * as i18n from '../translations'; @@ -42,14 +43,13 @@ describe('useSocTrends', () => { jest.clearAllMocks(); }); it('loads initial state', async () => { - await act(async () => { - const { result, waitForNextUpdate } = renderHook( - () => useSocTrends({ skip: false, signalIndexName: '.alerts-default' }), - { - wrapper: wrapperContainer, - } - ); - await waitForNextUpdate(); + const { result } = renderHook( + () => useSocTrends({ skip: false, signalIndexName: '.alerts-default' }), + { + wrapper: wrapperContainer, + } + ); + await waitFor(() => { expect(result.current).toEqual({ stats: [ { diff --git a/x-pack/plugins/security_solution/public/overview/components/detection_response/user_alerts_table/use_user_alerts_items.test.ts b/x-pack/plugins/security_solution/public/overview/components/detection_response/user_alerts_table/use_user_alerts_items.test.ts index 3aef486805322..00b919959922d 100644 --- a/x-pack/plugins/security_solution/public/overview/components/detection_response/user_alerts_table/use_user_alerts_items.test.ts +++ b/x-pack/plugins/security_solution/public/overview/components/detection_response/user_alerts_table/use_user_alerts_items.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { renderHook } from '@testing-library/react-hooks'; +import { renderHook } from '@testing-library/react'; import { mockQuery, @@ -14,7 +14,7 @@ import { } from './mock_data'; import { useUserAlertsItems } from './use_user_alerts_items'; -import type { UseUserAlertsItems, UseUserAlertsItemsProps } from './use_user_alerts_items'; +import type { UseUserAlertsItemsProps } from './use_user_alerts_items'; const signalIndexName = 'signal-alerts'; @@ -50,7 +50,7 @@ jest.mock('../../../../common/containers/use_global_time', () => { }); const renderUseUserAlertsItems = (overrides: Partial = {}) => - renderHook>(() => + renderHook(() => useUserAlertsItems({ skip: false, signalIndexName, diff --git a/x-pack/plugins/security_solution/public/overview/containers/overview_host/index.test.tsx b/x-pack/plugins/security_solution/public/overview/containers/overview_host/index.test.tsx index bae3b708ec3a5..921892ceed148 100644 --- a/x-pack/plugins/security_solution/public/overview/containers/overview_host/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/containers/overview_host/index.test.tsx @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { act, renderHook } from '@testing-library/react-hooks'; + +import { renderHook, act } from '@testing-library/react'; import { TestProviders } from '../../../common/mock'; import { useHostOverview } from '.'; import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; diff --git a/x-pack/plugins/security_solution/public/overview/containers/overview_network/index.test.tsx b/x-pack/plugins/security_solution/public/overview/containers/overview_network/index.test.tsx index c842fb0a51cae..036c3ec701f79 100644 --- a/x-pack/plugins/security_solution/public/overview/containers/overview_network/index.test.tsx +++ b/x-pack/plugins/security_solution/public/overview/containers/overview_network/index.test.tsx @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { act, renderHook } from '@testing-library/react-hooks'; + +import { renderHook, act } from '@testing-library/react'; import { TestProviders } from '../../../common/mock'; import { useNetworkOverview } from '.'; import { useSearchStrategy } from '../../../common/containers/use_search_strategy'; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/links.ts b/x-pack/plugins/security_solution/public/siem_migrations/links.ts index 34db8a357785a..a98f823957acf 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/links.ts +++ b/x-pack/plugins/security_solution/public/siem_migrations/links.ts @@ -13,7 +13,7 @@ import { } from '../../common/constants'; import { SIEM_MIGRATIONS_RULES } from '../app/translations'; import type { LinkItem } from '../common/links/types'; -import { IconConsoleCloud } from '../common/icons/console_cloud'; +import { SiemMigrationsIcon } from '../common/icons/siem_migrations'; export const siemMigrationsLinks: LinkItem = { id: SecurityPageName.siemMigrationsRules, @@ -21,7 +21,7 @@ export const siemMigrationsLinks: LinkItem = { description: i18n.translate('xpack.securitySolution.appLinks.siemMigrationsRulesDescription', { defaultMessage: 'SIEM Rules Migrations.', }), - landingIcon: IconConsoleCloud, + landingIcon: SiemMigrationsIcon, path: SIEM_MIGRATIONS_RULES_PATH, capabilities: [`${SERVER_APP_ID}.show`], skipUrlState: true, diff --git a/x-pack/plugins/security_solution/public/siem_migrations/routes.tsx b/x-pack/plugins/security_solution/public/siem_migrations/routes.tsx index cc2b9fbad3451..179cf064c4926 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/routes.tsx +++ b/x-pack/plugins/security_solution/public/siem_migrations/routes.tsx @@ -10,16 +10,19 @@ import { Routes, Route } from '@kbn/shared-ux-router'; import type { SecuritySubPluginRoutes } from '../app/types'; import { SIEM_MIGRATIONS_RULES_PATH, SecurityPageName } from '../../common/constants'; -import { RulesPage } from './rules/pages'; +import { MigrationRulesPage } from './rules/pages'; import { PluginTemplateWrapper } from '../common/components/plugin_template_wrapper'; import { SecurityRoutePageWrapper } from '../common/components/security_route_page_wrapper'; -export const RulesRoutes = () => { +export const SiemMigrationsRoutes = () => { return ( - + @@ -29,6 +32,6 @@ export const RulesRoutes = () => { export const routes: SecuritySubPluginRoutes = [ { path: SIEM_MIGRATIONS_RULES_PATH, - component: RulesRoutes, + component: SiemMigrationsRoutes, }, ]; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/api/hooks/use_get_migration_rules_query.ts b/x-pack/plugins/security_solution/public/siem_migrations/rules/api/hooks/use_get_migration_rules_query.ts deleted file mode 100644 index fece8f8c3ca07..0000000000000 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/api/hooks/use_get_migration_rules_query.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import type { UseQueryOptions } from '@tanstack/react-query'; -import { useQuery, useQueryClient } from '@tanstack/react-query'; -import { replaceParams } from '@kbn/openapi-common/shared'; -import { useCallback } from 'react'; -import { DEFAULT_QUERY_OPTIONS } from './constants'; -import { getRuleMigrations } from '../api'; -import type { GetRuleMigrationResponse } from '../../../../../common/siem_migrations/model/api/rules/rule_migration.gen'; -import { SIEM_RULE_MIGRATION_PATH } from '../../../../../common/siem_migrations/constants'; - -export const useGetMigrationRulesQuery = ( - migrationId: string, - options?: UseQueryOptions -) => { - const SPECIFIC_MIGRATION_PATH = replaceParams(SIEM_RULE_MIGRATION_PATH, { - migration_id: migrationId, - }); - return useQuery( - ['GET', SPECIFIC_MIGRATION_PATH], - async ({ signal }) => { - return getRuleMigrations({ migrationId, signal }); - }, - { - ...DEFAULT_QUERY_OPTIONS, - ...options, - } - ); -}; - -/** - * We should use this hook to invalidate the rule migrations cache. For - * example, rule migrations mutations, like installing a rule, should lead to cache invalidation. - * - * @returns A rule migrations cache invalidation callback - */ -export const useInvalidateGetMigrationRulesQuery = (migrationId: string) => { - const queryClient = useQueryClient(); - - const SPECIFIC_MIGRATION_PATH = replaceParams(SIEM_RULE_MIGRATION_PATH, { - migration_id: migrationId, - }); - - return useCallback(() => { - queryClient.invalidateQueries(['GET', SPECIFIC_MIGRATION_PATH], { - refetchType: 'active', - }); - }, [SPECIFIC_MIGRATION_PATH, queryClient]); -}; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/api/hooks/use_install_all_migration_rules_mutation.ts b/x-pack/plugins/security_solution/public/siem_migrations/rules/api/hooks/use_install_all_migration_rules_mutation.ts deleted file mode 100644 index f946dc165450f..0000000000000 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/api/hooks/use_install_all_migration_rules_mutation.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import type { UseMutationOptions } from '@tanstack/react-query'; -import { useMutation } from '@tanstack/react-query'; -import type { InstallTranslatedMigrationRulesResponse } from '../../../../../common/siem_migrations/model/api/rules/rule_migration.gen'; -import { SIEM_RULE_MIGRATION_INSTALL_TRANSLATED_PATH } from '../../../../../common/siem_migrations/constants'; -import { installTranslatedMigrationRules } from '../api'; -import { useInvalidateGetMigrationRulesQuery } from './use_get_migration_rules_query'; - -export const INSTALL_ALL_MIGRATION_RULES_MUTATION_KEY = [ - 'POST', - SIEM_RULE_MIGRATION_INSTALL_TRANSLATED_PATH, -]; - -export const useInstallAllMigrationRulesMutation = ( - migrationId: string, - options?: UseMutationOptions -) => { - const invalidateGetRuleMigrationsQuery = useInvalidateGetMigrationRulesQuery(migrationId); - - return useMutation( - () => installTranslatedMigrationRules({ migrationId }), - { - ...options, - mutationKey: INSTALL_ALL_MIGRATION_RULES_MUTATION_KEY, - onSettled: (...args) => { - invalidateGetRuleMigrationsQuery(); - - if (options?.onSettled) { - options.onSettled(...args); - } - }, - } - ); -}; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/api/hooks/use_install_migration_rules_mutation.ts b/x-pack/plugins/security_solution/public/siem_migrations/rules/api/hooks/use_install_migration_rules_mutation.ts deleted file mode 100644 index 6aaff55e24513..0000000000000 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/api/hooks/use_install_migration_rules_mutation.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import type { UseMutationOptions } from '@tanstack/react-query'; -import { useMutation } from '@tanstack/react-query'; -import type { InstallMigrationRulesResponse } from '../../../../../common/siem_migrations/model/api/rules/rule_migration.gen'; -import { SIEM_RULE_MIGRATION_INSTALL_PATH } from '../../../../../common/siem_migrations/constants'; -import { installMigrationRules } from '../api'; -import { useInvalidateGetMigrationRulesQuery } from './use_get_migration_rules_query'; - -export const INSTALL_MIGRATION_RULES_MUTATION_KEY = ['POST', SIEM_RULE_MIGRATION_INSTALL_PATH]; - -export const useInstallMigrationRulesMutation = ( - migrationId: string, - options?: UseMutationOptions -) => { - const invalidateGetRuleMigrationsQuery = useInvalidateGetMigrationRulesQuery(migrationId); - - return useMutation( - (ids: string[]) => installMigrationRules({ migrationId, ids }), - { - ...options, - mutationKey: INSTALL_MIGRATION_RULES_MUTATION_KEY, - onSettled: (...args) => { - invalidateGetRuleMigrationsQuery(); - - if (options?.onSettled) { - options.onSettled(...args); - } - }, - } - ); -}; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/api/api.ts b/x-pack/plugins/security_solution/public/siem_migrations/rules/api/index.ts similarity index 72% rename from x-pack/plugins/security_solution/public/siem_migrations/rules/api/api.ts rename to x-pack/plugins/security_solution/public/siem_migrations/rules/api/index.ts index 3b7605e032259..592b93f438197 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/api/api.ts +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/api/index.ts @@ -15,15 +15,16 @@ import { SIEM_RULE_MIGRATION_INSTALL_PATH, SIEM_RULE_MIGRATION_PATH, SIEM_RULE_MIGRATION_START_PATH, + SIEM_RULE_MIGRATION_TRANSLATION_STATS_PATH, } from '../../../../common/siem_migrations/constants'; import type { GetAllStatsRuleMigrationResponse, GetRuleMigrationResponse, + GetRuleMigrationTranslationStatsResponse, InstallTranslatedMigrationRulesResponse, InstallMigrationRulesResponse, StartRuleMigrationRequestBody, } from '../../../../common/siem_migrations/model/api/rules/rule_migration.gen'; -import type { InstallTranslatedRulesProps, InstallRulesProps } from '../types'; /** * Retrieves the stats for all the existing migrations, aggregated by `migration_id`. @@ -67,6 +68,31 @@ export const startRuleMigration = async ({ ); }; +/** + * Retrieves the translation stats for the migraion. + * + * @param migrationId `id` of the migration to retrieve translation stats for + * @param signal AbortSignal for cancelling request + * + * @throws An error if response is not OK + */ +export const getRuleMigrationTranslationStats = async ({ + migrationId, + signal, +}: { + migrationId: string; + signal: AbortSignal | undefined; +}): Promise => { + return KibanaServices.get().http.fetch( + replaceParams(SIEM_RULE_MIGRATION_TRANSLATION_STATS_PATH, { migration_id: migrationId }), + { + method: 'GET', + version: '1', + signal, + } + ); +}; + /** * Retrieves all the migration rule documents of a specific migration. * @@ -77,14 +103,29 @@ export const startRuleMigration = async ({ */ export const getRuleMigrations = async ({ migrationId, + page, + perPage, + searchTerm, signal, }: { migrationId: string; + page?: number; + perPage?: number; + searchTerm?: string; signal: AbortSignal | undefined; }): Promise => { return KibanaServices.get().http.fetch( replaceParams(SIEM_RULE_MIGRATION_PATH, { migration_id: migrationId }), - { method: 'GET', version: '1', signal } + { + method: 'GET', + version: '1', + query: { + page, + per_page: perPage, + search_term: searchTerm, + }, + signal, + } ); }; @@ -92,7 +133,11 @@ export const installMigrationRules = async ({ migrationId, ids, signal, -}: InstallRulesProps): Promise => { +}: { + migrationId: string; + ids: string[]; + signal?: AbortSignal; +}): Promise => { return KibanaServices.get().http.fetch( replaceParams(SIEM_RULE_MIGRATION_INSTALL_PATH, { migration_id: migrationId }), { @@ -107,7 +152,10 @@ export const installMigrationRules = async ({ export const installTranslatedMigrationRules = async ({ migrationId, signal, -}: InstallTranslatedRulesProps): Promise => { +}: { + migrationId: string; + signal?: AbortSignal; +}): Promise => { return KibanaServices.get().http.fetch( replaceParams(SIEM_RULE_MIGRATION_INSTALL_TRANSLATED_PATH, { migration_id: migrationId }), { diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/header_buttons/index.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/header_buttons/index.tsx index ba73bd9c84946..728873f046d2e 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/header_buttons/index.tsx +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/header_buttons/index.tsx @@ -10,12 +10,13 @@ import React, { useMemo } from 'react'; import type { EuiComboBoxOptionOption } from '@elastic/eui'; import { EuiComboBox, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import * as i18n from './translations'; +import type { RuleMigrationTask } from '../../types'; export interface HeaderButtonsProps { /** - * Available rule migrations ids + * Available rule migrations stats */ - migrationsIds: string[]; + ruleMigrationsStats: RuleMigrationTask[]; /** * Selected rule migration id @@ -30,55 +31,53 @@ export interface HeaderButtonsProps { onMigrationIdChange: (selectedId?: string) => void; } -const HeaderButtonsComponent: React.FC = ({ - migrationsIds, - selectedMigrationId, - onMigrationIdChange, -}) => { - const migrationOptions = useMemo(() => { - const options: Array> = migrationsIds.map((id, index) => ({ - value: id, - 'data-test-subj': `migrationSelectionOption-${index}`, - label: i18n.SIEM_MIGRATIONS_OPTION_LABEL(index + 1), - })); - return options; - }, [migrationsIds]); - const selectedMigrationOption = useMemo>>(() => { - const index = migrationsIds.findIndex((id) => id === selectedMigrationId); - return index !== -1 - ? [ - { - value: selectedMigrationId, - 'data-test-subj': `migrationSelectionOption-${index}`, - label: i18n.SIEM_MIGRATIONS_OPTION_LABEL(index + 1), - }, - ] - : []; - }, [migrationsIds, selectedMigrationId]); +export const HeaderButtons: React.FC = React.memo( + ({ ruleMigrationsStats, selectedMigrationId, onMigrationIdChange }) => { + const migrationOptions = useMemo(() => { + const options: Array> = ruleMigrationsStats.map( + ({ id, number }) => ({ + value: id, + 'data-test-subj': `migrationSelectionOption-${number}`, + label: i18n.SIEM_MIGRATIONS_OPTION_LABEL(number), + }) + ); + return options; + }, [ruleMigrationsStats]); + const selectedMigrationOption = useMemo>>(() => { + const stats = ruleMigrationsStats.find(({ id }) => id === selectedMigrationId); + return stats + ? [ + { + value: selectedMigrationId, + 'data-test-subj': `migrationSelectionOption-${stats.number}`, + label: i18n.SIEM_MIGRATIONS_OPTION_LABEL(stats.number), + }, + ] + : []; + }, [ruleMigrationsStats, selectedMigrationId]); - const onChange = (selected: Array>) => { - onMigrationIdChange(selected[0].value); - }; + const onChange = (selected: Array>) => { + onMigrationIdChange(selected[0].value); + }; - if (!migrationsIds.length) { - return null; - } - - return ( - - - - - - ); -}; + if (!ruleMigrationsStats.length) { + return null; + } -export const HeaderButtons = React.memo(HeaderButtonsComponent); + return ( + + + + + + ); + } +); HeaderButtons.displayName = 'HeaderButtons'; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/translation_details_flyout/constants.ts b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/constants.ts similarity index 100% rename from x-pack/plugins/security_solution/public/siem_migrations/rules/components/translation_details_flyout/constants.ts rename to x-pack/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/constants.ts diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/index.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/index.tsx new file mode 100644 index 0000000000000..9353d0063b8ab --- /dev/null +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/index.tsx @@ -0,0 +1,194 @@ +/* + * 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 { FC, PropsWithChildren } from 'react'; +import React, { useMemo, useState, useEffect } from 'react'; +import { css } from '@emotion/css'; +import { euiThemeVars } from '@kbn/ui-theme'; +import { + EuiButtonEmpty, + EuiTitle, + EuiFlyout, + EuiFlyoutHeader, + EuiFlyoutBody, + EuiFlyoutFooter, + EuiTabbedContent, + EuiSpacer, + EuiFlexGroup, + EuiFlexItem, + useGeneratedHtmlId, +} from '@elastic/eui'; +import type { EuiTabbedContentTab, EuiTabbedContentProps, EuiFlyoutProps } from '@elastic/eui'; + +import { + DEFAULT_TRANSLATION_SEVERITY, + DEFAULT_TRANSLATION_FIELDS, +} from '../../../../../common/siem_migrations/constants'; +import type { RuleMigration } from '../../../../../common/siem_migrations/model/rule_migration.gen'; +import { + RuleOverviewTab, + useOverviewTabSections, +} from '../../../../detection_engine/rule_management/components/rule_details/rule_overview_tab'; +import { + type RuleResponse, + type Severity, +} from '../../../../../common/api/detection_engine/model/rule_schema'; + +import * as i18n from './translations'; +import { + DEFAULT_DESCRIPTION_LIST_COLUMN_WIDTHS, + LARGE_DESCRIPTION_LIST_COLUMN_WIDTHS, +} from './constants'; +import { TranslationTab } from './translation_tab'; + +/* + * Fixes tabs to the top and allows the content to scroll. + */ +const ScrollableFlyoutTabbedContent = (props: EuiTabbedContentProps) => ( + + + + + +); + +const tabPaddingClassName = css` + padding: 0 ${euiThemeVars.euiSizeM} ${euiThemeVars.euiSizeXL} ${euiThemeVars.euiSizeM}; +`; + +export const TabContentPadding: FC> = ({ children }) => ( +

          {children}
          +); + +interface MigrationRuleDetailsFlyoutProps { + ruleActions?: React.ReactNode; + ruleMigration: RuleMigration; + size?: EuiFlyoutProps['size']; + extraTabs?: EuiTabbedContentTab[]; + closeFlyout: () => void; +} + +export const MigrationRuleDetailsFlyout: React.FC = React.memo( + ({ + ruleActions, + ruleMigration, + size = 'm', + extraTabs = [], + closeFlyout, + }: MigrationRuleDetailsFlyoutProps) => { + const { expandedOverviewSections, toggleOverviewSection } = useOverviewTabSections(); + + const rule: RuleResponse = useMemo(() => { + const esqlLanguage = ruleMigration.elastic_rule?.query_language ?? 'esql'; + return { + type: esqlLanguage, + language: esqlLanguage, + name: ruleMigration.elastic_rule?.title, + description: ruleMigration.elastic_rule?.description, + query: ruleMigration.elastic_rule?.query, + + ...DEFAULT_TRANSLATION_FIELDS, + severity: + (ruleMigration.elastic_rule?.severity as Severity) ?? DEFAULT_TRANSLATION_SEVERITY, + } as RuleResponse; // TODO: we need to adjust RuleOverviewTab to allow partial RuleResponse as a parameter + }, [ruleMigration]); + + const translationTab: EuiTabbedContentTab = useMemo( + () => ({ + id: 'translation', + name: i18n.TRANSLATION_TAB_LABEL, + content: ( + + + + ), + }), + [ruleMigration] + ); + + const overviewTab: EuiTabbedContentTab = useMemo( + () => ({ + id: 'overview', + name: i18n.OVERVIEW_TAB_LABEL, + content: ( + + + + ), + }), + [rule, size, expandedOverviewSections, toggleOverviewSection] + ); + + const tabs = useMemo(() => { + return [...extraTabs, translationTab, overviewTab]; + }, [extraTabs, translationTab, overviewTab]); + + const [selectedTabId, setSelectedTabId] = useState(tabs[0].id); + const selectedTab = tabs.find((tab) => tab.id === selectedTabId) ?? tabs[0]; + + useEffect(() => { + if (!tabs.find((tab) => tab.id === selectedTabId)) { + // Switch to first tab if currently selected tab is not available for this rule + setSelectedTabId(tabs[0].id); + } + }, [tabs, selectedTabId]); + + const onTabClick = (tab: EuiTabbedContentTab) => { + setSelectedTabId(tab.id); + }; + + const migrationsRulesFlyoutTitleId = useGeneratedHtmlId({ + prefix: 'migrationRulesFlyoutTitle', + }); + + return ( + + + +

          {rule.name}

          +
          + +
          + + + + + + + + {i18n.DISMISS_BUTTON_LABEL} + + + {ruleActions} + + +
          + ); + } +); +MigrationRuleDetailsFlyout.displayName = 'MigrationRuleDetailsFlyout'; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/translation_details_flyout/translation_tab/header.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/translation_tab/header.tsx similarity index 82% rename from x-pack/plugins/security_solution/public/siem_migrations/rules/components/translation_details_flyout/translation_tab/header.tsx rename to x-pack/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/translation_tab/header.tsx index 57e99440e60a1..2775c9569917a 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/translation_details_flyout/translation_tab/header.tsx +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/translation_tab/header.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { EuiFlexGroup, EuiTitle } from '@elastic/eui'; import * as i18n from './translations'; -export function TranslationTabHeader(): JSX.Element { +export const TranslationTabHeader: React.FC = React.memo(() => { return ( @@ -17,4 +17,5 @@ export function TranslationTabHeader(): JSX.Element { ); -} +}); +TranslationTabHeader.displayName = 'TranslationTabHeader'; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/translation_details_flyout/translation_tab/index.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/translation_tab/index.tsx similarity index 87% rename from x-pack/plugins/security_solution/public/siem_migrations/rules/components/translation_details_flyout/translation_tab/index.tsx rename to x-pack/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/translation_tab/index.tsx index 66836b8ea5631..a2e590b85ac09 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/translation_details_flyout/translation_tab/index.tsx +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/translation_tab/index.tsx @@ -22,15 +22,18 @@ import { css } from '@emotion/css'; import { FormattedMessage } from '@kbn/i18n-react'; import type { RuleMigration } from '../../../../../../common/siem_migrations/model/rule_migration.gen'; import { TranslationTabHeader } from './header'; -import { RuleQueryComponent } from './rule_query'; +import { MigrationRuleQuery } from './migration_rule_query'; import * as i18n from './translations'; -import { convertTranslationResultIntoText } from '../../../utils/helpers'; +import { + convertTranslationResultIntoColor, + convertTranslationResultIntoText, +} from '../../../utils/helpers'; interface TranslationTabProps { ruleMigration: RuleMigration; } -export const TranslationTab = ({ ruleMigration }: TranslationTabProps) => { +export const TranslationTab: React.FC = React.memo(({ ruleMigration }) => { const { euiTheme } = useEuiTheme(); const name = ruleMigration.elastic_rule?.title ?? ruleMigration.original_rule.title; @@ -66,9 +69,7 @@ export const TranslationTab = ({ ruleMigration }: TranslationTabProps) => { {}} onClickAriaLabel={'Click to update translation status'} > @@ -80,7 +81,7 @@ export const TranslationTab = ({ ruleMigration }: TranslationTabProps) => { - { `} /> - { ); -}; +}); +TranslationTab.displayName = 'TranslationTab'; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/translation_tab/migration_rule_query.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/translation_tab/migration_rule_query.tsx new file mode 100644 index 0000000000000..534f765da97bc --- /dev/null +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/translation_tab/migration_rule_query.tsx @@ -0,0 +1,73 @@ +/* + * 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, { useMemo } from 'react'; +import { + EuiFlexGroup, + EuiFlexItem, + EuiHorizontalRule, + EuiMarkdownEditor, + EuiMarkdownFormat, + EuiTitle, + useEuiTheme, +} from '@elastic/eui'; +import { css } from '@emotion/react'; +import * as i18n from './translations'; + +interface MigrationRuleQueryProps { + title: string; + query: string; + canEdit?: boolean; +} + +export const MigrationRuleQuery: React.FC = React.memo( + ({ title, query, canEdit }) => { + const { euiTheme } = useEuiTheme(); + + const headerComponent = useMemo(() => { + return ( + + + +

          {title}

          +
          +
          +
          + ); + }, [euiTheme, title]); + + const queryTextComponent = useMemo(() => { + if (canEdit) { + return ( + {}} + height={400} + initialViewMode={'viewing'} + /> + ); + } else { + return {query}; + } + }, [canEdit, query]); + + return ( + <> + {headerComponent} + + {queryTextComponent} + + ); + } +); +MigrationRuleQuery.displayName = 'MigrationRuleQuery'; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/translation_details_flyout/translation_tab/translations.ts b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/translation_tab/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/siem_migrations/rules/components/translation_details_flyout/translation_tab/translations.ts rename to x-pack/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/translation_tab/translations.ts diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/translation_details_flyout/translations.ts b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/siem_migrations/rules/components/translation_details_flyout/translations.ts rename to x-pack/plugins/security_solution/public/siem_migrations/rules/components/rule_details_flyout/translations.ts diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/bulk_actions.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/bulk_actions.tsx index df6d01d876fce..a58681b6e771f 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/bulk_actions.tsx +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/bulk_actions.tsx @@ -28,9 +28,9 @@ export const BulkActions: React.FC = React.memo( installTranslatedRule, installSelectedRule, }) => { - const showInstallTranslatedRulesButton = numberOfTranslatedRules > 0; + const disableInstallTranslatedRulesButton = isTableLoading || !numberOfTranslatedRules; const showInstallSelectedRulesButton = - showInstallTranslatedRulesButton && numberOfSelectedRules > 0; + disableInstallTranslatedRulesButton && numberOfSelectedRules > 0; return ( {showInstallSelectedRulesButton ? ( @@ -46,21 +46,21 @@ export const BulkActions: React.FC = React.memo(
          ) : null} - {showInstallTranslatedRulesButton ? ( - - - {i18n.INSTALL_ALL_RULES(numberOfTranslatedRules)} - {isTableLoading && } - - - ) : null} + + + {numberOfTranslatedRules > 0 + ? i18n.INSTALL_TRANSLATED_RULES(numberOfTranslatedRules) + : i18n.INSTALL_TRANSLATED_RULES_EMPTY_STATE} + {isTableLoading && } + + ); } diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/no_items_message.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/empty_migration.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/no_items_message.tsx rename to x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/empty_migration.tsx index 7aeaac7ab2f6b..a8bd20d4a557e 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/no_items_message.tsx +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/empty_migration.tsx @@ -11,7 +11,7 @@ import { SecurityPageName } from '../../../../../common'; import { useGetSecuritySolutionLinkProps } from '../../../../common/components/links'; import * as i18n from './translations'; -const NoItemsMessageComponent = () => { +export const EmptyMigration: React.FC = React.memo(() => { const getSecuritySolutionLinkProps = useGetSecuritySolutionLinkProps(); const { onClick: onClickLink } = getSecuritySolutionLinkProps({ deepLinkId: SecurityPageName.landing, @@ -47,6 +47,5 @@ const NoItemsMessageComponent = () => { ); -}; - -export const NoItemsMessage = React.memo(NoItemsMessageComponent); +}); +EmptyMigration.displayName = 'EmptyMigration'; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/filters.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/filters.tsx deleted file mode 100644 index 25dffc64cccc5..0000000000000 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/filters.tsx +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { EuiFlexGroup } from '@elastic/eui'; -import type { Dispatch, SetStateAction } from 'react'; -import React, { useCallback } from 'react'; -import * as i18n from './translations'; -import { RuleSearchField } from '../../../../detection_engine/rule_management_ui/components/rules_table/rules_table_filters/rule_search_field'; -import type { TableFilterOptions } from '../../hooks/use_filter_rules_to_install'; - -export interface FiltersComponentProps { - /** - * Currently selected table filter - */ - filterOptions: TableFilterOptions; - - /** - * Handles filter options changes - */ - setFilterOptions: Dispatch>; -} - -/** - * Collection of filters for filtering data within the SIEM Rules Migrations table. - * Contains search bar and tag selection - */ -const FiltersComponent: React.FC = ({ filterOptions, setFilterOptions }) => { - const handleOnSearch = useCallback( - (filterString: string) => { - setFilterOptions((filters) => ({ - ...filters, - filter: filterString.trim(), - })); - }, - [setFilterOptions] - ); - - return ( - - - - ); -}; - -export const Filters = React.memo(FiltersComponent); -Filters.displayName = 'Filters'; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/index.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/index.tsx index 16f93a1cdebaf..e7af1af93e2ba 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/index.tsx +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/index.tsx @@ -5,35 +5,34 @@ * 2.0. */ +import type { CriteriaWithPagination } from '@elastic/eui'; import { - EuiInMemoryTable, EuiSkeletonLoading, - EuiProgress, EuiSkeletonTitle, EuiSkeletonText, EuiFlexGroup, EuiFlexItem, EuiSpacer, + EuiBasicTable, } from '@elastic/eui'; import React, { useCallback, useMemo, useState } from 'react'; +import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import type { RuleMigration } from '../../../../../common/siem_migrations/model/rule_migration.gen'; -import { - RULES_TABLE_INITIAL_PAGE_SIZE, - RULES_TABLE_PAGE_SIZE_OPTIONS, -} from '../../../../detection_engine/rule_management_ui/components/rules_table/constants'; -import { NoItemsMessage } from './no_items_message'; -import { Filters } from './filters'; -import { useRulesTableColumns } from '../../hooks/use_rules_table_columns'; -import type { TableFilterOptions } from '../../hooks/use_filter_rules_to_install'; -import { useFilterRulesToInstall } from '../../hooks/use_filter_rules_to_install'; -import { useRulePreviewFlyout } from '../../hooks/use_rule_preview_flyout'; +import { EmptyMigration } from './empty_migration'; +import { useMigrationRulesTableColumns } from '../../hooks/use_migration_rules_table_columns'; +import { useMigrationRuleDetailsFlyout } from '../../hooks/use_migration_rule_preview_flyout'; import { useInstallMigrationRules } from '../../logic/use_install_migration_rules'; import { useGetMigrationRules } from '../../logic/use_get_migration_rules'; -import { useInstallAllMigrationRules } from '../../logic/use_install_all_migration_rules'; +import { useInstallTranslatedMigrationRules } from '../../logic/use_install_translated_migration_rules'; +import { useGetMigrationTranslationStats } from '../../logic/use_get_migration_translation_stats'; +import * as logicI18n from '../../logic/translations'; import { BulkActions } from './bulk_actions'; +import { SearchField } from './search_field'; + +const DEFAULT_PAGE_SIZE = 10; -export interface RulesTableComponentProps { +export interface MigrationRulesTableProps { /** * Selected rule migration id */ @@ -43,138 +42,152 @@ export interface RulesTableComponentProps { /** * Table Component for displaying SIEM rules migrations */ -const RulesTableComponent: React.FC = ({ migrationId }) => { - const { data: ruleMigrations, isLoading: isDataLoading } = useGetMigrationRules(migrationId); - - const [selectedRuleMigrations, setSelectedRuleMigrations] = useState([]); - - const [filterOptions, setFilterOptions] = useState({ - filter: '', - }); - - const filteredRuleMigrations = useFilterRulesToInstall({ - filterOptions, - ruleMigrations: ruleMigrations ?? [], - }); - - const { mutateAsync: installMigrationRules } = useInstallMigrationRules(migrationId); - const { mutateAsync: installAllMigrationRules } = useInstallAllMigrationRules(migrationId); - - const numberOfTranslatedRules = useMemo(() => { - return filteredRuleMigrations.filter( - (rule) => - !rule.elastic_rule?.id && - (rule.elastic_rule?.prebuilt_rule_id || rule.translation_result === 'full') - ).length; - }, [filteredRuleMigrations]); - - const [isTableLoading, setTableLoading] = useState(false); - const installSingleRule = useCallback( - async (migrationRule: RuleMigration, enable?: boolean) => { - setTableLoading(true); - try { - await installMigrationRules([migrationRule.id]); - } finally { - setTableLoading(false); +export const MigrationRulesTable: React.FC = React.memo( + ({ migrationId }) => { + const { addError } = useAppToasts(); + + const [pageIndex, setPageIndex] = useState(0); + const [pageSize, setPageSize] = useState(DEFAULT_PAGE_SIZE); + const [searchTerm, setSearchTerm] = useState(); + + const { data: translationStats, isLoading: isStatsLoading } = + useGetMigrationTranslationStats(migrationId); + + const { + data: { ruleMigrations, total } = { ruleMigrations: [], total: 0 }, + isLoading: isDataLoading, + } = useGetMigrationRules({ + migrationId, + page: pageIndex, + perPage: pageSize, + searchTerm, + }); + + const [selectedRuleMigrations, setSelectedRuleMigrations] = useState([]); + + const pagination = useMemo(() => { + return { + pageIndex, + pageSize, + totalItemCount: total, + }; + }, [pageIndex, pageSize, total]); + + const onTableChange = useCallback(({ page, sort }: CriteriaWithPagination) => { + if (page) { + setPageIndex(page.index); + setPageSize(page.size); } - }, - [installMigrationRules] - ); - - const installTranslatedRules = useCallback( - async (enable?: boolean) => { - setTableLoading(true); - try { - await installAllMigrationRules(); - } finally { - setTableLoading(false); - } - }, - [installAllMigrationRules] - ); - - const ruleActionsFactory = useCallback( - (ruleMigration: RuleMigration, closeRulePreview: () => void) => { - // TODO: Add flyout action buttons - return null; - }, - [] - ); - - const { rulePreviewFlyout, openRulePreview } = useRulePreviewFlyout({ - ruleActionsFactory, - }); - - const shouldShowProgress = isDataLoading; - - const rulesColumns = useRulesTableColumns({ - disableActions: isTableLoading, - openMigrationRulePreview: openRulePreview, - installMigrationRule: installSingleRule, - }); - - return ( - <> - {shouldShowProgress && ( - - )} - - - - + }, []); + + const handleOnSearch = useCallback((value: string) => { + setSearchTerm(value.trim()); + }, []); + + const { mutateAsync: installMigrationRules } = useInstallMigrationRules(migrationId); + const { mutateAsync: installTranslatedMigrationRules } = + useInstallTranslatedMigrationRules(migrationId); + + const [isTableLoading, setTableLoading] = useState(false); + const installSingleRule = useCallback( + async (migrationRule: RuleMigration, enable?: boolean) => { + setTableLoading(true); + try { + await installMigrationRules([migrationRule.id]); + } catch (error) { + addError(error, { title: logicI18n.INSTALL_MIGRATION_RULES_FAILURE }); + } finally { + setTableLoading(false); } - loadedContent={ - !filteredRuleMigrations.length ? ( - - ) : ( + }, + [addError, installMigrationRules] + ); + + const installTranslatedRules = useCallback( + async (enable?: boolean) => { + setTableLoading(true); + try { + await installTranslatedMigrationRules(); + } catch (error) { + addError(error, { title: logicI18n.INSTALL_MIGRATION_RULES_FAILURE }); + } finally { + setTableLoading(false); + } + }, + [addError, installTranslatedMigrationRules] + ); + + const ruleActionsFactory = useCallback( + (ruleMigration: RuleMigration, closeRulePreview: () => void) => { + // TODO: Add flyout action buttons + return null; + }, + [] + ); + + const { + migrationRuleDetailsFlyout: rulePreviewFlyout, + openMigrationRuleDetails: openRulePreview, + } = useMigrationRuleDetailsFlyout({ + ruleActionsFactory, + }); + + const rulesColumns = useMigrationRulesTableColumns({ + disableActions: isTableLoading, + openMigrationRuleDetails: openRulePreview, + installMigrationRule: installSingleRule, + }); + + return ( + <> + - - - - - - - - - - true, - onSelectionChange: setSelectedRuleMigrations, - initialSelected: selectedRuleMigrations, - }} - itemId="rule_id" - data-test-subj="rules-translation-table" - columns={rulesColumns} - /> + + - ) - } - /> - {rulePreviewFlyout} - - ); -}; - -export const RulesTable = React.memo(RulesTableComponent); -RulesTable.displayName = 'RulesTable'; + } + loadedContent={ + !translationStats?.rules.total ? ( + + ) : ( + <> + + + + + + + + + + + loading={isTableLoading} + items={ruleMigrations} + pagination={pagination} + onChange={onTableChange} + selection={{ + selectable: () => true, + onSelectionChange: setSelectedRuleMigrations, + initialSelected: selectedRuleMigrations, + }} + itemId={'id'} + data-test-subj={'rules-translation-table'} + columns={rulesColumns} + /> + + ) + } + /> + {rulePreviewFlyout} + + ); + } +); +MigrationRulesTable.displayName = 'MigrationRulesTable'; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/search_field.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/search_field.tsx new file mode 100644 index 0000000000000..7b7a576cb1dd9 --- /dev/null +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/search_field.tsx @@ -0,0 +1,47 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { ChangeEvent } from 'react'; +import React, { useCallback, useEffect, useState } from 'react'; +import { EuiFieldSearch, EuiFlexItem } from '@elastic/eui'; +import * as i18n from './translations'; + +interface SearchFieldProps { + initialValue?: string; + onSearch: (value: string) => void; + placeholder?: string; +} + +export const SearchField: React.FC = React.memo( + ({ initialValue, onSearch, placeholder }) => { + const [searchText, setSearchText] = useState(initialValue); + const handleChange = useCallback( + (e: ChangeEvent) => setSearchText(e.target.value), + [setSearchText] + ); + + useEffect(() => { + setSearchText(initialValue); + }, [initialValue]); + + return ( + + + + ); + } +); +SearchField.displayName = 'SearchField'; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/translations.ts b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/translations.ts index 3da9886659916..6803deb895d9b 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/translations.ts +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table/translations.ts @@ -7,10 +7,17 @@ import { i18n } from '@kbn/i18n'; -export const SEARCH_PLACEHOLDER = i18n.translate( +export const SEARCH_MIGRATION_RULES = i18n.translate( + 'xpack.securitySolution.siemMigrations.rules.table.searchAriaLabel', + { + defaultMessage: 'Search migration rules', + } +); + +export const SEARCH_MIGRATION_RULES_PLACEHOLDER = i18n.translate( 'xpack.securitySolution.siemMigrations.rules.table.searchBarPlaceholder', { - defaultMessage: 'Search by rule name', + defaultMessage: 'Search by migration rule name', } ); @@ -42,12 +49,22 @@ export const INSTALL_SELECTED_RULES = (numberOfSelectedRules: number) => { }); }; -export const INSTALL_ALL_RULES = (numberOfAllRules: number) => { - return i18n.translate('xpack.securitySolution.siemMigrations.rules.table.installAllRules', { - defaultMessage: - 'Install translated {numberOfAllRules, plural, one {rule} other {rules}} ({numberOfAllRules})', - values: { numberOfAllRules }, - }); +export const INSTALL_TRANSLATED_RULES_EMPTY_STATE = i18n.translate( + 'xpack.securitySolution.siemMigrations.rules.table.installTranslatedRulesEmptyState', + { + defaultMessage: 'Install translated rules', + } +); + +export const INSTALL_TRANSLATED_RULES = (numberOfAllRules: number) => { + return i18n.translate( + 'xpack.securitySolution.siemMigrations.rules.table.installTranslatedRules', + { + defaultMessage: + 'Install translated {numberOfAllRules, plural, one {rule} other {rules}} ({numberOfAllRules})', + values: { numberOfAllRules }, + } + ); }; export const INSTALL_SELECTED_ARIA_LABEL = i18n.translate( @@ -57,8 +74,8 @@ export const INSTALL_SELECTED_ARIA_LABEL = i18n.translate( } ); -export const INSTALL_ALL_ARIA_LABEL = i18n.translate( - 'xpack.securitySolution.siemMigrations.rules.table.installAllButtonAriaLabel', +export const INSTALL_TRANSLATED_ARIA_LABEL = i18n.translate( + 'xpack.securitySolution.siemMigrations.rules.table.installTranslatedButtonAriaLabel', { defaultMessage: 'Install all translated rules', } diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table_columns/actions.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table_columns/actions.tsx index 7122949dee907..45de70582d4b1 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table_columns/actions.tsx +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table_columns/actions.tsx @@ -17,14 +17,14 @@ import type { TableColumn } from './constants'; interface ActionNameProps { disableActions?: boolean; migrationRule: RuleMigration; - openMigrationRulePreview: (migrationRule: RuleMigration) => void; + openMigrationRuleDetails: (migrationRule: RuleMigration) => void; installMigrationRule: (migrationRule: RuleMigration, enable?: boolean) => void; } const ActionName = ({ disableActions, migrationRule, - openMigrationRulePreview, + openMigrationRuleDetails, installMigrationRule, }: ActionNameProps) => { const { navigateToApp } = useKibana().services.application; @@ -72,7 +72,7 @@ const ActionName = ({ { - openMigrationRulePreview(migrationRule); + openMigrationRuleDetails(migrationRule); }} data-test-subj="editRule" > @@ -83,13 +83,13 @@ const ActionName = ({ interface CreateActionsColumnProps { disableActions?: boolean; - openMigrationRulePreview: (migrationRule: RuleMigration) => void; + openMigrationRuleDetails: (migrationRule: RuleMigration) => void; installMigrationRule: (migrationRule: RuleMigration, enable?: boolean) => void; } export const createActionsColumn = ({ disableActions, - openMigrationRulePreview, + openMigrationRuleDetails, installMigrationRule, }: CreateActionsColumnProps): TableColumn => { return { @@ -100,7 +100,7 @@ export const createActionsColumn = ({ ); diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table_columns/index.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table_columns/index.tsx index a402e61a444af..4220a35ed4622 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table_columns/index.tsx +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table_columns/index.tsx @@ -12,3 +12,4 @@ export * from './name'; export * from './risk_score'; export * from './severity'; export * from './status'; +export * from './updated'; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table_columns/name.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table_columns/name.tsx index 7b7cf228895fc..085a2f5c6a254 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table_columns/name.tsx +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table_columns/name.tsx @@ -14,14 +14,14 @@ import type { TableColumn } from './constants'; interface NameProps { name: string; rule: RuleMigration; - openMigrationRulePreview: (rule: RuleMigration) => void; + openMigrationRuleDetails: (rule: RuleMigration) => void; } -const Name = ({ name, rule, openMigrationRulePreview }: NameProps) => { +const Name = ({ name, rule, openMigrationRuleDetails }: NameProps) => { return ( { - openMigrationRulePreview(rule); + openMigrationRuleDetails(rule); }} data-test-subj="ruleName" > @@ -31,15 +31,15 @@ const Name = ({ name, rule, openMigrationRulePreview }: NameProps) => { }; export const createNameColumn = ({ - openMigrationRulePreview, + openMigrationRuleDetails, }: { - openMigrationRulePreview: (rule: RuleMigration) => void; + openMigrationRuleDetails: (rule: RuleMigration) => void; }): TableColumn => { return { field: 'original_rule.title', name: i18n.COLUMN_NAME, render: (value: RuleMigration['original_rule']['title'], rule: RuleMigration) => ( - + ), sortable: true, truncateText: true, diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table_columns/translations.ts b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table_columns/translations.ts index 906e752d79aa0..5b40abd3d7485 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table_columns/translations.ts +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table_columns/translations.ts @@ -69,3 +69,10 @@ export const COLUMN_SEVERITY = i18n.translate( defaultMessage: 'Severity', } ); + +export const COLUMN_UPDATED = i18n.translate( + 'xpack.securitySolution.siemMigrations.rules.tableColumn.updatedLabel', + { + defaultMessage: 'Updated', + } +); diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table_columns/updated.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table_columns/updated.tsx new file mode 100644 index 0000000000000..cec9f86eb7bde --- /dev/null +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/rules_table_columns/updated.tsx @@ -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 React from 'react'; +import { FormattedRelativePreferenceDate } from '../../../../common/components/formatted_date'; +import type { RuleMigration } from '../../../../../common/siem_migrations/model/rule_migration.gen'; +import * as i18n from './translations'; +import type { TableColumn } from './constants'; + +export const createUpdatedColumn = (): TableColumn => { + return { + field: 'updated_at', + name: i18n.COLUMN_UPDATED, + render: (value: RuleMigration['updated_at']) => ( + + ), + sortable: true, + truncateText: false, + align: 'center', + width: '10%', + }; +}; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/status_badge/index.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/status_badge/index.tsx index 40b3c5ceb5719..60f0ed94862ca 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/status_badge/index.tsx +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/status_badge/index.tsx @@ -19,31 +19,27 @@ const statusToColorMap: Record = { untranslatable: euiColorVis9, }; -interface Props { +interface StatusBadgeProps { value?: RuleMigrationTranslationResult; installedRuleId?: string; 'data-test-subj'?: string; } -const StatusBadgeComponent: React.FC = ({ - value, - installedRuleId, - 'data-test-subj': dataTestSubj = 'translation-result', -}) => { - const translationResult = installedRuleId || !value ? 'full' : value; - const displayValue = convertTranslationResultIntoText(translationResult); - const color = statusToColorMap[translationResult]; +export const StatusBadge: React.FC = React.memo( + ({ value, installedRuleId, 'data-test-subj': dataTestSubj = 'translation-result' }) => { + const translationResult = installedRuleId ? 'full' : value ?? 'untranslatable'; + const displayValue = convertTranslationResultIntoText(translationResult); + const color = statusToColorMap[translationResult]; - return ( - - {displayValue} - - ); -}; - -export const StatusBadge = React.memo(StatusBadgeComponent); + return ( + + {displayValue} + + ); + } +); StatusBadge.displayName = 'StatusBadge'; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/translation_details_flyout/index.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/translation_details_flyout/index.tsx deleted file mode 100644 index b6dce09c311e1..0000000000000 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/translation_details_flyout/index.tsx +++ /dev/null @@ -1,246 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import type { FC, PropsWithChildren } from 'react'; -import React, { useMemo, useState, useEffect } from 'react'; -import styled from 'styled-components'; -import { css } from '@emotion/css'; -import { euiThemeVars } from '@kbn/ui-theme'; -import { - EuiButtonEmpty, - EuiTitle, - EuiFlyout, - EuiFlyoutHeader, - EuiFlyoutBody, - EuiFlyoutFooter, - EuiTabbedContent, - EuiSpacer, - EuiFlexGroup, - EuiFlexItem, - useGeneratedHtmlId, -} from '@elastic/eui'; -import type { EuiTabbedContentTab, EuiTabbedContentProps, EuiFlyoutProps } from '@elastic/eui'; - -import { - DEFAULT_TRANSLATION_RISK_SCORE, - DEFAULT_TRANSLATION_SEVERITY, -} from '../../../../../common/siem_migrations/constants'; -import type { RuleMigration } from '../../../../../common/siem_migrations/model/rule_migration.gen'; -import { - RuleOverviewTab, - useOverviewTabSections, -} from '../../../../detection_engine/rule_management/components/rule_details/rule_overview_tab'; -import { - type RuleResponse, - type Severity, -} from '../../../../../common/api/detection_engine/model/rule_schema'; - -import * as i18n from './translations'; -import { - DEFAULT_DESCRIPTION_LIST_COLUMN_WIDTHS, - LARGE_DESCRIPTION_LIST_COLUMN_WIDTHS, -} from './constants'; -import { TranslationTab } from './translation_tab'; - -const StyledEuiFlyoutBody = styled(EuiFlyoutBody)` - .euiFlyoutBody__overflow { - display: flex; - flex: 1; - overflow: hidden; - - .euiFlyoutBody__overflowContent { - flex: 1; - overflow: hidden; - padding: ${({ theme }) => `0 ${theme.eui.euiSizeL} 0`}; - } - } -`; - -const StyledFlexGroup = styled(EuiFlexGroup)` - height: 100%; -`; - -const StyledEuiFlexItem = styled(EuiFlexItem)` - &.euiFlexItem { - flex: 1 0 0; - overflow: hidden; - } -`; - -const StyledEuiTabbedContent = styled(EuiTabbedContent)` - display: flex; - flex: 1; - flex-direction: column; - overflow: hidden; - - > [role='tabpanel'] { - display: flex; - flex: 1; - flex-direction: column; - overflow: hidden; - overflow-y: auto; - - ::-webkit-scrollbar { - -webkit-appearance: none; - width: 7px; - } - - ::-webkit-scrollbar-thumb { - border-radius: 4px; - background-color: rgba(0, 0, 0, 0.5); - -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5); - } - } -`; - -/* - * Fixes tabs to the top and allows the content to scroll. - */ -const ScrollableFlyoutTabbedContent = (props: EuiTabbedContentProps) => ( - - - - - -); - -const tabPaddingClassName = css` - padding: 0 ${euiThemeVars.euiSizeM} ${euiThemeVars.euiSizeXL} ${euiThemeVars.euiSizeM}; -`; - -export const TabContentPadding: FC> = ({ children }) => ( -
          {children}
          -); - -interface TranslationDetailsFlyoutProps { - ruleActions?: React.ReactNode; - ruleMigration: RuleMigration; - size?: EuiFlyoutProps['size']; - extraTabs?: EuiTabbedContentTab[]; - closeFlyout: () => void; -} - -export const TranslationDetailsFlyout = ({ - ruleActions, - ruleMigration, - size = 'm', - extraTabs = [], - closeFlyout, -}: TranslationDetailsFlyoutProps) => { - const { expandedOverviewSections, toggleOverviewSection } = useOverviewTabSections(); - - const rule: RuleResponse = useMemo(() => { - const esqlLanguage = ruleMigration.elastic_rule?.query_language ?? 'esql'; - return { - type: esqlLanguage, - language: esqlLanguage, - name: ruleMigration.elastic_rule?.title, - description: ruleMigration.elastic_rule?.description, - query: ruleMigration.elastic_rule?.query, - - // Default values - severity: (ruleMigration.elastic_rule?.severity as Severity) ?? DEFAULT_TRANSLATION_SEVERITY, - risk_score: DEFAULT_TRANSLATION_RISK_SCORE, - from: 'now-360s', - to: 'now', - interval: '5m', - } as RuleResponse; // TODO: we need to adjust RuleOverviewTab to allow partial RuleResponse as a parameter - }, [ruleMigration]); - - const translationTab: EuiTabbedContentTab = useMemo( - () => ({ - id: 'translation', - name: i18n.TRANSLATION_TAB_LABEL, - content: ( - - - - ), - }), - [ruleMigration] - ); - - const overviewTab: EuiTabbedContentTab = useMemo( - () => ({ - id: 'overview', - name: i18n.OVERVIEW_TAB_LABEL, - content: ( - - - - ), - }), - [rule, size, expandedOverviewSections, toggleOverviewSection] - ); - - const tabs = useMemo(() => { - return [...extraTabs, translationTab, overviewTab]; - }, [extraTabs, translationTab, overviewTab]); - - const [selectedTabId, setSelectedTabId] = useState(tabs[0].id); - const selectedTab = tabs.find((tab) => tab.id === selectedTabId) ?? tabs[0]; - - useEffect(() => { - if (!tabs.find((tab) => tab.id === selectedTabId)) { - // Switch to first tab if currently selected tab is not available for this rule - setSelectedTabId(tabs[0].id); - } - }, [tabs, selectedTabId]); - - const onTabClick = (tab: EuiTabbedContentTab) => { - setSelectedTabId(tab.id); - }; - - const migrationsRulesFlyoutTitleId = useGeneratedHtmlId({ - prefix: 'migrationRulesFlyoutTitle', - }); - - return ( - - - -

          {rule.name}

          -
          - -
          - - - - - - - - {i18n.DISMISS_BUTTON_LABEL} - - - {ruleActions} - - -
          - ); -}; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/translation_details_flyout/translation_tab/rule_query.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/translation_details_flyout/translation_tab/rule_query.tsx deleted file mode 100644 index 50977cafb18d0..0000000000000 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/translation_details_flyout/translation_tab/rule_query.tsx +++ /dev/null @@ -1,49 +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 React, { useMemo } from 'react'; -import { EuiMarkdownEditor, EuiMarkdownFormat, EuiTitle } from '@elastic/eui'; -import { SideHeader } from '../../../../../detection_engine/rule_management/components/rule_details/three_way_diff/components/side_header'; -import { FinalSideHelpInfo } from '../../../../../detection_engine/rule_management/components/rule_details/three_way_diff/final_side/final_side_help_info'; -import * as i18n from './translations'; - -interface RuleQueryProps { - title: string; - query: string; - canEdit?: boolean; -} - -export const RuleQueryComponent = ({ title, query, canEdit }: RuleQueryProps) => { - const queryTextComponent = useMemo(() => { - if (canEdit) { - return ( - {}} - height={400} - initialViewMode={'viewing'} - /> - ); - } else { - return {query}; - } - }, [canEdit, query]); - return ( - <> - - -

          - {title} - -

          -
          -
          - {queryTextComponent} - - ); -}; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/unknown_migration/index.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/unknown_migration/index.tsx index 0a33869eff418..dd48d3b357e18 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/components/unknown_migration/index.tsx +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/components/unknown_migration/index.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { EuiEmptyPrompt, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import * as i18n from './translations'; -const UnknownMigrationComponent = () => { +export const UnknownMigration: React.FC = React.memo(() => { return ( { title={

          {i18n.UNKNOWN_MIGRATION}

          } titleSize="s" body={i18n.UNKNOWN_MIGRATION_BODY} - data-test-subj="noMigrationsAvailable" + data-test-subj="unknownMigration" />
          ); -}; - -export const UnknownMigration = React.memo(UnknownMigrationComponent); +}); UnknownMigration.displayName = 'UnknownMigration'; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/hooks/use_filter_rules_to_install.ts b/x-pack/plugins/security_solution/public/siem_migrations/rules/hooks/use_filter_rules_to_install.ts deleted file mode 100644 index f6862d3d90380..0000000000000 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/hooks/use_filter_rules_to_install.ts +++ /dev/null @@ -1,33 +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 { useMemo } from 'react'; -import type { RuleMigration } from '../../../../common/siem_migrations/model/rule_migration.gen'; -import type { FilterOptions } from '../../../detection_engine/rule_management/logic/types'; - -export type TableFilterOptions = Pick; - -export const useFilterRulesToInstall = ({ - ruleMigrations, - filterOptions, -}: { - ruleMigrations: RuleMigration[]; - filterOptions: TableFilterOptions; -}) => { - const filteredRules = useMemo(() => { - const { filter } = filterOptions; - return ruleMigrations.filter((migration) => { - const name = migration.elastic_rule?.title ?? migration.original_rule.title; - if (filter && !name.toLowerCase().includes(filter.toLowerCase())) { - return false; - } - return true; - }); - }, [filterOptions, ruleMigrations]); - - return filteredRules; -}; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/hooks/use_rule_preview_flyout.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/hooks/use_migration_rule_preview_flyout.tsx similarity index 55% rename from x-pack/plugins/security_solution/public/siem_migrations/rules/hooks/use_rule_preview_flyout.tsx rename to x-pack/plugins/security_solution/public/siem_migrations/rules/hooks/use_migration_rule_preview_flyout.tsx index 1721b4e280aad..4823e48de97c6 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/hooks/use_rule_preview_flyout.tsx +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/hooks/use_migration_rule_preview_flyout.tsx @@ -9,28 +9,28 @@ import type { ReactNode } from 'react'; import React, { useCallback, useState, useMemo } from 'react'; import type { EuiTabbedContentTab } from '@elastic/eui'; import type { RuleMigration } from '../../../../common/siem_migrations/model/rule_migration.gen'; -import { TranslationDetailsFlyout } from '../components/translation_details_flyout'; +import { MigrationRuleDetailsFlyout } from '../components/rule_details_flyout'; -interface UseRulePreviewFlyoutParams { +interface UseMigrationRuleDetailsFlyoutParams { ruleActionsFactory: (ruleMigration: RuleMigration, closeRulePreview: () => void) => ReactNode; extraTabsFactory?: (ruleMigration: RuleMigration) => EuiTabbedContentTab[]; } -interface UseRulePreviewFlyoutResult { - rulePreviewFlyout: ReactNode; - openRulePreview: (rule: RuleMigration) => void; - closeRulePreview: () => void; +interface UseMigrationRuleDetailsFlyoutResult { + migrationRuleDetailsFlyout: ReactNode; + openMigrationRuleDetails: (rule: RuleMigration) => void; + closeMigrationRuleDetails: () => void; } -export function useRulePreviewFlyout({ +export function useMigrationRuleDetailsFlyout({ extraTabsFactory, ruleActionsFactory, -}: UseRulePreviewFlyoutParams): UseRulePreviewFlyoutResult { - const [ruleMigration, setRuleMigrationForPreview] = useState(); - const closeRulePreview = useCallback(() => setRuleMigrationForPreview(undefined), []); +}: UseMigrationRuleDetailsFlyoutParams): UseMigrationRuleDetailsFlyoutResult { + const [ruleMigration, setMigrationRuleForPreview] = useState(); + const closeMigrationRuleDetails = useCallback(() => setMigrationRuleForPreview(undefined), []); const ruleActions = useMemo( - () => ruleMigration && ruleActionsFactory(ruleMigration, closeRulePreview), - [ruleMigration, ruleActionsFactory, closeRulePreview] + () => ruleMigration && ruleActionsFactory(ruleMigration, closeMigrationRuleDetails), + [ruleMigration, ruleActionsFactory, closeMigrationRuleDetails] ); const extraTabs = useMemo( () => (ruleMigration && extraTabsFactory ? extraTabsFactory(ruleMigration) : []), @@ -38,18 +38,18 @@ export function useRulePreviewFlyout({ ); return { - rulePreviewFlyout: ruleMigration && ( - ), - openRulePreview: useCallback((rule: RuleMigration) => { - setRuleMigrationForPreview(rule); + openMigrationRuleDetails: useCallback((rule: RuleMigration) => { + setMigrationRuleForPreview(rule); }, []), - closeRulePreview, + closeMigrationRuleDetails, }; } diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/hooks/use_rules_table_columns.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/hooks/use_migration_rules_table_columns.tsx similarity index 74% rename from x-pack/plugins/security_solution/public/siem_migrations/rules/hooks/use_rules_table_columns.tsx rename to x-pack/plugins/security_solution/public/siem_migrations/rules/hooks/use_migration_rules_table_columns.tsx index b7e06b4ea938a..b8b37bccaffd3 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/hooks/use_rules_table_columns.tsx +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/hooks/use_migration_rules_table_columns.tsx @@ -14,29 +14,31 @@ import { createRiskScoreColumn, createSeverityColumn, createStatusColumn, + createUpdatedColumn, } from '../components/rules_table_columns'; -export const useRulesTableColumns = ({ +export const useMigrationRulesTableColumns = ({ disableActions, - openMigrationRulePreview, + openMigrationRuleDetails, installMigrationRule, }: { disableActions?: boolean; - openMigrationRulePreview: (rule: RuleMigration) => void; + openMigrationRuleDetails: (rule: RuleMigration) => void; installMigrationRule: (migrationRule: RuleMigration, enable?: boolean) => void; }): TableColumn[] => { return useMemo( () => [ - createNameColumn({ openMigrationRulePreview }), + createUpdatedColumn(), + createNameColumn({ openMigrationRuleDetails }), createStatusColumn(), createRiskScoreColumn(), createSeverityColumn(), createActionsColumn({ disableActions, - openMigrationRulePreview, + openMigrationRuleDetails, installMigrationRule, }), ], - [disableActions, installMigrationRule, openMigrationRulePreview] + [disableActions, installMigrationRule, openMigrationRuleDetails] ); }; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/api/hooks/constants.ts b/x-pack/plugins/security_solution/public/siem_migrations/rules/logic/constants.ts similarity index 100% rename from x-pack/plugins/security_solution/public/siem_migrations/rules/api/hooks/constants.ts rename to x-pack/plugins/security_solution/public/siem_migrations/rules/logic/constants.ts diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/logic/translations.ts b/x-pack/plugins/security_solution/public/siem_migrations/rules/logic/translations.ts index 23f5a6e3849a0..3b13daa8f0682 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/logic/translations.ts +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/logic/translations.ts @@ -14,6 +14,13 @@ export const GET_MIGRATION_RULES_FAILURE = i18n.translate( } ); +export const GET_MIGRATION_TRANSLATION_STATS_FAILURE = i18n.translate( + 'xpack.securitySolution.siemMigrations.rules.getMigrationTranslationStatsFailDescription', + { + defaultMessage: 'Failed to fetch migration translation stats', + } +); + export const INSTALL_MIGRATION_RULES_FAILURE = i18n.translate( 'xpack.securitySolution.siemMigrations.rules.installMigrationRulesFailDescription', { diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/logic/use_get_migration_rules.ts b/x-pack/plugins/security_solution/public/siem_migrations/rules/logic/use_get_migration_rules.ts index 27637daf142ff..5f59ceb9f76c2 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/logic/use_get_migration_rules.ts +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/logic/use_get_migration_rules.ts @@ -5,16 +5,64 @@ * 2.0. */ +import { useQuery, useQueryClient } from '@tanstack/react-query'; +import { replaceParams } from '@kbn/openapi-common/shared'; +import { useCallback } from 'react'; +import { SIEM_RULE_MIGRATION_PATH } from '../../../../common/siem_migrations/constants'; import { useAppToasts } from '../../../common/hooks/use_app_toasts'; -import { useGetMigrationRulesQuery } from '../api/hooks/use_get_migration_rules_query'; import * as i18n from './translations'; +import { getRuleMigrations } from '../api'; +import { DEFAULT_QUERY_OPTIONS } from './constants'; -export const useGetMigrationRules = (migrationId: string) => { +export const useGetMigrationRules = (params: { + migrationId: string; + page?: number; + perPage?: number; + searchTerm?: string; +}) => { const { addError } = useAppToasts(); - return useGetMigrationRulesQuery(migrationId, { - onError: (error) => { - addError(error, { title: i18n.GET_MIGRATION_RULES_FAILURE }); + const { migrationId } = params; + const SPECIFIC_MIGRATION_PATH = replaceParams(SIEM_RULE_MIGRATION_PATH, { + migration_id: migrationId, + }); + + return useQuery( + ['GET', SPECIFIC_MIGRATION_PATH, params], + async ({ signal }) => { + const response = await getRuleMigrations({ signal, ...params }); + + return { ruleMigrations: response.data, total: response.total }; }, + { + ...DEFAULT_QUERY_OPTIONS, + onError: (error) => { + addError(error, { title: i18n.GET_MIGRATION_RULES_FAILURE }); + }, + } + ); +}; + +/** + * We should use this hook to invalidate the rule migrations cache. For + * example, rule migrations mutations, like installing a rule, should lead to cache invalidation. + * + * @returns A rule migrations cache invalidation callback + */ +export const useInvalidateGetMigrationRules = (migrationId: string) => { + const queryClient = useQueryClient(); + + const SPECIFIC_MIGRATION_PATH = replaceParams(SIEM_RULE_MIGRATION_PATH, { + migration_id: migrationId, }); + + return useCallback(() => { + /** + * Invalidate all queries that start with SPECIFIC_MIGRATION_PATH. This + * includes the in-memory query cache and paged query cache. + */ + queryClient.invalidateQueries(['GET', SPECIFIC_MIGRATION_PATH], { + refetchType: 'active', + }); + }, [SPECIFIC_MIGRATION_PATH, queryClient]); }; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/logic/use_get_migration_translation_stats.ts b/x-pack/plugins/security_solution/public/siem_migrations/rules/logic/use_get_migration_translation_stats.ts new file mode 100644 index 0000000000000..b19a1133e3061 --- /dev/null +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/logic/use_get_migration_translation_stats.ts @@ -0,0 +1,62 @@ +/* + * 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 { replaceParams } from '@kbn/openapi-common/shared'; +import { useQuery, useQueryClient } from '@tanstack/react-query'; +import { useCallback } from 'react'; +import type { GetRuleMigrationTranslationStatsResponse } from '../../../../common/siem_migrations/model/api/rules/rule_migration.gen'; +import { SIEM_RULE_MIGRATION_TRANSLATION_STATS_PATH } from '../../../../common/siem_migrations/constants'; +import { useAppToasts } from '../../../common/hooks/use_app_toasts'; +import * as i18n from './translations'; +import { getRuleMigrationTranslationStats } from '../api'; +import { DEFAULT_QUERY_OPTIONS } from './constants'; + +export const useGetMigrationTranslationStats = (migrationId: string) => { + const { addError } = useAppToasts(); + + const SPECIFIC_MIGRATION_TRANSLATION_PATH = replaceParams( + SIEM_RULE_MIGRATION_TRANSLATION_STATS_PATH, + { + migration_id: migrationId, + } + ); + return useQuery( + ['GET', SPECIFIC_MIGRATION_TRANSLATION_PATH], + async ({ signal }) => { + return getRuleMigrationTranslationStats({ migrationId, signal }); + }, + { + ...DEFAULT_QUERY_OPTIONS, + onError: (error) => { + addError(error, { title: i18n.GET_MIGRATION_TRANSLATION_STATS_FAILURE }); + }, + } + ); +}; + +/** + * We should use this hook to invalidate the translation stats cache. For + * example, rule migrations mutations, like installing a rule, should lead to cache invalidation. + * + * @returns A translation stats cache invalidation callback + */ +export const useInvalidateGetMigrationTranslationStats = (migrationId: string) => { + const queryClient = useQueryClient(); + + const SPECIFIC_MIGRATION_TRANSLATION_PATH = replaceParams( + SIEM_RULE_MIGRATION_TRANSLATION_STATS_PATH, + { + migration_id: migrationId, + } + ); + + return useCallback(() => { + queryClient.invalidateQueries(['GET', SPECIFIC_MIGRATION_TRANSLATION_PATH], { + refetchType: 'active', + }); + }, [SPECIFIC_MIGRATION_TRANSLATION_PATH, queryClient]); +}; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/logic/use_install_all_migration_rules.ts b/x-pack/plugins/security_solution/public/siem_migrations/rules/logic/use_install_all_migration_rules.ts deleted file mode 100644 index 105ea651d0a8c..0000000000000 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/logic/use_install_all_migration_rules.ts +++ /dev/null @@ -1,20 +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 { useAppToasts } from '../../../common/hooks/use_app_toasts'; -import { useInstallAllMigrationRulesMutation } from '../api/hooks/use_install_all_migration_rules_mutation'; -import * as i18n from './translations'; - -export const useInstallAllMigrationRules = (migrationId: string) => { - const { addError } = useAppToasts(); - - return useInstallAllMigrationRulesMutation(migrationId, { - onError: (error) => { - addError(error, { title: i18n.INSTALL_MIGRATION_RULES_FAILURE }); - }, - }); -}; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/logic/use_install_migration_rules.ts b/x-pack/plugins/security_solution/public/siem_migrations/rules/logic/use_install_migration_rules.ts index dcc19f290f87f..755faa03bff14 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/logic/use_install_migration_rules.ts +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/logic/use_install_migration_rules.ts @@ -5,16 +5,35 @@ * 2.0. */ +import { useMutation } from '@tanstack/react-query'; +import { SIEM_RULE_MIGRATION_INSTALL_PATH } from '../../../../common/siem_migrations/constants'; +import type { InstallMigrationRulesResponse } from '../../../../common/siem_migrations/model/api/rules/rule_migration.gen'; import { useAppToasts } from '../../../common/hooks/use_app_toasts'; -import { useInstallMigrationRulesMutation } from '../api/hooks/use_install_migration_rules_mutation'; import * as i18n from './translations'; +import { useInvalidateGetMigrationRules } from './use_get_migration_rules'; +import { useInvalidateGetMigrationTranslationStats } from './use_get_migration_translation_stats'; +import { installMigrationRules } from '../api'; + +export const INSTALL_MIGRATION_RULES_MUTATION_KEY = ['POST', SIEM_RULE_MIGRATION_INSTALL_PATH]; export const useInstallMigrationRules = (migrationId: string) => { const { addError } = useAppToasts(); - return useInstallMigrationRulesMutation(migrationId, { - onError: (error) => { - addError(error, { title: i18n.INSTALL_MIGRATION_RULES_FAILURE }); - }, - }); + const invalidateGetRuleMigrations = useInvalidateGetMigrationRules(migrationId); + const invalidateGetMigrationTranslationStats = + useInvalidateGetMigrationTranslationStats(migrationId); + + return useMutation( + (ids: string[]) => installMigrationRules({ migrationId, ids }), + { + mutationKey: INSTALL_MIGRATION_RULES_MUTATION_KEY, + onError: (error) => { + addError(error, { title: i18n.INSTALL_MIGRATION_RULES_FAILURE }); + }, + onSettled: () => { + invalidateGetRuleMigrations(); + invalidateGetMigrationTranslationStats(); + }, + } + ); }; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/logic/use_install_translated_migration_rules.ts b/x-pack/plugins/security_solution/public/siem_migrations/rules/logic/use_install_translated_migration_rules.ts new file mode 100644 index 0000000000000..b0d9e11136396 --- /dev/null +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/logic/use_install_translated_migration_rules.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 { useMutation } from '@tanstack/react-query'; +import type { InstallTranslatedMigrationRulesResponse } from '../../../../common/siem_migrations/model/api/rules/rule_migration.gen'; +import { SIEM_RULE_MIGRATION_INSTALL_TRANSLATED_PATH } from '../../../../common/siem_migrations/constants'; +import { useAppToasts } from '../../../common/hooks/use_app_toasts'; +import * as i18n from './translations'; +import { useInvalidateGetMigrationRules } from './use_get_migration_rules'; +import { useInvalidateGetMigrationTranslationStats } from './use_get_migration_translation_stats'; +import { installTranslatedMigrationRules } from '../api'; + +export const INSTALL_ALL_MIGRATION_RULES_MUTATION_KEY = [ + 'POST', + SIEM_RULE_MIGRATION_INSTALL_TRANSLATED_PATH, +]; + +export const useInstallTranslatedMigrationRules = (migrationId: string) => { + const { addError } = useAppToasts(); + + const invalidateGetRuleMigrations = useInvalidateGetMigrationRules(migrationId); + const invalidateGetMigrationTranslationStats = + useInvalidateGetMigrationTranslationStats(migrationId); + + return useMutation( + () => installTranslatedMigrationRules({ migrationId }), + { + mutationKey: INSTALL_ALL_MIGRATION_RULES_MUTATION_KEY, + onError: (error) => { + addError(error, { title: i18n.INSTALL_MIGRATION_RULES_FAILURE }); + }, + onSettled: () => { + invalidateGetRuleMigrations(); + invalidateGetMigrationTranslationStats(); + }, + } + ); +}; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/pages/index.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/pages/index.tsx index dabdb83cccbab..018aa5d77559e 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/pages/index.tsx +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/pages/index.tsx @@ -9,22 +9,23 @@ import React, { useEffect, useMemo } from 'react'; import { EuiSkeletonLoading, EuiSkeletonText, EuiSkeletonTitle } from '@elastic/eui'; import type { RouteComponentProps } from 'react-router-dom'; +import { SiemMigrationTaskStatus } from '../../../../common/siem_migrations/constants'; import { useNavigation } from '../../../common/lib/kibana'; import { HeaderPage } from '../../../common/components/header_page'; import { SecuritySolutionPageWrapper } from '../../../common/components/page_wrapper'; import { SecurityPageName } from '../../../app/types'; import * as i18n from './translations'; -import { RulesTable } from '../components/rules_table'; +import { MigrationRulesTable } from '../components/rules_table'; import { NeedAdminForUpdateRulesCallOut } from '../../../detections/components/callouts/need_admin_for_update_callout'; import { MissingPrivilegesCallOut } from '../../../detections/components/callouts/missing_privileges_callout'; import { HeaderButtons } from '../components/header_buttons'; import { UnknownMigration } from '../components/unknown_migration'; import { useLatestStats } from '../hooks/use_latest_stats'; -type RulesMigrationPageProps = RouteComponentProps<{ migrationId?: string }>; +type MigrationRulesPageProps = RouteComponentProps<{ migrationId?: string }>; -export const RulesPage: React.FC = React.memo( +export const MigrationRulesPage: React.FC = React.memo( ({ match: { params: { migrationId }, @@ -34,13 +35,13 @@ export const RulesPage: React.FC = React.memo( const { data: ruleMigrationsStatsAll, isLoading: isLoadingMigrationsStats } = useLatestStats(); - const migrationsIds = useMemo(() => { + const finishedRuleMigrationsStats = useMemo(() => { if (isLoadingMigrationsStats || !ruleMigrationsStatsAll?.length) { return []; } - return ruleMigrationsStatsAll - .filter((migration) => migration.status === 'finished') - .map((migration) => migration.id); + return ruleMigrationsStatsAll.filter( + (migration) => migration.status === SiemMigrationTaskStatus.FINISHED + ); }, [isLoadingMigrationsStats, ruleMigrationsStatsAll]); useEffect(() => { @@ -49,27 +50,30 @@ export const RulesPage: React.FC = React.memo( } // Navigate to landing page if there are no migrations - if (!migrationsIds.length) { + if (!finishedRuleMigrationsStats.length) { navigateTo({ deepLinkId: SecurityPageName.landing, path: 'siem_migrations' }); return; } // Navigate to the most recent migration if none is selected if (!migrationId) { - navigateTo({ deepLinkId: SecurityPageName.siemMigrationsRules, path: migrationsIds[0] }); + navigateTo({ + deepLinkId: SecurityPageName.siemMigrationsRules, + path: finishedRuleMigrationsStats[0].id, + }); } - }, [isLoadingMigrationsStats, migrationId, migrationsIds, navigateTo]); + }, [isLoadingMigrationsStats, migrationId, finishedRuleMigrationsStats, navigateTo]); const onMigrationIdChange = (selectedId?: string) => { navigateTo({ deepLinkId: SecurityPageName.siemMigrationsRules, path: selectedId }); }; const content = useMemo(() => { - if (!migrationId || !migrationsIds.includes(migrationId)) { + if (!migrationId || !finishedRuleMigrationsStats.some((stats) => stats.id === migrationId)) { return ; } - return ; - }, [migrationId, migrationsIds]); + return ; + }, [migrationId, finishedRuleMigrationsStats]); return ( <> @@ -79,7 +83,7 @@ export const RulesPage: React.FC = React.memo( @@ -99,4 +103,4 @@ export const RulesPage: React.FC = React.memo( ); } ); -RulesPage.displayName = 'RulesPage'; +MigrationRulesPage.displayName = 'MigrationRulesPage'; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/service/rule_migrations_service.ts b/x-pack/plugins/security_solution/public/siem_migrations/rules/service/rule_migrations_service.ts index a872d79a46027..3162cc3d58e63 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/service/rule_migrations_service.ts +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/service/rule_migrations_service.ts @@ -12,7 +12,7 @@ import { SiemMigrationTaskStatus } from '../../../../common/siem_migrations/cons import type { StartPluginsDependencies } from '../../../types'; import { ExperimentalFeaturesService } from '../../../common/experimental_features_service'; import { licenseService } from '../../../common/hooks/use_license'; -import { getRuleMigrationsStatsAll, startRuleMigration } from '../api/api'; +import { getRuleMigrationsStatsAll, startRuleMigration } from '../api'; import type { RuleMigrationTask } from '../types'; import { getSuccessToast } from './success_notification'; import { RuleMigrationsStorage } from './storage'; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/types.ts b/x-pack/plugins/security_solution/public/siem_migrations/rules/types.ts index b395fa0199de8..4c704e97179c0 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/types.ts +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/types.ts @@ -11,14 +11,3 @@ export interface RuleMigrationTask extends RuleMigrationTaskStats { /** The sequential number of the migration */ number: number; } - -export interface InstallRulesProps { - migrationId: string; - ids: string[]; - signal?: AbortSignal; -} - -export interface InstallTranslatedRulesProps { - migrationId: string; - signal?: AbortSignal; -} diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/utils/helpers.tsx b/x-pack/plugins/security_solution/public/siem_migrations/rules/utils/helpers.tsx index cd49311db21eb..fe3fbf9945077 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/utils/helpers.tsx +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/utils/helpers.tsx @@ -11,6 +11,22 @@ import { } from '../../../../common/siem_migrations/model/rule_migration.gen'; import * as i18n from './translations'; +export const convertTranslationResultIntoColor = (status?: RuleMigrationTranslationResult) => { + switch (status) { + case RuleMigrationTranslationResultEnum.full: + return 'primary'; + + case RuleMigrationTranslationResultEnum.partial: + return 'warning'; + + case RuleMigrationTranslationResultEnum.untranslatable: + return 'danger'; + + default: + throw new Error(i18n.SIEM_TRANSLATION_RESULT_UNKNOWN_ERROR(status)); + } +}; + export const convertTranslationResultIntoText = (status?: RuleMigrationTranslationResult) => { switch (status) { case RuleMigrationTranslationResultEnum.full: @@ -23,6 +39,6 @@ export const convertTranslationResultIntoText = (status?: RuleMigrationTranslati return i18n.SIEM_TRANSLATION_RESULT_UNTRANSLATABLE_LABEL; default: - return i18n.SIEM_TRANSLATION_RESULT_UNKNOWN_LABEL; + throw new Error(i18n.SIEM_TRANSLATION_RESULT_UNKNOWN_ERROR(status)); } }; diff --git a/x-pack/plugins/security_solution/public/siem_migrations/rules/utils/translations.ts b/x-pack/plugins/security_solution/public/siem_migrations/rules/utils/translations.ts index bc098936c00f7..366ad435c61b4 100644 --- a/x-pack/plugins/security_solution/public/siem_migrations/rules/utils/translations.ts +++ b/x-pack/plugins/security_solution/public/siem_migrations/rules/utils/translations.ts @@ -34,3 +34,13 @@ export const SIEM_TRANSLATION_RESULT_UNKNOWN_LABEL = i18n.translate( defaultMessage: 'Unknown', } ); + +export const SIEM_TRANSLATION_RESULT_UNKNOWN_ERROR = (status?: string) => { + return i18n.translate( + 'xpack.securitySolution.siemMigrations.rules.translationResult.unknownError', + { + defaultMessage: 'Unknown translation result status: ({status})', + values: { status }, + } + ); +}; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.tsx index 43c4648abb83a..a5570d2750f5f 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.tsx @@ -184,7 +184,7 @@ export const focusUtilityBarAction = (containerElement: HTMLElement | null) => { * Resets keyboard focus on the page */ export const resetKeyboardFocus = () => { - document.querySelector('header.headerGlobalNav a.chrHeaderLogo')?.focus(); + document.body.focus(); }; interface OperatorHandler { diff --git a/x-pack/plugins/security_solution/server/assistant/tools/defend_insights/index.ts b/x-pack/plugins/security_solution/server/assistant/tools/defend_insights/index.ts index 1ea26b88a15cf..49524a9f15190 100644 --- a/x-pack/plugins/security_solution/server/assistant/tools/defend_insights/index.ts +++ b/x-pack/plugins/security_solution/server/assistant/tools/defend_insights/index.ts @@ -11,21 +11,29 @@ import { LLMChain } from 'langchain/chains'; import { OutputFixingParser } from 'langchain/output_parsers'; import type { AssistantTool, AssistantToolParams } from '@kbn/elastic-assistant-plugin/server'; -import type { DefendInsightType } from '@kbn/elastic-assistant-common'; +import type { + DefendInsight, + DefendInsightType, + DefendInsightsPostRequestBody, +} from '@kbn/elastic-assistant-common'; +import type { KibanaRequest } from '@kbn/core/server'; import { requestHasRequiredAnonymizationParams } from '@kbn/elastic-assistant-plugin/server/lib/langchain/helpers'; import { DEFEND_INSIGHTS_TOOL_ID } from '@kbn/elastic-assistant-common'; import { APP_UI_ID } from '../../../../common'; +import { securityWorkflowInsightsService } from '../../../endpoint/services'; import { getAnonymizedEvents } from './get_events'; import { getDefendInsightsOutputParser } from './output_parsers'; import { getDefendInsightsPrompt } from './prompts'; +import { buildWorkflowInsights } from './workflow_insights_builders'; export const DEFEND_INSIGHTS_TOOL_DESCRIPTION = 'Call this for Elastic Defend insights.'; export interface DefendInsightsToolParams extends AssistantToolParams { endpointIds: string[]; insightType: DefendInsightType; + request: KibanaRequest; } /** @@ -55,6 +63,7 @@ export const DEFEND_INSIGHTS_TOOL: AssistantTool = Object.freeze({ llm, onNewReplacements, replacements, + request, } = params as DefendInsightsToolParams; return new DynamicTool({ @@ -104,7 +113,13 @@ export const DEFEND_INSIGHTS_TOOL: AssistantTool = Object.freeze({ }), timeout: langChainTimeout, }); - const insights = result.records; + const insights: DefendInsight[] = result.records; + + const workflowInsights = buildWorkflowInsights({ + defendInsights: insights, + request, + }); + workflowInsights.map(securityWorkflowInsightsService.create); return JSON.stringify({ eventsContextCount, insights }, null, 2); }, diff --git a/x-pack/plugins/security_solution/server/assistant/tools/defend_insights/workflow_insights_builders/incompatible_antivirus.ts b/x-pack/plugins/security_solution/server/assistant/tools/defend_insights/workflow_insights_builders/incompatible_antivirus.ts new file mode 100644 index 0000000000000..c9d091f76dbc3 --- /dev/null +++ b/x-pack/plugins/security_solution/server/assistant/tools/defend_insights/workflow_insights_builders/incompatible_antivirus.ts @@ -0,0 +1,86 @@ +/* + * 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 { ENDPOINT_ARTIFACT_LISTS } from '@kbn/securitysolution-list-constants'; + +import type { DefendInsight } from '@kbn/elastic-assistant-common'; +import type { BuildWorkflowInsightParams } from '.'; +import type { SecurityWorkflowInsight } from '../../../../../common/endpoint/types/workflow_insights'; + +import { + ActionType, + Category, + SourceType, + TargetType, +} from '../../../../../common/endpoint/types/workflow_insights'; +import { SUPPORTED_HOST_OS_TYPE } from '../../../../../common/endpoint/constants'; + +export function buildIncompatibleAntivirusWorkflowInsights( + params: BuildWorkflowInsightParams +): SecurityWorkflowInsight[] { + const currentTime = moment(); + const { defendInsights, request } = params; + const { insightType, endpointIds, apiConfig } = request.body; + return defendInsights.map((defendInsight: DefendInsight) => { + const filePaths = (defendInsight.events ?? []).map((event) => event.value); + return { + '@timestamp': currentTime, + // TODO add i18n support + message: 'Incompatible antiviruses detected', + category: Category.Endpoint, + type: insightType, + source: { + type: SourceType.LlmConnector, + id: apiConfig.connectorId, + // TODO use actual time range when we add support + data_range_start: currentTime, + data_range_end: currentTime.clone().add(24, 'hours'), + }, + target: { + type: TargetType.Endpoint, + ids: endpointIds, + }, + action: { + type: ActionType.Refreshed, + timestamp: currentTime, + }, + value: defendInsight.group, + remediation: { + exception_list_items: [ + { + list_id: ENDPOINT_ARTIFACT_LISTS.blocklists.id, + name: defendInsight.group, + description: 'Suggested by Security Workflow Insights', + entries: [ + { + field: 'file.path.caseless', + operator: 'included', + type: 'match_any', + value: filePaths, + }, + ], + // TODO add per policy support + tags: ['policy:all'], + os_types: [ + // TODO pick this based on endpointIds + SUPPORTED_HOST_OS_TYPE[0], + SUPPORTED_HOST_OS_TYPE[1], + SUPPORTED_HOST_OS_TYPE[2], + ], + }, + ], + }, + metadata: { + notes: { + llm_model: apiConfig.model ?? '', + }, + }, + }; + }); +} diff --git a/x-pack/plugins/security_solution/server/assistant/tools/defend_insights/workflow_insights_builders/index.ts b/x-pack/plugins/security_solution/server/assistant/tools/defend_insights/workflow_insights_builders/index.ts new file mode 100644 index 0000000000000..4694617229f04 --- /dev/null +++ b/x-pack/plugins/security_solution/server/assistant/tools/defend_insights/workflow_insights_builders/index.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 { KibanaRequest } from '@kbn/core/server'; + +import type { DefendInsight, DefendInsightsPostRequestBody } from '@kbn/elastic-assistant-common'; +import { DefendInsightType } from '@kbn/elastic-assistant-common'; +import type { SecurityWorkflowInsight } from '../../../../../common/endpoint/types/workflow_insights'; + +import { InvalidDefendInsightTypeError } from '../errors'; +import { buildIncompatibleAntivirusWorkflowInsights } from './incompatible_antivirus'; + +export interface BuildWorkflowInsightParams { + defendInsights: DefendInsight[]; + request: KibanaRequest; +} + +export function buildWorkflowInsights( + params: BuildWorkflowInsightParams +): SecurityWorkflowInsight[] { + if (params.request.body.insightType === DefendInsightType.Enum.incompatible_antivirus) { + return buildIncompatibleAntivirusWorkflowInsights(params); + } + + throw new InvalidDefendInsightTypeError(); +} diff --git a/x-pack/plugins/security_solution/server/assistant/tools/index.ts b/x-pack/plugins/security_solution/server/assistant/tools/index.ts index f7824e688afe2..dc32e01335b30 100644 --- a/x-pack/plugins/security_solution/server/assistant/tools/index.ts +++ b/x-pack/plugins/security_solution/server/assistant/tools/index.ts @@ -5,8 +5,7 @@ * 2.0. */ -import type { AssistantTool } from '@kbn/elastic-assistant-plugin/server'; - +import { PRODUCT_DOCUMENTATION_TOOL } from './product_docs/product_documentation_tool'; import { NL_TO_ESQL_TOOL } from './esql/nl_to_esql_tool'; import { ALERT_COUNTS_TOOL } from './alert_counts/alert_counts_tool'; import { OPEN_AND_ACKNOWLEDGED_ALERTS_TOOL } from './open_and_acknowledged_alerts/open_and_acknowledged_alerts_tool'; @@ -15,12 +14,13 @@ import { KNOWLEDGE_BASE_RETRIEVAL_TOOL } from './knowledge_base/knowledge_base_r import { KNOWLEDGE_BASE_WRITE_TOOL } from './knowledge_base/knowledge_base_write_tool'; import { SECURITY_LABS_KNOWLEDGE_BASE_TOOL } from './security_labs/security_labs_tool'; -export const assistantTools: AssistantTool[] = [ +export const assistantTools = [ ALERT_COUNTS_TOOL, DEFEND_INSIGHTS_TOOL, - NL_TO_ESQL_TOOL, KNOWLEDGE_BASE_RETRIEVAL_TOOL, KNOWLEDGE_BASE_WRITE_TOOL, + NL_TO_ESQL_TOOL, OPEN_AND_ACKNOWLEDGED_ALERTS_TOOL, + PRODUCT_DOCUMENTATION_TOOL, SECURITY_LABS_KNOWLEDGE_BASE_TOOL, ]; diff --git a/x-pack/plugins/security_solution/server/assistant/tools/product_docs/product_documentation_tool.test.ts b/x-pack/plugins/security_solution/server/assistant/tools/product_docs/product_documentation_tool.test.ts new file mode 100644 index 0000000000000..d8d7e5995c92e --- /dev/null +++ b/x-pack/plugins/security_solution/server/assistant/tools/product_docs/product_documentation_tool.test.ts @@ -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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { RetrievalQAChain } from 'langchain/chains'; +import type { DynamicStructuredTool, DynamicTool } from '@langchain/core/tools'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import type { KibanaRequest } from '@kbn/core-http-server'; +import type { ExecuteConnectorRequestBody } from '@kbn/elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen'; +import { loggerMock } from '@kbn/logging-mocks'; +import { PRODUCT_DOCUMENTATION_TOOL } from './product_documentation_tool'; +import type { LlmTasksPluginStart } from '@kbn/llm-tasks-plugin/server'; + +describe('ProductDocumentationTool', () => { + const chain = {} as RetrievalQAChain; + const esClient = { + search: jest.fn().mockResolvedValue({}), + } as unknown as ElasticsearchClient; + const request = {} as unknown as KibanaRequest; + const logger = loggerMock.create(); + const retrieveDocumentation = jest.fn(); + const llmTasks = { + retrieveDocumentation, + retrieveDocumentationAvailable: jest.fn(), + } as LlmTasksPluginStart; + const connectorId = 'fake-connector'; + const defaultArgs = { + chain, + esClient, + logger, + request, + llmTasks, + connectorId, + isEnabledKnowledgeBase: true, + }; + beforeEach(() => { + jest.clearAllMocks(); + }); + + describe('isSupported', () => { + it('returns true if connectorId and llmTasks have values', () => { + expect(PRODUCT_DOCUMENTATION_TOOL.isSupported(defaultArgs)).toBe(true); + }); + }); + + describe('getTool', () => { + it('should return a tool as expected when all required values are present', () => { + const tool = PRODUCT_DOCUMENTATION_TOOL.getTool(defaultArgs) as DynamicTool; + expect(tool.name).toEqual('ProductDocumentationTool'); + expect(tool.tags).toEqual(['product-documentation']); + }); + + it('returns null if llmTasks plugin is not provided', () => { + const tool = PRODUCT_DOCUMENTATION_TOOL.getTool({ + ...defaultArgs, + llmTasks: undefined, + }); + + expect(tool).toBeNull(); + }); + + it('returns null if connectorId is not provided', () => { + const tool = PRODUCT_DOCUMENTATION_TOOL.getTool({ + ...defaultArgs, + connectorId: undefined, + }); + + expect(tool).toBeNull(); + }); + }); + describe('DynamicStructuredTool', () => { + beforeEach(() => { + retrieveDocumentation.mockResolvedValue({ documents: [] }); + }); + it('the tool invokes retrieveDocumentation', async () => { + const tool = PRODUCT_DOCUMENTATION_TOOL.getTool(defaultArgs) as DynamicStructuredTool; + + await tool.func({ query: 'What is Kibana Security?', product: 'kibana' }); + + expect(retrieveDocumentation).toHaveBeenCalledWith({ + searchTerm: 'What is Kibana Security?', + products: ['kibana'], + max: 3, + connectorId: 'fake-connector', + request, + functionCalling: 'native', + }); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/server/assistant/tools/product_docs/product_documentation_tool.ts b/x-pack/plugins/security_solution/server/assistant/tools/product_docs/product_documentation_tool.ts new file mode 100644 index 0000000000000..071a435e1311f --- /dev/null +++ b/x-pack/plugins/security_solution/server/assistant/tools/product_docs/product_documentation_tool.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 { DynamicStructuredTool } from '@langchain/core/tools'; + +import { z } from '@kbn/zod'; +import type { AssistantTool, AssistantToolParams } from '@kbn/elastic-assistant-plugin/server'; +import { APP_UI_ID } from '../../../../common'; + +const toolDetails = { + description: + 'Use this tool to retrieve documentation about Elastic products. You can retrieve documentation about the Elastic stack, such as Kibana and Elasticsearch, or for Elastic solutions, such as Elastic Security, Elastic Observability or Elastic Enterprise Search.', + id: 'product-documentation-tool', + name: 'ProductDocumentationTool', +}; +export const PRODUCT_DOCUMENTATION_TOOL: AssistantTool = { + ...toolDetails, + sourceRegister: APP_UI_ID, + isSupported: (params: AssistantToolParams): params is AssistantToolParams => { + return params.llmTasks != null && params.connectorId != null; + }, + getTool(params: AssistantToolParams) { + if (!this.isSupported(params)) return null; + + const { connectorId, llmTasks, request } = params as AssistantToolParams; + + // This check is here in order to satisfy TypeScript + if (llmTasks == null || connectorId == null) return null; + + return new DynamicStructuredTool({ + name: toolDetails.name, + description: toolDetails.description, + schema: z.object({ + query: z.string().describe( + `The query to use to retrieve documentation + Examples: + - "How to enable TLS for Elasticsearch?" + - "What is Kibana Security?"` + ), + product: z + .enum(['kibana', 'elasticsearch', 'observability', 'security']) + .describe( + `If specified, will filter the products to retrieve documentation for + Possible options are: + - "kibana": Kibana product + - "elasticsearch": Elasticsearch product + - "observability": Elastic Observability solution + - "security": Elastic Security solution + If not specified, will search against all products + ` + ) + .optional(), + }), + func: async ({ query, product }) => { + const response = await llmTasks.retrieveDocumentation({ + searchTerm: query, + products: product ? [product] : undefined, + max: 3, + connectorId, + request, + // o11y specific parameter, hardcode to native as we do not utilize the other value (simulated) + functionCalling: 'native', + }); + + return { + content: { + documents: response.documents, + }, + }; + }, + tags: ['product-documentation'], + // TODO: Remove after ZodAny is fixed https://github.com/langchain-ai/langchainjs/blob/main/langchain-core/src/tools.ts + }) as unknown as DynamicStructuredTool; + }, +}; diff --git a/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts b/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts index 1afa24ebbd529..bdffed6c1269a 100644 --- a/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts +++ b/x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts @@ -21,7 +21,7 @@ import type { FleetStartContract, MessageSigningServiceInterface, } from '@kbn/fleet-plugin/server'; -import type { PluginStartContract as AlertsPluginStartContract } from '@kbn/alerting-plugin/server'; +import type { AlertingServerStart } from '@kbn/alerting-plugin/server'; import type { CloudSetup } from '@kbn/cloud-plugin/server'; import type { FleetActionsClientInterface } from '@kbn/fleet-plugin/server/services/actions/types'; import type { PluginStartContract as ActionsPluginStartContract } from '@kbn/actions-plugin/server'; @@ -73,7 +73,7 @@ export interface EndpointAppContextServiceStartContract { fleetStartServices: FleetStartContract; manifestManager: ManifestManager; security: SecurityServiceStart; - alerting: AlertsPluginStartContract; + alerting: AlertingServerStart; config: ConfigType; registerListsServerExtension?: ListsServerExtensionRegistrar; licenseService: LicenseService; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/workflow_insights/get_insights.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/workflow_insights/get_insights.test.ts new file mode 100644 index 0000000000000..6f928ee599b34 --- /dev/null +++ b/x-pack/plugins/security_solution/server/endpoint/routes/workflow_insights/get_insights.test.ts @@ -0,0 +1,104 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { httpServerMock, httpServiceMock } from '@kbn/core/server/mocks'; +import { createMockEndpointAppContext, getRegisteredVersionedRouteMock } from '../../mocks'; +import { registerGetInsightsRoute } from './get_insights'; +import { WORKFLOW_INSIGHTS_ROUTE } from '../../../../common/endpoint/constants'; + +jest.mock('../../services', () => ({ + securityWorkflowInsightsService: { + fetch: jest.fn(), + }, +})); + +const fetchMock = jest.requireMock('../../services').securityWorkflowInsightsService + .fetch as jest.Mock; + +describe('Get Insights Route Handler', () => { + let mockResponse: ReturnType; + let callRoute: (params: Record, authz?: Record) => Promise; + + beforeEach(() => { + mockResponse = httpServerMock.createResponseFactory(); + + const mockEndpointContext = createMockEndpointAppContext(); + const router = httpServiceMock.createRouter(); + + registerGetInsightsRoute(router, mockEndpointContext); + + callRoute = async (params, authz = { canReadSecuritySolution: true }) => { + const mockContext = { + core: { + security: { + authc: { + getCurrentUser: jest + .fn() + .mockReturnValue({ username: 'test-user', roles: ['admin'] }), + }, + }, + }, + securitySolution: { + getEndpointAuthz: jest.fn().mockResolvedValue(authz), + }, + }; + + const request = httpServerMock.createKibanaRequest({ + method: 'get', + path: WORKFLOW_INSIGHTS_ROUTE, + query: params, + }); + + const { routeHandler } = getRegisteredVersionedRouteMock( + router, + 'get', + WORKFLOW_INSIGHTS_ROUTE, + '1' + )!; + await routeHandler(mockContext, request, mockResponse); + }; + }); + + describe('with valid privileges', () => { + it('should fetch insights and return them', async () => { + const mockInsights = [ + { _source: { id: 1, name: 'Insight 1' } }, + { _source: { id: 2, name: 'Insight 2' } }, + ]; + fetchMock.mockResolvedValue(mockInsights); + + await callRoute({ query: 'test-query' }); + + expect(fetchMock).toHaveBeenCalledWith({ query: 'test-query' }); + expect(mockResponse.ok).toHaveBeenCalledWith({ + body: [ + { id: 1, name: 'Insight 1' }, + { id: 2, name: 'Insight 2' }, + ], + }); + }); + + it('should handle missing query parameters', async () => { + fetchMock.mockResolvedValue([]); + + await callRoute({}); + + expect(fetchMock).toHaveBeenCalledWith({}); + expect(mockResponse.ok).toHaveBeenCalledWith({ + body: [], + }); + }); + }); + + describe('with invalid privileges', () => { + it('should return forbidden if user lacks read privileges', async () => { + await callRoute({}, { canReadSecuritySolution: false }); + + expect(mockResponse.forbidden).toHaveBeenCalled(); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/workflow_insights/get_insights.ts b/x-pack/plugins/security_solution/server/endpoint/routes/workflow_insights/get_insights.ts new file mode 100644 index 0000000000000..910df9b593fad --- /dev/null +++ b/x-pack/plugins/security_solution/server/endpoint/routes/workflow_insights/get_insights.ts @@ -0,0 +1,80 @@ +/* + * 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 { IKibanaResponse, RequestHandler } from '@kbn/core/server'; +import type { GetWorkflowInsightsRequestQueryParams } from '../../../../common/api/endpoint/workflow_insights/workflow_insights'; +import { GetWorkflowInsightsRequestSchema } from '../../../../common/api/endpoint/workflow_insights/workflow_insights'; +import type { + SearchParams, + SecurityWorkflowInsight, +} from '../../../../common/endpoint/types/workflow_insights'; +import { securityWorkflowInsightsService } from '../../services'; +import { errorHandler } from '../error_handler'; +import { WORKFLOW_INSIGHTS_ROUTE } from '../../../../common/endpoint/constants'; +import { withEndpointAuthz } from '../with_endpoint_authz'; +import type { + SecuritySolutionPluginRouter, + SecuritySolutionRequestHandlerContext, +} from '../../../types'; +import type { EndpointAppContext } from '../../types'; + +export const registerGetInsightsRoute = ( + router: SecuritySolutionPluginRouter, + endpointContext: EndpointAppContext +) => { + router.versioned + .get({ + access: 'internal', + path: WORKFLOW_INSIGHTS_ROUTE, + security: { + authz: { + requiredPrivileges: ['securitySolution'], + }, + }, + options: { authRequired: true }, + }) + .addVersion( + { + version: '1', + validate: { + request: GetWorkflowInsightsRequestSchema, + }, + }, + withEndpointAuthz( + { all: ['canReadSecuritySolution'] }, + endpointContext.logFactory.get('workflowInsights'), + getInsightsRouteHandler(endpointContext) + ) + ); +}; + +export const getInsightsRouteHandler = ( + endpointContext: EndpointAppContext +): RequestHandler< + never, + GetWorkflowInsightsRequestQueryParams, + unknown, + SecuritySolutionRequestHandlerContext +> => { + const logger = endpointContext.logFactory.get('workflowInsights'); + + return async (_, request, response): Promise> => { + try { + logger.debug('Fetching workflow insights'); + + const insightsResponse = await securityWorkflowInsightsService.fetch( + request.query as SearchParams + ); + + const body = insightsResponse.flatMap((insight) => insight._source || []); + + return response.ok({ body }); + } catch (e) { + return errorHandler(logger, response, e); + } + }; +}; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/workflow_insights/index.ts b/x-pack/plugins/security_solution/server/endpoint/routes/workflow_insights/index.ts new file mode 100644 index 0000000000000..3fc3a0a70d1b9 --- /dev/null +++ b/x-pack/plugins/security_solution/server/endpoint/routes/workflow_insights/index.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 { registerUpdateInsightsRoute } from './update_insight'; +import { registerGetInsightsRoute } from './get_insights'; +import type { SecuritySolutionPluginRouter } from '../../../types'; +import type { ConfigType } from '../../..'; +import type { EndpointAppContext } from '../../types'; + +export const registerWorkflowInsightsRoutes = ( + router: SecuritySolutionPluginRouter, + config: ConfigType, + endpointContext: EndpointAppContext +) => { + if (config.experimentalFeatures.defendInsights) { + registerGetInsightsRoute(router, endpointContext); + registerUpdateInsightsRoute(router, endpointContext); + } +}; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/workflow_insights/update_insight.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/workflow_insights/update_insight.test.ts new file mode 100644 index 0000000000000..0a8e2e1bf8771 --- /dev/null +++ b/x-pack/plugins/security_solution/server/endpoint/routes/workflow_insights/update_insight.test.ts @@ -0,0 +1,111 @@ +/* + * 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 { httpServerMock, httpServiceMock } from '@kbn/core/server/mocks'; +import { registerUpdateInsightsRoute } from './update_insight'; +import { createMockEndpointAppContext, getRegisteredVersionedRouteMock } from '../../mocks'; +import { WORKFLOW_INSIGHTS_UPDATE_ROUTE } from '../../../../common/endpoint/constants'; + +jest.mock('../../services', () => ({ + securityWorkflowInsightsService: { + update: jest.fn(), + }, +})); + +const updateMock = jest.requireMock('../../services').securityWorkflowInsightsService + .update as jest.Mock; + +describe('Update Insights Route Handler', () => { + let mockResponse: ReturnType; + let callRoute: ( + params: Record, + body: Record, + authz?: Record + ) => Promise; + + beforeEach(() => { + mockResponse = httpServerMock.createResponseFactory(); + + const mockEndpointContext = createMockEndpointAppContext(); + const router = httpServiceMock.createRouter(); + + registerUpdateInsightsRoute(router, mockEndpointContext); + + callRoute = async (params, body, authz = { canReadSecuritySolution: true }) => { + const mockContext = { + core: { + security: { + authc: { + getCurrentUser: jest + .fn() + .mockReturnValue({ username: 'test-user', roles: ['admin'] }), + }, + }, + }, + securitySolution: { + getEndpointAuthz: jest.fn().mockResolvedValue(authz), + }, + }; + + const request = httpServerMock.createKibanaRequest({ + method: 'put', + path: WORKFLOW_INSIGHTS_UPDATE_ROUTE, + params, + body, + }); + + const { routeHandler } = getRegisteredVersionedRouteMock( + router, + 'put', + WORKFLOW_INSIGHTS_UPDATE_ROUTE, + '1' + )!; + await routeHandler(mockContext, request, mockResponse); + }; + }); + + describe('with valid privileges', () => { + it('should update insight and return the updated data', async () => { + const mockUpdatedInsight = { id: 1, name: 'Updated Insight', type: 'incompatible_antivirus' }; + updateMock.mockResolvedValue(mockUpdatedInsight); + + const updateBody = { name: 'Updated Insight' }; + + await callRoute({ insightId: '1' }, updateBody); + + expect(updateMock).toHaveBeenCalledWith('1', updateBody); + expect(mockResponse.ok).toHaveBeenCalledWith({ + body: mockUpdatedInsight, + }); + }); + + it('should handle missing body parameters', async () => { + updateMock.mockResolvedValue({ id: 1, name: 'Insight 1' }); + + const updateBody = {}; // Empty body to test missing parameters + + await callRoute({ insightId: '1' }, updateBody); + + expect(updateMock).toHaveBeenCalledWith('1', {}); + expect(mockResponse.ok).toHaveBeenCalledWith({ + body: { id: 1, name: 'Insight 1' }, + }); + }); + }); + + describe('with invalid privileges', () => { + it('should return forbidden if user lacks read privileges', async () => { + await callRoute( + { insightId: '1' }, + { name: 'Updated Insight' }, + { canReadSecuritySolution: false } + ); + + expect(mockResponse.forbidden).toHaveBeenCalled(); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/workflow_insights/update_insight.ts b/x-pack/plugins/security_solution/server/endpoint/routes/workflow_insights/update_insight.ts new file mode 100644 index 0000000000000..82ffc547067c1 --- /dev/null +++ b/x-pack/plugins/security_solution/server/endpoint/routes/workflow_insights/update_insight.ts @@ -0,0 +1,80 @@ +/* + * 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 { RequestHandler } from '@kbn/core/server'; +import type { + UpdateWorkflowInsightsRequestBody, + UpdateWorkflowInsightsRequestParams, +} from '../../../../common/api/endpoint/workflow_insights/workflow_insights'; +import { UpdateWorkflowInsightRequestSchema } from '../../../../common/api/endpoint/workflow_insights/workflow_insights'; +import { securityWorkflowInsightsService } from '../../services'; + +import { errorHandler } from '../error_handler'; +import { WORKFLOW_INSIGHTS_UPDATE_ROUTE } from '../../../../common/endpoint/constants'; +import { withEndpointAuthz } from '../with_endpoint_authz'; +import type { + SecuritySolutionPluginRouter, + SecuritySolutionRequestHandlerContext, +} from '../../../types'; +import type { EndpointAppContext } from '../../types'; +import type { SecurityWorkflowInsight } from '../../../../common/endpoint/types/workflow_insights'; + +export const registerUpdateInsightsRoute = ( + router: SecuritySolutionPluginRouter, + endpointContext: EndpointAppContext +) => { + router.versioned + .put({ + access: 'internal', + path: WORKFLOW_INSIGHTS_UPDATE_ROUTE, + security: { + authz: { + requiredPrivileges: ['securitySolution'], + }, + }, + options: { authRequired: true }, + }) + .addVersion( + { + version: '1', + validate: { + request: UpdateWorkflowInsightRequestSchema, + }, + }, + withEndpointAuthz( + { all: ['canReadSecuritySolution'] }, + endpointContext.logFactory.get('workflowInsights'), + updateInsightsRouteHandler(endpointContext) + ) + ); +}; + +const updateInsightsRouteHandler = ( + endpointContext: EndpointAppContext +): RequestHandler< + UpdateWorkflowInsightsRequestParams, + unknown, + UpdateWorkflowInsightsRequestBody, + SecuritySolutionRequestHandlerContext +> => { + const logger = endpointContext.logFactory.get('workflowInsights'); + + return async (_, request, response) => { + const { insightId } = request.params; + + logger.debug(`Updating insight ${insightId}`); + try { + const body = await securityWorkflowInsightsService.update( + insightId, + request.body as Partial + ); + return response.ok({ body }); + } catch (e) { + return errorHandler(logger, response, e); + } + }; +}; diff --git a/x-pack/plugins/security_solution/server/endpoint/services/workflow_insights/index.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/workflow_insights/index.test.ts index 792a7a9ecd949..1b7ba20f6af88 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/workflow_insights/index.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/workflow_insights/index.test.ts @@ -212,6 +212,7 @@ describe('SecurityWorkflowInsightsService', () => { expect(esClient.index).toHaveBeenCalledWith({ index: DATA_STREAM_NAME, body: insight, + refresh: 'wait_for', }); }); }); @@ -225,16 +226,18 @@ describe('SecurityWorkflowInsightsService', () => { await securityWorkflowInsightsService.start({ esClient }); const insightId = 'some-insight-id'; const insight = getDefaultInsight(); - await securityWorkflowInsightsService.update(insightId, insight); + const indexName = 'backing-index-name'; + await securityWorkflowInsightsService.update(insightId, insight, indexName); // ensure it waits for initialization first expect(isInitializedSpy).toHaveBeenCalledTimes(1); // updates the doc expect(esClient.update).toHaveBeenCalledTimes(1); expect(esClient.update).toHaveBeenCalledWith({ - index: DATA_STREAM_NAME, + index: indexName, id: insightId, body: { doc: insight }, + refresh: 'wait_for', }); }); }); diff --git a/x-pack/plugins/security_solution/server/endpoint/services/workflow_insights/index.ts b/x-pack/plugins/security_solution/server/endpoint/services/workflow_insights/index.ts index 0aa495dac0931..e03b9340e9784 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/workflow_insights/index.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/workflow_insights/index.ts @@ -114,6 +114,7 @@ class SecurityWorkflowInsightsService { const response = await this.esClient.index({ index: DATA_STREAM_NAME, body: insight, + refresh: 'wait_for', }); return response; @@ -121,14 +122,26 @@ class SecurityWorkflowInsightsService { public async update( id: string, - insight: Partial + insight: Partial, + backingIndex?: string ): Promise { await this.isInitialized; + let index = backingIndex; + if (!index) { + const retrievedInsight = (await this.fetch({ ids: [id] }))[0]; + index = retrievedInsight?._index; + } + + if (!index) { + throw new Error('invalid backing index for updating workflow insight'); + } + const response = await this.esClient.update({ - index: DATA_STREAM_NAME, + index, id, body: { doc: insight }, + refresh: 'wait_for', }); return response; diff --git a/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.ts b/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.ts index 54f1ce8cc7e01..4987250644cb4 100644 --- a/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.ts +++ b/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.ts @@ -7,7 +7,7 @@ import type { Logger, ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; import type { ExceptionListClient } from '@kbn/lists-plugin/server'; -import type { PluginStartContract as AlertsStartContract } from '@kbn/alerting-plugin/server'; +import type { AlertingServerStart } from '@kbn/alerting-plugin/server'; import type { PostPackagePolicyCreateCallback, PostPackagePolicyPostDeleteCallback, @@ -119,7 +119,7 @@ export const getPackagePolicyCreateCallback = ( logger: Logger, manifestManager: ManifestManager, securitySolutionRequestContextFactory: IRequestContextFactory, - alerts: AlertsStartContract, + alerts: AlertingServerStart, licenseService: LicenseService, exceptionsClient: ExceptionListClient | undefined, cloud: CloudSetup, diff --git a/x-pack/plugins/security_solution/server/fleet_integration/handlers/install_prepackaged_rules.ts b/x-pack/plugins/security_solution/server/fleet_integration/handlers/install_prepackaged_rules.ts index d4a60be85d3ea..891face9f2879 100644 --- a/x-pack/plugins/security_solution/server/fleet_integration/handlers/install_prepackaged_rules.ts +++ b/x-pack/plugins/security_solution/server/fleet_integration/handlers/install_prepackaged_rules.ts @@ -7,7 +7,7 @@ import type { KibanaRequest, Logger } from '@kbn/core/server'; import type { ExceptionListClient } from '@kbn/lists-plugin/server'; -import type { PluginStartContract as AlertsStartContract } from '@kbn/alerting-plugin/server'; +import type { AlertingServerStart } from '@kbn/alerting-plugin/server'; import { createDetectionIndex } from '../../lib/detection_engine/routes/index/create_index_route'; import { createPrepackagedRules } from '../../lib/detection_engine/prebuilt_rules'; import type { SecuritySolutionApiRequestHandlerContext } from '../../types'; @@ -16,7 +16,7 @@ export interface InstallPrepackagedRulesProps { logger: Logger; context: SecuritySolutionApiRequestHandlerContext; request: KibanaRequest; - alerts: AlertsStartContract; + alerts: AlertingServerStart; exceptionsClient: ExceptionListClient; } @@ -45,11 +45,8 @@ export const installPrepackagedRules = async ({ try { // this checks to make sure index exists first, safe to try in case of failure above // may be able to recover from minor errors - await createPrepackagedRules( - context, - alerts.getRulesClientWithRequest(request), - exceptionsClient - ); + const rulesClient = await alerts.getRulesClientWithRequest(request); + await createPrepackagedRules(context, rulesClient, exceptionsClient); } catch (err) { logger.error( `Unable to create detection rules automatically (${err.statusCode}): ${err.message}` diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_and_timelines_status/get_prebuilt_rules_and_timelines_status_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_and_timelines_status/get_prebuilt_rules_and_timelines_status_route.ts index dc9c15ac5b5f7..718c16387281a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_and_timelines_status/get_prebuilt_rules_and_timelines_status_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_and_timelines_status/get_prebuilt_rules_and_timelines_status_route.ts @@ -45,7 +45,7 @@ export const getPrebuiltRulesAndTimelinesStatusRoute = (router: SecuritySolution const siemResponse = buildSiemResponse(response); const ctx = await context.resolve(['core', 'alerting']); const savedObjectsClient = ctx.core.savedObjects.client; - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); const ruleAssetsClient = createPrebuiltRuleAssetsClient(savedObjectsClient); try { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_status/get_prebuilt_rules_status_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_status/get_prebuilt_rules_status_route.ts index 0561c826e0c78..52e2c552c74fa 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_status/get_prebuilt_rules_status_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/get_prebuilt_rules_status/get_prebuilt_rules_status_route.ts @@ -37,7 +37,7 @@ export const getPrebuiltRulesStatusRoute = (router: SecuritySolutionPluginRouter try { const ctx = await context.resolve(['core', 'alerting']); const soClient = ctx.core.savedObjects.client; - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); const ruleAssetsClient = createPrebuiltRuleAssetsClient(soClient); const ruleObjectsClient = createPrebuiltRuleObjectsClient(rulesClient); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/install_prebuilt_rules_and_timelines/install_prebuilt_rules_and_timelines_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/install_prebuilt_rules_and_timelines/install_prebuilt_rules_and_timelines_route.ts index 8740d27fce817..f24454726c615 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/install_prebuilt_rules_and_timelines/install_prebuilt_rules_and_timelines_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/install_prebuilt_rules_and_timelines/install_prebuilt_rules_and_timelines_route.ts @@ -53,7 +53,7 @@ export const installPrebuiltRulesAndTimelinesRoute = (router: SecuritySolutionPl const siemResponse = buildSiemResponse(response); try { - const rulesClient = (await context.alerting).getRulesClient(); + const rulesClient = await (await context.alerting).getRulesClient(); const validated = await createPrepackagedRules( await context.securitySolution, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_installation/perform_rule_installation_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_installation/perform_rule_installation_route.ts index 8b4d38bd2f4a4..a2abc00b43a39 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_installation/perform_rule_installation_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_installation/perform_rule_installation_route.ts @@ -61,7 +61,7 @@ export const performRuleInstallationRoute = (router: SecuritySolutionPluginRoute const ctx = await context.resolve(['core', 'alerting', 'securitySolution']); const config = ctx.securitySolution.getConfig(); const soClient = ctx.core.savedObjects.client; - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); const detectionRulesClient = ctx.securitySolution.getDetectionRulesClient(); const ruleAssetsClient = createPrebuiltRuleAssetsClient(soClient); const ruleObjectsClient = createPrebuiltRuleObjectsClient(rulesClient); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_upgrade/perform_rule_upgrade_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_upgrade/perform_rule_upgrade_route.ts index db5f7a186d303..cb0baca5c522e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_upgrade/perform_rule_upgrade_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_upgrade/perform_rule_upgrade_route.ts @@ -61,7 +61,7 @@ export const performRuleUpgradeRoute = ( try { const ctx = await context.resolve(['core', 'alerting', 'securitySolution']); const soClient = ctx.core.savedObjects.client; - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); const detectionRulesClient = ctx.securitySolution.getDetectionRulesClient(); const ruleAssetsClient = createPrebuiltRuleAssetsClient(soClient); const ruleObjectsClient = createPrebuiltRuleObjectsClient(rulesClient); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_installation/review_rule_installation_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_installation/review_rule_installation_route.ts index c1c45532f61bb..78d75603dd23b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_installation/review_rule_installation_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_installation/review_rule_installation_route.ts @@ -48,7 +48,7 @@ export const reviewRuleInstallationRoute = (router: SecuritySolutionPluginRouter try { const ctx = await context.resolve(['core', 'alerting']); const soClient = ctx.core.savedObjects.client; - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); const ruleAssetsClient = createPrebuiltRuleAssetsClient(soClient); const ruleObjectsClient = createPrebuiltRuleObjectsClient(rulesClient); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_upgrade/review_rule_upgrade_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_upgrade/review_rule_upgrade_route.ts index 3da62bd9bb21d..0f8dee1a4e2ff 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_upgrade/review_rule_upgrade_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/review_rule_upgrade/review_rule_upgrade_route.ts @@ -57,7 +57,7 @@ export const reviewRuleUpgradeRoute = (router: SecuritySolutionPluginRouter) => try { const ctx = await context.resolve(['core', 'alerting']); const soClient = ctx.core.savedObjects.client; - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); const ruleAssetsClient = createPrebuiltRuleAssetsClient(soClient); const ruleObjectsClient = createPrebuiltRuleObjectsClient(rulesClient); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts index cba989890438e..3c99cebbbe8fb 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/routes/__mocks__/request_context.ts @@ -103,7 +103,7 @@ const createRequestContextMock = ( getActionsClient: jest.fn(() => clients.actionsClient), } as unknown as jest.Mocked, alerting: { - getRulesClient: jest.fn(() => clients.rulesClient), + getRulesClient: jest.fn().mockResolvedValue(clients.rulesClient), } as unknown as jest.Mocked, licensing: clients.licensing, lists: { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/api/create_legacy_notification/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/api/create_legacy_notification/route.ts index d5623df8db91c..2a06549f3f359 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/api/create_legacy_notification/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/api/create_legacy_notification/route.ts @@ -64,7 +64,7 @@ export const legacyCreateLegacyNotificationRoute = ( }, }, async (context, request, response) => { - const rulesClient = (await context.alerting).getRulesClient(); + const rulesClient = await (await context.alerting).getRulesClient(); const savedObjectsClient = (await context.core).savedObjects.client; const { alert_id: ruleAlertId } = request.query; const { actions, interval, name } = request.body; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions/api/create_rule_exceptions/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions/api/create_rule_exceptions/route.ts index 1d8038b1052c3..b178d912ccf27 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions/api/create_rule_exceptions/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions/api/create_rule_exceptions/route.ts @@ -63,7 +63,7 @@ export const createRuleExceptionsRoute = (router: SecuritySolutionPluginRouter) 'licensing', 'lists', ]); - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); const listsClient = ctx.securitySolution.getExceptionListClient(); const detectionRulesClient = ctx.securitySolution.getDetectionRulesClient(); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions/api/find_exception_references/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions/api/find_exception_references/route.ts index 3680a70525fd4..db890c7104e58 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions/api/find_exception_references/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions/api/find_exception_references/route.ts @@ -54,7 +54,7 @@ export const findRuleExceptionReferencesRoute = (router: SecuritySolutionPluginR const { ids, namespace_types: namespaceTypes, list_ids: listIds } = request.query; const ctx = await context.resolve(['core', 'securitySolution', 'alerting']); - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); const listsClient = ctx.securitySolution.getExceptionListClient(); if ( diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.ts index e599ff4a936ef..e0b33b35e2e1f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.ts @@ -131,7 +131,7 @@ export const performBulkActionRoute = ( 'actions', ]); - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); const exceptionsClient = ctx.lists?.getExceptionListClient(); const savedObjectsClient = ctx.core.savedObjects.client; const actionsClient = ctx.actions.getActionsClient(); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_create_rules/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_create_rules/route.ts index 225782ef01942..8d35de9547159 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_create_rules/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_create_rules/route.ts @@ -66,7 +66,7 @@ export const bulkCreateRulesRoute = (router: SecuritySolutionPluginRouter, logge try { const ctx = await context.resolve(['core', 'securitySolution', 'licensing', 'alerting']); - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); const detectionRulesClient = ctx.securitySolution.getDetectionRulesClient(); const ruleDefinitions = request.body; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_delete_rules/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_delete_rules/route.ts index f24f563e1a99d..c38bd58bde5a4 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_delete_rules/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_delete_rules/route.ts @@ -61,7 +61,7 @@ export const bulkDeleteRulesRoute = (router: SecuritySolutionPluginRouter, logge try { const ctx = await context.resolve(['core', 'securitySolution', 'alerting']); - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); const detectionRulesClient = ctx.securitySolution.getDetectionRulesClient(); const rules = await Promise.all( diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.ts index 5bd8adaf86a38..fbbfc2656124d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.ts @@ -60,7 +60,7 @@ export const bulkPatchRulesRoute = (router: SecuritySolutionPluginRouter, logger try { const ctx = await context.resolve(['core', 'securitySolution', 'alerting', 'licensing']); - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); const detectionRulesClient = ctx.securitySolution.getDetectionRulesClient(); const rules = await Promise.all( diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_update_rules/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_update_rules/route.ts index d2c985fbc70e6..ad82d5a0edce2 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_update_rules/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_update_rules/route.ts @@ -64,7 +64,7 @@ export const bulkUpdateRulesRoute = (router: SecuritySolutionPluginRouter, logge try { const ctx = await context.resolve(['core', 'securitySolution', 'alerting', 'licensing']); - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); const detectionRulesClient = ctx.securitySolution.getDetectionRulesClient(); const rules = await Promise.all( diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/coverage_overview/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/coverage_overview/route.ts index a959c522c1718..a3c6a07e0b8be 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/coverage_overview/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/coverage_overview/route.ts @@ -45,7 +45,7 @@ export const getCoverageOverviewRoute = (router: SecuritySolutionPluginRouter) = const responseData = await handleCoverageOverviewRequest({ params: request.body, - deps: { rulesClient: ctx.alerting.getRulesClient() }, + deps: { rulesClient: await ctx.alerting.getRulesClient() }, }); return response.ok({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/create_rule/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/create_rule/route.ts index a5fee66d00148..dbeaed85db055 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/create_rule/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/create_rule/route.ts @@ -58,7 +58,7 @@ export const createRuleRoute = (router: SecuritySolutionPluginRouter): void => { 'lists', ]); - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); const detectionRulesClient = ctx.securitySolution.getDetectionRulesClient(); const exceptionsClient = ctx.lists?.getExceptionListClient(); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/delete_rule/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/delete_rule/route.ts index a5854e9a2caf5..3e5ef8aa8ab7a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/delete_rule/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/delete_rule/route.ts @@ -50,7 +50,7 @@ export const deleteRuleRoute = (router: SecuritySolutionPluginRouter) => { const { id, rule_id: ruleId } = request.query; const ctx = await context.resolve(['core', 'securitySolution', 'alerting']); - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); const detectionRulesClient = ctx.securitySolution.getDetectionRulesClient(); const rule = await readRules({ rulesClient, id, ruleId }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/export_rules/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/export_rules/route.ts index a37bb29963332..be19da6df831e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/export_rules/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/export_rules/route.ts @@ -56,7 +56,7 @@ export const exportRulesRoute = ( }, async (context, request, response) => { const siemResponse = buildSiemResponse(response); - const rulesClient = (await context.alerting).getRulesClient(); + const rulesClient = await (await context.alerting).getRulesClient(); const exceptionsClient = (await context.lists)?.getExceptionListClient(); const actionsClient = (await context.actions)?.getActionsClient(); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/filters/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/filters/route.ts index 05633892cdddb..6496c6edc2a87 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/filters/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/filters/route.ts @@ -70,7 +70,7 @@ export const getRuleManagementFilters = (router: SecuritySolutionPluginRouter) = async (context, _, response): Promise> => { const siemResponse = buildSiemResponse(response); const ctx = await context.resolve(['alerting']); - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); try { const [{ prebuilt: prebuiltRulesCount, custom: customRulesCount }, tags] = diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/find_rules/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/find_rules/route.ts index 899e568e79630..dbe58e7815ea5 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/find_rules/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/find_rules/route.ts @@ -51,7 +51,7 @@ export const findRulesRoute = (router: SecuritySolutionPluginRouter, logger: Log try { const { query } = request; const ctx = await context.resolve(['core', 'securitySolution', 'alerting']); - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); const rules = await findRules({ rulesClient, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.ts index fcd388e81d1e7..6971628a780d9 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.ts @@ -52,7 +52,7 @@ export const patchRuleRoute = (router: SecuritySolutionPluginRouter) => { } try { const params = request.body; - const rulesClient = (await context.alerting).getRulesClient(); + const rulesClient = await (await context.alerting).getRulesClient(); const detectionRulesClient = (await context.securitySolution).getDetectionRulesClient(); const existingRule = await readRules({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/read_rule/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/read_rule/route.ts index f8826e8aad45b..53b8ca4085209 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/read_rule/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/read_rule/route.ts @@ -49,7 +49,7 @@ export const readRuleRoute = (router: SecuritySolutionPluginRouter, logger: Logg const { id, rule_id: ruleId } = request.query; try { - const rulesClient = (await context.alerting).getRulesClient(); + const rulesClient = await (await context.alerting).getRulesClient(); // TODO: https://github.com/elastic/kibana/issues/125642 Reuse fetchRuleById const rule = await readRules({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/update_rule/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/update_rule/route.ts index 0bedcb25de528..8a83aae938d6f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/update_rule/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/update_rule/route.ts @@ -50,7 +50,7 @@ export const updateRuleRoute = (router: SecuritySolutionPluginRouter) => { } try { const ctx = await context.resolve(['core', 'securitySolution', 'alerting', 'licensing']); - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); const detectionRulesClient = ctx.securitySolution.getDetectionRulesClient(); checkDefaultRuleExceptionListReferences({ exceptionLists: request.body.exceptions_list }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/tags/read_tags/route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/tags/read_tags/route.ts index d94f695f39179..0332dfe024964 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/tags/read_tags/route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/tags/read_tags/route.ts @@ -32,7 +32,7 @@ export const readTagsRoute = (router: SecuritySolutionPluginRouter) => { async (context, request, response): Promise> => { const siemResponse = buildSiemResponse(response); const ctx = await context.resolve(['alerting']); - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); try { const tags = await readTags({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/bulk_edit_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/bulk_edit_rules.ts index bee44a3600f97..b9c97c2412b1a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/bulk_edit_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/bulk_edit_rules.ts @@ -92,14 +92,20 @@ export const bulkEditRules = async ({ params: modifiedParams, }; const ruleResponse = convertAlertingRuleToRuleResponse(updatedRule); + let isCustomized = false; + if (ruleResponse.immutable === true) { + isCustomized = calculateIsCustomized({ + baseRule: baseVersionsMap.get(ruleResponse.rule_id), + nextRule: ruleResponse, + isRuleCustomizationEnabled: experimentalFeatures.prebuiltRulesCustomizationEnabled, + }); + } + const ruleSource = ruleResponse.immutable === true ? { type: 'external' as const, - isCustomized: calculateIsCustomized( - baseVersionsMap.get(ruleResponse.rule_id), - ruleResponse - ), + isCustomized, } : { type: 'internal' as const, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.create_custom_rule.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.create_custom_rule.test.ts index af3f85f3e1345..b07f95f74d2f9 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.create_custom_rule.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.create_custom_rule.test.ts @@ -51,6 +51,7 @@ describe('DetectionRulesClient.createCustomRule', () => { rulesClient, mlAuthz, savedObjectsClient, + isRuleCustomizationEnabled: true, }); }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.create_prebuilt_rule.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.create_prebuilt_rule.test.ts index 4caeb4bd9b940..6e1e75855b6a0 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.create_prebuilt_rule.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.create_prebuilt_rule.test.ts @@ -44,6 +44,7 @@ describe('DetectionRulesClient.createPrebuiltRule', () => { rulesClient, mlAuthz, savedObjectsClient, + isRuleCustomizationEnabled: true, }); }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.delete_rule.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.delete_rule.test.ts index ea5d1453753c3..a4afe5abadb6b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.delete_rule.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.delete_rule.test.ts @@ -30,6 +30,7 @@ describe('DetectionRulesClient.deleteRule', () => { rulesClient, mlAuthz, savedObjectsClient, + isRuleCustomizationEnabled: true, }); }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.import_rule.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.import_rule.test.ts index 4300b17b3be80..5f8bfb5577740 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.import_rule.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.import_rule.test.ts @@ -51,6 +51,7 @@ describe('DetectionRulesClient.importRule', () => { rulesClient, mlAuthz, savedObjectsClient, + isRuleCustomizationEnabled: true, }); }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.import_rules.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.import_rules.test.ts index 58b1385dda09c..3dfd859fb0b7b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.import_rules.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.import_rules.test.ts @@ -32,6 +32,7 @@ describe('detectionRulesClient.importRules', () => { rulesClient: rulesClientMock.create(), mlAuthz: buildMlAuthz(), savedObjectsClient: savedObjectsClientMock.create(), + isRuleCustomizationEnabled: true, }); (checkRuleExceptionReferences as jest.Mock).mockReturnValue([[], []]); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.patch_rule.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.patch_rule.test.ts index 448df6b581a3b..18fe3c54da7e0 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.patch_rule.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.patch_rule.test.ts @@ -50,6 +50,7 @@ describe('DetectionRulesClient.patchRule', () => { rulesClient, mlAuthz, savedObjectsClient, + isRuleCustomizationEnabled: true, }); }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.ts index fb6f5c4a03c1f..57c8f12c09aa9 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.ts @@ -38,6 +38,7 @@ interface DetectionRulesClientParams { rulesClient: RulesClient; savedObjectsClient: SavedObjectsClientContract; mlAuthz: MlAuthz; + isRuleCustomizationEnabled: boolean; } export const createDetectionRulesClient = ({ @@ -45,6 +46,7 @@ export const createDetectionRulesClient = ({ rulesClient, mlAuthz, savedObjectsClient, + isRuleCustomizationEnabled, }: DetectionRulesClientParams): IDetectionRulesClient => { const prebuiltRuleAssetClient = createPrebuiltRuleAssetsClient(savedObjectsClient); @@ -89,6 +91,7 @@ export const createDetectionRulesClient = ({ prebuiltRuleAssetClient, mlAuthz, ruleUpdate, + isRuleCustomizationEnabled, }); }); }, @@ -101,6 +104,7 @@ export const createDetectionRulesClient = ({ prebuiltRuleAssetClient, mlAuthz, rulePatch, + isRuleCustomizationEnabled, }); }); }, @@ -119,6 +123,7 @@ export const createDetectionRulesClient = ({ ruleAsset, mlAuthz, prebuiltRuleAssetClient, + isRuleCustomizationEnabled, }); }); }, @@ -131,6 +136,7 @@ export const createDetectionRulesClient = ({ importRulePayload: args, mlAuthz, prebuiltRuleAssetClient, + isRuleCustomizationEnabled, }); }); }, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.update_rule.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.update_rule.test.ts index cbd0fb1fe3680..64c01ab395529 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.update_rule.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.update_rule.test.ts @@ -50,6 +50,7 @@ describe('DetectionRulesClient.updateRule', () => { rulesClient, mlAuthz, savedObjectsClient, + isRuleCustomizationEnabled: true, }); }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.upgrade_prebuilt_rule.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.upgrade_prebuilt_rule.test.ts index acdb7b9653930..ed186abe5a7c3 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.upgrade_prebuilt_rule.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/detection_rules_client.upgrade_prebuilt_rule.test.ts @@ -48,6 +48,7 @@ describe('DetectionRulesClient.upgradePrebuiltRule', () => { rulesClient, mlAuthz, savedObjectsClient, + isRuleCustomizationEnabled: true, }); }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_patch.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_patch.test.ts index abf90c3f4dfc4..0d780c07aac19 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_patch.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_patch.test.ts @@ -37,6 +37,7 @@ describe('applyRulePatch', () => { rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled: true, }); expect(patchedRule).toEqual( expect.objectContaining({ @@ -65,6 +66,7 @@ describe('applyRulePatch', () => { rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled: true, }); expect(patchedRule).toEqual( expect.objectContaining({ @@ -94,6 +96,7 @@ describe('applyRulePatch', () => { rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled: true, }) ).rejects.toThrowError( 'event_category_override: Expected string, received number, tiebreaker_field: Expected string, received number, timestamp_field: Expected string, received number' @@ -119,6 +122,7 @@ describe('applyRulePatch', () => { rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled: true, }) ).rejects.toThrowError('alert_suppression.group_by: Expected array, received string'); }); @@ -134,6 +138,7 @@ describe('applyRulePatch', () => { rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled: true, }); expect(patchedRule).toEqual( expect.objectContaining({ @@ -154,6 +159,7 @@ describe('applyRulePatch', () => { rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled: true, }) ).rejects.toThrowError( 'threat_query: Expected string, received number, threat_indicator_path: Expected string, received number' @@ -170,6 +176,7 @@ describe('applyRulePatch', () => { rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled: true, }); expect(patchedRule).toEqual( expect.objectContaining({ @@ -190,6 +197,7 @@ describe('applyRulePatch', () => { rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled: true, }) ).rejects.toThrowError( "index.0: Expected string, received number, language: Invalid enum value. Expected 'kuery' | 'lucene', received 'non-language'" @@ -206,6 +214,7 @@ describe('applyRulePatch', () => { rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled: true, }); expect(patchedRule).toEqual( expect.objectContaining({ @@ -226,6 +235,7 @@ describe('applyRulePatch', () => { rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled: true, }) ).rejects.toThrowError( "index.0: Expected string, received number, language: Invalid enum value. Expected 'kuery' | 'lucene', received 'non-language'" @@ -244,6 +254,7 @@ describe('applyRulePatch', () => { rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled: true, }); expect(patchedRule).toEqual( expect.objectContaining({ @@ -268,6 +279,7 @@ describe('applyRulePatch', () => { rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled: true, }) ).rejects.toThrowError('threshold.value: Expected number, received string'); }); @@ -285,6 +297,7 @@ describe('applyRulePatch', () => { rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled: true, }); expect(patchedRule).toEqual( expect.objectContaining({ @@ -308,6 +321,7 @@ describe('applyRulePatch', () => { rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled: true, }); expect(patchedRule).toEqual( expect.objectContaining({ @@ -330,6 +344,7 @@ describe('applyRulePatch', () => { rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled: true, }); expect(patchedRule).toEqual( expect.objectContaining({ @@ -354,6 +369,7 @@ describe('applyRulePatch', () => { rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled: true, }); expect(patchedRule).toEqual( expect.objectContaining({ @@ -376,6 +392,7 @@ describe('applyRulePatch', () => { rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled: true, }); expect(patchedRule).toEqual( expect.objectContaining({ @@ -394,6 +411,7 @@ describe('applyRulePatch', () => { rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled: true, }) ).rejects.toThrowError('anomaly_threshold: Expected number, received string'); }); @@ -410,6 +428,7 @@ describe('applyRulePatch', () => { rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled: true, }); expect(patchedRule).toEqual( @@ -432,6 +451,7 @@ describe('applyRulePatch', () => { rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled: true, }); expect(patchedRule).toEqual( expect.objectContaining({ @@ -450,6 +470,7 @@ describe('applyRulePatch', () => { rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled: true, }) ).rejects.toThrowError('new_terms_fields: Expected array, received string'); }); @@ -472,6 +493,7 @@ describe('applyRulePatch', () => { rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled: true, }); expect(patchedRule).toEqual( expect.objectContaining({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_patch.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_patch.ts index 9f5b167322491..aaaab474c2fbe 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_patch.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_patch.ts @@ -51,6 +51,7 @@ interface ApplyRulePatchProps { prebuiltRuleAssetClient: IPrebuiltRuleAssetsClient; existingRule: RuleResponse; rulePatch: PatchRuleRequestBody; + isRuleCustomizationEnabled: boolean; } // eslint-disable-next-line complexity @@ -58,6 +59,7 @@ export const applyRulePatch = async ({ rulePatch, existingRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled, }: ApplyRulePatchProps): Promise => { const typeSpecificParams = patchTypeSpecificParams(rulePatch, existingRule); @@ -122,6 +124,7 @@ export const applyRulePatch = async ({ nextRule.rule_source = await calculateRuleSource({ rule: nextRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled, }); return nextRule; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_update.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_update.ts index b911e66a1fc45..850924d3cd04d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_update.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/apply_rule_update.ts @@ -17,12 +17,14 @@ interface ApplyRuleUpdateProps { prebuiltRuleAssetClient: IPrebuiltRuleAssetsClient; existingRule: RuleResponse; ruleUpdate: RuleUpdateProps; + isRuleCustomizationEnabled: boolean; } export const applyRuleUpdate = async ({ prebuiltRuleAssetClient, existingRule, ruleUpdate, + isRuleCustomizationEnabled, }: ApplyRuleUpdateProps): Promise => { const nextRule: RuleResponse = { ...applyRuleDefaults(ruleUpdate), @@ -46,6 +48,7 @@ export const applyRuleUpdate = async ({ nextRule.rule_source = await calculateRuleSource({ rule: nextRule, prebuiltRuleAssetClient, + isRuleCustomizationEnabled, }); return nextRule; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_is_customized.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_is_customized.ts index 92c7d941dd7f1..a94506486cc53 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_is_customized.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_is_customized.ts @@ -12,10 +12,22 @@ import { calculateRuleFieldsDiff } from '../../../../../prebuilt_rules/logic/dif import { convertRuleToDiffable } from '../../../../../../../../common/detection_engine/prebuilt_rules/diff/convert_rule_to_diffable'; import { convertPrebuiltRuleAssetToRuleResponse } from '../../converters/convert_prebuilt_rule_asset_to_rule_response'; -export function calculateIsCustomized( - baseRule: PrebuiltRuleAsset | undefined, - nextRule: RuleResponse -) { +interface CalculateIsCustomizedArgs { + baseRule: PrebuiltRuleAsset | undefined; + nextRule: RuleResponse; + isRuleCustomizationEnabled: boolean; +} + +export function calculateIsCustomized({ + baseRule, + nextRule, + isRuleCustomizationEnabled, +}: CalculateIsCustomizedArgs) { + if (!isRuleCustomizationEnabled) { + // We don't want to accidentally mark rules as customized when customization is disabled. + return false; + } + if (baseRule == null) { // If the base version is missing, we consider the rule to be customized return true; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_rule_source.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_rule_source.test.ts index e44c69d2705d5..d0b9f722458a1 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_rule_source.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_rule_source.test.ts @@ -43,6 +43,7 @@ describe('calculateRuleSource', () => { const result = await calculateRuleSource({ prebuiltRuleAssetClient, rule, + isRuleCustomizationEnabled: true, }); expect(result).toEqual({ type: 'internal', @@ -59,6 +60,7 @@ describe('calculateRuleSource', () => { const result = await calculateRuleSource({ prebuiltRuleAssetClient, rule, + isRuleCustomizationEnabled: true, }); expect(result).toEqual( expect.objectContaining({ @@ -79,6 +81,7 @@ describe('calculateRuleSource', () => { const result = await calculateRuleSource({ prebuiltRuleAssetClient, rule, + isRuleCustomizationEnabled: true, }); expect(result).toEqual( expect.objectContaining({ @@ -101,6 +104,28 @@ describe('calculateRuleSource', () => { const result = await calculateRuleSource({ prebuiltRuleAssetClient, rule, + isRuleCustomizationEnabled: true, + }); + expect(result).toEqual( + expect.objectContaining({ + type: 'external', + is_customized: false, + }) + ); + }); + + it('returns is_customized false when the rule is customized but customization is disabled', async () => { + const rule = getSampleRule(); + rule.immutable = true; + rule.name = 'Updated name'; + + const baseRule = getSampleRuleAsset(); + prebuiltRuleAssetClient.fetchAssetsByVersion.mockResolvedValueOnce([baseRule]); + + const result = await calculateRuleSource({ + prebuiltRuleAssetClient, + rule, + isRuleCustomizationEnabled: false, }); expect(result).toEqual( expect.objectContaining({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_rule_source.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_rule_source.ts index 742cd20544a60..6c3d2419159a6 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_rule_source.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/mergers/rule_source/calculate_rule_source.ts @@ -16,11 +16,13 @@ import { calculateIsCustomized } from './calculate_is_customized'; interface CalculateRuleSourceProps { prebuiltRuleAssetClient: IPrebuiltRuleAssetsClient; rule: RuleResponse; + isRuleCustomizationEnabled: boolean; } export async function calculateRuleSource({ prebuiltRuleAssetClient, rule, + isRuleCustomizationEnabled, }: CalculateRuleSourceProps): Promise { if (rule.immutable) { // This is a prebuilt rule and, despite the name, they are not immutable. So @@ -33,7 +35,11 @@ export async function calculateRuleSource({ ]); const baseRule: PrebuiltRuleAsset | undefined = prebuiltRulesResponse.at(0); - const isCustomized = calculateIsCustomized(baseRule, rule); + const isCustomized = calculateIsCustomized({ + baseRule, + nextRule: rule, + isRuleCustomizationEnabled, + }); return { type: 'external', diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/import_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/import_rule.ts index dd57e66c41a64..16fda89391ab9 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/import_rule.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/import_rule.ts @@ -26,6 +26,7 @@ interface ImportRuleOptions { prebuiltRuleAssetClient: IPrebuiltRuleAssetsClient; importRulePayload: ImportRuleArgs; mlAuthz: MlAuthz; + isRuleCustomizationEnabled: boolean; } export const importRule = async ({ @@ -34,6 +35,7 @@ export const importRule = async ({ importRulePayload, prebuiltRuleAssetClient, mlAuthz, + isRuleCustomizationEnabled, }: ImportRuleOptions): Promise => { const { ruleToImport, overwriteRules, overrideFields, allowMissingConnectorSecrets } = importRulePayload; @@ -60,6 +62,7 @@ export const importRule = async ({ prebuiltRuleAssetClient, existingRule, ruleUpdate: rule, + isRuleCustomizationEnabled, }); // applyRuleUpdate prefers the existing rule's values for `rule_source` and `immutable`, but we want to use the importing rule's calculated values ruleWithUpdates = { ...ruleWithUpdates, ...overrideFields }; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/patch_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/patch_rule.ts index 113576e8d02e2..0b22ea39eaef4 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/patch_rule.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/patch_rule.ts @@ -28,6 +28,7 @@ interface PatchRuleOptions { prebuiltRuleAssetClient: IPrebuiltRuleAssetsClient; rulePatch: RulePatchProps; mlAuthz: MlAuthz; + isRuleCustomizationEnabled: boolean; } export const patchRule = async ({ @@ -36,6 +37,7 @@ export const patchRule = async ({ prebuiltRuleAssetClient, rulePatch, mlAuthz, + isRuleCustomizationEnabled, }: PatchRuleOptions): Promise => { const { rule_id: ruleId, id } = rulePatch; @@ -58,6 +60,7 @@ export const patchRule = async ({ prebuiltRuleAssetClient, existingRule, rulePatch, + isRuleCustomizationEnabled, }); const patchedInternalRule = await rulesClient.update({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/update_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/update_rule.ts index 8fd7f7a89dcb7..3d465d44fdc1d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/update_rule.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/update_rule.ts @@ -27,6 +27,7 @@ interface UpdateRuleArguments { prebuiltRuleAssetClient: IPrebuiltRuleAssetsClient; ruleUpdate: RuleUpdateProps; mlAuthz: MlAuthz; + isRuleCustomizationEnabled: boolean; } export const updateRule = async ({ @@ -35,6 +36,7 @@ export const updateRule = async ({ prebuiltRuleAssetClient, ruleUpdate, mlAuthz, + isRuleCustomizationEnabled, }: UpdateRuleArguments): Promise => { const { rule_id: ruleId, id } = ruleUpdate; @@ -57,6 +59,7 @@ export const updateRule = async ({ prebuiltRuleAssetClient, existingRule, ruleUpdate, + isRuleCustomizationEnabled, }); const updatedRule = await rulesClient.update({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/upgrade_prebuilt_rule.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/upgrade_prebuilt_rule.ts index 64486bed14304..dff7c8a333ca7 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/upgrade_prebuilt_rule.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/detection_rules_client/methods/upgrade_prebuilt_rule.ts @@ -25,12 +25,14 @@ export const upgradePrebuiltRule = async ({ ruleAsset, mlAuthz, prebuiltRuleAssetClient, + isRuleCustomizationEnabled, }: { actionsClient: ActionsClient; rulesClient: RulesClient; ruleAsset: PrebuiltRuleAsset; mlAuthz: MlAuthz; prebuiltRuleAssetClient: IPrebuiltRuleAssetsClient; + isRuleCustomizationEnabled: boolean; }): Promise => { await validateMlAuth(mlAuthz, ruleAsset.type); @@ -73,6 +75,7 @@ export const upgradePrebuiltRule = async ({ prebuiltRuleAssetClient, existingRule, ruleUpdate: ruleAsset, + isRuleCustomizationEnabled, }); const updatedInternalRule = await rulesClient.update({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/calculate_rule_source_for_import.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/calculate_rule_source_for_import.test.ts index e3bfb75c6a88d..b1952ff6948c7 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/calculate_rule_source_for_import.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/calculate_rule_source_for_import.test.ts @@ -15,6 +15,7 @@ describe('calculateRuleSourceForImport', () => { rule: getRulesSchemaMock(), prebuiltRuleAssetsByRuleId: {}, isKnownPrebuiltRule: false, + isRuleCustomizationEnabled: true, }); expect(result).toEqual({ @@ -33,6 +34,7 @@ describe('calculateRuleSourceForImport', () => { rule, prebuiltRuleAssetsByRuleId: {}, isKnownPrebuiltRule: true, + isRuleCustomizationEnabled: true, }); expect(result).toEqual({ @@ -53,6 +55,7 @@ describe('calculateRuleSourceForImport', () => { rule, prebuiltRuleAssetsByRuleId, isKnownPrebuiltRule: true, + isRuleCustomizationEnabled: true, }); expect(result).toEqual({ @@ -73,6 +76,7 @@ describe('calculateRuleSourceForImport', () => { rule, prebuiltRuleAssetsByRuleId, isKnownPrebuiltRule: true, + isRuleCustomizationEnabled: true, }); expect(result).toEqual({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/calculate_rule_source_for_import.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/calculate_rule_source_for_import.ts index 133566a7b776b..32a1f622b08d8 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/calculate_rule_source_for_import.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/calculate_rule_source_for_import.ts @@ -28,10 +28,12 @@ export const calculateRuleSourceForImport = ({ rule, prebuiltRuleAssetsByRuleId, isKnownPrebuiltRule, + isRuleCustomizationEnabled, }: { rule: ValidatedRuleToImport; prebuiltRuleAssetsByRuleId: Record; isKnownPrebuiltRule: boolean; + isRuleCustomizationEnabled: boolean; }): { ruleSource: RuleSource; immutable: boolean } => { const assetWithMatchingVersion = prebuiltRuleAssetsByRuleId[rule.rule_id]; // We convert here so that RuleSource calculation can @@ -43,6 +45,7 @@ export const calculateRuleSourceForImport = ({ rule: ruleResponseForImport, assetWithMatchingVersion, isKnownPrebuiltRule, + isRuleCustomizationEnabled, }); return { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/calculate_rule_source_from_asset.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/calculate_rule_source_from_asset.test.ts index 9a2f68479fdea..099c0f41f1720 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/calculate_rule_source_from_asset.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/calculate_rule_source_from_asset.test.ts @@ -15,6 +15,7 @@ describe('calculateRuleSourceFromAsset', () => { rule: getRulesSchemaMock(), assetWithMatchingVersion: undefined, isKnownPrebuiltRule: false, + isRuleCustomizationEnabled: true, }); expect(result).toEqual({ @@ -28,6 +29,7 @@ describe('calculateRuleSourceFromAsset', () => { rule: ruleToImport, assetWithMatchingVersion: undefined, isKnownPrebuiltRule: true, + isRuleCustomizationEnabled: true, }); expect(result).toEqual({ @@ -47,6 +49,7 @@ describe('calculateRuleSourceFromAsset', () => { // no other overwrites -> no differences }), isKnownPrebuiltRule: true, + isRuleCustomizationEnabled: true, }); expect(result).toEqual({ @@ -65,6 +68,7 @@ describe('calculateRuleSourceFromAsset', () => { name: 'Customized name', // mock a customization }), isKnownPrebuiltRule: true, + isRuleCustomizationEnabled: true, }); expect(result).toEqual({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/calculate_rule_source_from_asset.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/calculate_rule_source_from_asset.ts index 4f0caf9b10056..33063bedb11b2 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/calculate_rule_source_from_asset.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/calculate_rule_source_from_asset.ts @@ -24,10 +24,12 @@ export const calculateRuleSourceFromAsset = ({ rule, assetWithMatchingVersion, isKnownPrebuiltRule, + isRuleCustomizationEnabled, }: { rule: RuleResponse; assetWithMatchingVersion: PrebuiltRuleAsset | undefined; isKnownPrebuiltRule: boolean; + isRuleCustomizationEnabled: boolean; }): RuleSource => { if (!isKnownPrebuiltRule) { return { @@ -38,11 +40,15 @@ export const calculateRuleSourceFromAsset = ({ if (assetWithMatchingVersion == null) { return { type: 'external', - is_customized: true, + is_customized: isRuleCustomizationEnabled ? true : false, }; } - const isCustomized = calculateIsCustomized(assetWithMatchingVersion, rule); + const isCustomized = calculateIsCustomized({ + baseRule: assetWithMatchingVersion, + nextRule: rule, + isRuleCustomizationEnabled, + }); return { type: 'external', diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/rule_source_importer/rule_source_importer.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/rule_source_importer/rule_source_importer.test.ts index 39c937f4645a7..426109bbeb3bb 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/rule_source_importer/rule_source_importer.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/rule_source_importer/rule_source_importer.test.ts @@ -138,6 +138,7 @@ describe('ruleSourceImporter', () => { rule, prebuiltRuleAssetsByRuleId: { 'rule-1': expect.objectContaining({ rule_id: 'rule-1' }) }, isKnownPrebuiltRule: true, + isRuleCustomizationEnabled: true, }); }); @@ -166,6 +167,7 @@ describe('ruleSourceImporter', () => { rule, prebuiltRuleAssetsByRuleId: { 'rule-1': expect.objectContaining({ rule_id: 'rule-1' }) }, isKnownPrebuiltRule: true, + isRuleCustomizationEnabled: true, }); }); }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/rule_source_importer/rule_source_importer.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/rule_source_importer/rule_source_importer.ts index 1f5c2c5aa543b..0c553e6bb7c56 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/rule_source_importer/rule_source_importer.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/import/rule_source_importer/rule_source_importer.ts @@ -143,6 +143,8 @@ export class RuleSourceImporter implements IRuleSourceImporter { rule, prebuiltRuleAssetsByRuleId: this.matchingAssetsByRuleId, isKnownPrebuiltRule: this.availableRuleAssetIds.has(rule.rule_id), + isRuleCustomizationEnabled: + this.config.experimentalFeatures.prebuiltRulesCustomizationEnabled, }); } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/rule_type.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/rule_type.ts index c3b748f5d1828..b36ca687bc515 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/rule_type.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/__mocks__/rule_type.ts @@ -16,7 +16,7 @@ import type { IRuleDataClient } from '@kbn/rule-registry-plugin/server'; import { ruleRegistryMocks } from '@kbn/rule-registry-plugin/server/mocks'; import { eventLogServiceMock } from '@kbn/event-log-plugin/server/mocks'; import type { PluginSetupContract as ActionsPluginSetupContract } from '@kbn/actions-plugin/server'; -import type { PluginSetupContract as AlertingPluginSetupContract } from '@kbn/alerting-plugin/server'; +import type { AlertingServerSetup } from '@kbn/alerting-plugin/server'; import type { ConfigType } from '../../../../config'; import type { AlertAttributes } from '../types'; import { createRuleMock } from './rule'; @@ -48,7 +48,7 @@ export const createRuleTypeMocks = ( alertExecutor = executor; }, getConfig: () => ({ run: { alerts: { max: DEFAULT_MAX_ALERTS } } }), - } as AlertingPluginSetupContract; + } as AlertingServerSetup; const actions = { registerType: jest.fn(), diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/build_alert_group_from_sequence.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/build_alert_group_from_sequence.test.ts index 84349e9142e22..a2b0d4f21fc78 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/build_alert_group_from_sequence.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/build_alert_group_from_sequence.test.ts @@ -43,19 +43,19 @@ describe('buildAlert', () => { sampleDocNoSortId('619389b2-b077-400e-b40b-abde20d675d3'), ], }; - const alertGroup = buildAlertGroupFromSequence( - ruleExecutionLoggerMock, - eqlSequence, + const { shellAlert, buildingBlocks } = buildAlertGroupFromSequence({ + ruleExecutionLogger: ruleExecutionLoggerMock, + sequence: eqlSequence, completeRule, - 'allFields', - SPACE_ID, - jest.fn(), - completeRule.ruleParams.index as string[], - undefined, - PUBLIC_BASE_URL - ); - expect(alertGroup.length).toEqual(3); - expect(alertGroup[0]).toEqual( + mergeStrategy: 'allFields', + spaceId: SPACE_ID, + buildReasonMessage: jest.fn(), + indicesToQuery: completeRule.ruleParams.index as string[], + alertTimestampOverride: undefined, + publicBaseUrl: PUBLIC_BASE_URL, + }); + expect(buildingBlocks.length).toEqual(2); + expect(buildingBlocks[0]).toEqual( expect.objectContaining({ _source: expect.objectContaining({ [ALERT_ANCESTORS]: [ @@ -72,10 +72,10 @@ describe('buildAlert', () => { }), }) ); - expect(alertGroup[0]._source[ALERT_URL]).toContain( + expect(buildingBlocks[0]?._source?.[ALERT_URL]).toContain( 'http://testkibanabaseurl.com/s/space/app/security/alerts/redirect/f2db3574eaf8450e3f4d1cf4f416d70b110b035ae0a7a00026242df07f0a6c90?index=.alerts-security.alerts-space' ); - expect(alertGroup[1]).toEqual( + expect(buildingBlocks[1]).toEqual( expect.objectContaining({ _source: expect.objectContaining({ [ALERT_ANCESTORS]: [ @@ -92,10 +92,10 @@ describe('buildAlert', () => { }), }) ); - expect(alertGroup[1]._source[ALERT_URL]).toContain( + expect(buildingBlocks[1]._source[ALERT_URL]).toContain( 'http://testkibanabaseurl.com/s/space/app/security/alerts/redirect/1dbc416333244efbda833832eb83f13ea5d980a33c2f981ca8d2b35d82a045da?index=.alerts-security.alerts-space' ); - expect(alertGroup[2]).toEqual( + expect(shellAlert).toEqual( expect.objectContaining({ _source: expect.objectContaining({ [ALERT_ANCESTORS]: expect.arrayContaining([ @@ -113,14 +113,14 @@ describe('buildAlert', () => { }, { depth: 1, - id: alertGroup[0]._id, + id: buildingBlocks[0]?._id, index: '', rule: sampleRuleGuid, type: 'signal', }, { depth: 1, - id: alertGroup[1]._id, + id: buildingBlocks[0]._id, index: '', rule: sampleRuleGuid, type: 'signal', @@ -132,10 +132,10 @@ describe('buildAlert', () => { }), }) ); - expect(alertGroup[2]._source[ALERT_URL]).toContain( + expect(shellAlert?._source[ALERT_URL]).toContain( 'http://testkibanabaseurl.com/s/space/app/security/alerts/redirect/1b7d06954e74257140f3bf73f139078483f9658fe829fd806cc307fc0388fb23?index=.alerts-security.alerts-space' ); - const groupIds = alertGroup.map((alert) => alert._source[ALERT_GROUP_ID]); + const groupIds = buildingBlocks.map((alert) => alert?._source?.[ALERT_GROUP_ID]); for (const groupId of groupIds) { expect(groupId).toEqual(groupIds[0]); } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/build_alert_group_from_sequence.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/build_alert_group_from_sequence.ts index 185aa1236a234..2e0948b1af4d9 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/build_alert_group_from_sequence.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/build_alert_group_from_sequence.ts @@ -5,6 +5,13 @@ * 2.0. */ +import type { + ALERT_SUPPRESSION_DOCS_COUNT, + ALERT_INSTANCE_ID, + ALERT_SUPPRESSION_TERMS, + ALERT_SUPPRESSION_START, + ALERT_SUPPRESSION_END, +} from '@kbn/rule-data-utils'; import { ALERT_URL, ALERT_UUID } from '@kbn/rule-data-utils'; import { intersection as lodashIntersection, isArray } from 'lodash'; @@ -30,6 +37,35 @@ import type { EqlShellFieldsLatest, WrappedFieldsLatest, } from '../../../../../common/api/detection_engine/model/alerts'; +import type { SuppressionTerm } from '../utils'; + +export interface ExtraFieldsForShellAlert { + [ALERT_INSTANCE_ID]: string; + [ALERT_SUPPRESSION_TERMS]: SuppressionTerm[]; + [ALERT_SUPPRESSION_START]: Date; + [ALERT_SUPPRESSION_END]: Date; + [ALERT_SUPPRESSION_DOCS_COUNT]: number; +} + +export interface BuildAlertGroupFromSequence { + ruleExecutionLogger: IRuleExecutionLogForExecutors; + sequence: EqlSequence; + completeRule: CompleteRule; + mergeStrategy: ConfigType['alertMergeStrategy']; + spaceId: string | null | undefined; + buildReasonMessage: BuildReasonMessage; + indicesToQuery: string[]; + alertTimestampOverride: Date | undefined; + applyOverrides?: boolean; + publicBaseUrl?: string; + intendedTimestamp?: Date; +} + +// eql shell alerts can have a subAlerts property +// when suppression is used in EQL sequence queries +export type WrappedEqlShellOptionalSubAlertsType = WrappedFieldsLatest & { + subAlerts?: Array>; +}; /** * Takes N raw documents from ES that form a sequence and builds them into N+1 signals ready to be indexed - @@ -38,25 +74,30 @@ import type { * @param sequence The raw ES documents that make up the sequence * @param completeRule object representing the rule that found the sequence */ -export const buildAlertGroupFromSequence = ( - ruleExecutionLogger: IRuleExecutionLogForExecutors, - sequence: EqlSequence, - completeRule: CompleteRule, - mergeStrategy: ConfigType['alertMergeStrategy'], - spaceId: string | null | undefined, - buildReasonMessage: BuildReasonMessage, - indicesToQuery: string[], - alertTimestampOverride: Date | undefined, - publicBaseUrl?: string, - intendedTimestamp?: Date -): Array> => { +export const buildAlertGroupFromSequence = ({ + ruleExecutionLogger, + sequence, + completeRule, + mergeStrategy, + spaceId, + buildReasonMessage, + indicesToQuery, + alertTimestampOverride, + publicBaseUrl, + intendedTimestamp, +}: BuildAlertGroupFromSequence): { + shellAlert: WrappedFieldsLatest | undefined; + buildingBlocks: Array>; +} => { const ancestors: Ancestor[] = sequence.events.flatMap((event) => buildAncestors(event)); if (ancestors.some((ancestor) => ancestor?.rule === completeRule.alertId)) { - return []; + return { shellAlert: undefined, buildingBlocks: [] }; } - // The "building block" alerts start out as regular BaseFields. We'll add the group ID and index fields - // after creating the shell alert later on, since that's when the group ID is determined. + // The "building block" alerts start out as regular BaseFields. + // We'll add the group ID and index fields + // after creating the shell alert later on + // since that's when the group ID is determined. let baseAlerts: BaseFieldsLatest[] = []; try { baseAlerts = sequence.events.map((event) => @@ -79,7 +120,7 @@ export const buildAlertGroupFromSequence = ( ); } catch (error) { ruleExecutionLogger.error(error); - return []; + return { shellAlert: undefined, buildingBlocks: [] }; } // The ID of each building block alert depends on all of the other building blocks as well, @@ -99,16 +140,16 @@ export const buildAlertGroupFromSequence = ( // Now that we have an array of building blocks for the events in the sequence, // we can build the signal that links the building blocks together // and also insert the group id (which is also the "shell" signal _id) in each building block - const shellAlert = buildAlertRoot( - wrappedBaseFields, + const shellAlert = buildAlertRoot({ + wrappedBuildingBlocks: wrappedBaseFields, completeRule, spaceId, buildReasonMessage, indicesToQuery, alertTimestampOverride, publicBaseUrl, - intendedTimestamp - ); + intendedTimestamp, + }); const sequenceAlert: WrappedFieldsLatest = { _id: shellAlert[ALERT_UUID], _index: '', @@ -139,19 +180,30 @@ export const buildAlertGroupFromSequence = ( } ); - return [...wrappedBuildingBlocks, sequenceAlert]; + return { shellAlert: sequenceAlert, buildingBlocks: wrappedBuildingBlocks }; }; -export const buildAlertRoot = ( - wrappedBuildingBlocks: Array>, - completeRule: CompleteRule, - spaceId: string | null | undefined, - buildReasonMessage: BuildReasonMessage, - indicesToQuery: string[], - alertTimestampOverride: Date | undefined, - publicBaseUrl?: string, - intendedTimestamp?: Date -): EqlShellFieldsLatest => { +export interface BuildAlertRootParams { + wrappedBuildingBlocks: Array>; + completeRule: CompleteRule; + spaceId: string | null | undefined; + buildReasonMessage: BuildReasonMessage; + indicesToQuery: string[]; + alertTimestampOverride: Date | undefined; + publicBaseUrl?: string; + intendedTimestamp?: Date; +} + +export const buildAlertRoot = ({ + wrappedBuildingBlocks, + completeRule, + spaceId, + buildReasonMessage, + indicesToQuery, + alertTimestampOverride, + publicBaseUrl, + intendedTimestamp, +}: BuildAlertRootParams): EqlShellFieldsLatest => { const mergedAlerts = objectArrayIntersection(wrappedBuildingBlocks.map((alert) => alert._source)); const reason = buildReasonMessage({ name: completeRule.ruleConfig.name, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/create_eql_alert_type.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/create_eql_alert_type.ts index 2bdf0d913d156..79bc9c9849da1 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/create_eql_alert_type.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/create_eql_alert_type.ts @@ -13,9 +13,10 @@ import { EqlRuleParams } from '../../rule_schema'; import { eqlExecutor } from './eql'; import type { CreateRuleOptions, SecurityAlertType, SignalSourceHit } from '../types'; import { validateIndexPatterns } from '../utils'; -import type { BuildReasonMessage } from '../utils/reason_formatters'; -import { wrapSuppressedAlerts } from '../utils/wrap_suppressed_alerts'; import { getIsAlertSuppressionActive } from '../utils/get_is_alert_suppression_active'; +import type { SharedParams } from '../utils/utils'; +import { wrapSuppressedAlerts } from '../utils/wrap_suppressed_alerts'; +import type { BuildReasonMessage } from '../utils/reason_formatters'; export const createEqlAlertType = ( createOptions: CreateRuleOptions @@ -86,6 +87,24 @@ export const createEqlAlertType = ( spaceId, } = execOptions; + const isAlertSuppressionActive = await getIsAlertSuppressionActive({ + alertSuppression: completeRule.ruleParams.alertSuppression, + licensing, + }); + + const sharedParams: SharedParams = { + spaceId, + completeRule, + mergeStrategy, + indicesToQuery: inputIndex, + alertTimestampOverride, + ruleExecutionLogger, + publicBaseUrl, + primaryTimestamp, + secondaryTimestamp, + intendedTimestamp, + }; + const wrapSuppressedHits = ( events: SignalSourceHit[], buildReasonMessage: BuildReasonMessage @@ -104,10 +123,7 @@ export const createEqlAlertType = ( secondaryTimestamp, intendedTimestamp, }); - const isNonSeqAlertSuppressionActive = await getIsAlertSuppressionActive({ - alertSuppression: completeRule.ruleParams.alertSuppression, - licensing, - }); + const { result, loggedRequests } = await eqlExecutor({ completeRule, tuple, @@ -124,9 +140,10 @@ export const createEqlAlertType = ( exceptionFilter, unprocessedExceptions, wrapSuppressedHits, + sharedParams, alertTimestampOverride, alertWithSuppression, - isAlertSuppressionActive: isNonSeqAlertSuppressionActive, + isAlertSuppressionActive, experimentalFeatures, state, scheduleNotificationResponseActionsService, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/eql.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/eql.test.ts index 4f5aa7d322c9e..f1fabcfd0f96b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/eql.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/eql.test.ts @@ -18,6 +18,7 @@ import { getCompleteRuleMock, getEqlRuleParams } from '../../rule_schema/mocks'; import { ruleExecutionLogMock } from '../../rule_monitoring/mocks'; import { eqlExecutor } from './eql'; import { getDataTierFilter } from '../utils/get_data_tier_filter'; +import type { SharedParams } from '../utils/utils'; jest.mock('../../routes/index/get_index_version'); jest.mock('../utils/get_data_tier_filter', () => ({ getDataTierFilter: jest.fn() })); @@ -38,6 +39,21 @@ describe('eql_executor', () => { }; const mockExperimentalFeatures = {} as ExperimentalFeatures; const mockScheduleNotificationResponseActionsService = jest.fn(); + const ruleExecutionLoggerMock = ruleExecutionLogMock.forExecutors.create(); + const SPACE_ID = 'space'; + const PUBLIC_BASE_URL = 'http://testkibanabaseurl.com'; + + const sharedParams: SharedParams = { + ruleExecutionLogger: ruleExecutionLoggerMock, + completeRule: eqlCompleteRule, + mergeStrategy: 'allFields', + spaceId: SPACE_ID, + indicesToQuery: eqlCompleteRule.ruleParams.index as string[], + alertTimestampOverride: undefined, + publicBaseUrl: PUBLIC_BASE_URL, + intendedTimestamp: undefined, + primaryTimestamp: new Date().toISOString(), + }; beforeEach(() => { jest.clearAllMocks(); @@ -69,6 +85,7 @@ describe('eql_executor', () => { exceptionFilter: undefined, unprocessedExceptions: [getExceptionListItemSchemaMock()], wrapSuppressedHits: jest.fn(), + sharedParams, alertTimestampOverride: undefined, alertWithSuppression: jest.fn(), isAlertSuppressionActive: false, @@ -82,56 +99,6 @@ describe('eql_executor', () => { }`, ]); }); - - it('warns when a sequence query is used with alert suppression', async () => { - // mock a sequences response - alertServices.scopedClusterClient.asCurrentUser.eql.search.mockReset().mockResolvedValue({ - hits: { - total: { relation: 'eq', value: 10 }, - sequences: [], - }, - }); - - const ruleWithSequenceAndSuppression = getCompleteRuleMock({ - ...params, - query: 'sequence [any where true] [any where true]', - alertSuppression: { - groupBy: ['event.type'], - duration: { - value: 10, - unit: 'm', - }, - missingFieldsStrategy: 'suppress', - }, - }); - - const { result } = await eqlExecutor({ - inputIndex: DEFAULT_INDEX_PATTERN, - runtimeMappings: {}, - completeRule: ruleWithSequenceAndSuppression, - tuple, - ruleExecutionLogger, - services: alertServices, - version, - bulkCreate: jest.fn(), - wrapHits: jest.fn(), - wrapSequences: jest.fn(), - primaryTimestamp: '@timestamp', - exceptionFilter: undefined, - unprocessedExceptions: [], - wrapSuppressedHits: jest.fn(), - alertTimestampOverride: undefined, - alertWithSuppression: jest.fn(), - isAlertSuppressionActive: true, - experimentalFeatures: mockExperimentalFeatures, - scheduleNotificationResponseActionsService: - mockScheduleNotificationResponseActionsService, - }); - - expect(result.warningMessages).toContain( - 'Suppression is not supported for EQL sequence queries. The rule will proceed without suppression.' - ); - }); }); it('should classify EQL verification exceptions as "user errors" when reporting to the framework', async () => { @@ -155,6 +122,7 @@ describe('eql_executor', () => { exceptionFilter: undefined, unprocessedExceptions: [], wrapSuppressedHits: jest.fn(), + sharedParams, alertTimestampOverride: undefined, alertWithSuppression: jest.fn(), isAlertSuppressionActive: true, @@ -180,6 +148,7 @@ describe('eql_executor', () => { exceptionFilter: undefined, unprocessedExceptions: [], wrapSuppressedHits: jest.fn(), + sharedParams, alertTimestampOverride: undefined, alertWithSuppression: jest.fn(), isAlertSuppressionActive: false, @@ -220,6 +189,7 @@ describe('eql_executor', () => { exceptionFilter: undefined, unprocessedExceptions: [], wrapSuppressedHits: jest.fn(), + sharedParams, alertTimestampOverride: undefined, alertWithSuppression: jest.fn(), isAlertSuppressionActive: true, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/eql.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/eql.ts index cd8b76a93d23b..756f220f06d55 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/eql.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/eql.ts @@ -5,6 +5,7 @@ * 2.0. */ import { performance } from 'perf_hooks'; + import type { SuppressedAlertService } from '@kbn/rule-registry-plugin/server'; import type { ExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; import type { @@ -25,9 +26,10 @@ import type { RuleRangeTuple, SearchAfterAndBulkCreateReturnType, SignalSource, - WrapSuppressedHits, CreateRuleOptions, + WrapSuppressedHits, } from '../types'; +import type { SharedParams } from '../utils/utils'; import { addToSearchAfterReturn, createSearchAfterReturnType, @@ -44,11 +46,15 @@ import type { WrappedFieldsLatest, } from '../../../../../common/api/detection_engine/model/alerts'; import type { IRuleExecutionLogForExecutors } from '../../rule_monitoring'; -import { bulkCreateSuppressedAlertsInMemory } from '../utils/bulk_create_suppressed_alerts_in_memory'; +import { + bulkCreateSuppressedAlertsInMemory, + bulkCreateSuppressedSequencesInMemory, +} from '../utils/bulk_create_suppressed_alerts_in_memory'; import { getDataTierFilter } from '../utils/get_data_tier_filter'; import type { RulePreviewLoggedRequest } from '../../../../../common/api/detection_engine/rule_preview/rule_preview.gen'; import { logEqlRequest } from '../utils/logged_requests'; import * as i18n from '../translations'; +import { alertSuppressionTypeGuard } from '../utils/get_is_alert_suppression_active'; interface EqlExecutorParams { inputIndex: string[]; @@ -60,6 +66,7 @@ interface EqlExecutorParams { version: string; bulkCreate: BulkCreate; wrapHits: WrapHits; + sharedParams: SharedParams; wrapSequences: WrapSequences; primaryTimestamp: string; secondaryTimestamp?: string; @@ -90,6 +97,7 @@ export const eqlExecutor = async ({ exceptionFilter, unprocessedExceptions, wrapSuppressedHits, + sharedParams, alertTimestampOverride, alertWithSuppression, isAlertSuppressionActive, @@ -104,6 +112,7 @@ export const eqlExecutor = async ({ const isLoggedRequestsEnabled = state?.isLoggedRequestsEnabled ?? false; const loggedRequests: RulePreviewLoggedRequest[] = []; + // eslint-disable-next-line complexity return withSecuritySpan('eqlExecutor', async () => { const result = createSearchAfterReturnType(); @@ -179,12 +188,28 @@ export const eqlExecutor = async ({ newSignals = wrapHits(events, buildReasonMessageForEqlAlert); } } else if (sequences) { - if (isAlertSuppressionActive) { - result.warningMessages.push( - 'Suppression is not supported for EQL sequence queries. The rule will proceed without suppression.' - ); + if ( + isAlertSuppressionActive && + experimentalFeatures.alertSuppressionForSequenceEqlRuleEnabled && + alertSuppressionTypeGuard(completeRule.ruleParams.alertSuppression) + ) { + await bulkCreateSuppressedSequencesInMemory({ + sequences, + toReturn: result, + bulkCreate, + services, + buildReasonMessage: buildReasonMessageForEqlAlert, + ruleExecutionLogger, + tuple, + alertSuppression: completeRule.ruleParams.alertSuppression, + sharedParams, + alertTimestampOverride, + alertWithSuppression, + experimentalFeatures, + }); + } else { + newSignals = wrapSequences(sequences, buildReasonMessageForEqlAlert); } - newSignals = wrapSequences(sequences, buildReasonMessageForEqlAlert); } else { throw new Error( 'eql query response should have either `sequences` or `events` but had neither' diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/wrap_sequences_factory.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/wrap_sequences_factory.ts index 39f9df366627e..d7ce37dd1feb0 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/wrap_sequences_factory.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/wrap_sequences_factory.ts @@ -11,7 +11,8 @@ import type { ConfigType } from '../../../../config'; import type { CompleteRule, RuleParams } from '../../rule_schema'; import type { IRuleExecutionLogForExecutors } from '../../rule_monitoring'; import type { - BaseFieldsLatest, + EqlBuildingBlockFieldsLatest, + EqlShellFieldsLatest, WrappedFieldsLatest, } from '../../../../../common/api/detection_engine/model/alerts'; @@ -38,21 +39,27 @@ export const wrapSequencesFactory = intendedTimestamp: Date | undefined; }): WrapSequences => (sequences, buildReasonMessage) => - sequences.reduce( - (acc: Array>, sequence) => [ - ...acc, - ...buildAlertGroupFromSequence( - ruleExecutionLogger, - sequence, - completeRule, - mergeStrategy, - spaceId, - buildReasonMessage, - indicesToQuery, - alertTimestampOverride, - publicBaseUrl, - intendedTimestamp - ), - ], - [] - ); + sequences.reduce< + Array< + | WrappedFieldsLatest + | WrappedFieldsLatest + > + >((acc, sequence) => { + const { shellAlert, buildingBlocks } = buildAlertGroupFromSequence({ + ruleExecutionLogger, + sequence, + completeRule, + mergeStrategy, + spaceId, + buildReasonMessage, + indicesToQuery, + alertTimestampOverride, + publicBaseUrl, + intendedTimestamp, + }); + if (shellAlert) { + acc.push(shellAlert, ...buildingBlocks); + return acc; + } + return acc; + }, []); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/esql/wrap_suppressed_esql_alerts.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/esql/wrap_suppressed_esql_alerts.ts index b2d01e4d5ee7a..fe72aa566583a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/esql/wrap_suppressed_esql_alerts.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/esql/wrap_suppressed_esql_alerts.ts @@ -61,7 +61,7 @@ export const wrapSuppressedEsqlAlerts = ({ const suppressionTerms = getSuppressionTerms({ alertSuppression: completeRule?.ruleParams?.alertSuppression, - fields: combinedFields, + input: combinedFields, }); const id = generateAlertId({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/new_terms/wrap_suppressed_new_terms_alerts.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/new_terms/wrap_suppressed_new_terms_alerts.ts index fa3781b2a2e63..dc9a322301126 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/new_terms/wrap_suppressed_new_terms_alerts.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/new_terms/wrap_suppressed_new_terms_alerts.ts @@ -58,7 +58,7 @@ export const wrapSuppressedNewTermsAlerts = ({ const suppressionTerms = getSuppressionTerms({ alertSuppression: completeRule?.ruleParams?.alertSuppression, - fields: event.fields, + input: event.fields, }); const instanceId = objectHash([suppressionTerms, completeRule.alertId, spaceId]); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/query/query.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/query/query.ts index 8c235c5e8f238..106a7589a2826 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/query/query.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/query/query.ts @@ -65,6 +65,7 @@ export const queryExecutor = async ({ const hasPlatinumLicense = license.hasAtLeast('platinum'); const result = + // TODO: replace this with getIsAlertSuppressionActive function ruleParams.alertSuppression?.groupBy != null && hasPlatinumLicense ? await groupAndBulkCreate({ runOpts, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/types.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/types.ts index c1e8165fe3aed..94aa55e6b0dd5 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/types.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/types.ts @@ -52,6 +52,8 @@ import type { BuildReasonMessage } from './utils/reason_formatters'; import type { BaseFieldsLatest, DetectionAlert, + EqlBuildingBlockFieldsLatest, + EqlShellFieldsLatest, WrappedFieldsLatest, } from '../../../../common/api/detection_engine/model/alerts'; import type { @@ -354,7 +356,9 @@ export type WrapSuppressedHits = ( export type WrapSequences = ( sequences: Array>, buildReasonMessage: BuildReasonMessage -) => Array>; +) => Array< + WrappedFieldsLatest | WrappedFieldsLatest +>; export type RuleServices = RuleExecutorServices< AlertInstanceState, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/bulk_create_suppressed_alerts_in_memory.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/bulk_create_suppressed_alerts_in_memory.ts index 030cb213d94dd..291b5cfa0d2f6 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/bulk_create_suppressed_alerts_in_memory.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/bulk_create_suppressed_alerts_in_memory.ts @@ -7,14 +7,18 @@ import type { SuppressedAlertService } from '@kbn/rule-registry-plugin/server'; import type { SuppressionFieldsLatest } from '@kbn/rule-registry-plugin/common/schemas'; +import type { EqlHitsSequence } from '@elastic/elasticsearch/lib/api/types'; + import type { SearchAfterAndBulkCreateParams, SearchAfterAndBulkCreateReturnType, WrapSuppressedHits, SignalSourceHit, + SignalSource, } from '../types'; import { MAX_SIGNALS_SUPPRESSION_MULTIPLIER } from '../constants'; -import { addToSearchAfterReturn } from './utils'; +import type { SharedParams } from './utils'; +import { addToSearchAfterReturn, buildShellAlertSuppressionTermsAndFields } from './utils'; import type { AlertSuppressionCamel } from '../../../../../common/api/detection_engine/model/rule_schema'; import { DEFAULT_SUPPRESSION_MISSING_FIELDS_STRATEGY } from '../../../../../common/detection_engine/constants'; import { partitionMissingFieldsEvents } from './partition_missing_fields_events'; @@ -25,8 +29,12 @@ import type { ExperimentalFeatures } from '../../../../../common'; import type { BaseFieldsLatest, + EqlBuildingBlockFieldsLatest, + EqlShellFieldsLatest, WrappedFieldsLatest, } from '../../../../../common/api/detection_engine/model/alerts'; +import { robustGet } from './source_fields_merging/utils/robust_field_access'; +import { buildAlertGroupFromSequence } from '../eql/build_alert_group_from_sequence'; interface SearchAfterAndBulkCreateSuppressedAlertsParams extends SearchAfterAndBulkCreateParams { wrapSuppressedHits: WrapSuppressedHits; @@ -54,9 +62,31 @@ export interface BulkCreateSuppressedAlertsParams mergeSourceAndFields?: boolean; maxNumberOfAlertsMultiplier?: number; } + +export interface BulkCreateSuppressedSequencesParams + extends Pick< + SearchAfterAndBulkCreateSuppressedAlertsParams, + | 'bulkCreate' + | 'services' + | 'buildReasonMessage' + | 'ruleExecutionLogger' + | 'tuple' + | 'alertSuppression' + | 'alertWithSuppression' + | 'alertTimestampOverride' + > { + sequences: Array>; + buildingBlockAlerts?: Array>; + toReturn: SearchAfterAndBulkCreateReturnType; + experimentalFeatures: ExperimentalFeatures; + maxNumberOfAlertsMultiplier?: number; + sharedParams: SharedParams; + alertSuppression: AlertSuppressionCamel; +} /** * wraps, bulk create and suppress alerts in memory, also takes care of missing fields logic. - * If parameter alertSuppression.missingFieldsStrategy configured not to be suppressed, regular alerts will be created for such events without suppression + * If parameter alertSuppression.missingFieldsStrategy configured not to be suppressed, + * regular alerts will be created for such events without suppression */ export const bulkCreateSuppressedAlertsInMemory = async ({ enrichedEvents, @@ -112,6 +142,90 @@ export const bulkCreateSuppressedAlertsInMemory = async ({ }); }; +/** + * wraps, bulk create and suppress alerts in memory, also takes care of missing fields logic. + * If parameter alertSuppression.missingFieldsStrategy configured not to be suppressed, + * regular alerts will be created for such events without suppression + */ +export const bulkCreateSuppressedSequencesInMemory = async ({ + sequences, + toReturn, + bulkCreate, + services, + ruleExecutionLogger, + tuple, + alertSuppression, + buildReasonMessage, + sharedParams, + alertWithSuppression, + alertTimestampOverride, + experimentalFeatures, + maxNumberOfAlertsMultiplier, +}: BulkCreateSuppressedSequencesParams) => { + const suppressOnMissingFields = + (alertSuppression.missingFieldsStrategy ?? DEFAULT_SUPPRESSION_MISSING_FIELDS_STRATEGY) === + AlertSuppressionMissingFieldsStrategyEnum.suppress; + + const suppressibleWrappedSequences: Array< + WrappedFieldsLatest & { + subAlerts: Array>; + } + > = []; + const unsuppressibleWrappedDocs: Array> = []; + + sequences.forEach((sequence) => { + const alertGroupFromSequence = buildAlertGroupFromSequence({ + sequence, + applyOverrides: true, + buildReasonMessage, + ...sharedParams, + }); + const shellAlert = alertGroupFromSequence.shellAlert; + const buildingBlocks = alertGroupFromSequence.buildingBlocks; + if (shellAlert) { + if (!suppressOnMissingFields) { + // does the shell alert have all the suppression fields? + const hasEverySuppressionField = alertSuppression.groupBy.every( + (suppressionPath) => + robustGet({ key: suppressionPath, document: shellAlert._source }) != null + ); + if (!hasEverySuppressionField) { + unsuppressibleWrappedDocs.push(shellAlert, ...buildingBlocks); + } else { + const wrappedWithSuppressionTerms = buildShellAlertSuppressionTermsAndFields({ + shellAlert, + buildingBlockAlerts: buildingBlocks, + ...sharedParams, + }); + suppressibleWrappedSequences.push(wrappedWithSuppressionTerms); + } + } else { + const wrappedWithSuppressionTerms = buildShellAlertSuppressionTermsAndFields({ + shellAlert, + buildingBlockAlerts: buildingBlocks, + ...sharedParams, + }); + suppressibleWrappedSequences.push(wrappedWithSuppressionTerms); + } + } + }); + + return executeBulkCreateAlerts({ + suppressibleWrappedDocs: suppressibleWrappedSequences, + unsuppressibleWrappedDocs, + toReturn, + bulkCreate, + services, + ruleExecutionLogger, + tuple, + alertSuppression, + alertWithSuppression, + alertTimestampOverride, + experimentalFeatures, + maxNumberOfAlertsMultiplier, + }); +}; + export interface ExecuteBulkCreateAlertsParams extends Pick< SearchAfterAndBulkCreateSuppressedAlertsParams, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/bulk_create_with_suppression.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/bulk_create_with_suppression.ts index 7decfd8294913..6c7228d6b78af 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/bulk_create_with_suppression.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/bulk_create_with_suppression.ts @@ -53,7 +53,7 @@ export const bulkCreateWithSuppression = async < }: { alertWithSuppression: SuppressedAlertService; ruleExecutionLogger: IRuleExecutionLogForExecutors; - wrappedDocs: Array>; + wrappedDocs: Array & { subAlerts?: Array> }>; services: RuleServices; suppressionWindow: string; alertTimestampOverride: Date | undefined; @@ -97,13 +97,19 @@ export const bulkCreateWithSuppression = async < } }; + const alerts = wrappedDocs.map((doc) => ({ + _id: doc._id, + // `fields` should have already been merged into `doc._source` + _source: doc._source, + subAlerts: + doc?.subAlerts != null + ? doc?.subAlerts?.map((subAlert) => ({ _id: subAlert._id, _source: subAlert._source })) + : undefined, + })); + const { createdAlerts, errors, suppressedAlerts, alertsWereTruncated } = await alertWithSuppression( - wrappedDocs.map((doc) => ({ - _id: doc._id, - // `fields` should have already been merged into `doc._source` - _source: doc._source, - })), + alerts, suppressionWindow, enrichAlertsWrapper, alertTimestampOverride, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_is_alert_suppression_active.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_is_alert_suppression_active.ts index 5ab06db3043af..263bd88bc1b0e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_is_alert_suppression_active.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_is_alert_suppression_active.ts @@ -17,6 +17,10 @@ interface GetIsAlertSuppressionActiveParams { licensing: LicensingPluginSetup; } +export const alertSuppressionTypeGuard = ( + alertSuppression: AlertSuppressionCamel | undefined +): alertSuppression is AlertSuppressionCamel => Boolean(alertSuppression?.groupBy?.length); + /** * checks if alert suppression is active: * - rule should have alert suppression config @@ -32,7 +36,7 @@ export const getIsAlertSuppressionActive = async ({ return false; } - const isAlertSuppressionConfigured = Boolean(alertSuppression?.groupBy?.length); + const isAlertSuppressionConfigured = alertSuppressionTypeGuard(alertSuppression); if (!isAlertSuppressionConfigured) { return false; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/search_after_bulk_create.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/search_after_bulk_create.test.ts index d2e51e03908f7..d3b0c2dd6b420 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/search_after_bulk_create.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/search_after_bulk_create.test.ts @@ -48,7 +48,7 @@ import { ruleExecutionLogMock } from '../../rule_monitoring/mocks'; import type { BuildReasonMessage } from './reason_formatters'; import type { QueryRuleParams } from '../../rule_schema'; import { SERVER_APP_ID } from '../../../../../common/constants'; -import type { PluginSetupContract } from '@kbn/alerting-plugin/server'; +import type { AlertingServerSetup } from '@kbn/alerting-plugin/server'; describe('searchAfterAndBulkCreate', () => { let mockService: RuleExecutorServicesMock; @@ -58,7 +58,7 @@ describe('searchAfterAndBulkCreate', () => { let wrapHits: WrapHits; let inputIndexPattern: string[] = []; let listClient = listMock.getListClient(); - let alerting: PluginSetupContract; + let alerting: AlertingServerSetup; const ruleExecutionLogger = ruleExecutionLogMock.forExecutors.create(); const someGuids = Array.from({ length: 13 }).map(() => uuidv4()); const sampleParams = getQueryRuleParams(); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/source_fields_merging/utils/robust_field_access.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/source_fields_merging/utils/robust_field_access.test.ts index 646068b59eec7..1b4b9e7d49174 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/source_fields_merging/utils/robust_field_access.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/source_fields_merging/utils/robust_field_access.test.ts @@ -34,6 +34,9 @@ describe('robust field access', () => { it('returns undefined if the key does not exist', () => { expect(robustGet({ key: 'a.b.c', document: { a: { b: 'my-value' } } })).toEqual(undefined); }); + it('returns an array if the key exists', () => { + expect(robustGet({ key: 'a.b', document: { a: { b: ['my-value'] } } })).toEqual(['my-value']); + }); }); describe('set', () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/suppression_utils.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/suppression_utils.test.ts index 745dd08977520..46aa25d08d44a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/suppression_utils.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/suppression_utils.test.ts @@ -85,17 +85,37 @@ describe('getSuppressionTerms', () => { alertSuppression: { groupBy: ['host.name'], }, - fields: { 'host.name': 'localhost-1' }, + input: { 'host.name': 'localhost-1' }, }) ).toEqual([{ field: 'host.name', value: 'localhost-1' }]); }); + it('should return suppression terms when using source', () => { + expect( + getSuppressionTerms({ + alertSuppression: { + groupBy: ['host.name'], + }, + input: { host: { name: 'localhost-1' } }, + }) + ).toEqual([{ field: 'host.name', value: 'localhost-1' }]); + }); + it('should return suppression terms when using source and mixed notation', () => { + expect( + getSuppressionTerms({ + alertSuppression: { + groupBy: ['host.something.name'], + }, + input: { 'host.something': { name: 'localhost-1' } }, + }) + ).toEqual([{ field: 'host.something.name', value: 'localhost-1' }]); + }); it('should return suppression terms array when fields do not have matches', () => { expect( getSuppressionTerms({ alertSuppression: { groupBy: ['host.name'], }, - fields: { 'host.ip': '127.0.0.1' }, + input: { 'host.ip': '127.0.0.1' }, }) ).toEqual([{ field: 'host.name', value: null }]); }); @@ -105,7 +125,7 @@ describe('getSuppressionTerms', () => { alertSuppression: { groupBy: ['host.name'], }, - fields: { 'host.name': ['localhost-2', 'localhost-1'] }, + input: { 'host.name': ['localhost-2', 'localhost-1'] }, }) ).toEqual([{ field: 'host.name', value: ['localhost-1', 'localhost-2'] }]); }); @@ -115,7 +135,7 @@ describe('getSuppressionTerms', () => { alertSuppression: { groupBy: ['host.name', 'host.ip'], }, - fields: { 'host.name': ['localhost-1'], 'agent.name': 'test', 'host.ip': '127.0.0.1' }, + input: { 'host.name': ['localhost-1'], 'agent.name': 'test', 'host.ip': '127.0.0.1' }, }) ).toEqual([ { field: 'host.name', value: ['localhost-1'] }, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/suppression_utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/suppression_utils.ts index 44febba73e68e..0e066069665dd 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/suppression_utils.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/suppression_utils.ts @@ -5,7 +5,6 @@ * 2.0. */ -import pick from 'lodash/pick'; import get from 'lodash/get'; import sortBy from 'lodash/sortBy'; @@ -17,10 +16,13 @@ import { ALERT_SUPPRESSION_END, } from '@kbn/rule-data-utils'; import type { AlertSuppressionCamel } from '../../../../../common/api/detection_engine/model/rule_schema'; +import type { ExtraFieldsForShellAlert } from '../eql/build_alert_group_from_sequence'; +import { robustGet } from './source_fields_merging/utils/robust_field_access'; +import type { SearchTypes } from '../../../../../common/detection_engine/types'; export interface SuppressionTerm { field: string; - value: string[] | number[] | null; + value: SearchTypes | null; } /** @@ -47,7 +49,7 @@ export const getSuppressionAlertFields = ({ fallbackTimestamp ); - const suppressionFields = { + const suppressionFields: ExtraFieldsForShellAlert = { [ALERT_INSTANCE_ID]: instanceId, [ALERT_SUPPRESSION_TERMS]: suppressionTerms, [ALERT_SUPPRESSION_START]: suppressionTime, @@ -59,23 +61,21 @@ export const getSuppressionAlertFields = ({ }; /** + * generates values from a source event for the fields provided in the alertSuppression object + * @param alertSuppression {@link AlertSuppressionCamel} options defining how to suppress alerts + * @param input source data from either the _source of "fields" property on the event * returns an array of {@link SuppressionTerm}s by retrieving the appropriate field values based on the provided alertSuppression configuration */ export const getSuppressionTerms = ({ alertSuppression, - fields, + input, }: { - fields: Record | undefined; alertSuppression: AlertSuppressionCamel | undefined; + input: Record | undefined; }): SuppressionTerm[] => { const suppressedBy = alertSuppression?.groupBy ?? []; - - const suppressedProps = pick(fields, suppressedBy) as Record< - string, - string[] | number[] | undefined - >; const suppressionTerms = suppressedBy.map((field) => { - const value = suppressedProps[field] ?? null; + const value = input != null ? robustGet({ document: input, key: field }) ?? null : null; const sortedValue = Array.isArray(value) ? (sortBy(value) as string[] | number[]) : value; return { field, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/utils.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/utils.test.ts index 5397d473af3c8..0a625ed5f245b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/utils.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/utils.test.ts @@ -68,7 +68,7 @@ import type { ShardError } from '../../../types'; import { ruleExecutionLogMock } from '../../rule_monitoring/mocks'; import type { GenericBulkCreateResponse } from '../factories'; import type { BaseFieldsLatest } from '../../../../../common/api/detection_engine/model/alerts'; -import type { PluginSetupContract } from '@kbn/alerting-plugin/server'; +import type { AlertingServerSetup } from '@kbn/alerting-plugin/server'; describe('utils', () => { const anchor = '2020-01-01T06:06:06.666Z'; @@ -446,7 +446,7 @@ describe('utils', () => { }); describe('getRuleRangeTuples', () => { - let alerting: PluginSetupContract; + let alerting: AlertingServerSetup; beforeEach(() => { alerting = alertsMock.createSetup(); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/utils.ts index 45193c14fa396..271a2ce64883e 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/utils.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/utils.ts @@ -5,14 +5,25 @@ * 2.0. */ import { createHash } from 'crypto'; -import { chunk, get, invert, isEmpty, partition } from 'lodash'; +import { chunk, get, invert, isEmpty, merge, partition } from 'lodash'; import moment from 'moment'; +import objectHash from 'object-hash'; import dateMath from '@kbn/datemath'; import { isCCSRemoteIndexName } from '@kbn/es-query'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { TransportResult } from '@elastic/elasticsearch'; -import { ALERT_UUID, ALERT_RULE_UUID, ALERT_RULE_PARAMETERS } from '@kbn/rule-data-utils'; +import { + ALERT_UUID, + ALERT_RULE_UUID, + ALERT_RULE_PARAMETERS, + TIMESTAMP, + ALERT_INSTANCE_ID, + ALERT_SUPPRESSION_DOCS_COUNT, + ALERT_SUPPRESSION_END, + ALERT_SUPPRESSION_START, + ALERT_SUPPRESSION_TERMS, +} from '@kbn/rule-data-utils'; import type { ListArray, ExceptionListItemSchema, @@ -27,12 +38,13 @@ import type { import type { AlertInstanceContext, AlertInstanceState, - PluginSetupContract, + AlertingServerSetup, RuleExecutorServices, } from '@kbn/alerting-plugin/server'; import { parseDuration } from '@kbn/alerting-plugin/server'; import type { ExceptionListClient, ListClient, ListPluginSetup } from '@kbn/lists-plugin/server'; import type { SanitizedRuleAction } from '@kbn/alerting-plugin/common'; +import type { SuppressionFieldsLatest } from '@kbn/rule-registry-plugin/common/schemas'; import type { TimestampOverride } from '../../../../../common/api/detection_engine/model/rule_schema'; import type { Privilege } from '../../../../../common/api/detection_engine'; import { RuleExecutionStatusEnum } from '../../../../../common/api/detection_engine/rule_monitoring'; @@ -51,6 +63,7 @@ import type { } from '../types'; import type { ShardError } from '../../../types'; import type { + CompleteRule, EqlRuleParams, EsqlRuleParams, MachineLearningRuleParams, @@ -65,9 +78,20 @@ import { withSecuritySpan } from '../../../../utils/with_security_span'; import type { BaseFieldsLatest, DetectionAlert, + EqlBuildingBlockFieldsLatest, + EqlShellFieldsLatest, + WrappedFieldsLatest, } from '../../../../../common/api/detection_engine/model/alerts'; import { ENABLE_CCS_READ_WARNING_SETTING } from '../../../../../common/constants'; import type { GenericBulkCreateResponse } from '../factories'; +import type { ConfigType } from '../../../../config'; +import type { + ExtraFieldsForShellAlert, + WrappedEqlShellOptionalSubAlertsType, +} from '../eql/build_alert_group_from_sequence'; +import type { BuildReasonMessage } from './reason_formatters'; +import { getSuppressionTerms } from './suppression_utils'; +import { robustGet } from './source_fields_merging/utils/robust_field_access'; export const MAX_RULE_GAP_RATIO = 4; @@ -429,7 +453,7 @@ export const getRuleRangeTuples = async ({ interval: string; maxSignals: number; ruleExecutionLogger: IRuleExecutionLogForExecutors; - alerting: PluginSetupContract; + alerting: AlertingServerSetup; }) => { const originalFrom = dateMath.parse(from, { forceNow: startedAt }); const originalTo = dateMath.parse(to, { forceNow: startedAt }); @@ -1027,3 +1051,96 @@ export const getDisabledActionsWarningText = ({ return `${alertsGeneratedText} connector ${actionTypesJoined} is not enabled. To send notifications, you need a higher Security Analytics license / tier`; } }; + +export interface SharedParams { + spaceId: string; + completeRule: CompleteRule; + mergeStrategy: ConfigType['alertMergeStrategy']; + indicesToQuery: string[]; + alertTimestampOverride: Date | undefined; + ruleExecutionLogger: IRuleExecutionLogForExecutors; + publicBaseUrl: string | undefined; + primaryTimestamp: string; + secondaryTimestamp?: string; + intendedTimestamp: Date | undefined; +} + +export type RuleWithInMemorySuppression = + | ThreatRuleParams + | EqlRuleParams + | MachineLearningRuleParams; + +export interface SequenceSuppressionTermsAndFieldsParams { + shellAlert: WrappedFieldsLatest; + buildingBlockAlerts: Array>; + spaceId: string; + completeRule: CompleteRule; + indicesToQuery: string[]; + alertTimestampOverride: Date | undefined; + primaryTimestamp: string; + secondaryTimestamp?: string; +} + +export type SequenceSuppressionTermsAndFieldsFactory = ( + shellAlert: WrappedEqlShellOptionalSubAlertsType, + buildingBlockAlerts: Array>, + buildReasonMessage: BuildReasonMessage +) => WrappedFieldsLatest & { + subAlerts: Array>; +}; + +export const buildShellAlertSuppressionTermsAndFields = ({ + shellAlert, + buildingBlockAlerts, + spaceId, + completeRule, + alertTimestampOverride, + primaryTimestamp, + secondaryTimestamp, +}: SequenceSuppressionTermsAndFieldsParams): WrappedFieldsLatest< + EqlShellFieldsLatest & SuppressionFieldsLatest +> & { + subAlerts: Array>; +} => { + const suppressionTerms = getSuppressionTerms({ + alertSuppression: completeRule?.ruleParams?.alertSuppression, + input: shellAlert._source, + }); + const instanceId = objectHash([suppressionTerms, completeRule.alertId, spaceId]); + + const primarySuppressionTime = robustGet({ + key: primaryTimestamp, + document: shellAlert._source, + }) as string | undefined; + + const secondarySuppressionTime = + secondaryTimestamp && + (robustGet({ + key: secondaryTimestamp, + document: shellAlert._source, + }) as string | undefined); + + const suppressionTime = new Date( + primarySuppressionTime ?? + secondarySuppressionTime ?? + alertTimestampOverride ?? + shellAlert._source[TIMESTAMP] + ); + + const suppressionFields: ExtraFieldsForShellAlert = { + [ALERT_INSTANCE_ID]: instanceId, + [ALERT_SUPPRESSION_TERMS]: suppressionTerms, + [ALERT_SUPPRESSION_START]: suppressionTime, + [ALERT_SUPPRESSION_END]: suppressionTime, + [ALERT_SUPPRESSION_DOCS_COUNT]: 0, + }; + + merge(shellAlert._source, suppressionFields); + + return { + _id: shellAlert._id, + _index: shellAlert._index, + _source: shellAlert._source as EqlShellFieldsLatest & SuppressionFieldsLatest, + subAlerts: buildingBlockAlerts, + }; +}; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/wrap_suppressed_alerts.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/wrap_suppressed_alerts.ts index 2e40026c38e4a..6cb176ba70f77 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/wrap_suppressed_alerts.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/wrap_suppressed_alerts.ts @@ -9,28 +9,19 @@ import objectHash from 'object-hash'; import { TIMESTAMP } from '@kbn/rule-data-utils'; import type { SuppressionFieldsLatest } from '@kbn/rule-registry-plugin/common/schemas'; -import type { SignalSourceHit } from '../types'; +import type { SignalSourceHit } from '../types'; import type { BaseFieldsLatest, WrappedFieldsLatest, } from '../../../../../common/api/detection_engine/model/alerts'; -import type { ConfigType } from '../../../../config'; -import type { - CompleteRule, - EqlRuleParams, - MachineLearningRuleParams, - ThreatRuleParams, -} from '../../rule_schema'; -import type { IRuleExecutionLogForExecutors } from '../../rule_monitoring'; + import { transformHitToAlert } from '../factories/utils/transform_hit_to_alert'; import { getSuppressionAlertFields, getSuppressionTerms } from './suppression_utils'; +import type { SharedParams } from './utils'; import { generateId } from './utils'; - import type { BuildReasonMessage } from './reason_formatters'; -type RuleWithInMemorySuppression = ThreatRuleParams | EqlRuleParams | MachineLearningRuleParams; - /** * wraps suppressed alerts * creates instanceId hash, which is used to search on time interval alerts @@ -51,22 +42,12 @@ export const wrapSuppressedAlerts = ({ intendedTimestamp, }: { events: SignalSourceHit[]; - spaceId: string; - completeRule: CompleteRule; - mergeStrategy: ConfigType['alertMergeStrategy']; - indicesToQuery: string[]; buildReasonMessage: BuildReasonMessage; - alertTimestampOverride: Date | undefined; - ruleExecutionLogger: IRuleExecutionLogForExecutors; - publicBaseUrl: string | undefined; - primaryTimestamp: string; - secondaryTimestamp?: string; - intendedTimestamp: Date | undefined; -}): Array> => { +} & SharedParams): Array> => { return events.map((event) => { const suppressionTerms = getSuppressionTerms({ alertSuppression: completeRule?.ruleParams?.alertSuppression, - fields: event.fields, + input: event.fields, }); const id = generateId( diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/post_rule.sh b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/post_rule.sh index e8f5c627d3c88..b40c416943295 100755 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/post_rule.sh +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/post_rule.sh @@ -22,6 +22,7 @@ do { curl -s -k \ -H 'Content-Type: application/json' \ -H 'kbn-xsrf: 123' \ + -H 'elastic-api-version: 2023-10-31' \ -u ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD} \ -X POST ${KIBANA_URL}${SPACE_URL}/api/detection_engine/rules \ -d @${RULE} \ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/sequence_eql_query.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/sequence_eql_query.json new file mode 100644 index 0000000000000..8c5531188379b --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/sequence_eql_query.json @@ -0,0 +1,62 @@ +{ + "name": "EQL sequence duration", + "description": "Rule with an eql query", + "false_positives": ["https://www.example.com/some-article-about-a-false-positive"], + "rule_id": "rule-id-eql-1", + "enabled": true, + "index": ["auditbeat*", "packetbeat*"], + "interval": "30s", + "query": "sequence with maxspan=10m [any where agent.type == \"auditbeat\"] [any where event.category == \"network_traffic\"]", + "meta": { + "anything_you_want_ui_related_or_otherwise": { + "as_deep_structured_as_you_need": { + "any_data_type": {} + } + } + }, + "risk_score": 99, + "to": "now", + "from": "now-120s", + "severity": "high", + "type": "eql", + "language": "eql", + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1499", + "name": "endpoint denial of service", + "reference": "https://attack.mitre.org/techniques/T1499/" + } + ] + }, + { + "framework": "Some other Framework you want", + "tactic": { + "id": "some-other-id", + "name": "Some other name", + "reference": "https://example.com" + }, + "technique": [ + { + "id": "some-other-id", + "name": "some other technique name", + "reference": "https://example.com" + } + ] + } + ], + "references": ["http://www.example.com/some-article-about-attack"], + "alert_suppression": { + "group_by": ["agent.name"], + "duration": { "value": 5, "unit": "h" }, + "missing_fields_strategy": "suppress" + }, + "version": 1 +} diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/sequence_eql_query_no_duration.json b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/sequence_eql_query_no_duration.json new file mode 100644 index 0000000000000..a3df1cfe24938 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/scripts/rules/queries/sequence_eql_query_no_duration.json @@ -0,0 +1,61 @@ +{ + "name": "EQL sequence no duration", + "description": "Rule with an eql query", + "false_positives": ["https://www.example.com/some-article-about-a-false-positive"], + "rule_id": "rule-id-eql-2", + "enabled": true, + "index": ["auditbeat*", "packetbeat*"], + "interval": "30s", + "query": "sequence with maxspan=10m [any where agent.type == \"auditbeat\"] [any where event.category == \"network_traffic\"]", + "meta": { + "anything_you_want_ui_related_or_otherwise": { + "as_deep_structured_as_you_need": { + "any_data_type": {} + } + } + }, + "risk_score": 99, + "to": "now", + "from": "now-120s", + "severity": "high", + "type": "eql", + "language": "eql", + "threat": [ + { + "framework": "MITRE ATT&CK", + "tactic": { + "id": "TA0040", + "name": "impact", + "reference": "https://attack.mitre.org/tactics/TA0040/" + }, + "technique": [ + { + "id": "T1499", + "name": "endpoint denial of service", + "reference": "https://attack.mitre.org/techniques/T1499/" + } + ] + }, + { + "framework": "Some other Framework you want", + "tactic": { + "id": "some-other-id", + "name": "Some other name", + "reference": "https://example.com" + }, + "technique": [ + { + "id": "some-other-id", + "name": "some other technique name", + "reference": "https://example.com" + } + ] + } + ], + "references": ["http://www.example.com/some-article-about-attack"], + "alert_suppression": { + "group_by": ["agent.name"], + "missing_fields_strategy": "suppress" + }, + "version": 1 +} diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/entity_store/entity_store_data_client.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/entity_store/entity_store_data_client.ts index 72d650846fc55..dc4e9d7af2ff6 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/entity_store/entity_store_data_client.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/entity_store/entity_store_data_client.ts @@ -132,7 +132,7 @@ export class EntityStoreDataClient { this.esClient = clusterClient.asCurrentUser; this.entityClient = new EntityClient({ - esClient: this.esClient, + clusterClient, soClient, logger, }); diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/entity_store/saved_object/engine_descriptor.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/entity_store/saved_object/engine_descriptor.ts index cfaea1b1da0ff..a3c7a7d0266a1 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/entity_store/saved_object/engine_descriptor.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/entity_store/saved_object/engine_descriptor.ts @@ -49,6 +49,7 @@ export class EngineDescriptorClient { const old = engineDescriptor.saved_objects[0].attributes; const update = { ...old, + error: undefined, // if the engine is being re-initialized, clear any previous error status: ENGINE_STATUS.INSTALLING, filter, fieldHistoryLength, diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/get.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/get.ts index 0d880484877f6..b9645a3de374e 100644 --- a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/get.ts +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/get.ts @@ -9,6 +9,7 @@ import type { IKibanaResponse, Logger } from '@kbn/core/server'; import { buildRouteValidationWithZod } from '@kbn/zod-helpers'; import { GetRuleMigrationRequestParams, + GetRuleMigrationRequestQuery, type GetRuleMigrationResponse, } from '../../../../../common/siem_migrations/model/api/rules/rule_migration.gen'; import { SIEM_RULE_MIGRATION_PATH } from '../../../../../common/siem_migrations/constants'; @@ -29,18 +30,35 @@ export const registerSiemRuleMigrationsGetRoute = ( { version: '1', validate: { - request: { params: buildRouteValidationWithZod(GetRuleMigrationRequestParams) }, + request: { + params: buildRouteValidationWithZod(GetRuleMigrationRequestParams), + query: buildRouteValidationWithZod(GetRuleMigrationRequestQuery), + }, }, }, withLicense(async (context, req, res): Promise> => { - const migrationId = req.params.migration_id; + const { migration_id: migrationId } = req.params; + const { page, per_page: perPage, search_term: searchTerm } = req.query; try { const ctx = await context.resolve(['securitySolution']); const ruleMigrationsClient = ctx.securitySolution.getSiemRuleMigrationsClient(); - const migrationRules = await ruleMigrationsClient.data.rules.get({ migrationId }); + let from = 0; + if (page && perPage) { + from = page * perPage; + } + const size = perPage; - return res.ok({ body: migrationRules }); + const result = await ruleMigrationsClient.data.rules.get( + { + migrationId, + searchTerm, + }, + from, + size + ); + + return res.ok({ body: result }); } catch (err) { logger.error(err); return res.badRequest({ body: err.message }); diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/index.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/index.ts index 601b156aee040..c6f3c51a1bb53 100644 --- a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/index.ts +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/index.ts @@ -12,13 +12,14 @@ import { registerSiemRuleMigrationsUpdateRoute } from './update'; import { registerSiemRuleMigrationsGetRoute } from './get'; import { registerSiemRuleMigrationsStartRoute } from './start'; import { registerSiemRuleMigrationsStatsRoute } from './stats'; +import { registerSiemRuleMigrationsTranslationStatsRoute } from './translation_stats'; import { registerSiemRuleMigrationsStopRoute } from './stop'; import { registerSiemRuleMigrationsStatsAllRoute } from './stats_all'; import { registerSiemRuleMigrationsResourceUpsertRoute } from './resources/upsert'; import { registerSiemRuleMigrationsResourceGetRoute } from './resources/get'; import { registerSiemRuleMigrationsRetryRoute } from './retry'; -import { registerSiemRuleMigrationsInstallRoute } from './rules/install'; -import { registerSiemRuleMigrationsInstallTranslatedRoute } from './rules/install_translated'; +import { registerSiemRuleMigrationsInstallRoute } from './install'; +import { registerSiemRuleMigrationsInstallTranslatedRoute } from './install_translated'; export const registerSiemRuleMigrationsRoutes = ( router: SecuritySolutionPluginRouter, @@ -31,6 +32,7 @@ export const registerSiemRuleMigrationsRoutes = ( registerSiemRuleMigrationsStartRoute(router, logger); registerSiemRuleMigrationsRetryRoute(router, logger); registerSiemRuleMigrationsStatsRoute(router, logger); + registerSiemRuleMigrationsTranslationStatsRoute(router, logger); registerSiemRuleMigrationsStopRoute(router, logger); registerSiemRuleMigrationsInstallRoute(router, logger); registerSiemRuleMigrationsInstallTranslatedRoute(router, logger); diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/rules/install.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/install.ts similarity index 82% rename from x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/rules/install.ts rename to x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/install.ts index 659534891b289..7b41ea536aadf 100644 --- a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/rules/install.ts +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/install.ts @@ -7,15 +7,15 @@ import type { IKibanaResponse, Logger } from '@kbn/core/server'; import { buildRouteValidationWithZod } from '@kbn/zod-helpers'; -import { SIEM_RULE_MIGRATION_INSTALL_PATH } from '../../../../../../common/siem_migrations/constants'; -import type { InstallMigrationRulesResponse } from '../../../../../../common/siem_migrations/model/api/rules/rule_migration.gen'; +import { SIEM_RULE_MIGRATION_INSTALL_PATH } from '../../../../../common/siem_migrations/constants'; +import type { InstallMigrationRulesResponse } from '../../../../../common/siem_migrations/model/api/rules/rule_migration.gen'; import { InstallMigrationRulesRequestBody, InstallMigrationRulesRequestParams, -} from '../../../../../../common/siem_migrations/model/api/rules/rule_migration.gen'; -import type { SecuritySolutionPluginRouter } from '../../../../../types'; -import { withLicense } from '../util/with_license'; -import { installTranslated } from '../util/installation'; +} from '../../../../../common/siem_migrations/model/api/rules/rule_migration.gen'; +import type { SecuritySolutionPluginRouter } from '../../../../types'; +import { withLicense } from './util/with_license'; +import { installTranslated } from './util/installation'; export const registerSiemRuleMigrationsInstallRoute = ( router: SecuritySolutionPluginRouter, @@ -47,7 +47,7 @@ export const registerSiemRuleMigrationsInstallRoute = ( const securitySolutionContext = ctx.securitySolution; const savedObjectsClient = ctx.core.savedObjects.client; - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); await installTranslated({ migrationId, diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/rules/install_translated.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/install_translated.ts similarity index 81% rename from x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/rules/install_translated.ts rename to x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/install_translated.ts index ae4328e0ccf37..ac6a598c4b92f 100644 --- a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/rules/install_translated.ts +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/install_translated.ts @@ -7,12 +7,12 @@ import type { IKibanaResponse, Logger } from '@kbn/core/server'; import { buildRouteValidationWithZod } from '@kbn/zod-helpers'; -import { SIEM_RULE_MIGRATION_INSTALL_TRANSLATED_PATH } from '../../../../../../common/siem_migrations/constants'; -import type { InstallTranslatedMigrationRulesResponse } from '../../../../../../common/siem_migrations/model/api/rules/rule_migration.gen'; -import { InstallTranslatedMigrationRulesRequestParams } from '../../../../../../common/siem_migrations/model/api/rules/rule_migration.gen'; -import type { SecuritySolutionPluginRouter } from '../../../../../types'; -import { withLicense } from '../util/with_license'; -import { installTranslated } from '../util/installation'; +import { SIEM_RULE_MIGRATION_INSTALL_TRANSLATED_PATH } from '../../../../../common/siem_migrations/constants'; +import type { InstallTranslatedMigrationRulesResponse } from '../../../../../common/siem_migrations/model/api/rules/rule_migration.gen'; +import { InstallTranslatedMigrationRulesRequestParams } from '../../../../../common/siem_migrations/model/api/rules/rule_migration.gen'; +import type { SecuritySolutionPluginRouter } from '../../../../types'; +import { withLicense } from './util/with_license'; +import { installTranslated } from './util/installation'; export const registerSiemRuleMigrationsInstallTranslatedRoute = ( router: SecuritySolutionPluginRouter, @@ -46,7 +46,7 @@ export const registerSiemRuleMigrationsInstallTranslatedRoute = ( const securitySolutionContext = ctx.securitySolution; const savedObjectsClient = ctx.core.savedObjects.client; - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); await installTranslated({ migrationId, diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/retry.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/retry.ts index 4406afc4333e5..0fb96d9aaf72c 100644 --- a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/retry.ts +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/retry.ts @@ -50,7 +50,7 @@ export const registerSiemRuleMigrationsRetryRoute = ( const inferenceClient = ctx.securitySolution.getInferenceClient(); const actionsClient = ctx.actions.getActionsClient(); const soClient = ctx.core.savedObjects.client; - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); const invocationConfig = { callbacks: [ diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/start.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/start.ts index 73ba2fd3cce71..e9369c0e8d19d 100644 --- a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/start.ts +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/start.ts @@ -50,7 +50,7 @@ export const registerSiemRuleMigrationsStartRoute = ( const inferenceClient = ctx.securitySolution.getInferenceClient(); const actionsClient = ctx.actions.getActionsClient(); const soClient = ctx.core.savedObjects.client; - const rulesClient = ctx.alerting.getRulesClient(); + const rulesClient = await ctx.alerting.getRulesClient(); const invocationConfig = { callbacks: [ diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/translation_stats.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/translation_stats.ts new file mode 100644 index 0000000000000..4f9d12385e32d --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/translation_stats.ts @@ -0,0 +1,56 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { IKibanaResponse, Logger } from '@kbn/core/server'; +import { buildRouteValidationWithZod } from '@kbn/zod-helpers'; +import type { GetRuleMigrationTranslationStatsResponse } from '../../../../../common/siem_migrations/model/api/rules/rule_migration.gen'; +import { GetRuleMigrationTranslationStatsRequestParams } from '../../../../../common/siem_migrations/model/api/rules/rule_migration.gen'; +import { SIEM_RULE_MIGRATION_TRANSLATION_STATS_PATH } from '../../../../../common/siem_migrations/constants'; +import type { SecuritySolutionPluginRouter } from '../../../../types'; +import { withLicense } from './util/with_license'; + +export const registerSiemRuleMigrationsTranslationStatsRoute = ( + router: SecuritySolutionPluginRouter, + logger: Logger +) => { + router.versioned + .get({ + path: SIEM_RULE_MIGRATION_TRANSLATION_STATS_PATH, + access: 'internal', + security: { authz: { requiredPrivileges: ['securitySolution'] } }, + }) + .addVersion( + { + version: '1', + validate: { + request: { + params: buildRouteValidationWithZod(GetRuleMigrationTranslationStatsRequestParams), + }, + }, + }, + withLicense( + async ( + context, + req, + res + ): Promise> => { + const migrationId = req.params.migration_id; + try { + const ctx = await context.resolve(['securitySolution']); + const ruleMigrationsClient = ctx.securitySolution.getSiemRuleMigrationsClient(); + + const stats = await ruleMigrationsClient.data.rules.getTranslationStats(migrationId); + + return res.ok({ body: stats }); + } catch (err) { + logger.error(err); + return res.badRequest({ body: err.message }); + } + } + ) + ); +}; diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/util/installation.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/util/installation.ts index ee211e8a935de..df86a1f953656 100644 --- a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/util/installation.ts +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/util/installation.ts @@ -42,7 +42,7 @@ const installPrebuiltRules = async ( const rulesToUpdate: UpdateRuleMigrationInput[] = []; const assetsToInstall: PrebuiltRuleAsset[] = []; rulesToInstall.forEach((ruleToInstall) => { - // If prebuilt rule has already been install, then just update migration rule with the installed rule id + // If prebuilt rule has already been installed, then just update migration rule with the installed rule id const installedRule = currentRules.find( (rule) => rule.rule_id === ruleToInstall.elastic_rule?.prebuilt_rule_id ); @@ -177,7 +177,7 @@ export const installTranslated = async ({ const detectionRulesClient = securitySolutionContext.getDetectionRulesClient(); const ruleMigrationsClient = securitySolutionContext.getSiemRuleMigrationsClient(); - const rulesToInstall = await ruleMigrationsClient.data.rules.get({ + const { data: rulesToInstall } = await ruleMigrationsClient.data.rules.get({ migrationId, ids, installable: true, diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/data/rule_migrations_data_rules_client.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/data/rule_migrations_data_rules_client.ts index 0a82e2c311906..209f2e4416e16 100644 --- a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/data/rule_migrations_data_rules_client.ts +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/data/rule_migrations_data_rules_client.ts @@ -15,11 +15,15 @@ import type { QueryDslQueryContainer, } from '@elastic/elasticsearch/lib/api/types'; import type { StoredRuleMigration } from '../types'; -import { SiemMigrationStatus } from '../../../../../common/siem_migrations/constants'; +import { + SiemMigrationRuleTranslationResult, + SiemMigrationStatus, +} from '../../../../../common/siem_migrations/constants'; import type { ElasticRule, RuleMigration, RuleMigrationTaskStats, + RuleMigrationTranslationStats, } from '../../../../../common/siem_migrations/model/rule_migration.gen'; import { RuleMigrationsDataBaseClient } from './rule_migrations_data_base_client'; @@ -39,6 +43,7 @@ export interface RuleMigrationFilterOptions { status?: SiemMigrationStatus | SiemMigrationStatus[]; ids?: string[]; installable?: boolean; + searchTerm?: string; } /* BULK_MAX_SIZE defines the number to break down the bulk operations by. @@ -46,6 +51,20 @@ export interface RuleMigrationFilterOptions { */ const BULK_MAX_SIZE = 500 as const; +const getInstallableConditions = (): QueryDslQueryContainer[] => { + return [ + { term: { translation_result: SiemMigrationRuleTranslationResult.FULL } }, + { + nested: { + path: 'elastic_rule', + query: { + bool: { must_not: { exists: { field: 'elastic_rule.id' } } }, + }, + }, + }, + ]; +}; + export class RuleMigrationsDataRulesClient extends RuleMigrationsDataBaseClient { /** Indexes an array of rule migrations to be processed */ async create(ruleMigrations: CreateRuleMigrationInput[]): Promise { @@ -108,18 +127,24 @@ export class RuleMigrationsDataRulesClient extends RuleMigrationsDataBaseClient } /** Retrieves an array of rule documents of a specific migrations */ - async get(filters: RuleMigrationFilterOptions): Promise { + async get( + filters: RuleMigrationFilterOptions, + from?: number, + size?: number + ): Promise<{ total: number; data: StoredRuleMigration[] }> { const index = await this.getIndexName(); const query = this.getFilterQuery(filters); - const storedRuleMigrations = await this.esClient - .search({ index, query, sort: '_doc' }) - .then(this.processResponseHits.bind(this)) + const result = await this.esClient + .search({ index, query, sort: '_doc', from, size }) .catch((error) => { this.logger.error(`Error searching rule migrations: ${error.message}`); throw error; }); - return storedRuleMigrations; + return { + total: this.getTotalHits(result), + data: this.processResponseHits(result), + }; } /** @@ -217,6 +242,49 @@ export class RuleMigrationsDataRulesClient extends RuleMigrationsDataBaseClient }); } + /** Retrieves the translation stats for the rule migrations with the provided id */ + async getTranslationStats(migrationId: string): Promise { + const index = await this.getIndexName(); + const query = this.getFilterQuery({ migrationId }); + + const aggregations = { + prebuilt: { + filter: { + nested: { + path: 'elastic_rule', + query: { exists: { field: 'elastic_rule.prebuilt_rule_id' } }, + }, + }, + }, + installable: { + filter: { + bool: { + must: getInstallableConditions(), + }, + }, + }, + }; + const result = await this.esClient + .search({ index, query, aggregations, _source: false }) + .catch((error) => { + this.logger.error(`Error getting rule migrations stats: ${error.message}`); + throw error; + }); + + const bucket = result.aggregations ?? {}; + const total = this.getTotalHits(result); + const prebuilt = (bucket.prebuilt as AggregationsFilterAggregate)?.doc_count ?? 0; + return { + id: migrationId, + rules: { + total, + prebuilt, + custom: total - prebuilt, + installable: (bucket.installable as AggregationsFilterAggregate)?.doc_count ?? 0, + }, + }; + } + /** Retrieves the stats for the rule migrations with the provided id */ async getStats(migrationId: string): Promise { const index = await this.getIndexName(); @@ -295,6 +363,7 @@ export class RuleMigrationsDataRulesClient extends RuleMigrationsDataBaseClient status, ids, installable, + searchTerm, }: RuleMigrationFilterOptions): QueryDslQueryContainer { const filter: QueryDslQueryContainer[] = [{ term: { migration_id: migrationId } }]; if (status) { @@ -308,15 +377,15 @@ export class RuleMigrationsDataRulesClient extends RuleMigrationsDataBaseClient filter.push({ terms: { _id: ids } }); } if (installable) { - filter.push( - { term: { translation_result: 'full' } }, - { - nested: { - path: 'elastic_rule', - query: { bool: { must_not: { exists: { field: 'elastic_rule.id' } } } }, - }, - } - ); + filter.push(...getInstallableConditions()); + } + if (searchTerm?.length) { + filter.push({ + nested: { + path: 'elastic_rule', + query: { match: { 'elastic_rule.title': searchTerm } }, + }, + }); } return { bool: { filter } }; } diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/data/rule_migrations_field_maps.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/data/rule_migrations_field_maps.ts index 8e8a3c5ee0f27..09a4bef34c279 100644 --- a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/data/rule_migrations_field_maps.ts +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/data/rule_migrations_field_maps.ts @@ -19,17 +19,17 @@ export const ruleMigrationsFieldMap: FieldMap { if (state.elastic_rule?.prebuilt_rule_id) { return END; } - return 'translation'; + return 'translationSubGraph'; }; diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/graph.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/graph.ts index f986098e9deb0..32f41e54619be 100644 --- a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/graph.ts +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/graph.ts @@ -6,11 +6,18 @@ */ import { END, START, StateGraph } from '@langchain/langgraph'; +import { isEmpty } from 'lodash/fp'; +import { SiemMigrationRuleTranslationResult } from '../../../../../../../../common/siem_migrations/constants'; +import { getFixQueryErrorsNode } from './nodes/fix_query_errors'; import { getProcessQueryNode } from './nodes/process_query'; import { getRetrieveIntegrationsNode } from './nodes/retrieve_integrations'; import { getTranslateRuleNode } from './nodes/translate_rule'; +import { getValidationNode } from './nodes/validation'; import { translateRuleState } from './state'; -import type { TranslateRuleGraphParams } from './types'; +import type { TranslateRuleGraphParams, TranslateRuleState } from './types'; + +// How many times we will try to self-heal when validation fails, to prevent infinite graph recursions +const MAX_VALIDATION_ITERATIONS = 3; export function getTranslateRuleGraph({ model, @@ -35,19 +42,37 @@ export function getTranslateRuleGraph({ model, integrationRetriever, }); + const validationNode = getValidationNode({ logger }); + const fixQueryErrorsNode = getFixQueryErrorsNode({ inferenceClient, connectorId, logger }); const translateRuleGraph = new StateGraph(translateRuleState) // Nodes .addNode('processQuery', processQueryNode) .addNode('retrieveIntegrations', retrieveIntegrationsNode) .addNode('translateRule', translateRuleNode) + .addNode('validation', validationNode) + .addNode('fixQueryErrors', fixQueryErrorsNode) // Edges .addEdge(START, 'processQuery') .addEdge('processQuery', 'retrieveIntegrations') .addEdge('retrieveIntegrations', 'translateRule') - .addEdge('translateRule', END); + .addEdge('translateRule', 'validation') + .addEdge('fixQueryErrors', 'validation') + .addConditionalEdges('validation', validationRouter); const graph = translateRuleGraph.compile(); graph.name = 'Translate Rule Graph'; return graph; } + +const validationRouter = (state: TranslateRuleState) => { + if ( + state.validation_errors.iterations <= MAX_VALIDATION_ITERATIONS && + state.translation_result === SiemMigrationRuleTranslationResult.FULL + ) { + if (!isEmpty(state.validation_errors?.esql_errors)) { + return 'fixQueryErrors'; + } + } + return END; +}; diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/fix_query_errors/fix_query_errors.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/fix_query_errors/fix_query_errors.ts new file mode 100644 index 0000000000000..a21aceee70f95 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/fix_query_errors/fix_query_errors.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. + */ + +import type { Logger } from '@kbn/core/server'; +import type { InferenceClient } from '@kbn/inference-plugin/server'; +import { getEsqlKnowledgeBase } from '../../../../../util/esql_knowledge_base_caller'; +import type { GraphNode } from '../../types'; +import { RESOLVE_ESQL_ERRORS_TEMPLATE } from './prompts'; + +interface GetFixQueryErrorsNodeParams { + inferenceClient: InferenceClient; + connectorId: string; + logger: Logger; +} + +export const getFixQueryErrorsNode = ({ + inferenceClient, + connectorId, + logger, +}: GetFixQueryErrorsNodeParams): GraphNode => { + const esqlKnowledgeBaseCaller = getEsqlKnowledgeBase({ inferenceClient, connectorId, logger }); + return async (state) => { + const rule = state.elastic_rule; + const prompt = await RESOLVE_ESQL_ERRORS_TEMPLATE.format({ + esql_errors: state.validation_errors.esql_errors, + esql_query: rule.query, + }); + const response = await esqlKnowledgeBaseCaller(prompt); + + const esqlQuery = response.match(/```esql\n([\s\S]*?)\n```/)?.[1] ?? ''; + rule.query = esqlQuery; + return { elastic_rule: rule }; + }; +}; diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/fix_query_errors/index.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/fix_query_errors/index.ts new file mode 100644 index 0000000000000..a805331675389 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/fix_query_errors/index.ts @@ -0,0 +1,7 @@ +/* + * 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 { getFixQueryErrorsNode } from './fix_query_errors'; diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/fix_query_errors/prompts.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/fix_query_errors/prompts.ts new file mode 100644 index 0000000000000..ca5fe67097d12 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/fix_query_errors/prompts.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 { ChatPromptTemplate } from '@langchain/core/prompts'; + +export const RESOLVE_ESQL_ERRORS_TEMPLATE = + ChatPromptTemplate.fromTemplate(`You are a helpful cybersecurity (SIEM) expert agent. Your task is to resolve the errors in the Elasticsearch Query Language (ES|QL) query provided by the user. + +Below is the relevant errors related to the ES|SQL query: + + + +{esql_errors} + + +{esql_query} + + + + +- You will be provided with the currentl ES|QL query and its related errors. +- Try to resolve the errors in the ES|QL query as best as you can to make it work. +- You must respond only with the modified query inside a \`\`\`esql code block, nothing else similar to the example response below. + + + +A: Please find the modified ES|QL query below: +\`\`\`esql +FROM logs-endpoint.events.process-* +| WHERE process.executable LIKE \"%chown root%\" +| STATS count = COUNT(*), firstTime = MIN(@timestamp), lastTime = MAX(@timestamp) BY process.executable, + process.command_line, + host.name +| EVAL firstTime = TO_DATETIME(firstTime), lastTime = TO_DATETIME(lastTime) +\`\`\` + + +`); diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/process_query/process_query.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/process_query/process_query.ts index 97d4168f1283e..ae0e93ee0c4bb 100644 --- a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/process_query/process_query.ts +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/process_query/process_query.ts @@ -29,11 +29,15 @@ export const getProcessQueryNode = ({ const replaceQueryResourcePrompt = REPLACE_QUERY_RESOURCE_PROMPT.pipe(model).pipe(replaceQueryParser); const resourceContext = getResourcesContext(resources); - query = await replaceQueryResourcePrompt.invoke({ + const response = await replaceQueryResourcePrompt.invoke({ query: state.original_rule.query, macros: resourceContext.macros, lookup_tables: resourceContext.lists, }); + const splQuery = response.match(/```spl\n([\s\S]*?)\n```/)?.[1] ?? ''; + if (splQuery) { + query = splQuery; + } } return { inline_query: query }; }; diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/process_query/prompts.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/process_query/prompts.ts index f074da6b27d1a..b4c6b0e74aaa9 100644 --- a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/process_query/prompts.ts +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/process_query/prompts.ts @@ -140,8 +140,14 @@ Divide the query up into separate section and go through each section one at a t A: Please find the modified SPL query below: -\`\`\`json -{{"match": "Linux User Account Creation"}} +\`\`\`spl +sourcetype="linux:audit" \`linux_auditd_normalized_proctitle_process\` +| rename host as dest +| where LIKE (process_exec, "%chown root%") +| stats count min(_time) as firstTime max(_time) as lastTime by process_exec proctitle normalized_proctitle_delimiter dest +| convert timeformat="%Y-%m-%dT%H:%M:%S" ctime(firstTime) +| convert timeformat="%Y-%m-%dT%H:%M:%S" ctime(lastTime) +| search * \`\`\` diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/translate_rule/cim_ecs_map.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/translate_rule/cim_ecs_map.ts new file mode 100644 index 0000000000000..3bafaf2fc6518 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/translate_rule/cim_ecs_map.ts @@ -0,0 +1,181 @@ +/* + * 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 SIEM_RULE_MIGRATION_CIM_ECS_MAP = ` +datamodel,object,source_field,ecs_field,data_type +Application_State,All_Application_State,dest,service.node.name,string +Application_State,All_Application_State,process,process.title,string +Application_State,All_Application_State,user,user.name,string +Application_State,Ports,dest_port,destination.port,number +Application_State,Ports,transport,network.transport,string +Application_State,Ports,transport_dest_port,destination.port,string +Application_State,Services,service,service.name,string +Application_State,Services,service_id,service.id,string +Application_State,Services,status,service.state,string +Authentication,Authentication,action,event.action,string +Authentication,Authentication,app,process.name,string +Authentication,Authentication,dest,host.name,string +Authentication,Authentication,duration,event.duration,number +Authentication,Authentication,signature,event.code,string +Authentication,Authentication,signature_id,event.reason,string +Authentication,Authentication,src,source.address,string +Authentication,Authentication,src_nt_domain,source.domain,string +Authentication,Authentication,user,user.name,string +Certificates,All_Certificates,dest_port,destination.port,number +Certificates,All_Certificates,duration,event.duration,number +Certificates,All_Certificates,src,source.address,string +Certificates,All_Certificates,src_port,source.port,number +Certificates,All_Certificates,transport,network.protocol,string +Certificates,SSL,ssl_end_time,tls.server.not_after,time +Certificates,SSL,ssl_hash,tls.server.hash,string +Certificates,SSL,ssl_issuer_common_name,tls.server.issuer,string +Certificates,SSL,ssl_issuer_locality,x509.issuer.locality,string +Certificates,SSL,ssl_issuer_organization,x509.issuer.organization,string +Certificates,SSL,ssl_issuer_state,x509.issuer.state_or_province,string +Certificates,SSL,ssl_issuer_unit,x509.issuer.organizational_unit,string +Certificates,SSL,ssl_publickey_algorithm,x509.public_key_algorithm,string +Certificates,SSL,ssl_serial,x509.serial_number,string +Certificates,SSL,ssl_signature_algorithm,x509.signature_algorithm,string +Certificates,SSL,ssl_start_time,x509.not_before,time +Certificates,SSL,ssl_subject,x509.subject.distinguished_name,string +Certificates,SSL,ssl_subject_common_name,x509.subject.common_name,string +Certificates,SSL,ssl_subject_locality,x509.subject.locality,string +Certificates,SSL,ssl_subject_organization,x509.subject.organization,string +Certificates,SSL,ssl_subject_state,x509.subject.state_or_province,string +Certificates,SSL,ssl_subject_unit,x509.subject.organizational_unit,string +Certificates,SSL,ssl_version,tls.version,string +Change,All_Changes,action,event.action,string +Change,Account_Management,dest_nt_domain,destination.domain,string +Change,Account_Management,src_nt_domain,source.domain,string +Change,Account_Management,src_user,source.user,string +Intrusion_Detection,IDS_Attacks,action,event.action,string +Intrusion_Detection,IDS_Attacks,dest,destination.address,string +Intrusion_Detection,IDS_Attacks,dest_port,destination.port,number +Intrusion_Detection,IDS_Attacks,dvc,observer.hostname,string +Intrusion_Detection,IDS_Attacks,severity,event.severity,string +Intrusion_Detection,IDS_Attacks,src,source.ip,string +Intrusion_Detection,IDS_Attacks,user,source.user,string +JVM,OS,os,host.os.name,string +JVM,OS,os_architecture,host.architecture,string +JVM,OS,os_version,host.os.version,string +Malware,Malware_Attacks,action,event.action,string +Malware,Malware_Attacks,date,event.created,string +Malware,Malware_Attacks,dest,host.hostname,string +Malware,Malware_Attacks,file_hash,file.hash.*,string +Malware,Malware_Attacks,file_name,file.name,string +Malware,Malware_Attacks,file_path,file.path,string +Malware,Malware_Attacks,Sender,source.user.email,string +Malware,Malware_Attacks,src,source.ip,string +Malware,Malware_Attacks,user,related.user,string +Malware,Malware_Attacks,url,rule.reference,string +Network_Resolution,DNS,answer,dns.answers,string +Network_Resolution,DNS,dest,destination.address,string +Network_Resolution,DNS,dest_port,destination.port,number +Network_Resolution,DNS,duration,event.duration,number +Network_Resolution,DNS,message_type,dns.type,string +Network_Resolution,DNS,name,dns.question.name,string +Network_Resolution,DNS,query,dns.question.name,string +Network_Resolution,DNS,query_type,dns.op_code,string +Network_Resolution,DNS,record_type,dns.question.type,string +Network_Resolution,DNS,reply_code,dns.response_code,string +Network_Resolution,DNS,reply_code_id,dns.id,number +Network_Resolution,DNS,response_time,event.duration,number +Network_Resolution,DNS,src,source.address,string +Network_Resolution,DNS,src_port,source.port,number +Network_Resolution,DNS,transaction_id,dns.id,number +Network_Resolution,DNS,transport,network.transport,string +Network_Resolution,DNS,ttl,dns.answers.ttl,number +Network_Sessions,All_Sessions,action,event.action,string +Network_Sessions,All_Sessions,dest_ip,destination.ip,string +Network_Sessions,All_Sessions,dest_mac,destination.mac,string +Network_Sessions,All_Sessions,duration,event.duration,number +Network_Sessions,All_Sessions,src_dns,source.registered_domain,string +Network_Sessions,All_Sessions,src_ip,source.ip,string +Network_Sessions,All_Sessions,src_mac,source.mac,string +Network_Sessions,All_Sessions,user,user.name,string +Network_Traffic,All_Traffic,action,event.action,string +Network_Traffic,All_Traffic,app,network.protocol,string +Network_Traffic,All_Traffic,bytes,network.bytes,number +Network_Traffic,All_Traffic,dest,destination.ip,string +Network_Traffic,All_Traffic,dest_ip,destination.ip,string +Network_Traffic,All_Traffic,dest_mac,destination.mac,string +Network_Traffic,All_Traffic,dest_port,destination.port,number +Network_Traffic,All_Traffic,dest_translated_ip,destination.nat.ip,string +Network_Traffic,All_Traffic,dest_translated_port,destination.nat.port,number +Network_Traffic,All_Traffic,direction,network.direction,string +Network_Traffic,All_Traffic,duration,event.duration,number +Network_Traffic,All_Traffic,dvc,observer.name,string +Network_Traffic,All_Traffic,dvc_ip,observer.ip,string +Network_Traffic,All_Traffic,dvc_mac,observer.mac,string +Network_Traffic,All_Traffic,dvc_zone,observer.egress.zone,string +Network_Traffic,All_Traffic,packets,network.packets,number +Network_Traffic,All_Traffic,packets_in,source.packets,number +Network_Traffic,All_Traffic,packets_out,destination.packets,number +Network_Traffic,All_Traffic,protocol,network.protocol,string +Network_Traffic,All_Traffic,rule,rule.name,string +Network_Traffic,All_Traffic,src,source.address,string +Network_Traffic,All_Traffic,src_ip,source.ip,string +Network_Traffic,All_Traffic,src_mac,source.mac,string +Network_Traffic,All_Traffic,src_port,source.port,number +Network_Traffic,All_Traffic,src_translated_ip,source.nat.ip,string +Network_Traffic,All_Traffic,src_translated_port,source.nat.port,number +Network_Traffic,All_Traffic,transport,network.transport,string +Network_Traffic,All_Traffic,vlan,vlan.name,string +Vulnerabilities,Vulnerabilities,category,vulnerability.category,string +Vulnerabilities,Vulnerabilities,cve,vulnerability.id,string +Vulnerabilities,Vulnerabilities,cvss,vulnerability.score.base,number +Vulnerabilities,Vulnerabilities,dest,host.name,string +Vulnerabilities,Vulnerabilities,dvc,vulnerability.scanner.vendor,string +Vulnerabilities,Vulnerabilities,severity,vulnerability.severity,string +Vulnerabilities,Vulnerabilities,url,vulnerability.reference,string +Vulnerabilities,Vulnerabilities,user,related.user,string +Vulnerabilities,Vulnerabilities,vendor_product,vulnerability.scanner.vendor,string +Endpoint,Ports,creation_time,@timestamp,timestamp +Endpoint,Ports,dest_port,destination.port,number +Endpoint,Ports,process_id,process.pid,string +Endpoint,Ports,transport,network.transport,string +Endpoint,Ports,transport_dest_port,destination.port,string +Endpoint,Processes,action,event.action,string +Endpoint,Processes,os,os.full,string +Endpoint,Processes,parent_process_exec,process.parent.name,string +Endpoint,Processes,parent_process_id,process.ppid,number +Endpoint,Processes,parent_process_guid,process.parent.entity_id,string +Endpoint,Processes,parent_process_path,process.parent.executable,string +Endpoint,Processes,process_current_directory,process.parent.working_directory, +Endpoint,Processes,process_exec,process.name,string +Endpoint,Processes,process_hash,process.hash.*,string +Endpoint,Processes,process_guid,process.entity_id,string +Endpoint,Processes,process_id,process.pid,number +Endpoint,Processes,process_path,process.executable,string +Endpoint,Processes,user_id,related.user,string +Endpoint,Services,description,service.name,string +Endpoint,Services,process_id,service.id,string +Endpoint,Services,service_dll,dll.name,string +Endpoint,Services,service_dll_path,dll.path,string +Endpoint,Services,service_dll_hash,dll.hash.*,string +Endpoint,Services,service_dll_signature_exists,dll.code_signature.exists,boolean +Endpoint,Services,service_dll_signature_verified,dll.code_signature.valid,boolean +Endpoint,Services,service_exec,service.name,string +Endpoint,Services,service_hash,hash.*,string +Endpoint,Filesystem,file_access_time,file.accessed,timestamp +Endpoint,Filesystem,file_create_time,file.created,timestamp +Endpoint,Filesystem,file_modify_time,file.mtime,timestamp +Endpoint,Filesystem,process_id,process.pid,string +Endpoint,Registry,process_id,process.id,string +Web,Web,action,event.action,string +Web,Web,app,observer.product,string +Web,Web,bytes_in,http.request.bytes,number +Web,Web,bytes_out,http.response.bytes,number +Web,Web,dest,destination.ip,string +Web,Web,duration,event.duration,number +Web,Web,http_method,http.request.method,string +Web,Web,http_referrer,http.request.referrer,string +Web,Web,http_user_agent,user_agent.name,string +Web,Web,status,http.response.status_code,string +Web,Web,url,url.full,string +Web,Web,user,url.username,string +Web,Web,vendor_product,observer.product,string`; diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/translate_rule/prompts.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/translate_rule/prompts.ts index 3e77353bba8b1..9749dfd96efba 100644 --- a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/translate_rule/prompts.ts +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/translate_rule/prompts.ts @@ -5,14 +5,18 @@ * 2.0. */ -import type { TranslateRuleState } from '../../types'; +import { ChatPromptTemplate } from '@langchain/core/prompts'; -export const getEsqlTranslationPrompt = ( - state: TranslateRuleState, - indexPatterns: string -): string => { - return `You are a helpful cybersecurity (SIEM) expert agent. Your task is to migrate "detection rules" from Splunk to Elastic Security. +export const ESQL_TRANSLATION_PROMPT = + ChatPromptTemplate.fromTemplate(`You are a helpful cybersecurity (SIEM) expert agent. Your task is to migrate "detection rules" from Splunk to Elastic Security. Your goal is to translate the SPL query into an equivalent Elastic Security Query Language (ES|QL) query. +Below is the relevant context used when deciding which Elastic Common Schema field to use when translating from Splunk CIM fields: + + + +{field_mapping} + + ## Splunk rule Information provided: - Below you will find Splunk rule information: the title (<>), the description (<<DESCRIPTION>>), and the SPL (Search Processing Language) query (<<SPL_QUERY>>). @@ -22,7 +26,7 @@ Your goal is to translate the SPL query into an equivalent Elastic Security Quer ## Guidelines: - Analyze the SPL query and identify the key components. - Translate the SPL query into an equivalent ES|QL query using ECS (Elastic Common Schema) field names. -- Always start the generated ES|QL query by filtering FROM using these index patterns in the translated query: ${indexPatterns}. +- Always start the generated ES|QL query by filtering FROM using these index patterns in the translated query: {indexPatterns}. - If, in the SPL query, you find a lookup list or macro call, mention it in the summary and add a placeholder in the query with the format [macro:<macro_name>(argumentCount)] or [lookup:<lookup_name>] including the [] keys, - Examples: - \`get_duration(firstDate,secondDate)\` -> [macro:get_duration(2)] @@ -35,15 +39,14 @@ Your goal is to translate the SPL query into an equivalent Elastic Security Quer Find the Splunk rule information below: <<TITLE>> -${state.original_rule.title} +{title} <> <> -${state.original_rule.description} +{description} <> <> -${state.inline_query} +{inline_query} <> -`; -}; +`); diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/translate_rule/translate_rule.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/translate_rule/translate_rule.ts index a39e7c10146c0..6ba5edee11b22 100644 --- a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/translate_rule/translate_rule.ts +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/translate_rule/translate_rule.ts @@ -9,10 +9,11 @@ import type { Logger } from '@kbn/core/server'; import type { InferenceClient } from '@kbn/inference-plugin/server'; import { SiemMigrationRuleTranslationResult } from '../../../../../../../../../../common/siem_migrations/constants'; import type { ChatModel } from '../../../../../util/actions_client_chat'; +import { getEsqlKnowledgeBase } from '../../../../../util/esql_knowledge_base_caller'; import type { RuleResourceRetriever } from '../../../../../util/rule_resource_retriever'; import type { GraphNode } from '../../types'; -import { getEsqlKnowledgeBase } from './esql_knowledge_base_caller'; -import { getEsqlTranslationPrompt } from './prompts'; +import { SIEM_RULE_MIGRATION_CIM_ECS_MAP } from './cim_ecs_map'; +import { ESQL_TRANSLATION_PROMPT } from './prompts'; interface GetTranslateRuleNodeParams { model: ChatModel; @@ -29,12 +30,20 @@ export const getTranslateRuleNode = ({ }: GetTranslateRuleNodeParams): GraphNode => { const esqlKnowledgeBaseCaller = getEsqlKnowledgeBase({ inferenceClient, connectorId, logger }); return async (state) => { - const indexPatterns = state.integrations.flatMap((integration) => - integration.data_streams.map((dataStream) => dataStream.index_pattern) - ); + const indexPatterns = state.integrations + .flatMap((integration) => + integration.data_streams.map((dataStream) => dataStream.index_pattern) + ) + .join(','); const integrationIds = state.integrations.map((integration) => integration.id); - const prompt = getEsqlTranslationPrompt(state, indexPatterns.join(',')); + const prompt = await ESQL_TRANSLATION_PROMPT.format({ + title: state.original_rule.title, + description: state.original_rule.description, + field_mapping: SIEM_RULE_MIGRATION_CIM_ECS_MAP, + inline_query: state.inline_query, + indexPatterns, + }); const response = await esqlKnowledgeBaseCaller(prompt); const esqlQuery = response.match(/```esql\n([\s\S]*?)\n```/)?.[1] ?? ''; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/error_connecting/index.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/validation/index.ts similarity index 82% rename from x-pack/plugins/enterprise_search/public/applications/app_search/components/error_connecting/index.ts rename to x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/validation/index.ts index 59ac4e0e37efe..a8c0f55191e42 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/error_connecting/index.ts +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/validation/index.ts @@ -4,5 +4,4 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - -export { ErrorConnecting } from './error_connecting'; +export { getValidationNode } from './validation'; diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/validation/validation.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/validation/validation.ts new file mode 100644 index 0000000000000..6f97678a04558 --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/validation/validation.ts @@ -0,0 +1,43 @@ +/* + * 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 { Logger } from '@kbn/core/server'; +import { isEmpty } from 'lodash/fp'; +import { parseEsqlQuery } from '@kbn/securitysolution-utils'; +import type { GraphNode } from '../../types'; + +interface GetValidationNodeParams { + logger: Logger; +} + +/** + * This node runs all validation steps, and will redirect to the END of the graph if no errors are found. + * Any new validation steps should be added here. + */ +export const getValidationNode = ({ logger }: GetValidationNodeParams): GraphNode => { + return async (state) => { + const query = state.elastic_rule.query; + + // We want to prevent infinite loops, so we increment the iterations counter for each validation run. + const currentIteration = ++state.validation_errors.iterations; + let esqlErrors: string = ''; + if (!isEmpty(query)) { + const { errors, isEsqlQueryAggregating, hasMetadataOperator } = parseEsqlQuery(query); + if (!isEmpty(errors)) { + esqlErrors = JSON.stringify(errors); + } else if (!isEsqlQueryAggregating && !hasMetadataOperator) { + esqlErrors = + 'Queries that don’t use the STATS...BY function (non-aggregating queries) must include the "metadata _id, _version, _index" operator after the source command. For example: FROM logs* metadata _id, _version, _index.'; + } + } + if (esqlErrors) { + logger.debug(`ESQL query validation failed: ${esqlErrors}`); + } + + return { validation_errors: { iterations: currentIteration, esql_errors: esqlErrors } }; + }; +}; diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/state.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/state.ts index 8c8e9780aedf8..391d7a54f9ea8 100644 --- a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/state.ts +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/state.ts @@ -14,6 +14,7 @@ import type { RuleMigration, } from '../../../../../../../../common/siem_migrations/model/rule_migration.gen'; import type { Integration } from '../../../../types'; +import type { TranslateRuleValidationErrors } from './types'; export const translateRuleState = Annotation.Root({ messages: Annotation({ @@ -33,6 +34,10 @@ export const translateRuleState = Annotation.Root({ reducer: (state, action) => ({ ...state, ...action }), default: () => ({} as ElasticRule), }), + validation_errors: Annotation({ + reducer: (current, value) => value ?? current, + default: () => ({ iterations: 0 } as TranslateRuleValidationErrors), + }), translation_result: Annotation({ reducer: (current, value) => value ?? current, default: () => SiemMigrationRuleTranslationResult.UNTRANSLATABLE, diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/types.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/types.ts index 42bf8e14c5924..44a5750812be0 100644 --- a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/types.ts +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/types.ts @@ -23,3 +23,8 @@ export interface TranslateRuleGraphParams { integrationRetriever: IntegrationRetriever; logger: Logger; } + +export interface TranslateRuleValidationErrors { + iterations: number; + esql_errors?: string; +} diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/translate_rule/esql_knowledge_base_caller.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/util/esql_knowledge_base_caller.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/agent/sub_graphs/translate_rule/nodes/translate_rule/esql_knowledge_base_caller.ts rename to x-pack/plugins/security_solution/server/lib/siem_migrations/rules/task/util/esql_knowledge_base_caller.ts diff --git a/x-pack/plugins/security_solution/server/plugin.ts b/x-pack/plugins/security_solution/server/plugin.ts index 4b66d73c93b1f..e371e0fc3b7b5 100644 --- a/x-pack/plugins/security_solution/server/plugin.ts +++ b/x-pack/plugins/security_solution/server/plugin.ts @@ -396,7 +396,8 @@ export class Plugin implements ISecuritySolutionPlugin { securityRuleTypeOptions, previewRuleDataClient, this.telemetryReceiver, - this.pluginContext.env.packageInfo.buildFlavor === 'serverless' + this.pluginContext.env.packageInfo.buildFlavor === 'serverless', + this.endpointContext ); registerEndpointRoutes(router, this.endpointContext); diff --git a/x-pack/plugins/security_solution/server/plugin_contract.ts b/x-pack/plugins/security_solution/server/plugin_contract.ts index c178f0654d9bd..b1e7d0b613800 100644 --- a/x-pack/plugins/security_solution/server/plugin_contract.ts +++ b/x-pack/plugins/security_solution/server/plugin_contract.ts @@ -12,10 +12,7 @@ import type { } from '@kbn/data-plugin/server'; import type { PluginStart as DataViewsPluginStart } from '@kbn/data-views-plugin/server'; import type { UsageCollectionSetup as UsageCollectionPluginSetup } from '@kbn/usage-collection-plugin/server'; -import type { - PluginSetupContract as AlertingPluginSetup, - PluginStartContract as AlertingPluginStart, -} from '@kbn/alerting-plugin/server'; +import type { AlertingServerSetup, AlertingServerStart } from '@kbn/alerting-plugin/server'; import type { PluginSetupContract as ActionsPluginSetup, PluginStartContract as ActionsPluginStartContract, @@ -50,7 +47,7 @@ import type { ProductFeaturesService } from './lib/product_features_service/prod import type { ExperimentalFeatures } from '../common'; export interface SecuritySolutionPluginSetupDependencies { - alerting: AlertingPluginSetup; + alerting: AlertingServerSetup; actions: ActionsPluginSetup; cases: CasesServerSetup; cloud: CloudSetup; @@ -73,7 +70,7 @@ export interface SecuritySolutionPluginSetupDependencies { } export interface SecuritySolutionPluginStartDependencies { - alerting: AlertingPluginStart; + alerting: AlertingServerStart; cases?: CasesServerStart; cloud: CloudSetup; data: DataPluginStart; diff --git a/x-pack/plugins/security_solution/server/request_context_factory.ts b/x-pack/plugins/security_solution/server/request_context_factory.ts index eb1fed5826158..c2b3782d405d0 100644 --- a/x-pack/plugins/security_solution/server/request_context_factory.ts +++ b/x-pack/plugins/security_solution/server/request_context_factory.ts @@ -107,6 +107,8 @@ export class RequestContextFactory implements IRequestContextFactory { // time it is requested (see `getEndpointAuthz()` below) let endpointAuthz: Immutable; + const rulesClient = await startPlugins.alerting.getRulesClientWithRequest(request); + return { core: coreContext, @@ -146,16 +148,17 @@ export class RequestContextFactory implements IRequestContextFactory { }); return createDetectionRulesClient({ + rulesClient, actionsClient, - rulesClient: startPlugins.alerting.getRulesClientWithRequest(request), savedObjectsClient: coreContext.savedObjects.client, mlAuthz, + isRuleCustomizationEnabled: config.experimentalFeatures.prebuiltRulesCustomizationEnabled, }); }), getDetectionEngineHealthClient: memoize(() => ruleMonitoringService.createDetectionEngineHealthClient({ - rulesClient: startPlugins.alerting.getRulesClientWithRequest(request), + rulesClient, eventLogClient: startPlugins.eventLog.getClient(request), currentSpaceId: getSpaceId(), }) diff --git a/x-pack/plugins/security_solution/server/routes/index.ts b/x-pack/plugins/security_solution/server/routes/index.ts index ff1166413b9fc..140ef1c670f61 100644 --- a/x-pack/plugins/security_solution/server/routes/index.ts +++ b/x-pack/plugins/security_solution/server/routes/index.ts @@ -8,6 +8,7 @@ import type { StartServicesAccessor, Logger } from '@kbn/core/server'; import type { IRuleDataClient, RuleDataPluginService } from '@kbn/rule-registry-plugin/server'; +import type { EndpointAppContext } from '../endpoint/types'; import type { SecuritySolutionPluginRouter } from '../types'; import { registerFleetIntegrationsRoutes } from '../lib/detection_engine/fleet_integrations'; @@ -41,6 +42,7 @@ import type { ITelemetryReceiver } from '../lib/telemetry/receiver'; import { telemetryDetectionRulesPreviewRoute } from '../lib/detection_engine/routes/telemetry/telemetry_detection_rules_preview_route'; import { readAlertsIndexExistsRoute } from '../lib/detection_engine/routes/index/read_alerts_index_exists_route'; import { registerResolverRoutes } from '../endpoint/routes/resolver'; +import { registerWorkflowInsightsRoutes } from '../endpoint/routes/workflow_insights'; import { createEsIndexRoute, createPrebuiltSavedObjectsRoute, @@ -78,7 +80,8 @@ export const initRoutes = ( securityRuleTypeOptions: CreateSecurityRuleTypeWrapperProps, previewRuleDataClient: IRuleDataClient, previewTelemetryReceiver: ITelemetryReceiver, - isServerless: boolean + isServerless: boolean, + endpointContext: EndpointAppContext ) => { registerFleetIntegrationsRoutes(router); registerLegacyRuleActionsRoutes(router, logger); @@ -154,4 +157,6 @@ export const initRoutes = ( // Security Integrations getFleetManagedIndexTemplatesRoute(router); + + registerWorkflowInsightsRoutes(router, config, endpointContext); }; diff --git a/x-pack/plugins/security_solution/tsconfig.json b/x-pack/plugins/security_solution/tsconfig.json index 4ed7e1cbdd35f..7767fffe69824 100644 --- a/x-pack/plugins/security_solution/tsconfig.json +++ b/x-pack/plugins/security_solution/tsconfig.json @@ -209,8 +209,6 @@ "@kbn/core-theme-browser", "@kbn/integration-assistant-plugin", "@kbn/avc-banner", - "@kbn/esql-ast", - "@kbn/esql-validation-autocomplete", "@kbn/config", "@kbn/openapi-common", "@kbn/securitysolution-lists-common", @@ -235,6 +233,7 @@ "@kbn/discover-shared-plugin", "@kbn/react-hooks", "@kbn/index-adapter", - "@kbn/core-http-server-utils" + "@kbn/core-http-server-utils", + "@kbn/llm-tasks-plugin" ] } diff --git a/x-pack/plugins/serverless_search/common/i18n_string.ts b/x-pack/plugins/serverless_search/common/i18n_string.ts index 32ec0cf8eb957..d77998bc8cc53 100644 --- a/x-pack/plugins/serverless_search/common/i18n_string.ts +++ b/x-pack/plugins/serverless_search/common/i18n_string.ts @@ -68,7 +68,7 @@ export const CONNECTOR_LABEL: string = i18n.translate('xpack.serverlessSearch.co export const WEB_CRAWLERS_LABEL: string = i18n.translate( 'xpack.serverlessSearch.webCrawlersLabel', { - defaultMessage: 'Web crawlers', + defaultMessage: 'Web Crawlers', } ); diff --git a/x-pack/plugins/serverless_search/public/application/components/web_crawlers/empty_web_crawlers_prompt.tsx b/x-pack/plugins/serverless_search/public/application/components/web_crawlers/empty_web_crawlers_prompt.tsx index 8170ed6da3134..20c05f86747a8 100644 --- a/x-pack/plugins/serverless_search/public/application/components/web_crawlers/empty_web_crawlers_prompt.tsx +++ b/x-pack/plugins/serverless_search/public/application/components/web_crawlers/empty_web_crawlers_prompt.tsx @@ -230,6 +230,7 @@ export const EmptyWebCrawlersPrompt: React.FC = () => { fill iconType={githubIcon} href={'https://github.com/elastic/crawler'} + target="_blank" > {i18n.translate('xpack.serverlessSearch.webCrawlersEmpty.selfManagedButton', { defaultMessage: 'Self-managed web crawler', diff --git a/x-pack/plugins/serverless_search/public/application/components/web_crawlers_elastic_managed.tsx b/x-pack/plugins/serverless_search/public/application/components/web_crawlers_elastic_managed.tsx index 8ac5a0c59dd14..0cf3445f0a5b8 100644 --- a/x-pack/plugins/serverless_search/public/application/components/web_crawlers_elastic_managed.tsx +++ b/x-pack/plugins/serverless_search/public/application/components/web_crawlers_elastic_managed.tsx @@ -27,7 +27,7 @@ export const WebCrawlersElasticManaged = () => { { { return { @@ -54,7 +54,6 @@ const getResponse = async () => { describe('alert_status_route.ts', () => { beforeEach(() => { jest.resetAllMocks(); - resetAlertingAuthMock(); }); describe('searchAlertByUuid(client, alertUuid)', () => { diff --git a/x-pack/plugins/session_view/server/routes/alert_status_route.ts b/x-pack/plugins/session_view/server/routes/alert_status_route.ts index 64192198b5e46..0a1976456ef1c 100644 --- a/x-pack/plugins/session_view/server/routes/alert_status_route.ts +++ b/x-pack/plugins/session_view/server/routes/alert_status_route.ts @@ -11,6 +11,7 @@ import type { AlertsClient, RuleRegistryPluginStartContract, } from '@kbn/rule-registry-plugin/server'; +import { SECURITY_SOLUTION_RULE_TYPE_IDS } from '@kbn/securitysolution-rules'; import { ALERT_STATUS_ROUTE, ALERT_UUID_PROPERTY, @@ -65,9 +66,9 @@ export const registerAlertStatusRoute = ( }; export const searchAlertByUuid = async (client: AlertsClient, alertUuid: string) => { - const indices = (await client.getAuthorizedAlertsIndices(['siem']))?.filter( - (index) => index !== PREVIEW_ALERTS_INDEX - ); + const indices = ( + await client.getAuthorizedAlertsIndices(SECURITY_SOLUTION_RULE_TYPE_IDS) + )?.filter((index) => index !== PREVIEW_ALERTS_INDEX); if (!indices) { return { events: [] }; diff --git a/x-pack/plugins/session_view/server/routes/alerts_client_mock.test.ts b/x-pack/plugins/session_view/server/routes/alerts_client_mock.test.ts index ff76314776025..dcc1f06b0f2eb 100644 --- a/x-pack/plugins/session_view/server/routes/alerts_client_mock.test.ts +++ b/x-pack/plugins/session_view/server/routes/alerts_client_mock.test.ts @@ -13,7 +13,6 @@ import { elasticsearchServiceMock } from '@kbn/core/server/mocks'; import { loggingSystemMock } from '@kbn/core/server/mocks'; import { alertingAuthorizationMock } from '@kbn/alerting-plugin/server/authorization/alerting_authorization.mock'; import { auditLoggerMock } from '@kbn/security-plugin/server/audit/mocks'; -import { AlertingAuthorizationEntity } from '@kbn/alerting-plugin/server'; import { ruleDataServiceMock } from '@kbn/rule-registry-plugin/server/rule_data_plugin_service/rule_data_plugin_service.mock'; import type { ElasticsearchClient } from '@kbn/core/server'; import { @@ -24,11 +23,6 @@ import { } from '@kbn/rule-data-utils'; import { mockAlerts } from '../../common/mocks/constants/session_view_process.mock'; -export const alertingAuthMock = alertingAuthorizationMock.create(); -const auditLogger = auditLoggerMock.create(); - -const DEFAULT_SPACE = 'test_default_space_id'; - const getResponse = async () => { return { hits: { @@ -56,73 +50,62 @@ const getResponse = async () => { }; }; -const esClientMock = elasticsearchServiceMock.createElasticsearchClient(getResponse()); -const getAlertIndicesAliasMock = jest.fn(); -const alertsClientParams: jest.Mocked = { - logger: loggingSystemMock.create().get(), - authorization: alertingAuthMock, - auditLogger, - ruleDataService: ruleDataServiceMock.create(), - esClient: esClientMock, - getRuleType: jest.fn(), - getRuleList: jest.fn(), - getAlertIndicesAlias: getAlertIndicesAliasMock, -}; - -export function getAlertsClientMockInstance(esClient?: ElasticsearchClient) { - esClient = esClient || elasticsearchServiceMock.createElasticsearchClient(getResponse()); - - const alertsClient = new AlertsClient({ ...alertsClientParams, esClient }); - - return alertsClient; -} +const createAlertsClientParams = () => { + const getAlertIndicesAliasMock = jest.fn(); + const alertingAuthMock = alertingAuthorizationMock.create(); -export function resetAlertingAuthMock() { - alertingAuthMock.getSpaceId.mockImplementation(() => DEFAULT_SPACE); - // @ts-expect-error - alertingAuthMock.getAuthorizationFilter.mockImplementation(async () => - Promise.resolve({ filter: [] }) - ); - // @ts-expect-error - alertingAuthMock.getAugmentedRuleTypesWithAuthorization.mockImplementation(async () => { - const authorizedRuleTypes = new Set(); - authorizedRuleTypes.add({ producer: 'apm' }); - return Promise.resolve({ authorizedRuleTypes }); - }); - // @ts-expect-error - alertingAuthMock.getAuthorizedRuleTypes.mockImplementation(async () => { - const authorizedRuleTypes = [ + const authorizedRuleTypes = new Map([ + [ + 'apm.error_rate', { producer: 'apm', id: 'apm.error_rate', alerts: { context: 'observability.apm', }, + authorizedConsumers: {}, }, - ]; - return Promise.resolve(authorizedRuleTypes); + ], + ]); + + alertingAuthMock.getSpaceId.mockImplementation(() => 'test_default_space_id'); + alertingAuthMock.getAllAuthorizedRuleTypes.mockResolvedValue({ + hasAllRequested: true, + authorizedRuleTypes, }); + + alertingAuthMock.getAllAuthorizedRuleTypesFindOperation.mockResolvedValue(authorizedRuleTypes); getAlertIndicesAliasMock.mockReturnValue(['.alerts-observability.apm-default']); - alertingAuthMock.ensureAuthorized.mockImplementation( - // @ts-expect-error - async ({ - ruleTypeId, - consumer, - operation, - entity, - }: { - ruleTypeId: string; - consumer: string; - operation: string; - entity: typeof AlertingAuthorizationEntity.Alert; - }) => { - if (ruleTypeId === 'apm.error_rate' && consumer === 'apm') { - return Promise.resolve(); - } - return Promise.reject(new Error(`Unauthorized for ${ruleTypeId} and ${consumer}`)); + alertingAuthMock.ensureAuthorized.mockImplementation(async ({ ruleTypeId, consumer }) => { + if (ruleTypeId === 'apm.error_rate' && consumer === 'apm') { + return Promise.resolve(); } - ); + return Promise.reject(new Error(`Unauthorized for ${ruleTypeId} and ${consumer}`)); + }); + + const auditLogger = auditLoggerMock.create(); + const esClientMock = elasticsearchServiceMock.createElasticsearchClient(getResponse()); + const alertsClientParams: jest.Mocked = { + logger: loggingSystemMock.create().get(), + authorization: alertingAuthMock, + auditLogger, + ruleDataService: ruleDataServiceMock.create(), + esClient: esClientMock, + getRuleType: jest.fn(), + getRuleList: jest.fn(), + getAlertIndicesAlias: getAlertIndicesAliasMock, + }; + + return alertsClientParams; +}; + +export function getAlertsClientMockInstance(esClient?: ElasticsearchClient) { + esClient = esClient || elasticsearchServiceMock.createElasticsearchClient(getResponse()); + + const alertsClient = new AlertsClient({ ...createAlertsClientParams(), esClient }); + + return alertsClient; } // this is only here because the above imports complain if they aren't declared as part of a test file. diff --git a/x-pack/plugins/session_view/server/routes/alerts_route.test.ts b/x-pack/plugins/session_view/server/routes/alerts_route.test.ts index 12300b8946a78..b8ba3f5d45a02 100644 --- a/x-pack/plugins/session_view/server/routes/alerts_route.test.ts +++ b/x-pack/plugins/session_view/server/routes/alerts_route.test.ts @@ -7,7 +7,7 @@ import { elasticsearchServiceMock } from '@kbn/core/server/mocks'; import { searchAlerts } from './alerts_route'; import { mockAlerts } from '../../common/mocks/constants/session_view_process.mock'; -import { getAlertsClientMockInstance, resetAlertingAuthMock } from './alerts_client_mock.test'; +import { getAlertsClientMockInstance } from './alerts_client_mock.test'; const getEmptyResponse = async () => { return { @@ -20,9 +20,7 @@ const getEmptyResponse = async () => { describe('alerts_route.ts', () => { beforeEach(() => { - jest.resetAllMocks(); - - resetAlertingAuthMock(); + jest.clearAllMocks(); }); describe('searchAlerts(client, sessionEntityId)', () => { diff --git a/x-pack/plugins/session_view/server/routes/alerts_route.ts b/x-pack/plugins/session_view/server/routes/alerts_route.ts index c875236989efe..c4aa913334305 100644 --- a/x-pack/plugins/session_view/server/routes/alerts_route.ts +++ b/x-pack/plugins/session_view/server/routes/alerts_route.ts @@ -11,6 +11,7 @@ import type { AlertsClient, RuleRegistryPluginStartContract, } from '@kbn/rule-registry-plugin/server'; +import { SECURITY_SOLUTION_RULE_TYPE_IDS } from '@kbn/securitysolution-rules'; import { ALERTS_ROUTE, ALERTS_PER_PAGE, @@ -88,9 +89,9 @@ export const searchAlerts = async ( range?: string[], cursor?: string ) => { - const indices = (await client.getAuthorizedAlertsIndices(['siem']))?.filter( - (index) => index !== PREVIEW_ALERTS_INDEX - ); + const indices = ( + await client.getAuthorizedAlertsIndices(SECURITY_SOLUTION_RULE_TYPE_IDS) + )?.filter((index) => index !== PREVIEW_ALERTS_INDEX); if (!indices) { return { events: [] }; diff --git a/x-pack/plugins/session_view/server/routes/process_events_route.test.ts b/x-pack/plugins/session_view/server/routes/process_events_route.test.ts index 034cab178af2f..aaba035c7496b 100644 --- a/x-pack/plugins/session_view/server/routes/process_events_route.test.ts +++ b/x-pack/plugins/session_view/server/routes/process_events_route.test.ts @@ -12,7 +12,7 @@ import { mockEvents, mockAlerts, } from '../../common/mocks/constants/session_view_process.mock'; -import { getAlertsClientMockInstance, resetAlertingAuthMock } from './alerts_client_mock.test'; +import { getAlertsClientMockInstance } from './alerts_client_mock.test'; import type { ProcessEvent } from '../../common'; const getEmptyResponse = async () => { @@ -38,8 +38,6 @@ const getResponse = async () => { describe('process_events_route.ts', () => { beforeEach(() => { jest.resetAllMocks(); - - resetAlertingAuthMock(); }); describe('fetchEventsAndScopedAlerts(client, entityId, cursor, forward)', () => { diff --git a/x-pack/plugins/session_view/tsconfig.json b/x-pack/plugins/session_view/tsconfig.json index 20a1f5234d9ff..412de8355943c 100644 --- a/x-pack/plugins/session_view/tsconfig.json +++ b/x-pack/plugins/session_view/tsconfig.json @@ -38,6 +38,7 @@ "@kbn/shared-ux-router", "@kbn/usage-collection-plugin", "@kbn/analytics", + "@kbn/securitysolution-rules", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/stack_alerts/server/feature.test.ts b/x-pack/plugins/stack_alerts/server/feature.test.ts index 769fad5172d65..deb1a317eed51 100644 --- a/x-pack/plugins/stack_alerts/server/feature.test.ts +++ b/x-pack/plugins/stack_alerts/server/feature.test.ts @@ -27,36 +27,145 @@ describe('Stack Alerts Feature Privileges', () => { const featuresSetup = featuresPluginMock.createSetup(); plugin.setup(coreSetup, { alerting: alertingSetup, features: featuresSetup }); - expect(BUILT_IN_ALERTS_FEATURE.alerting).toMatchInlineSnapshot(` + const ruleTypeAlerting = BUILT_IN_ALERTS_FEATURE.alerting ?? []; + const ruleTypeAll = BUILT_IN_ALERTS_FEATURE.privileges?.all?.alerting?.rule?.all ?? []; + const ruleTypeRead = BUILT_IN_ALERTS_FEATURE.privileges?.read?.alerting?.rule?.read ?? []; + + expect(ruleTypeAlerting).toMatchInlineSnapshot(` Array [ - ".index-threshold", - ".geo-containment", - ".es-query", - "transform_health", - "observability.rules.custom_threshold", - "xpack.ml.anomaly_detection_alert", + Object { + "consumers": Array [ + "stackAlerts", + "alerts", + ], + "ruleTypeId": ".index-threshold", + }, + Object { + "consumers": Array [ + "stackAlerts", + "alerts", + ], + "ruleTypeId": ".geo-containment", + }, + Object { + "consumers": Array [ + "stackAlerts", + "alerts", + ], + "ruleTypeId": "transform_health", + }, + Object { + "consumers": Array [ + "stackAlerts", + "alerts", + "discover", + ], + "ruleTypeId": ".es-query", + }, + Object { + "consumers": Array [ + "stackAlerts", + ], + "ruleTypeId": "xpack.ml.anomaly_detection_alert", + }, + Object { + "consumers": Array [ + "stackAlerts", + ], + "ruleTypeId": "observability.rules.custom_threshold", + }, ] `); - expect(BUILT_IN_ALERTS_FEATURE.privileges?.all?.alerting?.rule?.all).toMatchInlineSnapshot(` + expect(ruleTypeAll).toMatchInlineSnapshot(` Array [ - ".index-threshold", - ".geo-containment", - ".es-query", - "transform_health", - "observability.rules.custom_threshold", - "xpack.ml.anomaly_detection_alert", + Object { + "consumers": Array [ + "stackAlerts", + "alerts", + ], + "ruleTypeId": ".index-threshold", + }, + Object { + "consumers": Array [ + "stackAlerts", + "alerts", + ], + "ruleTypeId": ".geo-containment", + }, + Object { + "consumers": Array [ + "stackAlerts", + "alerts", + ], + "ruleTypeId": "transform_health", + }, + Object { + "consumers": Array [ + "stackAlerts", + "alerts", + "discover", + ], + "ruleTypeId": ".es-query", + }, + Object { + "consumers": Array [ + "stackAlerts", + ], + "ruleTypeId": "xpack.ml.anomaly_detection_alert", + }, + Object { + "consumers": Array [ + "stackAlerts", + ], + "ruleTypeId": "observability.rules.custom_threshold", + }, ] `); - expect(BUILT_IN_ALERTS_FEATURE.privileges?.read?.alerting?.rule?.read).toMatchInlineSnapshot(` + expect(ruleTypeRead).toMatchInlineSnapshot(` Array [ - ".index-threshold", - ".geo-containment", - ".es-query", - "transform_health", - "observability.rules.custom_threshold", - "xpack.ml.anomaly_detection_alert", + Object { + "consumers": Array [ + "stackAlerts", + "alerts", + ], + "ruleTypeId": ".index-threshold", + }, + Object { + "consumers": Array [ + "stackAlerts", + "alerts", + ], + "ruleTypeId": ".geo-containment", + }, + Object { + "consumers": Array [ + "stackAlerts", + "alerts", + ], + "ruleTypeId": "transform_health", + }, + Object { + "consumers": Array [ + "stackAlerts", + "alerts", + "discover", + ], + "ruleTypeId": ".es-query", + }, + Object { + "consumers": Array [ + "stackAlerts", + ], + "ruleTypeId": "xpack.ml.anomaly_detection_alert", + }, + Object { + "consumers": Array [ + "stackAlerts", + ], + "ruleTypeId": "observability.rules.custom_threshold", + }, ] `); }); diff --git a/x-pack/plugins/stack_alerts/server/feature.ts b/x-pack/plugins/stack_alerts/server/feature.ts index fcb7aba3947a3..fa98c155b6ba8 100644 --- a/x-pack/plugins/stack_alerts/server/feature.ts +++ b/x-pack/plugins/stack_alerts/server/feature.ts @@ -15,11 +15,59 @@ import { STACK_ALERTS_FEATURE_ID, } from '@kbn/rule-data-utils'; import { ES_QUERY_ID as ElasticsearchQuery } from '@kbn/rule-data-utils'; +import { ALERTING_FEATURE_ID } from '@kbn/alerting-plugin/common'; import { KibanaFeatureScope } from '@kbn/features-plugin/common'; import { ID as IndexThreshold } from './rule_types/index_threshold/rule_type'; import { GEO_CONTAINMENT_ID as GeoContainment } from './rule_types/geo_containment'; const TransformHealth = TRANSFORM_RULE_TYPE.TRANSFORM_HEALTH; +const DISCOVER_CONSUMER = 'discover'; + +const basicAlertingFeatures = [IndexThreshold, GeoContainment, TransformHealth].map( + (ruleTypeId) => ({ + ruleTypeId, + consumers: [STACK_ALERTS_FEATURE_ID, ALERTING_FEATURE_ID], + }) +); + +/** + * We need to add the discover consumer + * to support legacy ES rules that were + * created with the discover consumer. + * + * Issue: https://github.com/elastic/kibana/issues/184595 + */ +const esQueryAlertingFeature = { + ruleTypeId: ElasticsearchQuery, + consumers: [STACK_ALERTS_FEATURE_ID, ALERTING_FEATURE_ID, DISCOVER_CONSUMER], +}; + +/** + * Only the stackAlerts consumer is valid + * for the stackAlerts feature ID for the + * xpack.ml.anomaly_detection_alert rule type. + */ +const mlAnomalyDetectionAlertingFeature = { + ruleTypeId: ML_ANOMALY_DETECTION_RULE_TYPE_ID, + consumers: [STACK_ALERTS_FEATURE_ID], +}; + +/** + * Only the stackAlerts consumer is valid + * for the stackAlerts feature ID for the + * observability.rules.custom_threshold rule type. + */ +const observabilityThresholdAlertingFeature = { + ruleTypeId: OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, + consumers: [STACK_ALERTS_FEATURE_ID], +}; + +const alertingFeatures = [ + ...basicAlertingFeatures, + esQueryAlertingFeature, + mlAnomalyDetectionAlertingFeature, + observabilityThresholdAlertingFeature, +]; export const BUILT_IN_ALERTS_FEATURE: KibanaFeatureConfig = { id: STACK_ALERTS_FEATURE_ID, @@ -32,14 +80,7 @@ export const BUILT_IN_ALERTS_FEATURE: KibanaFeatureConfig = { management: { insightsAndAlerting: ['triggersActions'], }, - alerting: [ - IndexThreshold, - GeoContainment, - ElasticsearchQuery, - TransformHealth, - OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, - ML_ANOMALY_DETECTION_RULE_TYPE_ID, - ], + alerting: alertingFeatures, privileges: { all: { app: [], @@ -49,24 +90,10 @@ export const BUILT_IN_ALERTS_FEATURE: KibanaFeatureConfig = { }, alerting: { rule: { - all: [ - IndexThreshold, - GeoContainment, - ElasticsearchQuery, - TransformHealth, - OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, - ML_ANOMALY_DETECTION_RULE_TYPE_ID, - ], + all: alertingFeatures, }, alert: { - all: [ - IndexThreshold, - GeoContainment, - ElasticsearchQuery, - TransformHealth, - OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, - ML_ANOMALY_DETECTION_RULE_TYPE_ID, - ], + all: alertingFeatures, }, }, savedObject: { @@ -84,24 +111,10 @@ export const BUILT_IN_ALERTS_FEATURE: KibanaFeatureConfig = { }, alerting: { rule: { - read: [ - IndexThreshold, - GeoContainment, - ElasticsearchQuery, - TransformHealth, - OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, - ML_ANOMALY_DETECTION_RULE_TYPE_ID, - ], + read: alertingFeatures, }, alert: { - read: [ - IndexThreshold, - GeoContainment, - ElasticsearchQuery, - TransformHealth, - OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, - ML_ANOMALY_DETECTION_RULE_TYPE_ID, - ], + read: alertingFeatures, }, }, savedObject: { diff --git a/x-pack/plugins/stack_alerts/server/rule_types/types.ts b/x-pack/plugins/stack_alerts/server/rule_types/types.ts index e06553233e774..876a3c472e3ad 100644 --- a/x-pack/plugins/stack_alerts/server/rule_types/types.ts +++ b/x-pack/plugins/stack_alerts/server/rule_types/types.ts @@ -7,12 +7,12 @@ import { StackAlert } from '@kbn/alerts-as-data-utils'; import { CoreSetup, Logger } from '@kbn/core/server'; -import { AlertingSetup, StackAlertsStartDeps } from '../types'; +import { AlertingServerSetup, StackAlertsStartDeps } from '../types'; export interface RegisterRuleTypesParams { logger: Logger; data: Promise; - alerting: AlertingSetup; + alerting: AlertingServerSetup; core: CoreSetup; } diff --git a/x-pack/plugins/stack_alerts/server/types.ts b/x-pack/plugins/stack_alerts/server/types.ts index ce148fb8c0434..1f4d2d2914867 100644 --- a/x-pack/plugins/stack_alerts/server/types.ts +++ b/x-pack/plugins/stack_alerts/server/types.ts @@ -6,20 +6,19 @@ */ import { PluginStartContract as TriggersActionsUiStartContract } from '@kbn/triggers-actions-ui-plugin/server'; -import { PluginSetupContract as AlertingSetup } from '@kbn/alerting-plugin/server'; - export type { - PluginSetupContract as AlertingSetup, RuleType, RuleParamsAndRefs, RuleExecutorOptions, RuleTypeParams, + AlertingServerSetup, } from '@kbn/alerting-plugin/server'; import { FeaturesPluginSetup } from '@kbn/features-plugin/server'; +import { AlertingServerSetup } from '@kbn/alerting-plugin/server'; // this plugin's dependendencies export interface StackAlertsDeps { - alerting: AlertingSetup; + alerting: AlertingServerSetup; features: FeaturesPluginSetup; } diff --git a/x-pack/plugins/stack_connectors/common/crowdstrike/schema.ts b/x-pack/plugins/stack_connectors/common/crowdstrike/schema.ts index 379adfb0fcc95..d5e8cd693af98 100644 --- a/x-pack/plugins/stack_connectors/common/crowdstrike/schema.ts +++ b/x-pack/plugins/stack_connectors/common/crowdstrike/schema.ts @@ -17,7 +17,9 @@ export const CrowdstrikeSecretsSchema = schema.object({ clientSecret: schema.string(), }); -export const RelaxedCrowdstrikeBaseApiResponseSchema = schema.object({}, { unknowns: 'allow' }); +export const RelaxedCrowdstrikeBaseApiResponseSchema = schema.maybe( + schema.object({}, { unknowns: 'allow' }) +); export const CrowdstrikeBaseApiResponseSchema = schema.object( { resources: schema.arrayOf(schema.any()), diff --git a/x-pack/plugins/stack_connectors/common/sentinelone/schema.ts b/x-pack/plugins/stack_connectors/common/sentinelone/schema.ts index d9dde5773d79b..7daf615e01d31 100644 --- a/x-pack/plugins/stack_connectors/common/sentinelone/schema.ts +++ b/x-pack/plugins/stack_connectors/common/sentinelone/schema.ts @@ -16,7 +16,9 @@ export const SentinelOneSecretsSchema = schema.object({ token: schema.string(), }); -export const SentinelOneBaseApiResponseSchema = schema.object({}, { unknowns: 'allow' }); +export const SentinelOneBaseApiResponseSchema = schema.maybe( + schema.object({}, { unknowns: 'allow' }) +); export const SentinelOneGetAgentsResponseSchema = schema.object( { diff --git a/x-pack/plugins/stack_connectors/public/connector_types/inference/connector.test.tsx b/x-pack/plugins/stack_connectors/public/connector_types/inference/connector.test.tsx index d445504011b5f..4b4beb16d798e 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/inference/connector.test.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/inference/connector.test.tsx @@ -25,13 +25,19 @@ jest.mock('@kbn/triggers-actions-ui-plugin/public/common/lib/kibana', () => ({ })), })); -jest.mock('@faker-js/faker', () => ({ - faker: { - string: { - alpha: jest.fn().mockReturnValue('123'), +jest.mock('@faker-js/faker', () => { + const originalModule = jest.requireActual('@faker-js/faker'); + return { + ...originalModule, + faker: { + ...originalModule.faker, + string: { + ...originalModule.faker.string, + alpha: jest.fn().mockReturnValue('123'), + }, }, - }, -})); + }; +}); const mockProviders = useProviders as jest.Mock; diff --git a/x-pack/plugins/stack_connectors/public/connector_types/inference/params.tsx b/x-pack/plugins/stack_connectors/public/connector_types/inference/params.tsx index 0013f943e3639..c24fff24c33f6 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/inference/params.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/inference/params.tsx @@ -11,7 +11,7 @@ import { type ActionParamsProps, } from '@kbn/triggers-actions-ui-plugin/public'; import { EuiTextArea, EuiFormRow, EuiSpacer, EuiSelect } from '@elastic/eui'; -import { RuleFormParamsErrors } from '@kbn/alerts-ui-shared'; +import type { RuleFormParamsErrors } from '@kbn/response-ops-rule-form'; import { ChatCompleteParams, RerankParams, diff --git a/x-pack/plugins/stack_connectors/server/connector_types/crowdstrike/crowdstrike.ts b/x-pack/plugins/stack_connectors/server/connector_types/crowdstrike/crowdstrike.ts index 686612956d175..bd1f6613d5f04 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/crowdstrike/crowdstrike.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/crowdstrike/crowdstrike.ts @@ -236,6 +236,11 @@ export class CrowdstrikeConnector extends SubActionConnector< const response = await this.request( { ...req, + // We don't validate responses from Crowdstrike API's because we do not want failures for cases + // where the external system might add/remove/change values in the response that we have no + // control over. + responseSchema: + RelaxedCrowdstrikeBaseApiResponseSchema as unknown as SubActionRequestParams['responseSchema'], headers: { ...req.headers, Authorization: `Bearer ${CrowdstrikeConnector.token}`, diff --git a/x-pack/plugins/stack_connectors/server/connector_types/index.ts b/x-pack/plugins/stack_connectors/server/connector_types/index.ts index a156547cc2fa6..08b0331f1cf2f 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/index.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/index.ts @@ -63,6 +63,7 @@ export { ConnectorTypeId as WebhookConnectorTypeId } from './webhook'; export type { ActionParamsType as WebhookActionParams } from './webhook/types'; export { ConnectorTypeId as XmattersConnectorTypeId } from './xmatters'; export type { ActionParamsType as XmattersActionParams } from './xmatters'; +export { OpsgenieConnectorTypeId } from './opsgenie'; export type { OpsgenieActionConfig, diff --git a/x-pack/plugins/stack_connectors/server/connector_types/opsgenie/index.ts b/x-pack/plugins/stack_connectors/server/connector_types/opsgenie/index.ts index 7e92a3b7f3332..9570e0033f531 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/opsgenie/index.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/opsgenie/index.ts @@ -39,6 +39,8 @@ export const getOpsgenieConnectorType = (): SubActionConnectorType { params: { APIToken: 'token-abc', }, - responseSchema: SentinelOneGetActivitiesResponseSchema, + responseSchema: expect.any(Object), }); }); diff --git a/x-pack/plugins/stack_connectors/server/connector_types/sentinelone/sentinelone.ts b/x-pack/plugins/stack_connectors/server/connector_types/sentinelone/sentinelone.ts index dd73bafae8d2f..42d946edbc787 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/sentinelone/sentinelone.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/sentinelone/sentinelone.ts @@ -43,6 +43,7 @@ import { SentinelOneGetRemoteScriptResultsParamsSchema, SentinelOneDownloadRemoteScriptResultsParamsSchema, SentinelOneDownloadRemoteScriptResultsResponseSchema, + SentinelOneBaseApiResponseSchema, } from '../../../common/sentinelone/schema'; import { SUB_ACTION } from '../../../common/sentinelone/constants'; import { @@ -400,6 +401,11 @@ export class SentinelOneConnector extends SubActionConnector< const response = await this.request( { ...req, + // We don't validate responses from SentinelOne API's because we do not want failures for cases + // where the external system might add/remove/change values in the response that we have no + // control over. + responseSchema: + SentinelOneBaseApiResponseSchema as unknown as SubActionRequestParams['responseSchema'], params: { ...req.params, APIToken: this.secrets.token, diff --git a/x-pack/plugins/stack_connectors/tsconfig.json b/x-pack/plugins/stack_connectors/tsconfig.json index 66c84d17408bc..fa7e2dd9be6f8 100644 --- a/x-pack/plugins/stack_connectors/tsconfig.json +++ b/x-pack/plugins/stack_connectors/tsconfig.json @@ -42,8 +42,8 @@ "@kbn/utility-types", "@kbn/task-manager-plugin", "@kbn/alerting-types", - "@kbn/alerts-ui-shared", "@kbn/core-notifications-browser", + "@kbn/response-ops-rule-form", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/streams/common/index.ts b/x-pack/plugins/streams/common/index.ts index 3a7306e46cae2..634994cb87f13 100644 --- a/x-pack/plugins/streams/common/index.ts +++ b/x-pack/plugins/streams/common/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export type { StreamDefinition } from './types'; +export type { StreamDefinition, ReadStreamDefinition } from './types'; diff --git a/x-pack/plugins/streams/common/types.ts b/x-pack/plugins/streams/common/types.ts index 82a7a372662e8..59cdd1cf9c4b9 100644 --- a/x-pack/plugins/streams/common/types.ts +++ b/x-pack/plugins/streams/common/types.ts @@ -33,11 +33,11 @@ export interface AndCondition { and: Condition[]; } -export interface RerouteOrCondition { +export interface OrCondition { or: Condition[]; } -export type Condition = FilterCondition | AndCondition | RerouteOrCondition | undefined; +export type Condition = FilterCondition | AndCondition | OrCondition | undefined; export const conditionSchema: z.ZodType = z.lazy(() => z.union([ @@ -77,23 +77,32 @@ export const fieldDefinitionSchema = z.object({ export type FieldDefinition = z.infer; +export const streamChildSchema = z.object({ + id: z.string(), + condition: z.optional(conditionSchema), +}); + +export type StreamChild = z.infer; + export const streamWithoutIdDefinitonSchema = z.object({ processing: z.array(processingDefinitionSchema).default([]), fields: z.array(fieldDefinitionSchema).default([]), - children: z - .array( - z.object({ - id: z.string(), - condition: z.optional(conditionSchema), - }) - ) - .default([]), + children: z.array(streamChildSchema).default([]), }); export type StreamWithoutIdDefinition = z.infer; export const streamDefinitonSchema = streamWithoutIdDefinitonSchema.extend({ id: z.string(), + managed: z.boolean().default(true), + unmanaged_elasticsearch_assets: z.optional( + z.array( + z.object({ + type: z.enum(['ingest_pipeline', 'component_template', 'index_template', 'data_stream']), + id: z.string(), + }) + ) + ), }); export type StreamDefinition = z.infer; @@ -101,3 +110,9 @@ export type StreamDefinition = z.infer; export const streamDefinitonWithoutChildrenSchema = streamDefinitonSchema.omit({ children: true }); export type StreamWithoutChildrenDefinition = z.infer; + +export const readStreamDefinitonSchema = streamDefinitonSchema.extend({ + inheritedFields: z.array(fieldDefinitionSchema.extend({ from: z.string() })).default([]), +}); + +export type ReadStreamDefinition = z.infer; diff --git a/x-pack/plugins/streams/kibana.jsonc b/x-pack/plugins/streams/kibana.jsonc index 06c37ed245cf1..b9ce6ef68e27e 100644 --- a/x-pack/plugins/streams/kibana.jsonc +++ b/x-pack/plugins/streams/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/streams-plugin", - "owner": "@simianhacker @flash1293 @dgieselaar", + "owner": "@elastic/streams-program-team", "description": "A manager for Streams", "group": "observability", "visibility": "private", diff --git a/x-pack/plugins/streams/server/lib/streams/helpers/condition_fields.ts b/x-pack/plugins/streams/server/lib/streams/helpers/condition_fields.ts new file mode 100644 index 0000000000000..48b06b8ea0701 --- /dev/null +++ b/x-pack/plugins/streams/server/lib/streams/helpers/condition_fields.ts @@ -0,0 +1,85 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { Condition, FilterCondition } from '../../../../common/types'; +import { isAndCondition, isFilterCondition, isOrCondition } from './condition_guards'; + +export function isComplete(condition: Condition): boolean { + if (isFilterCondition(condition)) { + return condition.field !== undefined && condition.field !== ''; + } + if (isAndCondition(condition)) { + return condition.and.every(isComplete); + } + if (isOrCondition(condition)) { + return condition.or.every(isComplete); + } + return false; +} + +export function getFields( + condition: Condition +): Array<{ name: string; type: 'number' | 'string' }> { + const fields = collectFields(condition); + // deduplicate fields, if mapped as string and number, keep as number + const uniqueFields = new Map(); + fields.forEach((field) => { + const existing = uniqueFields.get(field.name); + if (existing === 'number') { + return; + } + if (existing === 'string' && field.type === 'number') { + uniqueFields.set(field.name, 'number'); + return; + } + uniqueFields.set(field.name, field.type); + }); + + return Array.from(uniqueFields).map(([name, type]) => ({ name, type })); +} + +function collectFields(condition: Condition): Array<{ name: string; type: 'number' | 'string' }> { + if (isFilterCondition(condition)) { + return [{ name: condition.field, type: getFieldTypeForFilterCondition(condition) }]; + } + if (isAndCondition(condition)) { + return condition.and.flatMap(collectFields); + } + if (isOrCondition(condition)) { + return condition.or.flatMap(collectFields); + } + return []; +} + +function getFieldTypeForFilterCondition(condition: FilterCondition): 'number' | 'string' { + switch (condition.operator) { + case 'gt': + case 'gte': + case 'lt': + case 'lte': + return 'number'; + case 'neq': + case 'eq': + case 'exists': + case 'contains': + case 'startsWith': + case 'endsWith': + case 'notExists': + return 'string'; + default: + return 'string'; + } +} + +export function validateCondition(condition: Condition) { + if (isFilterCondition(condition)) { + // check whether a field is specified + if (!condition.field.trim()) { + throw new Error('Field is required in conditions'); + } + } +} diff --git a/x-pack/plugins/streams/server/lib/streams/helpers/condition_guards.ts b/x-pack/plugins/streams/server/lib/streams/helpers/condition_guards.ts new file mode 100644 index 0000000000000..1469471bd8943 --- /dev/null +++ b/x-pack/plugins/streams/server/lib/streams/helpers/condition_guards.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 { + AndCondition, + conditionSchema, + FilterCondition, + filterConditionSchema, + OrCondition, +} from '../../../../common/types'; + +export function isFilterCondition(subject: any): subject is FilterCondition { + const result = filterConditionSchema.safeParse(subject); + return result.success; +} + +export function isAndCondition(subject: any): subject is AndCondition { + const result = conditionSchema.safeParse(subject); + return result.success && subject.and != null; +} + +export function isOrCondition(subject: any): subject is OrCondition { + const result = conditionSchema.safeParse(subject); + return result.success && subject.or != null; +} diff --git a/x-pack/plugins/streams/server/lib/streams/helpers/condition_to_painless.test.ts b/x-pack/plugins/streams/server/lib/streams/helpers/condition_to_painless.test.ts index db0a5eaea8efd..6927b85d5aed8 100644 --- a/x-pack/plugins/streams/server/lib/streams/helpers/condition_to_painless.test.ts +++ b/x-pack/plugins/streams/server/lib/streams/helpers/condition_to_painless.test.ts @@ -5,44 +5,53 @@ * 2.0. */ -import { conditionToPainless } from './condition_to_painless'; +import { conditionToPainless, conditionToStatement } from './condition_to_painless'; const operatorConditionAndResults = [ { condition: { field: 'log.logger', operator: 'eq' as const, value: 'nginx_proxy' }, - result: '(ctx.log?.logger !== null && ctx.log?.logger == "nginx_proxy")', + result: + '(ctx.log?.logger !== null && ((ctx.log?.logger instanceof Number && ctx.log?.logger.toString() == "nginx_proxy") || ctx.log?.logger == "nginx_proxy"))', }, { condition: { field: 'log.logger', operator: 'neq' as const, value: 'nginx_proxy' }, - result: '(ctx.log?.logger !== null && ctx.log?.logger != "nginx_proxy")', + result: + '(ctx.log?.logger !== null && ((ctx.log?.logger instanceof Number && ctx.log?.logger.toString() != "nginx_proxy") || ctx.log?.logger != "nginx_proxy"))', }, { condition: { field: 'http.response.status_code', operator: 'lt' as const, value: 500 }, - result: '(ctx.http?.response?.status_code !== null && ctx.http?.response?.status_code < 500)', + result: + '(ctx.http?.response?.status_code !== null && ((ctx.http?.response?.status_code instanceof String && Float.parseFloat(ctx.http?.response?.status_code) < 500) || ctx.http?.response?.status_code < 500))', }, { condition: { field: 'http.response.status_code', operator: 'lte' as const, value: 500 }, - result: '(ctx.http?.response?.status_code !== null && ctx.http?.response?.status_code <= 500)', + result: + '(ctx.http?.response?.status_code !== null && ((ctx.http?.response?.status_code instanceof String && Float.parseFloat(ctx.http?.response?.status_code) <= 500) || ctx.http?.response?.status_code <= 500))', }, { condition: { field: 'http.response.status_code', operator: 'gt' as const, value: 500 }, - result: '(ctx.http?.response?.status_code !== null && ctx.http?.response?.status_code > 500)', + result: + '(ctx.http?.response?.status_code !== null && ((ctx.http?.response?.status_code instanceof String && Float.parseFloat(ctx.http?.response?.status_code) > 500) || ctx.http?.response?.status_code > 500))', }, { condition: { field: 'http.response.status_code', operator: 'gte' as const, value: 500 }, - result: '(ctx.http?.response?.status_code !== null && ctx.http?.response?.status_code >= 500)', + result: + '(ctx.http?.response?.status_code !== null && ((ctx.http?.response?.status_code instanceof String && Float.parseFloat(ctx.http?.response?.status_code) >= 500) || ctx.http?.response?.status_code >= 500))', }, { condition: { field: 'log.logger', operator: 'startsWith' as const, value: 'nginx' }, - result: '(ctx.log?.logger !== null && ctx.log?.logger.startsWith("nginx"))', + result: + '(ctx.log?.logger !== null && ((ctx.log?.logger instanceof Number && ctx.log?.logger.toString().startsWith("nginx")) || ctx.log?.logger.startsWith("nginx")))', }, { condition: { field: 'log.logger', operator: 'endsWith' as const, value: 'proxy' }, - result: '(ctx.log?.logger !== null && ctx.log?.logger.endsWith("proxy"))', + result: + '(ctx.log?.logger !== null && ((ctx.log?.logger instanceof Number && ctx.log?.logger.toString().endsWith("proxy")) || ctx.log?.logger.endsWith("proxy")))', }, { condition: { field: 'log.logger', operator: 'contains' as const, value: 'proxy' }, - result: '(ctx.log?.logger !== null && ctx.log?.logger.contains("proxy"))', + result: + '(ctx.log?.logger !== null && ((ctx.log?.logger instanceof Number && ctx.log?.logger.toString().contains("proxy")) || ctx.log?.logger.contains("proxy")))', }, { condition: { field: 'log.logger', operator: 'exists' as const }, @@ -55,87 +64,152 @@ const operatorConditionAndResults = [ ]; describe('conditionToPainless', () => { - describe('operators', () => { - operatorConditionAndResults.forEach((setup) => { - test(`${setup.condition.operator}`, () => { - expect(conditionToPainless(setup.condition)).toEqual(setup.result); + describe('conditionToStatement', () => { + describe('operators', () => { + operatorConditionAndResults.forEach((setup) => { + test(`${setup.condition.operator}`, () => { + expect(conditionToStatement(setup.condition)).toEqual(setup.result); + }); }); - }); - }); - describe('and', () => { - test('simple', () => { - const condition = { - and: [ - { field: 'log.logger', operator: 'eq' as const, value: 'nginx_proxy' }, - { field: 'log.level', operator: 'eq' as const, value: 'error' }, - ], - }; - expect( - expect(conditionToPainless(condition)).toEqual( - '(ctx.log?.logger !== null && ctx.log?.logger == "nginx_proxy") && (ctx.log?.level !== null && ctx.log?.level == "error")' - ) - ); + test('ensure number comparasion works with string values', () => { + const condition = { + field: 'http.response.status_code', + operator: 'gt' as const, + value: '500', + }; + expect(conditionToStatement(condition)).toEqual( + '(ctx.http?.response?.status_code !== null && ((ctx.http?.response?.status_code instanceof String && Float.parseFloat(ctx.http?.response?.status_code) > 500) || ctx.http?.response?.status_code > 500))' + ); + }); + test('ensure string comparasion works with number values', () => { + const condition = { + field: 'message', + operator: 'contains' as const, + value: 500, + }; + expect(conditionToStatement(condition)).toEqual( + '(ctx.message !== null && ((ctx.message instanceof Number && ctx.message.toString().contains("500")) || ctx.message.contains("500")))' + ); + }); }); - }); - describe('or', () => { - test('simple', () => { - const condition = { - or: [ - { field: 'log.logger', operator: 'eq' as const, value: 'nginx_proxy' }, - { field: 'log.level', operator: 'eq' as const, value: 'error' }, - ], - }; - expect( - expect(conditionToPainless(condition)).toEqual( - '(ctx.log?.logger !== null && ctx.log?.logger == "nginx_proxy") || (ctx.log?.level !== null && ctx.log?.level == "error")' - ) - ); + describe('and', () => { + test('simple', () => { + const condition = { + and: [ + { field: 'log.logger', operator: 'eq' as const, value: 'nginx_proxy' }, + { field: 'log.level', operator: 'eq' as const, value: 'error' }, + ], + }; + expect( + expect(conditionToStatement(condition)).toEqual( + '(ctx.log?.logger !== null && ((ctx.log?.logger instanceof Number && ctx.log?.logger.toString() == "nginx_proxy") || ctx.log?.logger == "nginx_proxy")) && (ctx.log?.level !== null && ((ctx.log?.level instanceof Number && ctx.log?.level.toString() == "error") || ctx.log?.level == "error"))' + ) + ); + }); }); - }); - describe('nested', () => { - test('and with a filter and or with 2 filters', () => { - const condition = { - and: [ - { field: 'log.logger', operator: 'eq' as const, value: 'nginx_proxy' }, - { - or: [ - { field: 'log.level', operator: 'eq' as const, value: 'error' }, - { field: 'log.level', operator: 'eq' as const, value: 'ERROR' }, - ], - }, - ], - }; - expect( - expect(conditionToPainless(condition)).toEqual( - '(ctx.log?.logger !== null && ctx.log?.logger == "nginx_proxy") && ((ctx.log?.level !== null && ctx.log?.level == "error") || (ctx.log?.level !== null && ctx.log?.level == "ERROR"))' - ) - ); + describe('or', () => { + test('simple', () => { + const condition = { + or: [ + { field: 'log.logger', operator: 'eq' as const, value: 'nginx_proxy' }, + { field: 'log.level', operator: 'eq' as const, value: 'error' }, + ], + }; + expect( + expect(conditionToStatement(condition)).toEqual( + '(ctx.log?.logger !== null && ((ctx.log?.logger instanceof Number && ctx.log?.logger.toString() == "nginx_proxy") || ctx.log?.logger == "nginx_proxy")) || (ctx.log?.level !== null && ((ctx.log?.level instanceof Number && ctx.log?.level.toString() == "error") || ctx.log?.level == "error"))' + ) + ); + }); }); - test('and with 2 or with filters', () => { - const condition = { - and: [ - { - or: [ - { field: 'log.logger', operator: 'eq' as const, value: 'nginx_proxy' }, - { field: 'service.name', operator: 'eq' as const, value: 'nginx' }, - ], - }, - { - or: [ - { field: 'log.level', operator: 'eq' as const, value: 'error' }, - { field: 'log.level', operator: 'eq' as const, value: 'ERROR' }, - ], - }, - ], - }; - expect( - expect(conditionToPainless(condition)).toEqual( - '((ctx.log?.logger !== null && ctx.log?.logger == "nginx_proxy") || (ctx.service?.name !== null && ctx.service?.name == "nginx")) && ((ctx.log?.level !== null && ctx.log?.level == "error") || (ctx.log?.level !== null && ctx.log?.level == "ERROR"))' - ) - ); + + describe('nested', () => { + test('and with a filter and or with 2 filters', () => { + const condition = { + and: [ + { field: 'log.logger', operator: 'eq' as const, value: 'nginx_proxy' }, + { + or: [ + { field: 'log.level', operator: 'eq' as const, value: 'error' }, + { field: 'log.level', operator: 'eq' as const, value: 'ERROR' }, + ], + }, + ], + }; + expect( + expect(conditionToStatement(condition)).toEqual( + '(ctx.log?.logger !== null && ((ctx.log?.logger instanceof Number && ctx.log?.logger.toString() == "nginx_proxy") || ctx.log?.logger == "nginx_proxy")) && ((ctx.log?.level !== null && ((ctx.log?.level instanceof Number && ctx.log?.level.toString() == "error") || ctx.log?.level == "error")) || (ctx.log?.level !== null && ((ctx.log?.level instanceof Number && ctx.log?.level.toString() == "ERROR") || ctx.log?.level == "ERROR")))' + ) + ); + }); + test('and with 2 or with filters', () => { + const condition = { + and: [ + { + or: [ + { field: 'log.logger', operator: 'eq' as const, value: 'nginx_proxy' }, + { field: 'service.name', operator: 'eq' as const, value: 'nginx' }, + ], + }, + { + or: [ + { field: 'log.level', operator: 'eq' as const, value: 'error' }, + { field: 'log.level', operator: 'eq' as const, value: 'ERROR' }, + ], + }, + ], + }; + expect( + expect(conditionToStatement(condition)).toEqual( + '((ctx.log?.logger !== null && ((ctx.log?.logger instanceof Number && ctx.log?.logger.toString() == "nginx_proxy") || ctx.log?.logger == "nginx_proxy")) || (ctx.service?.name !== null && ((ctx.service?.name instanceof Number && ctx.service?.name.toString() == "nginx") || ctx.service?.name == "nginx"))) && ((ctx.log?.level !== null && ((ctx.log?.level instanceof Number && ctx.log?.level.toString() == "error") || ctx.log?.level == "error")) || (ctx.log?.level !== null && ((ctx.log?.level instanceof Number && ctx.log?.level.toString() == "ERROR") || ctx.log?.level == "ERROR")))' + ) + ); + }); }); }); + + test('wrapped with type checks for uinary conditions', () => { + const condition = { field: 'log', operator: 'exists' as const }; + expect(conditionToPainless(condition)).toEqual(`try { + if (ctx.log !== null) { + return true; + } + return false; +} catch (Exception e) { + return false; +} +`); + }); + + test('wrapped with typechecks and try/catch', () => { + const condition = { + and: [ + { field: 'log.logger', operator: 'eq' as const, value: 'nginx_proxy' }, + { + or: [ + { field: 'log.level', operator: 'eq' as const, value: 'error' }, + { field: 'log.level', operator: 'eq' as const, value: 'ERROR' }, + ], + }, + ], + }; + expect( + expect(conditionToPainless(condition)) + .toEqual(`if (ctx.log?.logger instanceof Map || ctx.log?.level instanceof Map) { + return false; +} +try { + if ((ctx.log?.logger !== null && ((ctx.log?.logger instanceof Number && ctx.log?.logger.toString() == "nginx_proxy") || ctx.log?.logger == "nginx_proxy")) && ((ctx.log?.level !== null && ((ctx.log?.level instanceof Number && ctx.log?.level.toString() == "error") || ctx.log?.level == "error")) || (ctx.log?.level !== null && ((ctx.log?.level instanceof Number && ctx.log?.level.toString() == "ERROR") || ctx.log?.level == "ERROR")))) { + return true; + } + return false; +} catch (Exception e) { + return false; +} +`) + ); + }); }); diff --git a/x-pack/plugins/streams/server/lib/streams/helpers/condition_to_painless.ts b/x-pack/plugins/streams/server/lib/streams/helpers/condition_to_painless.ts index dccc15b2ec8fc..4da9b3beffae5 100644 --- a/x-pack/plugins/streams/server/lib/streams/helpers/condition_to_painless.ts +++ b/x-pack/plugins/streams/server/lib/streams/helpers/condition_to_painless.ts @@ -5,35 +5,20 @@ * 2.0. */ -import { isBoolean, isString } from 'lodash'; +import { isBoolean, isString, uniq } from 'lodash'; import { - AndCondition, BinaryFilterCondition, Condition, - conditionSchema, FilterCondition, - filterConditionSchema, - RerouteOrCondition, UnaryFilterCondition, } from '../../../../common/types'; +import { isAndCondition, isFilterCondition, isOrCondition } from './condition_guards'; -function isFilterCondition(subject: any): subject is FilterCondition { - const result = filterConditionSchema.safeParse(subject); - return result.success; -} - -function isAndCondition(subject: any): subject is AndCondition { - const result = conditionSchema.safeParse(subject); - return result.success && subject.and != null; -} - -function isOrCondition(subject: any): subject is RerouteOrCondition { - const result = conditionSchema.safeParse(subject); - return result.success && subject.or != null; -} - -function safePainlessField(condition: FilterCondition) { - return `ctx.${condition.field.split('.').join('?.')}`; +function safePainlessField(conditionOrField: FilterCondition | string) { + if (isFilterCondition(conditionOrField)) { + return `ctx.${conditionOrField.field.split('.').join('?.')}`; + } + return `ctx.${conditionOrField.split('.').join('?.')}`; } function encodeValue(value: string | number | boolean) { @@ -49,23 +34,59 @@ function encodeValue(value: string | number | boolean) { function binaryToPainless(condition: BinaryFilterCondition) { switch (condition.operator) { case 'neq': - return `${safePainlessField(condition)} != ${encodeValue(condition.value)}`; + return `((${safePainlessField(condition)} instanceof Number && ${safePainlessField( + condition + )}.toString() != ${encodeValue(String(condition.value))}) || ${safePainlessField( + condition + )} != ${encodeValue(String(condition.value))})`; case 'lt': - return `${safePainlessField(condition)} < ${encodeValue(condition.value)}`; + return `((${safePainlessField( + condition + )} instanceof String && Float.parseFloat(${safePainlessField(condition)}) < ${encodeValue( + Number(condition.value) + )}) || ${safePainlessField(condition)} < ${encodeValue(Number(condition.value))})`; case 'lte': - return `${safePainlessField(condition)} <= ${encodeValue(condition.value)}`; + return `((${safePainlessField( + condition + )} instanceof String && Float.parseFloat(${safePainlessField(condition)}) <= ${encodeValue( + Number(condition.value) + )}) || ${safePainlessField(condition)} <= ${encodeValue(Number(condition.value))})`; case 'gt': - return `${safePainlessField(condition)} > ${encodeValue(condition.value)}`; + return `((${safePainlessField( + condition + )} instanceof String && Float.parseFloat(${safePainlessField(condition)}) > ${encodeValue( + Number(condition.value) + )}) || ${safePainlessField(condition)} > ${encodeValue(Number(condition.value))})`; case 'gte': - return `${safePainlessField(condition)} >= ${encodeValue(condition.value)}`; + return `((${safePainlessField( + condition + )} instanceof String && Float.parseFloat(${safePainlessField(condition)}) >= ${encodeValue( + Number(condition.value) + )}) || ${safePainlessField(condition)} >= ${encodeValue(Number(condition.value))})`; case 'startsWith': - return `${safePainlessField(condition)}.startsWith(${encodeValue(condition.value)})`; + return `((${safePainlessField(condition)} instanceof Number && ${safePainlessField( + condition + )}.toString().startsWith(${encodeValue(String(condition.value))})) || ${safePainlessField( + condition + )}.startsWith(${encodeValue(String(condition.value))}))`; case 'endsWith': - return `${safePainlessField(condition)}.endsWith(${encodeValue(condition.value)})`; + return `((${safePainlessField(condition)} instanceof Number && ${safePainlessField( + condition + )}.toString().endsWith(${encodeValue(String(condition.value))})) || ${safePainlessField( + condition + )}.endsWith(${encodeValue(String(condition.value))}))`; case 'contains': - return `${safePainlessField(condition)}.contains(${encodeValue(condition.value)})`; + return `((${safePainlessField(condition)} instanceof Number && ${safePainlessField( + condition + )}.toString().contains(${encodeValue(String(condition.value))})) || ${safePainlessField( + condition + )}.contains(${encodeValue(String(condition.value))}))`; default: - return `${safePainlessField(condition)} == ${encodeValue(condition.value)}`; + return `((${safePainlessField(condition)} instanceof Number && ${safePainlessField( + condition + )}.toString() == ${encodeValue(String(condition.value))}) || ${safePainlessField( + condition + )} == ${encodeValue(String(condition.value))})`; } } @@ -82,7 +103,18 @@ function isUnaryFilterCondition(subject: FilterCondition): subject is UnaryFilte return !('value' in subject); } -export function conditionToPainless(condition: Condition, nested = false): string { +function extractAllFields(condition: Condition, fields: string[] = []): string[] { + if (isFilterCondition(condition) && !isUnaryFilterCondition(condition)) { + return uniq([...fields, condition.field]); + } else if (isAndCondition(condition)) { + return uniq(condition.and.map((cond) => extractAllFields(cond, fields)).flat()); + } else if (isOrCondition(condition)) { + return uniq(condition.or.map((cond) => extractAllFields(cond, fields)).flat()); + } + return uniq(fields); +} + +export function conditionToStatement(condition: Condition, nested = false): string { if (isFilterCondition(condition)) { if (isUnaryFilterCondition(condition)) { return unaryToPainless(condition); @@ -90,12 +122,34 @@ export function conditionToPainless(condition: Condition, nested = false): strin return `(${safePainlessField(condition)} !== null && ${binaryToPainless(condition)})`; } if (isAndCondition(condition)) { - const and = condition.and.map((filter) => conditionToPainless(filter, true)).join(' && '); + const and = condition.and.map((filter) => conditionToStatement(filter, true)).join(' && '); return nested ? `(${and})` : and; } if (isOrCondition(condition)) { - const or = condition.or.map((filter) => conditionToPainless(filter, true)).join(' || '); + const or = condition.or.map((filter) => conditionToStatement(filter, true)).join(' || '); return nested ? `(${or})` : or; } return 'false'; } + +export function conditionToPainless(condition: Condition): string { + const fields = extractAllFields(condition); + let fieldCheck = ''; + if (fields.length !== 0) { + fieldCheck = `if (${fields + .map((field) => `${safePainlessField(field)} instanceof Map`) + .join(' || ')}) { + return false; +} +`; + } + return `${fieldCheck}try { + if (${conditionToStatement(condition)}) { + return true; + } + return false; +} catch (Exception e) { + return false; +} +`; +} diff --git a/x-pack/plugins/streams/server/lib/streams/helpers/condition_to_query_dsl.ts b/x-pack/plugins/streams/server/lib/streams/helpers/condition_to_query_dsl.ts new file mode 100644 index 0000000000000..3864639175008 --- /dev/null +++ b/x-pack/plugins/streams/server/lib/streams/helpers/condition_to_query_dsl.ts @@ -0,0 +1,63 @@ +/* + * 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 { Condition, FilterCondition } from '../../../../common/types'; +import { isAndCondition, isFilterCondition, isOrCondition } from './condition_guards'; + +function conditionToClause(condition: FilterCondition) { + switch (condition.operator) { + case 'neq': + return { bool: { must_not: { match: { [condition.field]: condition.value } } } }; + case 'eq': + return { match: { [condition.field]: condition.value } }; + case 'exists': + return { exists: { field: condition.field } }; + case 'gt': + return { range: { [condition.field]: { gt: condition.value } } }; + case 'gte': + return { range: { [condition.field]: { gte: condition.value } } }; + case 'lt': + return { range: { [condition.field]: { lt: condition.value } } }; + case 'lte': + return { range: { [condition.field]: { lte: condition.value } } }; + case 'contains': + return { wildcard: { [condition.field]: `*${condition.value}*` } }; + case 'startsWith': + return { prefix: { [condition.field]: condition.value } }; + case 'endsWith': + return { wildcard: { [condition.field]: `*${condition.value}` } }; + case 'notExists': + return { bool: { must_not: { exists: { field: condition.field } } } }; + default: + return { match_none: {} }; + } +} + +export function conditionToQueryDsl(condition: Condition): any { + if (isFilterCondition(condition)) { + return conditionToClause(condition); + } + if (isAndCondition(condition)) { + const and = condition.and.map((filter) => conditionToQueryDsl(filter)); + return { + bool: { + must: and, + }, + }; + } + if (isOrCondition(condition)) { + const or = condition.or.map((filter) => conditionToQueryDsl(filter)); + return { + bool: { + should: or, + }, + }; + } + return { + match_none: {}, + }; +} diff --git a/x-pack/plugins/streams/server/lib/streams/ingest_pipelines/logs_default_pipeline.ts b/x-pack/plugins/streams/server/lib/streams/ingest_pipelines/logs_default_pipeline.ts index 762155ba5047c..90f941657faf4 100644 --- a/x-pack/plugins/streams/server/lib/streams/ingest_pipelines/logs_default_pipeline.ts +++ b/x-pack/plugins/streams/server/lib/streams/ingest_pipelines/logs_default_pipeline.ts @@ -20,4 +20,9 @@ export const logsDefaultPipelineProcessors = [ ignore_missing_pipeline: true, }, }, + { + dot_expander: { + field: '*', + }, + }, ]; diff --git a/x-pack/plugins/streams/server/lib/streams/internal_stream_mapping.ts b/x-pack/plugins/streams/server/lib/streams/internal_stream_mapping.ts index 8e88eeef8cd84..faff949c0d97b 100644 --- a/x-pack/plugins/streams/server/lib/streams/internal_stream_mapping.ts +++ b/x-pack/plugins/streams/server/lib/streams/internal_stream_mapping.ts @@ -29,6 +29,9 @@ export function createStreamsIndex(scopedClusterClient: IScopedClusterClient) { id: { type: 'keyword', }, + managed: { + type: 'boolean', + }, }, }, }); diff --git a/x-pack/plugins/streams/server/lib/streams/root_stream_definition.ts b/x-pack/plugins/streams/server/lib/streams/root_stream_definition.ts index 2b7deed877309..1bdb4f20a95cc 100644 --- a/x-pack/plugins/streams/server/lib/streams/root_stream_definition.ts +++ b/x-pack/plugins/streams/server/lib/streams/root_stream_definition.ts @@ -9,6 +9,7 @@ import { StreamDefinition } from '../../../common/types'; export const rootStreamDefinition: StreamDefinition = { id: 'logs', + managed: true, processing: [], children: [], fields: [ diff --git a/x-pack/plugins/streams/server/lib/streams/stream_crud.ts b/x-pack/plugins/streams/server/lib/streams/stream_crud.ts index 28775ebe8acba..452b0f40cb38e 100644 --- a/x-pack/plugins/streams/server/lib/streams/stream_crud.ts +++ b/x-pack/plugins/streams/server/lib/streams/stream_crud.ts @@ -81,7 +81,7 @@ async function upsertInternalStream({ definition, scopedClusterClient }: BasePar return scopedClusterClient.asInternalUser.index({ id: definition.id, index: STREAMS_INDEX, - document: definition, + document: { ...definition, managed: true }, refresh: 'wait_for', }); } @@ -89,7 +89,6 @@ async function upsertInternalStream({ definition, scopedClusterClient }: BasePar type ListStreamsParams = BaseParams; export interface ListStreamResponse { - total: number; definitions: StreamDefinition[]; } @@ -101,15 +100,34 @@ export async function listStreams({ size: 10000, sort: [{ id: 'asc' }], }); - const definitions = response.hits.hits.map((hit) => hit._source!); - const total = response.hits.total!; + + const dataStreams = await listDataStreamsAsStreams({ scopedClusterClient }); + let definitions = response.hits.hits.map((hit) => ({ ...hit._source!, managed: true })); + const hasAccess = await Promise.all( + definitions.map((definition) => checkReadAccess({ id: definition.id, scopedClusterClient })) + ); + definitions = definitions.filter((_, index) => hasAccess[index]); return { - definitions, - total: typeof total === 'number' ? total : total.value, + definitions: [...definitions, ...dataStreams], }; } +export async function listDataStreamsAsStreams({ + scopedClusterClient, +}: ListStreamsParams): Promise { + const response = await scopedClusterClient.asInternalUser.indices.getDataStream(); + return response.data_streams + .filter((dataStream) => dataStream.template.endsWith('@stream') === false) + .map((dataStream) => ({ + id: dataStream.name, + managed: false, + children: [], + fields: [], + processing: [], + })); +} + interface ReadStreamParams extends BaseParams { id: string; skipAccessCheck?: boolean; @@ -137,16 +155,80 @@ export async function readStream({ } } return { - definition, + definition: { + ...definition, + managed: true, + }, }; } catch (e) { if (e.meta?.statusCode === 404) { - throw new DefinitionNotFound(`Stream definition for ${id} not found.`); + return readDataStreamAsStream({ id, scopedClusterClient, skipAccessCheck }); } throw e; } } +export async function readDataStreamAsStream({ + id, + scopedClusterClient, + skipAccessCheck, +}: ReadStreamParams) { + const response = await scopedClusterClient.asInternalUser.indices.getDataStream({ name: id }); + if (response.data_streams.length === 1) { + const definition: StreamDefinition = { + id, + managed: false, + children: [], + fields: [], + processing: [], + }; + if (!skipAccessCheck) { + const hasAccess = await checkReadAccess({ id, scopedClusterClient }); + if (!hasAccess) { + throw new DefinitionNotFound(`Stream definition for ${id} not found.`); + } + } + // retrieve linked index template, component template and ingest pipeline + const templateName = response.data_streams[0].template; + const componentTemplates: string[] = []; + const template = await scopedClusterClient.asInternalUser.indices.getIndexTemplate({ + name: templateName, + }); + if (template.index_templates.length) { + template.index_templates[0].index_template.composed_of.forEach((componentTemplateName) => { + componentTemplates.push(componentTemplateName); + }); + } + const writeIndexName = response.data_streams[0].indices.at(-1)?.index_name!; + const currentIndex = await scopedClusterClient.asInternalUser.indices.get({ + index: writeIndexName, + }); + const ingestPipelineId = currentIndex[writeIndexName].settings?.index?.default_pipeline!; + + definition.unmanaged_elasticsearch_assets = [ + { + type: 'ingest_pipeline', + id: ingestPipelineId, + }, + ...componentTemplates.map((componentTemplateName) => ({ + type: 'component_template' as const, + id: componentTemplateName, + })), + { + type: 'index_template', + id: templateName, + }, + { + type: 'data_stream', + id, + }, + ]; + + return { definition }; + } + throw new DefinitionNotFound(`Stream definition for ${id} not found.`); +} + interface ReadAncestorsParams extends BaseParams { id: string; } @@ -163,7 +245,9 @@ export async function readAncestors({ return { ancestors: await Promise.all( - ancestorIds.map((ancestorId) => readStream({ scopedClusterClient, id: ancestorId })) + ancestorIds.map((ancestorId) => + readStream({ scopedClusterClient, id: ancestorId, skipAccessCheck: true }) + ) ), }; } @@ -285,6 +369,10 @@ export async function syncStream({ rootDefinition, logger, }: SyncStreamParams) { + if (!definition.managed) { + // TODO For now, we just don't allow reads at all - later on we will relax this to allow certain operations, but they will use a completely different syncing logic + throw new Error('Cannot sync an unmanaged stream'); + } const componentTemplate = generateLayer(definition.id, definition); await upsertComponent({ esClient: scopedClusterClient.asCurrentUser, diff --git a/x-pack/plugins/streams/server/routes/index.ts b/x-pack/plugins/streams/server/routes/index.ts index 7267dbedeacff..cf130e99db3fc 100644 --- a/x-pack/plugins/streams/server/routes/index.ts +++ b/x-pack/plugins/streams/server/routes/index.ts @@ -14,6 +14,7 @@ import { forkStreamsRoute } from './streams/fork'; import { listStreamsRoute } from './streams/list'; import { readStreamRoute } from './streams/read'; import { resyncStreamsRoute } from './streams/resync'; +import { sampleStreamRoute } from './streams/sample'; import { streamsStatusRoutes } from './streams/settings'; export const streamsRouteRepository = { @@ -27,6 +28,7 @@ export const streamsRouteRepository = { ...streamsStatusRoutes, ...esqlRoutes, ...disableStreamsRoute, + ...sampleStreamRoute, }; export type StreamsRouteRepository = typeof streamsRouteRepository; diff --git a/x-pack/plugins/streams/server/routes/streams/edit.ts b/x-pack/plugins/streams/server/routes/streams/edit.ts index cda73907d2302..e280796bc9780 100644 --- a/x-pack/plugins/streams/server/routes/streams/edit.ts +++ b/x-pack/plugins/streams/server/routes/streams/edit.ts @@ -27,6 +27,7 @@ import { import { MalformedStreamId } from '../../lib/streams/errors/malformed_stream_id'; import { getParentId } from '../../lib/streams/helpers/hierarchy'; import { MalformedChildren } from '../../lib/streams/errors/malformed_children'; +import { validateCondition } from '../../lib/streams/helpers/condition_fields'; export const editStreamRoute = createServerRoute({ endpoint: 'PUT /api/streams/{id}', @@ -57,7 +58,7 @@ export const editStreamRoute = createServerRoute({ const parentId = getParentId(params.path.id); let parentDefinition: StreamDefinition | undefined; - const streamDefinition = { ...params.body }; + const streamDefinition = { ...params.body, id: params.path.id }; // always need to go from the leaves to the parent when syncing ingest pipelines, otherwise data // will be routed before the data stream is ready @@ -76,6 +77,7 @@ export const editStreamRoute = createServerRoute({ children: [], fields: [], processing: [], + managed: true, }; await syncStream({ @@ -87,7 +89,7 @@ export const editStreamRoute = createServerRoute({ await syncStream({ scopedClusterClient, - definition: { ...streamDefinition, id: params.path.id }, + definition: { ...streamDefinition, id: params.path.id, managed: true }, rootDefinition: parentDefinition, logger, }); @@ -150,7 +152,7 @@ async function updateParentStream( async function validateStreamChildren( scopedClusterClient: IScopedClusterClient, id: string, - children: Array<{ id: string }> + children: StreamDefinition['children'] ) { try { const { definition: oldDefinition } = await readStream({ @@ -159,6 +161,9 @@ async function validateStreamChildren( }); const oldChildren = oldDefinition.children.map((child) => child.id); const newChildren = new Set(children.map((child) => child.id)); + children.forEach((child) => { + validateCondition(child.condition); + }); if (oldChildren.some((child) => !newChildren.has(child))) { throw new MalformedChildren( 'Cannot remove children from a stream, please delete the stream instead' diff --git a/x-pack/plugins/streams/server/routes/streams/fork.ts b/x-pack/plugins/streams/server/routes/streams/fork.ts index 12dce248dcdd1..070dc66b9ab10 100644 --- a/x-pack/plugins/streams/server/routes/streams/fork.ts +++ b/x-pack/plugins/streams/server/routes/streams/fork.ts @@ -18,6 +18,7 @@ import { conditionSchema, streamDefinitonWithoutChildrenSchema } from '../../../ import { syncStream, readStream, validateAncestorFields } from '../../lib/streams/stream_crud'; import { MalformedStreamId } from '../../lib/streams/errors/malformed_stream_id'; import { isChildOf } from '../../lib/streams/helpers/hierarchy'; +import { validateCondition } from '../../lib/streams/helpers/condition_fields'; export const forkStreamsRoute = createServerRoute({ endpoint: 'POST /api/streams/{id}/_fork', @@ -48,6 +49,8 @@ export const forkStreamsRoute = createServerRoute({ throw new ForkConditionMissing('You must provide a condition to fork a stream'); } + validateCondition(params.body.condition); + const { scopedClusterClient } = await getScopedClients({ request }); const { definition: rootDefinition } = await readStream({ @@ -55,7 +58,7 @@ export const forkStreamsRoute = createServerRoute({ id: params.path.id, }); - const childDefinition = { ...params.body.stream, children: [] }; + const childDefinition = { ...params.body.stream, children: [], managed: true }; // check whether root stream has a child of the given name already if (rootDefinition.children.some((child) => child.id === childDefinition.id)) { diff --git a/x-pack/plugins/streams/server/routes/streams/list.ts b/x-pack/plugins/streams/server/routes/streams/list.ts index d3b88ffc36a45..774a256e5ba4a 100644 --- a/x-pack/plugins/streams/server/routes/streams/list.ts +++ b/x-pack/plugins/streams/server/routes/streams/list.ts @@ -52,9 +52,11 @@ export interface StreamTree { children: StreamTree[]; } -function asTrees(definitions: Array<{ id: string }>) { +function asTrees(definitions: Array<{ id: string; managed?: boolean }>) { const trees: StreamTree[] = []; - const ids = definitions.map((definition) => definition.id); + const ids = definitions + .filter((definition) => definition.managed) + .map((definition) => definition.id); ids.sort((a, b) => a.split('.').length - b.split('.').length); diff --git a/x-pack/plugins/streams/server/routes/streams/read.ts b/x-pack/plugins/streams/server/routes/streams/read.ts index b9d21ef25b673..dbbda8c0dc5de 100644 --- a/x-pack/plugins/streams/server/routes/streams/read.ts +++ b/x-pack/plugins/streams/server/routes/streams/read.ts @@ -7,10 +7,10 @@ import { z } from '@kbn/zod'; import { notFound, internal } from '@hapi/boom'; +import { ReadStreamDefinition } from '../../../common/types'; import { createServerRoute } from '../create_server_route'; import { DefinitionNotFound } from '../../lib/streams/errors'; import { readAncestors, readStream } from '../../lib/streams/stream_crud'; -import { StreamDefinition } from '../../../common'; export const readStreamRoute = createServerRoute({ endpoint: 'GET /api/streams/{id}', @@ -33,11 +33,7 @@ export const readStreamRoute = createServerRoute({ request, logger, getScopedClients, - }): Promise< - StreamDefinition & { - inheritedFields: Array; - } - > => { + }): Promise => { try { const { scopedClusterClient } = await getScopedClients({ request }); const streamEntity = await readStream({ @@ -45,6 +41,13 @@ export const readStreamRoute = createServerRoute({ id: params.path.id, }); + if (streamEntity.definition.managed === false) { + return { + ...streamEntity.definition, + inheritedFields: [], + }; + } + const { ancestors } = await readAncestors({ id: streamEntity.definition.id, scopedClusterClient, diff --git a/x-pack/plugins/streams/server/routes/streams/sample.ts b/x-pack/plugins/streams/server/routes/streams/sample.ts new file mode 100644 index 0000000000000..cd3a989c29109 --- /dev/null +++ b/x-pack/plugins/streams/server/routes/streams/sample.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 { z } from '@kbn/zod'; +import { notFound, internal } from '@hapi/boom'; +import { conditionSchema } from '../../../common/types'; +import { createServerRoute } from '../create_server_route'; +import { DefinitionNotFound } from '../../lib/streams/errors'; +import { checkReadAccess } from '../../lib/streams/stream_crud'; +import { conditionToQueryDsl } from '../../lib/streams/helpers/condition_to_query_dsl'; +import { getFields, isComplete } from '../../lib/streams/helpers/condition_fields'; + +export const sampleStreamRoute = createServerRoute({ + endpoint: 'POST /api/streams/{id}/_sample', + options: { + access: 'internal', + }, + security: { + authz: { + enabled: false, + reason: + 'This API delegates security to the currently logged in user and their Elasticsearch permissions.', + }, + }, + params: z.object({ + path: z.object({ id: z.string() }), + body: z.object({ + condition: z.optional(conditionSchema), + start: z.optional(z.number()), + end: z.optional(z.number()), + number: z.optional(z.number()), + }), + }), + handler: async ({ + response, + params, + request, + logger, + getScopedClients, + }): Promise<{ documents: unknown[] }> => { + try { + const { scopedClusterClient } = await getScopedClients({ request }); + + const hasAccess = await checkReadAccess({ id: params.path.id, scopedClusterClient }); + if (!hasAccess) { + throw new DefinitionNotFound(`Stream definition for ${params.path.id} not found.`); + } + const searchBody = { + query: { + bool: { + must: [ + isComplete(params.body.condition) + ? conditionToQueryDsl(params.body.condition) + : { match_all: {} }, + { + range: { + '@timestamp': { + gte: params.body.start, + lte: params.body.end, + format: 'epoch_millis', + }, + }, + }, + ], + }, + }, + // Conditions could be using fields which are not indexed or they could use it with other types than they are eventually mapped as. + // Because of this we can't rely on mapped fields to draw a sample, instead we need to use runtime fields to simulate what happens during + // ingest in the painless condition checks. + // This is less efficient than it could be - in some cases, these fields _are_ indexed with the right type and we could use them directly. + // This can be optimized in the future. + runtime_mappings: Object.fromEntries( + getFields(params.body.condition).map((field) => [ + field.name, + { type: field.type === 'string' ? 'keyword' : 'double' }, + ]) + ), + sort: [ + { + '@timestamp': { + order: 'desc', + }, + }, + ], + size: params.body.number, + }; + const results = await scopedClusterClient.asCurrentUser.search({ + index: params.path.id, + ...searchBody, + }); + + return { documents: results.hits.hits.map((hit) => hit._source) }; + } catch (e) { + if (e instanceof DefinitionNotFound) { + throw notFound(e); + } + + throw internal(e); + } + }, +}); diff --git a/x-pack/plugins/streams_app/.storybook/get_mock_streams_app_context.tsx b/x-pack/plugins/streams_app/.storybook/get_mock_streams_app_context.tsx index 1660042b2cb66..cb3148a7f6644 100644 --- a/x-pack/plugins/streams_app/.storybook/get_mock_streams_app_context.tsx +++ b/x-pack/plugins/streams_app/.storybook/get_mock_streams_app_context.tsx @@ -12,6 +12,7 @@ import type { StreamsPluginStart } from '@kbn/streams-plugin/public'; import type { ObservabilitySharedPluginStart } from '@kbn/observability-shared-plugin/public'; import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; import type { SharePublicStart } from '@kbn/share-plugin/public/plugin'; +import { NavigationPublicStart } from '@kbn/navigation-plugin/public/types'; import type { StreamsAppKibanaContext } from '../public/hooks/use_kibana'; export function getMockStreamsAppContext(): StreamsAppKibanaContext { @@ -27,6 +28,7 @@ export function getMockStreamsAppContext(): StreamsAppKibanaContext { unifiedSearch: {} as unknown as UnifiedSearchPublicPluginStart, streams: {} as unknown as StreamsPluginStart, share: {} as unknown as SharePublicStart, + navigation: {} as unknown as NavigationPublicStart, }, }, services: { diff --git a/x-pack/plugins/streams_app/kibana.jsonc b/x-pack/plugins/streams_app/kibana.jsonc index 16666084c53e5..09f356f0654ba 100644 --- a/x-pack/plugins/streams_app/kibana.jsonc +++ b/x-pack/plugins/streams_app/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/streams-app-plugin", - "owner": "@simianhacker @flash1293 @dgieselaar", + "owner": "@elastic/streams-program-team", "group": "observability", "visibility": "private", "plugin": { @@ -15,7 +15,8 @@ "data", "dataViews", "unifiedSearch", - "share" + "share", + "navigation" ], "requiredBundles": [ "kibanaReact" diff --git a/x-pack/plugins/streams_app/public/components/assets/illustration.png b/x-pack/plugins/streams_app/public/components/assets/illustration.png new file mode 100644 index 0000000000000..58b0f61a94399 Binary files /dev/null and b/x-pack/plugins/streams_app/public/components/assets/illustration.png differ diff --git a/x-pack/plugins/streams_app/public/components/condition_editor/index.tsx b/x-pack/plugins/streams_app/public/components/condition_editor/index.tsx new file mode 100644 index 0000000000000..e7e2a79b59294 --- /dev/null +++ b/x-pack/plugins/streams_app/public/components/condition_editor/index.tsx @@ -0,0 +1,297 @@ +/* + * 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 { + EuiBadge, + EuiFieldText, + EuiFlexGroup, + EuiFlexItem, + EuiPanel, + EuiSelect, + EuiSwitch, + EuiText, +} from '@elastic/eui'; +import { + AndCondition, + BinaryFilterCondition, + Condition, + FilterCondition, + OrCondition, +} from '@kbn/streams-plugin/common/types'; +import React, { useEffect } from 'react'; +import { i18n } from '@kbn/i18n'; +import { css } from '@emotion/css'; +import { CodeEditor } from '@kbn/code-editor'; + +export function ConditionEditor(props: { + condition: Condition; + readonly?: boolean; + onConditionChange?: (condition: Condition) => void; +}) { + if (!props.condition) { + return null; + } + if (props.readonly) { + return ( + + + + ); + } + return ( + {})} + /> + ); +} + +export function ConditionForm(props: { + condition: Condition; + onConditionChange: (condition: Condition) => void; +}) { + const [syntaxEditor, setSyntaxEditor] = React.useState(() => + Boolean(props.condition && !('operator' in props.condition)) + ); + const [jsonCondition, setJsonCondition] = React.useState(() => + JSON.stringify(props.condition, null, 2) + ); + useEffect(() => { + if (!syntaxEditor && props.condition) { + setJsonCondition(JSON.stringify(props.condition, null, 2)); + } + }, [syntaxEditor, props.condition]); + return ( + + + + + {i18n.translate('xpack.streams.conditionEditor.title', { defaultMessage: 'Condition' })} + + + setSyntaxEditor(!syntaxEditor)} + /> + + {syntaxEditor ? ( + { + setJsonCondition(e); + try { + const condition = JSON.parse(e); + props.onConditionChange(condition); + } catch (error: unknown) { + // do nothing + } + }} + /> + ) : ( + props.condition && + ('operator' in props.condition ? ( + + ) : ( +
          {JSON.stringify(props.condition, null, 2)}
          + )) + )} +
          + ); +} + +const operatorMap = { + eq: i18n.translate('xpack.streams.filter.equals', { defaultMessage: 'equals' }), + neq: i18n.translate('xpack.streams.filter.notEquals', { defaultMessage: 'not equals' }), + lt: i18n.translate('xpack.streams.filter.lessThan', { defaultMessage: 'less than' }), + lte: i18n.translate('xpack.streams.filter.lessThanOrEquals', { + defaultMessage: 'less than or equals', + }), + gt: i18n.translate('xpack.streams.filter.greaterThan', { defaultMessage: 'greater than' }), + gte: i18n.translate('xpack.streams.filter.greaterThanOrEquals', { + defaultMessage: 'greater than or equals', + }), + contains: i18n.translate('xpack.streams.filter.contains', { defaultMessage: 'contains' }), + startsWith: i18n.translate('xpack.streams.filter.startsWith', { defaultMessage: 'starts with' }), + endsWith: i18n.translate('xpack.streams.filter.endsWith', { defaultMessage: 'ends with' }), + exists: i18n.translate('xpack.streams.filter.exists', { defaultMessage: 'exists' }), + notExists: i18n.translate('xpack.streams.filter.notExists', { defaultMessage: 'not exists' }), +}; + +function FilterForm(props: { + condition: FilterCondition; + onConditionChange: (condition: FilterCondition) => void; +}) { + return ( + + + { + props.onConditionChange({ ...props.condition, field: e.target.value }); + }} + /> + + + ({ + value, + text, + })) as Array<{ value: FilterCondition['operator']; text: string }> + } + value={props.condition.operator} + compressed + onChange={(e) => { + const newCondition: Partial = { + ...props.condition, + }; + + const newOperator = e.target.value as FilterCondition['operator']; + if ( + 'value' in newCondition && + (newOperator === 'exists' || newOperator === 'notExists') + ) { + delete newCondition.value; + } else if (!('value' in newCondition)) { + (newCondition as BinaryFilterCondition).value = ''; + } + props.onConditionChange({ + ...newCondition, + operator: newOperator, + } as FilterCondition); + }} + /> + + + {'value' in props.condition && ( + + { + props.onConditionChange({ + ...props.condition, + value: e.target.value, + } as BinaryFilterCondition); + }} + /> + + )} + + ); +} + +export function ConditionDisplay(props: { condition: Condition }) { + if (!props.condition) { + return null; + } + return ( + <> + {'or' in props.condition ? ( + + ) : 'and' in props.condition ? ( + + ) : ( + + )} + + ); +} + +function OrDisplay(props: { condition: OrCondition }) { + return ( +
          + {i18n.translate('xpack.streams.orDisplay.orLabel', { defaultMessage: 'Or' })} +
          + {props.condition.or.map((condition, index) => ( + + ))} +
          +
          + ); +} + +function AndDisplay(props: { condition: AndCondition }) { + return ( +
          + {i18n.translate('xpack.streams.andDisplay.andLabel', { defaultMessage: 'And' })} +
          + {props.condition.and.map((condition, index) => ( + + ))} +
          +
          + ); +} + +function FilterDisplay(props: { condition: FilterCondition }) { + return ( + + + {i18n.translate('xpack.streams.filter.field', { defaultMessage: 'Field' })} + + {props.condition.field} + + {i18n.translate('xpack.streams.filter.operator', { defaultMessage: 'Operator' })} + + {props.condition.operator} + {'value' in props.condition && ( + <> + + {i18n.translate('xpack.streams.filter.value', { defaultMessage: 'Value' })} + + {props.condition.value} + + )} + + ); +} diff --git a/x-pack/plugins/streams_app/public/components/entity_detail_view/index.tsx b/x-pack/plugins/streams_app/public/components/entity_detail_view/index.tsx index 68c5f9d6798ec..4e1ec87866aee 100644 --- a/x-pack/plugins/streams_app/public/components/entity_detail_view/index.tsx +++ b/x-pack/plugins/streams_app/public/components/entity_detail_view/index.tsx @@ -4,9 +4,11 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiLink, EuiPanel } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiLink, EuiPanel, EuiBadge } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; +import { css } from '@emotion/css'; +import { StreamDefinition } from '@kbn/streams-plugin/common'; import { useStreamsAppBreadcrumbs } from '../../hooks/use_streams_app_breadcrumbs'; import { useStreamsAppRouter } from '../../hooks/use_streams_app_router'; import { EntityOverviewTabList } from '../entity_overview_tab_list'; @@ -25,6 +27,7 @@ export function EntityDetailViewWithoutParams({ selectedTab, tabs, entity, + definition, }: { selectedTab: string; tabs: EntityViewTab[]; @@ -32,6 +35,7 @@ export function EntityDetailViewWithoutParams({ displayName?: string; id: string; }; + definition?: StreamDefinition; }) { const router = useStreamsAppRouter(); useStreamsAppBreadcrumbs(() => { @@ -70,7 +74,13 @@ export function EntityDetailViewWithoutParams({ const selectedTabObject = tabMap[selectedTab]; return ( - + @@ -86,7 +96,26 @@ export function EntityDetailViewWithoutParams({ } + title={ + + {entity.displayName} + {definition && !definition.managed ? ( + <> + {' '} + + {i18n.translate( + 'xpack.streams.entityDetailViewWithoutParams.unmanagedBadgeLabel', + { defaultMessage: 'Unmanaged' } + )} + + + ) : null} + + } + /> + } > { diff --git a/x-pack/plugins/streams_app/public/components/nested_view/index.tsx b/x-pack/plugins/streams_app/public/components/nested_view/index.tsx new file mode 100644 index 0000000000000..e19a97053f080 --- /dev/null +++ b/x-pack/plugins/streams_app/public/components/nested_view/index.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 { css } from '@emotion/css'; +import { euiThemeVars } from '@kbn/ui-theme'; + +const borderSpec = `1px solid ${euiThemeVars.euiColorLightShade}`; + +export function NestedView({ children, last }: { children: React.ReactNode; last?: boolean }) { + return ( +
          +
          + {children} +
          + ); +} diff --git a/x-pack/plugins/streams_app/public/components/preview_table/index.tsx b/x-pack/plugins/streams_app/public/components/preview_table/index.tsx new file mode 100644 index 0000000000000..22db6ff294079 --- /dev/null +++ b/x-pack/plugins/streams_app/public/components/preview_table/index.tsx @@ -0,0 +1,71 @@ +/* + * 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 { EuiDataGrid } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import React, { useEffect, useMemo, useState } from 'react'; + +export function PreviewTable({ documents }: { documents: unknown[] }) { + const [height, setHeight] = useState('100px'); + useEffect(() => { + // set height to 100% after a short delay otherwise it doesn't calculate correctly + // TODO: figure out a better way to do this + setTimeout(() => { + setHeight(`100%`); + }, 50); + }, []); + + const columns = useMemo(() => { + const cols = new Set(); + documents.forEach((doc) => { + if (!doc || typeof doc !== 'object') { + return; + } + Object.keys(doc).forEach((key) => { + cols.add(key); + }); + }); + return Array.from(cols); + }, [documents]); + + const gridColumns = useMemo(() => { + return Array.from(columns).map((column) => ({ + id: column, + displayAsText: column, + })); + }, [columns]); + + return ( + {}, + canDragAndDropColumns: false, + }} + toolbarVisibility={false} + rowCount={documents.length} + height={height} + renderCellValue={({ rowIndex, columnId }) => { + const doc = documents[rowIndex]; + if (!doc || typeof doc !== 'object') { + return ''; + } + const value = (doc as Record)[columnId]; + if (value === undefined || value === null) { + return ''; + } + if (typeof value === 'object') { + return JSON.stringify(value); + } + return String(value); + }} + /> + ); +} diff --git a/x-pack/plugins/streams_app/public/components/stream_delete_modal/index.tsx b/x-pack/plugins/streams_app/public/components/stream_delete_modal/index.tsx new file mode 100644 index 0000000000000..5b6c04fa805a9 --- /dev/null +++ b/x-pack/plugins/streams_app/public/components/stream_delete_modal/index.tsx @@ -0,0 +1,121 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { + EuiButton, + EuiButtonEmpty, + EuiFlexGroup, + EuiModal, + EuiModalBody, + EuiModalFooter, + EuiModalHeader, + EuiModalHeaderTitle, + EuiText, + useGeneratedHtmlId, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { useAbortController } from '@kbn/observability-utils-browser/hooks/use_abort_controller'; +import React from 'react'; +import { useKibana } from '../../hooks/use_kibana'; + +export function StreamDeleteModal({ + closeModal, + clearChildUnderEdit, + refreshDefinition, + id, +}: { + closeModal: () => void; + clearChildUnderEdit: () => void; + refreshDefinition: () => void; + id: string; +}) { + const { + core: { notifications }, + dependencies: { + start: { + streams: { streamsRepositoryClient }, + }, + }, + } = useKibana(); + const abortController = useAbortController(); + const [deleteInProgress, setDeleteInProgress] = React.useState(false); + const modalTitleId = useGeneratedHtmlId(); + return ( + + + + {i18n.translate('xpack.streams.streamDetailRouting.deleteModalTitle', { + defaultMessage: 'Are you sure you want to delete this data stream?', + })} + + + + + + {i18n.translate('xpack.streams.streamDetailRouting.deleteModalDescription', { + defaultMessage: + 'Deleting this stream will remove all of its children and the data will no longer be routed. All existing data will be removed as well.', + })} + + + + + + + {i18n.translate('xpack.streams.streamDetailRouting.deleteModalCancel', { + defaultMessage: 'Cancel', + })} + + { + try { + setDeleteInProgress(true); + await streamsRepositoryClient.fetch('DELETE /api/streams/{id}', { + signal: abortController.signal, + params: { + path: { + id, + }, + }, + }); + setDeleteInProgress(false); + notifications.toasts.addSuccess({ + title: i18n.translate('xpack.streams.streamDetailRouting.deleted', { + defaultMessage: 'Stream deleted', + }), + }); + clearChildUnderEdit(); + closeModal(); + refreshDefinition(); + } catch (error) { + setDeleteInProgress(false); + notifications.toasts.addError(error, { + title: i18n.translate('xpack.streams.failedToDelete', { + defaultMessage: 'Failed to delete stream {id}', + values: { + id, + }, + }), + }); + } + }} + isLoading={deleteInProgress} + > + {i18n.translate('xpack.streams.streamDetailRouting.delete', { + defaultMessage: 'Delete', + })} + + + + + ); +} diff --git a/x-pack/plugins/streams_app/public/components/stream_detail_management/index.tsx b/x-pack/plugins/streams_app/public/components/stream_detail_management/index.tsx index 534d883905b17..1e66490bca3c9 100644 --- a/x-pack/plugins/streams_app/public/components/stream_detail_management/index.tsx +++ b/x-pack/plugins/streams_app/public/components/stream_detail_management/index.tsx @@ -6,14 +6,16 @@ */ import React from 'react'; import { i18n } from '@kbn/i18n'; -import { StreamDefinition } from '@kbn/streams-plugin/common'; -import { EuiButtonGroup, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { ReadStreamDefinition, StreamDefinition } from '@kbn/streams-plugin/common'; +import { css } from '@emotion/css'; +import { EuiButtonGroup, EuiFlexGroup, EuiFlexItem, EuiListGroup, EuiText } from '@elastic/eui'; import { useStreamsAppParams } from '../../hooks/use_streams_app_params'; import { RedirectTo } from '../redirect_to'; import { useStreamsAppRouter } from '../../hooks/use_streams_app_router'; import { StreamDetailRouting } from '../stream_detail_routing'; import { StreamDetailEnriching } from '../stream_detail_enriching'; import { StreamDetailSchemaEditor } from '../stream_detail_schema_editor'; +import { useKibana } from '../../hooks/use_kibana'; type ManagementSubTabs = 'route' | 'enrich' | 'schemaEditor'; @@ -25,7 +27,7 @@ export function StreamDetailManagement({ definition, refreshDefinition, }: { - definition?: StreamDefinition; + definition?: ReadStreamDefinition; refreshDefinition: () => void; }) { const { @@ -33,6 +35,18 @@ export function StreamDetailManagement({ } = useStreamsAppParams('/{key}/management/{subtab}'); const router = useStreamsAppRouter(); + if (subtab === 'overview') { + if (!definition) { + return null; + } + if (definition.managed) { + return ( + + ); + } + return ; + } + const tabs = { route: { content: ( @@ -66,10 +80,25 @@ export function StreamDetailManagement({ ); } + if (!definition?.managed) { + return ( + + ); + } + const selectedTabObject = tabs[subtab]; return ( - + - {selectedTabObject.content} + + {selectedTabObject.content} + + + ); +} + +function assetToLink(asset: { type: string; id: string }) { + switch (asset.type) { + case 'index_template': + return `/app/management/data/index_management/templates/${asset.id}`; + case 'component_template': + return `/app/management/data/index_management/component_templates/${asset.id}`; + case 'data_stream': + return `/app/management/data/index_management/data_streams/${asset.id}`; + case 'ingest_pipeline': + return `/app/management/ingest/ingest_pipelines?pipeline=${asset.id}`; + default: + return ''; + } +} + +function assetToTitle(asset: { type: string; id: string }) { + switch (asset.type) { + case 'index_template': + return i18n.translate('xpack.streams.streamDetailView.indexTemplate', { + defaultMessage: 'Index template', + }); + case 'component_template': + return i18n.translate('xpack.streams.streamDetailView.componentTemplate', { + defaultMessage: 'Component template', + }); + case 'data_stream': + return i18n.translate('xpack.streams.streamDetailView.dataStream', { + defaultMessage: 'Data stream', + }); + case 'ingest_pipeline': + return i18n.translate('xpack.streams.streamDetailView.ingestPipeline', { + defaultMessage: 'Ingest pipeline', + }); + default: + return ''; + } +} + +function UnmanagedStreamOverview({ definition }: { definition: StreamDefinition }) { + const { + core: { + http: { basePath }, + }, + } = useKibana(); + const groupedAssets = (definition.unmanaged_elasticsearch_assets ?? []).reduce((acc, asset) => { + const title = assetToTitle(asset); + if (title) { + acc[title] = acc[title] ?? []; + acc[title].push(asset); + } + return acc; + }, {} as Record>); + return ( + + +

          + {i18n.translate('xpack.streams.streamDetailView.unmanagedStreamOverview', { + defaultMessage: + 'This stream is not managed. Follow the links to stack management to change the related Elasticsearch objects.', + })} +

          +
          + {Object.entries(groupedAssets).map(([title, assets]) => ( +
          + +

          {title}

          +
          + ({ + label: asset.id, + href: basePath.prepend(assetToLink(asset)), + iconType: 'index', + target: '_blank', + }))} + /> +
          + ))}
          ); } diff --git a/x-pack/plugins/streams_app/public/components/stream_detail_routing/index.tsx b/x-pack/plugins/streams_app/public/components/stream_detail_routing/index.tsx index af65c7eab4235..ca58051f9db2b 100644 --- a/x-pack/plugins/streams_app/public/components/stream_detail_routing/index.tsx +++ b/x-pack/plugins/streams_app/public/components/stream_detail_routing/index.tsx @@ -4,15 +4,778 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { StreamDefinition } from '@kbn/streams-plugin/common'; +import { + EuiButton, + EuiButtonEmpty, + EuiButtonIcon, + EuiFieldText, + EuiFlexGroup, + EuiFlexItem, + EuiFormRow, + EuiIcon, + EuiImage, + EuiLoadingSpinner, + EuiPanel, + EuiResizableContainer, + EuiSpacer, + EuiText, + useEuiTheme, +} from '@elastic/eui'; +import { css } from '@emotion/css'; +import { i18n } from '@kbn/i18n'; +import { useAbortController } from '@kbn/observability-utils-browser/hooks/use_abort_controller'; +import { useDateRange } from '@kbn/observability-utils-browser/hooks/use_date_range'; +import { ReadStreamDefinition } from '@kbn/streams-plugin/common'; import React from 'react'; +import { StreamChild } from '@kbn/streams-plugin/common/types'; +import { AbortableAsyncState } from '@kbn/observability-utils-browser/hooks/use_abortable_async'; +import { useKibana } from '../../hooks/use_kibana'; +import { useStreamsAppFetch } from '../../hooks/use_streams_app_fetch'; +import { StreamsAppSearchBar } from '../streams_app_search_bar'; +import { ConditionEditor } from '../condition_editor'; +import { useDebounced } from '../../util/use_debounce'; +import { useStreamsAppRouter } from '../../hooks/use_streams_app_router'; +import { NestedView } from '../nested_view'; +import illustration from '../assets/illustration.png'; +import { PreviewTable } from '../preview_table'; +import { StreamDeleteModal } from '../stream_delete_modal'; + +function useRoutingState() { + const [childUnderEdit, setChildUnderEdit] = React.useState< + { isNew: boolean; child: StreamChild } | undefined + >(); + + const debouncedChildUnderEdit = useDebounced(childUnderEdit, 300); + + const [saveInProgress, setSaveInProgress] = React.useState(false); + const [showDeleteModal, setShowDeleteModal] = React.useState(false); + + return { + debouncedChildUnderEdit, + childUnderEdit, + setChildUnderEdit, + saveInProgress, + setSaveInProgress, + showDeleteModal, + setShowDeleteModal, + }; +} export function StreamDetailRouting({ - definition: _definition, - refreshDefinition: _refreshDefinition, + definition, + refreshDefinition, +}: { + definition?: ReadStreamDefinition; + refreshDefinition: () => void; +}) { + const theme = useEuiTheme().euiTheme; + const routingAppState = useRoutingState(); + + if (!definition) { + return null; + } + + const closeModal = () => routingAppState.setShowDeleteModal(false); + + return ( + <> + {routingAppState.showDeleteModal && routingAppState.childUnderEdit && ( + routingAppState.setChildUnderEdit(undefined)} + refreshDefinition={refreshDefinition} + id={routingAppState.childUnderEdit.child.id} + /> + )} + + + + {(EuiResizablePanel, EuiResizableButton) => ( + <> + + + + + + + + + + + )} + + + + + + + + ); +} + +function ControlBar({ + definition, + routingAppState, + refreshDefinition, }: { - definition?: StreamDefinition; + definition: ReadStreamDefinition; + routingAppState: ReturnType; refreshDefinition: () => void; }) { - return <>{'TODO'}; + const { + core: { notifications }, + dependencies: { + start: { + streams: { streamsRepositoryClient }, + }, + }, + } = useKibana(); + + const { signal } = useAbortController(); + + if (!routingAppState.childUnderEdit) { + return ( + + + {i18n.translate('xpack.streams.streamDetailRouting.save', { + defaultMessage: 'Save', + })} + + + ); + } + + function forkChild() { + if (!routingAppState.childUnderEdit) { + return; + } + return streamsRepositoryClient.fetch('POST /api/streams/{id}/_fork', { + signal, + params: { + path: { + id: definition.id, + }, + body: { + condition: routingAppState.childUnderEdit.child.condition, + stream: { + id: routingAppState.childUnderEdit.child.id, + processing: [], + fields: [], + }, + }, + }, + }); + } + + function updateChild() { + if (!routingAppState.childUnderEdit) { + return; + } + + const childUnderEdit = routingAppState.childUnderEdit.child; + const { inheritedFields, id, ...definitionToUpdate } = definition; + return streamsRepositoryClient.fetch('PUT /api/streams/{id}', { + signal, + params: { + path: { + id: definition.id, + }, + body: { + ...definitionToUpdate, + children: definition.children.map((child) => + child.id === childUnderEdit.id ? childUnderEdit : child + ), + }, + }, + }); + } + + async function saveOrUpdateChild() { + if (!routingAppState.childUnderEdit) { + return; + } + try { + routingAppState.setSaveInProgress(true); + + if (routingAppState.childUnderEdit.isNew) { + await forkChild(); + } else { + await updateChild(); + } + + routingAppState.setSaveInProgress(false); + notifications.toasts.addSuccess({ + title: i18n.translate('xpack.streams.streamDetailRouting.saved', { + defaultMessage: 'Stream saved', + }), + }); + routingAppState.setChildUnderEdit(undefined); + refreshDefinition(); + } catch (error) { + routingAppState.setSaveInProgress(false); + notifications.toasts.addError(error, { + title: i18n.translate('xpack.streams.failedToSave', { + defaultMessage: 'Failed to save', + }), + toastMessage: 'body' in error ? error.body.message : error.message, + }); + } + } + + return ( + + {!routingAppState.childUnderEdit.isNew && ( + <> + { + routingAppState.setShowDeleteModal(true); + }} + > + {i18n.translate('xpack.streams.streamDetailRouting.remove', { + defaultMessage: 'Remove', + })} + + + + )} + { + routingAppState.setChildUnderEdit(undefined); + }} + > + {i18n.translate('xpack.streams.streamDetailRouting.cancel', { + defaultMessage: 'Cancel', + })} + + + {routingAppState.childUnderEdit.isNew + ? i18n.translate('xpack.streams.streamDetailRouting.add', { + defaultMessage: 'Save', + }) + : i18n.translate('xpack.streams.streamDetailRouting.change', { + defaultMessage: 'Change routing', + })} + + + ); +} + +function PreviewPanel({ + definition, + routingAppState, +}: { + definition: ReadStreamDefinition; + routingAppState: ReturnType; +}) { + const { + dependencies: { + start: { + data, + streams: { streamsRepositoryClient }, + }, + }, + } = useKibana(); + + const { + timeRange, + absoluteTimeRange: { start, end }, + setTimeRange, + } = useDateRange({ data }); + + const previewSampleFetch = useStreamsAppFetch( + ({ signal }) => { + if ( + !definition || + !routingAppState.debouncedChildUnderEdit || + !routingAppState.debouncedChildUnderEdit.isNew + ) { + return Promise.resolve({ documents: [] }); + } + return streamsRepositoryClient.fetch('POST /api/streams/{id}/_sample', { + signal, + params: { + path: { + id: definition.id, + }, + body: { + condition: routingAppState.debouncedChildUnderEdit.child.condition, + start: start?.valueOf(), + end: end?.valueOf(), + number: 100, + }, + }, + }); + }, + [definition, routingAppState.debouncedChildUnderEdit, streamsRepositoryClient, start, end], + { + disableToastOnError: true, + } + ); + + let content = ( + + ); + + if (routingAppState.debouncedChildUnderEdit?.isNew) { + if (previewSampleFetch.error) { + content = ( + + + + {i18n.translate('xpack.streams.streamDetail.preview.error', { + defaultMessage: 'Error loading preview', + })} + + + + ); + } else if (previewSampleFetch.value?.documents && previewSampleFetch.value.documents.length) { + content = ( + + + + ); + } + } + + return ( + <> + + + + + + + {i18n.translate('xpack.streams.streamDetail.preview.header', { + defaultMessage: 'Data Preview', + })} + {previewSampleFetch.loading && } + + + + + { + if (!isUpdate) { + previewSampleFetch.refresh(); + return; + } + + if (dateRange) { + setTimeRange({ + from: dateRange.from, + to: dateRange?.to, + mode: dateRange.mode, + }); + } + }} + onRefresh={() => { + previewSampleFetch.refresh(); + }} + dateRangeFrom={timeRange.from} + dateRangeTo={timeRange.to} + /> + + + + + {content} + + ); +} + +function PreviewPanelIllustration({ + previewSampleFetch, + routingAppState, +}: { + routingAppState: ReturnType; + previewSampleFetch: AbortableAsyncState<{ + documents: unknown[]; + }>; +}) { + return ( + + + + {previewSampleFetch.loading ? ( + + + + ) : ( + <> + {routingAppState.debouncedChildUnderEdit && + routingAppState.debouncedChildUnderEdit.isNew && ( + + {i18n.translate('xpack.streams.streamDetail.preview.empty', { + defaultMessage: 'No documents to preview', + })} + + )} + {routingAppState.debouncedChildUnderEdit && + !routingAppState.debouncedChildUnderEdit.isNew && ( + + {i18n.translate('xpack.streams.streamDetail.preview.editPreviewMessage', { + defaultMessage: 'Preview is not available while editing streams', + })} + + )} + {!routingAppState.debouncedChildUnderEdit && ( + <> + + {i18n.translate('xpack.streams.streamDetail.preview.editPreviewMessageEmpty', { + defaultMessage: 'Your preview will appear here', + })} + + + {i18n.translate( + 'xpack.streams.streamDetail.preview.editPreviewMessageEmptyDescription', + { + defaultMessage: + 'Create a new child stream to see what will be routed to it based on the conditions', + } + )} + + + )} + + )} + + + ); +} + +function ChildStreamList({ + definition, + routingAppState: { childUnderEdit, setChildUnderEdit }, +}: { + definition: ReadStreamDefinition; + routingAppState: ReturnType; +}) { + return ( + + + + {i18n.translate('xpack.streams.streamDetailRouting.rules.header', { + defaultMessage: 'Routing rules', + })} + + + + + + {definition.children.map((child, i) => ( + + { + if (child.id === childUnderEdit?.child.id) { + setChildUnderEdit(undefined); + } else { + setChildUnderEdit({ isNew: false, child }); + } + }} + onChildChange={(newChild) => { + setChildUnderEdit({ + isNew: false, + child: newChild, + }); + }} + /> + + ))} + {childUnderEdit?.isNew ? ( + + { + if (!newChild) { + setChildUnderEdit(undefined); + return; + } + setChildUnderEdit({ + isNew: true, + child: newChild, + }); + }} + /> + + ) : ( + + + { + setChildUnderEdit({ + isNew: true, + child: { + id: `${definition.id}.child`, + condition: { + field: '', + operator: 'eq', + value: '', + }, + }, + }); + }} + > + {i18n.translate('xpack.streams.streamDetailRouting.addRule', { + defaultMessage: 'Create a new child stream', + })} + + + + )} + + + ); +} + +function CurrentStreamEntry({ definition }: { definition: ReadStreamDefinition }) { + return ( + + + {definition.id} + + {i18n.translate('xpack.streams.streamDetailRouting.currentStream', { + defaultMessage: 'Current stream', + })} + + + + ); +} + +function PreviousStreamEntry({ definition }: { definition: ReadStreamDefinition }) { + const router = useStreamsAppRouter(); + + const parentId = definition.id.split('.').slice(0, -1).join('.'); + if (parentId === '') { + return null; + } + + return ( + + + + + {i18n.translate('xpack.streams.streamDetailRouting.previousStream', { + defaultMessage: '.. (Previous stream)', + })} + + + + + ); +} + +function RoutingStreamEntry({ + child, + onChildChange, + onEditStateChange, + edit, +}: { + child: StreamChild; + onChildChange: (child: StreamChild) => void; + onEditStateChange: () => void; + edit?: boolean; +}) { + const router = useStreamsAppRouter(); + return ( + + + + {child.id} + + { + onEditStateChange(); + }} + aria-label={i18n.translate('xpack.streams.streamDetailRouting.edit', { + defaultMessage: 'Edit', + })} + /> + + + {child.condition && ( + { + onChildChange({ + ...child, + condition, + }); + }} + /> + )} + {!child.condition && ( + + {i18n.translate('xpack.streams.streamDetailRouting.noCondition', { + defaultMessage: 'No condition, no documents will be routed', + })} + + )} + + ); +} + +function NewRoutingStreamEntry({ + child, + onChildChange, +}: { + child: StreamChild; + onChildChange: (child?: StreamChild) => void; +}) { + return ( + + + + { + onChildChange({ + ...child, + id: e.target.value, + }); + }} + /> + + {child.condition && ( + { + onChildChange({ + ...child, + condition, + }); + }} + /> + )} + {!child.condition && ( + + {i18n.translate('xpack.streams.streamDetailRouting.noCondition', { + defaultMessage: 'No condition, no documents will be routed', + })} + + )} + + + ); } diff --git a/x-pack/plugins/streams_app/public/components/stream_detail_view/index.tsx b/x-pack/plugins/streams_app/public/components/stream_detail_view/index.tsx index 4f213e855c175..b0a2307f7b2b7 100644 --- a/x-pack/plugins/streams_app/public/components/stream_detail_view/index.tsx +++ b/x-pack/plugins/streams_app/public/components/stream_detail_view/index.tsx @@ -14,10 +14,12 @@ import { StreamDetailOverview } from '../stream_detail_overview'; import { StreamDetailManagement } from '../stream_detail_management'; export function StreamDetailView() { - const { path } = useStreamsAppParams('/{key}/*'); + const params1 = useStreamsAppParams('/{key}/{tab}', true); - const key = path.key; - const tab = 'tab' in path ? path.tab : 'management'; + const params2 = useStreamsAppParams('/{key}/management/{subtab}', true); + + const key = params1?.path?.key || params2.path.key; + const tab = params1?.path?.tab || 'management'; const { dependencies: { @@ -63,5 +65,12 @@ export function StreamDetailView() { }, ]; - return ; + return ( + + ); } diff --git a/x-pack/plugins/streams_app/public/components/streams_app_page_body/index.tsx b/x-pack/plugins/streams_app/public/components/streams_app_page_body/index.tsx index 04b44f82df0fd..1718e2e638a51 100644 --- a/x-pack/plugins/streams_app/public/components/streams_app_page_body/index.tsx +++ b/x-pack/plugins/streams_app/public/components/streams_app_page_body/index.tsx @@ -18,6 +18,7 @@ export function StreamsAppPageBody({ children }: { children: React.ReactNode }) border-top: 1px solid ${theme.colors.lightShade}; border-radius: 0px; display: flex; + overflow-y: auto; `} paddingSize="l" > diff --git a/x-pack/plugins/streams_app/public/components/streams_app_page_header/streams_app_page_header_title.tsx b/x-pack/plugins/streams_app/public/components/streams_app_page_header/streams_app_page_header_title.tsx index ff7d6581dea4f..a0fcc554f5133 100644 --- a/x-pack/plugins/streams_app/public/components/streams_app_page_header/streams_app_page_header_title.tsx +++ b/x-pack/plugins/streams_app/public/components/streams_app_page_header/streams_app_page_header_title.tsx @@ -7,7 +7,7 @@ import { EuiTitle } from '@elastic/eui'; import React from 'react'; -export function StreamsAppPageHeaderTitle({ title }: { title: string }) { +export function StreamsAppPageHeaderTitle({ title }: { title: React.ReactNode }) { return (

          {title}

          diff --git a/x-pack/plugins/streams_app/public/components/streams_app_page_template/index.tsx b/x-pack/plugins/streams_app/public/components/streams_app_page_template/index.tsx index 942d2937dba81..280c32841811a 100644 --- a/x-pack/plugins/streams_app/public/components/streams_app_page_template/index.tsx +++ b/x-pack/plugins/streams_app/public/components/streams_app_page_template/index.tsx @@ -6,23 +6,32 @@ */ import { css } from '@emotion/css'; import React from 'react'; -import { EuiPanel, EuiSpacer } from '@elastic/eui'; +import { EuiPanel } from '@elastic/eui'; +import useObservable from 'react-use/lib/useObservable'; import { useKibana } from '../../hooks/use_kibana'; export function StreamsAppPageTemplate({ children }: { children: React.ReactNode }) { const { dependencies: { - start: { observabilityShared }, + start: { observabilityShared, navigation }, }, } = useKibana(); const { PageTemplate } = observabilityShared.navigation; + const isSolutionNavEnabled = useObservable(navigation.isSolutionNavEnabled$); + return ( - {children} diff --git a/x-pack/plugins/streams_app/public/components/streams_app_search_bar/index.tsx b/x-pack/plugins/streams_app/public/components/streams_app_search_bar/index.tsx index 563fb752efbd5..cd07f540f3ba1 100644 --- a/x-pack/plugins/streams_app/public/components/streams_app_search_bar/index.tsx +++ b/x-pack/plugins/streams_app/public/components/streams_app_search_bar/index.tsx @@ -4,17 +4,12 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { css } from '@emotion/css'; import type { TimeRange } from '@kbn/es-query'; import { SearchBar } from '@kbn/unified-search-plugin/public'; import React, { useMemo } from 'react'; import type { DataView } from '@kbn/data-views-plugin/common'; import { useKibana } from '../../hooks/use_kibana'; -const parentClassName = css` - width: 100%; -`; - interface Props { query?: string; dateRangeFrom?: string; @@ -47,32 +42,30 @@ export function StreamsAppSearchBar({ const showQueryInput = query === undefined; return ( -
          - { - onQuerySubmit?.( - { dateRange, query: (nextQuery?.query as string | undefined) ?? '' }, - isUpdate - ); - }} - onQueryChange={({ dateRange, query: nextQuery }) => { - onQueryChange?.({ dateRange, query: (nextQuery?.query as string | undefined) ?? '' }); - }} - query={queryObj} - showQueryInput={showQueryInput} - showFilterBar={false} - showQueryMenu={false} - showDatePicker={Boolean(dateRangeFrom && dateRangeTo)} - showSubmitButton={true} - dateRangeFrom={dateRangeFrom} - dateRangeTo={dateRangeTo} - onRefresh={onRefresh} - displayStyle="inPage" - disableQueryLanguageSwitcher - placeholder={placeholder} - indexPatterns={dataViews} - /> -
          + { + onQuerySubmit?.( + { dateRange, query: (nextQuery?.query as string | undefined) ?? '' }, + isUpdate + ); + }} + onQueryChange={({ dateRange, query: nextQuery }) => { + onQueryChange?.({ dateRange, query: (nextQuery?.query as string | undefined) ?? '' }); + }} + query={queryObj} + showQueryInput={showQueryInput} + showFilterBar={false} + showQueryMenu={false} + showDatePicker={Boolean(dateRangeFrom && dateRangeTo)} + showSubmitButton={true} + dateRangeFrom={dateRangeFrom} + dateRangeTo={dateRangeTo} + onRefresh={onRefresh} + displayStyle="inPage" + disableQueryLanguageSwitcher + placeholder={placeholder} + indexPatterns={dataViews} + /> ); } diff --git a/x-pack/plugins/streams_app/public/components/streams_table/index.tsx b/x-pack/plugins/streams_app/public/components/streams_table/index.tsx index f92c94f115e9b..39814ed904555 100644 --- a/x-pack/plugins/streams_app/public/components/streams_table/index.tsx +++ b/x-pack/plugins/streams_app/public/components/streams_table/index.tsx @@ -46,10 +46,10 @@ export function StreamsTable({ name: i18n.translate('xpack.streams.streamsTable.nameColumnTitle', { defaultMessage: 'Name', }), - render: (_, { id }) => { + render: (_, { id, managed }) => { return ( - + ), }, @@ -68,6 +68,15 @@ const streamsAppRoutes = { }), }), }, + '/{key}/{tab}/{subtab}': { + element: , + params: t.type({ + path: t.type({ + tab: t.string, + subtab: t.string, + }), + }), + }, }, }, '/': { diff --git a/x-pack/plugins/streams_app/public/types.ts b/x-pack/plugins/streams_app/public/types.ts index 58d44784fe031..680dd008d2e1f 100644 --- a/x-pack/plugins/streams_app/public/types.ts +++ b/x-pack/plugins/streams_app/public/types.ts @@ -16,6 +16,7 @@ import type { import type { StreamsPluginSetup, StreamsPluginStart } from '@kbn/streams-plugin/public'; import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; import type { SharePublicSetup, SharePublicStart } from '@kbn/share-plugin/public/plugin'; +import { NavigationPublicStart } from '@kbn/navigation-plugin/public/types'; /* eslint-disable @typescript-eslint/no-empty-interface*/ export interface ConfigSchema {} @@ -36,6 +37,7 @@ export interface StreamsAppStartDependencies { observabilityShared: ObservabilitySharedPluginStart; unifiedSearch: UnifiedSearchPublicPluginStart; share: SharePublicStart; + navigation: NavigationPublicStart; } export interface StreamsAppPublicSetup {} diff --git a/x-pack/plugins/streams_app/public/util/use_debounce.ts b/x-pack/plugins/streams_app/public/util/use_debounce.ts new file mode 100644 index 0000000000000..eee9accd2e29e --- /dev/null +++ b/x-pack/plugins/streams_app/public/util/use_debounce.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 useDebounce from 'react-use/lib/useDebounce'; +import { useState } from 'react'; + +export function useDebounced(value: T, debounceDelay: number = 300) { + const [debouncedValue, setValue] = useState(value); + + useDebounce( + () => { + setValue(value); + }, + debounceDelay, + [value, setValue] + ); + + return debouncedValue; +} diff --git a/x-pack/plugins/streams_app/tsconfig.json b/x-pack/plugins/streams_app/tsconfig.json index 39acb94665ae5..cba6a2d993bd4 100644 --- a/x-pack/plugins/streams_app/tsconfig.json +++ b/x-pack/plugins/streams_app/tsconfig.json @@ -33,5 +33,8 @@ "@kbn/streams-plugin", "@kbn/share-plugin", "@kbn/observability-utils-server", + "@kbn/code-editor", + "@kbn/ui-theme", + "@kbn/navigation-plugin", ] } diff --git a/x-pack/plugins/task_manager/server/index.ts b/x-pack/plugins/task_manager/server/index.ts index 79ec16b52987f..f2ad559f02b9c 100644 --- a/x-pack/plugins/task_manager/server/index.ts +++ b/x-pack/plugins/task_manager/server/index.ts @@ -104,4 +104,13 @@ export const config: PluginConfigDescriptor = { }, ]; }, + exposeToUsage: { + claim_strategy: true, + discovery: { + active_nodes_lookback: true, + }, + unsafe: { + exclude_task_types: true, + }, + }, }; diff --git a/x-pack/plugins/task_manager/server/task_store.test.ts b/x-pack/plugins/task_manager/server/task_store.test.ts index cbb1c44dde3fc..029aa2b1760ce 100644 --- a/x-pack/plugins/task_manager/server/task_store.test.ts +++ b/x-pack/plugins/task_manager/server/task_store.test.ts @@ -555,7 +555,14 @@ describe('TaskStore', () => { body: { size: 0, query: { - bool: { filter: [{ term: { type: 'task' } }, { term: { 'task.enabled': true } }] }, + bool: { + filter: { + bool: { + must: [{ term: { type: 'task' } }, { term: { 'task.enabled': true } }], + must_not: [{ term: { 'task.status': 'unrecognized' } }], + }, + }, + }, }, aggs: { testAgg: { terms: { field: 'task.taskType' } } }, }, @@ -578,7 +585,12 @@ describe('TaskStore', () => { must: [ { bool: { - filter: [{ term: { type: 'task' } }, { term: { 'task.enabled': true } }], + filter: { + bool: { + must: [{ term: { type: 'task' } }, { term: { 'task.enabled': true } }], + must_not: [{ term: { 'task.status': 'unrecognized' } }], + }, + }, }, }, { term: { 'task.taskType': 'bar' } }, @@ -600,7 +612,14 @@ describe('TaskStore', () => { body: { size: 0, query: { - bool: { filter: [{ term: { type: 'task' } }, { term: { 'task.enabled': true } }] }, + bool: { + filter: { + bool: { + must: [{ term: { type: 'task' } }, { term: { 'task.enabled': true } }], + must_not: [{ term: { 'task.status': 'unrecognized' } }], + }, + }, + }, }, aggs: { testAgg: { terms: { field: 'task.taskType' } } }, runtime_mappings: { testMapping: { type: 'long', script: { source: `` } } }, diff --git a/x-pack/plugins/task_manager/server/task_store.ts b/x-pack/plugins/task_manager/server/task_store.ts index 0946c5c18d328..6c48f3bd7552d 100644 --- a/x-pack/plugins/task_manager/server/task_store.ts +++ b/x-pack/plugins/task_manager/server/task_store.ts @@ -34,6 +34,7 @@ import { ConcreteTaskInstance, ConcreteTaskInstanceVersion, TaskInstance, + TaskStatus, TaskLifecycle, TaskLifecycleResult, SerializedConcreteTaskInstance, @@ -842,7 +843,12 @@ function ensureAggregationOnlyReturnsEnabledTaskObjects(opts: AggregationOpts): const originalQuery = opts.query; const filterToOnlyTasks = { bool: { - filter: [{ term: { type: 'task' } }, { term: { 'task.enabled': true } }], + filter: { + bool: { + must: [{ term: { type: 'task' } }, { term: { 'task.enabled': true } }], + must_not: [{ term: { 'task.status': TaskStatus.Unrecognized } }], + }, + }, }, }; const query = originalQuery diff --git a/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json b/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json index 257ad9c3af07b..b086844792217 100644 --- a/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json +++ b/x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @@ -15224,6 +15224,12 @@ } } }, + "fipsModeEnabled": { + "type": "boolean", + "_meta": { + "description": "Indicates if Kibana is being run in FIPS mode." + } + }, "httpAuthSchemes": { "type": "array", "items": { diff --git a/x-pack/plugins/threat_intelligence/scripts/generate_indicators.js b/x-pack/plugins/threat_intelligence/scripts/generate_indicators.js index 0d5c170965fe7..daa869c76cf70 100644 --- a/x-pack/plugins/threat_intelligence/scripts/generate_indicators.js +++ b/x-pack/plugins/threat_intelligence/scripts/generate_indicators.js @@ -6,7 +6,7 @@ */ const { Client } = require('@elastic/elasticsearch'); -const faker = require('faker'); +const { faker } = require('@faker-js/faker'); const THREAT_INDEX = 'logs-ti'; diff --git a/x-pack/plugins/timelines/server/types.ts b/x-pack/plugins/timelines/server/types.ts index 311281f67ea2a..b412b69be9737 100644 --- a/x-pack/plugins/timelines/server/types.ts +++ b/x-pack/plugins/timelines/server/types.ts @@ -6,7 +6,7 @@ */ import type { PluginSetup, PluginStart } from '@kbn/data-plugin/server'; -import { PluginStartContract as AlertingPluginStartContract } from '@kbn/alerting-plugin/server'; +import { AlertingServerStart } from '@kbn/alerting-plugin/server'; import { SecurityPluginSetup } from '@kbn/security-plugin/server'; // eslint-disable-next-line @typescript-eslint/no-empty-interface @@ -21,5 +21,5 @@ export interface SetupPlugins { export interface StartPlugins { data: PluginStart; - alerting: AlertingPluginStartContract; + alerting: AlertingServerStart; } diff --git a/x-pack/plugins/transform/server/lib/alerting/transform_health_rule_type/register_transform_health_rule_type.ts b/x-pack/plugins/transform/server/lib/alerting/transform_health_rule_type/register_transform_health_rule_type.ts index ac04ff6a7662e..1fe9c3cc59336 100644 --- a/x-pack/plugins/transform/server/lib/alerting/transform_health_rule_type/register_transform_health_rule_type.ts +++ b/x-pack/plugins/transform/server/lib/alerting/transform_health_rule_type/register_transform_health_rule_type.ts @@ -16,11 +16,7 @@ import type { RuleTypeState, } from '@kbn/alerting-plugin/common'; import { AlertsClientError } from '@kbn/alerting-plugin/server'; -import type { - PluginSetupContract as AlertingSetup, - IRuleTypeAlerts, - RuleType, -} from '@kbn/alerting-plugin/server'; +import type { AlertingServerSetup, IRuleTypeAlerts, RuleType } from '@kbn/alerting-plugin/server'; import type { FieldFormatsStart } from '@kbn/field-formats-plugin/server'; import type { TransformHealthAlert } from '@kbn/alerts-as-data-utils'; import { ALERT_REASON } from '@kbn/rule-data-utils'; @@ -74,7 +70,7 @@ export const TRANSFORM_ISSUE_DETECTED: ActionGroup = { interface RegisterParams { logger: Logger; - alerting: AlertingSetup; + alerting: AlertingServerSetup; getFieldFormatsStart: () => FieldFormatsStart; } diff --git a/x-pack/plugins/transform/server/routes/api/transforms_all/route_handler.ts b/x-pack/plugins/transform/server/routes/api/transforms_all/route_handler.ts index 8bbedd9faa023..4bf9a03b64882 100644 --- a/x-pack/plugins/transform/server/routes/api/transforms_all/route_handler.ts +++ b/x-pack/plugins/transform/server/routes/api/transforms_all/route_handler.ts @@ -28,10 +28,13 @@ export const routeHandler: RequestHandler< }); const alerting = await ctx.alerting; + if (alerting) { + const rulesClient = await alerting.getRulesClient(); + const transformHealthService = transformHealthServiceProvider({ esClient: esClient.asCurrentUser, - rulesClient: alerting.getRulesClient(), + rulesClient, }); // @ts-ignore diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 45282c5713e11..c94eefe9c9034 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -103,40 +103,6 @@ "aiAssistantManagementSelection.preferredAIAssistantTypeSettingValueObservability": "Partout", "alertingTypes.builtinActionGroups.recovered": "Récupéré", "alertsGrouping.unit": "{totalCount, plural, =1 {alerte} other {alertes}}", - "alertsUIShared.actiActionsonNotifyWhen.forEachOption": "Pour chaque alerte", - "alertsUIShared.actiActionsonNotifyWhen.summaryOption": "Résumé des alertes", - "alertsUIShared.actionForm.actionGroupRecoveredMessage": "Récupéré", - "alertsUIShared.actionVariables.alertActionGroupLabel": "Groupe d'actions de l'alerte ayant programmé les actions pour la règle.", - "alertsUIShared.actionVariables.alertActionGroupNameLabel": "Nom lisible par l'utilisateur du groupe d'actions de l'alerte ayant programmé les actions pour la règle.", - "alertsUIShared.actionVariables.alertConsecutiveMatchesLabel": "Le nombre de courses consécutives qui remplissent les conditions de la règle.", - "alertsUIShared.actionVariables.alertFlappingLabel": "Indicateur sur l'alerte spécifiant si le statut de l'alerte change fréquemment.", - "alertsUIShared.actionVariables.alertIdLabel": "ID de l'alerte ayant programmé les actions pour la règle.", - "alertsUIShared.actionVariables.alertUuidLabel": "UUID de l'alerte ayant programmé les actions pour la règle.", - "alertsUIShared.actionVariables.allAlertsCountLabel": "Décompte de toutes les alertes.", - "alertsUIShared.actionVariables.allAlertsDataLabel": "Tableau d'objets pour toutes les alertes.", - "alertsUIShared.actionVariables.dateLabel": "Date à laquelle la règle a programmé l'action.", - "alertsUIShared.actionVariables.kibanaBaseUrlLabel": "Valeur server.publicBaseUrl configurée ou chaîne vide si elle n'est pas configurée.", - "alertsUIShared.actionVariables.legacyAlertActionGroupLabel": "Cet élément a été déclassé au profit de {variable}.", - "alertsUIShared.actionVariables.legacyAlertActionGroupNameLabel": "Cet élément a été déclassé au profit de {variable}.", - "alertsUIShared.actionVariables.legacyAlertIdLabel": "Cet élément a été déclassé au profit de {variable}.", - "alertsUIShared.actionVariables.legacyAlertInstanceIdLabel": "Cet élément a été déclassé au profit de {variable}.", - "alertsUIShared.actionVariables.legacyAlertNameLabel": "Cet élément a été déclassé au profit de {variable}.", - "alertsUIShared.actionVariables.legacyParamsLabel": "Cet élément a été déclassé au profit de {variable}.", - "alertsUIShared.actionVariables.legacySpaceIdLabel": "Cet élément a été déclassé au profit de {variable}.", - "alertsUIShared.actionVariables.legacyTagsLabel": "Cet élément a été déclassé au profit de {variable}.", - "alertsUIShared.actionVariables.newAlertsCountLabel": "Décompte des nouvelles alertes.", - "alertsUIShared.actionVariables.newAlertsDataLabel": "Tableau d'objets pour les nouvelles alertes.", - "alertsUIShared.actionVariables.ongoingAlertsCountLabel": "Décompte des alertes en cours.", - "alertsUIShared.actionVariables.ongoingAlertsDataLabel": "Tableau d'objets pour les alertes en cours.", - "alertsUIShared.actionVariables.recoveredAlertsCountLabel": "Décompte des alertes récupérées.", - "alertsUIShared.actionVariables.recoveredAlertsDataLabel": "Tableau d'objets pour les alertes récupérées.", - "alertsUIShared.actionVariables.ruleIdLabel": "ID de la règle.", - "alertsUIShared.actionVariables.ruleNameLabel": "Nom de la règle.", - "alertsUIShared.actionVariables.ruleParamsLabel": "Les paramètres de la règle.", - "alertsUIShared.actionVariables.ruleSpaceIdLabel": "ID d'espace de la règle.", - "alertsUIShared.actionVariables.ruleTagsLabel": "Balises de la règle.", - "alertsUIShared.actionVariables.ruleTypeLabel": "Type de règle.", - "alertsUIShared.actionVariables.ruleUrlLabel": "L'URL d'accès à la règle qui a généré l'alerte. La chaîne sera vide si server.publicBaseUrl n'est pas configuré.", "alertsUIShared.alertFieldsTable.field": "Champ", "alertsUIShared.alertFieldsTable.filter.placeholder": "Filtre par Champ, Valeur ou Description...", "alertsUIShared.alertFieldsTable.value": "Valeur", @@ -160,13 +126,6 @@ "alertsUIShared.components.alertLifecycleStatusBadge.flappingLabel": "Bagotement", "alertsUIShared.components.alertLifecycleStatusBadge.recoveredLabel": "Récupéré", "alertsUIShared.components.alertLifecycleStatusBadge.untrackedLabel": "Non suivi", - "alertsUIShared.components.ruleTypeModal.allRuleTypes": "Tous", - "alertsUIShared.components.ruleTypeModal.loadingRuleTypes": "Chargement des types de règles", - "alertsUIShared.components.ruleTypeModal.noRuleTypesErrorBody": "Essayez une autre recherche ou modifiez vos paramètres de filtrage", - "alertsUIShared.components.ruleTypeModal.noRuleTypesErrorTitle": "Aucun type de règles trouvé", - "alertsUIShared.components.ruleTypeModal.searchPlaceholder": "Recherche", - "alertsUIShared.components.ruleTypeModal.title": "Sélectionner le type de règle", - "alertsUIShared.disabledActionsWarningTitle": "Cette règle possède des actions qui sont désactivées", "alertsUIShared.filterGroup.contextMenu.reset": "Réinitialiser les contrôles", "alertsUIShared.filterGroup.contextMenu.resetTooltip": "Réinitialiser les contrôles aux paramètres d'usine", "alertsUIShared.filterGroup.filtersChangedBanner": "Les contrôles de filtre ont changé", @@ -181,24 +140,9 @@ "alertsUIShared.filtersGroup.discardChanges": "Abandonner les modifications", "alertsUIShared.filtersGroup.pendingChanges": "Enregistrer les modifications en attente", "alertsUIShared.filtersGroup.urlParam.arrayError": "Les paramètres d'URL du filtre de page doivent être un tableau", - "alertsUIShared.healthCheck.actionText": "En savoir plus.", - "alertsUIShared.healthCheck.alertsErrorText": "Pour créer une règle, vous devez activer les plug-ins d'alerting et d'actions.", - "alertsUIShared.healthCheck.alertsErrorTitle": "Vous devez activer Alerting et Actions", - "alertsUIShared.healthCheck.apiKeysAndEncryptionErrorText": "Vous devez activer les clés d'API et configurer une clé de chiffrement pour utiliser Alerting.", - "alertsUIShared.healthCheck.apiKeysDisabledErrorText": "Vous devez activer les clés d'API pour utiliser Alerting.", - "alertsUIShared.healthCheck.apiKeysDisabledErrorTitle": "Configuration supplémentaire requise", - "alertsUIShared.healthCheck.encryptionErrorText": "Vous devez configurer une clé de chiffrement pour utiliser Alerting.", - "alertsUIShared.healthCheck.encryptionErrorTitle": "Configuration supplémentaire requise", - "alertsUIShared.healthCheck.healthCheck.apiKeysAndEncryptionErrorTitle": "Configuration supplémentaire requise", "alertsUIShared.hooks.useAlertDataView.fetchErrorMessage": "Impossible de charger la vue des données de l'alerte", - "alertsUIShared.hooks.useFindAlertsQuery.unableToFetchAlertsGroupingAggregations": "Impossible de récupérer les agrégations de groupement d'alertes", "alertsUIShared.hooks.useFindAlertsQuery.unableToFindAlertsQueryMessage": "Impossible de trouver les alertes", "alertsUIShared.hooks.useLoadRuleTypesQuery.unableToLoadRuleTypesMessage": "Impossible de charger les types de règles", - "alertsUIShared.hooks.useRuleAADFields.errorMessage": "Impossible de charger les champs d'alerte par type de règle", - "alertsUIShared.licenseCheck.actionTypeDisabledByConfigMessageTitle": "Cette fonctionnalité est désactivée par la configuration de Kibana.", - "alertsUIShared.licenseCheck.actionTypeDisabledByLicenseLinkTitle": "Afficher les options de licence", - "alertsUIShared.licenseCheck.actionTypeDisabledByLicenseMessageDescription": "Pour réactiver cette action, veuillez mettre à niveau votre licence.", - "alertsUIShared.licenseCheck.actionTypeDisabledByLicenseMessageTitle": "Cette fonctionnalité requiert une licence {minimumLicenseRequired}.", "alertsUIShared.maintenanceWindowCallout.fetchError": "La vérification visant à déterminer si les fenêtres de maintenance sont actives a échoué", "alertsUIShared.maintenanceWindowCallout.fetchErrorDescription": "Les notifications de règle sont arrêtées lorsque les fenêtres de maintenance sont en cours d'exécution.", "alertsUIShared.maintenanceWindowCallout.maintenanceWindowActive": "{activeWindowCount, plural, one {Une fenêtre de maintenance est} other {Des fenêtres de maintenance sont}} en cours d'exécution pour des règles de {categories}", @@ -207,163 +151,6 @@ "alertsUIShared.maintenanceWindowCallout.maintenanceWindowMultipleCategoryNames": "{commaSeparatedList} et {last}", "alertsUIShared.maintenanceWindowCallout.maintenanceWindowTwoCategoryNames": "{first} et {second}", "alertsUIShared.maintenanceWindowCallout.managementCategoryLabel": "Suite", - "alertsUIShared.producerDisplayNames.apm": "APM et expérience utilisateur", - "alertsUIShared.producerDisplayNames.infrastructure": "Infrastructure", - "alertsUIShared.producerDisplayNames.logs": "Logs", - "alertsUIShared.producerDisplayNames.metrics": "Indicateurs", - "alertsUIShared.producerDisplayNames.ml": "Machine Learning", - "alertsUIShared.producerDisplayNames.monitoring": "Monitoring de la Suite", - "alertsUIShared.producerDisplayNames.observability": "Observabilité", - "alertsUIShared.producerDisplayNames.siem": "Sécurité", - "alertsUIShared.producerDisplayNames.slo": "SLO", - "alertsUIShared.producerDisplayNames.stackAlerts": "Alertes de la suite", - "alertsUIShared.producerDisplayNames.uptime": "Synthetics et Uptime", - "alertsUIShared.ruleActionsAlertsFilter.ActionAlertsFilterQueryPlaceholder": "Filtrer les alertes à l'aide de la syntaxe KQL", - "alertsUIShared.ruleActionsAlertsFilter.ActionAlertsFilterQueryToggleLabel": "Si l'alerte correspond à une requête", - "alertsUIShared.ruleActionsItem.actionErrorToolTip": "L’action contient des erreurs.", - "alertsUIShared.ruleActionsItem.actionUnableToLoadConnectorTitle": "Créez un connecteur et réessayez. Si vous ne parvenez pas à créer un connecteur, contactez votre administrateur système.", - "alertsUIShared.ruleActionsItem.actionUseAadTemplateFieldsLabel": "Utiliser les champs de modèle de l'index des alertes", - "alertsUIShared.ruleActionsItem.actionWarningsTitle": "1 avertissement", - "alertsUIShared.ruleActionsItem.existingAlertActionTypeEditTitle": "{actionConnectorName}", - "alertsUIShared.ruleActionsItem.runWhenGroupTitle": "Exécuter lorsque {groupName}", - "alertsUIShared.ruleActionsItem.summaryGroupTitle": "Résumé des alertes", - "alertsUIShared.ruleActionsNotifyWhen.actionFrequencyLabel": "Fréquence d'action", - "alertsUIShared.ruleActionsNotifyWhen.frequencyNotifyWhen.label": "Exécuter chaque", - "alertsUIShared.ruleActionsNotifyWhen.notifyWhenThrottleWarning": "Les intervalles d'action personnalisés ne peuvent pas être plus courts que l'intervalle de vérification de la règle", - "alertsUIShared.ruleActionsNotifyWhen.onActionGroupChange.description": "Actions exécutées si le statut de l'alerte change.", - "alertsUIShared.ruleActionsNotifyWhen.onActionGroupChange.display": "Lors de changements de statut", - "alertsUIShared.ruleActionsNotifyWhen.onActionGroupChange.label": "Lors de changements de statut", - "alertsUIShared.ruleActionsNotifyWhen.onActiveAlert.description": "Les actions sont exécutées si les conditions de règle sont remplies.", - "alertsUIShared.ruleActionsNotifyWhen.onActiveAlert.display": "Selon les intervalles de vérification", - "alertsUIShared.ruleActionsNotifyWhen.onActiveAlert.label": "Selon les intervalles de vérification", - "alertsUIShared.ruleActionsNotifyWhen.onThrottleInterval.description": "Les actions sont exécutées si les conditions de règle sont remplies.", - "alertsUIShared.ruleActionsNotifyWhen.onThrottleInterval.display": "Selon des intervalles d'action personnalisés", - "alertsUIShared.ruleActionsNotifyWhen.onThrottleInterval.label": "Selon des intervalles d'action personnalisés", - "alertsUIShared.ruleActionsNotifyWhen.summaryOrRulePerSelectRoleDescription": "Sélection du type de fréquence d'action", - "alertsUIShared.ruleActionsSetting.actionGroupNotSupported": "{actionGroupName} (non pris en charge actuellement)", - "alertsUIShared.ruleActionsSetting.actionGroupRunWhen": "Exécuter quand", - "alertsUIShared.ruleActionsSystemActionsItem.deleteActionAriaLabel": "supprimer l'action", - "alertsUIShared.ruleForm.actionsForm.publicBaseUrl": "server.publicBaseUrl n'est pas défini. Les URL générées seront relatives ou vides.", - "alertsUIShared.ruleForm.actionsForm.requiredFilterQuery": "Une requête personnalisée est requise.", - "alertsUIShared.ruleForm.actionTypeModalEmptyText": "Essayez une autre recherche ou modifiez vos paramètres de filtrage.", - "alertsUIShared.ruleForm.actionTypeModalEmptyTitle": "Aucun connecteur trouvé", - "alertsUIShared.ruleForm.actionTypeModalFilterAll": "Tous", - "alertsUIShared.ruleForm.actionTypeModalTitle": "Sélectionner un connecteur", - "alertsUIShared.ruleForm.circuitBreakerHideFullErrorText": "Masquer l'erreur en intégralité", - "alertsUIShared.ruleForm.circuitBreakerSeeFullErrorText": "Afficher l'erreur en intégralité", - "alertsUIShared.ruleForm.confirmRuleSaveCancelButtonText": "Annuler", - "alertsUIShared.ruleForm.confirmRuleSaveConfirmButtonText": "Enregistrer la règle", - "alertsUIShared.ruleForm.confirmRuleSaveMessageText": "Vous pouvez ajouter une action à tout moment.", - "alertsUIShared.ruleForm.confirmRuleSaveTitle": "Enregistrer la règle ne contenant aucune action ?", - "alertsUIShared.ruleForm.createErrorText": "Impossible de créer une règle.", - "alertsUIShared.ruleForm.createSuccessText": "Création de la règle \"{ruleName}\" effectuée", - "alertsUIShared.ruleForm.editErrorText": "Impossible de mettre à jour la règle.", - "alertsUIShared.ruleForm.editSuccessText": "Mise à jour de \"{ruleName}\" effectuée", - "alertsUIShared.ruleForm.error.belowMinimumAlertDelayText": "Le délai d'alerte doit être supérieur ou égal à 1.", - "alertsUIShared.ruleForm.error.belowMinimumText": "L'intervalle doit être au minimum de {minimum}.", - "alertsUIShared.ruleForm.error.requiredConsumerText": "La portée est requise.", - "alertsUIShared.ruleForm.error.requiredIntervalText": "L'intervalle de vérification est requis.", - "alertsUIShared.ruleForm.error.requiredNameText": "Le nom est requis.", - "alertsUIShared.ruleForm.error.requiredRuleTypeIdText": "Le type de règle est requis.", - "alertsUIShared.ruleForm.intervalWarningText": "Des intervalles inférieurs à {minimum} ne sont pas recommandés pour des raisons de performances.", - "alertsUIShared.ruleForm.modalSearchClearFiltersText": "Effacer les filtres", - "alertsUIShared.ruleForm.modalSearchPlaceholder": "Recherche", - "alertsUIShared.ruleForm.returnTitle": "Renvoyer", - "alertsUIShared.ruleForm.routeParamsErrorText": "Une erreur s'est produite lors du chargement du formulaire de la règle. Veuillez vérifier que le chemin est correct.", - "alertsUIShared.ruleForm.routeParamsErrorTitle": "Impossible de charger le formulaire de règle", - "alertsUIShared.ruleForm.ruleActions.addActionText": "Ajouter une action", - "alertsUIShared.ruleForm.ruleActionsAlertsFilterTimeframeTimezoneLabel": "Fuseau horaire", - "alertsUIShared.ruleForm.ruleActionsAlertsFilterTimeframeToggleLabel": "Si l'alerte est générée pendant l'intervalle de temps", - "alertsUIShared.ruleForm.ruleActionsAlertsFilterTimeframeWeekdays": "Jours de la semaine", - "alertsUIShared.ruleForm.ruleActionsNoPermissionDescription": "Pour modifier les règles, vous devez avoir un accès en lecture aux actions et aux connecteurs.", - "alertsUIShared.ruleForm.ruleActionsNoPermissionTitle": "Privilèges manquants pour les actions et les connecteurs", - "alertsUIShared.ruleForm.ruleActionsTitle": "Actions", - "alertsUIShared.ruleForm.ruleAlertDelay.alertDelayHelpText": "Une alerte n'est déclenchée que si le nombre spécifié d'exécutions consécutives remplit les conditions de la règle.", - "alertsUIShared.ruleForm.ruleAlertDelay.alertDelayTitlePrefix": "Après une alerte", - "alertsUIShared.ruleForm.ruleAlertDelay.alertDelayTitleSuffix": "correspondances consécutives", - "alertsUIShared.ruleForm.ruleDefinition.advancedOptionsTitle": "Options avancées", - "alertsUIShared.ruleForm.ruleDefinition.alertDelayDescription": "Définir le nombre d’exécutions consécutives pour lesquelles cette règle doit répondre aux conditions d'alerte avant qu'une alerte ne se déclenche", - "alertsUIShared.ruleForm.ruleDefinition.alertDelayTitle": "Délai d'alerte", - "alertsUIShared.ruleForm.ruleDefinition.alertFlappingDetectionDescription": "Détectez les alertes qui passent rapidement de l'état actif à l'état récupéré et réduisez le bruit non souhaité de ces alertes instables", - "alertsUIShared.ruleForm.ruleDefinition.alertFlappingDetectionTitle": "Détection de bagotement d'alerte", - "alertsUIShared.ruleForm.ruleDefinition.docLinkTitle": "Afficher la documentation", - "alertsUIShared.ruleForm.ruleDefinition.loadingRuleTypeParamsTitle": "Chargement des paramètres de types de règles", - "alertsUIShared.ruleForm.ruleDefinition.scheduleDescriptionText": "Définir la fréquence de vérification des conditions de l'alerte", - "alertsUIShared.ruleForm.ruleDefinition.scheduleTitle": "Calendrier des règles", - "alertsUIShared.ruleForm.ruleDefinition.scheduleTooltipText": "Les vérifications sont mises en file d'attente ; elles seront exécutées au plus près de la valeur définie, en fonction de la capacité.", - "alertsUIShared.ruleForm.ruleDefinition.scopeDescriptionText": "Sélectionnez les applications auxquelles associer le privilège de rôle correspondant", - "alertsUIShared.ruleForm.ruleDefinition.scopeTitle": "Portée de la règle", - "alertsUIShared.ruleForm.ruleDefinitionTitle": "Définition de la règle", - "alertsUIShared.ruleForm.ruleDetails.description": "Définissez un nom et des balises pour votre règle.", - "alertsUIShared.ruleForm.ruleDetails.ruleNameInputButtonAriaLabel": "Enregistrer le nom de la règle", - "alertsUIShared.ruleForm.ruleDetails.ruleNameInputTitle": "Nom de règle", - "alertsUIShared.ruleForm.ruleDetails.ruleTagsInputTitle": "Balises", - "alertsUIShared.ruleForm.ruleDetails.ruleTagsPlaceholder": "Ajouter des balises", - "alertsUIShared.ruleForm.ruleDetails.title": "Nom et balises de la règle", - "alertsUIShared.ruleForm.ruleDetailsTitle": "Détails de la règle", - "alertsUIShared.ruleForm.ruleFormCancelModalCancel": "Annuler", - "alertsUIShared.ruleForm.ruleFormCancelModalConfirm": "Abandonner les modifications", - "alertsUIShared.ruleForm.ruleFormCancelModalDescription": "Vous ne pouvez pas récupérer de modifications non enregistrées.", - "alertsUIShared.ruleForm.ruleFormCancelModalTitle": "Abandonner les modifications non enregistrées apportées à la règle ?", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.apm": "APM et expérience utilisateur", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.consumerSelectComboBoxTitle": "Sélectionner une portée", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.consumerSelectTitle": "Visibilité du rôle", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.infrastructure": "Indicateurs", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.logs": "Logs", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.slo": "SLO", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.stackAlerts": "Règles de la Suite Elastic", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.uptime": "Synthetics et Uptime", - "alertsUIShared.ruleForm.ruleNotFoundErrorText": "Une erreur s'est produite lors du chargement de la règle. Veuillez vous assurer que la règle existe et que vous y avez accès.", - "alertsUIShared.ruleForm.ruleNotFoundErrorTitle": "Impossible de charger la règle", - "alertsUIShared.ruleForm.rulePage.ruleNameAriaLabelText": "Modifier le nom de la règle", - "alertsUIShared.ruleForm.rulePageFooter.cancelText": "Annuler", - "alertsUIShared.ruleForm.rulePageFooter.createText": "Créer une règle", - "alertsUIShared.ruleForm.rulePageFooter.saveText": "Enregistrer la règle", - "alertsUIShared.ruleForm.rulePageFooter.showRequestText": "Afficher la requête", - "alertsUIShared.ruleForm.ruleSchedule.scheduleTitlePrefix": "Chaque", - "alertsUIShared.ruleForm.ruleTypeNotFoundErrorText": "Une erreur s'est produite lors du chargement du type de règle. Veuillez vous assurer que vous avez accès au type de règle sélectionné.", - "alertsUIShared.ruleForm.ruleTypeNotFoundErrorTitle": "Impossible de charger le type de règle", - "alertsUIShared.ruleForm.showRequestModal.headerTitle": "{requestType} requête de règle d'alerte", - "alertsUIShared.ruleForm.showRequestModal.headerTitleCreate": "Créer", - "alertsUIShared.ruleForm.showRequestModal.headerTitleEdit": "Modifier", - "alertsUIShared.ruleForm.showRequestModal.somethingWentWrongDescription": "Désolé, un problème est survenu.", - "alertsUIShared.ruleForm.showRequestModal.subheadingTitle": "La requête Kibana va {requestType} cette règle.", - "alertsUIShared.ruleForm.showRequestModal.subheadingTitleCreate": "créer", - "alertsUIShared.ruleForm.showRequestModal.subheadingTitleEdit": "modifier", - "alertsUIShared.ruleSettingsFlappingForm.flappingExternalLinkLabel": "Qu'est-ce que c'est ?", - "alertsUIShared.ruleSettingsFlappingForm.flappingLabel": "Détection des éléments instables", - "alertsUIShared.ruleSettingsFlappingForm.flappingOffContentRules": "Règles", - "alertsUIShared.ruleSettingsFlappingForm.flappingOffContentSettings": "Paramètres", - "alertsUIShared.ruleSettingsFlappingForm.flappingOffPopoverContent": "Accédez à {rules} > {settings} pour activer la détection d'instabilité pour l'ensemble des règles d'un espace. Vous pouvez ensuite personnaliser la période d'analyse et les valeurs seuils de chaque règle.", - "alertsUIShared.ruleSettingsFlappingForm.flappingOverrideConfiguration": "Personnaliser la configuration", - "alertsUIShared.ruleSettingsFlappingForm.offLabel": "DÉSACTIVÉ", - "alertsUIShared.ruleSettingsFlappingForm.onLabel": "ACTIVÉ", - "alertsUIShared.ruleSettingsFlappingForm.overrideLabel": "Personnalisé", - "alertsUIShared.ruleSettingsFlappingInputsProps.lookBackWindowHelp": "Nombre minimal d'exécutions pour lesquelles le seuil doit être atteint.", - "alertsUIShared.ruleSettingsFlappingInputsProps.lookBackWindowLabel": "Fenêtre d'historique d'exécution de la règle", - "alertsUIShared.ruleSettingsFlappingInputsProps.statusChangeThresholdHelp": "Nombre minimal de fois où une alerte doit changer d'état dans la fenêtre d'historique.", - "alertsUIShared.ruleSettingsFlappingInputsProps.statusChangeThresholdLabel": "Seuil de modification du statut d'alerte", - "alertsUIShared.ruleSettingsFlappingMessage.flappingOffMessage": "La détection de bagotement d'alerte est désactivée. Les alertes seront générées en fonction de l'intervalle de la règle, ce qui peut entraîner des volumes d'alertes plus importants.", - "alertsUIShared.ruleSettingsFlappingMessage.flappingSettingsDescription": "Cette règle détecte qu'une alerte est instable si son statut change au moins {statusChangeThreshold} au cours des derniers/dernières {lookBackWindow}.", - "alertsUIShared.ruleSettingsFlappingMessage.lookBackWindowLabelRuleRuns": "{amount, number} règle {amount, plural, one {exécute} other {exécutent}}", - "alertsUIShared.ruleSettingsFlappingMessage.spaceFlappingSettingsDescription": "L'ensemble des règles (de cet espace) détecte qu'une alerte est instable lorsque son statut change au moins {statusChangeThreshold} au cours des derniers/dernières {lookBackWindow}.", - "alertsUIShared.ruleSettingsFlappingMessage.statusChangeThresholdTimes": "{amount, number} {amount, plural, other {fois}}", - "alertsUIShared.ruleSettingsFlappingTitleTooltip.flappingOffContentRules": "Règles", - "alertsUIShared.ruleSettingsFlappingTitleTooltip.flappingOffContentSettings": "Paramètres", - "alertsUIShared.ruleSettingsFlappingTitleTooltip.flappingTitlePopover1": "Lorsque la {flappingDetection} est activée, les alertes qui passent rapidement de l'état actif à l'état récupéré sont identifiées comme \"instables\" et les notifications sont réduites.", - "alertsUIShared.ruleSettingsFlappingTitleTooltip.flappingTitlePopover2": "Le statut {alertStatus} définit une période (nombre minimum d'exécutions) utilisée dans l'algorithme de détection.", - "alertsUIShared.ruleSettingsFlappingTitleTooltip.flappingTitlePopover3": "Le paramètre {lookBack} indique le nombre minimum de fois que les alertes doivent changer d'état au cours de la période seuil pour être considérées comme des alertes instables.", - "alertsUIShared.ruleSettingsFlappingTitleTooltip.flappingTitlePopover4": "Accédez à {rules} > {settings} pour activer la détection d'instabilité pour l'ensemble des règles d'un espace. Vous pouvez ensuite personnaliser la période d'analyse et les valeurs seuils de chaque règle.", - "alertsUIShared.ruleSettingsFlappingTitleTooltip.flappingTitlePopoverAlertStatus": "seuil de modification du statut d'alerte", - "alertsUIShared.ruleSettingsFlappingTitleTooltip.flappingTitlePopoverFlappingDetection": "détection des éléments instables", - "alertsUIShared.ruleSettingsFlappingTitleTooltip.flappingTitlePopoverLookBack": "fenêtre d'historique d'exécution de la règle", - "alertsUIShared.ruleSettingsFlappingTitleTooltip.tooltipTitle": "Détection de bagotement d'alerte", - "alertsUIShared.technicalPreviewBadgeDescription": "Cette fonctionnalité est en version d'évaluation technique et pourra être modifiée ou retirée complètement dans une future version. Elastic s'efforcera de corriger tout problème, mais les fonctionnalités des versions d'évaluation technique ne sont pas soumises aux SLA de support des fonctionnalités officielles en disponibilité générale.", - "alertsUIShared.technicalPreviewBadgeLabel": "Version d'évaluation technique", - "alertsUIShared.timeUnits.dayLabel": "{timeValue, plural, one {jour} other {jours}}", - "alertsUIShared.timeUnits.hourLabel": "{timeValue, plural, one {heure} other {heures}}", - "alertsUIShared.timeUnits.minuteLabel": "{timeValue, plural, one {minute} other {minutes}}", - "alertsUIShared.timeUnits.secondLabel": "{timeValue, plural, one {seconde} other {secondes}}", "alertsUIShared.typeRegistry.get.missingActionTypeErrorMessage": "Le type d'objet \"{id}\" n'est pas enregistré.", "alertsUIShared.typeRegistry.register.duplicateObjectTypeErrorMessage": "Le type d'objet \"{id}\" est déjà enregistré.", "autocomplete.conflictIndicesWarning.description": "Ce champ est défini avec différents types dans les index suivants ou il n'est pas mappé, ce qui peut entraîner des résultats inattendus lors des requêtes.", @@ -2734,11 +2521,7 @@ "discover.advancedSettings.context.tieBreakerFieldsTitle": "Champs de départage", "discover.advancedSettings.defaultColumnsText": "Les colonnes affichées par défaut dans l'application Discover. Si elles sont vides, un résumé du document s’affiche.", "discover.advancedSettings.defaultColumnsTitle": "Colonnes par défaut", - "discover.advancedSettings.disableDocumentExplorer": "Explorateur de documents ou vue classique", - "discover.advancedSettings.disableDocumentExplorerDescription": "Désactivez cette option pour utiliser le nouveau {documentExplorerDocs} au lieu de la vue classique. l'explorateur de documents offre un meilleur tri des données, des colonnes redimensionnables et une vue en plein écran.", - "discover.advancedSettings.discover.disableDocumentExplorerDeprecation": "Ce paramètre est déclassé et sera supprimé dans la version 9.0 de Kibana.", "discover.advancedSettings.discover.fieldStatisticsLinkText": "Vue des statistiques de champ", - "discover.advancedSettings.discover.maxCellHeightDeprecation": "Ce paramètre est déclassé et sera supprimé dans la version 9.0 de Kibana.", "discover.advancedSettings.discover.modifyColumnsOnSwitchText": "Supprimez les colonnes qui ne sont pas disponibles dans la nouvelle vue de données.", "discover.advancedSettings.discover.modifyColumnsOnSwitchTitle": "Modifier les colonnes en cas de changement des vues de données", "discover.advancedSettings.discover.multiFieldsLinkText": "champs multiples", @@ -2751,13 +2534,10 @@ "discover.advancedSettings.discover.showMultifieldsDescription": "Détermine si les {multiFields} doivent s'afficher dans la fenêtre de document étendue. Dans la plupart des cas, les champs multiples sont les mêmes que les champs d'origine. Cette option est uniquement disponible lorsque le paramètre `searchFieldsFromSource` est désactivé.", "discover.advancedSettings.docTableHideTimeColumnText": "Permet de masquer la colonne ''Time'' dans Discover et dans toutes les recherches enregistrées des tableaux de bord.", "discover.advancedSettings.docTableHideTimeColumnTitle": "Masquer la colonne ''Time''", - "discover.advancedSettings.documentExplorerLinkText": "Explorateur de documents", "discover.advancedSettings.fieldsPopularLimitText": "Les N champs les plus populaires à afficher", "discover.advancedSettings.fieldsPopularLimitTitle": "Limite de champs populaires", "discover.advancedSettings.maxDocFieldsDisplayedText": "Le nombre maximal de champs renvoyés dans le résumé du document", "discover.advancedSettings.maxDocFieldsDisplayedTitle": "Nombre maximal de champs de document affichés", - "discover.advancedSettings.params.maxCellHeightText": "La hauteur maximale qu'une cellule de tableau peut atteindre. Définissez ce paramètre sur 0 pour désactiver la troncation.", - "discover.advancedSettings.params.maxCellHeightTitle": "Hauteur de cellule maximale dans le tableau classique", "discover.advancedSettings.params.rowHeightText": "Nombre de sous-lignes à autoriser dans une ligne. La valeur -1 ajuste automatiquement la hauteur de ligne selon le contenu. La valeur 0 affiche le contenu en une seule ligne.", "discover.advancedSettings.params.rowHeightTitle": "Hauteur de ligne dans l'explorateur de documents", "discover.advancedSettings.sampleRowsPerPageText": "Limite le nombre de lignes par page dans le tableau de documents.", @@ -2773,7 +2553,6 @@ "discover.alerts.createSearchThreshold": "Créer une règle de seuil de recherche", "discover.alerts.manageRulesAndConnectors": "Gérer les règles et les connecteurs", "discover.alerts.missedTimeFieldToolTip": "La vue de données ne possède pas de champ temporel.", - "discover.backToTopLinkText": "Revenir en haut de la page.", "discover.badge.readOnly.text": "Lecture seule", "discover.badge.readOnly.tooltip": "Impossible d’enregistrer les recherches", "discover.context.breadcrumb": "Documents relatifs", @@ -2782,7 +2561,6 @@ "discover.context.failedToLoadAnchorDocumentErrorDescription": "Le document ancré n’a pas pu être chargé.", "discover.context.invalidTieBreakerFiledSetting": "Paramètre de champ de départage non valide", "discover.context.loadButtonLabel": "Charger", - "discover.context.loadingDescription": "Chargement...", "discover.context.newerDocumentsAriaLabel": "Nombre de documents plus récents", "discover.context.newerDocumentsDescription": "documents plus récents", "discover.context.newerDocumentsWarning": "Seuls {docCount} documents plus récents que le document ancré ont été trouvés.", @@ -2819,41 +2597,9 @@ "discover.doc.pageTitle": "Document unique - #{id}", "discover.doc.somethingWentWrongDescription": "Index {indexName} manquant.", "discover.doc.somethingWentWrongDescriptionAddon": "Veuillez vérifier que cet index existe.", - "discover.docExplorerCallout.closeButtonAriaLabel": "Fermer", - "discover.docExplorerCallout.documentExplorer": "Explorateur de documents", - "discover.docExplorerCallout.headerMessage": "Une meilleure façon d'explorer", - "discover.docExplorerCallout.learnMore": "En savoir plus", - "discover.docExplorerCallout.tryDocumentExplorer": "Testez l'explorateur de documents", - "discover.docTable.documentsNavigation": "Navigation dans les documents", - "discover.docTable.limitedSearchResultLabel": "Limité à {resultCount} résultats. Veuillez affiner votre recherche.", - "discover.docTable.noResultsTitle": "Résultat introuvable", - "discover.docTable.rows": "lignes", - "discover.docTable.rowsPerPage": "Lignes par page : {pageSize}", - "discover.docTable.tableHeader.documentHeader": "Document", - "discover.docTable.tableHeader.moveColumnLeftButtonAriaLabel": "Déplacer la colonne {columnName} vers la gauche", - "discover.docTable.tableHeader.moveColumnLeftButtonTooltip": "Déplacer la colonne vers la gauche", - "discover.docTable.tableHeader.moveColumnRightButtonAriaLabel": "Déplacer la colonne {columnName} vers la droite", - "discover.docTable.tableHeader.moveColumnRightButtonTooltip": "Déplacer la colonne vers la droite", - "discover.docTable.tableHeader.removeColumnButtonAriaLabel": "Supprimer la colonne {columnName}", - "discover.docTable.tableHeader.removeColumnButtonTooltip": "Supprimer la colonne", - "discover.docTable.tableHeader.sortByColumnAscendingAriaLabel": "Trier la colonne {columnName} par ordre croissant", - "discover.docTable.tableHeader.sortByColumnDescendingAriaLabel": "Trier la colonne {columnName} par ordre décroissant", - "discover.docTable.tableHeader.sortByColumnUnsortedAriaLabel": "Arrêter de trier la colonne {columnName}", - "discover.docTable.tableHeader.timeFieldIconTooltip": "Ce champ représente l'heure à laquelle les événements se sont produits.", - "discover.docTable.tableHeader.timeFieldIconTooltipAriaLabel": "{timeFieldName} : ce champ représente l'heure à laquelle les événements se sont produits.", - "discover.docTable.tableRow.detailHeading": "Document développé", - "discover.docTable.tableRow.filterForValueButtonAriaLabel": "Filtrer sur la valeur", - "discover.docTable.tableRow.filterForValueButtonTooltip": "Filtrer sur la valeur", - "discover.docTable.tableRow.filterOutValueButtonAriaLabel": "Exclure la valeur", - "discover.docTable.tableRow.filterOutValueButtonTooltip": "Exclure la valeur", - "discover.docTable.tableRow.toggleRowDetailsButtonAriaLabel": "Afficher/Masquer les détails de la ligne", - "discover.docTable.tableRow.viewSingleDocumentLinkText": "Afficher un seul document", - "discover.docTable.tableRow.viewSurroundingDocumentsLinkText": "Afficher les documents alentour", "discover.documentsAriaLabel": "Documents", "discover.docViews.logsOverview.title": "Aperçu du log", - "discover.docViews.table.scoreSortWarningTooltip": "Filtrez sur _score pour pouvoir récupérer les valeurs correspondantes.", "discover.dropZoneTableLabel": "Abandonner la zone pour ajouter un champ en tant que colonne dans la table", - "discover.embeddable.inspectorRequestDataTitle": "Données", "discover.embeddable.inspectorRequestDescription": "Cette requête interroge Elasticsearch afin de récupérer les données pour la recherche.", "discover.embeddable.search.dataViewError": "Vue de données {indexPatternId} manquante", "discover.embeddable.search.displayName": "rechercher", @@ -2873,7 +2619,6 @@ "discover.globalSearch.esqlSearchTitle": "Créer des recherches ES|QL", "discover.goToDiscoverButtonText": "Aller à Discover", "discover.grid.tableRow.actionsLabel": "Actions", - "discover.grid.tableRow.esqlDetailHeading": "Résultat étendu", "discover.grid.tableRow.mobileFlyoutActionsButton": "Actions", "discover.grid.tableRow.moreFlyoutActionsButton": "Plus d'actions", "discover.grid.tableRow.viewSingleDocumentLinkLabel": "Afficher un seul document", @@ -2884,7 +2629,6 @@ "discover.hitsCounter.hitsPluralTitle": "{formattedHits} {hits, plural, one {résultat} other {résultats}}", "discover.hitsCounter.partialHits": "≥{formattedHits}", "discover.hitsCounter.partialHitsPluralTitle": "≥{formattedHits} {hits, plural, one {résultat} other {résultats}}", - "discover.howToSeeOtherMatchingDocumentsDescription": "Voici les {sampleSize} premiers documents correspondant à votre recherche. Veuillez affiner celle-ci pour en voir plus.", "discover.inspectorEsqlRequestDescription": "Cette requête interroge Elasticsearch afin de récupérer les résultats pour le tableau.", "discover.inspectorEsqlRequestTitle": "Tableau", "discover.inspectorRequestDataTitleDocuments": "Documents", @@ -2893,7 +2637,6 @@ "discover.invalidFiltersWarnToast.description": "Les références d'ID de la vue de données dans certains filtres appliqués diffèrent de la vue de données actuelle.", "discover.invalidFiltersWarnToast.title": "Références d'index différentes", "discover.loadingDocuments": "Chargement des documents", - "discover.loadingResults": "Chargement des résultats", "discover.localMenu.alertsDescription": "Alertes", "discover.localMenu.esqlTooltipLabel": "ES|QL est le nouveau langage de requête canalisé puissant d'Elastic.", "discover.localMenu.fallbackReportTitle": "Recherche Discover sans titre", @@ -6686,6 +6429,121 @@ "reporting.share.screenCapturePanelContent.optimizeForPrintingLabel": "Optimiser pour l'impression", "reporting.shareContextMenu.ExportsButtonLabel": "PDF", "reporting.shareContextMenu.ExportsButtonLabelPNG": "Export PNG", + "responseOpsRuleForm.disabledActionsWarningTitle": "Cette règle possède des actions qui sont désactivées", + "responseOpsRuleForm.ruleActionsAlertsFilter.ActionAlertsFilterQueryPlaceholder": "Filtrer les alertes à l'aide de la syntaxe KQL", + "responseOpsRuleForm.ruleActionsAlertsFilter.ActionAlertsFilterQueryToggleLabel": "Si l'alerte correspond à une requête", + "responseOpsRuleForm.ruleActionsItem.actionErrorToolTip": "L’action contient des erreurs.", + "responseOpsRuleForm.ruleActionsItem.actionUnableToLoadConnectorTitle": "Créez un connecteur et réessayez. Si vous ne parvenez pas à créer un connecteur, contactez votre administrateur système.", + "responseOpsRuleForm.ruleActionsItem.actionUseAadTemplateFieldsLabel": "Utiliser les champs de modèle de l'index des alertes", + "responseOpsRuleForm.ruleActionsItem.actionWarningsTitle": "1 avertissement", + "responseOpsRuleForm.ruleActionsItem.existingAlertActionTypeEditTitle": "{actionConnectorName}", + "responseOpsRuleForm.ruleActionsItem.runWhenGroupTitle": "Exécuter lorsque {groupName}", + "responseOpsRuleForm.ruleActionsItem.summaryGroupTitle": "Résumé des alertes", + "responseOpsRuleForm.ruleActionsNotifyWhen.actionFrequencyLabel": "Fréquence d'action", + "responseOpsRuleForm.ruleActionsNotifyWhen.frequencyNotifyWhen.label": "Exécuter chaque", + "responseOpsRuleForm.ruleActionsNotifyWhen.notifyWhenThrottleWarning": "Les intervalles d'action personnalisés ne peuvent pas être plus courts que l'intervalle de vérification de la règle", + "responseOpsRuleForm.ruleActionsNotifyWhen.onActionGroupChange.description": "Actions exécutées si le statut de l'alerte change.", + "responseOpsRuleForm.ruleActionsNotifyWhen.onActionGroupChange.display": "Lors de changements de statut", + "responseOpsRuleForm.ruleActionsNotifyWhen.onActionGroupChange.label": "Lors de changements de statut", + "responseOpsRuleForm.ruleActionsNotifyWhen.onActiveAlert.description": "Les actions sont exécutées si les conditions de règle sont remplies.", + "responseOpsRuleForm.ruleActionsNotifyWhen.onActiveAlert.display": "Selon les intervalles de vérification", + "responseOpsRuleForm.ruleActionsNotifyWhen.onActiveAlert.label": "Selon les intervalles de vérification", + "responseOpsRuleForm.ruleActionsNotifyWhen.onThrottleInterval.description": "Les actions sont exécutées si les conditions de règle sont remplies.", + "responseOpsRuleForm.ruleActionsNotifyWhen.onThrottleInterval.display": "Selon des intervalles d'action personnalisés", + "responseOpsRuleForm.ruleActionsNotifyWhen.onThrottleInterval.label": "Selon des intervalles d'action personnalisés", + "responseOpsRuleForm.ruleActionsNotifyWhen.summaryOrRulePerSelectRoleDescription": "Sélection du type de fréquence d'action", + "responseOpsRuleForm.ruleActionsSetting.actionGroupNotSupported": "{actionGroupName} (non pris en charge actuellement)", + "responseOpsRuleForm.ruleActionsSetting.actionGroupRunWhen": "Exécuter quand", + "responseOpsRuleForm.ruleActionsSystemActionsItem.deleteActionAriaLabel": "supprimer l'action", + "responseOpsRuleForm.ruleForm.actionsForm.publicBaseUrl": "server.publicBaseUrl n'est pas défini. Les URL générées seront relatives ou vides.", + "responseOpsRuleForm.ruleForm.actionsForm.requiredFilterQuery": "Une requête personnalisée est requise.", + "responseOpsRuleForm.ruleForm.actionTypeModalEmptyText": "Essayez une autre recherche ou modifiez vos paramètres de filtrage.", + "responseOpsRuleForm.ruleForm.actionTypeModalEmptyTitle": "Aucun connecteur trouvé", + "responseOpsRuleForm.ruleForm.actionTypeModalFilterAll": "Tous", + "responseOpsRuleForm.ruleForm.actionTypeModalTitle": "Sélectionner un connecteur", + "responseOpsRuleForm.ruleForm.circuitBreakerHideFullErrorText": "Masquer l'erreur en intégralité", + "responseOpsRuleForm.ruleForm.circuitBreakerSeeFullErrorText": "Afficher l'erreur en intégralité", + "responseOpsRuleForm.ruleForm.confirmRuleSaveCancelButtonText": "Annuler", + "responseOpsRuleForm.ruleForm.confirmRuleSaveConfirmButtonText": "Enregistrer la règle", + "responseOpsRuleForm.ruleForm.confirmRuleSaveMessageText": "Vous pouvez ajouter une action à tout moment.", + "responseOpsRuleForm.ruleForm.confirmRuleSaveTitle": "Enregistrer la règle ne contenant aucune action ?", + "responseOpsRuleForm.ruleForm.createErrorText": "Impossible de créer une règle.", + "responseOpsRuleForm.ruleForm.createSuccessText": "Création de la règle \"{ruleName}\" effectuée", + "responseOpsRuleForm.ruleForm.editErrorText": "Impossible de mettre à jour la règle.", + "responseOpsRuleForm.ruleForm.editSuccessText": "Mise à jour de \"{ruleName}\" effectuée", + "responseOpsRuleForm.ruleForm.error.belowMinimumAlertDelayText": "Le délai d'alerte doit être supérieur ou égal à 1.", + "responseOpsRuleForm.ruleForm.error.belowMinimumText": "L'intervalle doit être au minimum de {minimum}.", + "responseOpsRuleForm.ruleForm.error.requiredConsumerText": "La portée est requise.", + "responseOpsRuleForm.ruleForm.error.requiredIntervalText": "L'intervalle de vérification est requis.", + "responseOpsRuleForm.ruleForm.error.requiredNameText": "Le nom est requis.", + "responseOpsRuleForm.ruleForm.error.requiredRuleTypeIdText": "Le type de règle est requis.", + "responseOpsRuleForm.ruleForm.intervalWarningText": "Des intervalles inférieurs à {minimum} ne sont pas recommandés pour des raisons de performances.", + "responseOpsRuleForm.ruleForm.modalSearchClearFiltersText": "Effacer les filtres", + "responseOpsRuleForm.ruleForm.modalSearchPlaceholder": "Recherche", + "responseOpsRuleForm.ruleForm.returnTitle": "Renvoyer", + "responseOpsRuleForm.ruleForm.routeParamsErrorText": "Une erreur s'est produite lors du chargement du formulaire de la règle. Veuillez vérifier que le chemin est correct.", + "responseOpsRuleForm.ruleForm.routeParamsErrorTitle": "Impossible de charger le formulaire de règle", + "responseOpsRuleForm.ruleForm.ruleActions.addActionText": "Ajouter une action", + "responseOpsRuleForm.ruleForm.ruleActionsAlertsFilterTimeframeTimezoneLabel": "Fuseau horaire", + "responseOpsRuleForm.ruleForm.ruleActionsAlertsFilterTimeframeToggleLabel": "Si l'alerte est générée pendant l'intervalle de temps", + "responseOpsRuleForm.ruleForm.ruleActionsAlertsFilterTimeframeWeekdays": "Jours de la semaine", + "responseOpsRuleForm.ruleForm.ruleActionsNoPermissionDescription": "Pour modifier les règles, vous devez avoir un accès en lecture aux actions et aux connecteurs.", + "responseOpsRuleForm.ruleForm.ruleActionsNoPermissionTitle": "Privilèges manquants pour les actions et les connecteurs", + "responseOpsRuleForm.ruleForm.ruleActionsTitle": "Actions", + "responseOpsRuleForm.ruleForm.ruleAlertDelay.alertDelayHelpText": "Une alerte n'est déclenchée que si le nombre spécifié d'exécutions consécutives remplit les conditions de la règle.", + "responseOpsRuleForm.ruleForm.ruleAlertDelay.alertDelayTitlePrefix": "Après une alerte", + "responseOpsRuleForm.ruleForm.ruleAlertDelay.alertDelayTitleSuffix": "correspondances consécutives", + "responseOpsRuleForm.ruleForm.ruleDefinition.advancedOptionsTitle": "Options avancées", + "responseOpsRuleForm.ruleForm.ruleDefinition.alertDelayDescription": "Définir le nombre d’exécutions consécutives pour lesquelles cette règle doit répondre aux conditions d'alerte avant qu'une alerte ne se déclenche", + "responseOpsRuleForm.ruleForm.ruleDefinition.alertDelayTitle": "Délai d'alerte", + "responseOpsRuleForm.ruleForm.ruleDefinition.alertFlappingDetectionDescription": "Détectez les alertes qui passent rapidement de l'état actif à l'état récupéré et réduisez le bruit non souhaité de ces alertes instables", + "responseOpsRuleForm.ruleForm.ruleDefinition.alertFlappingDetectionTitle": "Détection de bagotement d'alerte", + "responseOpsRuleForm.ruleForm.ruleDefinition.docLinkTitle": "Afficher la documentation", + "responseOpsRuleForm.ruleForm.ruleDefinition.loadingRuleTypeParamsTitle": "Chargement des paramètres de types de règles", + "responseOpsRuleForm.ruleForm.ruleDefinition.scheduleDescriptionText": "Définir la fréquence de vérification des conditions de l'alerte", + "responseOpsRuleForm.ruleForm.ruleDefinition.scheduleTitle": "Calendrier des règles", + "responseOpsRuleForm.ruleForm.ruleDefinition.scheduleTooltipText": "Les vérifications sont mises en file d'attente ; elles seront exécutées au plus près de la valeur définie, en fonction de la capacité.", + "responseOpsRuleForm.ruleForm.ruleDefinition.scopeDescriptionText": "Sélectionnez les applications auxquelles associer le privilège de rôle correspondant", + "responseOpsRuleForm.ruleForm.ruleDefinition.scopeTitle": "Portée de la règle", + "responseOpsRuleForm.ruleForm.ruleDefinitionTitle": "Définition de la règle", + "responseOpsRuleForm.ruleForm.ruleDetails.description": "Définissez un nom et des balises pour votre règle.", + "responseOpsRuleForm.ruleForm.ruleDetails.ruleNameInputButtonAriaLabel": "Enregistrer le nom de la règle", + "responseOpsRuleForm.ruleForm.ruleDetails.ruleNameInputTitle": "Nom de règle", + "responseOpsRuleForm.ruleForm.ruleDetails.ruleTagsInputTitle": "Balises", + "responseOpsRuleForm.ruleForm.ruleDetails.ruleTagsPlaceholder": "Ajouter des balises", + "responseOpsRuleForm.ruleForm.ruleDetails.title": "Nom et balises de la règle", + "responseOpsRuleForm.ruleForm.ruleDetailsTitle": "Détails de la règle", + "responseOpsRuleForm.ruleForm.ruleFormCancelModalCancel": "Annuler", + "responseOpsRuleForm.ruleForm.ruleFormCancelModalConfirm": "Abandonner les modifications", + "responseOpsRuleForm.ruleForm.ruleFormCancelModalDescription": "Vous ne pouvez pas récupérer de modifications non enregistrées.", + "responseOpsRuleForm.ruleForm.ruleFormCancelModalTitle": "Abandonner les modifications non enregistrées apportées à la règle ?", + "responseOpsRuleForm.ruleForm.ruleFormConsumerSelection.apm": "APM et expérience utilisateur", + "responseOpsRuleForm.ruleForm.ruleFormConsumerSelection.consumerSelectComboBoxTitle": "Sélectionner une portée", + "responseOpsRuleForm.ruleForm.ruleFormConsumerSelection.consumerSelectTitle": "Visibilité du rôle", + "responseOpsRuleForm.ruleForm.ruleFormConsumerSelection.infrastructure": "Indicateurs", + "responseOpsRuleForm.ruleForm.ruleFormConsumerSelection.logs": "Logs", + "responseOpsRuleForm.ruleForm.ruleFormConsumerSelection.slo": "SLO", + "responseOpsRuleForm.ruleForm.ruleFormConsumerSelection.stackAlerts": "Règles de la Suite Elastic", + "responseOpsRuleForm.ruleForm.ruleFormConsumerSelection.uptime": "Synthetics et Uptime", + "responseOpsRuleForm.ruleForm.ruleNotFoundErrorText": "Une erreur s'est produite lors du chargement de la règle. Veuillez vous assurer que la règle existe et que vous y avez accès.", + "responseOpsRuleForm.ruleForm.ruleNotFoundErrorTitle": "Impossible de charger la règle", + "responseOpsRuleForm.ruleForm.rulePage.ruleNameAriaLabelText": "Modifier le nom de la règle", + "responseOpsRuleForm.ruleForm.rulePageFooter.cancelText": "Annuler", + "responseOpsRuleForm.ruleForm.rulePageFooter.createText": "Créer une règle", + "responseOpsRuleForm.ruleForm.rulePageFooter.saveText": "Enregistrer la règle", + "responseOpsRuleForm.ruleForm.rulePageFooter.showRequestText": "Afficher la requête", + "responseOpsRuleForm.ruleForm.ruleSchedule.scheduleTitlePrefix": "Chaque", + "responseOpsRuleForm.ruleForm.ruleTypeNotFoundErrorText": "Une erreur s'est produite lors du chargement du type de règle. Veuillez vous assurer que vous avez accès au type de règle sélectionné.", + "responseOpsRuleForm.ruleForm.ruleTypeNotFoundErrorTitle": "Impossible de charger le type de règle", + "responseOpsRuleForm.ruleForm.showRequestModal.headerTitle": "{requestType} requête de règle d'alerte", + "responseOpsRuleForm.ruleForm.showRequestModal.headerTitleCreate": "Créer", + "responseOpsRuleForm.ruleForm.showRequestModal.headerTitleEdit": "Modifier", + "responseOpsRuleForm.ruleForm.showRequestModal.somethingWentWrongDescription": "Désolé, un problème est survenu.", + "responseOpsRuleForm.ruleForm.showRequestModal.subheadingTitle": "La requête Kibana va {requestType} cette règle.", + "responseOpsRuleForm.ruleForm.showRequestModal.subheadingTitleCreate": "créer", + "responseOpsRuleForm.ruleForm.showRequestModal.subheadingTitleEdit": "modifier", + "responseOpsRuleForm.technicalPreviewBadgeDescription": "Cette fonctionnalité est en version d'évaluation technique et pourra être modifiée ou retirée complètement dans une future version. Elastic s'efforcera de corriger tout problème, mais les fonctionnalités des versions d'évaluation technique ne sont pas soumises aux SLA de support des fonctionnalités officielles en disponibilité générale.", + "responseOpsRuleForm.technicalPreviewBadgeLabel": "Version d'évaluation technique", "savedObjects.overwriteRejectedDescription": "La confirmation d'écrasement a été rejetée.", "savedObjects.saveDuplicateRejectedDescription": "La confirmation d'enregistrement avec un doublon de titre a été rejetée.", "savedObjects.saveModal.cancelButtonLabel": "Annuler", @@ -8314,24 +8172,16 @@ "unifiedDocViewer.docView.table.searchPlaceHolder": "Rechercher des noms ou valeurs de champs", "unifiedDocViewer.docViews.json.jsonTitle": "JSON", "unifiedDocViewer.docViews.table.esqlMultivalueFilteringDisabled": "Le filtrage multivalué n'est pas pris en charge dans ES|QL", - "unifiedDocViewer.docViews.table.filterForFieldPresentButtonAriaLabel": "Filtrer sur le champ", "unifiedDocViewer.docViews.table.filterForFieldPresentButtonTooltip": "Filtrer sur le champ", - "unifiedDocViewer.docViews.table.filterForValueButtonAriaLabel": "Filtrer sur la valeur", "unifiedDocViewer.docViews.table.filterForValueButtonTooltip": "Filtrer sur la valeur", - "unifiedDocViewer.docViews.table.filterOutValueButtonAriaLabel": "Exclure la valeur", "unifiedDocViewer.docViews.table.filterOutValueButtonTooltip": "Exclure la valeur", "unifiedDocViewer.docViews.table.ignored.multiValueLabel": "Contient des valeurs ignorées", "unifiedDocViewer.docViews.table.ignored.singleValueLabel": "Valeur ignorée", "unifiedDocViewer.docViews.table.ignoredValuesCanNotBeSearchedWarningMessage": "Les valeurs ignorées ne peuvent pas être recherchées", "unifiedDocViewer.docViews.table.pinFieldLabel": "Épingler le champ", "unifiedDocViewer.docViews.table.tableTitle": "Tableau", - "unifiedDocViewer.docViews.table.toggleColumnInTableButtonAriaLabel": "Afficher/Masquer la colonne dans le tableau", - "unifiedDocViewer.docViews.table.toggleColumnInTableButtonTooltip": "Afficher/Masquer la colonne dans le tableau", "unifiedDocViewer.docViews.table.toggleColumnTableButtonTooltip": "Afficher/Masquer la colonne dans le tableau", - "unifiedDocViewer.docViews.table.unableToFilterForPresenceOfMetaFieldsTooltip": "Impossible de filtrer sur les champs méta", - "unifiedDocViewer.docViews.table.unableToFilterForPresenceOfScriptedFieldsTooltip": "Impossible de filtrer sur les champs scriptés", "unifiedDocViewer.docViews.table.unableToFilterForPresenceOfScriptedFieldsWarningMessage": "Impossible de filtrer sur les champs scriptés", - "unifiedDocViewer.docViews.table.unindexedFieldsCanNotBeSearchedTooltip": "Les champs non indexés ou les valeurs ignorées ne peuvent pas être recherchés", "unifiedDocViewer.docViews.table.unindexedFieldsCanNotBeSearchedWarningMessage": "Il est impossible d’effectuer une recherche sur des champs non indexés", "unifiedDocViewer.docViews.table.unpinFieldLabel": "Désépingler le champ", "unifiedDocViewer.docViews.table.viewLessButton": "Afficher moins", @@ -8341,7 +8191,6 @@ "unifiedDocViewer.fieldActions.filterForValue": "Filtrer sur la valeur", "unifiedDocViewer.fieldActions.filterOutValue": "Exclure la valeur", "unifiedDocViewer.fieldActions.toggleColumn": "Afficher/Masquer la colonne dans le tableau", - "unifiedDocViewer.fieldChooser.discoverField.actions": "Actions", "unifiedDocViewer.fieldChooser.discoverField.multiField": "champ multiple", "unifiedDocViewer.fieldChooser.discoverField.multiFieldTooltipContent": "Les champs multiples peuvent avoir plusieurs valeurs.", "unifiedDocViewer.fieldChooser.discoverField.name": "Champ", @@ -15310,7 +15159,6 @@ "xpack.datasetQuality.details.fetchDataStreamDetailsFailed": "Nous n'avons pas pu obtenir les détails de votre flux de données.", "xpack.datasetQuality.details.fetchDataStreamSettingsFailed": "Les paramètres du flux de données n'ont pas pu être chargés.", "xpack.datasetQuality.details.fetchIntegrationDashboardsFailed": "Nous n'avons pas pu obtenir vos tableaux de bord d'intégration.", - "xpack.datasetQuality.details.fetchIntegrationsFailed": "Nous n'avons pas pu obtenir les informations relatives à l'intégration de {integrationName}.", "xpack.datasetQuality.details.indexTemplateActionText": "Modèle d'index", "xpack.datasetQuality.details.integrationActionsText": "Actions d'intégration", "xpack.datasetQuality.details.integrationnameText": "Intégration", @@ -17222,7 +17070,6 @@ "xpack.enterpriseSearch.appSearch.metaEngines.title": "Métamoteurs", "xpack.enterpriseSearch.appSearch.multiInputRows.addValueButtonLabel": "Ajouter une valeur", "xpack.enterpriseSearch.appSearch.multiInputRows.inputRowPlaceholder": "Entrer une valeur", - "xpack.enterpriseSearch.appSearch.multiInputRows.removeValueButtonLabel": "Retirer une valeur", "xpack.enterpriseSearch.appSearch.ownerRoleTypeDescription": "Les propriétaires peuvent tout faire. Le compte peut avoir plusieurs propriétaires, mais il doit toujours y avoir au moins un propriétaire.", "xpack.enterpriseSearch.appSearch.productCardDescription": "Une solution sur mesure pour les applications et les sites web, qui fournit les outils dont vous avez besoin pour concevoir, implémenter et gérer efficacement ces expériences de recherche orientées clients.", "xpack.enterpriseSearch.appSearch.productDescription": "Tirez parti des tableaux de bord, des analyses et des API pour simplifier la recherche d'applications avancée.", @@ -17410,8 +17257,6 @@ "xpack.enterpriseSearch.content.analytics.api.generateAnalyticsApiKeyModal.done": "Terminé", "xpack.enterpriseSearch.content.analytics.api.generateAnalyticsApiKeyModal.generateButton": "Générer une clé", "xpack.enterpriseSearch.content.analytics.api.generateAnalyticsApiKeyModal.title": "Créer une clé d'API d'analyse", - "xpack.enterpriseSearch.content.cannotConnect.body": "En savoir plus.", - "xpack.enterpriseSearch.content.cannotConnect.title": "Impossible de se connecter à Enterprise Search", "xpack.enterpriseSearch.content.conectors.indexHealth": "Intègre", "xpack.enterpriseSearch.content.connector_detail.configurationConnector.badgeType.connectorClient": "Connecteur autogéré", "xpack.enterpriseSearch.content.connector_detail.configurationConnector.badgeType.nativeConnector": "Connecteur géré par Elastic", @@ -17602,8 +17447,6 @@ "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.convertConnector.description": "Vous souhaitez héberger vous-même ce connecteur ? Convertissez-le en {link} afin qu'il soit géré sur votre propre infrastructure. Vous devez convertir ce connecteur si vous souhaitez personnaliser le code à l'aide de notre cadre Python.", "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.convertConnector.linkTitle": "connecteur autogéré", "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.convertConnector.title": "Autogestion de ce connecteur", - "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.entSearchWarning.text": "Les connecteurs gérés par Elastic nécessitent une instance Enterprise Search en cours d'exécution.", - "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.entSearchWarning.title": "Aucune instance Enterprise Search en cours d'exécution détectée", "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnectorAdvancedConfiguration.description": "Finalisez votre connecteur en déclenchant une synchronisation unique, ou en définissant un calendrier de synchronisation récurrent.", "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnectorAdvancedConfiguration.schedulingButtonLabel": "Définir un calendrier et synchroniser", "xpack.enterpriseSearch.content.indices.configurationConnector.researchConfiguration.connectorDocumentationLinkLabel": "Documentation", @@ -17956,7 +17799,6 @@ "xpack.enterpriseSearch.content.playground.breadcrumb": "Playground", "xpack.enterpriseSearch.content.searchIndex.cancelSync.successMessage": "Annulation réussie de la synchronisation", "xpack.enterpriseSearch.content.searchIndex.cancelSyncs.successMessage": "Annulation réussie des synchronisations", - "xpack.enterpriseSearch.content.searchIndex.cannotConnect.body": "Le robot d'indexation Elastic requiert Enterprise Search. {link}", "xpack.enterpriseSearch.content.searchIndex.configurationTabLabel": "Configuration", "xpack.enterpriseSearch.content.searchIndex.connectorErrorCallOut.title": "Votre connecteur a rapporté une erreur", "xpack.enterpriseSearch.content.searchIndex.crawlerConfigurationTabLabel": "Configuration", @@ -18294,7 +18136,6 @@ "xpack.enterpriseSearch.createConnector.configurationStep.configurationLabel": "Configuration", "xpack.enterpriseSearch.createConnector.configurationStep.h4.finishUpLabel": "Terminer", "xpack.enterpriseSearch.createConnector.configurationStep.p.description": "Vous pouvez synchroniser manuellement vos données, planifier une synchronisation récurrente ou gérer vos domaines.", - "xpack.enterpriseSearch.createConnector.connectorDescriptionBadge.notAvailableTitle": "Ce connecteur n'est pas disponible en tant que connecteur géré par Elastic", "xpack.enterpriseSearch.createConnector.connectorDocsLinkLabel": "référence du connecteur", "xpack.enterpriseSearch.createConnector.DeploymentStep.Configuration.description": "Maintenant, configurez votre robot Elastic et synchronisez les données.", "xpack.enterpriseSearch.createConnector.DeploymentStep.Configuration.title": "Configuration", @@ -18369,17 +18210,6 @@ "xpack.enterpriseSearch.enterpriseSearch.setupGuide.videoAlt": "Premiers pas avec Enterprise Search", "xpack.enterpriseSearch.enterpriseSearchCard.cta": "En savoir plus", "xpack.enterpriseSearch.entSearch.productCardDescription": "Applications standalone adaptées à des expériences de recherche plus simples, conviviales et axées sur les entreprises.", - "xpack.enterpriseSearch.errorConnectingCallout.setupGuideCta": "Consulter le guide de configuration", - "xpack.enterpriseSearch.errorConnectingCallout.title": "Impossible de se connecter à Enterprise Search", - "xpack.enterpriseSearch.errorConnectingState.cloudErrorMessage": "Les nœuds Enterprise Search fonctionnent-ils dans votre déploiement cloud ? {deploymentSettingsLink}", - "xpack.enterpriseSearch.errorConnectingState.cloudErrorMessageLinkText": "Vérifier vos paramètres de déploiement", - "xpack.enterpriseSearch.errorConnectingState.description1": "Impossible d'établir une connexion à Enterprise Search avec l'URL hôte {enterpriseSearchUrl} en raison de l'erreur suivante :", - "xpack.enterpriseSearch.errorConnectingState.description2": "Vérifiez que l'URL hôte est correctement configurée dans {configFile}.", - "xpack.enterpriseSearch.errorConnectingState.description3": "Assurez-vous que le serveur d'Enterprise Search est en état de répondre.", - "xpack.enterpriseSearch.errorConnectingState.setupGuideCta": "Consulter le guide de configuration", - "xpack.enterpriseSearch.errorConnectingState.title": "Impossible d'établir une connexion", - "xpack.enterpriseSearch.errorConnectingState.troubleshootAuth": "Vérifiez votre authentification utilisateur :", - "xpack.enterpriseSearch.errorConnectingState.troubleshootAuthMessage": "Contactez votre administrateur pour installer un mapping des rôles pour vous donner accès à Enterprise Search", "xpack.enterpriseSearch.exampleConnectorLabel": "Exemple", "xpack.enterpriseSearch.finishUpStep.euiButton.viewInDiscoverLabel": "Afficher dans Discover", "xpack.enterpriseSearch.getConnectorTypeBadge.connectorClientBadgeLabel": "Autogéré", @@ -18528,9 +18358,6 @@ "xpack.enterpriseSearch.navigation.contentPlaygroundLinkLabel": "Playground", "xpack.enterpriseSearch.navigation.contentWebcrawlersLinkLabel": "Robots d'indexation", "xpack.enterpriseSearch.navigation.relevanceInferenceEndpointsLinkLabel": "Points de terminaison d'inférence", - "xpack.enterpriseSearch.noEntSearch.noCrawler": "Le robot d'indexation d'Elastic n'est pas disponible sans Entreprise Search.", - "xpack.enterpriseSearch.noEntSearch.setupGuideCta": "Consulter le guide de configuration", - "xpack.enterpriseSearch.noEntSearchConfigured.title": "Enterprise Search n'a pas encore été configuré", "xpack.enterpriseSearch.notFound.action1": "Retour à votre tableau de bord", "xpack.enterpriseSearch.notFound.action2": "Contacter le support technique", "xpack.enterpriseSearch.notFound.description": "Impossible de trouver la page que vous recherchez.", @@ -18799,7 +18626,6 @@ "xpack.enterpriseSearch.searchApplications.searchApplication.indices.searchPlaceholder": "Filtrer les index", "xpack.enterpriseSearch.searchApplications.searchApplication.indices.someUnknownIndicesCallout.description": "Certaines données peuvent être inaccessibles à partir de cette application de recherche. Recherchez les opérations en attente ou les erreurs sur les index concernés, ou supprimez les index qui ne doivent plus être utilisés par cette application de recherche.", "xpack.enterpriseSearch.searchApplications.searchApplication.indices.someUnknownIndicesCallout.title": "Certains de vos index ne sont pas disponibles.", - "xpack.enterpriseSearch.searchApplications.searchApplication.notFound.action1": "Revenir aux applications de recherche", "xpack.enterpriseSearch.searchApplications.searchApplication.schema.conflictsCallOut.button": "Afficher les conflits", "xpack.enterpriseSearch.searchApplications.searchApplication.schema.conflictsCallOut.description": "Les conflits de type de champ de schéma peuvent être résolus en navigant directement sur l’index source et en mettant à jour le type de champ du ou des champs conflictuels afin qu’il corresponde à celui des autres index sources.", "xpack.enterpriseSearch.searchApplications.searchApplication.schema.conflictsCallOut.title": "Problèmes potentiels de mapping de champ trouvés", @@ -19013,10 +18839,6 @@ "xpack.enterpriseSearch.vectorSearch.guide.query.title": "Effectuer une recherche vectorielle", "xpack.enterpriseSearch.vectorSearch.navTitle": "Recherche vectorielle", "xpack.enterpriseSearch.vectorSearch.productName": "Recherche vectorielle", - "xpack.enterpriseSearch.versionMismatch.body": "Vos versions de Kibana et d'Enterprise Search ne correspondent pas. Pour accéder à Enterprise Search, utilisez la même version majeure et mineure pour chaque service.", - "xpack.enterpriseSearch.versionMismatch.enterpriseSearchVersionText": "Version d'Enterprise Search : {enterpriseSearchVersion}", - "xpack.enterpriseSearch.versionMismatch.kibanaVersionText": "Version de Kibana: {kibanaVersion}", - "xpack.enterpriseSearch.versionMismatch.title": "Erreur de version incompatible", "xpack.enterpriseSearch.welcomeBanner.header.greeting.customTitle": "👋 Bonjour {name} !", "xpack.enterpriseSearch.welcomeBanner.header.greeting.defaultTitle": "👋 Bonjour", "xpack.enterpriseSearch.welcomeBanner.header.title": "Ajouter des données à Elasticsearch et rechercher, vectoriser ou visualiser", @@ -22643,10 +22465,6 @@ "xpack.idxMgmt.home.componentTemplates.list.loadingMessage": "Chargement des modèles de composants en cours…", "xpack.idxMgmt.home.componentTemplatesTabTitle": "Modèles de composants", "xpack.idxMgmt.home.dataStreamsTabTitle": "Flux de données", - "xpack.idxMgmt.home.enrichPolicies.checkingPrivilegesDescription": "Vérification des privilèges…", - "xpack.idxMgmt.home.enrichPolicies.checkingPrivilegesErrorMessage": "Erreur lors de la récupération des privilèges utilisateur depuis le serveur.", - "xpack.idxMgmt.home.enrichPolicies.deniedPrivilegeDescription": "Pour utiliser les Politiques d'enrichissement, vous devez disposer des privilèges de cluster suivants : {missingPrivileges}.", - "xpack.idxMgmt.home.enrichPolicies.deniedPrivilegeTitle": "Gestion des privilèges d'enrichissement requise", "xpack.idxMgmt.home.enrichPoliciesTabTitle": "Politiques d'enrichissement", "xpack.idxMgmt.home.idxMgmtDescription": "Mettez à jour vos index Elasticsearch individuellement ou par lots. {learnMoreLink}", "xpack.idxMgmt.home.idxMgmtDocsLinkText": "Documentation sur la gestion des index", @@ -31707,7 +31525,6 @@ "xpack.ml.trainedModels.modelsList.expandRow": "Développer", "xpack.ml.trainedModels.modelsList.fetchDeletionErrorMessage": "La suppression {modelsCount, plural, one {du modèle} other {des modèles}} a échoué", "xpack.ml.trainedModels.modelsList.fetchFailedErrorMessage": "Erreur lors du chargement des modèles entraînés", - "xpack.ml.trainedModels.modelsList.fetchModelStatsErrorMessage": "Erreur lors du chargement des statistiques des modèles entraînés", "xpack.ml.trainedModels.modelsList.forceStopDialog.cancelText": "Annuler", "xpack.ml.trainedModels.modelsList.forceStopDialog.confirmText": "Arrêt", "xpack.ml.trainedModels.modelsList.forceStopDialog.hasInferenceServicesWarning": "Ce modèle est utilisé par l'API _inference", @@ -35433,26 +35250,6 @@ "xpack.reporting.deprecations.reportingRole.forbiddenErrorMessage": "Vous n’avez pas les autorisations requises pour remédier à ce déclassement.", "xpack.reporting.deprecations.reportingRole.unknownErrorCorrectiveAction": "Pour plus d'informations, veuillez consulter les logs Kibana.", "xpack.reporting.deprecations.reportingRole.unknownErrorMessage": "Impossible d'exécuter la vérification de déclassement. Pour plus d'informations, veuillez consulter les logs Kibana.", - "xpack.reporting.deprecations.reportingRoleMappings.description": "Le mécanisme par défaut pour les privilèges de Reporting fonctionnera différemment dans les versions futures, et ce cluster a des mappings de rôle associés à un rôle déclassé pour ces privilèges. Définissez \"xpack.reporting.roles.enabled\" sur \"false\" pour adopter le comportement futur avant la mise à niveau.", - "xpack.reporting.deprecations.reportingRoleMappings.manualStepFive": "Supprimez le rôle \"reporting_user\" pour tous les mappings de rôle et ajoutez le rôle personnalisé. Les mappings de rôle concernés sont les suivants : {roleMappings}.", - "xpack.reporting.deprecations.reportingRoleMappings.manualStepFour": "Accordez les privilèges de Reporting aux utilisateurs en leur affectant l’un des nouveaux rôles.", - "xpack.reporting.deprecations.reportingRoleMappings.manualStepOne": "Définissez \"xpack.reporting.roles.enabled\" sur \"false\" dans le fichier kibana.yml.", - "xpack.reporting.deprecations.reportingRoleMappings.manualStepThree": "Sous Gestion > Sécurité > Rôles, créez un ou plusieurs rôles permettant d'accorder le privilège de l'application Kibana à Reporting.", - "xpack.reporting.deprecations.reportingRoleMappings.manualStepTwo": "Supprimez le paramètre \"xpack.reporting.roles.allow\" du fichier kibana.yml, le cas échéant.", - "xpack.reporting.deprecations.reportingRoleMappings.title": "Le rôle \"{reportingUserRoleName}\" est déclassé : vérifiez les mappings de rôle.", - "xpack.reporting.deprecations.reportingRoles.description": "Le mécanisme par défaut pour les privilèges de Reporting fonctionnera différemment dans les versions futures, ce qui affectera le comportement de ce cluster. Définissez \"xpack.reporting.roles.enabled\" sur \"false\" pour adopter le comportement futur avant la mise à niveau.", - "xpack.reporting.deprecations.reportingRoles.manualStepFour": "Accordez les privilèges de Reporting aux utilisateurs en leur affectant l’un des nouveaux rôles.", - "xpack.reporting.deprecations.reportingRoles.manualStepOne": "Définissez \"xpack.reporting.roles.enabled\" sur \"false\" dans le fichier kibana.yml.", - "xpack.reporting.deprecations.reportingRoles.manualStepThree": "Sous Gestion > Sécurité > Rôles, créez un ou plusieurs rôles permettant d'accorder le privilège de l'application Kibana à Reporting.", - "xpack.reporting.deprecations.reportingRoles.manualStepTwo": "Supprimez le paramètre \"xpack.reporting.roles.allow\" du fichier kibana.yml, le cas échéant.", - "xpack.reporting.deprecations.reportingRoles.title": "Le paramètre \"{fromPath}.roles\" est déclassé.", - "xpack.reporting.deprecations.reportingRoleUsers.description": "Le mécanisme par défaut pour les privilèges de Reporting fonctionnera différemment dans les versions futures, et ce cluster a des utilisateurs associés à un rôle déclassé pour ces privilèges. Définissez \"xpack.reporting.roles.enabled\" sur \"false\" pour adopter le comportement futur avant la mise à niveau.", - "xpack.reporting.deprecations.reportingRoleUsers.manualStepFive": "Supprimez le rôle \"reporting_user\" pour tous les utilisateurs et ajoutez le rôle personnalisé. Les utilisateurs concernés sont les suivants : {usersRoles}.", - "xpack.reporting.deprecations.reportingRoleUsers.manualStepFour": "Accordez les privilèges de Reporting aux utilisateurs en leur affectant l’un des nouveaux rôles.", - "xpack.reporting.deprecations.reportingRoleUsers.manualStepOne": "Définissez \"xpack.reporting.roles.enabled\" sur \"false\" dans le fichier kibana.yml.", - "xpack.reporting.deprecations.reportingRoleUsers.manualStepThree": "Sous Gestion > Sécurité > Rôles, créez un ou plusieurs rôles permettant d'accorder le privilège de l'application Kibana à Reporting.", - "xpack.reporting.deprecations.reportingRoleUsers.manualStepTwo": "Supprimez le paramètre \"xpack.reporting.roles.allow\" du fichier kibana.yml, le cas échéant.", - "xpack.reporting.deprecations.reportingRoleUsers.title": "Le rôle \"{reportingUserRoleName}\" est déclassé : vérifiez les rôles utilisateur.", "xpack.reporting.diagnostic.browserMissingDependency": "Le navigateur n'a pas pu démarrer correctement en raison de dépendances système manquantes. Veuillez consulter {url}", "xpack.reporting.diagnostic.browserMissingFonts": "Le navigateur n'a pas réussi à localiser de police par défaut. Consultez {url} pour corriger le problème.", "xpack.reporting.diagnostic.fontconfigError": "Le navigateur n'a pas pu démarrer correctement en raison de dépendances de polices système manquantes. Veuillez consulter {url}", @@ -35589,8 +35386,6 @@ "xpack.reporting.statusIndicator.unknownLabel": "Inconnu", "xpack.reporting.uiSettings.validate.customLogo.badFile": "Désolé, ce fichier ne convient pas. Veuillez essayer un autre fichier image.", "xpack.reporting.uiSettings.validate.customLogo.tooLarge": "Désolé, ce fichier est trop volumineux. Le fichier image doit être inférieur à 200 kilo-octets.", - "xpack.reporting.userAccessError.learnMoreLink": "En savoir plus", - "xpack.reporting.userAccessError.message": "Demandez à votre administrateur un accès aux fonctionnalités de reporting. {grantUserAccessDocs}.", "xpack.rollupJobs.appTitle": "Tâches de cumul", "xpack.rollupJobs.create.backButton.label": "Retour", "xpack.rollupJobs.create.dateTypeField": "date", @@ -37183,8 +36978,6 @@ "xpack.securitySolution.assistant.quickPrompts.alertSummarizationTitle": "Synthèse de l’alerte", "xpack.securitySolution.assistant.quickPrompts.AutomationPrompt": "Quelle intégration d’Elastic Agent activée par Fleet dois-je utiliser pour collecter des logs et des évènements de :", "xpack.securitySolution.assistant.quickPrompts.AutomationTitle": "Conseil sur l’intégration d’agent", - "xpack.securitySolution.assistant.quickPrompts.esqlQueryGenerationPrompt": "En tant qu'utilisateur expert d'Elastic Security, veuillez générer une requête ESQL valide et précise pour détecter le cas d'utilisation ci-dessous. Votre réponse doit être formatée pour pouvoir être utilisée immédiatement dans une chronologie ou une règle de détection d’Elastic Security. Prenez votre temps pour répondre, vérifiez bien vos connaissances et toutes les fonctions que je vous demande. Pour les réponses ES|QL en particulier, vous devez toujours répondre uniquement avec ce qui est disponible dans vos connaissances personnelles. Je ne peux pas me permettre que les requêtes soient inexactes. Supposez que j'utilise le Elastic Common Schema et l'agent Elastic. Veillez à ce que les réponses soient formatées de manière à pouvoir être facilement copiées sous la forme d'un bloc de code distinct dans le markdown.", - "xpack.securitySolution.assistant.quickPrompts.esqlQueryGenerationTitle": "Génération de requête ES|QL", "xpack.securitySolution.assistant.quickPrompts.ruleCreationPrompt": "En tant qu’utilisateur expert d’Elastic Security, veuillez générer une requête EQL valide et précise pour détecter le cas d’utilisation ci-dessous. Votre réponse doit être formatée pour pouvoir être utilisée immédiatement dans une chronologie ou une règle de détection d’Elastic Security. Si Elastic Security a déjà une règle prédéfinie pour le cas d’utilisation ou pour un cas similaire, veuillez fournir un lien vers cette règle et la décrire.", "xpack.securitySolution.assistant.quickPrompts.ruleCreationTitle": "Génération de requête", "xpack.securitySolution.assistant.quickPrompts.splQueryConversionPrompt": "J’ai la requête suivante d’une plateforme SIEM précédente. En tant qu’utilisateur expert d’Elastic Security, veuillez suggérer un équivalent EQL Elastic. Je dois être capable de la copier immédiatement dans une chronologie Elastic Security.", @@ -38019,8 +37812,6 @@ "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.customThreatQueryFieldRequiredError": "Au moins une correspondance d'indicateur est requise.", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.EqlQueryBarLabel": "Requête EQL", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.eqlQueryFieldRequiredError": "Une requête EQL est requise.", - "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.eqlSequenceSuppressionDisableText": "La suppression n'est pas prise en charge pour les requêtes de séquence EQL.", - "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.eqlSequenceSuppressionValidationText": "{EQL_SEQUENCE_SUPPRESSION_DISABLE_TOOLTIP} Remplacez la requête EQL par une requête non séquentielle ou supprimez les champs de suppression.", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldAnomalyThresholdLabel": "Seuil de score d'anomalie", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldMachineLearningJobIdLabel": "Tâche de Machine Learning", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldQuerBarLabel": "Requête personnalisée", @@ -46258,7 +46049,6 @@ "xpack.synthetics.failedStep.label": "Étape ayant échoué", "xpack.synthetics.fcp.label": "FCP", "xpack.synthetics.featureRegistry.syntheticsFeatureName": "Synthetics et Uptime", - "xpack.synthetics.features.app": "Synthetics", "xpack.synthetics.features.elasticManagedLocations": "Emplacements gérés par Elastic activés", "xpack.synthetics.fieldLabels.cls": "Cumulative Layout Shift (CLS)", "xpack.synthetics.fieldLabels.dcl": "Événement DOMContentLoaded (DCL)", @@ -48633,7 +48423,6 @@ "xpack.triggersActionsUI.updateApiKeyConfirmModal.failureMessage": "Impossible de mettre à jour {idsToUpdate, plural, one {la clé} other {les clés}} de l'API", "xpack.triggersActionsUI.updateApiKeyConfirmModal.title": "Mettre à jour la clé d'API", "xpack.triggersActionsUI.urlSyncedAlertsSearchBar.invalidQueryTitle": "Chaîne de requête non valide", - "xpack.triggersActionsUI.useRuleAADFields.errorMessage": "Impossible de charger les champs d'alerte par type de règle", "xpack.upgradeAssistant.app.deniedPrivilegeDescription": "Afin d'utiliser l'assistant de mise à niveau et de résoudre les problèmes de déclassement, vous devez disposer d'un accès permettant de gérer tous les espaces Kibana.", "xpack.upgradeAssistant.app.deniedPrivilegeTitle": "Rôle d'administrateur Kibana requis", "xpack.upgradeAssistant.appTitle": "Assistant de mise à niveau", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 9aa8aa0977b71..b80f5e6427079 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -103,40 +103,6 @@ "aiAssistantManagementSelection.preferredAIAssistantTypeSettingValueObservability": "すべて", "alertingTypes.builtinActionGroups.recovered": "回復済み", "alertsGrouping.unit": "{totalCount, plural, other {アラート}}", - "alertsUIShared.actiActionsonNotifyWhen.forEachOption": "各アラート", - "alertsUIShared.actiActionsonNotifyWhen.summaryOption": "アラートの概要", - "alertsUIShared.actionForm.actionGroupRecoveredMessage": "回復済み", - "alertsUIShared.actionVariables.alertActionGroupLabel": "ルールのアクションをスケジュールしたアラートのアクショングループ。", - "alertsUIShared.actionVariables.alertActionGroupNameLabel": "ルールのアクションをスケジュールしたアラートのアクショングループの人間が読み取れる名前。", - "alertsUIShared.actionVariables.alertConsecutiveMatchesLabel": "ルール条件を満たす連続実行の数。", - "alertsUIShared.actionVariables.alertFlappingLabel": "アラートの状態が繰り返し変化しているかどうかを示すアラートのフラグ。", - "alertsUIShared.actionVariables.alertIdLabel": "ルールのアクションをスケジュールしたアラートのID。", - "alertsUIShared.actionVariables.alertUuidLabel": "ルールのアクションをスケジュールしたアラートのUUID。", - "alertsUIShared.actionVariables.allAlertsCountLabel": "すべてのアラートのカウント。", - "alertsUIShared.actionVariables.allAlertsDataLabel": "すべてのアラートのオブジェクトの配列。", - "alertsUIShared.actionVariables.dateLabel": "ルールがアクションをスケジュールした日付。", - "alertsUIShared.actionVariables.kibanaBaseUrlLabel": "構成したserver.publicBaseUrl値。構成していない場合は、空の文字列。", - "alertsUIShared.actionVariables.legacyAlertActionGroupLabel": "{variable}の導入により、これは廃止される予定です。", - "alertsUIShared.actionVariables.legacyAlertActionGroupNameLabel": "{variable}の導入により、これは廃止される予定です。", - "alertsUIShared.actionVariables.legacyAlertIdLabel": "{variable}の導入により、これは廃止される予定です。", - "alertsUIShared.actionVariables.legacyAlertInstanceIdLabel": "{variable}の導入により、これは廃止される予定です。", - "alertsUIShared.actionVariables.legacyAlertNameLabel": "{variable}の導入により、これは廃止される予定です。", - "alertsUIShared.actionVariables.legacyParamsLabel": "{variable}の導入により、これは廃止される予定です。", - "alertsUIShared.actionVariables.legacySpaceIdLabel": "{variable}の導入により、これは廃止される予定です。", - "alertsUIShared.actionVariables.legacyTagsLabel": "{variable}の導入により、これは廃止される予定です。", - "alertsUIShared.actionVariables.newAlertsCountLabel": "新しいアラートのカウント。", - "alertsUIShared.actionVariables.newAlertsDataLabel": "新しいアラートのオブジェクトの配列。", - "alertsUIShared.actionVariables.ongoingAlertsCountLabel": "実行中のアラートのカウント。", - "alertsUIShared.actionVariables.ongoingAlertsDataLabel": "実行中のアラートのオブジェクトの配列。", - "alertsUIShared.actionVariables.recoveredAlertsCountLabel": "回復済みのアラートのカウント。", - "alertsUIShared.actionVariables.recoveredAlertsDataLabel": "回復済みのアラートのオブジェクトの配列。", - "alertsUIShared.actionVariables.ruleIdLabel": "ルールの ID。", - "alertsUIShared.actionVariables.ruleNameLabel": "ルールの名前。", - "alertsUIShared.actionVariables.ruleParamsLabel": "ルールのパラメーター。", - "alertsUIShared.actionVariables.ruleSpaceIdLabel": "ルールのスペースID。", - "alertsUIShared.actionVariables.ruleTagsLabel": "ルールのタグ。", - "alertsUIShared.actionVariables.ruleTypeLabel": "ルールのタイプ。", - "alertsUIShared.actionVariables.ruleUrlLabel": "アラートを生成したルールのURL。server.publicBaseUrlが構成されていない場合は、空の文字列になります。", "alertsUIShared.alertFieldsTable.field": "フィールド", "alertsUIShared.alertFieldsTable.filter.placeholder": "フィールド、値、または説明でフィルター...", "alertsUIShared.alertFieldsTable.value": "値", @@ -160,13 +126,6 @@ "alertsUIShared.components.alertLifecycleStatusBadge.flappingLabel": "フラップ中", "alertsUIShared.components.alertLifecycleStatusBadge.recoveredLabel": "回復済み", "alertsUIShared.components.alertLifecycleStatusBadge.untrackedLabel": "未追跡", - "alertsUIShared.components.ruleTypeModal.allRuleTypes": "すべて", - "alertsUIShared.components.ruleTypeModal.loadingRuleTypes": "ルールタイプを読み込んでいます", - "alertsUIShared.components.ruleTypeModal.noRuleTypesErrorBody": "別の検索を試すか、フィルター設定を変更してください", - "alertsUIShared.components.ruleTypeModal.noRuleTypesErrorTitle": "ルールタイプが見つかりませんでした", - "alertsUIShared.components.ruleTypeModal.searchPlaceholder": "検索", - "alertsUIShared.components.ruleTypeModal.title": "ルールタイプを選択", - "alertsUIShared.disabledActionsWarningTitle": "このアラートには無効なアクションがあります", "alertsUIShared.filterGroup.contextMenu.reset": "コントロールをリセット", "alertsUIShared.filterGroup.contextMenu.resetTooltip": "コントロールを初期設定にリセット", "alertsUIShared.filterGroup.filtersChangedBanner": "フィルターコントロールが変更されました", @@ -181,24 +140,9 @@ "alertsUIShared.filtersGroup.discardChanges": "変更を破棄", "alertsUIShared.filtersGroup.pendingChanges": "保留中の変更を保存", "alertsUIShared.filtersGroup.urlParam.arrayError": "ページフィルターURLパラメーターは配列でなければなりません", - "alertsUIShared.healthCheck.actionText": "詳細情報", - "alertsUIShared.healthCheck.alertsErrorText": "ルールを作製するには、アラートおよびアクションプラグインを有効にする必要があります。", - "alertsUIShared.healthCheck.alertsErrorTitle": "アラートとアクションを有効にする必要があります", - "alertsUIShared.healthCheck.apiKeysAndEncryptionErrorText": "Alertingを使用するには、APIキーを有効にして、暗号化鍵を構成する必要があります。", - "alertsUIShared.healthCheck.apiKeysDisabledErrorText": "Alertingを使用するには、APIキーを有効にする必要があります。", - "alertsUIShared.healthCheck.apiKeysDisabledErrorTitle": "追加の設定が必要です", - "alertsUIShared.healthCheck.encryptionErrorText": "Alertingを使用するには、暗号化鍵を構成する必要があります。", - "alertsUIShared.healthCheck.encryptionErrorTitle": "追加の設定が必要です", - "alertsUIShared.healthCheck.healthCheck.apiKeysAndEncryptionErrorTitle": "追加の設定が必要です", "alertsUIShared.hooks.useAlertDataView.fetchErrorMessage": "アラートデータビューを読み込めません", - "alertsUIShared.hooks.useFindAlertsQuery.unableToFetchAlertsGroupingAggregations": "アラートグループ集約を取得できません。", "alertsUIShared.hooks.useFindAlertsQuery.unableToFindAlertsQueryMessage": "アラートが見つかりません", "alertsUIShared.hooks.useLoadRuleTypesQuery.unableToLoadRuleTypesMessage": "ルールタイプを読み込めません", - "alertsUIShared.hooks.useRuleAADFields.errorMessage": "ルールタイプごとにアラートフィールドを読み込めません", - "alertsUIShared.licenseCheck.actionTypeDisabledByConfigMessageTitle": "この機能は Kibana の構成で無効になっています。", - "alertsUIShared.licenseCheck.actionTypeDisabledByLicenseLinkTitle": "ライセンスオプションを表示", - "alertsUIShared.licenseCheck.actionTypeDisabledByLicenseMessageDescription": "このアクションを再び有効にするには、ライセンスをアップグレードしてください。", - "alertsUIShared.licenseCheck.actionTypeDisabledByLicenseMessageTitle": "この機能には {minimumLicenseRequired} ライセンスが必要です。", "alertsUIShared.maintenanceWindowCallout.fetchError": "保守時間枠がアクティブであるかどうかを確認できませんでした", "alertsUIShared.maintenanceWindowCallout.fetchErrorDescription": "保守時間枠の実行中は、ルール通知が停止されます。", "alertsUIShared.maintenanceWindowCallout.maintenanceWindowActive": "{categories}ルールの{activeWindowCount, plural, other {保守時間枠}}が実行中です", @@ -207,163 +151,6 @@ "alertsUIShared.maintenanceWindowCallout.maintenanceWindowMultipleCategoryNames": "{commaSeparatedList}、および{last}", "alertsUIShared.maintenanceWindowCallout.maintenanceWindowTwoCategoryNames": "{first}および{second}", "alertsUIShared.maintenanceWindowCallout.managementCategoryLabel": "スタック", - "alertsUIShared.producerDisplayNames.apm": "APMおよびユーザーエクスペリエンス", - "alertsUIShared.producerDisplayNames.infrastructure": "インフラストラクチャー", - "alertsUIShared.producerDisplayNames.logs": "ログ", - "alertsUIShared.producerDisplayNames.metrics": "メトリック", - "alertsUIShared.producerDisplayNames.ml": "機械学習", - "alertsUIShared.producerDisplayNames.monitoring": "スタック監視", - "alertsUIShared.producerDisplayNames.observability": "Observability", - "alertsUIShared.producerDisplayNames.siem": "セキュリティ", - "alertsUIShared.producerDisplayNames.slo": "SLO", - "alertsUIShared.producerDisplayNames.stackAlerts": "スタックアラート", - "alertsUIShared.producerDisplayNames.uptime": "Syntheticsとアップタイム", - "alertsUIShared.ruleActionsAlertsFilter.ActionAlertsFilterQueryPlaceholder": "KQL構文を使用してアラートをフィルター", - "alertsUIShared.ruleActionsAlertsFilter.ActionAlertsFilterQueryToggleLabel": "アラートがクエリと一致する場合", - "alertsUIShared.ruleActionsItem.actionErrorToolTip": "アクションにはエラーがあります。", - "alertsUIShared.ruleActionsItem.actionUnableToLoadConnectorTitle": "コネクターを作成し、再試行してください。コネクターを作成できない場合は、システム管理者に連絡してください。", - "alertsUIShared.ruleActionsItem.actionUseAadTemplateFieldsLabel": "アラートインデックスのテンプレートフィールドを使用", - "alertsUIShared.ruleActionsItem.actionWarningsTitle": "1件の警告", - "alertsUIShared.ruleActionsItem.existingAlertActionTypeEditTitle": "{actionConnectorName}", - "alertsUIShared.ruleActionsItem.runWhenGroupTitle": "{groupName}のときに実行", - "alertsUIShared.ruleActionsItem.summaryGroupTitle": "アラートの概要", - "alertsUIShared.ruleActionsNotifyWhen.actionFrequencyLabel": "アクション頻度", - "alertsUIShared.ruleActionsNotifyWhen.frequencyNotifyWhen.label": "次の間隔で実行", - "alertsUIShared.ruleActionsNotifyWhen.notifyWhenThrottleWarning": "カスタムアクション間隔をルールのチェック間隔よりも短くすることはできません", - "alertsUIShared.ruleActionsNotifyWhen.onActionGroupChange.description": "アラートステータスが変更される場合にアクションを実行します。", - "alertsUIShared.ruleActionsNotifyWhen.onActionGroupChange.display": "ステータス変更時", - "alertsUIShared.ruleActionsNotifyWhen.onActionGroupChange.label": "ステータス変更時", - "alertsUIShared.ruleActionsNotifyWhen.onActiveAlert.description": "ルール条件が満たされた場合に、アクションが実行されます。", - "alertsUIShared.ruleActionsNotifyWhen.onActiveAlert.display": "チェック間隔", - "alertsUIShared.ruleActionsNotifyWhen.onActiveAlert.label": "チェック間隔", - "alertsUIShared.ruleActionsNotifyWhen.onThrottleInterval.description": "ルール条件が満たされた場合に、アクションが実行されます。", - "alertsUIShared.ruleActionsNotifyWhen.onThrottleInterval.display": "カスタムアクション間隔", - "alertsUIShared.ruleActionsNotifyWhen.onThrottleInterval.label": "カスタムアクション間隔", - "alertsUIShared.ruleActionsNotifyWhen.summaryOrRulePerSelectRoleDescription": "アクション頻度タイプ選択", - "alertsUIShared.ruleActionsSetting.actionGroupNotSupported": "{actionGroupName}(現在サポートされていません)", - "alertsUIShared.ruleActionsSetting.actionGroupRunWhen": "次のときに実行", - "alertsUIShared.ruleActionsSystemActionsItem.deleteActionAriaLabel": "削除アクション", - "alertsUIShared.ruleForm.actionsForm.publicBaseUrl": "server.publicBaseUrlが設定されていません。生成されたURLは相対URLか空になります。", - "alertsUIShared.ruleForm.actionsForm.requiredFilterQuery": "カスタムクエリが必要です。", - "alertsUIShared.ruleForm.actionTypeModalEmptyText": "別の検索を試すか、フィルター設定を変更してください。", - "alertsUIShared.ruleForm.actionTypeModalEmptyTitle": "コネクターが見つかりません", - "alertsUIShared.ruleForm.actionTypeModalFilterAll": "すべて", - "alertsUIShared.ruleForm.actionTypeModalTitle": "コネクターを選択", - "alertsUIShared.ruleForm.circuitBreakerHideFullErrorText": "完全なエラーを非表示", - "alertsUIShared.ruleForm.circuitBreakerSeeFullErrorText": "完全なエラーを表示", - "alertsUIShared.ruleForm.confirmRuleSaveCancelButtonText": "キャンセル", - "alertsUIShared.ruleForm.confirmRuleSaveConfirmButtonText": "ルールを保存", - "alertsUIShared.ruleForm.confirmRuleSaveMessageText": "いつでもアクションを追加できます。", - "alertsUIShared.ruleForm.confirmRuleSaveTitle": "アクションがないルールを保存しますか?", - "alertsUIShared.ruleForm.createErrorText": "ルールを作成できません。", - "alertsUIShared.ruleForm.createSuccessText": "ルール\"{ruleName}\"を作成しました", - "alertsUIShared.ruleForm.editErrorText": "ルールを更新できません", - "alertsUIShared.ruleForm.editSuccessText": "''{ruleName}''を更新しました", - "alertsUIShared.ruleForm.error.belowMinimumAlertDelayText": "アラート遅延は1以上の値でなければなりません。", - "alertsUIShared.ruleForm.error.belowMinimumText": "間隔は{minimum}以上でなければなりません。", - "alertsUIShared.ruleForm.error.requiredConsumerText": "範囲が必要です。", - "alertsUIShared.ruleForm.error.requiredIntervalText": "確認間隔が必要です。", - "alertsUIShared.ruleForm.error.requiredNameText": "名前が必要です。", - "alertsUIShared.ruleForm.error.requiredRuleTypeIdText": "ルールタイプは必須です。", - "alertsUIShared.ruleForm.intervalWarningText": "パフォーマンスの考慮から、{minimum}未満の間隔は推奨されません。", - "alertsUIShared.ruleForm.modalSearchClearFiltersText": "フィルターを消去", - "alertsUIShared.ruleForm.modalSearchPlaceholder": "検索", - "alertsUIShared.ruleForm.returnTitle": "戻る", - "alertsUIShared.ruleForm.routeParamsErrorText": "ルールフォームの読み込みエラーが発生しました。ルートが正しいことを確認してください。", - "alertsUIShared.ruleForm.routeParamsErrorTitle": "ルールフォームを読み込めません。", - "alertsUIShared.ruleForm.ruleActions.addActionText": "アクションの追加", - "alertsUIShared.ruleForm.ruleActionsAlertsFilterTimeframeTimezoneLabel": "タイムゾーン", - "alertsUIShared.ruleForm.ruleActionsAlertsFilterTimeframeToggleLabel": "アラートがタイムフレーム中に生成された場合", - "alertsUIShared.ruleForm.ruleActionsAlertsFilterTimeframeWeekdays": "曜日", - "alertsUIShared.ruleForm.ruleActionsNoPermissionDescription": "ルールを編集するには、アクションとコネクターへの読み取りアクセス権が必要です。", - "alertsUIShared.ruleForm.ruleActionsNoPermissionTitle": "アクションとコネクターの権限が不足しています", - "alertsUIShared.ruleForm.ruleActionsTitle": "アクション", - "alertsUIShared.ruleForm.ruleAlertDelay.alertDelayHelpText": "指定した数の連続実行がルール条件を満たしたときにのみ、アラートが発生します。", - "alertsUIShared.ruleForm.ruleAlertDelay.alertDelayTitlePrefix": "次の後にアラート", - "alertsUIShared.ruleForm.ruleAlertDelay.alertDelayTitleSuffix": "連続一致", - "alertsUIShared.ruleForm.ruleDefinition.advancedOptionsTitle": "高度なオプション", - "alertsUIShared.ruleForm.ruleDefinition.alertDelayDescription": "アラートが発生する前に、このルールがアラート条件を満たす必要がある連続実行の回数を設定します", - "alertsUIShared.ruleForm.ruleDefinition.alertDelayTitle": "アラート遅延", - "alertsUIShared.ruleForm.ruleDefinition.alertFlappingDetectionDescription": "アクティブと回復済みの状態がすばやく切り替わるアラートを検出し、これらのフラップアラートに対する不要なノイズを低減します", - "alertsUIShared.ruleForm.ruleDefinition.alertFlappingDetectionTitle": "アラートフラップ検出", - "alertsUIShared.ruleForm.ruleDefinition.docLinkTitle": "ドキュメンテーションを表示", - "alertsUIShared.ruleForm.ruleDefinition.loadingRuleTypeParamsTitle": "ルールタイプパラメーターを読み込んでいます", - "alertsUIShared.ruleForm.ruleDefinition.scheduleDescriptionText": "アラート条件を確認する頻度を設定します", - "alertsUIShared.ruleForm.ruleDefinition.scheduleTitle": "ルールスケジュール", - "alertsUIShared.ruleForm.ruleDefinition.scheduleTooltipText": "チェックはキューに登録されています。可能なかぎり定義された値に近づくように実行されます。", - "alertsUIShared.ruleForm.ruleDefinition.scopeDescriptionText": "対応するロール権限に関連付けるアプリケーションを選択", - "alertsUIShared.ruleForm.ruleDefinition.scopeTitle": "ルール範囲", - "alertsUIShared.ruleForm.ruleDefinitionTitle": "ルール検知", - "alertsUIShared.ruleForm.ruleDetails.description": "ルールの名前とタグを定義します。", - "alertsUIShared.ruleForm.ruleDetails.ruleNameInputButtonAriaLabel": "ルール名を保存", - "alertsUIShared.ruleForm.ruleDetails.ruleNameInputTitle": "ルール名", - "alertsUIShared.ruleForm.ruleDetails.ruleTagsInputTitle": "タグ", - "alertsUIShared.ruleForm.ruleDetails.ruleTagsPlaceholder": "タグを追加", - "alertsUIShared.ruleForm.ruleDetails.title": "ルールの名前とタグ", - "alertsUIShared.ruleForm.ruleDetailsTitle": "ルール詳細", - "alertsUIShared.ruleForm.ruleFormCancelModalCancel": "キャンセル", - "alertsUIShared.ruleForm.ruleFormCancelModalConfirm": "変更を破棄", - "alertsUIShared.ruleForm.ruleFormCancelModalDescription": "保存されていない変更は回復できません。", - "alertsUIShared.ruleForm.ruleFormCancelModalTitle": "ルールの保存されていない変更を破棄しますか?", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.apm": "APMおよびユーザーエクスペリエンス", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.consumerSelectComboBoxTitle": "範囲を選択", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.consumerSelectTitle": "ロールの表示", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.infrastructure": "メトリック", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.logs": "ログ", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.slo": "SLO", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.stackAlerts": "スタックルール", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.uptime": "Syntheticsとアップタイム", - "alertsUIShared.ruleForm.ruleNotFoundErrorText": "ルールの読み込みエラーが発生しました。ルールが存在し、選択したルールにアクセスできることを確認してください。", - "alertsUIShared.ruleForm.ruleNotFoundErrorTitle": "ルールを読み込めません", - "alertsUIShared.ruleForm.rulePage.ruleNameAriaLabelText": "ルール名を編集", - "alertsUIShared.ruleForm.rulePageFooter.cancelText": "キャンセル", - "alertsUIShared.ruleForm.rulePageFooter.createText": "ルールを作成", - "alertsUIShared.ruleForm.rulePageFooter.saveText": "ルールを保存", - "alertsUIShared.ruleForm.rulePageFooter.showRequestText": "リクエストを表示", - "alertsUIShared.ruleForm.ruleSchedule.scheduleTitlePrefix": "毎", - "alertsUIShared.ruleForm.ruleTypeNotFoundErrorText": "ルールタイプの読み込みエラーが発生しました。選択したルールタイプにアクセスできることを確認してください。", - "alertsUIShared.ruleForm.ruleTypeNotFoundErrorTitle": "ルールタイプを読み込めません", - "alertsUIShared.ruleForm.showRequestModal.headerTitle": "{requestType}アラートルールリクエスト", - "alertsUIShared.ruleForm.showRequestModal.headerTitleCreate": "作成", - "alertsUIShared.ruleForm.showRequestModal.headerTitleEdit": "編集", - "alertsUIShared.ruleForm.showRequestModal.somethingWentWrongDescription": "申し訳ございませんが、何か問題が発生しました。", - "alertsUIShared.ruleForm.showRequestModal.subheadingTitle": "このKibanaリクエストはこのルールを{requestType}します。", - "alertsUIShared.ruleForm.showRequestModal.subheadingTitleCreate": "作成", - "alertsUIShared.ruleForm.showRequestModal.subheadingTitleEdit": "編集", - "alertsUIShared.ruleSettingsFlappingForm.flappingExternalLinkLabel": "概要", - "alertsUIShared.ruleSettingsFlappingForm.flappingLabel": "フラップ検出", - "alertsUIShared.ruleSettingsFlappingForm.flappingOffContentRules": "ルール", - "alertsUIShared.ruleSettingsFlappingForm.flappingOffContentSettings": "設定", - "alertsUIShared.ruleSettingsFlappingForm.flappingOffPopoverContent": "スペース内のすべてのルールでフラッピング検出を有効にするには、{rules} > {settings}に移動します。その後、各ルールで履歴表示期間としきい値をカスタマイズできます。", - "alertsUIShared.ruleSettingsFlappingForm.flappingOverrideConfiguration": "構成をカスタマイズ", - "alertsUIShared.ruleSettingsFlappingForm.offLabel": "オフ", - "alertsUIShared.ruleSettingsFlappingForm.onLabel": "オン", - "alertsUIShared.ruleSettingsFlappingForm.overrideLabel": "カスタム", - "alertsUIShared.ruleSettingsFlappingInputsProps.lookBackWindowHelp": "しきい値を満たす必要がある最小実行回数。", - "alertsUIShared.ruleSettingsFlappingInputsProps.lookBackWindowLabel": "ルール実行ルックバック期間", - "alertsUIShared.ruleSettingsFlappingInputsProps.statusChangeThresholdHelp": "ルックバック期間でアラートの状態が切り替わる必要がある最小回数。", - "alertsUIShared.ruleSettingsFlappingInputsProps.statusChangeThresholdLabel": "アラートステータス変更しきい値", - "alertsUIShared.ruleSettingsFlappingMessage.flappingOffMessage": "アラートフラップ検出がオフです。アラートはルール間隔に基づいて生成されるため、アラート量が多くなる可能性があります。", - "alertsUIShared.ruleSettingsFlappingMessage.flappingSettingsDescription": "このルールは、過去{lookBackWindow}に少なくとも{statusChangeThreshold}ステータスが変更された場合、アラートが作動していることを検出します。", - "alertsUIShared.ruleSettingsFlappingMessage.lookBackWindowLabelRuleRuns": "{amount, number}個のルール{amount, plural, other {が実行されます}}", - "alertsUIShared.ruleSettingsFlappingMessage.spaceFlappingSettingsDescription": "(このスペースの)すべてのルールは、過去{lookBackWindow}に少なくとも{statusChangeThreshold}ステータスが変更された場合、アラートが作動していることを検出します。", - "alertsUIShared.ruleSettingsFlappingMessage.statusChangeThresholdTimes": "{amount, number} {amount, plural, other {回}}", - "alertsUIShared.ruleSettingsFlappingTitleTooltip.flappingOffContentRules": "ルール", - "alertsUIShared.ruleSettingsFlappingTitleTooltip.flappingOffContentSettings": "設定", - "alertsUIShared.ruleSettingsFlappingTitleTooltip.flappingTitlePopover1": "{flappingDetection}がオンになっている場合、アクティブ状態と回復状態が高速で切り替わるアラートは「作動中」として識別され、通知が削減されます。", - "alertsUIShared.ruleSettingsFlappingTitleTooltip.flappingTitlePopover2": "{alertStatus}は、検出アルゴリズムで使用される期間(最低実行回数)を定義します。", - "alertsUIShared.ruleSettingsFlappingTitleTooltip.flappingTitlePopover3": "{lookBack}は、作動中アラートとして認定されるために、アラートがしきい値期間内に状態を切り替える必要がある最小回数を示します。", - "alertsUIShared.ruleSettingsFlappingTitleTooltip.flappingTitlePopover4": "スペース内のすべてのルールでフラッピング検出を有効にするには、{rules} > {settings}に移動します。その後、各ルールで履歴表示期間としきい値をカスタマイズできます。", - "alertsUIShared.ruleSettingsFlappingTitleTooltip.flappingTitlePopoverAlertStatus": "アラートステータス変更しきい値", - "alertsUIShared.ruleSettingsFlappingTitleTooltip.flappingTitlePopoverFlappingDetection": "フラップ検出", - "alertsUIShared.ruleSettingsFlappingTitleTooltip.flappingTitlePopoverLookBack": "ルール実行ルックバック期間", - "alertsUIShared.ruleSettingsFlappingTitleTooltip.tooltipTitle": "アラートフラップ検出", - "alertsUIShared.technicalPreviewBadgeDescription": "この機能はテクニカルプレビュー中であり、将来のリリースでは変更されたり完全に削除されたりする場合があります。Elasticはすべての問題の修正に努めますが、テクニカルプレビュー中の機能には正式なGA機能のサポートSLAが適用されません。", - "alertsUIShared.technicalPreviewBadgeLabel": "テクニカルプレビュー", - "alertsUIShared.timeUnits.dayLabel": "{timeValue, plural, other {#日}}", - "alertsUIShared.timeUnits.hourLabel": "{timeValue, plural, other {時間}}", - "alertsUIShared.timeUnits.minuteLabel": "{timeValue, plural, other {分}}", - "alertsUIShared.timeUnits.secondLabel": "{timeValue, plural, other {秒}}", "alertsUIShared.typeRegistry.get.missingActionTypeErrorMessage": "オブジェクトタイプ「{id}」は登録されていません。", "alertsUIShared.typeRegistry.register.duplicateObjectTypeErrorMessage": "オブジェクトタイプ「{id}」はすでに登録されています。", "autocomplete.conflictIndicesWarning.description": "このフィールドは、次のインデックスで別の型として定義されているか、マッピングされていません。これにより、予期しないクエリー結果になる場合があります。", @@ -2733,11 +2520,7 @@ "discover.advancedSettings.context.tieBreakerFieldsTitle": "タイブレーカーフィールド", "discover.advancedSettings.defaultColumnsText": "デフォルトでDiscoverアプリに表示される列。空の場合、ドキュメントの概要が表示されます。", "discover.advancedSettings.defaultColumnsTitle": "デフォルトの列", - "discover.advancedSettings.disableDocumentExplorer": "ドキュメントエクスプローラーまたはクラシックビュー", - "discover.advancedSettings.disableDocumentExplorerDescription": "クラシックビューではなく、新しい{documentExplorerDocs}を使用するには、このオプションをオフにします。ドキュメントエクスプローラーでは、データの並べ替え、列のサイズ変更、全画面表示といった優れた機能を使用できます。", - "discover.advancedSettings.discover.disableDocumentExplorerDeprecation": "この設定はサポートが終了し、Kibana 9.0では削除されます。", "discover.advancedSettings.discover.fieldStatisticsLinkText": "フィールド統計情報ビュー", - "discover.advancedSettings.discover.maxCellHeightDeprecation": "この設定はサポートが終了し、Kibana 9.0では削除されます。", "discover.advancedSettings.discover.modifyColumnsOnSwitchText": "新しいデータビューで使用できない列を削除します。", "discover.advancedSettings.discover.modifyColumnsOnSwitchTitle": "データビューを変更するときに列を修正", "discover.advancedSettings.discover.multiFieldsLinkText": "マルチフィールド", @@ -2750,13 +2533,10 @@ "discover.advancedSettings.discover.showMultifieldsDescription": "拡張ドキュメントビューに{multiFields}が表示されるかどうかを制御します。ほとんどの場合、マルチフィールドは元のフィールドと同じです。「searchFieldsFromSource」がオフのときにのみこのオプションを使用できます。", "discover.advancedSettings.docTableHideTimeColumnText": "Discover と、ダッシュボードのすべての保存された検索で、「時刻」列を非表示にします。", "discover.advancedSettings.docTableHideTimeColumnTitle": "「時刻」列を非表示", - "discover.advancedSettings.documentExplorerLinkText": "ドキュメントエクスプローラー", "discover.advancedSettings.fieldsPopularLimitText": "最も頻繁に使用されるフィールドのトップNを表示します", "discover.advancedSettings.fieldsPopularLimitTitle": "頻繁に使用されるフィールドの制限", "discover.advancedSettings.maxDocFieldsDisplayedText": "ドキュメント概要でレンダリングされるフィールドの最大数", "discover.advancedSettings.maxDocFieldsDisplayedTitle": "表示される最大ドキュメントフィールド数", - "discover.advancedSettings.params.maxCellHeightText": "表のセルが使用する高さの上限です。切り捨てを無効にするには0に設定します。", - "discover.advancedSettings.params.maxCellHeightTitle": "クラシック表の最大セル高さ", "discover.advancedSettings.params.rowHeightText": "行に追加できる線数。値-1は、コンテンツに合わせて、行の高さを自動的に調整します。値0はコンテンツが1行に表示されます。", "discover.advancedSettings.params.rowHeightTitle": "ドキュメントエクスプローラーの行高さ", "discover.advancedSettings.sampleRowsPerPageText": "ドキュメントテーブルのページごとの行数を制限します。", @@ -2772,7 +2552,6 @@ "discover.alerts.createSearchThreshold": "検索しきい値ルールの作成", "discover.alerts.manageRulesAndConnectors": "ルールとコネクターの管理", "discover.alerts.missedTimeFieldToolTip": "データビューには時間フィールドがありません。", - "discover.backToTopLinkText": "最上部へ戻る。", "discover.badge.readOnly.text": "読み取り専用", "discover.badge.readOnly.tooltip": "検索を保存できません", "discover.context.breadcrumb": "周りのドキュメント", @@ -2781,7 +2560,6 @@ "discover.context.failedToLoadAnchorDocumentErrorDescription": "アンカードキュメントの読み込みに失敗しました。", "discover.context.invalidTieBreakerFiledSetting": "無効なタイブレーカーフィールド設定", "discover.context.loadButtonLabel": "読み込み", - "discover.context.loadingDescription": "読み込み中...", "discover.context.newerDocumentsAriaLabel": "新しいドキュメントの数", "discover.context.newerDocumentsDescription": "新しいドキュメント", "discover.context.newerDocumentsWarning": "アンカーよりも新しいドキュメントは{docCount}件しか見つかりませんでした。", @@ -2818,40 +2596,9 @@ "discover.doc.pageTitle": "1つのドキュメント - #{id}", "discover.doc.somethingWentWrongDescription": "{indexName}が見つかりません。", "discover.doc.somethingWentWrongDescriptionAddon": "インデックスが存在することを確認してください。", - "discover.docExplorerCallout.closeButtonAriaLabel": "閉じる", - "discover.docExplorerCallout.documentExplorer": "ドキュメントエクスプローラー", - "discover.docExplorerCallout.headerMessage": "より効率的な探索方法", - "discover.docExplorerCallout.learnMore": "詳細", - "discover.docExplorerCallout.tryDocumentExplorer": "ドキュメントエクスプローラーを試す", - "discover.docTable.documentsNavigation": "ドキュメントナビゲーション", - "discover.docTable.limitedSearchResultLabel": "{resultCount}件の結果のみが表示されます。検索結果を絞り込みます。", - "discover.docTable.noResultsTitle": "結果が見つかりませんでした", - "discover.docTable.rows": "行", - "discover.docTable.tableHeader.documentHeader": "ドキュメント", - "discover.docTable.tableHeader.moveColumnLeftButtonAriaLabel": "{columnName}列を左に移動", - "discover.docTable.tableHeader.moveColumnLeftButtonTooltip": "列を左に移動", - "discover.docTable.tableHeader.moveColumnRightButtonAriaLabel": "{columnName}列を右に移動", - "discover.docTable.tableHeader.moveColumnRightButtonTooltip": "列を右に移動", - "discover.docTable.tableHeader.removeColumnButtonAriaLabel": "{columnName}列を削除", - "discover.docTable.tableHeader.removeColumnButtonTooltip": "列の削除", - "discover.docTable.tableHeader.sortByColumnAscendingAriaLabel": "{columnName}を昇順に並べ替える", - "discover.docTable.tableHeader.sortByColumnDescendingAriaLabel": "{columnName}を降順に並べ替える", - "discover.docTable.tableHeader.sortByColumnUnsortedAriaLabel": "{columnName}で並べ替えを止める", - "discover.docTable.tableHeader.timeFieldIconTooltip": "このフィールドはイベントの発生時刻を表します。", - "discover.docTable.tableHeader.timeFieldIconTooltipAriaLabel": "{timeFieldName} - このフィールドはイベントの発生時刻を表します。", - "discover.docTable.tableRow.detailHeading": "拡張ドキュメント", - "discover.docTable.tableRow.filterForValueButtonAriaLabel": "値でフィルター", - "discover.docTable.tableRow.filterForValueButtonTooltip": "値でフィルター", - "discover.docTable.tableRow.filterOutValueButtonAriaLabel": "値を除外", - "discover.docTable.tableRow.filterOutValueButtonTooltip": "値を除外", - "discover.docTable.tableRow.toggleRowDetailsButtonAriaLabel": "行の詳細を切り替える", - "discover.docTable.tableRow.viewSingleDocumentLinkText": "単一のドキュメントを表示", - "discover.docTable.tableRow.viewSurroundingDocumentsLinkText": "周りのドキュメントを表示", "discover.documentsAriaLabel": "ドキュメント", "discover.docViews.logsOverview.title": "ログ概要", - "discover.docViews.table.scoreSortWarningTooltip": "_scoreの値を取得するには、並べ替える必要があります。", "discover.dropZoneTableLabel": "フィールドを列として表に追加するには、ゾーンをドロップします", - "discover.embeddable.inspectorRequestDataTitle": "データ", "discover.embeddable.inspectorRequestDescription": "このリクエストはElasticsearchにクエリーをかけ、検索データを取得します。", "discover.embeddable.search.dataViewError": "データビュー{indexPatternId}が見つかりません", "discover.embeddable.search.displayName": "検索", @@ -2871,7 +2618,6 @@ "discover.globalSearch.esqlSearchTitle": "ES|QLクエリーを作成", "discover.goToDiscoverButtonText": "Discoverに移動", "discover.grid.tableRow.actionsLabel": "アクション", - "discover.grid.tableRow.esqlDetailHeading": "展開された結果", "discover.grid.tableRow.mobileFlyoutActionsButton": "アクション", "discover.grid.tableRow.moreFlyoutActionsButton": "さらにアクションを表示", "discover.grid.tableRow.viewSingleDocumentLinkLabel": "単一のドキュメントを表示", @@ -2882,7 +2628,6 @@ "discover.hitsCounter.hitsPluralTitle": "{formattedHits} {hits, plural, other {結果}}", "discover.hitsCounter.partialHits": "≥{formattedHits}", "discover.hitsCounter.partialHitsPluralTitle": "≥{formattedHits} {hits, plural, other {結果}}", - "discover.howToSeeOtherMatchingDocumentsDescription": "これらは検索条件に一致した初めの {sampleSize} 件のドキュメントです。他の結果を表示するには検索条件を絞ってください。", "discover.inspectorEsqlRequestDescription": "このリクエストはElasticsearchに対してクエリーを実行し、テーブルの結果を取得します。", "discover.inspectorEsqlRequestTitle": "表", "discover.inspectorRequestDataTitleDocuments": "ドキュメント", @@ -2891,7 +2636,6 @@ "discover.invalidFiltersWarnToast.description": "一部の適用されたフィルターのデータビューID参照は、現在のデータビューとは異なります。", "discover.invalidFiltersWarnToast.title": "別のインデックス参照", "discover.loadingDocuments": "ドキュメントを読み込み中", - "discover.loadingResults": "結果を読み込み中", "discover.localMenu.alertsDescription": "アラート", "discover.localMenu.esqlTooltipLabel": "ES|QLはElasticの強力な新しいパイプクエリ言語です。", "discover.localMenu.fallbackReportTitle": "無題のDiscover検索", @@ -8304,24 +8048,16 @@ "unifiedDocViewer.docView.table.searchPlaceHolder": "検索フィールド名または値", "unifiedDocViewer.docViews.json.jsonTitle": "JSON", "unifiedDocViewer.docViews.table.esqlMultivalueFilteringDisabled": "ES|QLでは、多値フィルタリングはサポートされていません。", - "unifiedDocViewer.docViews.table.filterForFieldPresentButtonAriaLabel": "フィールド表示のフィルター", "unifiedDocViewer.docViews.table.filterForFieldPresentButtonTooltip": "フィールド表示のフィルター", - "unifiedDocViewer.docViews.table.filterForValueButtonAriaLabel": "値でフィルター", "unifiedDocViewer.docViews.table.filterForValueButtonTooltip": "値でフィルター", - "unifiedDocViewer.docViews.table.filterOutValueButtonAriaLabel": "値を除外", "unifiedDocViewer.docViews.table.filterOutValueButtonTooltip": "値を除外", "unifiedDocViewer.docViews.table.ignored.multiValueLabel": "無視された値を含む", "unifiedDocViewer.docViews.table.ignored.singleValueLabel": "無視された値", "unifiedDocViewer.docViews.table.ignoredValuesCanNotBeSearchedWarningMessage": "無視された値は検索できません", "unifiedDocViewer.docViews.table.pinFieldLabel": "フィールドを固定", "unifiedDocViewer.docViews.table.tableTitle": "表", - "unifiedDocViewer.docViews.table.toggleColumnInTableButtonAriaLabel": "表の列を切り替える", - "unifiedDocViewer.docViews.table.toggleColumnInTableButtonTooltip": "表の列を切り替える", "unifiedDocViewer.docViews.table.toggleColumnTableButtonTooltip": "表の列を切り替える", - "unifiedDocViewer.docViews.table.unableToFilterForPresenceOfMetaFieldsTooltip": "メタフィールドの有無でフィルタリングできません", - "unifiedDocViewer.docViews.table.unableToFilterForPresenceOfScriptedFieldsTooltip": "スクリプトフィールドの有無でフィルタリングできません", "unifiedDocViewer.docViews.table.unableToFilterForPresenceOfScriptedFieldsWarningMessage": "スクリプトフィールドの有無でフィルタリングできません", - "unifiedDocViewer.docViews.table.unindexedFieldsCanNotBeSearchedTooltip": "インデックスがないフィールドまたは無視された値は検索できません", "unifiedDocViewer.docViews.table.unindexedFieldsCanNotBeSearchedWarningMessage": "インデックスがないフィールドは検索できません", "unifiedDocViewer.docViews.table.unpinFieldLabel": "フィールドを固定解除", "unifiedDocViewer.docViews.table.viewLessButton": "簡易表示", @@ -8331,7 +8067,6 @@ "unifiedDocViewer.fieldActions.filterForValue": "値でフィルター", "unifiedDocViewer.fieldActions.filterOutValue": "値を除外", "unifiedDocViewer.fieldActions.toggleColumn": "表の列を切り替える", - "unifiedDocViewer.fieldChooser.discoverField.actions": "アクション", "unifiedDocViewer.fieldChooser.discoverField.multiField": "複数フィールド", "unifiedDocViewer.fieldChooser.discoverField.multiFieldTooltipContent": "複数フィールドにはフィールドごとに複数の値を入力できます", "unifiedDocViewer.fieldChooser.discoverField.name": "フィールド", @@ -15289,7 +15024,6 @@ "xpack.datasetQuality.details.fetchDataStreamDetailsFailed": "データストリーム詳細を取得できませんでした。", "xpack.datasetQuality.details.fetchDataStreamSettingsFailed": "データストリーム設定を読み込めませんでした。", "xpack.datasetQuality.details.fetchIntegrationDashboardsFailed": "統合ダッシュボードを取得できませんでした。", - "xpack.datasetQuality.details.fetchIntegrationsFailed": "{integrationName}統合情報を取得できませんでした。", "xpack.datasetQuality.details.indexTemplateActionText": "インデックステンプレート", "xpack.datasetQuality.details.integrationActionsText": "統合アクション", "xpack.datasetQuality.details.integrationnameText": "統合", @@ -17199,7 +16933,6 @@ "xpack.enterpriseSearch.appSearch.metaEngines.title": "メタエンジン", "xpack.enterpriseSearch.appSearch.multiInputRows.addValueButtonLabel": "値を追加", "xpack.enterpriseSearch.appSearch.multiInputRows.inputRowPlaceholder": "値を入力", - "xpack.enterpriseSearch.appSearch.multiInputRows.removeValueButtonLabel": "値を削除", "xpack.enterpriseSearch.appSearch.ownerRoleTypeDescription": "所有者はすべての操作を実行できます。アカウントには複数の所有者がいる場合がありますが、一度に少なくとも1人以上の所有者が必要です。", "xpack.enterpriseSearch.appSearch.productCardDescription": "アプリやWebサイト向けのカスタムソリューション。ユーザー向けの検索エクスペリエンスを設計、実装、効果的に管理するために必要なツールを提供します。", "xpack.enterpriseSearch.appSearch.productDescription": "ダッシュボード、分析、APIを活用し、高度なアプリケーション検索をシンプルにします。", @@ -17385,8 +17118,6 @@ "xpack.enterpriseSearch.content.analytics.api.generateAnalyticsApiKeyModal.done": "完了", "xpack.enterpriseSearch.content.analytics.api.generateAnalyticsApiKeyModal.generateButton": "キーを生成", "xpack.enterpriseSearch.content.analytics.api.generateAnalyticsApiKeyModal.title": "分析APIキーを作成", - "xpack.enterpriseSearch.content.cannotConnect.body": "詳細。", - "xpack.enterpriseSearch.content.cannotConnect.title": "エンタープライズ サーチに接続できません", "xpack.enterpriseSearch.content.conectors.indexHealth": "正常", "xpack.enterpriseSearch.content.connector_detail.configurationConnector.badgeType.connectorClient": "セルフマネージドコネクター", "xpack.enterpriseSearch.content.connector_detail.configurationConnector.badgeType.nativeConnector": "Elasticマネージドコネクター", @@ -17577,8 +17308,6 @@ "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.convertConnector.description": "このコネクターをセルフホスティングしますか?独自のインフラで管理される{link}に変換します。Pythonフレームワークを使用してコードをカスタマイズしたい場合は、このコネクターを変換する必要があります。", "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.convertConnector.linkTitle": "セルフマネージドコネクター", "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.convertConnector.title": "このコネクターを自己管理", - "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.entSearchWarning.text": "Elasticマネージドコネクターは、実行中のエンタープライズ サーチインスタンスが必要です。", - "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.entSearchWarning.title": "実行中のエンタープライズ サーチインスタンスが検出されません", "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnectorAdvancedConfiguration.description": "ワンタイム同期をトリガーするか、繰り返し同期スケジュールを設定して、コネクターを確定します。", "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnectorAdvancedConfiguration.schedulingButtonLabel": "スケジュールを設定して同期", "xpack.enterpriseSearch.content.indices.configurationConnector.researchConfiguration.connectorDocumentationLinkLabel": "ドキュメント", @@ -17930,7 +17659,6 @@ "xpack.enterpriseSearch.content.playground.breadcrumb": "Playground", "xpack.enterpriseSearch.content.searchIndex.cancelSync.successMessage": "同期が正常にキャンセルされました", "xpack.enterpriseSearch.content.searchIndex.cancelSyncs.successMessage": "同期が正常にキャンセルされました", - "xpack.enterpriseSearch.content.searchIndex.cannotConnect.body": "Elastic Webクローラーにはエンタープライズ サーチが必要です。{link}", "xpack.enterpriseSearch.content.searchIndex.configurationTabLabel": "構成", "xpack.enterpriseSearch.content.searchIndex.connectorErrorCallOut.title": "コネクターでエラーが発生しました", "xpack.enterpriseSearch.content.searchIndex.crawlerConfigurationTabLabel": "構成", @@ -18268,7 +17996,6 @@ "xpack.enterpriseSearch.createConnector.configurationStep.configurationLabel": "構成", "xpack.enterpriseSearch.createConnector.configurationStep.h4.finishUpLabel": "終了", "xpack.enterpriseSearch.createConnector.configurationStep.p.description": "データを手動で同期したり、繰り返し同期をスケジュールしたり、ドメインを管理したりできます。", - "xpack.enterpriseSearch.createConnector.connectorDescriptionBadge.notAvailableTitle": "このコネクターは、Elasticマネージドコネクターとして利用できません。", "xpack.enterpriseSearch.createConnector.connectorDocsLinkLabel": "コネクター参照", "xpack.enterpriseSearch.createConnector.DeploymentStep.Configuration.description": "次に、Elasticクローラーを構成し、データを同期します。", "xpack.enterpriseSearch.createConnector.DeploymentStep.Configuration.title": "構成", @@ -18343,17 +18070,6 @@ "xpack.enterpriseSearch.enterpriseSearch.setupGuide.videoAlt": "エンタープライズ サーチの基本操作", "xpack.enterpriseSearch.enterpriseSearchCard.cta": "詳細", "xpack.enterpriseSearch.entSearch.productCardDescription": "よりシンプルで使いやすく、ビジネスに特化した検索エクスペリエンスを提供するスタンドアロンアプリケーション。", - "xpack.enterpriseSearch.errorConnectingCallout.setupGuideCta": "セットアップガイドを確認", - "xpack.enterpriseSearch.errorConnectingCallout.title": "エンタープライズ サーチに接続できません", - "xpack.enterpriseSearch.errorConnectingState.cloudErrorMessage": "クラウドデプロイのエンタープライズ サーチノードが実行中ですか?{deploymentSettingsLink}", - "xpack.enterpriseSearch.errorConnectingState.cloudErrorMessageLinkText": "デプロイ設定を確認", - "xpack.enterpriseSearch.errorConnectingState.description1": "次のエラーのため、ホストURL {enterpriseSearchUrl}では、エンタープライズ サーチへの接続を確立できません。", - "xpack.enterpriseSearch.errorConnectingState.description2": "ホストURLが{configFile}で正しく構成されていることを確認してください。", - "xpack.enterpriseSearch.errorConnectingState.description3": "エンタープライズ サーチサーバーが応答していることを確認してください。", - "xpack.enterpriseSearch.errorConnectingState.setupGuideCta": "セットアップガイドを確認", - "xpack.enterpriseSearch.errorConnectingState.title": "接続できません", - "xpack.enterpriseSearch.errorConnectingState.troubleshootAuth": "ユーザー認証を確認してください。", - "xpack.enterpriseSearch.errorConnectingState.troubleshootAuthMessage": "管理者に連絡して、エンタープライズ サーチのロールマッピングを設定し、エンタープライズ サーチへのアクセスを許可してください", "xpack.enterpriseSearch.exampleConnectorLabel": "例", "xpack.enterpriseSearch.finishUpStep.euiButton.viewInDiscoverLabel": "Discoverに表示", "xpack.enterpriseSearch.getConnectorTypeBadge.connectorClientBadgeLabel": "セルフマネージド", @@ -18500,9 +18216,6 @@ "xpack.enterpriseSearch.navigation.contentPlaygroundLinkLabel": "Playground", "xpack.enterpriseSearch.navigation.contentWebcrawlersLinkLabel": "Webクローラー", "xpack.enterpriseSearch.navigation.relevanceInferenceEndpointsLinkLabel": "推論エンドポイント", - "xpack.enterpriseSearch.noEntSearch.noCrawler": "Elastic Webクローラーはエンタープライズ サーチなしでは利用できません。", - "xpack.enterpriseSearch.noEntSearch.setupGuideCta": "セットアップガイドを確認", - "xpack.enterpriseSearch.noEntSearchConfigured.title": "エンタープライズ サーチが構成されていません", "xpack.enterpriseSearch.notFound.action1": "ダッシュボードに戻す", "xpack.enterpriseSearch.notFound.action2": "サポートに問い合わせる", "xpack.enterpriseSearch.notFound.description": "お探しのページは見つかりませんでした。", @@ -18770,7 +18483,6 @@ "xpack.enterpriseSearch.searchApplications.searchApplication.indices.searchPlaceholder": "インデックスのフィルター", "xpack.enterpriseSearch.searchApplications.searchApplication.indices.someUnknownIndicesCallout.description": "この検索アプリケーションからは一部のデータに接続できない場合があります。影響を受けるインデックスで保留中の処理またはエラーがあるかどうかを確認するか、この検索アプリケーションで使用されないインデックスを削除してください。", "xpack.enterpriseSearch.searchApplications.searchApplication.indices.someUnknownIndicesCallout.title": "一部のインデックスが使用できません。", - "xpack.enterpriseSearch.searchApplications.searchApplication.notFound.action1": "検索アプリケーションに戻る", "xpack.enterpriseSearch.searchApplications.searchApplication.schema.conflictsCallOut.button": "不一致を表示", "xpack.enterpriseSearch.searchApplications.searchApplication.schema.conflictsCallOut.description": "スキーマフィールド型の競合は、ソースインデックスに直接移動し、競合するフィールドのフィールド型を他のソースインデックスのフィールド型と一致するように更新することで解決できます。", "xpack.enterpriseSearch.searchApplications.searchApplication.schema.conflictsCallOut.title": "フィールドマッピングに潜在的な問題が見つかりました", @@ -18983,10 +18695,6 @@ "xpack.enterpriseSearch.vectorSearch.guide.query.title": "ベクトル検索を実行", "xpack.enterpriseSearch.vectorSearch.navTitle": "ベクトル検索", "xpack.enterpriseSearch.vectorSearch.productName": "ベクトル検索", - "xpack.enterpriseSearch.versionMismatch.body": "Kibanaとエンタープライズ サーチのバージョンが一致しません。エンタープライズ サーチにアクセスするには、各サービスで同じメジャーおよびマイナーバージョンを使用してください。", - "xpack.enterpriseSearch.versionMismatch.enterpriseSearchVersionText": "エンタープライズ サーチバージョン:{enterpriseSearchVersion}", - "xpack.enterpriseSearch.versionMismatch.kibanaVersionText": "Kibanaバージョン:{kibanaVersion}", - "xpack.enterpriseSearch.versionMismatch.title": "互換性のないバージョンエラー", "xpack.enterpriseSearch.welcomeBanner.header.greeting.customTitle": "👋 こんにちは、{name}さん!", "xpack.enterpriseSearch.welcomeBanner.header.greeting.defaultTitle": "👋 こんにちは", "xpack.enterpriseSearch.welcomeBanner.header.title": "Elasticsearchにデータを追加し、検索、ベクトル化、可視化", @@ -22614,10 +22322,6 @@ "xpack.idxMgmt.home.componentTemplates.list.loadingMessage": "コンポーネントテンプレートを読み込んでいます…", "xpack.idxMgmt.home.componentTemplatesTabTitle": "コンポーネントテンプレート", "xpack.idxMgmt.home.dataStreamsTabTitle": "データストリーム", - "xpack.idxMgmt.home.enrichPolicies.checkingPrivilegesDescription": "権限を確認中…", - "xpack.idxMgmt.home.enrichPolicies.checkingPrivilegesErrorMessage": "サーバーからユーザー特権を取得中にエラーが発生。", - "xpack.idxMgmt.home.enrichPolicies.deniedPrivilegeDescription": "エンリッチポリシーを使用するには、以下のクラスター権限が必要です:{missingPrivileges}。", - "xpack.idxMgmt.home.enrichPolicies.deniedPrivilegeTitle": "必要なエンリッチ権限を管理", "xpack.idxMgmt.home.enrichPoliciesTabTitle": "エンリッチポリシー", "xpack.idxMgmt.home.idxMgmtDescription": "Elasticsearch インデックスを個々に、または一斉に更新します。{learnMoreLink}", "xpack.idxMgmt.home.idxMgmtDocsLinkText": "インデックス管理ドキュメント", @@ -31682,7 +31386,6 @@ "xpack.ml.trainedModels.modelsList.expandRow": "拡張", "xpack.ml.trainedModels.modelsList.fetchDeletionErrorMessage": "{modelsCount, plural, other {モデル}}を削除できませんでした", "xpack.ml.trainedModels.modelsList.fetchFailedErrorMessage": "学習済みモデルの読み込みエラー", - "xpack.ml.trainedModels.modelsList.fetchModelStatsErrorMessage": "学習済みモデル統計情報の読み込みエラー", "xpack.ml.trainedModels.modelsList.forceStopDialog.cancelText": "キャンセル", "xpack.ml.trainedModels.modelsList.forceStopDialog.confirmText": "終了", "xpack.ml.trainedModels.modelsList.forceStopDialog.hasInferenceServicesWarning": "モデルは_inference APIによって使用されます。", @@ -35406,26 +35109,6 @@ "xpack.reporting.deprecations.reportingRole.forbiddenErrorMessage": "この廃止予定を修正する十分な権限がありません。", "xpack.reporting.deprecations.reportingRole.unknownErrorCorrectiveAction": "詳細については、Kibanaログを確認してください。", "xpack.reporting.deprecations.reportingRole.unknownErrorMessage": "廃止予定チェックを実行できませんでした。詳細については、Kibanaログを確認してください。", - "xpack.reporting.deprecations.reportingRoleMappings.description": "将来のバージョンでは、レポート権限のデフォルトメカニズムの動作が変更されます。また、このクラスターには、この権限の廃止予定のロールにマッピングされたロールマッピングが存在します。「xpack.reporting.roles.enabled」を「false」に設定すると、アップグレード前に将来の動作を導入できます。", - "xpack.reporting.deprecations.reportingRoleMappings.manualStepFive": "すべてのロールマッピングから\"reporting_user\"ロールを削除し、カスタムロールを追加します。影響を受けるロールマッピング:{roleMappings}。", - "xpack.reporting.deprecations.reportingRoleMappings.manualStepFour": "新しいロールのいずれかを割り当てて、レポート権限をユーザーに付与します。", - "xpack.reporting.deprecations.reportingRoleMappings.manualStepOne": "kibana.ymlで「xpack.reporting.roles.enabled」をfalseに設定します。", - "xpack.reporting.deprecations.reportingRoleMappings.manualStepThree": "[管理]>[セキュリティ]>[ロール]から、レポートのKibanaアプリケーション権限を付与する1つ以上のロールを作成します。", - "xpack.reporting.deprecations.reportingRoleMappings.manualStepTwo": "存在する場合は、kibana.ymlで「xpack.reporting.roles.allow」を削除します。", - "xpack.reporting.deprecations.reportingRoleMappings.title": "\"{reportingUserRoleName}\"ロールは廃止予定です。ロールマッピングを確認してください", - "xpack.reporting.deprecations.reportingRoles.description": "将来のバージョンでは、レポート権限のデフォルトメカニズムが変更されます。これはこのクラスターの動作に影響します。「xpack.reporting.roles.enabled」を「false」に設定すると、アップグレード前に将来の動作を導入できます。", - "xpack.reporting.deprecations.reportingRoles.manualStepFour": "新しいロールのいずれかを割り当てて、レポート権限をユーザーに付与します。", - "xpack.reporting.deprecations.reportingRoles.manualStepOne": "kibana.ymlで「xpack.reporting.roles.enabled」をfalseに設定します。", - "xpack.reporting.deprecations.reportingRoles.manualStepThree": "[管理]>[セキュリティ]>[ロール]から、レポートのKibanaアプリケーション権限を付与する1つ以上のロールを作成します。", - "xpack.reporting.deprecations.reportingRoles.manualStepTwo": "存在する場合は、kibana.ymlで「xpack.reporting.roles.allow」を削除します。", - "xpack.reporting.deprecations.reportingRoles.title": "\"{fromPath}.roles\"設定は廃止予定です", - "xpack.reporting.deprecations.reportingRoleUsers.description": "将来のバージョンでは、レポート権限のデフォルトメカニズムの動作が変更されます。また、このクラスターには、この権限の廃止予定のロールが割り当てられたユーザーが存在します。「xpack.reporting.roles.enabled」を「false」に設定すると、アップグレード前に将来の動作を導入できます。", - "xpack.reporting.deprecations.reportingRoleUsers.manualStepFive": "すべてのユーザーから「reporting_user」ロールを削除し、カスタムロールを追加します。影響を受けるユーザー:{usersRoles}。", - "xpack.reporting.deprecations.reportingRoleUsers.manualStepFour": "新しいロールのいずれかを割り当てて、レポート権限をユーザーに付与します。", - "xpack.reporting.deprecations.reportingRoleUsers.manualStepOne": "kibana.ymlで「xpack.reporting.roles.enabled」をfalseに設定します。", - "xpack.reporting.deprecations.reportingRoleUsers.manualStepThree": "[管理]>[セキュリティ]>[ロール]から、レポートのKibanaアプリケーション権限を付与する1つ以上のロールを作成します。", - "xpack.reporting.deprecations.reportingRoleUsers.manualStepTwo": "存在する場合は、kibana.ymlで「xpack.reporting.roles.allow」を削除します。", - "xpack.reporting.deprecations.reportingRoleUsers.title": "\"{reportingUserRoleName}\"ロールは廃止予定です。ユーザーロールを確認してください", "xpack.reporting.diagnostic.browserMissingDependency": "システム依存関係が不足しているため、ブラウザーを正常に起動できませんでした。{url}を参照してください", "xpack.reporting.diagnostic.browserMissingFonts": "ブラウザーはデフォルトフォントを検索できませんでした。この問題を修正するには、{url}を参照してください。", "xpack.reporting.diagnostic.fontconfigError": "システムフォント依存関係が不足しているため、ブラウザーを正常に起動できませんでした。{url}を参照してください", @@ -35562,8 +35245,6 @@ "xpack.reporting.statusIndicator.unknownLabel": "不明", "xpack.reporting.uiSettings.validate.customLogo.badFile": "このファイルは動作しません。別の画像ファイルを試してください。", "xpack.reporting.uiSettings.validate.customLogo.tooLarge": "このファイルは大きすぎます。画像ファイルは200キロバイト未満でなければなりません。", - "xpack.reporting.userAccessError.learnMoreLink": "詳細", - "xpack.reporting.userAccessError.message": "レポート機能にアクセスするには、管理者に問い合わせてください。{grantUserAccessDocs}。", "xpack.rollupJobs.appTitle": "ロールアップジョブ", "xpack.rollupJobs.create.backButton.label": "戻る", "xpack.rollupJobs.create.dateTypeField": "日付", @@ -37155,8 +36836,6 @@ "xpack.securitySolution.assistant.quickPrompts.alertSummarizationTitle": "アラート要約", "xpack.securitySolution.assistant.quickPrompts.AutomationPrompt": "ログやイベントの収集には、どのFleet対応Elasticエージェント統合を使用すべきですか。", "xpack.securitySolution.assistant.quickPrompts.AutomationTitle": "エージェント統合のアドバイス", - "xpack.securitySolution.assistant.quickPrompts.esqlQueryGenerationPrompt": "Elasticセキュリティのエキスパートユーザーとして、以下のユースケースを検出するための正確で有効なESQLクエリを作成してください。回答は、Elasticセキュリティのタイムラインまたは検出ルールですぐに使用できるように書式設定してください。答えに時間をかけて、求められているすべての機能について、あなたの知識をよく確認してください。ES|QLの回答は、特に、あなたの個人的な知識で利用可能なもののみを答えてください。クエリが不正確であることは許容できません。Elastic Common SchemaとElasticエージェントを使用していると仮定します。回答がマークダウンの独立したコードブロックとして簡単にコピーできるように書式設定されていることを確認してください。", - "xpack.securitySolution.assistant.quickPrompts.esqlQueryGenerationTitle": "ES|QLクエリ生成", "xpack.securitySolution.assistant.quickPrompts.ruleCreationPrompt": "Elasticセキュリティのエキスパートユーザーとして、以下のユースケースを検出するための正確で有効なEQLクエリを作成してください。回答は、Elasticセキュリティのタイムラインまたは検出ルールですぐに使用できるように書式設定してください。そのユースケースに対応するルールがすでにElasticセキュリティに組み込まれている場合、または類似のルールが組み込まれている場合は、そのルールへのリンクと説明を入力してください。", "xpack.securitySolution.assistant.quickPrompts.ruleCreationTitle": "クエリ生成", "xpack.securitySolution.assistant.quickPrompts.splQueryConversionPrompt": "以前のSIEMプラットフォームから次のクエリを受け取りました。Elasticセキュリティのエキスパートユーザーとして、同等のElastic EQLを提案してください。すぐにそれをElasticのセキュリティタイムラインにコピーできます。", @@ -37990,8 +37669,6 @@ "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.customThreatQueryFieldRequiredError": "1 つ以上のインジケーター一致が必要です。", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.EqlQueryBarLabel": "EQL クエリ", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.eqlQueryFieldRequiredError": "EQLクエリは必須です。", - "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.eqlSequenceSuppressionDisableText": "EQLシーケンスクエリでは抑制はサポートされていません。", - "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.eqlSequenceSuppressionValidationText": "{EQL_SEQUENCE_SUPPRESSION_DISABLE_TOOLTIP} EQLクエリを非シーケンスクエリに変更するか、抑制フィールドを削除してください。", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldAnomalyThresholdLabel": "異常スコアしきい値", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldMachineLearningJobIdLabel": "機械学習ジョブ", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldQuerBarLabel": "カスタムクエリー", @@ -46223,7 +45900,6 @@ "xpack.synthetics.failedStep.label": "失敗したステップ", "xpack.synthetics.fcp.label": "FCP", "xpack.synthetics.featureRegistry.syntheticsFeatureName": "Syntheticsとアップタイム", - "xpack.synthetics.features.app": "Synthetics", "xpack.synthetics.features.elasticManagedLocations": "Elasticで管理されている場所が有効です", "xpack.synthetics.fieldLabels.cls": "累積レイアウト変更(CLS)", "xpack.synthetics.fieldLabels.dcl": "DOMContentLoadedイベント(DCL)", @@ -48592,8 +48268,7 @@ "xpack.triggersActionsUI.updateApiKeyConfirmModal.description": "古いAPI {idsToUpdate, plural, other {キー}}は回復できません", "xpack.triggersActionsUI.updateApiKeyConfirmModal.failureMessage": "API {idsToUpdate, plural, other {キー}}を更新できませんでした", "xpack.triggersActionsUI.updateApiKeyConfirmModal.title": "APIキーの更新", - "xpack.triggersActionsUI.urlSyncedAlertsSearchBar.invalidQueryTitle": "無効なクエリー文字列", - "xpack.triggersActionsUI.useRuleAADFields.errorMessage": "ルールタイプごとにアラートフィールドを読み込めません", + "xpack.triggersActionsUI.urlSyncedAlertsSearchBar.invalidQueryTitle": "無効なクエリ文字列", "xpack.upgradeAssistant.app.deniedPrivilegeDescription": "アップグレードアシスタントを使用して、廃止予定の問題を解決するには、すべてのKibanaスペースを管理するためのアクセス権が必要です。", "xpack.upgradeAssistant.app.deniedPrivilegeTitle": "Kibana管理者ロールが必要です", "xpack.upgradeAssistant.appTitle": "アップグレードアシスタント", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 389ccb9e5999f..369522e39cd44 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -103,40 +103,6 @@ "aiAssistantManagementSelection.preferredAIAssistantTypeSettingValueObservability": "随处显示", "alertingTypes.builtinActionGroups.recovered": "已恢复", "alertsGrouping.unit": "{totalCount, plural, other {告警}}", - "alertsUIShared.actiActionsonNotifyWhen.forEachOption": "对于每个告警", - "alertsUIShared.actiActionsonNotifyWhen.summaryOption": "告警的摘要", - "alertsUIShared.actionForm.actionGroupRecoveredMessage": "已恢复", - "alertsUIShared.actionVariables.alertActionGroupLabel": "已为规则计划操作的告警的操作组。", - "alertsUIShared.actionVariables.alertActionGroupNameLabel": "已为规则计划操作的告警的操作组的可人工读取名称。", - "alertsUIShared.actionVariables.alertConsecutiveMatchesLabel": "满足规则条件的连续运行次数。", - "alertsUIShared.actionVariables.alertFlappingLabel": "告警上指示告警状态是否重复更改的标志。", - "alertsUIShared.actionVariables.alertIdLabel": "已为规则计划操作的告警的 ID。", - "alertsUIShared.actionVariables.alertUuidLabel": "已为规则计划操作的告警的 UUID。", - "alertsUIShared.actionVariables.allAlertsCountLabel": "所有告警的计数。", - "alertsUIShared.actionVariables.allAlertsDataLabel": "所有告警的对象数组。", - "alertsUIShared.actionVariables.dateLabel": "规则计划操作的日期。", - "alertsUIShared.actionVariables.kibanaBaseUrlLabel": "配置的 server.publicBaseUrl 值,如果未配置,则为空字符串。", - "alertsUIShared.actionVariables.legacyAlertActionGroupLabel": "其已弃用,将由 {variable} 替代。", - "alertsUIShared.actionVariables.legacyAlertActionGroupNameLabel": "其已弃用,将由 {variable} 替代。", - "alertsUIShared.actionVariables.legacyAlertIdLabel": "其已弃用,将由 {variable} 替代。", - "alertsUIShared.actionVariables.legacyAlertInstanceIdLabel": "其已弃用,将由 {variable} 替代。", - "alertsUIShared.actionVariables.legacyAlertNameLabel": "其已弃用,将由 {variable} 替代。", - "alertsUIShared.actionVariables.legacyParamsLabel": "其已弃用,将由 {variable} 替代。", - "alertsUIShared.actionVariables.legacySpaceIdLabel": "其已弃用,将由 {variable} 替代。", - "alertsUIShared.actionVariables.legacyTagsLabel": "其已弃用,将由 {variable} 替代。", - "alertsUIShared.actionVariables.newAlertsCountLabel": "新告警的计数。", - "alertsUIShared.actionVariables.newAlertsDataLabel": "新告警的对象数组。", - "alertsUIShared.actionVariables.ongoingAlertsCountLabel": "进行中的告警的计数。", - "alertsUIShared.actionVariables.ongoingAlertsDataLabel": "进行中的告警的对象数组。", - "alertsUIShared.actionVariables.recoveredAlertsCountLabel": "已恢复告警的计数。", - "alertsUIShared.actionVariables.recoveredAlertsDataLabel": "已恢复告警的对象数组。", - "alertsUIShared.actionVariables.ruleIdLabel": "规则的 ID。", - "alertsUIShared.actionVariables.ruleNameLabel": "规则的名称。", - "alertsUIShared.actionVariables.ruleParamsLabel": "规则的参数。", - "alertsUIShared.actionVariables.ruleSpaceIdLabel": "规则的工作区 ID。", - "alertsUIShared.actionVariables.ruleTagsLabel": "规则的标签。", - "alertsUIShared.actionVariables.ruleTypeLabel": "规则的类型。", - "alertsUIShared.actionVariables.ruleUrlLabel": "生成告警的规则的 URL。如果未配置 server.publicBaseUrl,这将为空字符串。", "alertsUIShared.alertFieldsTable.field": "字段", "alertsUIShared.alertFieldsTable.filter.placeholder": "按字段、值或描述筛选......", "alertsUIShared.alertFieldsTable.value": "值", @@ -160,13 +126,6 @@ "alertsUIShared.components.alertLifecycleStatusBadge.flappingLabel": "摆动", "alertsUIShared.components.alertLifecycleStatusBadge.recoveredLabel": "已恢复", "alertsUIShared.components.alertLifecycleStatusBadge.untrackedLabel": "已取消跟踪", - "alertsUIShared.components.ruleTypeModal.allRuleTypes": "全部", - "alertsUIShared.components.ruleTypeModal.loadingRuleTypes": "正在加载规则类型", - "alertsUIShared.components.ruleTypeModal.noRuleTypesErrorBody": "请尝试不同搜索或更改筛选设置", - "alertsUIShared.components.ruleTypeModal.noRuleTypesErrorTitle": "找不到规则类型", - "alertsUIShared.components.ruleTypeModal.searchPlaceholder": "搜索", - "alertsUIShared.components.ruleTypeModal.title": "选择规则类型", - "alertsUIShared.disabledActionsWarningTitle": "此规则具有已禁用的操作", "alertsUIShared.filterGroup.contextMenu.reset": "重置控件", "alertsUIShared.filterGroup.contextMenu.resetTooltip": "将控件重置到出厂设置", "alertsUIShared.filterGroup.filtersChangedBanner": "筛选控件已更改", @@ -181,24 +140,9 @@ "alertsUIShared.filtersGroup.discardChanges": "放弃更改", "alertsUIShared.filtersGroup.pendingChanges": "保存未决更改", "alertsUIShared.filtersGroup.urlParam.arrayError": "页面筛选 URL 参数必须为数组", - "alertsUIShared.healthCheck.actionText": "了解详情。", - "alertsUIShared.healthCheck.alertsErrorText": "要创建规则,必须启用告警和操作插件。", - "alertsUIShared.healthCheck.alertsErrorTitle": "必须启用'告警和操作'", - "alertsUIShared.healthCheck.apiKeysAndEncryptionErrorText": "必须启用 API 密钥并配置加密密钥才能使用 Alerting。", - "alertsUIShared.healthCheck.apiKeysDisabledErrorText": "必须启用 API 密钥才能使用 Alerting。", - "alertsUIShared.healthCheck.apiKeysDisabledErrorTitle": "需要其他设置", - "alertsUIShared.healthCheck.encryptionErrorText": "必须配置加密密钥才能使用 Alerting。", - "alertsUIShared.healthCheck.encryptionErrorTitle": "需要其他设置", - "alertsUIShared.healthCheck.healthCheck.apiKeysAndEncryptionErrorTitle": "需要其他设置", "alertsUIShared.hooks.useAlertDataView.fetchErrorMessage": "无法加载告警数据视图", - "alertsUIShared.hooks.useFindAlertsQuery.unableToFetchAlertsGroupingAggregations": "无法提取告警分组聚合", "alertsUIShared.hooks.useFindAlertsQuery.unableToFindAlertsQueryMessage": "无法找到告警", "alertsUIShared.hooks.useLoadRuleTypesQuery.unableToLoadRuleTypesMessage": "无法加载规则类型", - "alertsUIShared.hooks.useRuleAADFields.errorMessage": "无法按规则类型加载告警字段", - "alertsUIShared.licenseCheck.actionTypeDisabledByConfigMessageTitle": "此功能已由 Kibana 配置禁用。", - "alertsUIShared.licenseCheck.actionTypeDisabledByLicenseLinkTitle": "查看许可证选项", - "alertsUIShared.licenseCheck.actionTypeDisabledByLicenseMessageDescription": "要重新启用此操作,请升级您的许可证。", - "alertsUIShared.licenseCheck.actionTypeDisabledByLicenseMessageTitle": "此功能需要{minimumLicenseRequired}许可证。", "alertsUIShared.maintenanceWindowCallout.fetchError": "无法检查维护窗口是否处于活动状态", "alertsUIShared.maintenanceWindowCallout.fetchErrorDescription": "维护窗口正在运行时会停止规则通知。", "alertsUIShared.maintenanceWindowCallout.maintenanceWindowActive": "{activeWindowCount, plural, other {维护窗口正}}针对 {categories} 规则运行", @@ -207,127 +151,6 @@ "alertsUIShared.maintenanceWindowCallout.maintenanceWindowMultipleCategoryNames": "{commaSeparatedList} 和 {last}", "alertsUIShared.maintenanceWindowCallout.maintenanceWindowTwoCategoryNames": "{first} 和 {second}", "alertsUIShared.maintenanceWindowCallout.managementCategoryLabel": "堆叠", - "alertsUIShared.producerDisplayNames.apm": "APM 和用户体验", - "alertsUIShared.producerDisplayNames.infrastructure": "基础设施", - "alertsUIShared.producerDisplayNames.logs": "日志", - "alertsUIShared.producerDisplayNames.metrics": "指标", - "alertsUIShared.producerDisplayNames.ml": "Machine Learning", - "alertsUIShared.producerDisplayNames.monitoring": "堆栈监测", - "alertsUIShared.producerDisplayNames.observability": "Observability", - "alertsUIShared.producerDisplayNames.siem": "安全", - "alertsUIShared.producerDisplayNames.slo": "SLO", - "alertsUIShared.producerDisplayNames.stackAlerts": "堆栈告警", - "alertsUIShared.producerDisplayNames.uptime": "Synthetics 和 Uptime", - "alertsUIShared.ruleActionsAlertsFilter.ActionAlertsFilterQueryPlaceholder": "使用 KQL 语法筛选告警", - "alertsUIShared.ruleActionsAlertsFilter.ActionAlertsFilterQueryToggleLabel": "如果告警与查询匹配", - "alertsUIShared.ruleActionsItem.actionErrorToolTip": "操作包含错误。", - "alertsUIShared.ruleActionsItem.actionUnableToLoadConnectorTitle": "创建连接器然后重试。如果无法创建连接器,请联系您的系统管理员。", - "alertsUIShared.ruleActionsItem.actionUseAadTemplateFieldsLabel": "使用告警索引中的模板字段", - "alertsUIShared.ruleActionsItem.actionWarningsTitle": "1 个警告", - "alertsUIShared.ruleActionsItem.existingAlertActionTypeEditTitle": "{actionConnectorName}", - "alertsUIShared.ruleActionsItem.runWhenGroupTitle": "当 {groupName} 时运行", - "alertsUIShared.ruleActionsItem.summaryGroupTitle": "告警的摘要", - "alertsUIShared.ruleActionsNotifyWhen.actionFrequencyLabel": "操作频率", - "alertsUIShared.ruleActionsNotifyWhen.frequencyNotifyWhen.label": "运行间隔", - "alertsUIShared.ruleActionsNotifyWhen.notifyWhenThrottleWarning": "定制操作时间间隔不能短于规则的检查时间间隔", - "alertsUIShared.ruleActionsNotifyWhen.onActionGroupChange.description": "操作在告警状态更改时运行。", - "alertsUIShared.ruleActionsNotifyWhen.onActionGroupChange.display": "在状态更改时", - "alertsUIShared.ruleActionsNotifyWhen.onActionGroupChange.label": "在状态更改时", - "alertsUIShared.ruleActionsNotifyWhen.onActiveAlert.description": "操作在符合规则条件时运行。", - "alertsUIShared.ruleActionsNotifyWhen.onActiveAlert.display": "按检查时间间隔", - "alertsUIShared.ruleActionsNotifyWhen.onActiveAlert.label": "按检查时间间隔", - "alertsUIShared.ruleActionsNotifyWhen.onThrottleInterval.description": "操作在符合规则条件时运行。", - "alertsUIShared.ruleActionsNotifyWhen.onThrottleInterval.display": "按定制操作时间间隔", - "alertsUIShared.ruleActionsNotifyWhen.onThrottleInterval.label": "按定制操作时间间隔", - "alertsUIShared.ruleActionsNotifyWhen.summaryOrRulePerSelectRoleDescription": "操作频率类型选择", - "alertsUIShared.ruleActionsSetting.actionGroupNotSupported": "{actionGroupName}(当前不支持)", - "alertsUIShared.ruleActionsSetting.actionGroupRunWhen": "运行条件", - "alertsUIShared.ruleActionsSystemActionsItem.deleteActionAriaLabel": "删除操作", - "alertsUIShared.ruleForm.actionsForm.publicBaseUrl": "未设置 server.publicBaseUrl。生成的 URL 将为相对 URL 或为空。", - "alertsUIShared.ruleForm.actionsForm.requiredFilterQuery": "需要定制查询。", - "alertsUIShared.ruleForm.actionTypeModalEmptyText": "请尝试不同搜索或更改筛选设置。", - "alertsUIShared.ruleForm.actionTypeModalEmptyTitle": "找不到连接器", - "alertsUIShared.ruleForm.actionTypeModalFilterAll": "全部", - "alertsUIShared.ruleForm.actionTypeModalTitle": "选择连接器", - "alertsUIShared.ruleForm.circuitBreakerHideFullErrorText": "隐藏完整错误", - "alertsUIShared.ruleForm.circuitBreakerSeeFullErrorText": "查看完整错误", - "alertsUIShared.ruleForm.confirmRuleSaveCancelButtonText": "取消", - "alertsUIShared.ruleForm.confirmRuleSaveConfirmButtonText": "保存规则", - "alertsUIShared.ruleForm.confirmRuleSaveMessageText": "您可以随时添加操作。", - "alertsUIShared.ruleForm.confirmRuleSaveTitle": "保存规则,而不执行任何操作?", - "alertsUIShared.ruleForm.createErrorText": "无法创建规则。", - "alertsUIShared.ruleForm.editErrorText": "无法更新规则。", - "alertsUIShared.ruleForm.error.belowMinimumAlertDelayText": "告警延迟必须等于或大于 1。", - "alertsUIShared.ruleForm.error.belowMinimumText": "时间间隔必须至少为 {minimum}。", - "alertsUIShared.ruleForm.error.requiredConsumerText": "'范围'必填。", - "alertsUIShared.ruleForm.error.requiredIntervalText": "'检查时间间隔'必填。", - "alertsUIShared.ruleForm.error.requiredNameText": "'名称'必填。", - "alertsUIShared.ruleForm.error.requiredRuleTypeIdText": "'规则类型'必填。", - "alertsUIShared.ruleForm.intervalWarningText": "出于性能考虑,不建议时间间隔小于 {minimum}。", - "alertsUIShared.ruleForm.modalSearchClearFiltersText": "清除筛选", - "alertsUIShared.ruleForm.modalSearchPlaceholder": "搜索", - "alertsUIShared.ruleForm.returnTitle": "返回", - "alertsUIShared.ruleForm.routeParamsErrorText": "加载规则表单时出现错误。请确保路由正确。", - "alertsUIShared.ruleForm.routeParamsErrorTitle": "无法加载规则表单", - "alertsUIShared.ruleForm.ruleActions.addActionText": "添加操作", - "alertsUIShared.ruleForm.ruleActionsAlertsFilterTimeframeTimezoneLabel": "时区", - "alertsUIShared.ruleForm.ruleActionsAlertsFilterTimeframeToggleLabel": "如果在时间范围内生成了告警", - "alertsUIShared.ruleForm.ruleActionsAlertsFilterTimeframeWeekdays": "星期几", - "alertsUIShared.ruleForm.ruleActionsNoPermissionDescription": "您必须对操作和连接器具有读取访问权限才能编辑规则。", - "alertsUIShared.ruleForm.ruleActionsNoPermissionTitle": "缺少操作和连接器权限", - "alertsUIShared.ruleForm.ruleActionsTitle": "操作", - "alertsUIShared.ruleForm.ruleAlertDelay.alertDelayHelpText": "仅当指定数目的连续运行满足规则条件时,才会发生告警。", - "alertsUIShared.ruleForm.ruleAlertDelay.alertDelayTitlePrefix": "此后告警", - "alertsUIShared.ruleForm.ruleAlertDelay.alertDelayTitleSuffix": "连续匹配", - "alertsUIShared.ruleForm.ruleDefinition.advancedOptionsTitle": "高级选项", - "alertsUIShared.ruleForm.ruleDefinition.alertDelayDescription": "设置连续运行次数,此规则的该次数必须满足告警条件,才会发生告警", - "alertsUIShared.ruleForm.ruleDefinition.alertDelayTitle": "告警延迟", - "alertsUIShared.ruleForm.ruleDefinition.alertFlappingDetectionDescription": "检测在'活动'和'已恢复'状态之间快速切换的告警,并为这些摆动告警减少不必要噪音", - "alertsUIShared.ruleForm.ruleDefinition.alertFlappingDetectionTitle": "告警摆动检测", - "alertsUIShared.ruleForm.ruleDefinition.docLinkTitle": "查看文档", - "alertsUIShared.ruleForm.ruleDefinition.loadingRuleTypeParamsTitle": "正在加载规则类型参数", - "alertsUIShared.ruleForm.ruleDefinition.scheduleDescriptionText": "设置检查告警条件的频率", - "alertsUIShared.ruleForm.ruleDefinition.scheduleTitle": "规则计划", - "alertsUIShared.ruleForm.ruleDefinition.scheduleTooltipText": "检查已排队;它们的运行接近于容量允许的定义值。", - "alertsUIShared.ruleForm.ruleDefinition.scopeDescriptionText": "选择应用程序以关联对应角色权限", - "alertsUIShared.ruleForm.ruleDefinition.scopeTitle": "规则范围", - "alertsUIShared.ruleForm.ruleDefinitionTitle": "规则定义", - "alertsUIShared.ruleForm.ruleDetails.description": "为您的规则定义名称和标签。", - "alertsUIShared.ruleForm.ruleDetails.ruleNameInputButtonAriaLabel": "保存规则名称", - "alertsUIShared.ruleForm.ruleDetails.ruleNameInputTitle": "规则名称", - "alertsUIShared.ruleForm.ruleDetails.ruleTagsInputTitle": "标签", - "alertsUIShared.ruleForm.ruleDetails.ruleTagsPlaceholder": "添加标签", - "alertsUIShared.ruleForm.ruleDetails.title": "规则名称和标签", - "alertsUIShared.ruleForm.ruleDetailsTitle": "规则详情", - "alertsUIShared.ruleForm.ruleFormCancelModalCancel": "取消", - "alertsUIShared.ruleForm.ruleFormCancelModalConfirm": "放弃更改", - "alertsUIShared.ruleForm.ruleFormCancelModalDescription": "您无法恢复未保存更改。", - "alertsUIShared.ruleForm.ruleFormCancelModalTitle": "丢弃规则的未保存更改?", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.apm": "APM 和用户体验", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.consumerSelectComboBoxTitle": "选择范围", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.consumerSelectTitle": "角色可见性", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.infrastructure": "指标", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.logs": "日志", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.slo": "SLO", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.stackAlerts": "Stack 规则", - "alertsUIShared.ruleForm.ruleFormConsumerSelection.uptime": "Synthetics 和 Uptime", - "alertsUIShared.ruleForm.ruleNotFoundErrorText": "加载规则时出错。请确保规则存在,并且您有权访问选定规则。", - "alertsUIShared.ruleForm.ruleNotFoundErrorTitle": "无法加载规则", - "alertsUIShared.ruleForm.rulePage.ruleNameAriaLabelText": "编辑规则名称", - "alertsUIShared.ruleForm.rulePageFooter.cancelText": "取消", - "alertsUIShared.ruleForm.rulePageFooter.createText": "创建规则", - "alertsUIShared.ruleForm.rulePageFooter.saveText": "保存规则", - "alertsUIShared.ruleForm.rulePageFooter.showRequestText": "显示请求", - "alertsUIShared.ruleForm.ruleSchedule.scheduleTitlePrefix": "每", - "alertsUIShared.ruleForm.ruleTypeNotFoundErrorText": "加载规则类型时出现错误。请确保您有权访问选定规则类型。", - "alertsUIShared.ruleForm.ruleTypeNotFoundErrorTitle": "无法加载规则类型", - "alertsUIShared.ruleForm.showRequestModal.headerTitle": "{requestType} 告警规则请求", - "alertsUIShared.ruleForm.showRequestModal.headerTitleCreate": "创建", - "alertsUIShared.ruleForm.showRequestModal.headerTitleEdit": "编辑", - "alertsUIShared.ruleForm.showRequestModal.somethingWentWrongDescription": "抱歉,出现问题。", - "alertsUIShared.ruleForm.showRequestModal.subheadingTitle": "此 Kibana 请求将 {requestType} 该规则。", - "alertsUIShared.ruleForm.showRequestModal.subheadingTitleCreate": "创建", - "alertsUIShared.ruleForm.showRequestModal.subheadingTitleEdit": "编辑", "alertsUIShared.ruleSettingsFlappingForm.flappingExternalLinkLabel": "这是什么?", "alertsUIShared.ruleSettingsFlappingForm.flappingLabel": "摆动检测", "alertsUIShared.ruleSettingsFlappingForm.flappingOffContentRules": "规则", @@ -356,12 +179,6 @@ "alertsUIShared.ruleSettingsFlappingTitleTooltip.flappingTitlePopoverFlappingDetection": "摆动检测", "alertsUIShared.ruleSettingsFlappingTitleTooltip.flappingTitlePopoverLookBack": "规则运行回顾窗口", "alertsUIShared.ruleSettingsFlappingTitleTooltip.tooltipTitle": "告警摆动检测", - "alertsUIShared.technicalPreviewBadgeDescription": "此功能处于技术预览状态,在未来版本中可能会更改或完全移除。Elastic 将努力修复任何问题,但处于技术预览状态的功能不受正式 GA 功能支持 SLA 的约束。", - "alertsUIShared.technicalPreviewBadgeLabel": "技术预览", - "alertsUIShared.timeUnits.dayLabel": "{timeValue, plural, other {天}}", - "alertsUIShared.timeUnits.hourLabel": "{timeValue, plural, other {小时}}", - "alertsUIShared.timeUnits.minuteLabel": "{timeValue, plural, other {分钟}}", - "alertsUIShared.timeUnits.secondLabel": "{timeValue, plural, other {秒}}", "autocomplete.conflictIndicesWarning.description": "此字段在以下索引中定义为不同类型或未映射。这可能导致意外的查询结果。", "autocomplete.conflictIndicesWarning.index.description": "{name}({count} 个索引)", "autocomplete.conflictIndicesWarning.title": "映射冲突", @@ -2694,11 +2511,7 @@ "discover.advancedSettings.context.tieBreakerFieldsTitle": "平分决胜字段", "discover.advancedSettings.defaultColumnsText": "Discover 应用中默认显示的列。如果为空,将显示文档摘要。", "discover.advancedSettings.defaultColumnsTitle": "默认列", - "discover.advancedSettings.disableDocumentExplorer": "Document Explorer 或经典视图", - "discover.advancedSettings.disableDocumentExplorerDescription": "要使用新的 {documentExplorerDocs},而非经典视图,请关闭此选项。Document Explorer 提供了更合理的数据排序、可调整大小的列和全屏视图。", - "discover.advancedSettings.discover.disableDocumentExplorerDeprecation": "此设置已过时,将在 Kibana 9.0 中移除。", "discover.advancedSettings.discover.fieldStatisticsLinkText": "字段统计信息视图", - "discover.advancedSettings.discover.maxCellHeightDeprecation": "此设置已过时,将在 Kibana 9.0 中移除。", "discover.advancedSettings.discover.modifyColumnsOnSwitchText": "移除新数据视图中不存在的列。", "discover.advancedSettings.discover.modifyColumnsOnSwitchTitle": "在更改数据视图时修改列", "discover.advancedSettings.discover.multiFieldsLinkText": "多字段", @@ -2711,13 +2524,10 @@ "discover.advancedSettings.discover.showMultifieldsDescription": "控制 {multiFields} 是否显示在展开的文档视图中。多数情况下,多字段与原始字段相同。此选项仅在 `searchFieldsFromSource` 关闭时可用。", "discover.advancedSettings.docTableHideTimeColumnText": "在 Discover 中和仪表板上的所有已保存搜索中隐藏'时间'列。", "discover.advancedSettings.docTableHideTimeColumnTitle": "隐藏'时间'列", - "discover.advancedSettings.documentExplorerLinkText": "Document Explorer", "discover.advancedSettings.fieldsPopularLimitText": "要显示的排名前 N 最常见字段", "discover.advancedSettings.fieldsPopularLimitTitle": "常见字段限制", "discover.advancedSettings.maxDocFieldsDisplayedText": "在文档摘要中渲染的最大字段数目", "discover.advancedSettings.maxDocFieldsDisplayedTitle": "显示的最大文档字段数", - "discover.advancedSettings.params.maxCellHeightText": "表单元格应占用的最大高度。设置为 0 可禁用截断。", - "discover.advancedSettings.params.maxCellHeightTitle": "经典表中的最大单元格高度", "discover.advancedSettings.params.rowHeightText": "一行中允许的文本行数。值为 -1 时,会自动调整行高以适应内容。值为 0 时,会在单文本行中显示内容。", "discover.advancedSettings.params.rowHeightTitle": "Document Explorer 中的行高", "discover.advancedSettings.sampleRowsPerPageText": "限制文档表中每页的行数。", @@ -2733,7 +2543,6 @@ "discover.alerts.createSearchThreshold": "创建搜索阈值规则", "discover.alerts.manageRulesAndConnectors": "管理规则和连接器", "discover.alerts.missedTimeFieldToolTip": "数据视图没有时间字段。", - "discover.backToTopLinkText": "返回顶部。", "discover.badge.readOnly.text": "只读", "discover.badge.readOnly.tooltip": "无法保存搜索", "discover.context.breadcrumb": "周围文档", @@ -2742,7 +2551,6 @@ "discover.context.failedToLoadAnchorDocumentErrorDescription": "无法加载定位点文档。", "discover.context.invalidTieBreakerFiledSetting": "无效的平分决胜字段设置", "discover.context.loadButtonLabel": "加载", - "discover.context.loadingDescription": "正在加载……", "discover.context.newerDocumentsAriaLabel": "较新文档数目", "discover.context.newerDocumentsDescription": "较新文档", "discover.context.newerDocumentsWarning": "仅可以找到 {docCount} 个比定位标记新的文档。", @@ -2779,36 +2587,9 @@ "discover.doc.pageTitle": "单个文档 - #{id}", "discover.doc.somethingWentWrongDescription": "{indexName} 缺失。", "discover.doc.somethingWentWrongDescriptionAddon": "请确保索引存在。", - "discover.docExplorerCallout.bodyMessage": "使用 {documentExplorer} 快速排序、选择和比较数据,调整列大小并以全屏方式查看文档。", - "discover.docExplorerCallout.closeButtonAriaLabel": "关闭", - "discover.docExplorerCallout.documentExplorer": "Document Explorer", - "discover.docExplorerCallout.headerMessage": "更好的浏览方式", - "discover.docExplorerCallout.learnMore": "了解详情", - "discover.docExplorerCallout.tryDocumentExplorer": "试用 Document Explorer", - "discover.docTable.documentsNavigation": "文档导航", - "discover.docTable.limitedSearchResultLabel": "仅限于 {resultCount} 个结果。优化您的搜索。", - "discover.docTable.noResultsTitle": "找不到结果", - "discover.docTable.rows": "行", - "discover.docTable.rowsPerPage": "每页行数:{pageSize}", - "discover.docTable.tableHeader.documentHeader": "文档", - "discover.docTable.tableHeader.moveColumnLeftButtonTooltip": "向左移动列", - "discover.docTable.tableHeader.moveColumnRightButtonTooltip": "向右移动列", - "discover.docTable.tableHeader.removeColumnButtonTooltip": "移除列", - "discover.docTable.tableHeader.timeFieldIconTooltip": "此字段表示事件发生的时间。", - "discover.docTable.tableHeader.timeFieldIconTooltipAriaLabel": "{timeFieldName} - 此字段表示事件发生的时间。", - "discover.docTable.tableRow.detailHeading": "已展开文档", - "discover.docTable.tableRow.filterForValueButtonAriaLabel": "筛留值", - "discover.docTable.tableRow.filterForValueButtonTooltip": "筛留值", - "discover.docTable.tableRow.filterOutValueButtonAriaLabel": "筛除值", - "discover.docTable.tableRow.filterOutValueButtonTooltip": "筛除值", - "discover.docTable.tableRow.toggleRowDetailsButtonAriaLabel": "切换行详细信息", - "discover.docTable.tableRow.viewSingleDocumentLinkText": "查看单个文档", - "discover.docTable.tableRow.viewSurroundingDocumentsLinkText": "查看周围文档", "discover.documentsAriaLabel": "文档", "discover.docViews.logsOverview.title": "日志概览", - "discover.docViews.table.scoreSortWarningTooltip": "要检索 _score 的值,必须按其筛选。", "discover.dropZoneTableLabel": "放置区域以将字段作为列添加到表中", - "discover.embeddable.inspectorRequestDataTitle": "数据", "discover.embeddable.inspectorRequestDescription": "此请求将查询 Elasticsearch 以获取搜索的数据。", "discover.embeddable.search.dataViewError": "缺少数据视图 {indexPatternId}", "discover.embeddable.search.displayName": "搜索", @@ -2828,7 +2609,6 @@ "discover.globalSearch.esqlSearchTitle": "创建 ES|QL 查询", "discover.goToDiscoverButtonText": "前往 Discover", "discover.grid.tableRow.actionsLabel": "操作", - "discover.grid.tableRow.esqlDetailHeading": "已展开结果", "discover.grid.tableRow.mobileFlyoutActionsButton": "操作", "discover.grid.tableRow.moreFlyoutActionsButton": "更多操作", "discover.grid.tableRow.viewSingleDocumentLinkLabel": "查看单个文档", @@ -2839,7 +2619,6 @@ "discover.hitsCounter.hitsPluralTitle": "{formattedHits} 个{hits, plural, other {结果}}", "discover.hitsCounter.partialHits": "≥{formattedHits}", "discover.hitsCounter.partialHitsPluralTitle": "≥{formattedHits} 个{hits, plural, other {结果}}", - "discover.howToSeeOtherMatchingDocumentsDescription": "下面是与您的搜索匹配的前 {sampleSize} 个文档,请优化您的搜索以查看其他文档。", "discover.inspectorEsqlRequestDescription": "此请求将查询 Elasticsearch 以获取该表的结果。", "discover.inspectorEsqlRequestTitle": "表", "discover.inspectorRequestDataTitleDocuments": "文档", @@ -2848,7 +2627,6 @@ "discover.invalidFiltersWarnToast.description": "某些应用的筛选中的数据视图 ID 引用与当前数据视图不同。", "discover.invalidFiltersWarnToast.title": "不同的索引引用", "discover.loadingDocuments": "正在加载文档", - "discover.loadingResults": "正在加载结果", "discover.localMenu.alertsDescription": "告警", "discover.localMenu.esqlTooltipLabel": "ES|QL 是 Elastic 支持的功能强大的全新管道查询语言。", "discover.localMenu.fallbackReportTitle": "未命名 Discover 搜索", @@ -8147,24 +7925,16 @@ "unifiedDocViewer.docView.table.searchPlaceHolder": "搜索字段名称或值", "unifiedDocViewer.docViews.json.jsonTitle": "JSON", "unifiedDocViewer.docViews.table.esqlMultivalueFilteringDisabled": "ES|QL 中不支持多值筛选", - "unifiedDocViewer.docViews.table.filterForFieldPresentButtonAriaLabel": "筛留存在的字段", "unifiedDocViewer.docViews.table.filterForFieldPresentButtonTooltip": "字段是否存在筛选", - "unifiedDocViewer.docViews.table.filterForValueButtonAriaLabel": "筛留值", "unifiedDocViewer.docViews.table.filterForValueButtonTooltip": "筛留值", - "unifiedDocViewer.docViews.table.filterOutValueButtonAriaLabel": "筛除值", "unifiedDocViewer.docViews.table.filterOutValueButtonTooltip": "筛除值", "unifiedDocViewer.docViews.table.ignored.multiValueLabel": "包含被忽略的值", "unifiedDocViewer.docViews.table.ignored.singleValueLabel": "被忽略的值", "unifiedDocViewer.docViews.table.ignoredValuesCanNotBeSearchedWarningMessage": "无法搜索被忽略的值", "unifiedDocViewer.docViews.table.pinFieldLabel": "固定字段", "unifiedDocViewer.docViews.table.tableTitle": "表", - "unifiedDocViewer.docViews.table.toggleColumnInTableButtonAriaLabel": "在表中切换列", - "unifiedDocViewer.docViews.table.toggleColumnInTableButtonTooltip": "在表中切换列", "unifiedDocViewer.docViews.table.toggleColumnTableButtonTooltip": "在表中切换列", - "unifiedDocViewer.docViews.table.unableToFilterForPresenceOfMetaFieldsTooltip": "无法筛选元数据字段是否存在", - "unifiedDocViewer.docViews.table.unableToFilterForPresenceOfScriptedFieldsTooltip": "无法筛选脚本字段是否存在", "unifiedDocViewer.docViews.table.unableToFilterForPresenceOfScriptedFieldsWarningMessage": "无法筛选脚本字段是否存在", - "unifiedDocViewer.docViews.table.unindexedFieldsCanNotBeSearchedTooltip": "无法搜索未编入索引的字段或被忽略的值", "unifiedDocViewer.docViews.table.unindexedFieldsCanNotBeSearchedWarningMessage": "无法搜索未编入索引的字段", "unifiedDocViewer.docViews.table.unpinFieldLabel": "取消固定字段", "unifiedDocViewer.docViews.table.viewLessButton": "查看更少", @@ -8174,7 +7944,6 @@ "unifiedDocViewer.fieldActions.filterForValue": "筛留值", "unifiedDocViewer.fieldActions.filterOutValue": "筛除值", "unifiedDocViewer.fieldActions.toggleColumn": "在表中切换列", - "unifiedDocViewer.fieldChooser.discoverField.actions": "操作", "unifiedDocViewer.fieldChooser.discoverField.multiField": "多字段", "unifiedDocViewer.fieldChooser.discoverField.multiFieldTooltipContent": "多字段的每个字段可以有多个值", "unifiedDocViewer.fieldChooser.discoverField.name": "字段", @@ -14983,7 +14752,6 @@ "xpack.datasetQuality.details.fetchDataStreamDetailsFailed": "无法获取数据流详情。", "xpack.datasetQuality.details.fetchDataStreamSettingsFailed": "无法加载数据流设置。", "xpack.datasetQuality.details.fetchIntegrationDashboardsFailed": "无法获取集成仪表板。", - "xpack.datasetQuality.details.fetchIntegrationsFailed": "无法获取 {integrationName} 集成信息。", "xpack.datasetQuality.details.indexTemplateActionText": "索引模板", "xpack.datasetQuality.details.integrationActionsText": "集成操作", "xpack.datasetQuality.details.integrationnameText": "集成", @@ -16870,7 +16638,6 @@ "xpack.enterpriseSearch.appSearch.metaEngines.title": "元引擎", "xpack.enterpriseSearch.appSearch.multiInputRows.addValueButtonLabel": "添加值", "xpack.enterpriseSearch.appSearch.multiInputRows.inputRowPlaceholder": "输入值", - "xpack.enterpriseSearch.appSearch.multiInputRows.removeValueButtonLabel": "删除值", "xpack.enterpriseSearch.appSearch.ownerRoleTypeDescription": "所有者可以执行任何操作。该帐户可以有很多所有者,但任何时候必须至少有一个所有者。", "xpack.enterpriseSearch.appSearch.productCardDescription": "为应用和网站专门定制的解决方案,提供设计、实施和高效管理那些面向用户的搜索体验所需的工具。", "xpack.enterpriseSearch.appSearch.productDescription": "利用仪表板、分析和 API 执行高级应用程序搜索简单易行。", @@ -17053,8 +16820,6 @@ "xpack.enterpriseSearch.content.analytics.api.generateAnalyticsApiKeyModal.done": "完成", "xpack.enterpriseSearch.content.analytics.api.generateAnalyticsApiKeyModal.generateButton": "生成密钥", "xpack.enterpriseSearch.content.analytics.api.generateAnalyticsApiKeyModal.title": "创建分析 API 密钥", - "xpack.enterpriseSearch.content.cannotConnect.body": "更多信息。", - "xpack.enterpriseSearch.content.cannotConnect.title": "无法连接到 Enterprise Search", "xpack.enterpriseSearch.content.conectors.indexHealth": "运行正常", "xpack.enterpriseSearch.content.connector_detail.configurationConnector.badgeType.connectorClient": "自管型连接器", "xpack.enterpriseSearch.content.connector_detail.configurationConnector.badgeType.nativeConnector": "Elastic 托管连接器", @@ -17245,8 +17010,6 @@ "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.convertConnector.description": "是否要自我托管此连接器?将其转换为将在您自己的基础设施上进行托管的 {link}。如果希望使用我们的 Python 框架定制代码,您需要转换此连接器。", "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.convertConnector.linkTitle": "自管型连接器", "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.convertConnector.title": "自我管理此连接器", - "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.entSearchWarning.text": "Elastic 托管连接器需要正在运行的 Enterprise Search 实例。", - "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnector.entSearchWarning.title": "未检测到正在运行的 Enterprise Search 实例", "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnectorAdvancedConfiguration.description": "通过触发一次时间同步或设置重复同步计划来最终确定您的连接器。", "xpack.enterpriseSearch.content.indices.configurationConnector.nativeConnectorAdvancedConfiguration.schedulingButtonLabel": "设置计划并同步", "xpack.enterpriseSearch.content.indices.configurationConnector.researchConfiguration.connectorDocumentationLinkLabel": "文档", @@ -17596,7 +17359,6 @@ "xpack.enterpriseSearch.content.playground.breadcrumb": "Playground", "xpack.enterpriseSearch.content.searchIndex.cancelSync.successMessage": "已成功取消同步", "xpack.enterpriseSearch.content.searchIndex.cancelSyncs.successMessage": "已成功取消同步", - "xpack.enterpriseSearch.content.searchIndex.cannotConnect.body": "Elastic 网络爬虫需要 Enterprise Search。{link}", "xpack.enterpriseSearch.content.searchIndex.configurationTabLabel": "配置", "xpack.enterpriseSearch.content.searchIndex.connectorErrorCallOut.title": "您的连接器报告了错误", "xpack.enterpriseSearch.content.searchIndex.crawlerConfigurationTabLabel": "配置", @@ -17931,7 +17693,6 @@ "xpack.enterpriseSearch.createConnector.configurationStep.configurationLabel": "配置", "xpack.enterpriseSearch.createConnector.configurationStep.h4.finishUpLabel": "结束", "xpack.enterpriseSearch.createConnector.configurationStep.p.description": "您可以手动同步数据,计划重复同步或管理您的域。", - "xpack.enterpriseSearch.createConnector.connectorDescriptionBadge.notAvailableTitle": "此连接器不可用作 Elastic 托管连接器", "xpack.enterpriseSearch.createConnector.connectorDocsLinkLabel": "连接器参考", "xpack.enterpriseSearch.createConnector.DeploymentStep.Configuration.description": "立即配置您的 Elastic 网络爬虫并同步数据。", "xpack.enterpriseSearch.createConnector.DeploymentStep.Configuration.title": "配置", @@ -18006,17 +17767,6 @@ "xpack.enterpriseSearch.enterpriseSearch.setupGuide.videoAlt": "企业搜索入门", "xpack.enterpriseSearch.enterpriseSearchCard.cta": "了解详情", "xpack.enterpriseSearch.entSearch.productCardDescription": "为构建更简单、用户友好且以业务为中心的搜索体验而量身定制的独立应用程序。", - "xpack.enterpriseSearch.errorConnectingCallout.setupGuideCta": "阅读设置指南", - "xpack.enterpriseSearch.errorConnectingCallout.title": "无法连接到 Enterprise Search", - "xpack.enterpriseSearch.errorConnectingState.cloudErrorMessage": "您的云部署是否正在运行 Enterprise Search 节点?{deploymentSettingsLink}", - "xpack.enterpriseSearch.errorConnectingState.cloudErrorMessageLinkText": "检查您的部署设置", - "xpack.enterpriseSearch.errorConnectingState.description1": "由于以下错误,我们无法与主机 URL {enterpriseSearchUrl} 的 Enterprise Search 建立连接:", - "xpack.enterpriseSearch.errorConnectingState.description2": "确保在 {configFile} 中已正确配置主机 URL。", - "xpack.enterpriseSearch.errorConnectingState.description3": "确认企业搜索服务器响应。", - "xpack.enterpriseSearch.errorConnectingState.setupGuideCta": "阅读设置指南", - "xpack.enterpriseSearch.errorConnectingState.title": "无法连接", - "xpack.enterpriseSearch.errorConnectingState.troubleshootAuth": "检查您的用户身份验证:", - "xpack.enterpriseSearch.errorConnectingState.troubleshootAuthMessage": "请联系管理员设置 Enterprise Search 角色映射,为您提供 Enterprise Search 的访问权限", "xpack.enterpriseSearch.exampleConnectorLabel": "示例", "xpack.enterpriseSearch.finishUpStep.euiButton.viewInDiscoverLabel": "在 Discover 中查看", "xpack.enterpriseSearch.getConnectorTypeBadge.connectorClientBadgeLabel": "自管型", @@ -18164,9 +17914,6 @@ "xpack.enterpriseSearch.navigation.contentPlaygroundLinkLabel": "Playground", "xpack.enterpriseSearch.navigation.contentWebcrawlersLinkLabel": "网络爬虫", "xpack.enterpriseSearch.navigation.relevanceInferenceEndpointsLinkLabel": "推理终端", - "xpack.enterpriseSearch.noEntSearch.noCrawler": "如果没有 Enterprise Search,Elastic 网络爬虫将不可用。", - "xpack.enterpriseSearch.noEntSearch.setupGuideCta": "阅读设置指南", - "xpack.enterpriseSearch.noEntSearchConfigured.title": "尚未配置 Enterprise Search", "xpack.enterpriseSearch.notFound.action1": "返回到您的仪表板", "xpack.enterpriseSearch.notFound.action2": "联系支持人员", "xpack.enterpriseSearch.notFound.description": "找不到您要查找的页面。", @@ -18435,7 +18182,6 @@ "xpack.enterpriseSearch.searchApplications.searchApplication.indices.searchPlaceholder": "筛选索引", "xpack.enterpriseSearch.searchApplications.searchApplication.indices.someUnknownIndicesCallout.description": "可能无法从此搜索应用程序访问某些数据。在受影响的索引上检查任何待处理操作或错误,或移除应不再被此搜索应用程序使用的索引。", "xpack.enterpriseSearch.searchApplications.searchApplication.indices.someUnknownIndicesCallout.title": "您的某些索引不可用。", - "xpack.enterpriseSearch.searchApplications.searchApplication.notFound.action1": "返回到搜索应用程序", "xpack.enterpriseSearch.searchApplications.searchApplication.schema.conflictsCallOut.button": "查看冲突", "xpack.enterpriseSearch.searchApplications.searchApplication.schema.conflictsCallOut.description": "可以通过直接导航到源索引并更新冲突字段的字段类型,使其与其他源索引的字段类型相匹配,从而解决架构字段类型冲突。", "xpack.enterpriseSearch.searchApplications.searchApplication.schema.conflictsCallOut.title": "发现潜在的字段映射问题", @@ -18648,10 +18394,6 @@ "xpack.enterpriseSearch.vectorSearch.guide.query.title": "执行向量搜索", "xpack.enterpriseSearch.vectorSearch.navTitle": "矢量搜索", "xpack.enterpriseSearch.vectorSearch.productName": "矢量搜索", - "xpack.enterpriseSearch.versionMismatch.body": "您的 Kibana 和 Enterprise Search 版本不匹配。要访问 Enterprise Search,请对每项服务使用相同的主要和次要版本。", - "xpack.enterpriseSearch.versionMismatch.enterpriseSearchVersionText": "Enterprise Search 版本:{enterpriseSearchVersion}", - "xpack.enterpriseSearch.versionMismatch.kibanaVersionText": "Kibana 版本:{kibanaVersion}", - "xpack.enterpriseSearch.versionMismatch.title": "版本不兼容错误", "xpack.enterpriseSearch.welcomeBanner.header.greeting.customTitle": "👋 {name} 您好!", "xpack.enterpriseSearch.welcomeBanner.header.greeting.defaultTitle": "👋 您好", "xpack.enterpriseSearch.welcomeBanner.header.title": "将数据添加到 Elasticsearch,然后进行搜索、向量化或可视化", @@ -22222,10 +21964,6 @@ "xpack.idxMgmt.home.componentTemplates.list.loadingMessage": "正在加载组件模板……", "xpack.idxMgmt.home.componentTemplatesTabTitle": "组件模板", "xpack.idxMgmt.home.dataStreamsTabTitle": "数据流", - "xpack.idxMgmt.home.enrichPolicies.checkingPrivilegesDescription": "正在检查权限……", - "xpack.idxMgmt.home.enrichPolicies.checkingPrivilegesErrorMessage": "从服务器获取用户权限时出错。", - "xpack.idxMgmt.home.enrichPolicies.deniedPrivilegeDescription": "要使用扩充策略,必须具有以下集群权限:{missingPrivileges}。", - "xpack.idxMgmt.home.enrichPolicies.deniedPrivilegeTitle": "管理所需的扩充权限", "xpack.idxMgmt.home.enrichPoliciesTabTitle": "扩充策略", "xpack.idxMgmt.home.idxMgmtDescription": "分别或批量更新您的 Elasticsearch 索引。{learnMoreLink}", "xpack.idxMgmt.home.idxMgmtDocsLinkText": "索引管理文档", @@ -31168,7 +30906,6 @@ "xpack.ml.trainedModels.modelsList.expandRow": "展开", "xpack.ml.trainedModels.modelsList.fetchDeletionErrorMessage": "{modelsCount, plural, other {# 个模型}}删除失败", "xpack.ml.trainedModels.modelsList.fetchFailedErrorMessage": "加载已训练模型时出错", - "xpack.ml.trainedModels.modelsList.fetchModelStatsErrorMessage": "加载已训练模型统计信息时出错", "xpack.ml.trainedModels.modelsList.forceStopDialog.cancelText": "取消", "xpack.ml.trainedModels.modelsList.forceStopDialog.confirmText": "停止点", "xpack.ml.trainedModels.modelsList.forceStopDialog.hasInferenceServicesWarning": "此模型由 _inference API 使用", @@ -34865,23 +34602,6 @@ "xpack.reporting.deprecations.reportingRole.forbiddenErrorMessage": "您没有足够的权限来修复此弃用。", "xpack.reporting.deprecations.reportingRole.unknownErrorCorrectiveAction": "请检查 Kibana 日志了解更多详情。", "xpack.reporting.deprecations.reportingRole.unknownErrorMessage": "无法执行弃用检查。请检查 Kibana 日志了解更多详情。", - "xpack.reporting.deprecations.reportingRoleMappings.description": "在未来版本中,报告权限的默认工作机制会有所不同,并且此集群具有映射到该权限的过时角色的角色映射。在升级之前,请将'xpack.reporting.roles.enabled'设置为'false'以采用未来的行为。", - "xpack.reporting.deprecations.reportingRoleMappings.manualStepFive": "从所有角色映射中移除'reporting_user'角色,然后添加定制角色。受影响的角色映射为:{roleMappings}。", - "xpack.reporting.deprecations.reportingRoleMappings.manualStepFour": "通过分配新角色之一向用户授予报告权限。", - "xpack.reporting.deprecations.reportingRoleMappings.manualStepOne": "在 kibana.yml 中将'xpack.reporting.roles.enabled'设置为'false'。", - "xpack.reporting.deprecations.reportingRoleMappings.manualStepThree": "前往'管理'>'安全性'>'角色'以创建一个或多个针对 Reporting 授予 Kibana 应用程序权限的角色。", - "xpack.reporting.deprecations.reportingRoleMappings.manualStepTwo": "移除 kibana.yml 中的'xpack.reporting.roles.allow'(如果存在)。", - "xpack.reporting.deprecations.reportingRoles.description": "在未来版本中,报告权限的默认工作机制会有所不同,这将影响此集群的行为。在升级之前,请将'xpack.reporting.roles.enabled'设置为'false'以采用未来的行为。", - "xpack.reporting.deprecations.reportingRoles.manualStepFour": "通过分配新角色之一向用户授予报告权限。", - "xpack.reporting.deprecations.reportingRoles.manualStepOne": "在 kibana.yml 中将'xpack.reporting.roles.enabled'设置为'false'。", - "xpack.reporting.deprecations.reportingRoles.manualStepThree": "前往'管理'>'安全性'>'角色'以创建一个或多个针对 Reporting 授予 Kibana 应用程序权限的角色。", - "xpack.reporting.deprecations.reportingRoles.manualStepTwo": "移除 kibana.yml 中的'xpack.reporting.roles.allow'(如果存在)。", - "xpack.reporting.deprecations.reportingRoleUsers.description": "在未来版本中,报告权限的默认工作机制会有所不同,并且此集群的用户具有用于该权限的过时角色。在升级之前,请将'xpack.reporting.roles.enabled'设置为'false'以采用未来的行为。", - "xpack.reporting.deprecations.reportingRoleUsers.manualStepFive": "从所有用户中移除'reporting_user'角色,然后添加定制角色。受影响的用户为:{usersRoles}。", - "xpack.reporting.deprecations.reportingRoleUsers.manualStepFour": "通过分配新角色之一向用户授予报告权限。", - "xpack.reporting.deprecations.reportingRoleUsers.manualStepOne": "在 kibana.yml 中将'xpack.reporting.roles.enabled'设置为'false'。", - "xpack.reporting.deprecations.reportingRoleUsers.manualStepThree": "前往'管理'>'安全性'>'角色'以创建一个或多个针对 Reporting 授予 Kibana 应用程序权限的角色。", - "xpack.reporting.deprecations.reportingRoleUsers.manualStepTwo": "移除 kibana.yml 中的'xpack.reporting.roles.allow'(如果存在)。", "xpack.reporting.diagnostic.browserMissingDependency": "由于缺少系统依赖项,浏览器无法正常启动。请参见 {url}", "xpack.reporting.diagnostic.browserMissingFonts": "浏览器找不到默认字体。请参见 {url} 以解决此问题。", "xpack.reporting.diagnostic.fontconfigError": "由于缺少系统字体依赖项,浏览器无法正常启动。请参见 {url}", @@ -35013,8 +34733,6 @@ "xpack.reporting.statusIndicator.unknownLabel": "未知", "xpack.reporting.uiSettings.validate.customLogo.badFile": "抱歉,该文件无效。请尝试其他图像文件。", "xpack.reporting.uiSettings.validate.customLogo.tooLarge": "抱歉,该文件过大。图像文件必须小于 200 千字节。", - "xpack.reporting.userAccessError.learnMoreLink": "了解详情", - "xpack.reporting.userAccessError.message": "请联系管理员以访问报告功能。{grantUserAccessDocs}。", "xpack.rollupJobs.appTitle": "汇总/打包作业", "xpack.rollupJobs.create.backButton.label": "返回", "xpack.rollupJobs.create.dateTypeField": "日期", @@ -36550,8 +36268,6 @@ "xpack.securitySolution.assistant.quickPrompts.alertSummarizationTitle": "告警汇总", "xpack.securitySolution.assistant.quickPrompts.AutomationPrompt": "我应使用哪个启用 Fleet 的 Elastic 代理集成从以下项中收集日志和事件:", "xpack.securitySolution.assistant.quickPrompts.AutomationTitle": "代理集成建议", - "xpack.securitySolution.assistant.quickPrompts.esqlQueryGenerationPrompt": "作为 Elastic Security 的专家用户,请生成准确、有效的 ESQL 查询来检测以下用例。应对您的响应进行格式化,以便可以立即在 Elastic Security 时间线或检测规则中使用。请花点时间提供答案,检验您是否清楚了解我所询问的所有功能。具体来说,对于 ES|QL 答案,您应仅根据自己的个人观点进行解答。我无法承担查询不准确的后果。假设我正使用 Elastic Common Schema 和 Elastic 代理。确保以可轻松复制为 Markdown 中的独立代码块的方式设置答案的格式。", - "xpack.securitySolution.assistant.quickPrompts.esqlQueryGenerationTitle": "ES|QL 查询生成", "xpack.securitySolution.assistant.quickPrompts.ruleCreationPrompt": "作为 Elastic Security 的专家用户,请生成准确、有效的 EQL 查询来检测以下用例。应对您的响应进行格式化,以便可以立即在 Elastic Security 时间线或检测规则中使用。如果 Elastic Security 已经为此用例预构建了规则,或具有类似规则,请提供该规则的链接并做出描述。", "xpack.securitySolution.assistant.quickPrompts.ruleCreationTitle": "查询生成", "xpack.securitySolution.assistant.quickPrompts.splQueryConversionPrompt": "我具有以下来自之前 SIEM 平台的查询。作为 Elastic Security 的专家用户,请提议一个 Elastic EQL 等价查询。我应能够立即将其复制到 Elastic Security 时间线。", @@ -37383,8 +37099,6 @@ "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.customThreatQueryFieldRequiredError": "至少需要一个指标匹配。", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.EqlQueryBarLabel": "EQL 查询", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.eqlQueryFieldRequiredError": "EQL 查询必填。", - "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.eqlSequenceSuppressionDisableText": "EQL 序列查询不支持阻止。", - "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.eqlSequenceSuppressionValidationText": "{EQL_SEQUENCE_SUPPRESSION_DISABLE_TOOLTIP} 将 EQL 查询更改为非序列查询,或移除阻止字段。", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldAnomalyThresholdLabel": "异常分数阈值", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldMachineLearningJobIdLabel": "Machine Learning 作业", "xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldQuerBarLabel": "定制查询", @@ -45508,7 +45222,6 @@ "xpack.synthetics.failedStep.label": "失败的步骤", "xpack.synthetics.fcp.label": "FCP", "xpack.synthetics.featureRegistry.syntheticsFeatureName": "Synthetics 和 Uptime", - "xpack.synthetics.features.app": "Synthetics", "xpack.synthetics.features.elasticManagedLocations": "已启用 Elastic 托管位置", "xpack.synthetics.fieldLabels.cls": "累计布局偏移 (CLS)", "xpack.synthetics.fieldLabels.dcl": "DOMContentLoaded 事件 (DCL)", @@ -47846,7 +47559,6 @@ "xpack.triggersActionsUI.updateApiKeyConfirmModal.failureMessage": "无法更新 API {idsToUpdate, plural, other {密钥}}", "xpack.triggersActionsUI.updateApiKeyConfirmModal.title": "更新 API 密钥", "xpack.triggersActionsUI.urlSyncedAlertsSearchBar.invalidQueryTitle": "字符串查询无效", - "xpack.triggersActionsUI.useRuleAADFields.errorMessage": "无法按规则类型加载告警字段", "xpack.upgradeAssistant.app.deniedPrivilegeDescription": "要使用升级助手并解决弃用问题,必须具有管理所有 Kibana 工作区的访问权限。", "xpack.upgradeAssistant.app.deniedPrivilegeTitle": "需要 Kibana 管理员角色", "xpack.upgradeAssistant.appTitle": "升级助手", diff --git a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_alert_summary.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_alert_summary.test.ts index 92c1e3bc5ca69..b21439038cd72 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_alert_summary.test.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_alert_summary.test.ts @@ -6,7 +6,6 @@ */ import { waitFor, renderHook } from '@testing-library/react'; -import { ValidFeatureId } from '@kbn/rule-data-utils'; import { useKibana } from '../../common/lib/kibana'; import { mockedAlertSummaryResponse, @@ -18,7 +17,7 @@ jest.mock('../../common/lib/kibana'); const useKibanaMock = useKibana as jest.Mocked; describe('useLoadAlertSummary', () => { - const featureIds: ValidFeatureId[] = ['apm']; + const ruleTypeIds: string[] = ['apm']; const mockedPostAPI = jest.fn(); beforeAll(() => { @@ -36,7 +35,7 @@ describe('useLoadAlertSummary', () => { const { result } = renderHook(() => useLoadAlertSummary({ - featureIds, + ruleTypeIds, timeRange: mockedAlertSummaryTimeRange, }) ); @@ -72,7 +71,7 @@ describe('useLoadAlertSummary', () => { renderHook(() => useLoadAlertSummary({ - featureIds, + ruleTypeIds, timeRange: mockedAlertSummaryTimeRange, filter, }) @@ -82,7 +81,7 @@ describe('useLoadAlertSummary', () => { fixed_interval: fixedInterval, gte: utcFrom, lte: utcTo, - featureIds, + ruleTypeIds, filter: [filter], }); @@ -102,7 +101,7 @@ describe('useLoadAlertSummary', () => { const { result } = renderHook(() => useLoadAlertSummary({ - featureIds, + ruleTypeIds, timeRange: mockedAlertSummaryTimeRange, }) ); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_alert_summary.ts b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_alert_summary.ts index 10ce201885098..c8053ca571477 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_alert_summary.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_alert_summary.ts @@ -6,7 +6,6 @@ */ import { useEffect, useState, useCallback, useRef } from 'react'; -import type { ValidFeatureId } from '@kbn/rule-data-utils'; import { estypes } from '@elastic/elasticsearch'; import { AsApiContract } from '@kbn/actions-plugin/common'; import { HttpSetup } from '@kbn/core/public'; @@ -15,7 +14,8 @@ import { useKibana } from '../../common/lib/kibana'; import { Alert, AlertSummaryTimeRange } from '../sections/alert_summary_widget/types'; interface UseLoadAlertSummaryProps { - featureIds?: ValidFeatureId[]; + ruleTypeIds?: string[]; + consumers?: string[]; timeRange: AlertSummaryTimeRange; filter?: estypes.QueryDslQueryContainer; } @@ -32,7 +32,12 @@ interface LoadAlertSummaryResponse { error?: string; } -export function useLoadAlertSummary({ featureIds, timeRange, filter }: UseLoadAlertSummaryProps) { +export function useLoadAlertSummary({ + ruleTypeIds, + consumers, + timeRange, + filter, +}: UseLoadAlertSummaryProps) { const { http } = useKibana().services; const [alertSummary, setAlertSummary] = useState({ isLoading: true, @@ -45,14 +50,15 @@ export function useLoadAlertSummary({ featureIds, timeRange, filter }: UseLoadAl const isCancelledRef = useRef(false); const abortCtrlRef = useRef(new AbortController()); const loadAlertSummary = useCallback(async () => { - if (!featureIds) return; + if (!ruleTypeIds) return; isCancelledRef.current = false; abortCtrlRef.current.abort(); abortCtrlRef.current = new AbortController(); try { const { activeAlertCount, activeAlerts, recoveredAlertCount } = await fetchAlertSummary({ - featureIds, + ruleTypeIds, + consumers, filter, http, signal: abortCtrlRef.current.signal, @@ -80,7 +86,7 @@ export function useLoadAlertSummary({ featureIds, timeRange, filter }: UseLoadAl } } } - }, [featureIds, filter, http, timeRange]); + }, [ruleTypeIds, consumers, filter, http, timeRange]); useEffect(() => { loadAlertSummary(); @@ -90,26 +96,29 @@ export function useLoadAlertSummary({ featureIds, timeRange, filter }: UseLoadAl } async function fetchAlertSummary({ - featureIds, + ruleTypeIds, + consumers, filter, http, signal, timeRange: { utcFrom, utcTo, fixedInterval }, }: { http: HttpSetup; - featureIds: ValidFeatureId[]; + ruleTypeIds: string[]; + consumers?: string[]; signal: AbortSignal; timeRange: AlertSummaryTimeRange; filter?: estypes.QueryDslQueryContainer; }): Promise { - const res = featureIds.length + const res = ruleTypeIds.length ? await http.post>(`${BASE_RAC_ALERTS_API_PATH}/_alert_summary`, { signal, body: JSON.stringify({ fixed_interval: fixedInterval, gte: utcFrom, lte: utcTo, - featureIds, + ruleTypeIds, + consumers, filter: [filter], }), }) diff --git a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_config_query.ts b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_config_query.ts index bc3420ecf346c..1d8dc1b66af25 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_config_query.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_config_query.ts @@ -5,7 +5,7 @@ * 2.0. */ import { useQuery } from '@tanstack/react-query'; -import { fetchUiConfig as triggersActionsUiConfig } from '@kbn/alerts-ui-shared/src/common/apis/fetch_ui_config'; +import { fetchUiConfig as triggersActionsUiConfig } from '@kbn/response-ops-rule-form'; import { useKibana } from '../../common/lib/kibana'; export const useLoadConfigQuery = () => { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rule_aggregations.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rule_aggregations.test.tsx index e1cb5f6f4f5ee..b84e1b529b493 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rule_aggregations.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rule_aggregations.test.tsx @@ -6,7 +6,10 @@ */ import React from 'react'; import { waitFor, renderHook } from '@testing-library/react'; -import { useLoadRuleAggregationsQuery as useLoadRuleAggregations } from './use_load_rule_aggregations_query'; +import { + UseLoadRuleAggregationsQueryProps, + useLoadRuleAggregationsQuery as useLoadRuleAggregations, +} from './use_load_rule_aggregations_query'; import { RuleStatus } from '../../types'; import { useKibana } from '../../common/lib/kibana'; import { IToasts } from '@kbn/core-notifications-browser'; @@ -59,10 +62,9 @@ describe('useLoadRuleAggregations', () => { }); it('should call loadRuleAggregations API and handle result', async () => { - const params = { + const params: UseLoadRuleAggregationsQueryProps = { filters: { searchText: '', - types: [], actionTypes: [], ruleExecutionStatuses: [], ruleLastRunOutcomes: [], @@ -72,6 +74,8 @@ describe('useLoadRuleAggregations', () => { }, enabled: true, refresh: undefined, + ruleTypeIds: [], + consumers: [], }; const { rerender, result } = renderHook( @@ -87,12 +91,13 @@ describe('useLoadRuleAggregations', () => { expect(loadRuleAggregationsWithKueryFilter).toBeCalledWith( expect.objectContaining({ searchText: '', - typesFilter: [], actionTypesFilter: [], ruleExecutionStatusesFilter: [], ruleLastRunOutcomesFilter: [], ruleStatusesFilter: [], tagsFilter: [], + ruleTypeIds: [], + consumers: [], }) ); expect(result.current.rulesStatusesTotal).toEqual(MOCK_AGGS.ruleExecutionStatus); @@ -100,10 +105,9 @@ describe('useLoadRuleAggregations', () => { }); it('should call loadRuleAggregation API with params and handle result', async () => { - const params = { + const params: UseLoadRuleAggregationsQueryProps = { filters: { searchText: 'test', - types: ['type1', 'type2'], actionTypes: ['action1', 'action2'], ruleExecutionStatuses: ['status1', 'status2'], ruleParams: {}, @@ -113,6 +117,8 @@ describe('useLoadRuleAggregations', () => { }, enabled: true, refresh: undefined, + ruleTypeIds: ['foo'], + consumers: ['bar'], }; const { rerender, result } = renderHook(() => useLoadRuleAggregations(params), { @@ -125,12 +131,13 @@ describe('useLoadRuleAggregations', () => { expect(loadRuleAggregationsWithKueryFilter).toBeCalledWith( expect.objectContaining({ searchText: 'test', - typesFilter: ['type1', 'type2'], actionTypesFilter: ['action1', 'action2'], ruleExecutionStatusesFilter: ['status1', 'status2'], ruleStatusesFilter: ['enabled', 'snoozed'] as RuleStatus[], tagsFilter: ['tag1', 'tag2'], ruleLastRunOutcomesFilter: ['outcome1', 'outcome2'], + ruleTypeIds: ['foo'], + consumers: ['bar'], }) ); expect(result.current.rulesStatusesTotal).toEqual(MOCK_AGGS.ruleExecutionStatus); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rule_aggregations_query.ts b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rule_aggregations_query.ts index b7f5be0325729..c588959dedf52 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rule_aggregations_query.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rule_aggregations_query.ts @@ -22,15 +22,16 @@ const initializeAggregationResult = (values: readonly string[]) => { ); }; -interface UseLoadRuleAggregationsQueryProps { +export interface UseLoadRuleAggregationsQueryProps { filters: RulesListFilters; enabled: boolean; - filterConsumers?: string[]; + ruleTypeIds?: string[]; + consumers?: string[]; refresh?: Date; } export const useLoadRuleAggregationsQuery = (props: UseLoadRuleAggregationsQueryProps) => { - const { filters, enabled, refresh, filterConsumers } = props; + const { filters, enabled, refresh, ruleTypeIds, consumers } = props; const { http, @@ -41,13 +42,13 @@ export const useLoadRuleAggregationsQuery = (props: UseLoadRuleAggregationsQuery return loadRuleAggregationsWithKueryFilter({ http, searchText: filters.searchText, - typesFilter: filters.types, actionTypesFilter: filters.actionTypes, ruleExecutionStatusesFilter: filters.ruleExecutionStatuses, ruleLastRunOutcomesFilter: filters.ruleLastRunOutcomes, ruleStatusesFilter: filters.ruleStatuses, tagsFilter: filters.tags, - filterConsumers, + ruleTypeIds, + consumers, }); }; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rules_query.ts b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rules_query.ts index 795e316786892..7806e6ce1e6aa 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rules_query.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rules_query.ts @@ -20,7 +20,8 @@ type UseLoadRulesQueryProps = Omit & { sort: LoadRulesProps['sort']; enabled: boolean; refresh?: Date; - filterConsumers?: string[]; + ruleTypeIds?: string[]; + consumers?: string[]; hasReference?: { type: string; id: string; @@ -28,7 +29,8 @@ type UseLoadRulesQueryProps = Omit & { }; export const useLoadRulesQuery = (props: UseLoadRulesQueryProps) => { - const { filterConsumers, filters, page, sort, onPage, enabled, refresh, hasReference } = props; + const { ruleTypeIds, consumers, filters, page, sort, onPage, enabled, refresh, hasReference } = + props; const { http, notifications: { toasts }, @@ -56,7 +58,7 @@ export const useLoadRulesQuery = (props: UseLoadRulesQueryProps) => { { refresh: refresh?.toISOString(), }, - filterConsumers, + ruleTypeIds, hasReference, ], queryFn: () => { @@ -73,7 +75,8 @@ export const useLoadRulesQuery = (props: UseLoadRulesQueryProps) => { tagsFilter: filters.tags, kueryNode: filters.kueryNode, sort, - filterConsumers, + ruleTypeIds, + consumers, hasReference, }); }, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_rule_aad_fields.ts b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_rule_aad_fields.ts deleted file mode 100644 index 91aaf19776d8b..0000000000000 --- a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_rule_aad_fields.ts +++ /dev/null @@ -1,58 +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 { DataViewField } from '@kbn/data-views-plugin/common'; -import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { useQuery } from '@tanstack/react-query'; -import { i18n } from '@kbn/i18n'; -import { useMemo } from 'react'; -import { fetchRuleTypeAadTemplateFields } from '@kbn/alerts-ui-shared/src/common/apis/fetch_rule_type_aad_template_fields'; -import { TriggersAndActionsUiServices } from '../..'; - -const EMPTY_AAD_FIELDS: DataViewField[] = []; - -export function useRuleAADFields(ruleTypeId?: string): { - aadFields: DataViewField[]; - loading: boolean; -} { - const { - http, - notifications: { toasts }, - } = useKibana().services; - - const queryAadFieldsFn = () => { - return fetchRuleTypeAadTemplateFields({ http, ruleTypeId }); - }; - - const onErrorFn = () => { - toasts.addDanger( - i18n.translate('xpack.triggersActionsUI.useRuleAADFields.errorMessage', { - defaultMessage: 'Unable to load alert fields per rule type', - }) - ); - }; - - const { - data: aadFields = EMPTY_AAD_FIELDS, - isInitialLoading, - isLoading, - } = useQuery({ - queryKey: ['loadAlertAadFieldsPerRuleType', ruleTypeId], - queryFn: queryAadFieldsFn, - onError: onErrorFn, - refetchOnWindowFocus: false, - enabled: ruleTypeId !== undefined, - }); - - return useMemo( - () => ({ - aadFields, - loading: ruleTypeId === undefined ? false : isInitialLoading || isLoading, - }), - [aadFields, isInitialLoading, isLoading, ruleTypeId] - ); -} diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/check_rule_type_enabled.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/lib/check_rule_type_enabled.test.tsx index 0668fb56c4ef1..5771b505ae0c4 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/check_rule_type_enabled.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/check_rule_type_enabled.test.tsx @@ -33,6 +33,7 @@ describe('checkRuleTypeEnabled', () => { authorizedConsumers: {}, minimumLicenseRequired: 'basic', enabledInLicense: true, + category: 'my-category', }; expect(checkRuleTypeEnabled(alertType)).toMatchInlineSnapshot(` Object { @@ -57,6 +58,7 @@ describe('checkRuleTypeEnabled', () => { authorizedConsumers: {}, minimumLicenseRequired: 'gold', enabledInLicense: false, + category: 'my-category', }; expect(checkRuleTypeEnabled(alertType)).toMatchInlineSnapshot(` Object { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/execution_duration_utils.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/execution_duration_utils.test.ts index f7ade3778f287..7bce422f5f9f3 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/execution_duration_utils.test.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/execution_duration_utils.test.ts @@ -63,6 +63,7 @@ function mockRuleType(overwrites: Partial = {}): RuleType { producer: 'alerts', minimumLicenseRequired: 'basic', enabledInLicense: true, + category: 'my-category', ...overwrites, }; } diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/index.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/index.ts index aba75da477557..324a5a6df6db8 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/index.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/index.ts @@ -7,6 +7,5 @@ export { templateActionVariable } from './template_action_variable'; export { hasMustacheTokens } from './has_mustache_tokens'; -export type { AlertProvidedActionVariables } from '@kbn/alerts-ui-shared/src/action_variables/action_variables'; export { updateActionConnector, executeAction } from './action_connector_api'; export { isRuleSnoozed } from './is_rule_snoozed'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/aggregate.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/aggregate.test.ts index a5ae973f14d97..b546748d695e4 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/aggregate.test.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/aggregate.test.ts @@ -113,7 +113,7 @@ describe('loadRuleAggregations', () => { `); }); - test('should call aggregate API with typesFilter', async () => { + test('should call aggregate API with ruleTypeIds', async () => { const resolvedValue = { rule_execution_status: { ok: 4, @@ -127,7 +127,7 @@ describe('loadRuleAggregations', () => { const result = await loadRuleAggregations({ http, - typesFilter: ['foo', 'bar'], + ruleTypeIds: ['foo', 'bar'], }); expect(result).toEqual({ ruleExecutionStatus: { @@ -142,13 +142,13 @@ describe('loadRuleAggregations', () => { Array [ "/internal/alerting/rules/_aggregate", Object { - "body": "{\\"filter\\":\\"alert.attributes.alertTypeId:(foo or bar)\\",\\"default_search_operator\\":\\"AND\\"}", + "body": "{\\"default_search_operator\\":\\"AND\\",\\"rule_type_ids\\":[\\"foo\\",\\"bar\\"]}", }, ] `); }); - test('should call aggregate API with actionTypesFilter and typesFilter', async () => { + test('should call aggregate API with actionTypesFilter and ruleTypeIds', async () => { const resolvedValue = { rule_execution_status: { ok: 4, @@ -164,7 +164,7 @@ describe('loadRuleAggregations', () => { http, searchText: 'baz', actionTypesFilter: ['action', 'type'], - typesFilter: ['foo', 'bar'], + ruleTypeIds: ['foo', 'bar'], }); expect(result).toEqual({ ruleExecutionStatus: { @@ -179,7 +179,7 @@ describe('loadRuleAggregations', () => { Array [ "/internal/alerting/rules/_aggregate", Object { - "body": "{\\"search_fields\\":\\"[\\\\\\"name\\\\\\",\\\\\\"tags\\\\\\"]\\",\\"search\\":\\"baz\\",\\"filter\\":\\"alert.attributes.alertTypeId:(foo or bar) and (alert.attributes.actions:{ actionTypeId:action } OR alert.attributes.actions:{ actionTypeId:type })\\",\\"default_search_operator\\":\\"AND\\"}", + "body": "{\\"search_fields\\":\\"[\\\\\\"name\\\\\\",\\\\\\"tags\\\\\\"]\\",\\"search\\":\\"baz\\",\\"filter\\":\\"(alert.attributes.actions:{ actionTypeId:action } OR alert.attributes.actions:{ actionTypeId:type })\\",\\"default_search_operator\\":\\"AND\\",\\"rule_type_ids\\":[\\"foo\\",\\"bar\\"]}", }, ] `); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/aggregate.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/aggregate.ts index 8edb10811bd8e..af855075cca87 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/aggregate.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/aggregate.ts @@ -39,15 +39,14 @@ export async function loadRuleTags({ export async function loadRuleAggregations({ http, searchText, - typesFilter, actionTypesFilter, ruleExecutionStatusesFilter, ruleStatusesFilter, tagsFilter, - filterConsumers, + ruleTypeIds, + consumers, }: LoadRuleAggregationsProps): Promise { const filters = mapFiltersToKql({ - typesFilter, actionTypesFilter, ruleExecutionStatusesFilter, ruleStatusesFilter, @@ -61,7 +60,8 @@ export async function loadRuleAggregations({ search: searchText, filter: filters.length ? filters.join(' and ') : undefined, default_search_operator: 'AND', - filter_consumers: filterConsumers, + rule_type_ids: ruleTypeIds, + consumers, }), } ); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/aggregate_helpers.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/aggregate_helpers.ts index 29462f07d5eec..fb787c249aeb9 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/aggregate_helpers.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/aggregate_helpers.ts @@ -61,13 +61,13 @@ export const rewriteTagsBodyRes: RewriteRequestCase = ({ export interface LoadRuleAggregationsProps { http: HttpSetup; searchText?: string; - typesFilter?: string[]; actionTypesFilter?: string[]; ruleExecutionStatusesFilter?: string[]; ruleLastRunOutcomesFilter?: string[]; ruleStatusesFilter?: RuleStatus[]; tagsFilter?: string[]; - filterConsumers?: string[]; + ruleTypeIds?: string[]; + consumers?: string[]; } export interface LoadRuleTagsProps { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/aggregate_kuery_filter.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/aggregate_kuery_filter.test.ts new file mode 100644 index 0000000000000..a76147033fe65 --- /dev/null +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/aggregate_kuery_filter.test.ts @@ -0,0 +1,115 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { httpServiceMock } from '@kbn/core/public/mocks'; +import { loadRuleAggregationsWithKueryFilter } from './aggregate_kuery_filter'; + +const http = httpServiceMock.createStartContract(); + +describe('loadRuleAggregationsWithKueryFilter', () => { + beforeEach(() => jest.resetAllMocks()); + + test('should call aggregate API with base parameters', async () => { + const resolvedValue = { + rule_execution_status: { + ok: 4, + active: 2, + error: 1, + pending: 1, + unknown: 0, + }, + }; + http.post.mockResolvedValueOnce(resolvedValue); + + const result = await loadRuleAggregationsWithKueryFilter({ http }); + expect(result).toEqual({ + ruleExecutionStatus: { + ok: 4, + active: 2, + error: 1, + pending: 1, + unknown: 0, + }, + }); + expect(http.post.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "/internal/alerting/rules/_aggregate", + Object { + "body": "{\\"default_search_operator\\":\\"AND\\"}", + }, + ] + `); + }); + + test('should call aggregate API with ruleTypeIds', async () => { + const resolvedValue = { + rule_execution_status: { + ok: 4, + active: 2, + error: 1, + pending: 1, + unknown: 0, + }, + }; + + http.post.mockResolvedValueOnce(resolvedValue); + + const result = await loadRuleAggregationsWithKueryFilter({ http, ruleTypeIds: ['foo'] }); + expect(result).toEqual({ + ruleExecutionStatus: { + ok: 4, + active: 2, + error: 1, + pending: 1, + unknown: 0, + }, + }); + + expect(http.post.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "/internal/alerting/rules/_aggregate", + Object { + "body": "{\\"rule_type_ids\\":[\\"foo\\"],\\"default_search_operator\\":\\"AND\\"}", + }, + ] + `); + }); + + test('should call aggregate API with consumers', async () => { + const resolvedValue = { + rule_execution_status: { + ok: 4, + active: 2, + error: 1, + pending: 1, + unknown: 0, + }, + }; + + http.post.mockResolvedValueOnce(resolvedValue); + + const result = await loadRuleAggregationsWithKueryFilter({ http, consumers: ['foo'] }); + expect(result).toEqual({ + ruleExecutionStatus: { + ok: 4, + active: 2, + error: 1, + pending: 1, + unknown: 0, + }, + }); + + expect(http.post.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "/internal/alerting/rules/_aggregate", + Object { + "body": "{\\"default_search_operator\\":\\"AND\\",\\"consumers\\":[\\"foo\\"]}", + }, + ] + `); + }); +}); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/aggregate_kuery_filter.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/aggregate_kuery_filter.ts index a0e270ddf2f67..dce41afcc8110 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/aggregate_kuery_filter.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/aggregate_kuery_filter.ts @@ -16,15 +16,14 @@ import { mapFiltersToKueryNode } from './map_filters_to_kuery_node'; export async function loadRuleAggregationsWithKueryFilter({ http, searchText, - typesFilter, actionTypesFilter, ruleExecutionStatusesFilter, ruleStatusesFilter, tagsFilter, - filterConsumers, + ruleTypeIds, + consumers, }: LoadRuleAggregationsProps): Promise { const filtersKueryNode = mapFiltersToKueryNode({ - typesFilter, actionTypesFilter, tagsFilter, ruleExecutionStatusesFilter, @@ -37,8 +36,9 @@ export async function loadRuleAggregationsWithKueryFilter({ { body: JSON.stringify({ ...(filtersKueryNode ? { filter: JSON.stringify(filtersKueryNode) } : {}), - filter_consumers: filterConsumers, + rule_type_ids: ruleTypeIds, default_search_operator: 'AND', + consumers, }), } ); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/alert_fields.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/alert_fields.ts deleted file mode 100644 index 7be5b3eec0e69..0000000000000 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/alert_fields.ts +++ /dev/null @@ -1,27 +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 { ValidFeatureId } from '@kbn/rule-data-utils'; -import { HttpSetup } from '@kbn/core/public'; -import { FieldSpec } from '@kbn/data-views-plugin/common'; -import { BASE_RAC_ALERTS_API_PATH } from '@kbn/rule-registry-plugin/common'; - -export async function fetchAlertFields({ - http, - featureIds, -}: { - http: HttpSetup; - featureIds: ValidFeatureId[]; -}): Promise { - const { fields: alertFields = [] } = await http.get<{ fields: FieldSpec[] }>( - `${BASE_RAC_ALERTS_API_PATH}/browser_fields`, - { - query: { featureIds }, - } - ); - return alertFields; -} diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/alert_index.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/alert_index.ts deleted file mode 100644 index 8ac678664168b..0000000000000 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/alert_index.ts +++ /dev/null @@ -1,25 +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 { BASE_RAC_ALERTS_API_PATH } from '@kbn/rule-registry-plugin/common'; -import { HttpSetup } from '@kbn/core/public'; - -export async function fetchAlertIndexNames({ - http, - features, -}: { - http: HttpSetup; - features: string; -}): Promise { - const { index_name: indexNamesStr = [] } = await http.get<{ index_name: string[] }>( - `${BASE_RAC_ALERTS_API_PATH}/index`, - { - query: { features }, - } - ); - return indexNamesStr; -} diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rule_types.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rule_types.test.ts index cd9e829c8045e..0c42a21d7d436 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rule_types.test.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rule_types.test.ts @@ -30,6 +30,7 @@ describe('loadRuleTypes', () => { authorizedConsumers: {}, minimumLicenseRequired: 'basic', enabledInLicense: true, + category: 'my-category', }, ]; http.get.mockResolvedValueOnce(resolvedValue); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rules.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rules.test.ts index b5a09e5a716f9..5fa4f83509650 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rules.test.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rules.test.ts @@ -240,6 +240,55 @@ describe('loadRules', () => { `); }); + test('should call find API with searchText and tagsFilter and ruleTypeIds and consumers', async () => { + const resolvedValue = { + page: 1, + per_page: 10, + total: 0, + data: [], + }; + http.get.mockResolvedValueOnce(resolvedValue); + + const result = await loadRules({ + http, + searchText: 'apples, foo, baz', + typesFilter: ['foo', 'bar'], + ruleTypeIds: ['one', 'two'], + consumers: ['my-consumer'], + page: { index: 0, size: 10 }, + }); + expect(result).toEqual({ + page: 1, + perPage: 10, + total: 0, + data: [], + }); + expect(http.get.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "/internal/alerting/rules/_find", + Object { + "query": Object { + "consumers": Array [ + "my-consumer", + ], + "default_search_operator": "AND", + "filter": "alert.attributes.alertTypeId:(foo or bar)", + "page": 1, + "per_page": 10, + "rule_type_ids": Array [ + "one", + "two", + ], + "search": "apples, foo, baz", + "search_fields": "[\\"name\\",\\"tags\\"]", + "sort_field": "name", + "sort_order": "asc", + }, + }, + ] + `); + }); + test('should call find API with ruleStatusesFilter', async () => { const resolvedValue = { page: 1, @@ -374,4 +423,90 @@ describe('loadRules', () => { ] `); }); + + test('should call find API with ruleTypeIds', async () => { + const resolvedValue = { + page: 1, + per_page: 10, + total: 0, + data: [], + }; + http.get.mockResolvedValueOnce(resolvedValue); + + const result = await loadRules({ + http, + ruleTypeIds: ['foo', 'bar'], + page: { index: 0, size: 10 }, + }); + expect(result).toEqual({ + page: 1, + perPage: 10, + total: 0, + data: [], + }); + expect(http.get.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "/internal/alerting/rules/_find", + Object { + "query": Object { + "default_search_operator": "AND", + "filter": undefined, + "page": 1, + "per_page": 10, + "rule_type_ids": Array [ + "foo", + "bar", + ], + "search": undefined, + "search_fields": undefined, + "sort_field": "name", + "sort_order": "asc", + }, + }, + ] + `); + }); + + test('should call find API with consumers', async () => { + const resolvedValue = { + page: 1, + per_page: 10, + total: 0, + data: [], + }; + http.get.mockResolvedValueOnce(resolvedValue); + + const result = await loadRules({ + http, + consumers: ['foo', 'bar'], + page: { index: 0, size: 10 }, + }); + expect(result).toEqual({ + page: 1, + perPage: 10, + total: 0, + data: [], + }); + expect(http.get.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "/internal/alerting/rules/_find", + Object { + "query": Object { + "consumers": Array [ + "foo", + "bar", + ], + "default_search_operator": "AND", + "filter": undefined, + "page": 1, + "per_page": 10, + "search": undefined, + "search_fields": undefined, + "sort_field": "name", + "sort_order": "asc", + }, + }, + ] + `); + }); }); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rules.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rules.ts index 07a992c66c96c..8c17f18065c84 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rules.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rules.ts @@ -21,6 +21,8 @@ export async function loadRules({ ruleStatusesFilter, tagsFilter, sort = { field: 'name', direction: 'asc' }, + ruleTypeIds, + consumers, }: LoadRulesProps): Promise<{ page: number; perPage: number; @@ -51,6 +53,8 @@ export async function loadRules({ default_search_operator: 'AND', sort_field: sort.field, sort_order: sort.direction, + ...(ruleTypeIds ? { rule_type_ids: ruleTypeIds } : {}), + ...(consumers ? { consumers } : {}), }, }); return { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rules_helpers.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rules_helpers.ts index 4f8a8627bab52..aa1e2d1dac26f 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rules_helpers.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rules_helpers.ts @@ -24,7 +24,8 @@ export interface LoadRulesProps { ruleStatusesFilter?: RuleStatus[]; sort?: Sorting; kueryNode?: KueryNode; - filterConsumers?: string[]; + ruleTypeIds?: string[]; + consumers?: string[]; hasReference?: { type: string; id: string; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rules_kuery_filter.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rules_kuery_filter.test.ts new file mode 100644 index 0000000000000..9e9821b8d82cb --- /dev/null +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rules_kuery_filter.test.ts @@ -0,0 +1,384 @@ +/* + * 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 { httpServiceMock } from '@kbn/core/public/mocks'; +import { loadRulesWithKueryFilter } from './rules_kuery_filter'; + +const http = httpServiceMock.createStartContract(); + +describe('loadRulesWithKueryFilter', () => { + beforeEach(() => jest.resetAllMocks()); + + test('should call find API with base parameters', async () => { + const resolvedValue = { + page: 1, + per_page: 10, + total: 0, + data: [], + }; + http.post.mockResolvedValueOnce(resolvedValue); + + const result = await loadRulesWithKueryFilter({ http, page: { index: 0, size: 10 } }); + expect(result).toEqual({ + page: 1, + perPage: 10, + total: 0, + data: [], + }); + expect(http.post.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "/internal/alerting/rules/_find", + Object { + "body": "{\\"page\\":1,\\"per_page\\":10,\\"sort_field\\":\\"name\\",\\"sort_order\\":\\"asc\\"}", + }, + ] + `); + }); + + test('should call find API with searchText', async () => { + const resolvedValue = { + page: 1, + per_page: 10, + total: 0, + data: [], + }; + http.post.mockResolvedValueOnce(resolvedValue); + + const result = await loadRulesWithKueryFilter({ + http, + searchText: 'apples', + page: { index: 0, size: 10 }, + }); + expect(result).toEqual({ + page: 1, + perPage: 10, + total: 0, + data: [], + }); + expect(http.post.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "/internal/alerting/rules/_find", + Object { + "body": "{\\"page\\":1,\\"per_page\\":10,\\"filter\\":\\"{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"or\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.name\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"wildcard\\\\\\",\\\\\\"value\\\\\\":\\\\\\"apples\\\\\\"}]},{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.tags\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"wildcard\\\\\\",\\\\\\"value\\\\\\":\\\\\\"apples\\\\\\"}]}]}\\",\\"sort_field\\":\\"name\\",\\"sort_order\\":\\"asc\\"}", + }, + ] + `); + }); + + test('should call find API with actionTypesFilter', async () => { + const resolvedValue = { + page: 1, + per_page: 10, + total: 0, + data: [], + }; + http.post.mockResolvedValueOnce(resolvedValue); + + const result = await loadRulesWithKueryFilter({ + http, + searchText: 'foo', + page: { index: 0, size: 10 }, + }); + expect(result).toEqual({ + page: 1, + perPage: 10, + total: 0, + data: [], + }); + expect(http.post.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "/internal/alerting/rules/_find", + Object { + "body": "{\\"page\\":1,\\"per_page\\":10,\\"filter\\":\\"{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"or\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.name\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"wildcard\\\\\\",\\\\\\"value\\\\\\":\\\\\\"foo\\\\\\"}]},{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.tags\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"wildcard\\\\\\",\\\\\\"value\\\\\\":\\\\\\"foo\\\\\\"}]}]}\\",\\"sort_field\\":\\"name\\",\\"sort_order\\":\\"asc\\"}", + }, + ] + `); + }); + + test('should call find API with typesFilter', async () => { + const resolvedValue = { + page: 1, + per_page: 10, + total: 0, + data: [], + }; + http.post.mockResolvedValueOnce(resolvedValue); + + const result = await loadRulesWithKueryFilter({ + http, + typesFilter: ['foo', 'bar'], + page: { index: 0, size: 10 }, + }); + expect(result).toEqual({ + page: 1, + perPage: 10, + total: 0, + data: [], + }); + expect(http.post.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "/internal/alerting/rules/_find", + Object { + "body": "{\\"page\\":1,\\"per_page\\":10,\\"filter\\":\\"{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"or\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.alertTypeId\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"foo\\\\\\",\\\\\\"isQuoted\\\\\\":false}]},{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.alertTypeId\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"bar\\\\\\",\\\\\\"isQuoted\\\\\\":false}]}]}\\",\\"sort_field\\":\\"name\\",\\"sort_order\\":\\"asc\\"}", + }, + ] + `); + }); + + test('should call find API with actionTypesFilter and typesFilter', async () => { + const resolvedValue = { + page: 1, + per_page: 10, + total: 0, + data: [], + }; + http.post.mockResolvedValueOnce(resolvedValue); + + const result = await loadRulesWithKueryFilter({ + http, + searchText: 'baz', + typesFilter: ['foo', 'bar'], + page: { index: 0, size: 10 }, + }); + expect(result).toEqual({ + page: 1, + perPage: 10, + total: 0, + data: [], + }); + expect(http.post.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "/internal/alerting/rules/_find", + Object { + "body": "{\\"page\\":1,\\"per_page\\":10,\\"filter\\":\\"{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"and\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"or\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.alertTypeId\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"foo\\\\\\",\\\\\\"isQuoted\\\\\\":false}]},{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.alertTypeId\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"bar\\\\\\",\\\\\\"isQuoted\\\\\\":false}]}]},{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"or\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.name\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"wildcard\\\\\\",\\\\\\"value\\\\\\":\\\\\\"baz\\\\\\"}]},{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.tags\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"wildcard\\\\\\",\\\\\\"value\\\\\\":\\\\\\"baz\\\\\\"}]}]}]}\\",\\"sort_field\\":\\"name\\",\\"sort_order\\":\\"asc\\"}", + }, + ] + `); + }); + + test('should call find API with searchText and tagsFilter and typesFilter', async () => { + const resolvedValue = { + page: 1, + per_page: 10, + total: 0, + data: [], + }; + http.post.mockResolvedValueOnce(resolvedValue); + + const result = await loadRulesWithKueryFilter({ + http, + searchText: 'apples, foo, baz', + typesFilter: ['foo', 'bar'], + page: { index: 0, size: 10 }, + }); + expect(result).toEqual({ + page: 1, + perPage: 10, + total: 0, + data: [], + }); + expect(http.post.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "/internal/alerting/rules/_find", + Object { + "body": "{\\"page\\":1,\\"per_page\\":10,\\"filter\\":\\"{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"and\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"or\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.alertTypeId\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"foo\\\\\\",\\\\\\"isQuoted\\\\\\":false}]},{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.alertTypeId\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"bar\\\\\\",\\\\\\"isQuoted\\\\\\":false}]}]},{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"or\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.name\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"wildcard\\\\\\",\\\\\\"value\\\\\\":\\\\\\"apples, foo, baz\\\\\\"}]},{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.tags\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"wildcard\\\\\\",\\\\\\"value\\\\\\":\\\\\\"apples, foo, baz\\\\\\"}]}]}]}\\",\\"sort_field\\":\\"name\\",\\"sort_order\\":\\"asc\\"}", + }, + ] + `); + }); + + test('should call find API with searchText and tagsFilter and ruleTypeIds and consumers', async () => { + const resolvedValue = { + page: 1, + per_page: 10, + total: 0, + data: [], + }; + http.post.mockResolvedValueOnce(resolvedValue); + + const result = await loadRulesWithKueryFilter({ + http, + searchText: 'apples, foo, baz', + typesFilter: ['foo', 'bar'], + ruleTypeIds: ['one', 'two'], + consumers: ['my-consumer'], + page: { index: 0, size: 10 }, + }); + expect(result).toEqual({ + page: 1, + perPage: 10, + total: 0, + data: [], + }); + expect(http.post.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "/internal/alerting/rules/_find", + Object { + "body": "{\\"page\\":1,\\"per_page\\":10,\\"filter\\":\\"{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"and\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"or\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.alertTypeId\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"foo\\\\\\",\\\\\\"isQuoted\\\\\\":false}]},{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.alertTypeId\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"bar\\\\\\",\\\\\\"isQuoted\\\\\\":false}]}]},{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"or\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.name\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"wildcard\\\\\\",\\\\\\"value\\\\\\":\\\\\\"apples, foo, baz\\\\\\"}]},{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.tags\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"wildcard\\\\\\",\\\\\\"value\\\\\\":\\\\\\"apples, foo, baz\\\\\\"}]}]}]}\\",\\"sort_field\\":\\"name\\",\\"sort_order\\":\\"asc\\",\\"rule_type_ids\\":[\\"one\\",\\"two\\"],\\"consumers\\":[\\"my-consumer\\"]}", + }, + ] + `); + }); + + test('should call find API with ruleStatusesFilter', async () => { + const resolvedValue = { + page: 1, + per_page: 10, + total: 0, + data: [], + }; + http.post.mockResolvedValue(resolvedValue); + + let result = await loadRulesWithKueryFilter({ + http, + ruleStatusesFilter: ['enabled', 'snoozed'], + page: { index: 0, size: 10 }, + }); + expect(result).toEqual({ + page: 1, + perPage: 10, + total: 0, + data: [], + }); + expect(http.post.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "/internal/alerting/rules/_find", + Object { + "body": "{\\"page\\":1,\\"per_page\\":10,\\"filter\\":\\"{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"or\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.enabled\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":true,\\\\\\"isQuoted\\\\\\":false}]},{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"or\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.muteAll\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":true,\\\\\\"isQuoted\\\\\\":false}]},{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"nested\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.snoozeSchedule\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"range\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"duration\\\\\\",\\\\\\"isQuoted\\\\\\":false},\\\\\\"gt\\\\\\",{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"0\\\\\\",\\\\\\"isQuoted\\\\\\":false}]}]}]}]}\\",\\"sort_field\\":\\"name\\",\\"sort_order\\":\\"asc\\"}", + }, + ] + `); + + result = await loadRulesWithKueryFilter({ + http, + ruleStatusesFilter: ['disabled'], + page: { index: 0, size: 10 }, + }); + expect(result).toEqual({ + page: 1, + perPage: 10, + total: 0, + data: [], + }); + expect(http.post.mock.calls[1]).toMatchInlineSnapshot(` + Array [ + "/internal/alerting/rules/_find", + Object { + "body": "{\\"page\\":1,\\"per_page\\":10,\\"filter\\":\\"{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.enabled\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":false,\\\\\\"isQuoted\\\\\\":false}]}\\",\\"sort_field\\":\\"name\\",\\"sort_order\\":\\"asc\\"}", + }, + ] + `); + + result = await loadRulesWithKueryFilter({ + http, + ruleStatusesFilter: ['enabled', 'disabled', 'snoozed'], + page: { index: 0, size: 10 }, + }); + expect(result).toEqual({ + page: 1, + perPage: 10, + total: 0, + data: [], + }); + expect(http.post.mock.calls[2]).toMatchInlineSnapshot(` + Array [ + "/internal/alerting/rules/_find", + Object { + "body": "{\\"page\\":1,\\"per_page\\":10,\\"filter\\":\\"{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"or\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.enabled\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":true,\\\\\\"isQuoted\\\\\\":false}]},{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.enabled\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":false,\\\\\\"isQuoted\\\\\\":false}]},{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"or\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.muteAll\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":true,\\\\\\"isQuoted\\\\\\":false}]},{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"nested\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.snoozeSchedule\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"range\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"duration\\\\\\",\\\\\\"isQuoted\\\\\\":false},\\\\\\"gt\\\\\\",{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"0\\\\\\",\\\\\\"isQuoted\\\\\\":false}]}]}]}]}\\",\\"sort_field\\":\\"name\\",\\"sort_order\\":\\"asc\\"}", + }, + ] + `); + }); + + test('should call find API with tagsFilter', async () => { + const resolvedValue = { + page: 1, + per_page: 10, + total: 0, + data: [], + }; + http.post.mockResolvedValueOnce(resolvedValue); + const result = await loadRulesWithKueryFilter({ + http, + tagsFilter: ['a', 'b', 'c'], + page: { index: 0, size: 10 }, + }); + expect(result).toEqual({ + page: 1, + perPage: 10, + total: 0, + data: [], + }); + expect(http.post.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "/internal/alerting/rules/_find", + Object { + "body": "{\\"page\\":1,\\"per_page\\":10,\\"filter\\":\\"{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"or\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.tags\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"a\\\\\\",\\\\\\"isQuoted\\\\\\":false}]},{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.tags\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"b\\\\\\",\\\\\\"isQuoted\\\\\\":false}]},{\\\\\\"type\\\\\\":\\\\\\"function\\\\\\",\\\\\\"function\\\\\\":\\\\\\"is\\\\\\",\\\\\\"arguments\\\\\\":[{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"alert.attributes.tags\\\\\\",\\\\\\"isQuoted\\\\\\":false},{\\\\\\"type\\\\\\":\\\\\\"literal\\\\\\",\\\\\\"value\\\\\\":\\\\\\"c\\\\\\",\\\\\\"isQuoted\\\\\\":false}]}]}\\",\\"sort_field\\":\\"name\\",\\"sort_order\\":\\"asc\\"}", + }, + ] + `); + }); + + test('should call find API with ruleTypeIds', async () => { + const resolvedValue = { + page: 1, + per_page: 10, + total: 0, + data: [], + }; + http.post.mockResolvedValueOnce(resolvedValue); + + const result = await loadRulesWithKueryFilter({ + http, + ruleTypeIds: ['foo', 'bar'], + page: { index: 0, size: 10 }, + }); + expect(result).toEqual({ + page: 1, + perPage: 10, + total: 0, + data: [], + }); + expect(http.post.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "/internal/alerting/rules/_find", + Object { + "body": "{\\"page\\":1,\\"per_page\\":10,\\"sort_field\\":\\"name\\",\\"sort_order\\":\\"asc\\",\\"rule_type_ids\\":[\\"foo\\",\\"bar\\"]}", + }, + ] + `); + }); + + test('should call find API with consumers', async () => { + const resolvedValue = { + page: 1, + per_page: 10, + total: 0, + data: [], + }; + http.post.mockResolvedValueOnce(resolvedValue); + + const result = await loadRulesWithKueryFilter({ + http, + consumers: ['foo', 'bar'], + page: { index: 0, size: 10 }, + }); + expect(result).toEqual({ + page: 1, + perPage: 10, + total: 0, + data: [], + }); + expect(http.post.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "/internal/alerting/rules/_find", + Object { + "body": "{\\"page\\":1,\\"per_page\\":10,\\"sort_field\\":\\"name\\",\\"sort_order\\":\\"asc\\",\\"consumers\\":[\\"foo\\",\\"bar\\"]}", + }, + ] + `); + }); +}); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rules_kuery_filter.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rules_kuery_filter.ts index 7c731dbfb016c..c765f8f478041 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rules_kuery_filter.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/rule_api/rules_kuery_filter.ts @@ -24,8 +24,9 @@ export async function loadRulesWithKueryFilter({ tagsFilter, sort = { field: 'name', direction: 'asc' }, kueryNode, - filterConsumers, + ruleTypeIds, hasReference, + consumers, }: LoadRulesProps): Promise<{ page: number; perPage: number; @@ -58,8 +59,9 @@ export async function loadRulesWithKueryFilter({ ...(filtersKueryNode ? { filter: JSON.stringify(filtersKueryNode) } : {}), sort_field: sort.field, sort_order: sort.direction, - filter_consumers: filterConsumers, ...(hasReference ? { has_reference: hasReference } : {}), + ...(ruleTypeIds ? { rule_type_ids: ruleTypeIds } : {}), + ...(consumers ? { consumers } : {}), }), }); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/lib/search_filters.ts b/x-pack/plugins/triggers_actions_ui/public/application/lib/search_filters.ts index 3ae6a01633e40..532f49a159c89 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/lib/search_filters.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/lib/search_filters.ts @@ -11,72 +11,78 @@ import { AlertConsumers, DefaultAlertFieldName, } from '@kbn/rule-data-utils'; -import { FILTERS, FilterStateStore, PhraseFilter, PhrasesFilter } from '@kbn/es-query'; +import { FILTERS, FilterStateStore, PhrasesFilter } from '@kbn/es-query'; const $state = { store: FilterStateStore.APP_STATE, }; export type AlertsFeatureIdsFilter = PhrasesFilter & { - meta: Pick & { alertsFeatureIds: AlertConsumers[] }; + meta: PhrasesFilter['meta'] & { ruleTypeIds: string[]; consumers: string[] }; }; /** * Creates a match_phrase filter without an index pattern */ -export const createMatchPhraseFilter = (field: DefaultAlertFieldName, value: unknown) => - ({ - meta: { - field, - type: FILTERS.PHRASE, - key: field, - alias: null, - disabled: false, - index: undefined, - negate: false, - params: { query: value }, - value: undefined, - }, - $state, - query: { - match_phrase: { - [field]: value, - }, +export const createMatchPhraseFilter = ( + field: DefaultAlertFieldName, + value: string +): AlertsFeatureIdsFilter => ({ + meta: { + field, + type: FILTERS.PHRASE, + key: field, + alias: null, + disabled: false, + index: undefined, + negate: false, + // @ts-expect-error + params: { query: value }, + value: undefined, + ruleTypeIds: [], + consumers: [], + }, + $state, + query: { + match_phrase: { + [field]: value, }, - } as PhraseFilter); + }, +}); /** * Creates a match_phrases filter without an index pattern */ export const createMatchPhrasesFilter = ( field: DefaultAlertFieldName, - values: unknown[], + values: string[], alias: string | null = null -) => - ({ - meta: { - field, - type: FILTERS.PHRASES, - key: field, - alias, - disabled: false, - index: undefined, - negate: false, - params: values, - value: undefined, - }, - $state, - query: { - bool: { - minimum_should_match: 1, - should: values.map((v) => ({ - match_phrase: { - [field]: v, - }, - })), - }, +): AlertsFeatureIdsFilter => ({ + meta: { + field, + type: FILTERS.PHRASES, + key: field, + alias, + disabled: false, + index: undefined, + negate: false, + params: values, + value: undefined, + ruleTypeIds: [], + consumers: [], + }, + $state, + query: { + bool: { + minimum_should_match: 1, + should: values.map((v) => ({ + match_phrase: { + [field]: v, + }, + })), }, - } as PhrasesFilter); + }, +}); /** * Creates a match_phrase filter targeted to filtering alerts by producer @@ -88,15 +94,12 @@ export const createRuleProducerFilter = (producer: AlertConsumers) => * Creates a match_phrase filter targeted to filtering alerts by rule type ids */ export const createRuleTypesFilter = ( - featureIds: AlertConsumers[], - alias: string, - ruleTypeIds: string[] + ruleTypeIds: string[], + consumers: string[], + alias: string ) => { - const filter = createMatchPhrasesFilter( - ALERT_RULE_TYPE_ID, - ruleTypeIds, - alias - ) as AlertsFeatureIdsFilter; - filter.meta.alertsFeatureIds = featureIds; + const filter = createMatchPhrasesFilter(ALERT_RULE_TYPE_ID, ruleTypeIds, alias); + filter.meta.ruleTypeIds = ruleTypeIds; + filter.meta.consumers = consumers; return filter; }; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.test.tsx index 74b528ba7a64a..2c5f159d0a76f 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.test.tsx @@ -399,6 +399,7 @@ describe('action_form', () => { } actionTypeRegistry={actionTypeRegistry} setHasActionsWithBrokenConnector={setHasActionsWithBrokenConnector} + ruleTypeId=".es-query" /> ); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx index 940583ea5bced..07011887fa72d 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx @@ -29,7 +29,7 @@ import { } from '@kbn/alerting-plugin/common'; import { v4 as uuidv4 } from 'uuid'; import { ActionGroupWithMessageVariables } from '@kbn/triggers-actions-ui-types'; -import { checkActionFormActionTypeEnabled } from '@kbn/alerts-ui-shared/src/rule_form/utils/check_action_type_enabled'; +import { checkActionFormActionTypeEnabled } from '@kbn/alerts-ui-shared/src/check_action_type_enabled'; import { TECH_PREVIEW_DESCRIPTION, TECH_PREVIEW_LABEL } from '../translations'; import { loadActionTypes, loadAllActions as loadConnectors } from '../../lib/action_connector_api'; import { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_type_form.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_type_form.test.tsx index 116b416ac98f1..945ab23c43611 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_type_form.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_type_form.test.tsx @@ -136,6 +136,7 @@ describe('action_type_form', () => { const wrapper = mountWithIntl( getActionTypeForm({ index: 1, + ruleTypeId: '.es-query', actionItem: { id: '123', actionTypeId: '.pagerduty', @@ -190,6 +191,7 @@ describe('action_type_form', () => { {getActionTypeForm({ index: 1, + ruleTypeId: '.es-query', actionItem: { id: '123', actionTypeId: '.pagerduty', @@ -239,6 +241,7 @@ describe('action_type_form', () => { {getActionTypeForm({ index: 1, + ruleTypeId: 'siem.esqlRule', actionItem: { id: '123', actionTypeId: '.pagerduty', @@ -288,6 +291,7 @@ describe('action_type_form', () => { const wrapper = mountWithIntl( getActionTypeForm({ index: 1, + ruleTypeId: '.es-query', actionItem: { id: '123', actionTypeId: '.pagerduty', @@ -340,6 +344,7 @@ describe('action_type_form', () => { const wrapper = mountWithIntl( getActionTypeForm({ index: 1, + ruleTypeId: '.es-query', actionItem: { id: '123', actionTypeId: '.pagerduty', @@ -413,6 +418,7 @@ describe('action_type_form', () => { {getActionTypeForm({ index: 1, actionItem, + ruleTypeId: '.es-query', setActionFrequencyProperty: () => { actionItem.frequency = { notifyWhen: RuleNotifyWhen.ACTIVE, @@ -551,6 +557,7 @@ describe('action_type_form', () => { {getActionTypeForm({ index: 1, + ruleTypeId: '.es-query', actionItem, notifyWhenSelectOptions: CUSTOM_NOTIFY_WHEN_OPTIONS, })} @@ -604,6 +611,7 @@ describe('action_type_form', () => { {getActionTypeForm({ index: 1, + ruleTypeId: '.es-query', actionItem, notifyWhenSelectOptions: CUSTOM_NOTIFY_WHEN_OPTIONS, })} @@ -664,7 +672,7 @@ function getActionTypeForm({ messageVariables?: ActionVariables; summaryMessageVariables?: ActionVariables; notifyWhenSelectOptions?: NotifyWhenSelectOptions[]; - ruleTypeId?: string; + ruleTypeId: string; producerId?: string; featureId?: string; }) { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_type_form.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_type_form.tsx index 9af97b713dff3..8baec5912f793 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_type_form.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_type_form.tsx @@ -8,7 +8,7 @@ import React, { Suspense, useEffect, useState, useCallback, useMemo } from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import { ValidFeatureId, AlertConsumers } from '@kbn/rule-data-utils'; +import { AlertConsumers } from '@kbn/rule-data-utils'; import { EuiFlexGroup, EuiFlexItem, @@ -44,11 +44,12 @@ import { parseDuration, } from '@kbn/alerting-plugin/common/parse_duration'; import type { SavedObjectAttribute } from '@kbn/core-saved-objects-api-server'; -import { transformActionVariables } from '@kbn/alerts-ui-shared/src/action_variables/transforms'; -import { RuleActionsNotifyWhen } from '@kbn/alerts-ui-shared/src/rule_form/rule_actions/rule_actions_notify_when'; -import { RuleActionsAlertsFilter } from '@kbn/alerts-ui-shared/src/rule_form/rule_actions/rule_actions_alerts_filter'; -import { checkActionFormActionTypeEnabled } from '@kbn/alerts-ui-shared/src/rule_form/utils/check_action_type_enabled'; -import { RuleActionsAlertsFilterTimeframe } from '@kbn/alerts-ui-shared/src/rule_form/rule_actions/rule_actions_alerts_filter_timeframe'; +import { + RuleActionsNotifyWhen, + RuleActionsAlertsFilter, + RuleActionsAlertsFilterTimeframe, +} from '@kbn/response-ops-rule-form'; +import { checkActionFormActionTypeEnabled, transformActionVariables } from '@kbn/alerts-ui-shared'; import { ActionGroupWithMessageVariables } from '@kbn/triggers-actions-ui-types'; import { TECH_PREVIEW_DESCRIPTION, TECH_PREVIEW_LABEL } from '../translations'; import { getIsExperimentalFeatureEnabled } from '../../../common/get_experimental_features'; @@ -507,7 +508,6 @@ export const ActionTypeForm = ({ setActionAlertsFilterProperty('query', query, index)} - featureIds={[producerId as ValidFeatureId]} appName={featureId!} ruleTypeId={ruleTypeId} plugins={{ diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_type_menu.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_type_menu.tsx index c9cab9defaffc..967fdd1c88acf 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_type_menu.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_type_menu.tsx @@ -10,7 +10,7 @@ import { EuiFlexItem, EuiCard, EuiIcon, EuiFlexGrid, EuiSpacer } from '@elastic/ import { i18n } from '@kbn/i18n'; import { EuiToolTip } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { checkActionTypeEnabled } from '@kbn/alerts-ui-shared/src/rule_form/utils/check_action_type_enabled'; +import { checkActionTypeEnabled } from '@kbn/alerts-ui-shared/src/check_action_type_enabled'; import { TECH_PREVIEW_DESCRIPTION, TECH_PREVIEW_LABEL } from '../translations'; import { ActionType, ActionTypeIndex, ActionTypeRegistryContract } from '../../../types'; import { loadActionTypes } from '../../lib/action_connector_api'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_rules_list.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_rules_list.tsx index c2e89eb31fe84..719cd0fef2377 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_rules_list.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_rules_list.tsx @@ -73,7 +73,6 @@ export const ConnectorRulesList = (props: ConnectorRulesListProps) => { const ruleFilters = useMemo(() => { const baseFilters = { searchText: searchFilter, - types: ruleTypeIds, }; if (connector.isPreconfigured) { @@ -105,10 +104,11 @@ export const ConnectorRulesList = (props: ConnectorRulesListProps) => { id: connector.id, }, }; - }, [connector, searchFilter, ruleTypeIds]); + }, [connector, searchFilter]); const { rulesState } = useLoadRulesQuery({ ...ruleFilters, + ruleTypeIds, hasDefaultRuleTypesFiltersOn: ruleTypeIds.length === 0, page, sort, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/system_action_type_form.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/system_action_type_form.tsx index 36da1b594433d..a8d4dbe807148 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/system_action_type_form.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/system_action_type_form.tsx @@ -27,8 +27,7 @@ import { import { isEmpty, partition, some } from 'lodash'; import { ActionVariable, RuleActionParam } from '@kbn/alerting-plugin/common'; import { ActionGroupWithMessageVariables } from '@kbn/triggers-actions-ui-types'; -import { transformActionVariables } from '@kbn/alerts-ui-shared/src/action_variables/transforms'; -import { checkActionFormActionTypeEnabled } from '@kbn/alerts-ui-shared/src/rule_form/utils/check_action_type_enabled'; +import { checkActionFormActionTypeEnabled, transformActionVariables } from '@kbn/alerts-ui-shared'; import { TECH_PREVIEW_DESCRIPTION, TECH_PREVIEW_LABEL } from '../translations'; import { IErrorObject, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx index 17e6531a65c20..19fe53e4ee88c 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx @@ -26,7 +26,7 @@ import { i18n } from '@kbn/i18n'; import { useHistory, useLocation, useParams } from 'react-router-dom'; import { getConnectorCompatibility } from '@kbn/actions-plugin/common'; import { FormattedMessage } from '@kbn/i18n-react'; -import { checkActionTypeEnabled } from '@kbn/alerts-ui-shared/src/rule_form/utils/check_action_type_enabled'; +import { checkActionTypeEnabled } from '@kbn/alerts-ui-shared/src/check_action_type_enabled'; import { loadActionTypes, deleteActions } from '../../../lib/action_connector_api'; import { hasDeleteActionsCapability, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/alert_summary_widget.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/alert_summary_widget.test.tsx index 743c475a287b3..84c2e4c5468a9 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/alert_summary_widget.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/alert_summary_widget.test.tsx @@ -52,7 +52,7 @@ describe('AlertSummaryWidget', () => { {}, @@ -34,7 +35,8 @@ export const AlertSummaryWidget = ({ isLoading, error, } = useLoadAlertSummary({ - featureIds, + ruleTypeIds, + consumers, filter, timeRange, }); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/types.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/types.ts index 2393ff9c16a64..88b40289cb6e0 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/types.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/types.ts @@ -8,7 +8,7 @@ import type { BrushEndListener, PartialTheme, SettingsProps, Theme } from '@elastic/charts'; import { estypes } from '@elastic/elasticsearch'; import { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; -import { AlertStatus, ValidFeatureId } from '@kbn/rule-data-utils'; +import { AlertStatus } from '@kbn/rule-data-utils'; import { ChartsPluginStart } from '@kbn/charts-plugin/public'; export interface Alert { @@ -48,7 +48,8 @@ export interface DependencyProps { } export interface AlertSummaryWidgetProps { - featureIds?: ValidFeatureId[]; + ruleTypeIds?: string[]; + consumers?: string[]; filter?: estypes.QueryDslQueryContainer; fullSize?: boolean; onClick?: (status?: AlertStatus) => void; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_page/components/stack_alerts_page.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_page/components/stack_alerts_page.tsx index 26f4c3fd43bf0..f5a39ab5ac0d3 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_page/components/stack_alerts_page.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_page/components/stack_alerts_page.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React, { lazy, Suspense, useEffect, useMemo, useState } from 'react'; +import React, { lazy, Suspense, useCallback, useEffect, useMemo, useState } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiBetaBadge, @@ -21,9 +21,10 @@ import { ALERT_STATUS_RECOVERED, ALERT_STATUS_UNTRACKED, AlertConsumers, + isSiemRuleType, } from '@kbn/rule-data-utils'; import { QueryClientProvider } from '@tanstack/react-query'; -import { BoolQuery } from '@kbn/es-query'; +import { BoolQuery, Filter } from '@kbn/es-query'; import { FormattedMessage } from '@kbn/i18n-react'; import { ALERTS_PAGE_ID } from '../../../../common/constants'; import { QuickFiltersMenuItem } from '../../alerts_search_bar/quick_filters'; @@ -31,7 +32,6 @@ import { NoPermissionPrompt } from '../../../components/prompts/no_permission_pr import { ALERT_TABLE_GLOBAL_CONFIG_ID } from '../../../constants'; import { useRuleStats } from '../hooks/use_rule_stats'; import { getAlertingSectionBreadcrumb } from '../../../lib/breadcrumb'; -import { NON_SIEM_FEATURE_IDS } from '../../alerts_search_bar/constants'; import { alertProducersData } from '../../alerts_table/constants'; import { UrlSyncedAlertsSearchBar } from '../../alerts_search_bar/url_synced_alerts_search_bar'; import { useKibana } from '../../../../common/lib/kibana'; @@ -41,11 +41,21 @@ import { Provider, } from '../../alerts_search_bar/use_alert_search_bar_state_container'; import { getCurrentDocTitle } from '../../../lib/doc_title'; -import { createMatchPhraseFilter, createRuleTypesFilter } from '../../../lib/search_filters'; +import { + AlertsFeatureIdsFilter, + createMatchPhraseFilter, + createRuleTypesFilter, +} from '../../../lib/search_filters'; import { useLoadRuleTypesQuery } from '../../../hooks/use_load_rule_types_query'; import { nonNullable } from '../../../../../common/utils'; -import { useRuleTypeIdsByFeatureId } from '../hooks/use_rule_type_ids_by_feature_id'; +import { + RuleTypeIdsByFeatureId, + useRuleTypeIdsByFeatureId, +} from '../hooks/use_rule_type_ids_by_feature_id'; import { TECH_PREVIEW_DESCRIPTION, TECH_PREVIEW_LABEL } from '../../translations'; +import { AlertsTableSupportedConsumers } from '../../alerts_table/types'; +import { NON_SIEM_CONSUMERS } from '../../alerts_search_bar/constants'; + const AlertsTable = lazy(() => import('../../alerts_table/alerts_table_state')); /** @@ -55,7 +65,7 @@ export const StackAlertsPage = () => { return ( - + ); @@ -69,61 +79,121 @@ const getFeatureFilterLabel = (featureName: string) => }, }); -const PageContent = () => { +const PageContentWrapperComponent: React.FC = () => { const { chrome: { docTitle }, setBreadcrumbs, - alertsTableConfigurationRegistry, } = useKibana().services; - const [esQuery, setEsQuery] = useState({ bool: {} } as { bool: BoolQuery }); - const [activeFeatureFilters, setActiveFeatureFilters] = useState([]); - const ruleStats = useRuleStats(); const { ruleTypesState: { data: ruleTypesIndex, initialLoad: isInitialLoadingRuleTypes }, authorizedToReadAnyRules, } = useLoadRuleTypesQuery({ filteredRuleTypes: [] }); + const ruleTypeIdsByFeatureId = useRuleTypeIdsByFeatureId(ruleTypesIndex); - const browsingSiem = useMemo( - () => activeFeatureFilters.length === 1 && activeFeatureFilters[0] === AlertConsumers.SIEM, - [activeFeatureFilters] - ); - const filteringBySolution = useMemo( - () => activeFeatureFilters.length > 0, - [activeFeatureFilters.length] + useEffect(() => { + setBreadcrumbs([getAlertingSectionBreadcrumb('alerts')]); + docTitle.change(getCurrentDocTitle('alerts')); + }, [docTitle, setBreadcrumbs]); + + return !isInitialLoadingRuleTypes ? ( + + ) : null; +}; + +const PageContentWrapper = React.memo(PageContentWrapperComponent); + +interface PageContentProps { + isLoading: boolean; + authorizedToReadAnyRules: boolean; + ruleTypeIdsByFeatureId: RuleTypeIdsByFeatureId; +} + +const PageContentComponent: React.FC = ({ + isLoading, + authorizedToReadAnyRules, + ruleTypeIdsByFeatureId, +}) => { + const { alertsTableConfigurationRegistry } = useKibana().services; + const ruleTypeIdsByFeatureIdEntries = Object.entries(ruleTypeIdsByFeatureId); + + const [esQuery, setEsQuery] = useState({ bool: {} } as { bool: BoolQuery }); + const [ruleTypeIds, setRuleTypeIds] = useState(() => + getInitialRuleTypeIds(ruleTypeIdsByFeatureId) ); - const featureIds = useMemo( - () => - filteringBySolution - ? browsingSiem - ? [AlertConsumers.SIEM] - : activeFeatureFilters - : NON_SIEM_FEATURE_IDS, - [activeFeatureFilters, browsingSiem, filteringBySolution] + + const [consumers, setConsumers] = useState(NON_SIEM_CONSUMERS); + + const [selectedFilters, setSelectedFilters] = useState([]); + const ruleStats = useRuleStats({ ruleTypeIds }); + const isFilteringSecurityRules = ruleTypeIds.every(isSiemRuleType); + + const onFilterSelected = useCallback( + (filters: Filter[]) => { + const newRuleTypeIds = [ + ...new Set( + filters + .flatMap((ruleTypeId) => (ruleTypeId as AlertsFeatureIdsFilter).meta.ruleTypeIds) + .filter(nonNullable) + ), + ]; + + const newConsumers = [ + ...new Set( + filters + .flatMap((ruleTypeId) => (ruleTypeId as AlertsFeatureIdsFilter).meta.consumers) + .filter(nonNullable) + ), + ]; + + setSelectedFilters(filters as AlertsFeatureIdsFilter[]); + + if (newRuleTypeIds.length > 0) { + setRuleTypeIds(newRuleTypeIds); + setConsumers(newConsumers); + return; + } + + setRuleTypeIds(getInitialRuleTypeIds(ruleTypeIdsByFeatureId)); + setConsumers(NON_SIEM_CONSUMERS); + }, + [ruleTypeIdsByFeatureId] ); + const quickFilters = useMemo(() => { const filters: QuickFiltersMenuItem[] = []; - if (Object.values(ruleTypeIdsByFeatureId).length > 0) { + if (ruleTypeIdsByFeatureIdEntries.length > 0) { filters.push( - ...Object.entries(ruleTypeIdsByFeatureId) - .map(([featureId, ruleTypeIds]) => { - const producerData = alertProducersData[featureId as AlertConsumers]; + ...ruleTypeIdsByFeatureIdEntries + .map(([consumer, _ruleTypeIds]) => { + const producerData = alertProducersData[consumer as AlertsTableSupportedConsumers]; if (!producerData) { return null; } + const filterLabel = getFeatureFilterLabel(producerData.displayName); - const disabled = - filteringBySolution && featureId === AlertConsumers.SIEM - ? !browsingSiem - : browsingSiem; + const shouldDisable = + (isFilteringSecurityRules && consumer !== AlertConsumers.SIEM) || + (!isFilteringSecurityRules && consumer === AlertConsumers.SIEM); + + const isQuickFilterSelected = _ruleTypeIds.every((ruleTypeId) => + ruleTypeIds.includes(ruleTypeId) + ); + + const disabled = selectedFilters.length > 0 && (shouldDisable || isQuickFilterSelected); + return { name: filterLabel, icon: producerData.icon, filter: createRuleTypesFilter( - producerData.subFeatureIds ?? [featureId as AlertConsumers], - filterLabel, - ruleTypeIds + _ruleTypeIds, + producerData.subFeatureIds ?? [consumer], + filterLabel ), disabled, }; @@ -131,6 +201,7 @@ const PageContent = () => { .filter(nonNullable) ); } + filters.push({ title: i18n.translate('xpack.triggersActionsUI.sections.globalAlerts.quickFilters.status', { defaultMessage: 'Status', @@ -142,17 +213,12 @@ const PageContent = () => { })), }); return filters; - }, [browsingSiem, filteringBySolution, ruleTypeIdsByFeatureId]); - const tableConfigurationId = useMemo( - // TODO in preparation for using solution-specific configurations - () => ALERT_TABLE_GLOBAL_CONFIG_ID, - [] - ); - - useEffect(() => { - setBreadcrumbs([getAlertingSectionBreadcrumb('alerts')]); - docTitle.change(getCurrentDocTitle('alerts')); - }, [docTitle, setBreadcrumbs]); + }, [ + isFilteringSecurityRules, + ruleTypeIds, + ruleTypeIdsByFeatureIdEntries, + selectedFilters.length, + ]); return ( <> @@ -177,28 +243,29 @@ const PageContent = () => { rightSideItems={ruleStats} /> - {!isInitialLoadingRuleTypes && !authorizedToReadAnyRules ? ( + {!isLoading && !authorizedToReadAnyRules ? ( ) : ( }> { ); }; + +const PageContent = React.memo(PageContentComponent); + +const getInitialRuleTypeIds = (ruleTypeIdsByFeatureId: RuleTypeIdsByFeatureId): string[] => + Object.entries(ruleTypeIdsByFeatureId) + .filter(([featureId]) => featureId !== AlertConsumers.SIEM) + .map(([_, _ruleTypeIds]) => _ruleTypeIds) + .flat(); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_page/hooks/use_rule_stats.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_page/hooks/use_rule_stats.tsx index 06e371979d980..4d3841672defb 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_page/hooks/use_rule_stats.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_page/hooks/use_rule_stats.tsx @@ -23,7 +23,12 @@ const Divider = styled.div` height: 100%; `; -export const useRuleStats = () => { +interface Props { + ruleTypeIds?: string[]; + consumers?: string[]; +} + +export const useRuleStats = ({ ruleTypeIds, consumers }: Props = {}) => { const { http, notifications: { toasts }, @@ -46,7 +51,10 @@ export const useRuleStats = () => { try { const response = await loadRuleAggregations({ http, + ruleTypeIds, + consumers, }); + const { ruleExecutionStatus, ruleMutedStatus, ruleEnabledStatus, ruleSnoozedStatus } = response; if (ruleExecutionStatus && ruleMutedStatus && ruleEnabledStatus && ruleSnoozedStatus) { @@ -73,7 +81,7 @@ export const useRuleStats = () => { } finally { setLoading(false); } - }, [http, toasts]); + }, [consumers, http, ruleTypeIds, toasts]); useEffect(() => { loadRuleStats(); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_page/hooks/use_rule_type_ids_by_feature_id.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_page/hooks/use_rule_type_ids_by_feature_id.ts index c8c5eedc3054f..1380f9655d479 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_page/hooks/use_rule_type_ids_by_feature_id.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_page/hooks/use_rule_type_ids_by_feature_id.ts @@ -12,7 +12,7 @@ import { observabilityFeatureIds, stackFeatureIds } from '../../alerts_table/con import { MULTI_CONSUMER_RULE_TYPE_IDS } from '../../../constants'; import { RuleTypeIndex } from '../../../../types'; -type RuleTypeIdsByFeatureId = Partial< +export type RuleTypeIdsByFeatureId = Partial< Record< | typeof AlertConsumers.SIEM | typeof AlertConsumers.OBSERVABILITY @@ -22,17 +22,20 @@ type RuleTypeIdsByFeatureId = Partial< > >; +const EMPTY_OBJECT = {}; + /** * Groups all rule type ids under their respective feature id */ export const useRuleTypeIdsByFeatureId = (ruleTypesIndex: RuleTypeIndex) => useMemo((): RuleTypeIdsByFeatureId => { if (!ruleTypesIndex?.size) { - return {}; + return EMPTY_OBJECT; } + const map = Array.from(ruleTypesIndex.entries()).reduce>>( - (types, [key, value]) => { - let producer = value.producer as keyof RuleTypeIdsByFeatureId; + (types, [ruleTypeId, ruleType]) => { + let producer = ruleType.producer as keyof RuleTypeIdsByFeatureId; // Some o11y apps are listed under 'observability' to create a grouped filter if (observabilityFeatureIds.includes(producer)) { producer = AlertConsumers.OBSERVABILITY; @@ -41,14 +44,15 @@ export const useRuleTypeIdsByFeatureId = (ruleTypesIndex: RuleTypeIndex) => if (stackFeatureIds.includes(producer)) { producer = AlertConsumers.STACK_ALERTS; } + // Multi consumer rule type ids should be listed both in Observability and Stack alerts - if (MULTI_CONSUMER_RULE_TYPE_IDS.includes(value.id)) { + if (MULTI_CONSUMER_RULE_TYPE_IDS.includes(ruleType.id)) { (types[AlertConsumers.OBSERVABILITY] = - types[AlertConsumers.OBSERVABILITY] || new Set()).add(key); + types[AlertConsumers.OBSERVABILITY] || new Set()).add(ruleTypeId); (types[AlertConsumers.STACK_ALERTS] = - types[AlertConsumers.STACK_ALERTS] || new Set()).add(key); + types[AlertConsumers.STACK_ALERTS] || new Set()).add(ruleTypeId); } else { - (types[producer] = types[producer] || new Set()).add(key); + (types[producer] = types[producer] || new Set()).add(ruleTypeId); } return types; }, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_search_bar/alerts_search_bar.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_search_bar/alerts_search_bar.test.tsx index 61fceacead341..3f285de6ead75 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_search_bar/alerts_search_bar.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_search_bar/alerts_search_bar.test.tsx @@ -12,14 +12,10 @@ import { Filter, FilterStateStore } from '@kbn/es-query'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { NotificationsStart } from '@kbn/core-notifications-browser'; import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { useLoadRuleTypesQuery } from '../../hooks/use_load_rule_types_query'; -import { useRuleAADFields } from '../../hooks/use_rule_aad_fields'; import { AlertsSearchBar } from './alerts_search_bar'; const mockDataPlugin = dataPluginMock.createStartContract(); jest.mock('@kbn/kibana-utils-plugin/public'); -jest.mock('../../hooks/use_load_rule_types_query'); -jest.mock('../../hooks/use_rule_aad_fields'); jest.mock('@kbn/alerts-ui-shared/src/common/hooks/use_alerts_data_view'); jest.mock('@kbn/kibana-react-plugin/public', () => ({ ...jest.requireActual('@kbn/kibana-react-plugin/public'), @@ -41,43 +37,28 @@ jest.mocked(useAlertsDataView).mockReturnValue({ }, }); -jest.mocked(useLoadRuleTypesQuery).mockReturnValue({ - ruleTypesState: { - initialLoad: false, - data: new Map(), - isLoading: false, - error: undefined, - }, - authorizedToReadAnyRules: false, - hasAnyAuthorizedRuleType: false, - authorizedRuleTypes: [], - authorizedToCreateAnyRules: false, - isSuccess: false, -}); - -jest.mocked(useRuleAADFields).mockReturnValue({ - aadFields: [], - loading: false, -}); - const mockUseKibana = useKibana as jest.Mock; +const unifiedSearchBarMock = jest.fn().mockImplementation((props) => ( + +)); + describe('AlertsSearchBar', () => { beforeEach(() => { + jest.clearAllMocks(); + mockUseKibana.mockReturnValue({ services: { data: mockDataPlugin, unifiedSearch: { ui: { - SearchBar: jest.fn().mockImplementation((props) => ( - - )), + SearchBar: unifiedSearchBarMock, }, }, notifications: { toasts: { addWarning: jest.fn() } } as unknown as NotificationsStart, @@ -85,10 +66,6 @@ describe('AlertsSearchBar', () => { }); }); - beforeEach(() => { - jest.clearAllMocks(); - }); - it('renders correctly', async () => { render( { onSavedQueryUpdated={jest.fn()} onClearSavedQuery={jest.fn()} appName={'test'} - featureIds={['observability', 'stackAlerts']} /> ); expect(await screen.findByTestId('querySubmitButton')).toBeInTheDocument(); @@ -119,7 +95,6 @@ describe('AlertsSearchBar', () => { onSavedQueryUpdated={jest.fn()} onClearSavedQuery={jest.fn()} appName={'test'} - featureIds={['observability', 'stackAlerts']} /> ); @@ -176,7 +151,6 @@ describe('AlertsSearchBar', () => { onSavedQueryUpdated={jest.fn()} onClearSavedQuery={jest.fn()} appName={'test'} - featureIds={['observability', 'stackAlerts']} /> ); @@ -187,4 +161,136 @@ describe('AlertsSearchBar', () => { expect(mockDataPlugin.query.filterManager.setFilters).toHaveBeenCalledWith(filters); }); }); + + it('calls the unifiedSearchBar correctly for security rule types', async () => { + render( + + ); + + await waitFor(() => { + expect(unifiedSearchBarMock).toHaveBeenCalledWith( + expect.objectContaining({ + suggestionsAbstraction: undefined, + }), + {} + ); + }); + }); + + it('calls the unifiedSearchBar correctly for NON security rule types', async () => { + render( + + ); + + await waitFor(() => { + expect(unifiedSearchBarMock).toHaveBeenCalledWith( + expect.objectContaining({ + suggestionsAbstraction: { type: 'alerts', fields: {} }, + }), + {} + ); + }); + }); + + it('calls the unifiedSearchBar with correct index patters', async () => { + render( + + ); + + await waitFor(() => { + expect(unifiedSearchBarMock).toHaveBeenCalledWith( + expect.objectContaining({ + indexPatterns: [ + { + fields: [ + { aggregatable: true, name: 'event.action', searchable: true, type: 'string' }, + ], + title: '.esQuery,apm.anomaly', + }, + ], + }), + {} + ); + }); + }); + + it('calls the unifiedSearchBar with correct index patters without rule types', async () => { + render( + + ); + + await waitFor(() => { + expect(unifiedSearchBarMock).toHaveBeenCalledWith( + expect.objectContaining({ + indexPatterns: [ + { + fields: [ + { aggregatable: true, name: 'event.action', searchable: true, type: 'string' }, + ], + title: '.alerts-*', + }, + ], + }), + {} + ); + }); + }); + + it('calls the unifiedSearchBar with correct index patters without data views', async () => { + jest.mocked(useAlertsDataView).mockReturnValue({ + isLoading: false, + dataView: undefined, + }); + + render( + + ); + + await waitFor(() => { + expect(unifiedSearchBarMock).toHaveBeenCalledWith( + expect.objectContaining({ + indexPatterns: [], + }), + {} + ); + }); + }); }); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_search_bar/alerts_search_bar.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_search_bar/alerts_search_bar.tsx index 5e2880e65231c..0a5c18fab9d8c 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_search_bar/alerts_search_bar.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_search_bar/alerts_search_bar.tsx @@ -9,7 +9,7 @@ import React, { useCallback, useMemo, useState } from 'react'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { compareFilters, Query, TimeRange } from '@kbn/es-query'; import { SuggestionsAbstraction } from '@kbn/unified-search-plugin/public/typeahead/suggestions_component'; -import { AlertConsumers, ValidFeatureId } from '@kbn/rule-data-utils'; +import { isSiemRuleType } from '@kbn/rule-data-utils'; import { EuiContextMenuPanelDescriptor, EuiContextMenuPanelItemDescriptor } from '@elastic/eui'; import { useAlertsDataView } from '@kbn/alerts-ui-shared/src/common/hooks/use_alerts_data_view'; import { isQuickFiltersGroup, QuickFiltersMenuItem } from './quick_filters'; @@ -17,19 +17,15 @@ import { NO_INDEX_PATTERNS } from './constants'; import { SEARCH_BAR_PLACEHOLDER } from './translations'; import { AlertsSearchBarProps, QueryLanguageType } from './types'; import { TriggersAndActionsUiServices } from '../../..'; -import { useRuleAADFields } from '../../hooks/use_rule_aad_fields'; -import { useLoadRuleTypesQuery } from '../../hooks/use_load_rule_types_query'; const SA_ALERTS = { type: 'alerts', fields: {} } as SuggestionsAbstraction; -const EMPTY_FEATURE_IDS: ValidFeatureId[] = []; // TODO Share buildEsQuery to be used between AlertsSearchBar and AlertsStateTable component https://github.com/elastic/kibana/issues/144615 // Also TODO: Replace all references to this component with the one from alerts-ui-shared export function AlertsSearchBar({ appName, disableQueryLanguageSwitcher = false, - featureIds = EMPTY_FEATURE_IDS, - ruleTypeId, + ruleTypeIds, query, filters, quickFilters = [], @@ -58,33 +54,25 @@ export function AlertsSearchBar({ const [queryLanguage, setQueryLanguage] = useState('kuery'); const { dataView } = useAlertsDataView({ - featureIds, + ruleTypeIds: ruleTypeIds ?? [], http, dataViewsService, toasts, }); - const { aadFields, loading: fieldsLoading } = useRuleAADFields(ruleTypeId); const indexPatterns = useMemo(() => { - if (ruleTypeId && aadFields?.length) { - return [{ title: ruleTypeId, fields: aadFields }]; + if (ruleTypeIds && dataView?.fields?.length) { + return [{ title: ruleTypeIds.join(','), fields: dataView.fields }]; } + if (dataView) { return [dataView]; } - return null; - }, [aadFields, dataView, ruleTypeId]); - const ruleType = useLoadRuleTypesQuery({ - filteredRuleTypes: ruleTypeId !== undefined ? [ruleTypeId] : [], - enabled: ruleTypeId !== undefined, - }); + return null; + }, [dataView, ruleTypeIds]); - const isSecurity = - (featureIds && featureIds.length === 1 && featureIds.includes(AlertConsumers.SIEM)) || - (ruleType && - ruleTypeId && - ruleType.ruleTypesState.data.get(ruleTypeId)?.producer === AlertConsumers.SIEM); + const isSecurity = ruleTypeIds?.some(isSiemRuleType) ?? false; const onSearchQuerySubmit = useCallback( ( @@ -174,7 +162,7 @@ export function AlertsSearchBar({ appName={appName} disableQueryLanguageSwitcher={disableQueryLanguageSwitcher} // @ts-expect-error - DataView fields prop and SearchBar indexPatterns props are overly broad - indexPatterns={!indexPatterns || fieldsLoading ? NO_INDEX_PATTERNS : indexPatterns} + indexPatterns={!indexPatterns ? NO_INDEX_PATTERNS : indexPatterns} placeholder={placeholder} query={{ query: query ?? '', language: queryLanguage }} filters={filters} diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_search_bar/constants.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_search_bar/constants.ts index 408d4d1714743..3539966400054 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_search_bar/constants.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_search_bar/constants.ts @@ -10,5 +10,6 @@ import { AlertConsumers } from '@kbn/rule-data-utils'; export const NO_INDEX_PATTERNS: DataView[] = []; export const ALERTS_SEARCH_BAR_PARAMS_URL_STORAGE_KEY = 'searchBarParams'; -export const ALL_FEATURE_IDS = Object.values(AlertConsumers); -export const NON_SIEM_FEATURE_IDS = ALL_FEATURE_IDS.filter((fid) => fid !== AlertConsumers.SIEM); +export const NON_SIEM_CONSUMERS = Object.values(AlertConsumers).filter( + (fid) => fid !== AlertConsumers.SIEM +); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_search_bar/types.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_search_bar/types.ts index b1af2746d6cac..a9538bd4888b1 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_search_bar/types.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_search_bar/types.ts @@ -6,7 +6,6 @@ */ import { Filter } from '@kbn/es-query'; -import { ValidFeatureId } from '@kbn/rule-data-utils'; import { SearchBarProps } from '@kbn/unified-search-plugin/public/search_bar/search_bar'; import { QuickFiltersMenuItem } from './quick_filters'; @@ -16,7 +15,6 @@ export interface AlertsSearchBarProps extends Omit, 'query' | 'onQueryChange' | 'onQuerySubmit'> { appName: string; disableQueryLanguageSwitcher?: boolean; - featureIds: ValidFeatureId[]; rangeFrom?: string; rangeTo?: string; query?: string; @@ -27,7 +25,7 @@ export interface AlertsSearchBarProps showSubmitButton?: boolean; placeholder?: string; submitOnBlur?: boolean; - ruleTypeId?: string; + ruleTypeIds?: string[]; onQueryChange?: (query: { dateRange: { from: string; to: string; mode?: 'absolute' | 'relative' }; query?: string; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_search_bar/url_synced_alerts_search_bar.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_search_bar/url_synced_alerts_search_bar.tsx index de89eb9715733..175d9538918e7 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_search_bar/url_synced_alerts_search_bar.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_search_bar/url_synced_alerts_search_bar.tsx @@ -5,20 +5,17 @@ * 2.0. */ -import React, { useCallback, useEffect, useMemo, useState } from 'react'; -import { BoolQuery } from '@kbn/es-query'; -import { AlertConsumers } from '@kbn/rule-data-utils'; +import React, { useCallback, useEffect, useState, useMemo } from 'react'; +import { BoolQuery, Filter } from '@kbn/es-query'; import { i18n } from '@kbn/i18n'; import { AlertFilterControls } from '@kbn/alerts-ui-shared/src/alert_filter_controls'; import { ControlGroupRenderer } from '@kbn/controls-plugin/public'; import { Storage } from '@kbn/kibana-utils-plugin/public'; -import { AlertsFeatureIdsFilter } from '../../lib/search_filters'; import { useKibana } from '../../..'; import { useAlertSearchBarStateContainer } from './use_alert_search_bar_state_container'; import { ALERTS_SEARCH_BAR_PARAMS_URL_STORAGE_KEY } from './constants'; import { AlertsSearchBarProps } from './types'; import AlertsSearchBar from './alerts_search_bar'; -import { nonNullable } from '../../../../common/utils'; import { buildEsQuery } from './build_es_query'; const INVALID_QUERY_STRING_TOAST_TITLE = i18n.translate( @@ -35,16 +32,17 @@ export interface UrlSyncedAlertsSearchBarProps > { showFilterControls?: boolean; onEsQueryChange: (esQuery: { bool: BoolQuery }) => void; - onActiveFeatureFiltersChange?: (value: AlertConsumers[]) => void; + onFilterSelected?: (filters: Filter[]) => void; } /** * An abstraction over AlertsSearchBar that syncs the query state with the url */ export const UrlSyncedAlertsSearchBar = ({ + ruleTypeIds, showFilterControls = false, onEsQueryChange, - onActiveFeatureFiltersChange, + onFilterSelected, ...rest }: UrlSyncedAlertsSearchBarProps) => { const { @@ -91,13 +89,6 @@ export const UrlSyncedAlertsSearchBar = ({ useEffect(() => { try { - onActiveFeatureFiltersChange?.([ - ...new Set( - filters - .flatMap((f) => (f as AlertsFeatureIdsFilter).meta.alertsFeatureIds) - .filter(nonNullable) - ), - ]); onEsQueryChange( buildEsQuery({ timeRange: { @@ -108,6 +99,8 @@ export const UrlSyncedAlertsSearchBar = ({ filters: [...filters, ...controlFilters], }) ); + + onFilterSelected?.(filters); } catch (error) { toasts.addError(error, { title: INVALID_QUERY_STRING_TOAST_TITLE, @@ -118,8 +111,8 @@ export const UrlSyncedAlertsSearchBar = ({ controlFilters, filters, kuery, - onActiveFeatureFiltersChange, onEsQueryChange, + onFilterSelected, onKueryChange, rangeFrom, rangeTo, @@ -154,6 +147,7 @@ export const UrlSyncedAlertsSearchBar = ({ savedQuery={savedQuery} onSavedQueryUpdated={setSavedQuery} onClearSavedQuery={clearSavedQuery} + ruleTypeIds={ruleTypeIds} {...rest} /> {showFilterControls && ( diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/alerts_table.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/alerts_table.tsx index 61c65eded27b5..cf7e184c50f31 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/alerts_table.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/alerts_table.tsx @@ -309,7 +309,7 @@ const AlertsTable: React.FunctionComponent = memo((props: Aler dynamicRowHeight, query, querySnapshot, - featureIds, + ruleTypeIds, cases: { data: cases, isLoading: isLoadingCases }, maintenanceWindows: { data: maintenanceWindows, isLoading: isLoadingMaintenanceWindows }, controls, @@ -345,7 +345,7 @@ const AlertsTable: React.FunctionComponent = memo((props: Aler query, useBulkActionsConfig: alertsTableConfiguration.useBulkActions, refresh: refetchAlerts, - featureIds, + ruleTypeIds, hideBulkActions: Boolean(alertsTableConfiguration.hideBulkActions), }; }, [ @@ -355,7 +355,7 @@ const AlertsTable: React.FunctionComponent = memo((props: Aler alertsTableConfiguration.hideBulkActions, query, refetchAlerts, - featureIds, + ruleTypeIds, ]); const { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/alerts_table_state.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/alerts_table_state.test.tsx index 13b9433ce4b9e..9db58d26d9251 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/alerts_table_state.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/alerts_table_state.test.tsx @@ -9,12 +9,7 @@ import { BehaviorSubject } from 'rxjs'; import userEvent from '@testing-library/user-event'; import { get } from 'lodash'; import { fireEvent, render, waitFor, screen, act } from '@testing-library/react'; -import { - AlertConsumers, - ALERT_CASE_IDS, - ALERT_MAINTENANCE_WINDOW_IDS, - ALERT_UUID, -} from '@kbn/rule-data-utils'; +import { ALERT_CASE_IDS, ALERT_MAINTENANCE_WINDOW_IDS, ALERT_UUID } from '@kbn/rule-data-utils'; import { Storage } from '@kbn/kibana-utils-plugin/public'; import { @@ -344,7 +339,7 @@ const browserFields: BrowserFields = { }, }; -jest.mocked(fetchAlertsFields).mockResolvedValue({ browserFields, fields: [] }); +const fetchAlertsFieldsMock = fetchAlertsFields as jest.Mock; const queryClient = new QueryClient({ defaultOptions: { @@ -367,7 +362,7 @@ describe('AlertsTableState', () => { alertsTableConfigurationRegistry: alertsTableConfigurationRegistryMock, configurationId: PLUGIN_ID, id: PLUGIN_ID, - featureIds: [AlertConsumers.LOGS], + ruleTypeIds: ['logs'], query: {}, columns, pagination: { @@ -419,6 +414,8 @@ describe('AlertsTableState', () => { data: maintenanceWindowsMap, isFetching: false, }); + + fetchAlertsFieldsMock.mockResolvedValue({ browserFields, fields: [] }); }); describe('Cases', () => { @@ -837,6 +834,8 @@ describe('AlertsTableState', () => { data: new Map(), isFetching: false, }); + + fetchAlertsFieldsMock.mockResolvedValue({ browserFields, fields: [] }); }); it('should show field browser', async () => { @@ -845,13 +844,13 @@ describe('AlertsTableState', () => { }); it('should remove an already existing element when selected', async () => { - const { getByTestId, queryByTestId } = render(); + const { findByTestId, queryByTestId } = render(); expect(queryByTestId(`dataGridHeaderCell-${AlertsField.name}`)).not.toBe(null); - fireEvent.click(getByTestId('show-field-browser')); - const fieldCheckbox = getByTestId(`field-${AlertsField.name}-checkbox`); + fireEvent.click(await findByTestId('show-field-browser')); + const fieldCheckbox = await findByTestId(`field-${AlertsField.name}-checkbox`); fireEvent.click(fieldCheckbox); - fireEvent.click(getByTestId('close')); + fireEvent.click(await findByTestId('close')); await waitFor(() => { expect(queryByTestId(`dataGridHeaderCell-${AlertsField.name}`)).toBe(null); @@ -877,13 +876,15 @@ describe('AlertsTableState', () => { set: jest.fn(), })); - const { getByTestId, queryByTestId } = render(); + const { getByTestId, findByTestId, queryByTestId } = render( + + ); expect(queryByTestId(`dataGridHeaderCell-${AlertsField.name}`)).toBe(null); - fireEvent.click(getByTestId('show-field-browser')); - const fieldCheckbox = getByTestId(`field-${AlertsField.name}-checkbox`); + fireEvent.click(await findByTestId('show-field-browser')); + const fieldCheckbox = await findByTestId(`field-${AlertsField.name}-checkbox`); fireEvent.click(fieldCheckbox); - fireEvent.click(getByTestId('close')); + fireEvent.click(await findByTestId('close')); await waitFor(() => { expect(queryByTestId(`dataGridHeaderCell-${AlertsField.name}`)).not.toBe(null); @@ -896,13 +897,13 @@ describe('AlertsTableState', () => { }); it('should insert a new field as column when its not a default one', async () => { - const { getByTestId, queryByTestId } = render(); + const { findByTestId, queryByTestId } = render(); expect(queryByTestId(`dataGridHeaderCell-${AlertsField.uuid}`)).toBe(null); - fireEvent.click(getByTestId('show-field-browser')); - const fieldCheckbox = getByTestId(`field-${AlertsField.uuid}-checkbox`); + fireEvent.click(await findByTestId('show-field-browser')); + const fieldCheckbox = await findByTestId(`field-${AlertsField.uuid}-checkbox`); fireEvent.click(fieldCheckbox); - fireEvent.click(getByTestId('close')); + fireEvent.click(await findByTestId('close')); await waitFor(() => { expect(queryByTestId(`dataGridHeaderCell-${AlertsField.uuid}`)).not.toBe(null); @@ -958,6 +959,16 @@ describe('AlertsTableState', () => { expect(result.getByTestId('alertsStateTableEmptyState')).toBeTruthy(); }); + it('should render an empty screen when the data are undefined', async () => { + mockUseSearchAlertsQuery.mockReturnValue({ + data: undefined, + refetch: refetchMock, + }); + + const result = render(); + expect(result.getByTestId('alertsStateTableEmptyState')).toBeTruthy(); + }); + describe('inspect button', () => { it('should hide the inspect button by default', () => { render(); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/alerts_table_state.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/alerts_table_state.tsx index 62c78a3ad589c..93bb4f18dfe9a 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/alerts_table_state.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/alerts_table_state.tsx @@ -21,7 +21,6 @@ import { } from '@elastic/eui'; import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { ALERT_CASE_IDS, ALERT_MAINTENANCE_WINDOW_IDS } from '@kbn/rule-data-utils'; -import type { ValidFeatureId } from '@kbn/rule-data-utils'; import type { RuleRegistrySearchRequestPagination } from '@kbn/rule-registry-plugin/common'; import type { BrowserFields } from '@kbn/alerting-types'; import { Storage } from '@kbn/kibana-utils-plugin/public'; @@ -68,7 +67,8 @@ export type AlertsTableStateProps = { alertsTableConfigurationRegistry: AlertsTableConfigurationRegistryContract; configurationId: string; id: string; - featureIds: ValidFeatureId[]; + ruleTypeIds: string[]; + consumers?: string[]; query: Pick; initialPageSize?: number; browserFields?: BrowserFields; @@ -192,7 +192,8 @@ const AlertsTableStateWithQueryProvider = memo( alertsTableConfigurationRegistry, configurationId, id, - featureIds, + ruleTypeIds, + consumers, query, initialPageSize = DEFAULT_ALERTS_PAGE_SIZE, leadingControlColumns = DEFAULT_LEADING_CONTROL_COLUMNS, @@ -292,7 +293,7 @@ const AlertsTableStateWithQueryProvider = memo( onColumnResize, fields, } = useColumns({ - featureIds, + ruleTypeIds, storageAlertsTable, storage, id, @@ -301,7 +302,8 @@ const AlertsTableStateWithQueryProvider = memo( }); const [queryParams, setQueryParams] = useState({ - featureIds, + ruleTypeIds, + consumers, fields, query, sort, @@ -312,14 +314,16 @@ const AlertsTableStateWithQueryProvider = memo( useEffect(() => { setQueryParams(({ pageIndex: oldPageIndex, pageSize: oldPageSize, ...prevQueryParams }) => ({ - featureIds, + ruleTypeIds, + consumers, fields, query, sort, runtimeMappings, // Go back to the first page if the query changes pageIndex: !deepEqual(prevQueryParams, { - featureIds, + ruleTypeIds, + consumers, fields, query, sort, @@ -329,7 +333,7 @@ const AlertsTableStateWithQueryProvider = memo( : oldPageIndex, pageSize: oldPageSize, })); - }, [featureIds, fields, query, runtimeMappings, sort]); + }, [ruleTypeIds, fields, query, runtimeMappings, sort, consumers]); const { data: alertsData, @@ -363,11 +367,11 @@ const AlertsTableStateWithQueryProvider = memo( } }, [alerts, isLoading, isSuccess, onLoaded]); - const mutedAlertIds = useMemo(() => { + const mutedRuleIds = useMemo(() => { return [...new Set(alerts.map((a) => a['kibana.alert.rule.uuid']![0]))]; }, [alerts]); - const { data: mutedAlerts } = useGetMutedAlerts(mutedAlertIds); + const { data: mutedAlerts } = useGetMutedAlerts(mutedRuleIds); const overriddenActions = useMemo(() => { return { toggleColumn: onToggleColumn }; }, [onToggleColumn]); @@ -501,7 +505,7 @@ const AlertsTableStateWithQueryProvider = memo( toolbarVisibility, shouldHighlightRow, dynamicRowHeight, - featureIds, + ruleTypeIds, querySnapshot, pageIndex: queryParams.pageIndex, pageSize: queryParams.pageSize, @@ -541,7 +545,7 @@ const AlertsTableStateWithQueryProvider = memo( toolbarVisibility, shouldHighlightRow, dynamicRowHeight, - featureIds, + ruleTypeIds, querySnapshot, queryParams.pageIndex, queryParams.pageSize, @@ -579,7 +583,7 @@ const AlertsTableStateWithQueryProvider = memo( return ( - {!isLoading && alertsCount === 0 && ( + {!isLoading && alertsCount <= 0 && ( field === ALERT_RULE_PRODUCER)?.value?.[0]; - const consumer: AlertConsumers = observabilityFeatureIds.includes(producer) + const consumer: AlertsTableSupportedConsumers = observabilityFeatureIds.includes(producer) ? 'observability' : producer && (value === 'alerts' || value === 'stackAlerts' || value === 'discover') ? producer diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/constants.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/constants.ts index 9605abb085232..54846574c1a10 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/constants.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/constants.ts @@ -19,6 +19,7 @@ import { STACK_MONITORING_DISPLAY_NAME, UPTIME_DISPLAY_NAME, } from '../translations'; +import { AlertsTableSupportedConsumers } from './types'; interface AlertProducerData { displayName: string; @@ -33,13 +34,18 @@ export const observabilityFeatureIds: AlertConsumers[] = [ AlertConsumers.LOGS, AlertConsumers.SLO, AlertConsumers.UPTIME, + AlertConsumers.ALERTS, ]; -export const stackFeatureIds: AlertConsumers[] = [AlertConsumers.STACK_ALERTS, AlertConsumers.ML]; +export const stackFeatureIds: AlertConsumers[] = [ + AlertConsumers.STACK_ALERTS, + AlertConsumers.ML, + AlertConsumers.DISCOVER, +]; export const [_, ...observabilityApps] = observabilityFeatureIds; -export const alertProducersData: Record = { +export const alertProducersData: Record = { [AlertConsumers.OBSERVABILITY]: { displayName: OBSERVABILITY_DISPLAY_NAME, icon: 'logoObservability', @@ -86,4 +92,9 @@ export const alertProducersData: Record = { displayName: 'Example', icon: 'beaker', }, + [AlertConsumers.DISCOVER]: { + displayName: STACK_DISPLAY_NAME, + icon: 'managementApp', + subFeatureIds: stackFeatureIds, + }, }; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/alert_mute/use_get_muted_alerts.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/alert_mute/use_get_muted_alerts.test.tsx index 2718ccd8ca88e..ae75e5472f229 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/alert_mute/use_get_muted_alerts.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/alert_mute/use_get_muted_alerts.test.tsx @@ -37,7 +37,7 @@ describe('useGetMutedAlerts', () => { await waitFor(() => { expect(muteAlertInstanceSpy).toHaveBeenCalledWith( expect.anything(), - { ids: ruleIds }, + { ruleIds }, expect.any(AbortSignal) ); }); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/alert_mute/use_get_muted_alerts.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/alert_mute/use_get_muted_alerts.tsx index 08f172451ca23..1ca6cbb22ea97 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/alert_mute/use_get_muted_alerts.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/alert_mute/use_get_muted_alerts.tsx @@ -25,7 +25,7 @@ export const useGetMutedAlerts = (ruleIds: string[], enabled = true) => { return useQuery( triggersActionsUiQueriesKeys.mutedAlerts(), ({ signal }) => - getMutedAlerts(http, { ids: ruleIds }, signal).then(({ data: rules }) => + getMutedAlerts(http, { ruleIds }, signal).then(({ data: rules }) => rules?.reduce((mutedAlerts, rule) => { mutedAlerts[rule.id] = rule.muted_alert_ids; return mutedAlerts; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/apis/get_rules_muted_alerts.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/apis/get_rules_muted_alerts.test.ts new file mode 100644 index 0000000000000..d0f1a39f7cede --- /dev/null +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/apis/get_rules_muted_alerts.test.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 { httpServiceMock } from '@kbn/core/public/mocks'; +import { getMutedAlerts } from './get_rules_muted_alerts'; + +const http = httpServiceMock.createStartContract(); + +describe('getMutedAlerts', () => { + const apiRes = { + page: 1, + per_page: 10, + total: 0, + data: [], + }; + + beforeEach(() => { + jest.clearAllMocks(); + + http.post.mockResolvedValueOnce(apiRes); + }); + + test('should call find API with correct params', async () => { + const result = await getMutedAlerts(http, { ruleIds: ['foo'] }); + + expect(result).toEqual({ + page: 1, + per_page: 10, + total: 0, + data: [], + }); + + expect(http.post.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "/internal/alerting/rules/_find", + Object { + "body": "{\\"rule_type_ids\\":[\\"foo\\"],\\"fields\\":[\\"id\\",\\"mutedInstanceIds\\"],\\"page\\":1,\\"per_page\\":1}", + "signal": undefined, + }, + ] + `); + }); +}); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/apis/get_rules_muted_alerts.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/apis/get_rules_muted_alerts.ts index 5a2f2fcc21c6b..d9baef548dafc 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/apis/get_rules_muted_alerts.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/apis/get_rules_muted_alerts.ts @@ -6,7 +6,6 @@ */ import { HttpStart } from '@kbn/core-http-browser'; -import { nodeBuilder } from '@kbn/es-query'; const INTERNAL_FIND_RULES_URL = '/internal/alerting/rules/_find'; @@ -21,18 +20,15 @@ export interface FindRulesResponse { export const getMutedAlerts = async ( http: HttpStart, - params: { ids: string[] }, + params: { ruleIds: string[] }, signal?: AbortSignal ) => { - const filterNode = nodeBuilder.or( - params.ids.map((id) => nodeBuilder.is('alert.id', `alert:${id}`)) - ); return http.post(INTERNAL_FIND_RULES_URL, { body: JSON.stringify({ - filter: JSON.stringify(filterNode), + rule_type_ids: params.ruleIds, fields: ['id', 'mutedInstanceIds'], page: 1, - per_page: params.ids.length, + per_page: params.ruleIds.length, }), signal, }); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_actions.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_actions.test.tsx index 0f136e15156d7..554febab20210 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_actions.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_actions.test.tsx @@ -392,7 +392,13 @@ describe('bulk action hooks', () => { it('appends only the case bulk actions for SIEM', async () => { const { result } = renderHook( () => - useBulkActions({ alertsCount: 0, query: {}, casesConfig, refresh, featureIds: ['siem'] }), + useBulkActions({ + alertsCount: 0, + query: {}, + casesConfig, + refresh, + ruleTypeIds: ['siem.esqlRule'], + }), { wrapper: appMockRender.AppWrapper, } @@ -476,7 +482,7 @@ describe('bulk action hooks', () => { query: {}, casesConfig, refresh, - featureIds: ['observability'], + ruleTypeIds: ['observability'], }), { wrapper: appMockRender.AppWrapper, @@ -492,7 +498,7 @@ describe('bulk action hooks', () => { query: {}, casesConfig, refresh, - featureIds: ['observability'], + ruleTypeIds: ['observability'], hideBulkActions: true, }), { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_actions.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_actions.ts index 727ff4f93ebd8..1f35d02f8d72f 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_actions.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_actions.ts @@ -7,7 +7,7 @@ import { useCallback, useContext, useEffect, useMemo } from 'react'; import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { ALERT_CASE_IDS, ValidFeatureId } from '@kbn/rule-data-utils'; +import { ALERT_CASE_IDS, isSiemRuleType } from '@kbn/rule-data-utils'; import { AlertsTableContext } from '../contexts/alerts_table_context'; import { AlertsTableConfigurationRegistry, @@ -40,7 +40,7 @@ interface BulkActionsProps { casesConfig?: AlertsTableConfigurationRegistry['cases']; useBulkActionsConfig?: UseBulkActionsRegistry; refresh: () => void; - featureIds?: ValidFeatureId[]; + ruleTypeIds?: string[]; hideBulkActions?: boolean; } @@ -57,7 +57,7 @@ export interface UseBulkActions { type UseBulkAddToCaseActionsProps = Pick & Pick; -type UseBulkUntrackActionsProps = Pick & +type UseBulkUntrackActionsProps = Pick & Pick & { isAllSelected: boolean; }; @@ -191,7 +191,7 @@ export const useBulkUntrackActions = ({ refresh, clearSelection, query, - featureIds = [], + ruleTypeIds = [], isAllSelected, }: UseBulkUntrackActionsProps) => { const onSuccess = useCallback(() => { @@ -217,7 +217,7 @@ export const useBulkUntrackActions = ({ try { setIsBulkActionsLoading(true); if (isAllSelected) { - await untrackAlertsByQuery({ query, featureIds }); + await untrackAlertsByQuery({ query, ruleTypeIds }); } else { await untrackAlerts({ indices, alertUuids }); } @@ -228,7 +228,7 @@ export const useBulkUntrackActions = ({ }, [ query, - featureIds, + ruleTypeIds, isAllSelected, onSuccess, setIsBulkActionsLoading, @@ -277,7 +277,7 @@ export function useBulkActions({ query, refresh, useBulkActionsConfig = () => [], - featureIds, + ruleTypeIds, hideBulkActions, }: BulkActionsProps): UseBulkActions { const { @@ -300,13 +300,14 @@ export function useBulkActions({ refresh, clearSelection, query, - featureIds, + ruleTypeIds, isAllSelected: bulkActionsState.isAllSelected, }); const initialItems = useMemo(() => { - return [...caseBulkActions, ...(featureIds?.includes('siem') ? [] : untrackBulkActions)]; - }, [caseBulkActions, featureIds, untrackBulkActions]); + return [...caseBulkActions, ...(ruleTypeIds?.some(isSiemRuleType) ? [] : untrackBulkActions)]; + }, [caseBulkActions, ruleTypeIds, untrackBulkActions]); + const bulkActions = useMemo(() => { if (hideBulkActions) { return []; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_untrack_alerts_by_query.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_untrack_alerts_by_query.test.ts new file mode 100644 index 0000000000000..5de16dd70ce52 --- /dev/null +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_untrack_alerts_by_query.test.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 { act, renderHook } from '@testing-library/react-hooks'; +import { AppMockRenderer, createAppMockRenderer } from '../../test_utils'; +import { AlertsQueryContext } from '@kbn/alerts-ui-shared/src/common/contexts/alerts_query_context'; +import { useBulkUntrackAlertsByQuery } from './use_bulk_untrack_alerts_by_query'; +import { createStartServicesMock } from '../../../../common/lib/kibana/kibana_react.mock'; +import { TriggersAndActionsUiServices } from '../../../..'; + +const mockUseKibanaReturnValue: TriggersAndActionsUiServices = createStartServicesMock(); + +jest.mock('../../../../common/lib/kibana', () => ({ + useKibana: jest.fn(() => ({ + services: mockUseKibanaReturnValue, + })), +})); + +const response = {}; + +describe('useBulkUntrackAlertsByQuery', () => { + const httpMock = mockUseKibanaReturnValue.http.post as jest.Mock; + + let appMockRender: AppMockRenderer; + + beforeEach(() => { + jest.clearAllMocks(); + appMockRender = createAppMockRenderer(AlertsQueryContext); + }); + + it('calls the api when invoked with the correct parameters', async () => { + httpMock.mockResolvedValue(response); + + const { result, waitFor } = renderHook(() => useBulkUntrackAlertsByQuery(), { + wrapper: appMockRender.AppWrapper, + }); + + await act(async () => { + // @ts-expect-error: no need to specify a query + await result.current.mutateAsync({ ruleTypeIds: ['foo'], query: [] }); + }); + + await waitFor(() => { + expect(httpMock).toHaveBeenCalledWith('/internal/alerting/alerts/_bulk_untrack_by_query', { + body: '{"query":[],"rule_type_ids":["foo"]}', + }); + }); + }); +}); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_untrack_alerts_by_query.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_untrack_alerts_by_query.tsx index 321d861e03615..88c878aa47a66 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_untrack_alerts_by_query.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_untrack_alerts_by_query.tsx @@ -9,7 +9,6 @@ import { i18n } from '@kbn/i18n'; import { useMutation } from '@tanstack/react-query'; import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { INTERNAL_BASE_ALERTING_API_PATH } from '@kbn/alerting-plugin/common'; -import { ValidFeatureId } from '@kbn/rule-data-utils'; import { AlertsQueryContext } from '@kbn/alerts-ui-shared/src/common/contexts/alerts_query_context'; import { useKibana } from '../../../../common'; @@ -22,14 +21,14 @@ export const useBulkUntrackAlertsByQuery = () => { const untrackAlertsByQuery = useMutation< string, string, - { query: Pick; featureIds: ValidFeatureId[] } + { query: Pick; ruleTypeIds: string[] } >( ['untrackAlerts'], - ({ query, featureIds }) => { + ({ query, ruleTypeIds }) => { try { const body = JSON.stringify({ query: Array.isArray(query) ? query : [query], - feature_ids: featureIds, + rule_type_ids: ruleTypeIds, }); return http.post(`${INTERNAL_BASE_ALERTING_API_PATH}/alerts/_bulk_untrack_by_query`, { body, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_columns/use_columns.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_columns/use_columns.test.tsx index d6ecf3d9ab20d..3b742bbd6d620 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_columns/use_columns.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_columns/use_columns.test.tsx @@ -7,7 +7,6 @@ import React, { FunctionComponent } from 'react'; import { EuiDataGridColumn } from '@elastic/eui'; -import { AlertConsumers } from '@kbn/rule-data-utils'; import { Storage } from '@kbn/kibana-utils-plugin/public'; import { act, waitFor, renderHook } from '@testing-library/react'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; @@ -76,7 +75,7 @@ mockFetchAlertsFields.mockResolvedValue({ browserFields, fields: [] }); describe('useColumns', () => { const id = 'useColumnTest'; - const featureIds: AlertConsumers[] = [AlertConsumers.LOGS, AlertConsumers.APM]; + const ruleTypeIds: string[] = ['apm', 'logs']; let storage = { current: new Storage(mockStorage) }; const getStorageAlertsTableByDefaultColumns = (defaultColumns: EuiDataGridColumn[]) => { @@ -155,7 +154,7 @@ describe('useColumns', () => { () => useColumns({ defaultColumns, - featureIds, + ruleTypeIds, id, storageAlertsTable: localStorageAlertsTable, storage, @@ -187,7 +186,7 @@ describe('useColumns', () => { () => useColumns({ defaultColumns, - featureIds, + ruleTypeIds, id, storageAlertsTable: localStorageAlertsTable, storage, @@ -213,7 +212,7 @@ describe('useColumns', () => { useColumns({ alertsFields, defaultColumns, - featureIds, + ruleTypeIds, id, storageAlertsTable: localStorageAlertsTable, storage, @@ -232,7 +231,7 @@ describe('useColumns', () => { () => useColumns({ defaultColumns, - featureIds, + ruleTypeIds, id, storageAlertsTable: localStorageAlertsTable, storage, @@ -254,7 +253,7 @@ describe('useColumns', () => { () => useColumns({ defaultColumns, - featureIds, + ruleTypeIds, id, storageAlertsTable: localStorageAlertsTable, storage, @@ -283,7 +282,7 @@ describe('useColumns', () => { () => useColumns({ defaultColumns, - featureIds, + ruleTypeIds, id, storageAlertsTable: localStorageAlertsTable, storage, @@ -301,7 +300,7 @@ describe('useColumns', () => { () => useColumns({ defaultColumns: localDefaultColumns, - featureIds, + ruleTypeIds, id, storageAlertsTable: localStorageAlertsTable, storage, @@ -338,7 +337,7 @@ describe('useColumns', () => { () => useColumns({ defaultColumns, - featureIds, + ruleTypeIds, id, storageAlertsTable: localStorageAlertsTable, storage, @@ -357,7 +356,7 @@ describe('useColumns', () => { () => useColumns({ defaultColumns, - featureIds, + ruleTypeIds, id, storageAlertsTable: localStorageAlertsTable, storage, @@ -378,7 +377,7 @@ describe('useColumns', () => { () => useColumns({ defaultColumns, - featureIds, + ruleTypeIds, id, storageAlertsTable: localStorageAlertsTable, storage, @@ -407,7 +406,7 @@ describe('useColumns', () => { () => useColumns({ defaultColumns, - featureIds, + ruleTypeIds, id, storageAlertsTable: localStorageAlertsTable, storage, @@ -440,7 +439,7 @@ describe('useColumns', () => { () => useColumns({ defaultColumns, - featureIds, + ruleTypeIds, id, storageAlertsTable: localStorageAlertsTable, storage, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_columns/use_columns.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_columns/use_columns.ts index 30c9ff0ea69ed..3af1d37f10de8 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_columns/use_columns.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_columns/use_columns.ts @@ -9,7 +9,6 @@ import { EuiDataGridColumn, EuiDataGridOnColumnResizeData } from '@elastic/eui'; import { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; import { BrowserField, BrowserFields } from '@kbn/alerting-types'; import { MutableRefObject, useCallback, useEffect, useMemo, useRef, useState } from 'react'; -import { AlertConsumers } from '@kbn/rule-data-utils'; import { isEmpty } from 'lodash'; import { useFetchAlertsFieldsQuery } from '@kbn/alerts-ui-shared/src/common/hooks/use_fetch_alerts_fields_query'; import { AlertsQueryContext } from '@kbn/alerts-ui-shared/src/common/contexts/alerts_query_context'; @@ -18,7 +17,7 @@ import { toggleColumn } from './toggle_column'; import { useKibana } from '../../../../../common'; export interface UseColumnsArgs { - featureIds: AlertConsumers[]; + ruleTypeIds: string[]; storageAlertsTable: React.MutableRefObject; storage: React.MutableRefObject; id: string; @@ -155,7 +154,7 @@ const persist = ({ }; export const useColumns = ({ - featureIds, + ruleTypeIds, storageAlertsTable, storage, id, @@ -167,7 +166,7 @@ export const useColumns = ({ const fieldsQuery = useFetchAlertsFieldsQuery( { http, - featureIds, + ruleTypeIds, }, { enabled: !alertsFields, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/types.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/types.ts index 819cc42bd90e6..46b349ae9bcce 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/types.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/types.ts @@ -20,6 +20,8 @@ export interface Consumer { name: string; } +export type AlertsTableSupportedConsumers = Exclude; + export type ServerError = IHttpFetchError; export interface CellComponentProps { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/common/components/with_bulk_rule_api_operations.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/common/components/with_bulk_rule_api_operations.test.tsx index 17f9fe336609e..d1ef176d111a5 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/common/components/with_bulk_rule_api_operations.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/common/components/with_bulk_rule_api_operations.test.tsx @@ -40,7 +40,7 @@ jest.mock('../../../lib/rule_api/bulk_disable', () => ({ jest.mock('../../../lib/rule_api/get_rule', () => ({ loadRule: jest.fn(), })); -jest.mock('@kbn/alerts-ui-shared/src/common/apis/resolve_rule', () => ({ +jest.mock('@kbn/response-ops-rule-form/src/common/apis/resolve_rule', () => ({ resolveRule: jest.fn(), })); jest.mock('../../../lib/rule_api/rule_types', () => ({ @@ -59,7 +59,9 @@ const { bulkDeleteRules } = jest.requireMock('../../../lib/rule_api/bulk_delete' const { bulkEnableRules } = jest.requireMock('../../../lib/rule_api/bulk_enable'); const { bulkDisableRules } = jest.requireMock('../../../lib/rule_api/bulk_disable'); const { loadRule } = jest.requireMock('../../../lib/rule_api/get_rule'); -const { resolveRule } = jest.requireMock('@kbn/alerts-ui-shared/src/common/apis/resolve_rule'); +const { resolveRule } = jest.requireMock( + '@kbn/response-ops-rule-form/src/common/apis/resolve_rule' +); const { loadRuleTypes } = jest.requireMock('../../../lib/rule_api/rule_types'); const { loadActionErrorLog } = jest.requireMock('../../../lib/rule_api/load_action_error_log'); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/common/components/with_bulk_rule_api_operations.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/common/components/with_bulk_rule_api_operations.tsx index 60ceeaf24d516..a2c21c1222815 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/common/components/with_bulk_rule_api_operations.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/common/components/with_bulk_rule_api_operations.tsx @@ -14,7 +14,7 @@ import { } from '@kbn/alerting-plugin/common'; import { AlertingFrameworkHealth } from '@kbn/alerting-types'; import { fetchAlertingFrameworkHealth as alertingFrameworkHealth } from '@kbn/alerts-ui-shared/src/common/apis/fetch_alerting_framework_health'; -import { resolveRule } from '@kbn/alerts-ui-shared/src/common/apis/resolve_rule'; +import { resolveRule } from '@kbn/response-ops-rule-form'; import { Rule, RuleType, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule.test.tsx index 23e6f978f4c05..d64c018a07f3e 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule.test.tsx @@ -602,6 +602,7 @@ function mockRuleType(overloads: Partial = {}): RuleType { producer: 'rules', minimumLicenseRequired: 'basic', enabledInLicense: true, + category: 'my-category', ...overloads, }; } diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule.tsx index 34f5a8e65436a..593e0a989b5f3 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule.tsx @@ -8,8 +8,8 @@ import React, { lazy, useCallback, useMemo } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiSpacer, EuiFlexGroup, EuiFlexItem, EuiTabbedContent } from '@elastic/eui'; -import { AlertStatusValues, ALERTING_FEATURE_ID } from '@kbn/alerting-plugin/common'; -import { ALERT_RULE_UUID, AlertConsumers } from '@kbn/rule-data-utils'; +import { AlertStatusValues } from '@kbn/alerting-plugin/common'; +import { ALERT_RULE_UUID } from '@kbn/rule-data-utils'; import { ALERT_TABLE_GENERIC_CONFIG_ID } from '../../../constants'; import { AlertTableConfigRegistry } from '../../../alert_table_config_registry'; import { useKibana } from '../../../../common/lib/kibana'; @@ -106,11 +106,7 @@ export function RuleComponent({ alertsTableConfigurationRegistry={ alertsTableConfigurationRegistry as AlertTableConfigRegistry } - featureIds={ - (rule.consumer === ALERTING_FEATURE_ID - ? [ruleType.producer] - : [rule.consumer]) as AlertConsumers[] - } + ruleTypeIds={[ruleType.id]} query={{ bool: { filter: { term: { [ALERT_RULE_UUID]: rule.id } } } }} showAlertStatusWithFlapping lastReloadRequestTime={lastReloadRequestTime} @@ -131,11 +127,10 @@ export function RuleComponent({ lastReloadRequestTime, onMuteAction, readOnly, - rule.consumer, rule.id, ruleType.hasAlertsMappings, ruleType.hasFieldsForAAD, - ruleType.producer, + ruleType.id, ]); const tabs = [ diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details.test.tsx index ffde171117385..0f3c17ca28f81 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details.test.tsx @@ -27,7 +27,7 @@ jest.mock('../../../../common/get_experimental_features', () => ({ getIsExperimentalFeatureEnabled: jest.fn().mockReturnValue(true), })); -jest.mock('@kbn/alerts-ui-shared/src/common/apis/fetch_ui_config', () => ({ +jest.mock('@kbn/response-ops-rule-form/src/common/apis/fetch_ui_config', () => ({ fetchUiConfig: jest .fn() .mockResolvedValue({ minimumScheduleInterval: { value: '1m', enforce: false } }), @@ -88,6 +88,7 @@ const ruleType: RuleType = { producer: ALERTING_FEATURE_ID, authorizedConsumers, enabledInLicense: true, + category: 'my-category', }; describe('rule_details', () => { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details.tsx index 9422abdba3ec0..da1bd753af9b2 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details.tsx @@ -27,7 +27,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { toMountPoint } from '@kbn/react-kibana-mount'; import { RuleExecutionStatusErrorReasons, parseDuration } from '@kbn/alerting-plugin/common'; import { getEditRuleRoute, getRuleDetailsRoute } from '@kbn/rule-data-utils'; -import { fetchUiConfig as triggersActionsUiConfig } from '@kbn/alerts-ui-shared/src/common/apis/fetch_ui_config'; +import { fetchUiConfig as triggersActionsUiConfig } from '@kbn/response-ops-rule-form'; import { UpdateApiKeyModalConfirmation } from '../../../components/update_api_key_modal_confirmation'; import { bulkUpdateAPIKey } from '../../../lib/rule_api/update_api_key'; import { RulesDeleteModalConfirmation } from '../../../components/rules_delete_modal_confirmation'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details_route.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details_route.test.tsx index 813456b793ab3..eeee910c3b631 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details_route.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details_route.test.tsx @@ -19,7 +19,7 @@ import { spacesPluginMock } from '@kbn/spaces-plugin/public/mocks'; import { useKibana } from '../../../../common/lib/kibana'; jest.mock('../../../../common/lib/kibana'); -jest.mock('@kbn/alerts-ui-shared/src/common/apis/fetch_ui_config', () => ({ +jest.mock('@kbn/response-ops-rule-form/src/common/apis/fetch_ui_config', () => ({ fetchUiConfig: jest .fn() .mockResolvedValue({ minimumScheduleInterval: { value: '1m', enforce: false } }), diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_route.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_route.test.tsx index 7e660a30f7ec9..b8357c68da20e 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_route.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_route.test.tsx @@ -146,6 +146,7 @@ function mockRuleType(overloads: Partial = {}): RuleType { producer: 'rules', minimumLicenseRequired: 'basic', enabledInLicense: true, + category: 'my-category', ...overloads, }; } diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/test_helpers.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/test_helpers.ts index 01ea94fdea8df..3da317d4e2be1 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/test_helpers.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/test_helpers.ts @@ -79,6 +79,7 @@ export function mockRuleType(overloads: Partial = {}): RuleType { producer: 'rules', minimumLicenseRequired: 'basic', enabledInLicense: true, + category: 'my-category', ...overloads, }; } diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_add.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_add.test.tsx index c7b2876d83d84..a8e8e9df322d5 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_add.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_add.test.tsx @@ -13,7 +13,7 @@ import { render, screen, within } from '@testing-library/react'; import { EuiFormLabel } from '@elastic/eui'; import { coreMock } from '@kbn/core/public/mocks'; import RuleAdd from './rule_add'; -import { createRule } from '@kbn/alerts-ui-shared/src/common/apis/create_rule'; +import { createRule } from '@kbn/response-ops-rule-form/src/common/apis/create_rule'; import { fetchAlertingFrameworkHealth as fetchAlertingFrameworkHealth } from '@kbn/alerts-ui-shared/src/common/apis/fetch_alerting_framework_health'; import { actionTypeRegistryMock } from '../../action_type_registry.mock'; @@ -32,7 +32,7 @@ import { ruleTypeRegistryMock } from '../../rule_type_registry.mock'; import { ALERTING_FEATURE_ID } from '@kbn/alerting-plugin/common'; import { useKibana } from '../../../common/lib/kibana'; -import { fetchUiConfig } from '@kbn/alerts-ui-shared/src/common/apis/fetch_ui_config'; +import { fetchUiConfig } from '@kbn/response-ops-rule-form/src/common/apis/fetch_ui_config'; import { fetchUiHealthStatus } from '@kbn/alerts-ui-shared/src/common/apis/fetch_ui_health_status'; import { loadActionTypes, loadAllActions } from '../../lib/action_connector_api'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; @@ -44,7 +44,7 @@ jest.mock('../../../common/lib/kibana'); jest.mock('../../lib/rule_api/rule_types', () => ({ loadRuleTypes: jest.fn(), })); -jest.mock('@kbn/alerts-ui-shared/src/common/apis/create_rule', () => ({ +jest.mock('@kbn/response-ops-rule-form/src/common/apis/create_rule', () => ({ createRule: jest.fn(), })); jest.mock('@kbn/alerts-ui-shared/src/common/apis/fetch_alerting_framework_health', () => ({ @@ -54,7 +54,7 @@ jest.mock('@kbn/alerts-ui-shared/src/common/apis/fetch_alerting_framework_health })), })); -jest.mock('@kbn/alerts-ui-shared/src/common/apis/fetch_ui_config', () => ({ +jest.mock('@kbn/response-ops-rule-form/src/common/apis/fetch_ui_config', () => ({ fetchUiConfig: jest.fn(), })); @@ -450,6 +450,7 @@ describe('rule_add', () => { }, ], enabledInLicense: true, + category: 'my-category', defaultActionGroupId: 'threshold.fired', minimumLicenseRequired: 'basic', recoveryActionGroup: { id: 'recovered', name: 'Recovered' }, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_add.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_add.tsx index ccdca1bd1250d..99a9e0761eb9e 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_add.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_add.tsx @@ -5,44 +5,47 @@ * 2.0. */ -import React, { useReducer, useMemo, useState, useEffect, useCallback } from 'react'; -import { FormattedMessage } from '@kbn/i18n-react'; -import { EuiTitle, EuiFlyoutHeader, EuiFlyout, EuiFlyoutBody, EuiPortal } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; -import { isEmpty } from 'lodash'; -import { toMountPoint } from '@kbn/react-kibana-mount'; +import { EuiFlyout, EuiFlyoutBody, EuiFlyoutHeader, EuiPortal, EuiTitle } from '@elastic/eui'; import { parseRuleCircuitBreakerErrorMessage } from '@kbn/alerting-plugin/common'; -import { createRule, CreateRuleBody } from '@kbn/alerts-ui-shared/src/common/apis/create_rule'; -import { fetchUiConfig as triggersActionsUiConfig } from '@kbn/alerts-ui-shared/src/common/apis/fetch_ui_config'; import { IS_RULE_SPECIFIC_FLAPPING_ENABLED } from '@kbn/alerts-ui-shared/src/common/constants/rule_flapping'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { toMountPoint } from '@kbn/react-kibana-mount'; +import { + CreateRuleBody, + createRule, + fetchUiConfig as triggersActionsUiConfig, +} from '@kbn/response-ops-rule-form'; +import { isEmpty } from 'lodash'; +import React, { useCallback, useEffect, useMemo, useReducer, useState } from 'react'; +import { useKibana } from '../../../common/lib/kibana'; import { - Rule, - RuleTypeParams, - RuleTypeMetaData, - RuleUpdates, - RuleFlyoutCloseReason, IErrorObject, + Rule, RuleAddProps, + RuleCreationValidConsumer, + RuleFlyoutCloseReason, RuleTypeIndex, + RuleTypeMetaData, + RuleTypeParams, + RuleUpdates, TriggersActionsUiConfig, - RuleCreationValidConsumer, } from '../../../types'; -import { RuleForm } from './rule_form'; -import { getRuleActionErrors, getRuleErrors, isValidRule } from './rule_errors'; -import { InitialRule, getRuleReducer } from './rule_reducer'; -import { loadRuleTypes } from '../../lib/rule_api/rule_types'; import { HealthCheck } from '../../components/health_check'; -import { ConfirmRuleSave } from './confirm_rule_save'; -import { ConfirmRuleClose } from './confirm_rule_close'; -import { hasShowActionsCapability } from '../../lib/capabilities'; -import RuleAddFooter from './rule_add_footer'; +import { ToastWithCircuitBreakerContent } from '../../components/toast_with_circuit_breaker_content'; +import { DEFAULT_RULE_INTERVAL, MULTI_CONSUMER_RULE_TYPE_IDS } from '../../constants'; import { HealthContextProvider } from '../../context/health_context'; -import { useKibana } from '../../../common/lib/kibana'; -import { hasRuleChanged, haveRuleParamsChanged } from './has_rule_changed'; +import { hasShowActionsCapability } from '../../lib/capabilities'; +import { loadRuleTypes } from '../../lib/rule_api/rule_types'; import { getRuleWithInvalidatedFields } from '../../lib/value_validators'; -import { DEFAULT_RULE_INTERVAL, MULTI_CONSUMER_RULE_TYPE_IDS } from '../../constants'; +import { ConfirmRuleClose } from './confirm_rule_close'; +import { ConfirmRuleSave } from './confirm_rule_save'; import { getInitialInterval } from './get_initial_interval'; -import { ToastWithCircuitBreakerContent } from '../../components/toast_with_circuit_breaker_content'; +import { hasRuleChanged, haveRuleParamsChanged } from './has_rule_changed'; +import RuleAddFooter from './rule_add_footer'; +import { getRuleActionErrors, getRuleErrors, isValidRule } from './rule_errors'; +import { RuleForm } from './rule_form'; +import { InitialRule, getRuleReducer } from './rule_reducer'; import { ShowRequestModal } from './show_request_modal'; const defaultCreateRuleErrorMessage = i18n.translate( diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_edit.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_edit.test.tsx index 243236d7f6b93..925c2bb2edeb4 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_edit.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_edit.test.tsx @@ -25,7 +25,7 @@ const useKibanaMock = useKibana as jest.Mocked; jest.mock('../../lib/rule_api/rule_types', () => ({ loadRuleTypes: jest.fn(), })); -jest.mock('@kbn/alerts-ui-shared/src/common/apis/update_rule', () => ({ +jest.mock('@kbn/response-ops-rule-form/src/common/apis/update_rule', () => ({ updateRule: jest.fn().mockRejectedValue({ body: { message: 'Fail message' } }), })); jest.mock('@kbn/alerts-ui-shared/src/common/apis/fetch_alerting_framework_health', () => ({ @@ -35,7 +35,7 @@ jest.mock('@kbn/alerts-ui-shared/src/common/apis/fetch_alerting_framework_health })), })); -jest.mock('@kbn/alerts-ui-shared/src/common/apis/fetch_ui_config', () => ({ +jest.mock('@kbn/response-ops-rule-form/src/common/apis/fetch_ui_config', () => ({ fetchUiConfig: jest.fn().mockResolvedValue({ isUsingSecurity: true, minimumScheduleInterval: { value: '1m', enforce: false }, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_edit.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_edit.tsx index a24fd0eec2eb1..3400f8c5270f6 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_edit.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_edit.tsx @@ -5,56 +5,54 @@ * 2.0. */ -import React, { useReducer, useState, useEffect, useCallback, useMemo } from 'react'; -import { FormattedMessage } from '@kbn/i18n-react'; -import { RuleNotifyWhen } from '@kbn/alerting-plugin/common'; import { - EuiTitle, - EuiFlyoutHeader, - EuiFlyout, - EuiFlyoutFooter, + EuiButton, + EuiButtonEmpty, + EuiCallOut, EuiFlexGroup, EuiFlexItem, - EuiButtonEmpty, - EuiButton, + EuiFlyout, EuiFlyoutBody, + EuiFlyoutFooter, + EuiFlyoutHeader, + EuiIconTip, + EuiLoadingSpinner, EuiPortal, - EuiCallOut, EuiSpacer, - EuiLoadingSpinner, - EuiIconTip, + EuiTitle, } from '@elastic/eui'; -import { cloneDeep, omit } from 'lodash'; +import { RuleNotifyWhen, parseRuleCircuitBreakerErrorMessage } from '@kbn/alerting-plugin/common'; +import { IS_RULE_SPECIFIC_FLAPPING_ENABLED } from '@kbn/alerts-ui-shared/src/common/constants/rule_flapping'; import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; import { toMountPoint } from '@kbn/react-kibana-mount'; -import { parseRuleCircuitBreakerErrorMessage } from '@kbn/alerting-plugin/common'; -import { updateRule } from '@kbn/alerts-ui-shared/src/common/apis/update_rule'; -import { fetchUiConfig as triggersActionsUiConfig } from '@kbn/alerts-ui-shared/src/common/apis/fetch_ui_config'; -import { IS_RULE_SPECIFIC_FLAPPING_ENABLED } from '@kbn/alerts-ui-shared/src/common/constants/rule_flapping'; +import { fetchUiConfig as triggersActionsUiConfig, updateRule } from '@kbn/response-ops-rule-form'; +import { cloneDeep, omit } from 'lodash'; +import React, { useCallback, useEffect, useMemo, useReducer, useState } from 'react'; +import { useKibana } from '../../../common/lib/kibana'; import { + IErrorObject, Rule, - RuleFlyoutCloseReason, + RuleAction, RuleEditProps, - IErrorObject, + RuleFlyoutCloseReason, + RuleNotifyWhenType, RuleType, - RuleTypeParams, RuleTypeMetaData, - TriggersActionsUiConfig, - RuleNotifyWhenType, + RuleTypeParams, RuleUiAction, - RuleAction, + TriggersActionsUiConfig, } from '../../../types'; -import { RuleForm } from './rule_form'; -import { getRuleActionErrors, getRuleErrors, isValidRule } from './rule_errors'; -import { getRuleReducer } from './rule_reducer'; -import { loadRuleTypes } from '../../lib/rule_api/rule_types'; import { HealthCheck } from '../../components/health_check'; +import { ToastWithCircuitBreakerContent } from '../../components/toast_with_circuit_breaker_content'; import { HealthContextProvider } from '../../context/health_context'; -import { useKibana } from '../../../common/lib/kibana'; +import { loadRuleTypes } from '../../lib/rule_api/rule_types'; +import { getRuleWithInvalidatedFields } from '../../lib/value_validators'; import { ConfirmRuleClose } from './confirm_rule_close'; import { hasRuleChanged } from './has_rule_changed'; -import { getRuleWithInvalidatedFields } from '../../lib/value_validators'; -import { ToastWithCircuitBreakerContent } from '../../components/toast_with_circuit_breaker_content'; +import { getRuleActionErrors, getRuleErrors, isValidRule } from './rule_errors'; +import { RuleForm } from './rule_form'; +import { getRuleReducer } from './rule_reducer'; import { ShowRequestModal } from './show_request_modal'; const defaultUpdateRuleErrorMessage = i18n.translate( diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_form.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_form.test.tsx index 17bdcc92997ca..a89f7fe76339b 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_form.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_form.test.tsx @@ -329,6 +329,7 @@ describe('rule_form', () => { state: [], }, enabledInLicense: true, + category: 'my-category', }, { id: 'disabled-by-license', @@ -352,6 +353,7 @@ describe('rule_form', () => { state: [], }, enabledInLicense: false, + category: 'my-category', }, ]; useLoadRuleTypesQuery.mockReturnValue({ @@ -579,6 +581,7 @@ describe('rule_form', () => { }, ], enabledInLicense: true, + category: 'my-category', defaultActionGroupId: 'threshold.fired', minimumLicenseRequired: 'basic', recoveryActionGroup: { id: 'recovered', name: 'Recovered' }, @@ -652,6 +655,7 @@ describe('rule_form', () => { }, ], enabledInLicense: true, + category: 'my-category', defaultActionGroupId: 'threshold.fired', minimumLicenseRequired: 'basic', recoveryActionGroup: { id: 'recovered', name: 'Recovered' }, @@ -730,6 +734,7 @@ describe('rule_form', () => { }, ], enabledInLicense: true, + category: 'my-category', defaultActionGroupId: 'threshold.fired', minimumLicenseRequired: 'basic', recoveryActionGroup: { id: 'recovered', name: 'Recovered' }, @@ -789,6 +794,7 @@ describe('rule_form', () => { }, ], enabledInLicense: true, + category: 'my-category', defaultActionGroupId: 'threshold.fired', minimumLicenseRequired: 'basic', recoveryActionGroup: { id: 'recovered', name: 'Recovered' }, @@ -848,6 +854,7 @@ describe('rule_form', () => { }, ], enabledInLicense: true, + category: 'my-category', defaultActionGroupId: 'threshold.fired', minimumLicenseRequired: 'basic', recoveryActionGroup: { id: 'recovered', name: 'Recovered' }, @@ -907,6 +914,7 @@ describe('rule_form', () => { }, ], enabledInLicense: true, + category: 'my-category', defaultActionGroupId: 'threshold.fired', minimumLicenseRequired: 'basic', recoveryActionGroup: { id: 'recovered', name: 'Recovered' }, @@ -966,6 +974,7 @@ describe('rule_form', () => { }, ], enabledInLicense: true, + category: 'my-category', defaultActionGroupId: 'threshold.fired', minimumLicenseRequired: 'basic', recoveryActionGroup: { id: 'recovered', name: 'Recovered' }, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_form_consumer_selection.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_form_consumer_selection.test.tsx index bec46c682919b..c98733d377f0e 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_form_consumer_selection.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_form_consumer_selection.test.tsx @@ -9,14 +9,19 @@ import React from 'react'; import { fireEvent, render, screen } from '@testing-library/react'; import { RuleFormConsumerSelection } from './rule_form_consumer_selection'; import { RuleCreationValidConsumer } from '../../../types'; +import { useKibana } from '../../../common/lib/kibana'; const mockConsumers: RuleCreationValidConsumer[] = ['logs', 'infrastructure', 'stackAlerts']; const mockOnChange = jest.fn(); +jest.mock('../../../common/lib/kibana'); +const useKibanaMock = useKibana as jest.Mocked; + describe('RuleFormConsumerSelectionModal', () => { beforeEach(() => { jest.clearAllMocks(); + useKibanaMock().services.isServerless = false; }); it('renders correctly', async () => { @@ -162,41 +167,56 @@ describe('RuleFormConsumerSelectionModal', () => { expect(screen.queryByTestId('ruleFormConsumerSelect')).not.toBeInTheDocument(); }); - it('should display nothing if observability is one of the consumers', () => { + it('should display the initial selected consumer', () => { render( ); - expect(screen.queryByTestId('ruleFormConsumerSelect')).not.toBeInTheDocument(); + expect(screen.getByTestId('comboBoxSearchInput')).toHaveValue('Logs'); }); - it('should display the initial selected consumer', () => { + it('should not display the initial selected consumer if it is not a selectable option', () => { render( ); + expect(screen.getByTestId('comboBoxSearchInput')).toHaveValue(''); + }); - expect(screen.getByTestId('comboBoxSearchInput')).toHaveValue('Logs'); + it('should not show the role visibility dropdown on serverless on an o11y project', () => { + useKibanaMock().services.isServerless = true; + + render( + + ); + expect(screen.queryByTestId('ruleFormConsumerSelect')).not.toBeInTheDocument(); }); - it('should not display the initial selected consumer if it is not a selectable option', () => { + it('should set the consumer correctly on an o11y project', () => { + useKibanaMock().services.isServerless = true; + render( ); - expect(screen.getByTestId('comboBoxSearchInput')).toHaveValue(''); + expect(mockOnChange).toHaveBeenLastCalledWith('observability'); }); }); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_form_consumer_selection.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_form_consumer_selection.tsx index 46ec61cca8a5e..9fff99c1c9998 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_form_consumer_selection.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_form_consumer_selection.tsx @@ -10,6 +10,7 @@ import { EuiComboBox, EuiFormRow, EuiComboBoxOptionOption } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { AlertConsumers, STACK_ALERTS_FEATURE_ID } from '@kbn/rule-data-utils'; import { IErrorObject, RuleCreationValidConsumer } from '../../../types'; +import { useKibana } from '../../../common/lib/kibana'; const SELECT_LABEL: string = i18n.translate( 'xpack.triggersActionsUI.sections.ruleFormConsumerSelectionModal.selectLabel', @@ -80,8 +81,11 @@ export interface RuleFormConsumerSelectionProps { const SINGLE_SELECTION = { asPlainText: true }; export const RuleFormConsumerSelection = (props: RuleFormConsumerSelectionProps) => { + const { isServerless } = useKibana().services; + const { consumers, errors, onChange, selectedConsumer, initialSelectedConsumer } = props; const isInvalid = (errors?.consumer as string[])?.length > 0; + const handleOnChange = useCallback( (selected: Array>) => { if (selected.length > 0) { @@ -93,6 +97,7 @@ export const RuleFormConsumerSelection = (props: RuleFormConsumerSelectionProps) }, [onChange] ); + const validatedSelectedConsumer = useMemo(() => { if ( selectedConsumer && @@ -103,6 +108,7 @@ export const RuleFormConsumerSelection = (props: RuleFormConsumerSelectionProps) } return null; }, [selectedConsumer, consumers]); + const selectedOptions = useMemo( () => validatedSelectedConsumer @@ -149,15 +155,16 @@ export const RuleFormConsumerSelection = (props: RuleFormConsumerSelectionProps) useEffect(() => { if (consumers.length === 1) { onChange(consumers[0] as RuleCreationValidConsumer); - } else if (consumers.includes(AlertConsumers.OBSERVABILITY)) { + } else if (isServerless && consumers.includes(AlertConsumers.OBSERVABILITY)) { onChange(AlertConsumers.OBSERVABILITY as RuleCreationValidConsumer); } // eslint-disable-next-line react-hooks/exhaustive-deps }, [consumers]); - if (consumers.length <= 1 || consumers.includes(AlertConsumers.OBSERVABILITY)) { + if (consumers.length <= 1 || (isServerless && consumers.includes(AlertConsumers.OBSERVABILITY))) { return null; } + return ( { try { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list.test.tsx index 1efd0e572b324..f8a01e6f47f25 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list.test.tsx @@ -94,7 +94,7 @@ jest.mock('../../../lib/rule_api/rules_kuery_filter'); jest.mock('@kbn/alerts-ui-shared/src/common/apis/fetch_ui_health_status', () => ({ fetchUiHealthStatus: jest.fn(() => ({ isRulesAvailable: true })), })); -jest.mock('@kbn/alerts-ui-shared/src/common/apis/fetch_ui_config', () => ({ +jest.mock('@kbn/response-ops-rule-form/src/common/apis/fetch_ui_config', () => ({ fetchUiConfig: jest .fn() .mockResolvedValue({ minimumScheduleInterval: { value: '1m', enforce: false } }), @@ -225,8 +225,7 @@ describe('Update Api Key', () => { }); }); -// Failing: See https://github.com/elastic/kibana/issues/182435 -describe.skip('rules_list component empty', () => { +describe('rules_list component empty', () => { beforeEach(() => { fetchActiveMaintenanceWindowsMock.mockResolvedValue([]); loadRulesWithKueryFilter.mockResolvedValue({ @@ -282,28 +281,6 @@ describe.skip('rules_list component empty', () => { expect(await screen.findByTestId('createFirstRuleEmptyPrompt')).toBeInTheDocument(); }); - it('renders MaintenanceWindowCallout if one exists', async () => { - fetchActiveMaintenanceWindowsMock.mockResolvedValue([RUNNING_MAINTENANCE_WINDOW_1]); - renderWithProviders(); - expect( - await screen.findByText( - 'Rule notifications are stopped while maintenance windows are running.' - ) - ).toBeInTheDocument(); - expect(fetchActiveMaintenanceWindowsMock).toHaveBeenCalledTimes(1); - }); - - it("hides MaintenanceWindowCallout if filterConsumers does not match the running maintenance window's category", async () => { - fetchActiveMaintenanceWindowsMock.mockResolvedValue([ - { ...RUNNING_MAINTENANCE_WINDOW_1, categoryIds: ['securitySolution'] }, - ]); - renderWithProviders(); - await expect( - screen.findByText('Rule notifications are stopped while maintenance windows are running.') - ).rejects.toThrow(); - expect(fetchActiveMaintenanceWindowsMock).toHaveBeenCalledTimes(1); - }); - it('renders Create rule button', async () => { renderWithProviders(); @@ -319,6 +296,7 @@ describe.skip('rules_list component empty', () => { describe('rules_list ', () => { let ruleTypeRegistry: jest.Mocked; let actionTypeRegistry: jest.Mocked>; + beforeEach(() => { (getIsExperimentalFeatureEnabled as jest.Mock).mockImplementation(() => false); loadRulesWithKueryFilter.mockResolvedValue({ @@ -1403,3 +1381,99 @@ describe('rules_list with show only capability', () => { }); }); }); + +describe('MaintenanceWindowsMock', () => { + beforeEach(() => { + fetchActiveMaintenanceWindowsMock.mockResolvedValue([]); + + loadRulesWithKueryFilter.mockResolvedValue({ + page: 1, + perPage: 10000, + total: 0, + data: [], + }); + + loadActionTypes.mockResolvedValue([ + { + id: 'test', + name: 'Test', + }, + { + id: 'test2', + name: 'Test2', + }, + ]); + + loadRuleTypes.mockResolvedValue([ruleTypeFromApi]); + loadAllActions.mockResolvedValue([]); + loadRuleAggregationsWithKueryFilter.mockResolvedValue({}); + loadRuleTags.mockResolvedValue({ + data: ruleTags, + page: 1, + perPage: 50, + total: 4, + }); + + const actionTypeRegistry = actionTypeRegistryMock.create(); + const ruleTypeRegistry = ruleTypeRegistryMock.create(); + + ruleTypeRegistry.list.mockReturnValue([ruleType]); + actionTypeRegistry.list.mockReturnValue([]); + useKibanaMock().services.application.capabilities = { + ...useKibanaMock().services.application.capabilities, + [MAINTENANCE_WINDOW_FEATURE_ID]: { + save: true, + show: true, + }, + }; + useKibanaMock().services.ruleTypeRegistry = ruleTypeRegistry; + useKibanaMock().services.actionTypeRegistry = actionTypeRegistry; + }); + + afterEach(() => { + jest.clearAllMocks(); + queryClient.clear(); + cleanup(); + }); + + it('renders MaintenanceWindowCallout if one exists', async () => { + fetchActiveMaintenanceWindowsMock.mockResolvedValue([RUNNING_MAINTENANCE_WINDOW_1]); + renderWithProviders(); + + expect( + await screen.findByText('One or more maintenance windows are running') + ).toBeInTheDocument(); + + expect(fetchActiveMaintenanceWindowsMock).toHaveBeenCalledTimes(1); + }); + + it('hides MaintenanceWindowCallout if the category ID is not supported', async () => { + loadRuleTypes.mockResolvedValue([{ ...ruleTypeFromApi, category: 'observability' }]); + fetchActiveMaintenanceWindowsMock.mockResolvedValue([ + { ...RUNNING_MAINTENANCE_WINDOW_1, categoryIds: ['securitySolution'] }, + ]); + + renderWithProviders(); + + await expect( + screen.findByText('Rule notifications are stopped while maintenance windows are running.') + ).rejects.toThrow(); + + expect(fetchActiveMaintenanceWindowsMock).toHaveBeenCalledTimes(1); + }); + + it('shows MaintenanceWindowCallout for a specific category', async () => { + loadRuleTypes.mockResolvedValue([{ ...ruleTypeFromApi, category: 'observability' }]); + fetchActiveMaintenanceWindowsMock.mockResolvedValue([ + { ...RUNNING_MAINTENANCE_WINDOW_1, categoryIds: ['securitySolution', 'observability'] }, + ]); + + renderWithProviders(); + + expect( + await screen.findByText('A maintenance window is running for Observability rules') + ).toBeInTheDocument(); + + expect(fetchActiveMaintenanceWindowsMock).toHaveBeenCalledTimes(1); + }); +}); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list.tsx index d98aa2c5dec67..d1d1ce4fe6a3b 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list.tsx @@ -13,7 +13,7 @@ import { KueryNode } from '@kbn/es-query'; import { FormattedMessage } from '@kbn/i18n-react'; import { toMountPoint } from '@kbn/react-kibana-mount'; import { parseRuleCircuitBreakerErrorMessage } from '@kbn/alerting-plugin/common'; -import { RuleTypeModal } from '@kbn/alerts-ui-shared/src/rule_type_modal'; +import { RuleTypeModal } from '@kbn/response-ops-rule-form'; import React, { lazy, useEffect, @@ -117,7 +117,8 @@ const RuleAdd = lazy(() => import('../../rule_form/rule_add')); const RuleEdit = lazy(() => import('../../rule_form/rule_edit')); export interface RulesListProps { - filterConsumers?: string[]; + ruleTypeIds?: string[]; + consumers?: string[]; filteredRuleTypes?: string[]; lastResponseFilter?: string[]; lastRunOutcomeFilter?: string[]; @@ -159,7 +160,8 @@ const initialPercentileOptions = Object.values(Percentiles).map((percentile) => const EMPTY_ARRAY: string[] = []; export const RulesList = ({ - filterConsumers, + ruleTypeIds, + consumers, filteredRuleTypes = EMPTY_ARRAY, lastResponseFilter, lastRunOutcomeFilter, @@ -272,6 +274,7 @@ export const RulesList = ({ const rulesTypesFilter = isEmpty(filters.types) ? authorizedRuleTypes.map((art) => art.id) : filters.types; + const hasDefaultRuleTypesFiltersOn = isEmpty(filters.types); const computedFilter = useMemo(() => { @@ -285,7 +288,8 @@ export const RulesList = ({ // Fetch rules const { rulesState, loadRules, hasData, lastUpdate } = useLoadRulesQuery({ - filterConsumers, + ruleTypeIds, + consumers, filters: computedFilter, hasDefaultRuleTypesFiltersOn, page, @@ -298,7 +302,8 @@ export const RulesList = ({ // Fetch status aggregation const { loadRuleAggregations, rulesStatusesTotal, rulesLastRunOutcomesTotal } = useLoadRuleAggregationsQuery({ - filterConsumers, + ruleTypeIds, + consumers, filters: computedFilter, enabled: canLoadRules, refresh, @@ -766,12 +771,16 @@ export const RulesList = ({ const numberRulesToDelete = rulesToBulkEdit.length || numberOfSelectedItems; + const allRuleCategories = getAllUniqueRuleTypeCategories( + Array.from(ruleTypesState.data.values()) + ); + return ( <> {showSearchBar && !isEmpty(filters.ruleParams) ? ( ) : null} - + ids.includes(rule.id)); } + +const getAllUniqueRuleTypeCategories = (ruleTypes: RuleType[]) => { + const categories = new Set(ruleTypes.map((ruleType) => ruleType.category)); + + return Array.from(categories).filter(Boolean); +}; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_delete.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_delete.test.tsx index 8dc84a6ffc5dd..bffc275623dae 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_delete.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_delete.test.tsx @@ -69,7 +69,7 @@ jest.mock('../../../lib/rule_api/rules_kuery_filter'); jest.mock('@kbn/alerts-ui-shared/src/common/apis/fetch_ui_health_status', () => ({ fetchUiHealthStatus: jest.fn(() => ({ isRulesAvailable: true })), })); -jest.mock('@kbn/alerts-ui-shared/src/common/apis/fetch_ui_config', () => ({ +jest.mock('@kbn/response-ops-rule-form/src/common/apis/fetch_ui_config', () => ({ fetchUiConfig: jest .fn() .mockResolvedValue({ minimumScheduleInterval: { value: '1m', enforce: false } }), diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_disable.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_disable.test.tsx index de5cfa4f74bd8..ea0bb14c0852f 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_disable.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_disable.test.tsx @@ -66,7 +66,7 @@ jest.mock('../../../lib/rule_api/rules_kuery_filter'); jest.mock('@kbn/alerts-ui-shared/src/common/apis/fetch_ui_health_status', () => ({ fetchUiHealthStatus: jest.fn(() => ({ isRulesAvailable: true })), })); -jest.mock('@kbn/alerts-ui-shared/src/common/apis/fetch_ui_config', () => ({ +jest.mock('@kbn/response-ops-rule-form/src/common/apis/fetch_ui_config', () => ({ fetchUiConfig: jest .fn() .mockResolvedValue({ minimumScheduleInterval: { value: '1m', enforce: false } }), diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_edit.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_edit.test.tsx index 48e16c053f51f..d82e412fed8d6 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_edit.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_edit.test.tsx @@ -65,7 +65,7 @@ jest.mock('../../../lib/rule_api/rules_kuery_filter'); jest.mock('@kbn/alerts-ui-shared/src/common/apis/fetch_ui_health_status', () => ({ fetchUiHealthStatus: jest.fn(() => ({ isRulesAvailable: true })), })); -jest.mock('@kbn/alerts-ui-shared/src/common/apis/fetch_ui_config', () => ({ +jest.mock('@kbn/response-ops-rule-form/src/common/apis/fetch_ui_config', () => ({ fetchUiConfig: jest .fn() .mockResolvedValue({ minimumScheduleInterval: { value: '1m', enforce: false } }), diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_enable.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_enable.test.tsx index 09ac26cf9d98b..634a7491e40ab 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_enable.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list_bulk_enable.test.tsx @@ -66,7 +66,7 @@ jest.mock('../../../lib/rule_api/rules_kuery_filter'); jest.mock('@kbn/alerts-ui-shared/src/common/apis/fetch_ui_health_status', () => ({ fetchUiHealthStatus: jest.fn(() => ({ isRulesAvailable: true })), })); -jest.mock('@kbn/alerts-ui-shared/src/common/apis/fetch_ui_config', () => ({ +jest.mock('@kbn/response-ops-rule-form/src/common/apis/fetch_ui_config', () => ({ fetchUiConfig: jest .fn() .mockResolvedValue({ minimumScheduleInterval: { value: '1m', enforce: false } }), diff --git a/x-pack/plugins/triggers_actions_ui/public/index.ts b/x-pack/plugins/triggers_actions_ui/public/index.ts index 5fae33e1d2206..4acc1e1ca7894 100644 --- a/x-pack/plugins/triggers_actions_ui/public/index.ts +++ b/x-pack/plugins/triggers_actions_ui/public/index.ts @@ -92,7 +92,7 @@ export { executeAction, } from './application/lib'; -export { AlertProvidedActionVariables } from '@kbn/alerts-ui-shared/src/action_variables/action_variables'; +export { AlertProvidedActionVariables } from '@kbn/alerts-ui-shared'; export type { ActionGroupWithCondition } from './application/sections'; diff --git a/x-pack/plugins/triggers_actions_ui/public/types.ts b/x-pack/plugins/triggers_actions_ui/public/types.ts index a592b19ae8a79..0d7f3fea23477 100644 --- a/x-pack/plugins/triggers_actions_ui/public/types.ts +++ b/x-pack/plugins/triggers_actions_ui/public/types.ts @@ -5,132 +5,128 @@ * 2.0. */ -import type { Moment } from 'moment'; -import type { ComponentType, ReactNode, RefObject } from 'react'; -import type { PublicMethodsOf } from '@kbn/utility-types'; -import type { DocLinksStart } from '@kbn/core/public'; -import type { ChartsPluginSetup } from '@kbn/charts-plugin/public'; -import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; -import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; -import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; +import { + QueryDslQueryContainer, + SortCombinations, +} from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { + EuiDataGridCellPopoverElementProps, + EuiDataGridCellProps, EuiDataGridCellValueElementProps, - EuiDataGridToolBarAdditionalControlsOptions, + EuiDataGridColumnCellAction, + EuiDataGridOnColumnResizeHandler, EuiDataGridProps, EuiDataGridRefProps, - EuiDataGridColumnCellAction, + EuiDataGridToolBarAdditionalControlsOptions, EuiDataGridToolBarVisibilityOptions, EuiSuperSelectOption, - EuiDataGridOnColumnResizeHandler, - EuiDataGridCellProps, RenderCellValue, - EuiDataGridCellPopoverElementProps, } from '@elastic/eui'; -import type { RuleCreationValidConsumer, ValidFeatureId } from '@kbn/rule-data-utils'; import { EuiDataGridColumn, EuiDataGridControlColumn, EuiDataGridSorting } from '@elastic/eui'; -import { HttpSetup } from '@kbn/core/public'; -import { KueryNode } from '@kbn/es-query'; import { - ActionType, - AlertHistoryEsIndexConnectorId, - AlertHistoryDocumentTemplate, ALERT_HISTORY_PREFIX, + ActionType, AlertHistoryDefaultIndexName, + AlertHistoryDocumentTemplate, + AlertHistoryEsIndexConnectorId, AsApiContract, } from '@kbn/actions-plugin/common'; +import { ActionsPublicPluginSetup } from '@kbn/actions-plugin/public'; import { ActionGroup, + AlertStatus, SanitizedRule as AlertingSanitizedRule, - ResolvedSanitizedRule, - RuleSystemAction, - RuleTaskState, - AlertSummary as RuleSummary, ExecutionDuration, - AlertStatus, + MaintenanceWindow, RawAlertInstance, + ResolvedSanitizedRule, + SanitizedRuleAction as RuleAction, + RuleLastRun, RuleNotifyWhenType, - RuleTypeParams, + AlertSummary as RuleSummary, + RuleSystemAction, + RuleTaskState, RuleTypeMetaData, - RuleLastRun, - MaintenanceWindow, - SanitizedRuleAction as RuleAction, + RuleTypeParams, } from '@kbn/alerting-plugin/common'; import type { BulkOperationError } from '@kbn/alerting-plugin/server'; -import type { - RuleRegistrySearchRequestPagination, - EcsFieldsResponse, -} from '@kbn/rule-registry-plugin/common'; -import { - QueryDslQueryContainer, - SortCombinations, -} from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import React from 'react'; -import { ActionsPublicPluginSetup } from '@kbn/actions-plugin/public'; -import type { RuleType, RuleTypeIndex } from '@kbn/triggers-actions-ui-types'; +import { TypeRegistry } from '@kbn/alerts-ui-shared/src/common/type_registry'; import { - ValidationResult, - UserConfiguredActionConnector, ActionConnector, ActionTypeRegistryContract, EsQuerySnapshot, + UserConfiguredActionConnector, } from '@kbn/alerts-ui-shared/src/common/types'; -import { TypeRegistry } from '@kbn/alerts-ui-shared/src/common/type_registry'; +import type { ChartsPluginSetup } from '@kbn/charts-plugin/public'; +import type { DocLinksStart } from '@kbn/core/public'; +import { HttpSetup } from '@kbn/core/public'; +import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; +import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; +import { KueryNode } from '@kbn/es-query'; import { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; -import type { ComponentOpts as RuleStatusDropdownProps } from './application/sections/rules_list/components/rule_status_dropdown'; -import type { RuleTagFilterProps } from './application/sections/rules_list/components/rule_tag_filter'; -import type { RuleStatusFilterProps } from './application/sections/rules_list/components/rule_status_filter'; -import type { RulesListProps } from './application/sections/rules_list/components/rules_list'; -import type { - RuleTagBadgeProps, - RuleTagBadgeOptions, -} from './application/sections/rules_list/components/rule_tag_badge'; +import type { ValidationResult } from '@kbn/response-ops-rule-form'; +import type { RuleCreationValidConsumer } from '@kbn/rule-data-utils'; import type { - RuleEventLogListProps, - RuleEventLogListOptions, -} from './application/sections/rule_details/components/rule_event_log_list'; -import type { GlobalRuleEventLogListProps } from './application/sections/rule_details/components/global_rule_event_log_list'; -import type { AlertSummaryTimeRange } from './application/sections/alert_summary_widget/types'; + EcsFieldsResponse, + RuleRegistrySearchRequestPagination, +} from '@kbn/rule-registry-plugin/common'; +import type { RuleType, RuleTypeIndex } from '@kbn/triggers-actions-ui-types'; +import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; +import type { PublicMethodsOf } from '@kbn/utility-types'; +import type { Moment } from 'moment'; +import type { ComponentType, ReactNode, RefObject } from 'react'; +import React from 'react'; +import { AlertTableConfigRegistry } from './application/alert_table_config_registry'; import type { CreateConnectorFlyoutProps } from './application/sections/action_connector_form/create_connector_flyout'; import type { EditConnectorFlyoutProps } from './application/sections/action_connector_form/edit_connector_flyout'; +import type { AlertSummaryTimeRange } from './application/sections/alert_summary_widget/types'; +import { TimelineItem } from './application/sections/alerts_table/bulk_actions/components/toolbar'; +import { Case } from './application/sections/alerts_table/hooks/apis/bulk_get_cases'; import type { - FieldBrowserOptions, + BrowserFieldItem, CreateFieldComponent, - GetFieldTableColumns, + FieldBrowserOptions, FieldBrowserProps, - BrowserFieldItem, + GetFieldTableColumns, } from './application/sections/field_browser/types'; -import { RulesListVisibleColumns } from './application/sections/rules_list/components/rules_list_column_selector'; -import { TimelineItem } from './application/sections/alerts_table/bulk_actions/components/toolbar'; +import type { GlobalRuleEventLogListProps } from './application/sections/rule_details/components/global_rule_event_log_list'; +import type { + RuleEventLogListOptions, + RuleEventLogListProps, +} from './application/sections/rule_details/components/rule_event_log_list'; import type { RulesListNotifyBadgePropsWithApi } from './application/sections/rules_list/components/notify_badge'; -import { Case } from './application/sections/alerts_table/hooks/apis/bulk_get_cases'; -import { AlertTableConfigRegistry } from './application/alert_table_config_registry'; +import type { ComponentOpts as RuleStatusDropdownProps } from './application/sections/rules_list/components/rule_status_dropdown'; +import type { RuleStatusFilterProps } from './application/sections/rules_list/components/rule_status_filter'; +import type { + RuleTagBadgeOptions, + RuleTagBadgeProps, +} from './application/sections/rules_list/components/rule_tag_badge'; +import type { RuleTagFilterProps } from './application/sections/rules_list/components/rule_tag_filter'; +import type { RulesListProps } from './application/sections/rules_list/components/rules_list'; +import { RulesListVisibleColumns } from './application/sections/rules_list/components/rules_list_column_selector'; export type { - GenericValidationResult, - ValidationResult, - ConnectorValidationError, - ConnectorValidationFunc, ActionConnectorFieldsProps, ActionConnectorProps, - SystemAction, - PreConfiguredActionConnector, - UserConfiguredActionConnector, - ActionConnector, ActionParamsProps, ActionReadOnlyElementProps, - CustomConnectorSelectionItem, ActionTypeModel, - ActionTypeRegistryContract, + ConnectorValidationError, + ConnectorValidationFunc, + CustomConnectorSelectionItem, + GenericValidationResult, + PreConfiguredActionConnector, + SystemAction, } from '@kbn/alerts-ui-shared/src/common/types'; export { ActionConnectorMode } from '@kbn/alerts-ui-shared/src/common/types'; -export type { ActionVariables, RuleType, RuleTypeIndex } from '@kbn/triggers-actions-ui-types'; +export type { ActionVariables } from '@kbn/triggers-actions-ui-types'; export { - REQUIRED_ACTION_VARIABLES, CONTEXT_ACTION_VARIABLES, OPTIONAL_ACTION_VARIABLES, + REQUIRED_ACTION_VARIABLES, } from '@kbn/triggers-actions-ui-types'; type RuleUiAction = RuleAction | RuleSystemAction; @@ -153,48 +149,55 @@ type ResolvedRule = Omit< actions: RuleUiAction[]; }; +export { + ALERT_HISTORY_PREFIX, + AlertHistoryDefaultIndexName, + AlertHistoryDocumentTemplate, + AlertHistoryEsIndexConnectorId, +}; export type { - Rule, - RuleAction, - RuleSystemAction, - RuleUiAction, - RuleTaskState, - RuleSummary, - ExecutionDuration, + ActionConnector, + ActionType, + ActionTypeRegistryContract, AlertStatus, + AlertSummaryTimeRange, + AsApiContract, + BrowserFieldItem, + CreateConnectorFlyoutProps, + CreateFieldComponent, + EditConnectorFlyoutProps, + ExecutionDuration, + FieldBrowserOptions, + FieldBrowserProps, + GetFieldTableColumns, + GlobalRuleEventLogListProps, RawAlertInstance, - RuleNotifyWhenType, - RuleTypeParams, - RuleTypeMetaData, ResolvedRule, - SanitizedRule, + Rule, + RuleAction, + RuleEventLogListOptions, + RuleEventLogListProps, + RuleLastRun, + RuleNotifyWhenType, RuleStatusDropdownProps, - RuleTagFilterProps, RuleStatusFilterProps, - RuleLastRun, - RuleTagBadgeProps, + RuleSummary, + RuleSystemAction, RuleTagBadgeOptions, - RuleEventLogListProps, - RuleEventLogListOptions, - GlobalRuleEventLogListProps, - RulesListProps, - CreateConnectorFlyoutProps, - EditConnectorFlyoutProps, + RuleTagBadgeProps, + RuleTagFilterProps, + RuleTaskState, + RuleType, + RuleTypeIndex, + RuleTypeMetaData, + RuleTypeParams, + RuleUiAction, RulesListNotifyBadgePropsWithApi, - FieldBrowserProps, - FieldBrowserOptions, - CreateFieldComponent, - GetFieldTableColumns, - BrowserFieldItem, + RulesListProps, RulesListVisibleColumns, - AlertSummaryTimeRange, -}; -export type { ActionType, AsApiContract }; -export { - AlertHistoryEsIndexConnectorId, - AlertHistoryDocumentTemplate, - AlertHistoryDefaultIndexName, - ALERT_HISTORY_PREFIX, + SanitizedRule, + UserConfiguredActionConnector, + ValidationResult, }; export type ActionTypeIndex = Record; @@ -490,7 +493,7 @@ export type AlertsTableProps = { * Enable when rows may have variable heights (disables virtualization) */ dynamicRowHeight?: boolean; - featureIds?: ValidFeatureId[]; + ruleTypeIds?: string[]; pageIndex: number; pageSize: number; sort: SortCombinations[]; diff --git a/x-pack/plugins/triggers_actions_ui/server/plugin.ts b/x-pack/plugins/triggers_actions_ui/server/plugin.ts index b5cafb0571482..2263af73dbdc7 100644 --- a/x-pack/plugins/triggers_actions_ui/server/plugin.ts +++ b/x-pack/plugins/triggers_actions_ui/server/plugin.ts @@ -6,10 +6,7 @@ */ import { Logger, Plugin, CoreSetup, PluginInitializerContext } from '@kbn/core/server'; -import { - PluginSetupContract as AlertingPluginSetup, - PluginStartContract as AlertingPluginStart, -} from '@kbn/alerting-plugin/server'; +import { AlertingServerSetup, AlertingServerStart } from '@kbn/alerting-plugin/server'; import { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; import { getService, register as registerDataService } from './data'; import { createHealthRoute, createConfigRoute } from './routes'; @@ -21,11 +18,11 @@ export interface PluginStartContract { interface PluginsSetup { encryptedSavedObjects?: EncryptedSavedObjectsPluginSetup; - alerting: AlertingPluginSetup; + alerting: AlertingServerSetup; } interface TriggersActionsPluginStart { - alerting: AlertingPluginStart; + alerting: AlertingServerStart; } export class TriggersActionsPlugin implements Plugin { diff --git a/x-pack/plugins/triggers_actions_ui/server/routes/config.test.ts b/x-pack/plugins/triggers_actions_ui/server/routes/config.test.ts index 010a01b46fbdb..e96d5837b1138 100644 --- a/x-pack/plugins/triggers_actions_ui/server/routes/config.test.ts +++ b/x-pack/plugins/triggers_actions_ui/server/routes/config.test.ts @@ -45,7 +45,7 @@ describe('createConfigRoute', () => { const logger = loggingSystemMock.create().get(); const mockRulesClient = rulesClientMock.create(); - mockRulesClient.listRuleTypes.mockResolvedValueOnce(new Set(ruleTypes)); + mockRulesClient.listRuleTypes.mockResolvedValueOnce(ruleTypes); createConfigRoute({ logger, router, @@ -80,7 +80,7 @@ describe('createConfigRoute', () => { const logger = loggingSystemMock.create().get(); const mockRulesClient = rulesClientMock.create(); - mockRulesClient.listRuleTypes.mockResolvedValueOnce(new Set()); + mockRulesClient.listRuleTypes.mockResolvedValueOnce([]); createConfigRoute({ logger, router, diff --git a/x-pack/plugins/triggers_actions_ui/tsconfig.json b/x-pack/plugins/triggers_actions_ui/tsconfig.json index f4b718bff4672..7b947f560db85 100644 --- a/x-pack/plugins/triggers_actions_ui/tsconfig.json +++ b/x-pack/plugins/triggers_actions_ui/tsconfig.json @@ -72,7 +72,8 @@ "@kbn/core-ui-settings-browser", "@kbn/observability-alerting-rule-utils", "@kbn/core-application-browser", - "@kbn/cloud-plugin" + "@kbn/cloud-plugin", + "@kbn/response-ops-rule-form" ], "exclude": ["target/**/*"] } diff --git a/x-pack/plugins/upgrade_assistant/README.md b/x-pack/plugins/upgrade_assistant/README.md index 145f49baf0323..39bebc15e44b1 100644 --- a/x-pack/plugins/upgrade_assistant/README.md +++ b/x-pack/plugins/upgrade_assistant/README.md @@ -15,6 +15,7 @@ Some features of the UA are only needed when upgrading to a new major version. T * ML Snapshots (`featureSet.mlSnapshots`): Machine learning Upgrade mode can be toggled from outside Kibana, the purpose of this feature guard is to hide all ML related deprecations from the end user until the next major upgrade. When we want to enable ML model snapshot deprecation warnings again we need to change the constant `MachineLearningField.MIN_CHECKED_SUPPORTED_SNAPSHOT_VERSION` to something higher than 7.0.0 in the Elasticsearch code. * Migrating system indices (`featureSet.migrateSystemIndices`): Migrating system indices should only be enabled for major version upgrades. This config hides the second step from the UA UI for migrating system indices. +* Reindex Data Streams (`featureSet.migrateDataStreams`): Migrating deprecated Data streams should only be enabled for major version upgrades. The purpose of this feature guard is to hide all data streams related deprecations from the end user until the next major upgrade. * Reindex corrective actions (`featureSet.reindexCorrectiveActions`): Deprecations with reindexing corrective actions are only enabled for major version upgrades. Currently, the reindex actions include some logic that is specific to the [8.0 upgrade](https://github.com/elastic/kibana/blob/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/index_settings.ts). End users could get into a bad situation if this is enabled before this logic is fixed. ## Deprecations @@ -28,7 +29,7 @@ These surface runtime deprecations, e.g. a Painless script that uses a deprecate request to a deprecated API. These are also generally surfaced as deprecation headers within the response. Even if the cluster state is good, app maintainers need to watch the logs in case deprecations are discovered as data is migrated. Starting in 7.x, deprecation logs can be written to a file or a data stream ([#58924](https://github.com/elastic/elasticsearch/pull/58924)). When the data stream exists, the Upgrade Assistant provides a way to analyze the logs through Observability or Discover ([#106521](https://github.com/elastic/kibana/pull/106521)). -* [**Kibana deprecations API.**](https://github.com/elastic/kibana/blob/main/src/core/server/deprecations/README.mdx) This is information about deprecated features and configs in Kibana. These deprecations are only communicated to the user if the deployment is using these features. Kibana engineers are responsible for adding deprecations to the deprecations API for their respective team. +* [**Kibana deprecations API.**](https://github.com/elastic/kibana/blob/main/src/core/server/docs/kib_core_deprecations_service.mdx) This is information about deprecated features and configs in Kibana. These deprecations are only communicated to the user if the deployment is using these features. Kibana engineers are responsible for adding deprecations to the deprecations API for their respective team. ### Fixing problems diff --git a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/app_context.mock.ts b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/app_context.mock.ts index 31fd69648418f..010790e3c5e15 100644 --- a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/app_context.mock.ts +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/app_context.mock.ts @@ -80,6 +80,7 @@ export const getAppContextMock = (kibanaVersion: SemVer) => ({ featureSet: { mlSnapshots: true, migrateSystemIndices: true, + migrateDataStreams: true, reindexCorrectiveActions: true, }, kibanaVersionInfo: { diff --git a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/migrate_system_indices/migrate_system_indices.test.tsx b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/migrate_system_indices/migrate_system_indices.test.tsx index ae3e184f9c96b..eee988e2ebb13 100644 --- a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/migrate_system_indices/migrate_system_indices.test.tsx +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/overview/migrate_system_indices/migrate_system_indices.test.tsx @@ -107,6 +107,38 @@ describe('Overview - Migrate system indices', () => { expect(exists('viewSystemIndicesStateButton')).toBe(true); }); + test('handles confirmModal submission', async () => { + httpRequestsMockHelpers.setLoadSystemIndicesMigrationStatus({ + migration_status: 'MIGRATION_NEEDED', + }); + + testBed = await setupOverviewPage(httpSetup); + + const { exists, component, find } = testBed; + + component.update(); + + expect(exists('startSystemIndicesMigrationButton')).toBe(true); + await act(async () => { + find('startSystemIndicesMigrationButton').simulate('click'); + }); + component.update(); + + expect(exists('migrationConfirmModal')).toBe(true); + + const modal = document.body.querySelector('[data-test-subj="migrationConfirmModal"]'); + const confirmButton: HTMLButtonElement | null = modal!.querySelector( + '[data-test-subj="confirmModalConfirmButton"]' + ); + + await act(async () => { + confirmButton!.click(); + }); + component.update(); + + expect(exists('migrationConfirmModal')).toBe(false); + }); + test('Handles errors when migrating', async () => { httpRequestsMockHelpers.setLoadSystemIndicesMigrationStatus({ migration_status: 'MIGRATION_NEEDED', @@ -126,6 +158,16 @@ describe('Overview - Migrate system indices', () => { component.update(); + const modal = document.body.querySelector('[data-test-subj="migrationConfirmModal"]'); + const confirmButton: HTMLButtonElement | null = modal!.querySelector( + '[data-test-subj="confirmModalConfirmButton"]' + ); + + await act(async () => { + confirmButton!.click(); + }); + component.update(); + // Error is displayed expect(exists('startSystemIndicesMigrationCalloutError')).toBe(true); // CTA is enabled diff --git a/x-pack/plugins/upgrade_assistant/common/types.ts b/x-pack/plugins/upgrade_assistant/common/types.ts index 6d7166569d8db..781e4865ee568 100644 --- a/x-pack/plugins/upgrade_assistant/common/types.ts +++ b/x-pack/plugins/upgrade_assistant/common/types.ts @@ -215,7 +215,7 @@ export interface HealthIndicatorAction { export interface EnrichedDeprecationInfo extends Omit { - type: keyof estypes.MigrationDeprecationsResponse | 'health_indicator'; + type: keyof estypes.MigrationDeprecationsResponse | 'health_indicator' | 'data_streams'; isCritical: boolean; status?: estypes.HealthReportIndicatorHealthStatus; index?: string; @@ -296,4 +296,5 @@ export interface FeatureSet { migrateSystemIndices: boolean; mlSnapshots: boolean; reindexCorrectiveActions: boolean; + migrateDataStreams: boolean; } diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/constants.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/constants.tsx index 12babe0b9b468..d0743230f909c 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/constants.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/constants.tsx @@ -6,8 +6,9 @@ */ import { i18n } from '@kbn/i18n'; +import { EnrichedDeprecationInfo } from '../../../common/types'; -export const DEPRECATION_TYPE_MAP = { +export const DEPRECATION_TYPE_MAP: Record = { cluster_settings: i18n.translate( 'xpack.upgradeAssistant.esDeprecations.clusterDeprecationTypeLabel', { @@ -32,6 +33,9 @@ export const DEPRECATION_TYPE_MAP = { defaultMessage: 'Health Indicator', } ), + data_streams: i18n.translate('xpack.upgradeAssistant.esDeprecations.dataStreamsTypeLabel', { + defaultMessage: 'Data Stream', + }), }; export const PAGINATION_CONFIG = { diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/overview/migrate_system_indices/migrate_system_indices.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/overview/migrate_system_indices/migrate_system_indices.tsx index 47ca25bda31ac..3d2599e26bde2 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/overview/migrate_system_indices/migrate_system_indices.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/overview/migrate_system_indices/migrate_system_indices.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import React, { FunctionComponent, useEffect } from 'react'; +import React, { FunctionComponent, useEffect, useState } from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; @@ -20,6 +20,7 @@ import { EuiFlexItem, EuiCode, EuiLink, + EuiConfirmModal, } from '@elastic/eui'; import type { EuiStepProps } from '@elastic/eui/src/components/steps/step'; @@ -123,10 +124,55 @@ const i18nTexts = { }, }; +const ConfirmModal: React.FC<{ + onCancel: () => void; + onConfirm: () => void; +}> = ({ onCancel, onConfirm }) => ( + + {i18n.translate('xpack.upgradeAssistant.overview.systemIndices.confirmModal.description', { + defaultMessage: 'Migrating system indices may lead to downtime while they are reindexed.', + })} + +); + const MigrateSystemIndicesStep: FunctionComponent = ({ setIsComplete }) => { const { beginSystemIndicesMigration, startMigrationStatus, migrationStatus, setShowFlyout } = useMigrateSystemIndices(); + const [isModalVisible, setIsModalVisible] = useState(false); + + const openMigrationModal = () => { + setIsModalVisible(true); + }; + const onCancel = () => { + setIsModalVisible(false); + }; + + const confirmMigrationAction = () => { + beginSystemIndicesMigration(); + setIsModalVisible(false); + }; + useEffect(() => { setIsComplete(migrationStatus.data?.migration_status === 'NO_MIGRATION_NEEDED'); // Depending upon setIsComplete would create an infinite loop. @@ -206,12 +252,14 @@ const MigrateSystemIndicesStep: FunctionComponent = ({ setIsComplete }) = )} + {isModalVisible && } + {isMigrating ? i18nTexts.inProgressButtonLabel : i18nTexts.startButtonLabel} diff --git a/x-pack/plugins/upgrade_assistant/server/config.ts b/x-pack/plugins/upgrade_assistant/server/config.ts index e603780be785b..ecf168c297c96 100644 --- a/x-pack/plugins/upgrade_assistant/server/config.ts +++ b/x-pack/plugins/upgrade_assistant/server/config.ts @@ -47,6 +47,11 @@ const configSchema = schema.object({ * End users could get into a bad situation if this is enabled before this logic is fixed. */ reindexCorrectiveActions: schema.boolean({ defaultValue: false }), + /** + * Migrating deprecated data streams should only be enabled for major version upgrades. + * Currently this is manually set to `true` on every `x.last` version. + */ + migrateDataStreams: schema.boolean({ defaultValue: false }), }), /** * This config allows to hide the UI without disabling the plugin. diff --git a/x-pack/plugins/upgrade_assistant/server/lib/__fixtures__/es_deprecations.ts b/x-pack/plugins/upgrade_assistant/server/lib/__fixtures__/es_deprecations.ts new file mode 100644 index 0000000000000..4ced006a9bb43 --- /dev/null +++ b/x-pack/plugins/upgrade_assistant/server/lib/__fixtures__/es_deprecations.ts @@ -0,0 +1,77 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export const getMockEsDeprecations = () => { + return { + cluster_settings: [], + node_settings: [], + ml_settings: [], + index_settings: {}, + data_streams: {}, + }; +}; + +export const getMockMlSettingsDeprecations = () => { + return { + ml_settings: [ + { + level: 'warning', + message: 'Datafeed [deprecation-datafeed] uses deprecated query options', + url: 'https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html#breaking_70_search_changes', + details: + '[Deprecated field [use_dis_max] used, replaced by [Set [tie_breaker] to 1 instead]]', + // @ts-ignore + resolve_during_rolling_upgrade: false, + }, + { + level: 'critical', + message: + 'model snapshot [1] for job [deprecation_check_job] needs to be deleted or upgraded', + url: '', + details: 'details', + // @ts-ignore + _meta: { snapshot_id: '1', job_id: 'deprecation_check_job' }, + // @ts-ignore + resolve_during_rolling_upgrade: false, + }, + ], + }; +}; + +export const getMockDataStreamDeprecations = () => { + return { + data_streams: { + 'my-v7-data-stream': [ + { + level: 'critical', + message: 'Old data stream with a compatibility version < 8.0', + url: 'https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-9.0.html', + details: + 'This data stream has backing indices that were created before Elasticsearch 8.0.0', + resolve_during_rolling_upgrade: false, + _meta: { + backing_indices: { + count: 52, + need_upgrading: { + count: 37, + searchable_snapshot: { + count: 23, + fully_mounted: { + count: 7, + }, + partially_mounted: { + count: 16, + }, + }, + }, + }, + }, + }, + ], + }, + }; +}; diff --git a/x-pack/plugins/upgrade_assistant/server/lib/__fixtures__/fake_deprecations.json b/x-pack/plugins/upgrade_assistant/server/lib/__fixtures__/fake_deprecations.json index a83d8d231d142..f53e4176096cc 100644 --- a/x-pack/plugins/upgrade_assistant/server/lib/__fixtures__/fake_deprecations.json +++ b/x-pack/plugins/upgrade_assistant/server/lib/__fixtures__/fake_deprecations.json @@ -148,5 +148,31 @@ "resolve_during_rolling_upgrade": false } ] + }, + "data_streams": { + "my-v7-data-stream" : [{ + "level" : "critical", + "message" : "Old data stream with a compatibility version < 8.0", + "url" : "https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-9.0.html", + "details" : "This data stream has backing indices that were created before Elasticsearch 8.0.0", + "resolve_during_rolling_upgrade" : false, + "_meta": { + "backing_indices": { + "count": 52, + "need_upgrading": { + "count": 37, + "searchable_snapshot": { + "count": 23, + "fully_mounted": { + "count": 7 + }, + "partially_mounted": { + "count": 16 + } + } + } + } + } + }] } } diff --git a/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status.ts b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status.ts deleted file mode 100644 index 05fc4f666f7ba..0000000000000 --- a/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status.ts +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { IScopedClusterClient } from '@kbn/core/server'; -import { i18n } from '@kbn/i18n'; -import { EnrichedDeprecationInfo, ESUpgradeStatus, FeatureSet } from '../../common/types'; -import { esIndicesStateCheck } from './es_indices_state_check'; -import { - getESSystemIndicesMigrationStatus, - convertFeaturesToIndicesArray, -} from './es_system_indices_migration'; - -export function getShardCapacityDeprecationInfo({ - symptom, - details, -}: { - details: any; - symptom: any; -}) { - // When we dont have a details field for our indicator, we can only report - // the symptom to the user given that's the only information about the deprecation - // we have. - if (!details) { - return { - details: symptom, - message: symptom, - url: null, - resolveDuringUpgrade: false, - }; - } - - const causes = []; - if (details.indices_with_readonly_block > 0) { - causes.push( - i18n.translate( - 'xpack.upgradeAssistant.esDeprecationsStatus.indicesWithReadonlyBlockCauseMessage', - { - defaultMessage: - 'The number of indices the system enforced a read-only index block (`index.blocks.read_only_allow_delete`) on because the cluster is running out of space.', - } - ) - ); - } - - if (details.nodes_over_high_watermark > 0) { - causes.push( - i18n.translate( - 'xpack.upgradeAssistant.esDeprecationsStatus.nodesOverHighWatermarkCauseMessage', - { - defaultMessage: - 'The number of nodes that are running low on disk and it is likely that they will run out of space. Their disk usage has tripped the <>.', - ignoreTag: true, - } - ) - ); - } - - if (details.nodes_over_flood_stage_watermark > 0) { - causes.push( - i18n.translate( - 'xpack.upgradeAssistant.esDeprecationsStatus.nodesOverFloodStageWatermarkCauseMessage', - { - defaultMessage: - 'The number of nodes that have run out of disk. Their disk usage has tripped the <>.', - ignoreTag: true, - } - ) - ); - } - - return { - details: symptom, - message: symptom, - url: null, - resolveDuringUpgrade: false, - correctiveAction: { - type: 'healthIndicator', - impacts: details, - cause: causes.join('\n'), - }, - }; -} - -export async function getHealthIndicators( - dataClient: IScopedClusterClient -): Promise { - const healthIndicators = await dataClient.asCurrentUser.healthReport(); - const isStatusNotGreen = (indicator?: estypes.HealthReportBaseIndicator): boolean => { - return !!(indicator?.status && indicator?.status !== 'green'); - }; - - // Temporarily ignoring due to untyped ES indicators - // types will be available during 8.9.0 - // @ts-ignore - return [ - ...[ - // @ts-ignore - healthIndicators.indicators.shards_capacity as estypes.HealthReportBaseIndicator, - ] - .filter(isStatusNotGreen) - .flatMap(({ status, symptom, impacts, diagnosis }) => { - // eslint-disable-next-line @typescript-eslint/naming-convention - return (diagnosis || []).map(({ cause, action, help_url }) => ({ - type: 'health_indicator', - details: symptom, - message: cause, - url: help_url, - isCritical: status === 'red', - resolveDuringUpgrade: false, - correctiveAction: { type: 'healthIndicator', cause, action, impacts }, - })); - }), - ...[healthIndicators.indicators.disk as estypes.HealthReportDiskIndicator] - .filter(isStatusNotGreen) - .flatMap(({ status, symptom, details }) => { - return { - type: 'health_indicator', - isCritical: status === 'red', - ...getShardCapacityDeprecationInfo({ symptom, details }), - }; - }), - ]; -} - -export async function getESUpgradeStatus( - dataClient: IScopedClusterClient, - featureSet: FeatureSet -): Promise { - const getCombinedDeprecations = async () => { - const healthIndicators = await getHealthIndicators(dataClient); - const deprecations = await dataClient.asCurrentUser.migration.deprecations(); - const indices = await getCombinedIndexInfos(deprecations, dataClient); - const systemIndices = await getESSystemIndicesMigrationStatus(dataClient.asCurrentUser); - const systemIndicesList = convertFeaturesToIndicesArray(systemIndices.features); - - const enrichedDeprecations = Object.keys(deprecations).reduce( - (combinedDeprecations, deprecationType) => { - if (deprecationType === 'index_settings') { - // We need to exclude all index related deprecations for system indices since - // they are resolved separately through the system indices upgrade section in - // the Overview page. - const withoutSystemIndices = indices.filter( - (index) => !systemIndicesList.includes(index.index!) - ); - - combinedDeprecations = combinedDeprecations.concat(withoutSystemIndices); - } else { - const deprecationsByType = deprecations[ - deprecationType as keyof estypes.MigrationDeprecationsResponse - ] as estypes.MigrationDeprecationsDeprecation[]; - - const enrichedDeprecationInfo = deprecationsByType - .map( - ({ - details, - level, - message, - url, - // @ts-expect-error @elastic/elasticsearch _meta not available yet in MigrationDeprecationInfoResponse - _meta: metadata, - // @ts-expect-error @elastic/elasticsearch resolve_during_rolling_upgrade not available yet in MigrationDeprecationInfoResponse - resolve_during_rolling_upgrade: resolveDuringUpgrade, - }) => { - return { - details, - message, - url, - type: deprecationType as keyof estypes.MigrationDeprecationsResponse, - isCritical: level === 'critical', - resolveDuringUpgrade, - correctiveAction: getCorrectiveAction(message, metadata), - }; - } - ) - .filter(({ correctiveAction, type }) => { - /** - * This disables showing the ML deprecations in the UA if `featureSet.mlSnapshots` - * is set to `false`. - * - * This config should be set to true only on the `x.last` versions, or when - * the constant `MachineLearningField.MIN_CHECKED_SUPPORTED_SNAPSHOT_VERSION` - * is incremented to something higher than 7.0.0 in the Elasticsearch code. - */ - if (!featureSet.mlSnapshots) { - if (type === 'ml_settings' || correctiveAction?.type === 'mlSnapshot') { - return false; - } - } - - /** - * This disables showing the reindexing deprecations in the UA if - * `featureSet.reindexCorrectiveActions` is set to `false`. - */ - if (!featureSet.reindexCorrectiveActions && correctiveAction?.type === 'reindex') { - return false; - } - - return true; - }); - - combinedDeprecations = combinedDeprecations.concat(enrichedDeprecationInfo); - } - - return combinedDeprecations; - }, - [] as EnrichedDeprecationInfo[] - ); - - const enrichedHealthIndicators = healthIndicators.filter(({ status }) => { - return status !== 'green'; - }) as EnrichedDeprecationInfo[]; - - return [...enrichedHealthIndicators, ...enrichedDeprecations]; - }; - - const combinedDeprecations = await getCombinedDeprecations(); - const criticalWarnings = combinedDeprecations.filter(({ isCritical }) => isCritical === true); - - return { - totalCriticalDeprecations: criticalWarnings.length, - deprecations: combinedDeprecations, - }; -} - -// Reformats the index deprecations to an array of deprecation warnings extended with an index field. -const getCombinedIndexInfos = async ( - deprecations: estypes.MigrationDeprecationsResponse, - dataClient: IScopedClusterClient -) => { - const indices = Object.keys(deprecations.index_settings).reduce( - (indexDeprecations, indexName) => { - return indexDeprecations.concat( - deprecations.index_settings[indexName].map( - ({ - details, - message, - url, - level, - // @ts-expect-error @elastic/elasticsearch _meta not available yet in MigrationDeprecationInfoResponse - _meta: metadata, - // @ts-expect-error @elastic/elasticsearch resolve_during_rolling_upgrade not available yet in MigrationDeprecationInfoResponse - resolve_during_rolling_upgrade: resolveDuringUpgrade, - }) => - ({ - details, - message, - url, - index: indexName, - type: 'index_settings', - isCritical: level === 'critical', - correctiveAction: getCorrectiveAction(message, metadata, indexName), - resolveDuringUpgrade, - } as EnrichedDeprecationInfo) - ) - ); - }, - [] as EnrichedDeprecationInfo[] - ); - - const indexNames = indices.map(({ index }) => index!); - - // If we have found deprecation information for index/indices - // check whether the index is open or closed. - if (indexNames.length) { - const indexStates = await esIndicesStateCheck(dataClient.asCurrentUser, indexNames); - - indices.forEach((indexData) => { - if (indexData.correctiveAction?.type === 'reindex') { - indexData.correctiveAction.blockerForReindexing = - indexStates[indexData.index!] === 'closed' ? 'index-closed' : undefined; - } - }); - } - return indices as EnrichedDeprecationInfo[]; -}; - -interface Action { - action_type: 'remove_settings'; - objects: string[]; -} - -interface Actions { - actions: Action[]; -} - -type EsMetadata = Actions & { - [key: string]: string; -}; - -const getCorrectiveAction = ( - message: string, - metadata: EsMetadata, - indexName?: string -): EnrichedDeprecationInfo['correctiveAction'] => { - const indexSettingDeprecation = metadata?.actions?.find( - (action) => action.action_type === 'remove_settings' && indexName - ); - const clusterSettingDeprecation = metadata?.actions?.find( - (action) => action.action_type === 'remove_settings' && typeof indexName === 'undefined' - ); - const requiresReindexAction = /Index created before/.test(message); - const requiresIndexSettingsAction = Boolean(indexSettingDeprecation); - const requiresClusterSettingsAction = Boolean(clusterSettingDeprecation); - const requiresMlAction = /[Mm]odel snapshot/.test(message); - - if (requiresReindexAction) { - return { - type: 'reindex', - }; - } - - if (requiresIndexSettingsAction) { - return { - type: 'indexSetting', - deprecatedSettings: indexSettingDeprecation!.objects, - }; - } - - if (requiresClusterSettingsAction) { - return { - type: 'clusterSetting', - deprecatedSettings: clusterSettingDeprecation!.objects, - }; - } - - if (requiresMlAction) { - const { snapshot_id: snapshotId, job_id: jobId } = metadata!; - - return { - type: 'mlSnapshot', - snapshotId, - jobId, - }; - } -}; diff --git a/x-pack/plugins/upgrade_assistant/server/lib/__snapshots__/es_deprecations_status.test.ts.snap b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status/__snapshots__/index.test.ts.snap similarity index 92% rename from x-pack/plugins/upgrade_assistant/server/lib/__snapshots__/es_deprecations_status.test.ts.snap rename to x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status/__snapshots__/index.test.ts.snap index de0154037f9ba..b0d5d99a37497 100644 --- a/x-pack/plugins/upgrade_assistant/server/lib/__snapshots__/es_deprecations_status.test.ts.snap +++ b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status/__snapshots__/index.test.ts.snap @@ -6,6 +6,7 @@ Object { Object { "correctiveAction": undefined, "details": "templates using \`template\` field: security_audit_log,watches,.monitoring-alerts,triggered_watches,.ml-anomalies-,.ml-notifications,.ml-meta,.monitoring-kibana,.monitoring-es,.monitoring-logstash,.watch-history-6,.ml-state,security-index-template", + "index": undefined, "isCritical": false, "message": "Template patterns are no longer using \`template\` field, but \`index_patterns\` instead", "resolveDuringUpgrade": false, @@ -15,6 +16,7 @@ Object { Object { "correctiveAction": undefined, "details": "{.monitoring-logstash=[Coercion of boolean fields], .monitoring-es=[Coercion of boolean fields], .ml-anomalies-=[Coercion of boolean fields], .watch-history-6=[Coercion of boolean fields], .monitoring-kibana=[Coercion of boolean fields], security-index-template=[Coercion of boolean fields]}", + "index": undefined, "isCritical": false, "message": "one or more templates use deprecated mapping settings", "resolveDuringUpgrade": false, @@ -24,6 +26,7 @@ Object { Object { "correctiveAction": undefined, "details": "[Deprecated field [use_dis_max] used, replaced by [Set [tie_breaker] to 1 instead]]", + "index": undefined, "isCritical": false, "message": "Datafeed [deprecation-datafeed] uses deprecated query options", "resolveDuringUpgrade": false, @@ -37,6 +40,7 @@ Object { "type": "mlSnapshot", }, "details": "details", + "index": undefined, "isCritical": true, "message": "model snapshot [1] for job [deprecation_check_job] needs to be deleted or upgraded", "resolveDuringUpgrade": false, @@ -46,6 +50,7 @@ Object { Object { "correctiveAction": undefined, "details": "This node thing is wrong", + "index": undefined, "isCritical": true, "message": "A node-level issue", "resolveDuringUpgrade": true, @@ -153,7 +158,17 @@ Object { "type": "index_settings", "url": "https://www.elastic.co/guide/en/elasticsearch/reference/6.0/breaking_60_mappings_changes.html#_coercion_of_boolean_fields", }, + Object { + "correctiveAction": undefined, + "details": "This data stream has backing indices that were created before Elasticsearch 8.0.0", + "index": "my-v7-data-stream", + "isCritical": true, + "message": "Old data stream with a compatibility version < 8.0", + "resolveDuringUpgrade": false, + "type": "data_streams", + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-9.0.html", + }, ], - "totalCriticalDeprecations": 4, + "totalCriticalDeprecations": 5, } `; diff --git a/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status/get_corrective_actions.ts b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status/get_corrective_actions.ts new file mode 100644 index 0000000000000..be696acb18095 --- /dev/null +++ b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status/get_corrective_actions.ts @@ -0,0 +1,68 @@ +/* + * 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 { EnrichedDeprecationInfo } from '../../../common/types'; + +interface Action { + action_type: 'remove_settings'; + objects: string[]; +} + +interface Actions { + actions: Action[]; +} + +type EsMetadata = Actions & { + [key: string]: string; +}; + +export const getCorrectiveAction = ( + message: string, + metadata: EsMetadata, + indexName?: string +): EnrichedDeprecationInfo['correctiveAction'] => { + const indexSettingDeprecation = metadata?.actions?.find( + (action) => action.action_type === 'remove_settings' && indexName + ); + const clusterSettingDeprecation = metadata?.actions?.find( + (action) => action.action_type === 'remove_settings' && typeof indexName === 'undefined' + ); + const requiresReindexAction = /Index created before/.test(message); + const requiresIndexSettingsAction = Boolean(indexSettingDeprecation); + const requiresClusterSettingsAction = Boolean(clusterSettingDeprecation); + const requiresMlAction = /[Mm]odel snapshot/.test(message); + + if (requiresReindexAction) { + return { + type: 'reindex', + }; + } + + if (requiresIndexSettingsAction) { + return { + type: 'indexSetting', + deprecatedSettings: indexSettingDeprecation!.objects, + }; + } + + if (requiresClusterSettingsAction) { + return { + type: 'clusterSetting', + deprecatedSettings: clusterSettingDeprecation!.objects, + }; + } + + if (requiresMlAction) { + const { snapshot_id: snapshotId, job_id: jobId } = metadata!; + + return { + type: 'mlSnapshot', + snapshotId, + jobId, + }; + } +}; diff --git a/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status/health_indicators.test.ts b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status/health_indicators.test.ts new file mode 100644 index 0000000000000..3f16d0f9e94ce --- /dev/null +++ b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status/health_indicators.test.ts @@ -0,0 +1,131 @@ +/* + * 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, ScopedClusterClientMock } from '@kbn/core/server/mocks'; +import { getHealthIndicators } from './health_indicators'; +import * as healthIndicatorsMock from '../__fixtures__/health_indicators'; + +describe('getHealthIndicators', () => { + let esClient: ScopedClusterClientMock; + beforeEach(() => { + esClient = elasticsearchServiceMock.createScopedClusterClient(); + }); + + it('returns empty array on green indicators', async () => { + esClient.asCurrentUser.healthReport.mockResponse({ + cluster_name: 'mock', + indicators: { + disk: healthIndicatorsMock.diskIndicatorGreen, + // @ts-ignore + shards_capacity: healthIndicatorsMock.shardCapacityIndicatorGreen, + }, + }); + + const result = await getHealthIndicators(esClient); + expect(result).toEqual([]); + }); + + it('returns unknown indicators', async () => { + esClient.asCurrentUser.healthReport.mockResponse({ + cluster_name: 'mock', + indicators: { + disk: healthIndicatorsMock.diskIndicatorUnknown, + // @ts-ignore + shards_capacity: healthIndicatorsMock.shardCapacityIndicatorGreen, + }, + }); + + const result = await getHealthIndicators(esClient); + expect(result[0]).toEqual( + expect.objectContaining({ + details: 'No disk usage data.', + }) + ); + }); + + it('returns unhealthy shards_capacity indicator', async () => { + esClient.asCurrentUser.healthReport.mockResponse({ + cluster_name: 'mock', + indicators: { + disk: healthIndicatorsMock.diskIndicatorGreen, + // @ts-ignore + shards_capacity: healthIndicatorsMock.shardCapacityIndicatorRed, + }, + }); + + const result = await getHealthIndicators(esClient); + expect(result).toMatchInlineSnapshot(` + Array [ + Object { + "correctiveAction": Object { + "action": "Increase the value of [cluster.max_shards_per_node] cluster setting or remove data indices to clear up resources.", + "cause": "Elasticsearch is about to reach the maximum number of shards it can host, based on your current settings.", + "impacts": Array [ + Object { + "description": "The cluster has too many used shards to be able to upgrade.", + "id": "elasticsearch:health:shards_capacity:impact:upgrade_blocked", + "impact_areas": "[Array]", + "severity": 1, + }, + Object { + "description": "The cluster is running low on room to add new shards. Adding data to new indices is at risk", + "id": "elasticsearch:health:shards_capacity:impact:creation_of_new_indices_blocked", + "impact_areas": "[Array]", + "severity": 1, + }, + ], + "type": "healthIndicator", + }, + "details": "Cluster is close to reaching the configured maximum number of shards for data nodes.", + "isCritical": true, + "message": "Elasticsearch is about to reach the maximum number of shards it can host, based on your current settings.", + "resolveDuringUpgrade": false, + "type": "health_indicator", + "url": "https://ela.st/fix-shards-capacity", + }, + ] + `); + }); + + it('returns unhealthy disk indicator', async () => { + esClient.asCurrentUser.healthReport.mockResponse({ + cluster_name: 'mock', + indicators: { + disk: healthIndicatorsMock.diskIndicatorRed, + // @ts-ignore + shards_capacity: healthIndicatorsMock.shardCapacityIndicatorGreen, + }, + }); + + const result = await getHealthIndicators(esClient); + expect(result).toMatchInlineSnapshot(` + Array [ + Object { + "correctiveAction": Object { + "cause": "The number of indices the system enforced a read-only index block (\`index.blocks.read_only_allow_delete\`) on because the cluster is running out of space. + The number of nodes that are running low on disk and it is likely that they will run out of space. Their disk usage has tripped the <>. + The number of nodes that have run out of disk. Their disk usage has tripped the <>.", + "impacts": Object { + "indices_with_readonly_block": 1, + "nodes_over_flood_stage_watermark": 1, + "nodes_over_high_watermark": 1, + "nodes_with_enough_disk_space": 1, + "nodes_with_unknown_disk_status": 1, + }, + "type": "healthIndicator", + }, + "details": "The cluster does not have enough available disk space.", + "isCritical": true, + "message": "The cluster does not have enough available disk space.", + "resolveDuringUpgrade": false, + "type": "health_indicator", + "url": null, + }, + ] + `); + }); +}); diff --git a/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status/health_indicators.ts b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status/health_indicators.ts new file mode 100644 index 0000000000000..372582220659a --- /dev/null +++ b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status/health_indicators.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; +import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { IScopedClusterClient } from '@kbn/core/server'; +import { EnrichedDeprecationInfo } from '../../../common/types'; + +export async function getHealthIndicators( + dataClient: IScopedClusterClient +): Promise { + const healthIndicators = await dataClient.asCurrentUser.healthReport(); + const isStatusNotGreen = (indicator?: estypes.HealthReportBaseIndicator): boolean => { + return !!(indicator?.status && indicator?.status !== 'green'); + }; + + // Temporarily ignoring due to untyped ES indicators + // types will be available during 8.9.0 + // @ts-ignore + return [ + ...[ + // @ts-ignore + healthIndicators.indicators.shards_capacity as estypes.HealthReportBaseIndicator, + ] + .filter(isStatusNotGreen) + .flatMap(({ status, symptom, impacts, diagnosis }) => { + // eslint-disable-next-line @typescript-eslint/naming-convention + return (diagnosis || []).map(({ cause, action, help_url }) => ({ + type: 'health_indicator', + details: symptom, + message: cause, + url: help_url, + isCritical: status === 'red', + resolveDuringUpgrade: false, + correctiveAction: { type: 'healthIndicator', cause, action, impacts }, + })); + }), + ...[healthIndicators.indicators.disk as estypes.HealthReportDiskIndicator] + .filter(isStatusNotGreen) + .flatMap(({ status, symptom, details }) => { + return { + type: 'health_indicator', + isCritical: status === 'red', + ...getShardCapacityDeprecationInfo({ symptom, details }), + }; + }), + ]; +} + +export function getShardCapacityDeprecationInfo({ + symptom, + details, +}: { + details: any; + symptom: any; +}) { + // When we dont have a details field for our indicator, we can only report + // the symptom to the user given that's the only information about the deprecation + // we have. + if (!details) { + return { + details: symptom, + message: symptom, + url: null, + resolveDuringUpgrade: false, + }; + } + + const causes = []; + if (details.indices_with_readonly_block > 0) { + causes.push( + i18n.translate( + 'xpack.upgradeAssistant.esDeprecationsStatus.indicesWithReadonlyBlockCauseMessage', + { + defaultMessage: + 'The number of indices the system enforced a read-only index block (`index.blocks.read_only_allow_delete`) on because the cluster is running out of space.', + } + ) + ); + } + + if (details.nodes_over_high_watermark > 0) { + causes.push( + i18n.translate( + 'xpack.upgradeAssistant.esDeprecationsStatus.nodesOverHighWatermarkCauseMessage', + { + defaultMessage: + 'The number of nodes that are running low on disk and it is likely that they will run out of space. Their disk usage has tripped the <>.', + ignoreTag: true, + } + ) + ); + } + + if (details.nodes_over_flood_stage_watermark > 0) { + causes.push( + i18n.translate( + 'xpack.upgradeAssistant.esDeprecationsStatus.nodesOverFloodStageWatermarkCauseMessage', + { + defaultMessage: + 'The number of nodes that have run out of disk. Their disk usage has tripped the <>.', + ignoreTag: true, + } + ) + ); + } + + return { + details: symptom, + message: symptom, + url: null, + resolveDuringUpgrade: false, + correctiveAction: { + type: 'healthIndicator', + impacts: details, + cause: causes.join('\n'), + }, + }; +} diff --git a/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status.test.ts b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status/index.test.ts similarity index 56% rename from x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status.test.ts rename to x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status/index.test.ts index 3a373cbffbfe7..c7a8c13993099 100644 --- a/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status.test.ts +++ b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status/index.test.ts @@ -6,142 +6,22 @@ */ import _ from 'lodash'; -import { elasticsearchServiceMock, ScopedClusterClientMock } from '@kbn/core/server/mocks'; +import { elasticsearchServiceMock } from '@kbn/core/server/mocks'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { getESUpgradeStatus, getHealthIndicators } from './es_deprecations_status'; -import fakeDeprecations from './__fixtures__/fake_deprecations.json'; -import * as healthIndicatorsMock from './__fixtures__/health_indicators'; - -import type { FeatureSet } from '../../common/types'; +import fakeDeprecations from '../__fixtures__/fake_deprecations.json'; +import * as healthIndicatorsMock from '../__fixtures__/health_indicators'; +import * as esMigrationsMock from '../__fixtures__/es_deprecations'; +import type { FeatureSet } from '../../../common/types'; +import { getESUpgradeStatus } from '.'; const fakeIndexNames = Object.keys(fakeDeprecations.index_settings); -describe('getHealthIndicators', () => { - let esClient: ScopedClusterClientMock; - beforeEach(() => { - esClient = elasticsearchServiceMock.createScopedClusterClient(); - }); - - it('returns empty array on green indicators', async () => { - esClient.asCurrentUser.healthReport.mockResponse({ - cluster_name: 'mock', - indicators: { - disk: healthIndicatorsMock.diskIndicatorGreen, - // @ts-ignore - shards_capacity: healthIndicatorsMock.shardCapacityIndicatorGreen, - }, - }); - - const result = await getHealthIndicators(esClient); - expect(result).toEqual([]); - }); - - it('returns unknown indicators', async () => { - esClient.asCurrentUser.healthReport.mockResponse({ - cluster_name: 'mock', - indicators: { - disk: healthIndicatorsMock.diskIndicatorUnknown, - // @ts-ignore - shards_capacity: healthIndicatorsMock.shardCapacityIndicatorGreen, - }, - }); - - const result = await getHealthIndicators(esClient); - expect(result[0]).toEqual( - expect.objectContaining({ - details: 'No disk usage data.', - }) - ); - }); - - it('returns unhealthy shards_capacity indicator', async () => { - esClient.asCurrentUser.healthReport.mockResponse({ - cluster_name: 'mock', - indicators: { - disk: healthIndicatorsMock.diskIndicatorGreen, - // @ts-ignore - shards_capacity: healthIndicatorsMock.shardCapacityIndicatorRed, - }, - }); - - const result = await getHealthIndicators(esClient); - expect(result).toMatchInlineSnapshot(` - Array [ - Object { - "correctiveAction": Object { - "action": "Increase the value of [cluster.max_shards_per_node] cluster setting or remove data indices to clear up resources.", - "cause": "Elasticsearch is about to reach the maximum number of shards it can host, based on your current settings.", - "impacts": Array [ - Object { - "description": "The cluster has too many used shards to be able to upgrade.", - "id": "elasticsearch:health:shards_capacity:impact:upgrade_blocked", - "impact_areas": "[Array]", - "severity": 1, - }, - Object { - "description": "The cluster is running low on room to add new shards. Adding data to new indices is at risk", - "id": "elasticsearch:health:shards_capacity:impact:creation_of_new_indices_blocked", - "impact_areas": "[Array]", - "severity": 1, - }, - ], - "type": "healthIndicator", - }, - "details": "Cluster is close to reaching the configured maximum number of shards for data nodes.", - "isCritical": true, - "message": "Elasticsearch is about to reach the maximum number of shards it can host, based on your current settings.", - "resolveDuringUpgrade": false, - "type": "health_indicator", - "url": "https://ela.st/fix-shards-capacity", - }, - ] - `); - }); - - it('returns unhealthy disk indicator', async () => { - esClient.asCurrentUser.healthReport.mockResponse({ - cluster_name: 'mock', - indicators: { - disk: healthIndicatorsMock.diskIndicatorRed, - // @ts-ignore - shards_capacity: healthIndicatorsMock.shardCapacityIndicatorGreen, - }, - }); - - const result = await getHealthIndicators(esClient); - expect(result).toMatchInlineSnapshot(` - Array [ - Object { - "correctiveAction": Object { - "cause": "The number of indices the system enforced a read-only index block (\`index.blocks.read_only_allow_delete\`) on because the cluster is running out of space. - The number of nodes that are running low on disk and it is likely that they will run out of space. Their disk usage has tripped the <>. - The number of nodes that have run out of disk. Their disk usage has tripped the <>.", - "impacts": Object { - "indices_with_readonly_block": 1, - "nodes_over_flood_stage_watermark": 1, - "nodes_over_high_watermark": 1, - "nodes_with_enough_disk_space": 1, - "nodes_with_unknown_disk_status": 1, - }, - "type": "healthIndicator", - }, - "details": "The cluster does not have enough available disk space.", - "isCritical": true, - "message": "The cluster does not have enough available disk space.", - "resolveDuringUpgrade": false, - "type": "health_indicator", - "url": null, - }, - ] - `); - }); -}); - describe('getESUpgradeStatus', () => { const featureSet: FeatureSet = { reindexCorrectiveActions: true, migrateSystemIndices: true, mlSnapshots: true, + migrateDataStreams: true, }; const resolvedIndices = { @@ -200,6 +80,7 @@ describe('getESUpgradeStatus', () => { node_settings: [], ml_settings: [], index_settings: {}, + data_streams: {}, }); await expect(getESUpgradeStatus(esClient, featureSet)).resolves.toHaveProperty( @@ -215,6 +96,7 @@ describe('getESUpgradeStatus', () => { node_settings: [], ml_settings: [], index_settings: {}, + data_streams: {}, }); await expect(getESUpgradeStatus(esClient, featureSet)).resolves.toHaveProperty( @@ -240,6 +122,7 @@ describe('getESUpgradeStatus', () => { }, ], }, + data_streams: {}, }); const upgradeStatus = await getESUpgradeStatus(esClient, featureSet); @@ -249,38 +132,44 @@ describe('getESUpgradeStatus', () => { }); it('filters out ml_settings if featureSet.mlSnapshots is set to false', async () => { - esClient.asCurrentUser.migration.deprecations.mockResponse({ - cluster_settings: [], - node_settings: [], - ml_settings: [ - { - level: 'warning', - message: 'Datafeed [deprecation-datafeed] uses deprecated query options', - url: 'https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-7.0.html#breaking_70_search_changes', - details: - '[Deprecated field [use_dis_max] used, replaced by [Set [tie_breaker] to 1 instead]]', - // @ts-ignore - resolve_during_rolling_upgrade: false, - }, - { - level: 'critical', - message: - 'model snapshot [1] for job [deprecation_check_job] needs to be deleted or upgraded', - url: '', - details: 'details', - // @ts-ignore - _meta: { snapshot_id: '1', job_id: 'deprecation_check_job' }, - // @ts-ignore - resolve_during_rolling_upgrade: false, - }, - ], - index_settings: {}, + const mockResponse = { + ...esMigrationsMock.getMockEsDeprecations(), + ...esMigrationsMock.getMockMlSettingsDeprecations(), + }; + // @ts-ignore missing property definitions in ES resolve_during_rolling_upgrade and _meta + esClient.asCurrentUser.migration.deprecations.mockResponse(mockResponse); + + const enabledUpgradeStatus = await getESUpgradeStatus(esClient, { ...featureSet }); + expect(enabledUpgradeStatus.deprecations).toHaveLength(2); + expect(enabledUpgradeStatus.totalCriticalDeprecations).toBe(1); + + const disabledUpgradeStatus = await getESUpgradeStatus(esClient, { + ...featureSet, + mlSnapshots: false, }); - const upgradeStatus = await getESUpgradeStatus(esClient, { ...featureSet, mlSnapshots: false }); + expect(disabledUpgradeStatus.deprecations).toHaveLength(0); + expect(disabledUpgradeStatus.totalCriticalDeprecations).toBe(0); + }); - expect(upgradeStatus.deprecations).toHaveLength(0); - expect(upgradeStatus.totalCriticalDeprecations).toBe(0); + it('filters out data_streams if featureSet.migrateDataStreams is set to false', async () => { + const mockResponse = { + ...esMigrationsMock.getMockEsDeprecations(), + ...esMigrationsMock.getMockDataStreamDeprecations(), + }; + esClient.asCurrentUser.migration.deprecations.mockResponse(mockResponse); + + const enabledUpgradeStatus = await getESUpgradeStatus(esClient, { ...featureSet }); + expect(enabledUpgradeStatus.deprecations).toHaveLength(1); + expect(enabledUpgradeStatus.totalCriticalDeprecations).toBe(1); + + const disabledUpgradeStatus = await getESUpgradeStatus(esClient, { + ...featureSet, + migrateDataStreams: false, + }); + + expect(disabledUpgradeStatus.deprecations).toHaveLength(0); + expect(disabledUpgradeStatus.totalCriticalDeprecations).toBe(0); }); it('filters out reindex corrective actions if featureSet.reindexCorrectiveActions is set to false', async () => { @@ -306,6 +195,7 @@ describe('getESUpgradeStatus', () => { ], ml_settings: [], index_settings: {}, + data_streams: {}, }); const upgradeStatus = await getESUpgradeStatus(esClient, { @@ -332,6 +222,7 @@ describe('getESUpgradeStatus', () => { ], ml_settings: [], index_settings: {}, + data_streams: {}, }); esClient.asCurrentUser.healthReport.mockResponse({ @@ -380,6 +271,7 @@ describe('getESUpgradeStatus', () => { "type": "reindex", }, "details": "This index was created using version: 6.8.13", + "index": undefined, "isCritical": true, "message": "Index created before 7.0", "resolveDuringUpgrade": false, diff --git a/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status/index.ts b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status/index.ts new file mode 100644 index 0000000000000..062c62660a538 --- /dev/null +++ b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status/index.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 { IScopedClusterClient } from '@kbn/core/server'; +import { EnrichedDeprecationInfo, ESUpgradeStatus, FeatureSet } from '../../../common/types'; +import { getEnrichedDeprecations } from './migrations'; +import { getHealthIndicators } from './health_indicators'; + +export async function getESUpgradeStatus( + dataClient: IScopedClusterClient, + featureSet: FeatureSet +): Promise { + const getCombinedDeprecations = async () => { + const healthIndicators = await getHealthIndicators(dataClient); + const enrichedDeprecations = await getEnrichedDeprecations(dataClient); + + const toggledMigrationsDeprecations = enrichedDeprecations.filter( + ({ type, correctiveAction }) => { + /** + * This disables showing the ML deprecations in the UA if `featureSet.mlSnapshots` + * is set to `false`. + * + * This config should be set to true only on the `x.last` versions, or when + * the constant `MachineLearningField.MIN_CHECKED_SUPPORTED_SNAPSHOT_VERSION` + * is incremented to something higher than 7.0.0 in the Elasticsearch code. + */ + if (type === 'ml_settings' || correctiveAction?.type === 'mlSnapshot') { + return featureSet.mlSnapshots; + } + + /** + * This disables showing the Data streams deprecations in the UA if + * `featureSet.migrateDataStreams` is set to `false`. + */ + if (type === 'data_streams') { + return !!featureSet.migrateDataStreams; + } + + /** + * This disables showing the reindexing deprecations in the UA if + * `featureSet.reindexCorrectiveActions` is set to `false`. + */ + if (correctiveAction?.type === 'reindex') { + return !!featureSet.reindexCorrectiveActions; + } + + return true; + } + ); + + const enrichedHealthIndicators = healthIndicators.filter(({ status }) => { + return status !== 'green'; + }) as EnrichedDeprecationInfo[]; + + return [...enrichedHealthIndicators, ...toggledMigrationsDeprecations]; + }; + + const combinedDeprecations = await getCombinedDeprecations(); + const criticalWarnings = combinedDeprecations.filter(({ isCritical }) => isCritical === true); + + return { + totalCriticalDeprecations: criticalWarnings.length, + deprecations: combinedDeprecations, + }; +} diff --git a/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status/migrations.ts b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status/migrations.ts new file mode 100644 index 0000000000000..39d9984a64aa1 --- /dev/null +++ b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status/migrations.ts @@ -0,0 +1,157 @@ +/* + * 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 { + MigrationDeprecationsResponse, + MigrationDeprecationsDeprecation, +} from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { IScopedClusterClient } from '@kbn/core-elasticsearch-server'; +import _ from 'lodash'; +import { EnrichedDeprecationInfo } from '../../../common/types'; +import { + convertFeaturesToIndicesArray, + getESSystemIndicesMigrationStatus, +} from '../es_system_indices_migration'; +import { getCorrectiveAction } from './get_corrective_actions'; +import { esIndicesStateCheck } from '../es_indices_state_check'; + +/** + * Remove once the data_streams type is added to the `MigrationDeprecationsResponse` type + */ +interface EsDeprecations extends MigrationDeprecationsResponse { + data_streams: Record; +} + +const createBaseMigrationDeprecation = ( + migrationDeprecation: MigrationDeprecationsDeprecation, + { deprecationType, indexName }: { deprecationType: keyof EsDeprecations; indexName?: string } +) => { + const { + details, + message, + url, + level, + // @ts-expect-error @elastic/elasticsearch _meta not available yet in MigrationDeprecationInfoResponse + _meta: metadata, + // @ts-expect-error @elastic/elasticsearch resolve_during_rolling_upgrade not available yet in MigrationDeprecationInfoResponse + resolve_during_rolling_upgrade: resolveDuringUpgrade, + } = migrationDeprecation; + + return { + index: indexName, + type: deprecationType, + details, + message, + url, + isCritical: level === 'critical', + metadata, + resolveDuringUpgrade, + }; +}; + +const normalizeEsResponse = (migrationsResponse: EsDeprecations) => { + const indexSettingsMigrations = Object.entries(migrationsResponse.index_settings).flatMap( + ([indexName, migrationDeprecations]) => { + return migrationDeprecations.flatMap((migrationDeprecation) => + createBaseMigrationDeprecation(migrationDeprecation, { + indexName, + deprecationType: 'index_settings', + }) + ); + } + ); + + const dataStreamsMigrations = Object.entries(migrationsResponse.data_streams).flatMap( + ([indexName, dataStreamDeprecations]) => { + return dataStreamDeprecations.flatMap((depractionData) => + createBaseMigrationDeprecation(depractionData, { + indexName, + deprecationType: 'data_streams', + }) + ); + } + ); + + const mlSettingsMigrations = migrationsResponse.ml_settings.map((depractionData) => + createBaseMigrationDeprecation(depractionData, { deprecationType: 'ml_settings' }) + ); + const nodeSettingsMigrations = migrationsResponse.node_settings.map((depractionData) => + createBaseMigrationDeprecation(depractionData, { deprecationType: 'node_settings' }) + ); + + const clusterSettingsMigrations = migrationsResponse.cluster_settings.map((depractionData) => + createBaseMigrationDeprecation(depractionData, { deprecationType: 'cluster_settings' }) + ); + + return [ + ...clusterSettingsMigrations, + ...mlSettingsMigrations, + ...nodeSettingsMigrations, + ...indexSettingsMigrations, + ...dataStreamsMigrations, + ].flat(); +}; + +export const getEnrichedDeprecations = async ( + dataClient: IScopedClusterClient +): Promise => { + const deprecations = (await dataClient.asCurrentUser.migration.deprecations()) as EsDeprecations; + const systemIndices = await getESSystemIndicesMigrationStatus(dataClient.asCurrentUser); + + const systemIndicesList = convertFeaturesToIndicesArray(systemIndices.features); + + const indexSettingsIndexNames = Object.keys(deprecations.index_settings).map( + (indexName) => indexName! + ); + const indexSettingsIndexStates = indexSettingsIndexNames.length + ? await esIndicesStateCheck(dataClient.asCurrentUser, indexSettingsIndexNames) + : {}; + + return normalizeEsResponse(deprecations) + .filter((deprecation) => { + switch (deprecation.type) { + case 'index_settings': { + if (!deprecation.index) { + return false; + } + // filter out system indices + return !systemIndicesList.includes(deprecation.index); + } + case 'cluster_settings': + case 'ml_settings': + case 'node_settings': + case 'data_streams': { + return true; + } + default: { + // Throwing here to avoid allowing upgrades while we have unhandled deprecation types from ES + // That might cause the stack to fail to start after upgrade. + throw new Error(`Unknown ES deprecation type "${deprecation.type}"`); + } + } + }) + .map((deprecation) => { + const correctiveAction = getCorrectiveAction( + deprecation.message, + deprecation.metadata, + deprecation.index! + ); + + // If we have found deprecation information for index/indices + // check whether the index is open or closed. + if (deprecation.type === 'index_settings' && correctiveAction?.type === 'reindex') { + correctiveAction.blockerForReindexing = + indexSettingsIndexStates[deprecation.index!] === 'closed' ? 'index-closed' : undefined; + } + + const enrichedDeprecation = _.omit(deprecation, 'metadata'); + return { + ...enrichedDeprecation, + correctiveAction, + }; + }); +}; diff --git a/x-pack/plugins/upgrade_assistant/tsconfig.json b/x-pack/plugins/upgrade_assistant/tsconfig.json index 85fb886ca2af3..d78cafa21551b 100644 --- a/x-pack/plugins/upgrade_assistant/tsconfig.json +++ b/x-pack/plugins/upgrade_assistant/tsconfig.json @@ -42,7 +42,8 @@ "@kbn/deeplinks-observability", "@kbn/core-logging-server-mocks", "@kbn/core-http-server-mocks", - "@kbn/core-http-server-utils" + "@kbn/core-http-server-utils", + "@kbn/core-elasticsearch-server" ], "exclude": [ "target/**/*", diff --git a/x-pack/test/accessibility/apps/group3/reporting.ts b/x-pack/test/accessibility/apps/group3/reporting.ts index 45959e42b383a..edd5bbeb0a0a6 100644 --- a/x-pack/test/accessibility/apps/group3/reporting.ts +++ b/x-pack/test/accessibility/apps/group3/reporting.ts @@ -20,7 +20,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const createReportingUser = async () => { await security.user.create(reporting.REPORTING_USER_USERNAME, { password: reporting.REPORTING_USER_PASSWORD, - roles: ['reporting_user', 'data_analyst', 'kibana_user'], // Deprecated: using built-in `reporting_user` role grants all Reporting privileges + roles: ['data_analyst', 'kibana_user'], full_name: 'a reporting user', }); }; diff --git a/x-pack/test/alerting_api_integration/common/config.ts b/x-pack/test/alerting_api_integration/common/config.ts index b8a576f99b8d0..04d6a1c48b98e 100644 --- a/x-pack/test/alerting_api_integration/common/config.ts +++ b/x-pack/test/alerting_api_integration/common/config.ts @@ -217,7 +217,6 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions) ...emailSettings, ...maxScheduledPerMinuteSettings, '--xpack.eventLog.logEntries=true', - '--xpack.task_manager.ephemeral_tasks.enabled=false', `--xpack.task_manager.unsafe.exclude_task_types=${JSON.stringify([ 'actions:test.excluded', ])}`, diff --git a/x-pack/test/alerting_api_integration/common/plugins/alerts/server/plugin.ts b/x-pack/test/alerting_api_integration/common/plugins/alerts/server/plugin.ts index 9210e9f71ed9c..62b6d6594b06c 100644 --- a/x-pack/test/alerting_api_integration/common/plugins/alerts/server/plugin.ts +++ b/x-pack/test/alerting_api_integration/common/plugins/alerts/server/plugin.ts @@ -8,10 +8,7 @@ import { Plugin, CoreSetup, CoreStart, Logger, PluginInitializerContext } from '@kbn/core/server'; import { firstValueFrom, Subject } from 'rxjs'; import { PluginSetupContract as ActionsPluginSetup } from '@kbn/actions-plugin/server/plugin'; -import { - PluginStartContract as AlertingPluginsStart, - PluginSetupContract as AlertingPluginSetup, -} from '@kbn/alerting-plugin/server/plugin'; +import { AlertingServerSetup, AlertingServerStart } from '@kbn/alerting-plugin/server/plugin'; import { TaskManagerSetupContract, TaskManagerStartContract, @@ -25,6 +22,7 @@ import { RuleRegistryPluginSetupContract } from '@kbn/rule-registry-plugin/serve import { IEventLogClientService } from '@kbn/event-log-plugin/server'; import { NotificationsPluginStart } from '@kbn/notifications-plugin/server'; import { RULE_SAVED_OBJECT_TYPE } from '@kbn/alerting-plugin/server'; +import { ALERTING_FEATURE_ID } from '@kbn/alerting-plugin/common'; import { KibanaFeatureScope } from '@kbn/features-plugin/common'; import { defineRoutes } from './routes'; import { defineActionTypes } from './action_types'; @@ -34,13 +32,13 @@ import { defineConnectorAdapters } from './connector_adapters'; export interface FixtureSetupDeps { features: FeaturesPluginSetup; actions: ActionsPluginSetup; - alerting: AlertingPluginSetup; + alerting: AlertingServerSetup; taskManager: TaskManagerSetupContract; ruleRegistry: RuleRegistryPluginSetupContract; } export interface FixtureStartDeps { - alerting: AlertingPluginsStart; + alerting: AlertingServerStart; encryptedSavedObjects: EncryptedSavedObjectsPluginStart; security?: SecurityPluginStart; spaces?: SpacesPluginStart; @@ -50,6 +48,35 @@ export interface FixtureStartDeps { notifications: NotificationsPluginStart; } +const testRuleTypes = [ + 'test.always-firing', + 'test.cumulative-firing', + 'test.never-firing', + 'test.failing', + 'test.authorization', + 'test.delayed', + 'test.validation', + 'test.onlyContextVariables', + 'test.onlyStateVariables', + 'test.noop', + 'test.unrestricted-noop', + 'test.patternFiring', + 'test.patternSuccessOrFailure', + 'test.throw', + 'test.longRunning', + 'test.exceedsAlertLimit', + 'test.always-firing-alert-as-data', + 'test.patternFiringAad', + 'test.waitingRule', + 'test.patternFiringAutoRecoverFalse', + 'test.severity', +]; + +const testAlertingFeatures = testRuleTypes.map((ruleTypeId) => ({ + ruleTypeId, + consumers: ['alertsFixture', ALERTING_FEATURE_ID], +})); + export class FixturePlugin implements Plugin { private readonly logger: Logger; @@ -72,30 +99,8 @@ export class FixturePlugin implements Plugin { + // Failing: See https://github.com/elastic/kibana/issues/202337 + // Failing: See https://github.com/elastic/kibana/issues/196257 + describe.skip('SyntheticsCustomStatusRule', () => { const SYNTHETICS_RULE_ALERT_INDEX = '.alerts-observability.uptime.alerts-default'; before(async () => { diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/schedule.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/schedule.ts index ab4734239ce0d..d2fdb7f4365f4 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/schedule.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/schedule.ts @@ -127,6 +127,7 @@ export default function scheduleBackfillTests({ getService }: FtrProviderContext username: user.username, password: user.password, }; + it('should handle scheduling backfill job requests appropriately', async () => { const defaultStart = moment().utc().startOf('day').subtract(7, 'days').toISOString(); const defaultEnd = moment().utc().startOf('day').subtract(1, 'day').toISOString(); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/bulk_untrack_by_query.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/bulk_untrack_by_query.ts index 794cb73677730..66d04b723ca03 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/bulk_untrack_by_query.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/bulk_untrack_by_query.ts @@ -130,7 +130,7 @@ export default function bulkUntrackByQueryTests({ getService }: FtrProviderConte }, }, ], - feature_ids: ['alertsFixture'], + rule_type_ids: ['test.always-firing-alert-as-data'], }); switch (scenario.id) { diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/create.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/create.ts index 95e6f7043c90b..d0716df4e2db9 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/create.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/create.ts @@ -261,18 +261,11 @@ export default function createAlertTests({ getService }: FtrProviderContext) { switch (scenario.id) { case 'no_kibana_privileges at space1': case 'space_1_all at space2': - expect(response.statusCode).to.eql(403); - expect(response.body).to.eql({ - error: 'Forbidden', - message: getUnauthorizedErrorMessage('create', 'test.noop', 'alerts'), - statusCode: 403, - }); - break; case 'global_read at space1': expect(response.statusCode).to.eql(403); expect(response.body).to.eql({ error: 'Forbidden', - message: getUnauthorizedErrorMessage('create', 'test.noop', 'alertsFixture'), + message: getUnauthorizedErrorMessage('create', 'test.noop', 'alerts'), statusCode: 403, }); break; diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/delete.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/delete.ts index d6cb57261a558..6814ed46c42b3 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/delete.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/delete.ts @@ -219,7 +219,7 @@ export default function createDeleteTests({ getService }: FtrProviderContext) { expect(response.statusCode).to.eql(403); expect(response.body).to.eql({ error: 'Forbidden', - message: getUnauthorizedErrorMessage('delete', 'test.noop', 'alertsFixture'), + message: getUnauthorizedErrorMessage('delete', 'test.noop', 'alerts'), statusCode: 403, }); objectRemover.add(space.id, createdAlert.id, 'rule', 'alerting'); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/disable.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/disable.ts index 264df417440f3..aa43d52d60ad4 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/disable.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/disable.ts @@ -255,18 +255,11 @@ export default function createDisableAlertTests({ getService }: FtrProviderConte switch (scenario.id) { case 'no_kibana_privileges at space1': case 'space_1_all at space2': - expect(response.statusCode).to.eql(403); - expect(response.body).to.eql({ - error: 'Forbidden', - message: getUnauthorizedErrorMessage('disable', 'test.noop', 'alerts'), - statusCode: 403, - }); - break; case 'global_read at space1': expect(response.statusCode).to.eql(403); expect(response.body).to.eql({ error: 'Forbidden', - message: getUnauthorizedErrorMessage('disable', 'test.noop', 'alertsFixture'), + message: getUnauthorizedErrorMessage('disable', 'test.noop', 'alerts'), statusCode: 403, }); break; diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/enable.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/enable.ts index 581f6f13a63b7..eef6ff320a828 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/enable.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/enable.ts @@ -246,18 +246,11 @@ export default function createEnableAlertTests({ getService }: FtrProviderContex switch (scenario.id) { case 'no_kibana_privileges at space1': case 'space_1_all at space2': - expect(response.statusCode).to.eql(403); - expect(response.body).to.eql({ - error: 'Forbidden', - message: getUnauthorizedErrorMessage('enable', 'test.noop', 'alerts'), - statusCode: 403, - }); - break; case 'global_read at space1': expect(response.statusCode).to.eql(403); expect(response.body).to.eql({ error: 'Forbidden', - message: getUnauthorizedErrorMessage('enable', 'test.noop', 'alertsFixture'), + message: getUnauthorizedErrorMessage('enable', 'test.noop', 'alerts'), statusCode: 403, }); break; diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/find.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/find.ts index bf5595e5756c1..da74893f81713 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/find.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/find.ts @@ -8,12 +8,7 @@ import expect from '@kbn/expect'; import { chunk, omit } from 'lodash'; import { v4 as uuidv4 } from 'uuid'; -import { - ES_QUERY_ID, - ML_ANOMALY_DETECTION_RULE_TYPE_ID, - OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, -} from '@kbn/rule-data-utils'; -import { SuperuserAtSpace1, UserAtSpaceScenarios, StackAlertsOnly } from '../../../scenarios'; +import { SuperuserAtSpace1, UserAtSpaceScenarios } from '../../../scenarios'; import { getUrlPrefix, getTestRuleData, ObjectRemover } from '../../../../common/lib'; import { FtrProviderContext } from '../../../../common/ftr_provider_context'; @@ -614,120 +609,5 @@ export default function createFindTests({ getService }: FtrProviderContext) { ]); }); }); - - describe('stack alerts', () => { - const ruleTypes = [ - [ - ES_QUERY_ID, - { - searchType: 'esQuery', - timeWindowSize: 5, - timeWindowUnit: 'm', - threshold: [1000], - thresholdComparator: '>', - size: 100, - esQuery: '{\n "query":{\n "match_all" : {}\n }\n }', - aggType: 'count', - groupBy: 'all', - termSize: 5, - excludeHitsFromPreviousRun: false, - sourceFields: [], - index: ['.kibana'], - timeField: 'created_at', - }, - ], - [ - OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, - { - criteria: [ - { - comparator: '>', - metrics: [ - { - name: 'A', - aggType: 'count', - }, - ], - threshold: [100], - timeSize: 1, - timeUnit: 'm', - }, - ], - alertOnNoData: false, - alertOnGroupDisappear: false, - searchConfiguration: { - query: { - query: '', - language: 'kuery', - }, - index: 'kibana-event-log-data-view', - }, - }, - ], - [ - ML_ANOMALY_DETECTION_RULE_TYPE_ID, - { - severity: 75, - resultType: 'bucket', - includeInterim: false, - jobSelection: { - jobIds: ['low_request_rate'], - }, - }, - ], - ]; - - const createRule = async (rule = {}) => { - const { body: createdAlert } = await supertest - .post(`${getUrlPrefix('space1')}/api/alerting/rule`) - .set('kbn-xsrf', 'foo') - .send(getTestRuleData({ ...rule })) - .expect(200); - - objectRemover.add('space1', createdAlert.id, 'rule', 'alerting'); - }; - - for (const [ruleTypeId, params] of ruleTypes) { - it(`should get rules of ${ruleTypeId} rule type ID and stackAlerts consumer`, async () => { - /** - * We create two rules. The first one is a test.noop - * rule with stackAlerts as consumer. The second rule - * is has different rule type ID but with the same consumer as the first rule (stackAlerts). - * This way we can verify that the find API call returns only the rules the user is authorized to. - * Specifically only the second rule because the StackAlertsOnly user does not have - * access to the test.noop rule type. - */ - await createRule({ consumer: 'stackAlerts' }); - await createRule({ rule_type_id: ruleTypeId, params, consumer: 'stackAlerts' }); - - const response = await supertestWithoutAuth - .get(`${getUrlPrefix('space1')}/api/alerting/rules/_find`) - .auth(StackAlertsOnly.username, StackAlertsOnly.password); - - expect(response.statusCode).to.eql(200); - expect(response.body.total).to.equal(1); - expect(response.body.data[0].rule_type_id).to.equal(ruleTypeId); - expect(response.body.data[0].consumer).to.equal('stackAlerts'); - }); - } - - for (const [ruleTypeId, params] of ruleTypes) { - it(`should NOT get rules of ${ruleTypeId} rule type ID and NOT stackAlerts consumer`, async () => { - /** - * We create two rules with logs as consumer. The user is authorized to - * access rules only with the stackAlerts consumers. - */ - await createRule({ consumer: 'logs' }); - await createRule({ rule_type_id: ruleTypeId, params, consumer: 'logs' }); - - const response = await supertestWithoutAuth - .get(`${getUrlPrefix('space1')}/api/alerting/rules/_find`) - .auth(StackAlertsOnly.username, StackAlertsOnly.password); - - expect(response.statusCode).to.eql(200); - expect(response.body.total).to.equal(0); - }); - } - }); }); } diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/find_internal.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/find_internal.ts index ee8d49c662ada..751d5cf169836 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/find_internal.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/find_internal.ts @@ -13,7 +13,13 @@ import { ML_ANOMALY_DETECTION_RULE_TYPE_ID, OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, } from '@kbn/rule-data-utils'; -import { SuperuserAtSpace1, UserAtSpaceScenarios, StackAlertsOnly } from '../../../scenarios'; +import { Space } from '../../../../common/types'; +import { + Space1AllAtSpace1, + StackAlertsOnly, + SuperuserAtSpace1, + UserAtSpaceScenarios, +} from '../../../scenarios'; import { getUrlPrefix, getTestRuleData, ObjectRemover } from '../../../../common/lib'; import { FtrProviderContext } from '../../../../common/ftr_provider_context'; @@ -31,40 +37,13 @@ export default function createFindTests({ getService }: FtrProviderContext) { for (const scenario of UserAtSpaceScenarios) { const { user, space } = scenario; + describe(scenario.id, () => { it('should handle find alert request appropriately', async () => { - const { body: createdAction } = await supertest - .post(`${getUrlPrefix(space.id)}/api/actions/connector`) - .set('kbn-xsrf', 'foo') - .send({ - name: 'MY action', - connector_type_id: 'test.noop', - config: {}, - secrets: {}, - }) - .expect(200); - const { body: createdAlert } = await supertest .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) .set('kbn-xsrf', 'foo') - .send( - getTestRuleData({ - actions: [ - { - group: 'default', - id: createdAction.id, - params: {}, - frequency: { - summary: false, - notify_when: 'onThrottleInterval', - throttle: '1m', - }, - }, - ], - notify_when: undefined, - throttle: undefined, - }) - ) + .send(getTestRuleData()) .expect(200); objectRemover.add(space.id, createdAlert.id, 'rule', 'alerting'); @@ -108,37 +87,23 @@ export default function createFindTests({ getService }: FtrProviderContext) { consumer: 'alertsFixture', schedule: { interval: '1m' }, enabled: true, - actions: [ - { - group: 'default', - id: createdAction.id, - connector_type_id: 'test.noop', - params: {}, - uuid: match.actions[0].uuid, - frequency: { - summary: false, - notify_when: 'onThrottleInterval', - throttle: '1m', - }, - }, - ], + actions: [], params: {}, created_by: 'elastic', + api_key_created_by_user: false, + revision: 0, scheduled_task_id: match.scheduled_task_id, created_at: match.created_at, updated_at: match.updated_at, - throttle: null, - notify_when: null, + throttle: '1m', + notify_when: 'onThrottleInterval', updated_by: 'elastic', api_key_owner: 'elastic', - api_key_created_by_user: false, mute_all: false, muted_alert_ids: [], - revision: 0, execution_status: match.execution_status, ...(match.next_run ? { next_run: match.next_run } : {}), ...(match.last_run ? { last_run: match.last_run } : {}), - monitoring: match.monitoring, snooze_schedule: match.snooze_schedule, ...(hasActiveSnoozes && { active_snoozes: activeSnoozes }), @@ -153,40 +118,15 @@ export default function createFindTests({ getService }: FtrProviderContext) { }); it('should filter out types that the user is not authorized to `get` retaining pagination', async () => { - async function createNoOpAlert(overrides = {}) { - const alert = getTestRuleData(overrides); - const { body: createdAlert } = await supertest - .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) - .set('kbn-xsrf', 'foo') - .send(alert) - .expect(200); - objectRemover.add(space.id, createdAlert.id, 'rule', 'alerting'); - return { - id: createdAlert.id, - rule_type_id: alert.rule_type_id, - }; - } - function createRestrictedNoOpAlert() { - return createNoOpAlert({ - rule_type_id: 'test.restricted-noop', - consumer: 'alertsRestrictedFixture', - }); - } - function createUnrestrictedNoOpAlert() { - return createNoOpAlert({ - rule_type_id: 'test.unrestricted-noop', - consumer: 'alertsFixture', - }); - } const allAlerts = []; - allAlerts.push(await createNoOpAlert()); - allAlerts.push(await createNoOpAlert()); - allAlerts.push(await createRestrictedNoOpAlert()); - allAlerts.push(await createUnrestrictedNoOpAlert()); - allAlerts.push(await createUnrestrictedNoOpAlert()); - allAlerts.push(await createRestrictedNoOpAlert()); - allAlerts.push(await createNoOpAlert()); - allAlerts.push(await createNoOpAlert()); + allAlerts.push(await createNoOpAlert(space)); + allAlerts.push(await createNoOpAlert(space)); + allAlerts.push(await createRestrictedNoOpAlert(space)); + allAlerts.push(await createUnrestrictedNoOpAlert(space)); + allAlerts.push(await createUnrestrictedNoOpAlert(space)); + allAlerts.push(await createRestrictedNoOpAlert(space)); + allAlerts.push(await createNoOpAlert(space)); + allAlerts.push(await createNoOpAlert(space)); const perPage = 4; @@ -233,25 +173,24 @@ export default function createFindTests({ getService }: FtrProviderContext) { expect(response.body.per_page).to.be.equal(perPage); expect(response.body.total).to.be.equal(8); - { - const [firstPage, secondPage] = chunk( - allAlerts.map((alert) => alert.id), - perPage - ); - expect(response.body.data.map((alert: any) => alert.id)).to.eql(firstPage); - - const secondResponse = await supertestWithoutAuth - .post(`${getUrlPrefix(space.id)}/internal/alerting/rules/_find`) - .set('kbn-xsrf', 'foo') - .auth(user.username, user.password) - .send({ - per_page: perPage, - sort_field: 'createdAt', - page: 2, - }); - - expect(secondResponse.body.data.map((alert: any) => alert.id)).to.eql(secondPage); - } + const [firstPage, secondPage] = chunk( + allAlerts.map((alert) => alert.id), + perPage + ); + expect(response.body.data.map((alert: any) => alert.id)).to.eql(firstPage); + + const secondResponse = await supertestWithoutAuth + .post(`${getUrlPrefix(space.id)}/internal/alerting/rules/_find`) + .set('kbn-xsrf', 'foo') + .auth(user.username, user.password) + .send({ + per_page: perPage, + sort_field: 'createdAt', + page: '2', + }); + + expect(secondResponse.statusCode).to.eql(200); + expect(secondResponse.body.data.map((alert: any) => alert.id)).to.eql(secondPage); break; default: @@ -294,7 +233,7 @@ export default function createFindTests({ getService }: FtrProviderContext) { .set('kbn-xsrf', 'foo') .auth(user.username, user.password) .send({ - filter: 'alert.attributes.actions:{ actionTypeId: test.noop }', + filter: 'alert.attributes.actions:{ actionTypeId: "test.noop" }', }); switch (scenario.id) { @@ -334,13 +273,14 @@ export default function createFindTests({ getService }: FtrProviderContext) { group: 'default', connector_type_id: 'test.noop', params: {}, - uuid: createdAlert.actions[0].uuid, + uuid: match.actions[0].uuid, }, ], params: {}, created_by: 'elastic', - throttle: '1m', api_key_created_by_user: null, + revision: 0, + throttle: '1m', updated_by: 'elastic', api_key_owner: null, mute_all: false, @@ -349,7 +289,6 @@ export default function createFindTests({ getService }: FtrProviderContext) { created_at: match.created_at, updated_at: match.updated_at, execution_status: match.execution_status, - revision: 0, ...(match.next_run ? { next_run: match.next_run } : {}), ...(match.last_run ? { last_run: match.last_run } : {}), monitoring: match.monitoring, @@ -577,73 +516,153 @@ export default function createFindTests({ getService }: FtrProviderContext) { throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`); } }); + + it('should filter by rule type IDs correctly', async () => { + await createNoOpAlert(space); + await createRestrictedNoOpAlert(space); + await createUnrestrictedNoOpAlert(space); + + const perPage = 10; + const ruleTypeIds = ['test.restricted-noop', 'test.noop']; + + const response = await supertestWithoutAuth + .post(`${getUrlPrefix(space.id)}/internal/alerting/rules/_find`) + .set('kbn-xsrf', 'foo') + .auth(user.username, user.password) + .send({ + per_page: perPage, + sort_field: 'createdAt', + rule_type_ids: ruleTypeIds, + }); + + switch (scenario.id) { + case 'no_kibana_privileges at space1': + case 'space_1_all at space2': + expect(response.statusCode).to.eql(403); + expect(response.body).to.eql({ + error: 'Forbidden', + message: `Unauthorized to find rules for any rule types`, + statusCode: 403, + }); + break; + case 'space_1_all at space1': + case 'space_1_all_alerts_none_actions at space1': + expect(response.statusCode).to.eql(200); + expect(response.body.total).to.be.equal(1); + + expect( + response.body.data.every( + (rule: { rule_type_id: string }) => rule.rule_type_id === 'test.noop' + ) + ).to.be.eql(true); + break; + case 'global_read at space1': + case 'superuser at space1': + case 'space_1_all_with_restricted_fixture at space1': + expect(response.statusCode).to.eql(200); + expect(response.body.total).to.be.equal(2); + + expect( + response.body.data.every((rule: { rule_type_id: string }) => + ruleTypeIds.includes(rule.rule_type_id) + ) + ).to.be.eql(true); + break; + default: + throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`); + } + }); }); } - describe('Actions', () => { - const { user, space } = SuperuserAtSpace1; + describe('filtering', () => { + it('should return the correct rules when trying to exploit RBAC through the ruleTypeIds parameter', async () => { + const { user, space } = Space1AllAtSpace1; - it('should return the actions correctly', async () => { - const { body: createdAction } = await supertest - .post(`${getUrlPrefix(space.id)}/api/actions/connector`) + const { body: createdAlert1 } = await supertest + .post(`${getUrlPrefix(SuperuserAtSpace1.space.id)}/api/alerting/rule`) .set('kbn-xsrf', 'foo') - .send({ - name: 'MY action', - connector_type_id: 'test.noop', - config: {}, - secrets: {}, - }) + .send( + getTestRuleData({ + rule_type_id: 'test.restricted-noop', + consumer: 'alertsRestrictedFixture', + }) + ) + .auth(SuperuserAtSpace1.user.username, SuperuserAtSpace1.user.password) .expect(200); - const { body: createdRule1 } = await supertest - .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) + const { body: createdAlert2 } = await supertest + .post(`${getUrlPrefix(SuperuserAtSpace1.space.id)}/api/alerting/rule`) .set('kbn-xsrf', 'foo') .send( getTestRuleData({ - enabled: true, - actions: [ - { - id: createdAction.id, - group: 'default', - params: {}, - }, - { - id: 'system-connector-test.system-action', - params: {}, - }, - ], + rule_type_id: 'test.noop', + consumer: 'alertsFixture', }) ) + .auth(SuperuserAtSpace1.user.username, SuperuserAtSpace1.user.password) .expect(200); - objectRemover.add(space.id, createdRule1.id, 'rule', 'alerting'); + objectRemover.add(SuperuserAtSpace1.space.id, createdAlert1.id, 'rule', 'alerting'); + objectRemover.add(SuperuserAtSpace1.space.id, createdAlert2.id, 'rule', 'alerting'); const response = await supertestWithoutAuth - .get(`${getUrlPrefix(space.id)}/api/alerting/rules/_find`) + .post(`${getUrlPrefix(space.id)}/internal/alerting/rules/_find`) .set('kbn-xsrf', 'foo') - .auth(user.username, user.password); + .auth(user.username, user.password) + .send({ + rule_type_ids: ['test.noop', 'test.restricted-noop'], + }); - const action = response.body.data[0].actions[0]; - const systemAction = response.body.data[0].actions[1]; - const { uuid, ...restAction } = action; - const { uuid: systemActionUuid, ...restSystemAction } = systemAction; + expect(response.status).to.eql(200); + expect(response.body.total).to.equal(1); + expect(response.body.data[0].rule_type_id).to.eql('test.noop'); + }); - expect([restAction, restSystemAction]).to.eql([ - { - id: createdAction.id, - connector_type_id: 'test.noop', - group: 'default', - params: {}, - }, - { - id: 'system-connector-test.system-action', - connector_type_id: 'test.system-action', - params: {}, - }, - , - ]); + it('should return the correct rules when trying to exploit RBAC through the consumers parameter', async () => { + const { user, space } = Space1AllAtSpace1; + + const { body: createdAlert1 } = await supertest + .post(`${getUrlPrefix(SuperuserAtSpace1.space.id)}/api/alerting/rule`) + .set('kbn-xsrf', 'foo') + .send( + getTestRuleData({ + rule_type_id: 'test.restricted-noop', + consumer: 'alertsRestrictedFixture', + }) + ) + .auth(SuperuserAtSpace1.user.username, SuperuserAtSpace1.user.password) + .expect(200); + + const { body: createdAlert2 } = await supertest + .post(`${getUrlPrefix(SuperuserAtSpace1.space.id)}/api/alerting/rule`) + .set('kbn-xsrf', 'foo') + .send( + getTestRuleData({ + rule_type_id: 'test.noop', + consumer: 'alertsFixture', + }) + ) + .auth(SuperuserAtSpace1.user.username, SuperuserAtSpace1.user.password) + .expect(200); + + objectRemover.add(SuperuserAtSpace1.space.id, createdAlert1.id, 'rule', 'alerting'); + objectRemover.add(SuperuserAtSpace1.space.id, createdAlert2.id, 'rule', 'alerting'); + + const response = await supertestWithoutAuth + .post(`${getUrlPrefix(space.id)}/internal/alerting/rules/_find`) + .set('kbn-xsrf', 'foo') + .auth(user.username, user.password) + .send({ + consumers: ['alertsFixture', 'alertsRestrictedFixture'], + }); + + expect(response.status).to.eql(200); + expect(response.body.total).to.equal(1); + expect(response.body.data[0].consumer).to.eql('alertsFixture'); }); }); + describe('stack alerts', () => { const ruleTypes = [ [ @@ -758,5 +777,35 @@ export default function createFindTests({ getService }: FtrProviderContext) { }); } }); + + async function createNoOpAlert(space: Space, overrides = {}) { + const alert = getTestRuleData(overrides); + const { body: createdAlert } = await supertest + .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) + .set('kbn-xsrf', 'foo') + .send(alert) + .expect(200); + + objectRemover.add(space.id, createdAlert.id, 'rule', 'alerting'); + + return { + id: createdAlert.id, + rule_type_id: alert.rule_type_id, + }; + } + + function createRestrictedNoOpAlert(space: Space) { + return createNoOpAlert(space, { + rule_type_id: 'test.restricted-noop', + consumer: 'alertsRestrictedFixture', + }); + } + + function createUnrestrictedNoOpAlert(space: Space) { + return createNoOpAlert(space, { + rule_type_id: 'test.unrestricted-noop', + consumer: 'alertsFixture', + }); + } }); } diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/find_with_post.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/find_with_post.ts deleted file mode 100644 index c8afff8fcc476..0000000000000 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/find_with_post.ts +++ /dev/null @@ -1,593 +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 expect from '@kbn/expect'; -import { Agent as SuperTestAgent } from 'supertest'; -import { chunk, omit } from 'lodash'; -import { v4 as uuidv4 } from 'uuid'; -import { SupertestWithoutAuthProviderType } from '@kbn/ftr-common-functional-services'; -import { UserAtSpaceScenarios } from '../../../scenarios'; -import { getUrlPrefix, getTestRuleData, ObjectRemover } from '../../../../common/lib'; -import { FtrProviderContext } from '../../../../common/ftr_provider_context'; - -const findTestUtils = ( - describeType: 'internal' | 'public', - objectRemover: ObjectRemover, - supertest: SuperTestAgent, - supertestWithoutAuth: SupertestWithoutAuthProviderType -) => { - describe(describeType, () => { - afterEach(async () => { - await objectRemover.removeAll(); - }); - - for (const scenario of UserAtSpaceScenarios) { - const { user, space } = scenario; - describe(scenario.id, () => { - it('should handle find alert request appropriately', async () => { - const { body: createdAlert } = await supertest - .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) - .set('kbn-xsrf', 'foo') - .send(getTestRuleData()) - .expect(200); - objectRemover.add(space.id, createdAlert.id, 'rule', 'alerting'); - - const response = await supertestWithoutAuth - .post( - `${getUrlPrefix(space.id)}/${ - describeType === 'public' ? 'api' : 'internal' - }/alerting/rules/_find` - ) - .set('kbn-xsrf', 'foo') - .auth(user.username, user.password) - .send({ - search: 'test.noop', - search_fields: 'alertTypeId', - }); - - switch (scenario.id) { - case 'no_kibana_privileges at space1': - case 'space_1_all at space2': - expect(response.statusCode).to.eql(403); - expect(response.body).to.eql({ - error: 'Forbidden', - message: `Unauthorized to find rules for any rule types`, - statusCode: 403, - }); - break; - case 'global_read at space1': - case 'superuser at space1': - case 'space_1_all at space1': - case 'space_1_all_alerts_none_actions at space1': - case 'space_1_all_with_restricted_fixture at space1': - expect(response.statusCode).to.eql(200); - expect(response.body.page).to.equal(1); - expect(response.body.per_page).to.be.greaterThan(0); - expect(response.body.total).to.be.greaterThan(0); - const match = response.body.data.find((obj: any) => obj.id === createdAlert.id); - const activeSnoozes = match.active_snoozes; - const hasActiveSnoozes = !!(activeSnoozes || []).filter((obj: any) => obj).length; - expect(match).to.eql({ - id: createdAlert.id, - name: 'abc', - tags: ['foo'], - rule_type_id: 'test.noop', - running: match.running ?? false, - consumer: 'alertsFixture', - schedule: { interval: '1m' }, - enabled: true, - actions: [], - params: {}, - created_by: 'elastic', - api_key_created_by_user: false, - revision: 0, - scheduled_task_id: match.scheduled_task_id, - created_at: match.created_at, - updated_at: match.updated_at, - throttle: '1m', - notify_when: 'onThrottleInterval', - updated_by: 'elastic', - api_key_owner: 'elastic', - mute_all: false, - muted_alert_ids: [], - execution_status: match.execution_status, - ...(match.next_run ? { next_run: match.next_run } : {}), - ...(match.last_run ? { last_run: match.last_run } : {}), - ...(describeType === 'internal' - ? { - monitoring: match.monitoring, - snooze_schedule: match.snooze_schedule, - ...(hasActiveSnoozes && { active_snoozes: activeSnoozes }), - is_snoozed_until: null, - } - : {}), - }); - expect(Date.parse(match.created_at)).to.be.greaterThan(0); - expect(Date.parse(match.updated_at)).to.be.greaterThan(0); - break; - default: - throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`); - } - }); - - it('should filter out types that the user is not authorized to `get` retaining pagination', async () => { - async function createNoOpAlert(overrides = {}) { - const alert = getTestRuleData(overrides); - const { body: createdAlert } = await supertest - .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) - .set('kbn-xsrf', 'foo') - .send(alert) - .expect(200); - objectRemover.add(space.id, createdAlert.id, 'rule', 'alerting'); - return { - id: createdAlert.id, - rule_type_id: alert.rule_type_id, - }; - } - function createRestrictedNoOpAlert() { - return createNoOpAlert({ - rule_type_id: 'test.restricted-noop', - consumer: 'alertsRestrictedFixture', - }); - } - function createUnrestrictedNoOpAlert() { - return createNoOpAlert({ - rule_type_id: 'test.unrestricted-noop', - consumer: 'alertsFixture', - }); - } - const allAlerts = []; - allAlerts.push(await createNoOpAlert()); - allAlerts.push(await createNoOpAlert()); - allAlerts.push(await createRestrictedNoOpAlert()); - allAlerts.push(await createUnrestrictedNoOpAlert()); - allAlerts.push(await createUnrestrictedNoOpAlert()); - allAlerts.push(await createRestrictedNoOpAlert()); - allAlerts.push(await createNoOpAlert()); - allAlerts.push(await createNoOpAlert()); - - const perPage = 4; - - const response = await supertestWithoutAuth - .post( - `${getUrlPrefix(space.id)}/${ - describeType === 'public' ? 'api' : 'internal' - }/alerting/rules/_find` - ) - .set('kbn-xsrf', 'foo') - .auth(user.username, user.password) - .send({ - per_page: perPage, - sort_field: 'createdAt', - }); - - switch (scenario.id) { - case 'no_kibana_privileges at space1': - case 'space_1_all at space2': - expect(response.statusCode).to.eql(403); - expect(response.body).to.eql({ - error: 'Forbidden', - message: `Unauthorized to find rules for any rule types`, - statusCode: 403, - }); - break; - case 'space_1_all at space1': - case 'space_1_all_alerts_none_actions at space1': - expect(response.statusCode).to.eql(200); - expect(response.body.page).to.equal(1); - expect(response.body.per_page).to.be.equal(perPage); - expect(response.body.total).to.be.equal(6); - { - const [firstPage] = chunk( - allAlerts - .filter((alert) => alert.rule_type_id !== 'test.restricted-noop') - .map((alert) => alert.id), - perPage - ); - expect(response.body.data.map((alert: any) => alert.id)).to.eql(firstPage); - } - break; - case 'global_read at space1': - case 'superuser at space1': - case 'space_1_all_with_restricted_fixture at space1': - expect(response.statusCode).to.eql(200); - expect(response.body.page).to.equal(1); - expect(response.body.per_page).to.be.equal(perPage); - expect(response.body.total).to.be.equal(8); - - { - const [firstPage, secondPage] = chunk( - allAlerts.map((alert) => alert.id), - perPage - ); - expect(response.body.data.map((alert: any) => alert.id)).to.eql(firstPage); - - const secondResponse = await supertestWithoutAuth - .post(`${getUrlPrefix(space.id)}/internal/alerting/rules/_find`) - .set('kbn-xsrf', 'kibana') - .auth(user.username, user.password) - .send({ - per_page: perPage, - sort_field: 'createdAt', - page: 2, - }); - - expect(secondResponse.body.data.map((alert: any) => alert.id)).to.eql(secondPage); - } - - break; - default: - throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`); - } - }); - - it('should handle find alert request with filter appropriately', async () => { - const { body: createdAction } = await supertest - .post(`${getUrlPrefix(space.id)}/api/actions/connector`) - .set('kbn-xsrf', 'foo') - .send({ - name: 'My action', - connector_type_id: 'test.noop', - config: {}, - secrets: {}, - }) - .expect(200); - - const { body: createdAlert } = await supertest - .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) - .set('kbn-xsrf', 'foo') - .send( - getTestRuleData({ - enabled: false, - actions: [ - { - id: createdAction.id, - group: 'default', - params: {}, - }, - ], - }) - ) - .expect(200); - objectRemover.add(space.id, createdAlert.id, 'rule', 'alerting'); - - const response = await supertestWithoutAuth - .post( - `${getUrlPrefix(space.id)}/${ - describeType === 'public' ? 'api' : 'internal' - }/alerting/rules/_find` - ) - .set('kbn-xsrf', 'foo') - .auth(user.username, user.password) - .send({ - filter: 'alert.attributes.actions:{ actionTypeId: "test.noop" }', - }); - - switch (scenario.id) { - case 'no_kibana_privileges at space1': - case 'space_1_all at space2': - expect(response.statusCode).to.eql(403); - expect(response.body).to.eql({ - error: 'Forbidden', - message: `Unauthorized to find rules for any rule types`, - statusCode: 403, - }); - break; - case 'global_read at space1': - case 'superuser at space1': - case 'space_1_all at space1': - case 'space_1_all_alerts_none_actions at space1': - case 'space_1_all_with_restricted_fixture at space1': - expect(response.statusCode).to.eql(200); - expect(response.body.page).to.equal(1); - expect(response.body.per_page).to.be.greaterThan(0); - expect(response.body.total).to.be.greaterThan(0); - const match = response.body.data.find((obj: any) => obj.id === createdAlert.id); - const activeSnoozes = match.active_snoozes; - const hasActiveSnoozes = !!(activeSnoozes || []).filter((obj: any) => obj).length; - expect(match).to.eql({ - id: createdAlert.id, - name: 'abc', - tags: ['foo'], - rule_type_id: 'test.noop', - running: match.running ?? false, - consumer: 'alertsFixture', - schedule: { interval: '1m' }, - enabled: false, - actions: [ - { - id: createdAction.id, - group: 'default', - connector_type_id: 'test.noop', - params: {}, - uuid: match.actions[0].uuid, - }, - ], - params: {}, - created_by: 'elastic', - api_key_created_by_user: null, - revision: 0, - throttle: '1m', - updated_by: 'elastic', - api_key_owner: null, - mute_all: false, - muted_alert_ids: [], - notify_when: 'onThrottleInterval', - created_at: match.created_at, - updated_at: match.updated_at, - execution_status: match.execution_status, - ...(match.next_run ? { next_run: match.next_run } : {}), - ...(match.last_run ? { last_run: match.last_run } : {}), - ...(describeType === 'internal' - ? { - monitoring: match.monitoring, - snooze_schedule: match.snooze_schedule, - ...(hasActiveSnoozes && { active_snoozes: activeSnoozes }), - is_snoozed_until: null, - } - : {}), - }); - expect(Date.parse(match.created_at)).to.be.greaterThan(0); - expect(Date.parse(match.updated_at)).to.be.greaterThan(0); - break; - default: - throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`); - } - }); - - it('should handle find alert request with fields appropriately', async () => { - const myTag = uuidv4(); - const { body: createdAlert } = await supertest - .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) - .set('kbn-xsrf', 'foo') - .send( - getTestRuleData({ - enabled: false, - tags: [myTag], - rule_type_id: 'test.restricted-noop', - consumer: 'alertsRestrictedFixture', - }) - ) - .expect(200); - objectRemover.add(space.id, createdAlert.id, 'rule', 'alerting'); - - // create another type with same tag - const { body: createdSecondAlert } = await supertest - .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) - .set('kbn-xsrf', 'foo') - .send( - getTestRuleData({ - tags: [myTag], - rule_type_id: 'test.restricted-noop', - consumer: 'alertsRestrictedFixture', - }) - ) - .expect(200); - objectRemover.add(space.id, createdSecondAlert.id, 'rule', 'alerting'); - - const response = await supertestWithoutAuth - .post( - `${getUrlPrefix(space.id)}/${ - describeType === 'public' ? 'api' : 'internal' - }/alerting/rules/_find` - ) - .set('kbn-xsrf', 'foo') - .auth(user.username, user.password) - .send({ - filter: 'alert.attributes.alertTypeId:test.restricted-noop', - fields: ['tags'], - sort_field: 'createdAt', - }); - - switch (scenario.id) { - case 'no_kibana_privileges at space1': - case 'space_1_all at space2': - expect(response.statusCode).to.eql(403); - expect(response.body).to.eql({ - error: 'Forbidden', - message: `Unauthorized to find rules for any rule types`, - statusCode: 403, - }); - break; - case 'space_1_all at space1': - case 'space_1_all_alerts_none_actions at space1': - expect(response.statusCode).to.eql(200); - expect(response.body.data).to.eql([]); - break; - case 'global_read at space1': - case 'superuser at space1': - case 'space_1_all_with_restricted_fixture at space1': - expect(response.statusCode).to.eql(200); - expect(response.body.page).to.equal(1); - expect(response.body.per_page).to.be.greaterThan(0); - expect(response.body.total).to.be.greaterThan(0); - const [matchFirst, matchSecond] = response.body.data; - expect(omit(matchFirst, 'updatedAt')).to.eql({ - id: createdAlert.id, - actions: [], - tags: [myTag], - ...(describeType === 'internal' && { - snooze_schedule: [], - is_snoozed_until: null, - }), - }); - expect(omit(matchSecond, 'updatedAt')).to.eql({ - id: createdSecondAlert.id, - actions: [], - tags: [myTag], - ...(describeType === 'internal' && { - snooze_schedule: [], - is_snoozed_until: null, - }), - }); - break; - default: - throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`); - } - }); - - it('should handle find alert request with executionStatus field appropriately', async () => { - const myTag = uuidv4(); - const { body: createdAlert } = await supertest - .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) - .set('kbn-xsrf', 'foo') - .send( - getTestRuleData({ - enabled: false, - tags: [myTag], - rule_type_id: 'test.restricted-noop', - consumer: 'alertsRestrictedFixture', - }) - ) - .expect(200); - objectRemover.add(space.id, createdAlert.id, 'rule', 'alerting'); - - // create another type with same tag - const { body: createdSecondAlert } = await supertest - .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) - .set('kbn-xsrf', 'foo') - .send( - getTestRuleData({ - tags: [myTag], - rule_type_id: 'test.restricted-noop', - consumer: 'alertsRestrictedFixture', - }) - ) - .expect(200); - objectRemover.add(space.id, createdSecondAlert.id, 'rule', 'alerting'); - - const response = await supertestWithoutAuth - .post( - `${getUrlPrefix(space.id)}/${ - describeType === 'public' ? 'api' : 'internal' - }/alerting/rules/_find` - ) - .set('kbn-xsrf', 'foo') - .auth(user.username, user.password) - .send({ - filter: 'alert.attributes.alertTypeId:test.restricted-noop', - fields: ['tags', 'executionStatus'], - sort_field: 'createdAt', - }); - - switch (scenario.id) { - case 'no_kibana_privileges at space1': - case 'space_1_all at space2': - expect(response.statusCode).to.eql(403); - expect(response.body).to.eql({ - error: 'Forbidden', - message: `Unauthorized to find rules for any rule types`, - statusCode: 403, - }); - break; - case 'space_1_all at space1': - case 'space_1_all_alerts_none_actions at space1': - expect(response.statusCode).to.eql(200); - expect(response.body.data).to.eql([]); - break; - case 'global_read at space1': - case 'superuser at space1': - case 'space_1_all_with_restricted_fixture at space1': - expect(response.statusCode).to.eql(200); - expect(response.body.page).to.equal(1); - expect(response.body.per_page).to.be.greaterThan(0); - expect(response.body.total).to.be.greaterThan(0); - const [matchFirst, matchSecond] = response.body.data; - expect(omit(matchFirst, 'updatedAt')).to.eql({ - id: createdAlert.id, - actions: [], - tags: [myTag], - execution_status: matchFirst.execution_status, - ...(describeType === 'internal' && { - snooze_schedule: [], - is_snoozed_until: null, - }), - }); - expect(omit(matchSecond, 'updatedAt')).to.eql({ - id: createdSecondAlert.id, - actions: [], - tags: [myTag], - execution_status: matchSecond.execution_status, - ...(describeType === 'internal' && { - snooze_schedule: [], - is_snoozed_until: null, - }), - }); - break; - default: - throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`); - } - }); - - it(`shouldn't find alert from another space`, async () => { - const { body: createdAlert } = await supertest - .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) - .set('kbn-xsrf', 'foo') - .send(getTestRuleData()) - .expect(200); - objectRemover.add(space.id, createdAlert.id, 'rule', 'alerting'); - - const response = await supertestWithoutAuth - .post( - `${getUrlPrefix('other')}/${ - describeType === 'public' ? 'api' : 'internal' - }/alerting/rules/_find` - ) - .set('kbn-xsrf', 'foo') - .auth(user.username, user.password) - .send({ - search: 'test.noop', - search_fields: 'alertTypeId', - }); - - switch (scenario.id) { - case 'no_kibana_privileges at space1': - case 'space_1_all at space2': - case 'space_1_all at space1': - case 'space_1_all_alerts_none_actions at space1': - case 'space_1_all_with_restricted_fixture at space1': - expect(response.statusCode).to.eql(403); - expect(response.body).to.eql({ - error: 'Forbidden', - message: `Unauthorized to find rules for any rule types`, - statusCode: 403, - }); - break; - case 'global_read at space1': - case 'superuser at space1': - expect(response.statusCode).to.eql(200); - expect(response.body).to.eql({ - page: 1, - per_page: 10, - total: 0, - data: [], - }); - break; - default: - throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`); - } - }); - }); - } - }); -}; - -// eslint-disable-next-line import/no-default-export -export default function createFindTests({ getService }: FtrProviderContext) { - const supertest = getService('supertest'); - const supertestWithoutAuth = getService('supertestWithoutAuth'); - - describe('find with post', () => { - const objectRemover = new ObjectRemover(supertest); - - afterEach(async () => { - await objectRemover.removeAll(); - }); - - findTestUtils('internal', objectRemover, supertest, supertestWithoutAuth); - }); -} diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/get.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/get.ts index 78c662d98a541..c1872d1e40213 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/get.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/get.ts @@ -223,23 +223,12 @@ const getTestUtils = ( switch (scenario.id) { case 'no_kibana_privileges at space1': case 'space_1_all at space2': - expect(response.statusCode).to.eql(403); - expect(response.body).to.eql({ - error: 'Forbidden', - message: getUnauthorizedErrorMessage('get', 'test.restricted-noop', 'alerts'), - statusCode: 403, - }); - break; case 'space_1_all at space1': case 'space_1_all_alerts_none_actions at space1': expect(response.statusCode).to.eql(403); expect(response.body).to.eql({ error: 'Forbidden', - message: getUnauthorizedErrorMessage( - 'get', - 'test.restricted-noop', - 'alertsRestrictedFixture' - ), + message: getUnauthorizedErrorMessage('get', 'test.restricted-noop', 'alerts'), statusCode: 403, }); break; diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/index.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/index.ts index 262fe8af301c8..dc85feb741eb8 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/index.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/index.ts @@ -23,7 +23,6 @@ export default function alertingTests({ loadTestFile, getService }: FtrProviderC loadTestFile(require.resolve('./backfill')); loadTestFile(require.resolve('./find')); loadTestFile(require.resolve('./find_internal')); - loadTestFile(require.resolve('./find_with_post')); loadTestFile(require.resolve('./create')); loadTestFile(require.resolve('./delete')); loadTestFile(require.resolve('./disable')); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/aggregate.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/aggregate.ts new file mode 100644 index 0000000000000..dde153aca402e --- /dev/null +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/aggregate.ts @@ -0,0 +1,377 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; +import { Space, User } from '../../../../common/types'; +import { Space1AllAtSpace1, SuperuserAtSpace1, UserAtSpaceScenarios } from '../../../scenarios'; +import { getUrlPrefix, getTestRuleData, ObjectRemover, getEventLog } from '../../../../common/lib'; +import { FtrProviderContext } from '../../../../common/ftr_provider_context'; + +// eslint-disable-next-line import/no-default-export +export default function createAggregateTests({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); + const retry = getService('retry'); + + const getEventLogWithRetry = async (id: string, space: Space) => { + await retry.try(async () => { + return await getEventLog({ + getService, + spaceId: space.id, + type: 'alert', + id, + provider: 'alerting', + actions: new Map([['execute', { equal: 1 }]]), + }); + }); + }; + + describe('aggregate', () => { + const objectRemover = new ObjectRemover(supertest); + + afterEach(async () => { + await objectRemover.removeAll(); + }); + + for (const scenario of UserAtSpaceScenarios) { + const { user, space } = scenario; + + describe(scenario.id, () => { + it('should aggregate alert status totals', async () => { + const NumOkAlerts = 4; + const NumActiveAlerts = 1; + const NumErrorAlerts = 2; + + const okAlertIds: string[] = []; + const activeAlertIds: string[] = []; + const errorAlertIds: string[] = []; + + await Promise.all( + [...Array(NumOkAlerts)].map(async () => { + const okAlertId = await createTestAlert( + { + /** + * The _aggregate calls is made + * to get all stats across all rule types + * that the user has access to. Only a subset + * of users have access to the test.restricted-noop/alertsRestrictedFixture + * pair. The differences in the stats ensure that even though we request + * the stats for all rule types only for the ones that the user has access to + * are returned. + * */ + rule_type_id: 'test.restricted-noop', + schedule: { interval: '24h' }, + consumer: 'alertsRestrictedFixture', + }, + space, + user + ); + + okAlertIds.push(okAlertId); + + objectRemover.add(space.id, okAlertId, 'rule', 'alerting'); + }) + ); + + await Promise.all(okAlertIds.map((id) => getEventLogWithRetry(id, space))); + + await Promise.all( + [...Array(NumActiveAlerts)].map(async () => { + const activeAlertId = await createTestAlert( + { + rule_type_id: 'test.patternFiring', + schedule: { interval: '24h' }, + params: { + pattern: { instance: new Array(100).fill(true) }, + }, + }, + space, + user + ); + + activeAlertIds.push(activeAlertId); + objectRemover.add(space.id, activeAlertId, 'rule', 'alerting'); + }) + ); + + await Promise.all(activeAlertIds.map((id) => getEventLogWithRetry(id, space))); + + await Promise.all( + [...Array(NumErrorAlerts)].map(async () => { + const errorAlertId = await createTestAlert( + { + rule_type_id: 'test.throw', + schedule: { interval: '24h' }, + }, + space, + user + ); + + errorAlertIds.push(errorAlertId); + objectRemover.add(space.id, errorAlertId, 'rule', 'alerting'); + }) + ); + + await Promise.all(errorAlertIds.map((id) => getEventLogWithRetry(id, space))); + + switch (scenario.id) { + case 'no_kibana_privileges at space1': + case 'space_1_all at space2': + await aggregate({ + space, + user, + expectedStatusCode: 403, + expectedResponse: { + error: 'Forbidden', + message: 'Unauthorized to find rules for any rule types', + statusCode: 403, + }, + }); + break; + case 'space_1_all at space1': + case 'space_1_all_alerts_none_actions at space1': + await aggregate({ + space, + user, + expectedStatusCode: 200, + expectedResponse: { + rule_enabled_status: { + disabled: 0, + enabled: 3, + }, + rule_execution_status: { + ok: 0, + active: NumActiveAlerts, + error: NumErrorAlerts, + pending: 0, + unknown: 0, + warning: 0, + }, + rule_last_run_outcome: { + succeeded: 1, + warning: 0, + failed: 2, + }, + rule_muted_status: { + muted: 0, + unmuted: 3, + }, + rule_snoozed_status: { + snoozed: 0, + }, + rule_tags: ['foo'], + }, + }); + break; + case 'global_read at space1': + case 'superuser at space1': + case 'space_1_all_with_restricted_fixture at space1': + await aggregate({ + space, + user, + expectedStatusCode: 200, + expectedResponse: { + rule_enabled_status: { + disabled: 0, + enabled: 7, + }, + rule_execution_status: { + ok: NumOkAlerts, + active: NumActiveAlerts, + error: NumErrorAlerts, + pending: 0, + unknown: 0, + warning: 0, + }, + rule_last_run_outcome: { + succeeded: 5, + warning: 0, + failed: 2, + }, + rule_muted_status: { + muted: 0, + unmuted: 7, + }, + rule_snoozed_status: { + snoozed: 0, + }, + rule_tags: ['foo'], + }, + }); + break; + default: + throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`); + } + }); + }); + } + + describe('filtering', () => { + it('should return the correct rule stats when trying to exploit RBAC through the ruleTypeIds parameter', async () => { + const { user, space } = Space1AllAtSpace1; + + const okAlertId = await createTestAlert( + { + rule_type_id: 'test.restricted-noop', + schedule: { interval: '24h' }, + consumer: 'alertsRestrictedFixture', + }, + SuperuserAtSpace1.space, + SuperuserAtSpace1.user + ); + + const activeAlertId = await createTestAlert( + { + rule_type_id: 'test.patternFiring', + schedule: { interval: '24h' }, + params: { + pattern: { instance: new Array(100).fill(true) }, + }, + }, + SuperuserAtSpace1.space, + SuperuserAtSpace1.user + ); + + objectRemover.add(SuperuserAtSpace1.space.id, okAlertId, 'rule', 'alerting'); + objectRemover.add(SuperuserAtSpace1.space.id, activeAlertId, 'rule', 'alerting'); + + await aggregate({ + space, + user, + params: { rule_type_ids: ['test.restricted-noop', 'test.patternFiring'] }, + expectedStatusCode: 200, + expectedResponse: { + rule_enabled_status: { + disabled: 0, + enabled: 1, + }, + rule_execution_status: { + ok: 0, + active: 1, + error: 0, + pending: 0, + unknown: 0, + warning: 0, + }, + rule_last_run_outcome: { + succeeded: 1, + warning: 0, + failed: 0, + }, + rule_muted_status: { + muted: 0, + unmuted: 1, + }, + rule_snoozed_status: { + snoozed: 0, + }, + rule_tags: ['foo'], + }, + }); + }); + + it('should return the correct rule stats when trying to exploit RBAC through the consumer parameter', async () => { + const { user, space } = Space1AllAtSpace1; + + const okAlertId = await createTestAlert( + { + rule_type_id: 'test.restricted-noop', + schedule: { interval: '24h' }, + consumer: 'alertsRestrictedFixture', + }, + SuperuserAtSpace1.space, + SuperuserAtSpace1.user + ); + + const activeAlertId = await createTestAlert( + { + rule_type_id: 'test.patternFiring', + schedule: { interval: '24h' }, + params: { + pattern: { instance: new Array(100).fill(true) }, + }, + }, + SuperuserAtSpace1.space, + SuperuserAtSpace1.user + ); + + objectRemover.add(SuperuserAtSpace1.space.id, okAlertId, 'rule', 'alerting'); + objectRemover.add(SuperuserAtSpace1.space.id, activeAlertId, 'rule', 'alerting'); + + await aggregate({ + space, + user, + params: { consumers: ['alertsRestrictedFixture', 'alertsFixture'] }, + expectedStatusCode: 200, + expectedResponse: { + rule_enabled_status: { + disabled: 0, + enabled: 1, + }, + rule_execution_status: { + ok: 0, + active: 1, + error: 0, + pending: 0, + unknown: 0, + warning: 0, + }, + rule_last_run_outcome: { + succeeded: 1, + warning: 0, + failed: 0, + }, + rule_muted_status: { + muted: 0, + unmuted: 1, + }, + rule_snoozed_status: { + snoozed: 0, + }, + rule_tags: ['foo'], + }, + }); + }); + }); + }); + + async function createTestAlert(testAlertOverrides = {}, space: Space, user: User) { + const { body: createdAlert } = await supertest + .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) + .set('kbn-xsrf', 'foo') + .send(getTestRuleData(testAlertOverrides)) + .auth(user.username, user.password) + .expect(200); + + return createdAlert.id; + } + + const aggregate = async ({ + space, + user, + expectedStatusCode, + expectedResponse, + params = {}, + }: { + space: Space; + user: User; + expectedStatusCode: number; + expectedResponse: Record; + params?: Record; + }) => { + await retry.try(async () => { + const response = await supertestWithoutAuth + .post(`${getUrlPrefix(space.id)}/internal/alerting/rules/_aggregate`) + .set('kbn-xsrf', 'foo') + .auth(user.username, user.password) + .send(params); + + expect(response.status).to.eql(expectedStatusCode); + expect(response.body).to.eql(expectedResponse); + }); + }; +} diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/index.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/index.ts index a6f090030a6d4..ea834cbdb5027 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/index.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/index.ts @@ -19,6 +19,7 @@ export default function alertingTests({ loadTestFile, getService }: FtrProviderC await tearDown(getService); }); + loadTestFile(require.resolve('./aggregate')); loadTestFile(require.resolve('./mute_all')); loadTestFile(require.resolve('./mute_instance')); loadTestFile(require.resolve('./unmute_all')); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/mute_all.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/mute_all.ts index c5be0877c89ff..a9b6bf42e55a3 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/mute_all.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/mute_all.ts @@ -252,11 +252,7 @@ export default function createMuteAlertTests({ getService }: FtrProviderContext) expect(response.statusCode).to.eql(403); expect(response.body).to.eql({ error: 'Forbidden', - message: getUnauthorizedErrorMessage( - 'muteAll', - 'test.restricted-noop', - 'alertsRestrictedFixture' - ), + message: getUnauthorizedErrorMessage('muteAll', 'test.restricted-noop', 'alerts'), statusCode: 403, }); break; diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/mute_instance.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/mute_instance.ts index b7cdf762836fe..1e3d99f5dd6a8 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/mute_instance.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/mute_instance.ts @@ -239,24 +239,13 @@ export default function createMuteAlertInstanceTests({ getService }: FtrProvider switch (scenario.id) { case 'no_kibana_privileges at space1': case 'space_1_all at space2': - expect(response.statusCode).to.eql(403); - expect(response.body).to.eql({ - error: 'Forbidden', - message: getUnauthorizedErrorMessage('muteAlert', 'test.restricted-noop', 'alerts'), - statusCode: 403, - }); - break; case 'global_read at space1': case 'space_1_all at space1': case 'space_1_all_alerts_none_actions at space1': expect(response.statusCode).to.eql(403); expect(response.body).to.eql({ error: 'Forbidden', - message: getUnauthorizedErrorMessage( - 'muteAlert', - 'test.restricted-noop', - 'alertsRestrictedFixture' - ), + message: getUnauthorizedErrorMessage('muteAlert', 'test.restricted-noop', 'alerts'), statusCode: 403, }); break; diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/unmute_all.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/unmute_all.ts index d038108d29f67..6c7f56b75eec6 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/unmute_all.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/unmute_all.ts @@ -259,6 +259,9 @@ export default function createUnmuteAlertTests({ getService }: FtrProviderContex switch (scenario.id) { case 'no_kibana_privileges at space1': case 'space_1_all at space2': + case 'global_read at space1': + case 'space_1_all at space1': + case 'space_1_all_alerts_none_actions at space1': expect(response.statusCode).to.eql(403); expect(response.body).to.eql({ error: 'Forbidden', @@ -266,9 +269,6 @@ export default function createUnmuteAlertTests({ getService }: FtrProviderContex statusCode: 403, }); break; - case 'global_read at space1': - case 'space_1_all at space1': - case 'space_1_all_alerts_none_actions at space1': expect(response.statusCode).to.eql(403); expect(response.body).to.eql({ error: 'Forbidden', diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/unmute_instance.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/unmute_instance.ts index 97add81c6d5b8..a569b834fb82a 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/unmute_instance.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/unmute_instance.ts @@ -259,17 +259,6 @@ export default function createMuteAlertInstanceTests({ getService }: FtrProvider switch (scenario.id) { case 'no_kibana_privileges at space1': case 'space_1_all at space2': - expect(response.statusCode).to.eql(403); - expect(response.body).to.eql({ - error: 'Forbidden', - message: getUnauthorizedErrorMessage( - 'unmuteAlert', - 'test.restricted-noop', - 'alerts' - ), - statusCode: 403, - }); - break; case 'global_read at space1': case 'space_1_all at space1': case 'space_1_all_alerts_none_actions at space1': @@ -279,7 +268,7 @@ export default function createMuteAlertInstanceTests({ getService }: FtrProvider message: getUnauthorizedErrorMessage( 'unmuteAlert', 'test.restricted-noop', - 'alertsRestrictedFixture' + 'alerts' ), statusCode: 403, }); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/update.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/update.ts index 198baf12e751f..14f089b40759f 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/update.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/update.ts @@ -409,24 +409,13 @@ export default function createUpdateTests({ getService }: FtrProviderContext) { switch (scenario.id) { case 'no_kibana_privileges at space1': case 'space_1_all at space2': - expect(response.statusCode).to.eql(403); - expect(response.body).to.eql({ - error: 'Forbidden', - message: getUnauthorizedErrorMessage('update', 'test.restricted-noop', 'alerts'), - statusCode: 403, - }); - break; case 'global_read at space1': case 'space_1_all at space1': case 'space_1_all_alerts_none_actions at space1': expect(response.statusCode).to.eql(403); expect(response.body).to.eql({ error: 'Forbidden', - message: getUnauthorizedErrorMessage( - 'update', - 'test.restricted-noop', - 'alertsRestrictedFixture' - ), + message: getUnauthorizedErrorMessage('update', 'test.restricted-noop', 'alerts'), statusCode: 403, }); break; diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/update_api_key.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/update_api_key.ts index 3df0570650146..b92e423cd6829 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/update_api_key.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/alerting/update_api_key.ts @@ -238,17 +238,6 @@ export default function createUpdateApiKeyTests({ getService }: FtrProviderConte switch (scenario.id) { case 'no_kibana_privileges at space1': case 'space_1_all at space2': - expect(response.statusCode).to.eql(403); - expect(response.body).to.eql({ - error: 'Forbidden', - message: getUnauthorizedErrorMessage( - 'updateApiKey', - 'test.restricted-noop', - 'alerts' - ), - statusCode: 403, - }); - break; case 'global_read at space1': case 'space_1_all at space1': case 'space_1_all_alerts_none_actions at space1': @@ -258,7 +247,7 @@ export default function createUpdateApiKeyTests({ getService }: FtrProviderConte message: getUnauthorizedErrorMessage( 'updateApiKey', 'test.restricted-noop', - 'alertsRestrictedFixture' + 'alerts' ), statusCode: 403, }); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_delete.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_delete.ts index fc3526eebc6a4..acc0321adfa5b 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_delete.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_delete.ts @@ -249,71 +249,6 @@ export default ({ getService }: FtrProviderContext) => { } }); - it('should handle delete alert request appropriately when consumer is not the producer', async () => { - const { body: createdRule1 } = await supertest - .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) - .set('kbn-xsrf', 'foo') - .send( - getTestRuleData({ - rule_type_id: 'test.restricted-noop', - consumer: 'alertsFixture', - }) - ) - .expect(200); - - const response = await supertestWithoutAuth - .patch(`${getUrlPrefix(space.id)}/internal/alerting/rules/_bulk_delete`) - .set('kbn-xsrf', 'foo') - .send({ ids: [createdRule1.id] }) - .auth(user.username, user.password); - - switch (scenario.id) { - case 'no_kibana_privileges at space1': - case 'space_1_all at space2': - expect(response.body).to.eql({ - error: 'Forbidden', - message: 'Unauthorized to find rules for any rule types', - statusCode: 403, - }); - expect(response.statusCode).to.eql(403); - objectRemover.add(space.id, createdRule1.id, 'rule', 'alerting'); - // Ensure task still exists - await getScheduledTask(createdRule1.scheduled_task_id); - break; - case 'space_1_all at space1': - case 'space_1_all_alerts_none_actions at space1': - case 'space_1_all_with_restricted_fixture at space1': - case 'global_read at space1': - expect(response.body).to.eql({ - statusCode: 400, - error: 'Bad Request', - message: 'No rules found for bulk delete', - }); - expect(response.statusCode).to.eql(400); - objectRemover.add(space.id, createdRule1.id, 'rule', 'alerting'); - // Ensure task still exists - await getScheduledTask(createdRule1.scheduled_task_id); - break; - case 'superuser at space1': - expect(response.body).to.eql({ - rules: [{ ...getDefaultRules(response), rule_type_id: 'test.restricted-noop' }], - errors: [], - total: 1, - taskIdsFailedToBeDeleted: [], - }); - expect(response.statusCode).to.eql(200); - try { - await getScheduledTask(createdRule1.scheduled_task_id); - throw new Error('Should have removed scheduled task'); - } catch (e) { - expect(e.meta.statusCode).to.eql(404); - } - break; - default: - throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`); - } - }); - it('should handle delete alert request appropriately when consumer is "alerts"', async () => { const { body: createdRule1 } = await supertest .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) @@ -348,7 +283,7 @@ export default ({ getService }: FtrProviderContext) => { case 'global_read at space1': expect(response.body).to.eql({ error: 'Forbidden', - message: getUnauthorizedErrorMessage('bulkDelete', 'test.noop', 'alertsFixture'), + message: getUnauthorizedErrorMessage('bulkDelete', 'test.noop', 'alerts'), statusCode: 403, }); expect(response.statusCode).to.eql(403); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_disable.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_disable.ts index b8c2041cb27af..7bd3e42edeb70 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_disable.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_disable.ts @@ -278,7 +278,7 @@ export default ({ getService }: FtrProviderContext) => { case 'global_read at space1': expect(response.body).to.eql({ error: 'Forbidden', - message: getUnauthorizedErrorMessage('bulkDisable', 'test.noop', 'alertsFixture'), + message: getUnauthorizedErrorMessage('bulkDisable', 'test.noop', 'alerts'), statusCode: 403, }); expect(response.statusCode).to.eql(403); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_edit.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_edit.ts index 1082a6741ec0d..c0835b91e209e 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_edit.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_edit.ts @@ -388,11 +388,7 @@ export default function createUpdateTests({ getService }: FtrProviderContext) { case 'global_read at space1': expect(response.body).to.eql({ error: 'Forbidden', - message: getUnauthorizedErrorMessage( - 'bulkEdit', - 'test.restricted-noop', - 'alertsRestrictedFixture' - ), + message: getUnauthorizedErrorMessage('bulkEdit', 'test.restricted-noop', 'alerts'), statusCode: 403, }); expect(response.statusCode).to.eql(403); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_enable.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_enable.ts index e7cd7044717c4..c829e130f246d 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_enable.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group3/tests/alerting/bulk_enable.ts @@ -228,54 +228,6 @@ export default ({ getService }: FtrProviderContext) => { } }); - it('should handle enable alert request appropriately when consumer is not the producer', async () => { - const { body: createdRule } = await supertest - .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) - .set('kbn-xsrf', 'foo') - .send( - getTestRuleData({ - rule_type_id: 'test.restricted-noop', - consumer: 'alertsFixture', - }) - ) - .expect(200); - objectRemover.add(space.id, createdRule.id, 'rule', 'alerting'); - - const response = await supertestWithoutAuth - .patch(`${getUrlPrefix(space.id)}/internal/alerting/rules/_bulk_enable`) - .set('kbn-xsrf', 'foo') - .send({ ids: [createdRule.id] }) - .auth(user.username, user.password); - - switch (scenario.id) { - case 'no_kibana_privileges at space1': - case 'space_1_all at space2': - expect(response.body).to.eql({ - error: 'Forbidden', - message: 'Unauthorized to find rules for any rule types', - statusCode: 403, - }); - expect(response.statusCode).to.eql(403); - break; - case 'space_1_all at space1': - case 'space_1_all_alerts_none_actions at space1': - case 'space_1_all_with_restricted_fixture at space1': - case 'global_read at space1': - expect(response.body).to.eql({ - statusCode: 400, - error: 'Bad Request', - message: 'No rules found for bulk enable', - }); - expect(response.statusCode).to.eql(400); - break; - case 'superuser at space1': - expect(response.statusCode).to.eql(200); - break; - default: - throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`); - } - }); - it('should handle enable alert request appropriately when consumer is "alerts"', async () => { const { body: createdRule } = await supertest .post(`${getUrlPrefix(space.id)}/api/alerting/rule`) @@ -308,7 +260,7 @@ export default ({ getService }: FtrProviderContext) => { case 'global_read at space1': expect(response.body).to.eql({ error: 'Forbidden', - message: getUnauthorizedErrorMessage('bulkEnable', 'test.noop', 'alertsFixture'), + message: getUnauthorizedErrorMessage('bulkEnable', 'test.noop', 'alerts'), statusCode: 403, }); expect(response.statusCode).to.eql(403); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group4/tests/alerting/snooze.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group4/tests/alerting/snooze.ts index 8c1fed7978b55..c880b18dd4b46 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group4/tests/alerting/snooze.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group4/tests/alerting/snooze.ts @@ -269,24 +269,13 @@ export default function createSnoozeRuleTests({ getService }: FtrProviderContext switch (scenario.id) { case 'no_kibana_privileges at space1': case 'space_1_all at space2': - expect(response.statusCode).to.eql(403); - expect(response.body).to.eql({ - error: 'Forbidden', - message: getUnauthorizedErrorMessage('snooze', 'test.restricted-noop', 'alerts'), - statusCode: 403, - }); - break; case 'global_read at space1': case 'space_1_all at space1': case 'space_1_all_alerts_none_actions at space1': expect(response.statusCode).to.eql(403); expect(response.body).to.eql({ error: 'Forbidden', - message: getUnauthorizedErrorMessage( - 'snooze', - 'test.restricted-noop', - 'alertsRestrictedFixture' - ), + message: getUnauthorizedErrorMessage('snooze', 'test.restricted-noop', 'alerts'), statusCode: 403, }); break; diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group4/tests/alerting/unsnooze.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group4/tests/alerting/unsnooze.ts index eae8814a514fb..8f509e6104c3d 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group4/tests/alerting/unsnooze.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group4/tests/alerting/unsnooze.ts @@ -254,11 +254,7 @@ export default function createUnsnoozeRuleTests({ getService }: FtrProviderConte expect(response.statusCode).to.eql(403); expect(response.body).to.eql({ error: 'Forbidden', - message: getUnauthorizedErrorMessage( - 'unsnooze', - 'test.restricted-noop', - 'alertsRestrictedFixture' - ), + message: getUnauthorizedErrorMessage('unsnooze', 'test.restricted-noop', 'alerts'), statusCode: 403, }); break; diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/scenarios.ts b/x-pack/test/alerting_api_integration/security_and_spaces/scenarios.ts index fdb56a4fb501e..bf6b38b6befbe 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/scenarios.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/scenarios.ts @@ -282,6 +282,10 @@ const GlobalReadAtSpace1: GlobalReadAtSpace1 = { space: Space1, }; +interface Space1AllAtSpace1 extends Scenario { + id: 'space_1_all at space1'; +} + interface Space1AllWithRestrictedFixtureAtSpace1 extends Scenario { id: 'space_1_all_with_restricted_fixture at space1'; } @@ -322,7 +326,8 @@ export const systemActionScenario: SystemActionSpace1 = { interface Space1AllAtSpace1 extends Scenario { id: 'space_1_all at space1'; } -const Space1AllAtSpace1: Space1AllAtSpace1 = { + +export const Space1AllAtSpace1: Space1AllAtSpace1 = { id: 'space_1_all at space1', user: Space1All, space: Space1, diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/aggregate_post.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/aggregate.ts similarity index 51% rename from x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/aggregate_post.ts rename to x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/aggregate.ts index 6269e9bff6e2b..c1553d1ef8d9e 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/aggregate_post.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/aggregate.ts @@ -28,10 +28,12 @@ export default function createAggregateTests({ getService }: FtrProviderContext) }); }; - describe('aggregate post', () => { + describe('aggregate', () => { const objectRemover = new ObjectRemover(supertest); - afterEach(() => objectRemover.removeAll()); + afterEach(async () => { + await objectRemover.removeAll(); + }); it('should aggregate when there are no alerts', async () => { const response = await supertest @@ -157,6 +159,171 @@ export default function createAggregateTests({ getService }: FtrProviderContext) }); }); + it('should aggregate only filtered rules by rule type IDs', async () => { + const NumOkAlerts = 4; + const NumActiveAlerts = 1; + const NumErrorAlerts = 2; + + const okAlertIds: string[] = []; + const activeAlertIds: string[] = []; + const errorAlertIds: string[] = []; + + await Promise.all( + [...Array(NumOkAlerts)].map(async () => { + const okAlertId = await createTestAlert({ + rule_type_id: 'test.noop', + schedule: { interval: '24h' }, + }); + okAlertIds.push(okAlertId); + objectRemover.add(Spaces.space1.id, okAlertId, 'rule', 'alerting'); + }) + ); + + await Promise.all(okAlertIds.map((id) => getEventLogWithRetry(id))); + + await Promise.all( + [...Array(NumActiveAlerts)].map(async () => { + const activeAlertId = await createTestAlert({ + rule_type_id: 'test.patternFiring', + schedule: { interval: '24h' }, + params: { + pattern: { instance: new Array(100).fill(true) }, + }, + }); + activeAlertIds.push(activeAlertId); + objectRemover.add(Spaces.space1.id, activeAlertId, 'rule', 'alerting'); + }) + ); + + await Promise.all(activeAlertIds.map((id) => getEventLogWithRetry(id))); + + await Promise.all( + [...Array(NumErrorAlerts)].map(async () => { + const errorAlertId = await createTestAlert({ + rule_type_id: 'test.throw', + schedule: { interval: '24h' }, + }); + errorAlertIds.push(errorAlertId); + objectRemover.add(Spaces.space1.id, errorAlertId, 'rule', 'alerting'); + }) + ); + + await Promise.all(errorAlertIds.map((id) => getEventLogWithRetry(id))); + + await retry.try(async () => { + const response = await supertest + .post(`${getUrlPrefix(Spaces.space1.id)}/internal/alerting/rules/_aggregate`) + .set('kbn-xsrf', 'foo') + .send({ rule_type_ids: ['test.noop'] }); + + expect(response.status).to.eql(200); + expect(response.body).to.eql({ + rule_enabled_status: { + disabled: 0, + enabled: 4, + }, + rule_execution_status: { + ok: NumOkAlerts, + active: 0, + error: 0, + pending: 0, + unknown: 0, + warning: 0, + }, + rule_last_run_outcome: { + succeeded: 4, + warning: 0, + failed: 0, + }, + rule_muted_status: { + muted: 0, + unmuted: 4, + }, + rule_snoozed_status: { + snoozed: 0, + }, + rule_tags: ['foo'], + }); + }); + }); + + it('should aggregate only filtered rules by consumer', async () => { + const NumOkAlerts = 4; + const NumActiveAlerts = 1; + const NumErrorAlerts = 2; + + const okAlertIds: string[] = []; + const activeAlertIds: string[] = []; + const errorAlertIds: string[] = []; + + await Promise.all( + [...Array(NumOkAlerts)].map(async () => { + const okAlertId = await createTestAlert({ + rule_type_id: 'test.restricted-noop', + schedule: { interval: '24h' }, + consumer: 'alertsRestrictedFixture', + }); + okAlertIds.push(okAlertId); + objectRemover.add(Spaces.space1.id, okAlertId, 'rule', 'alerting'); + }) + ); + + await Promise.all(okAlertIds.map((id) => getEventLogWithRetry(id))); + + await Promise.all( + [...Array(NumActiveAlerts)].map(async () => { + const activeAlertId = await createTestAlert({ + rule_type_id: 'test.patternFiring', + schedule: { interval: '24h' }, + params: { + pattern: { instance: new Array(100).fill(true) }, + }, + }); + activeAlertIds.push(activeAlertId); + objectRemover.add(Spaces.space1.id, activeAlertId, 'rule', 'alerting'); + }) + ); + + await Promise.all(activeAlertIds.map((id) => getEventLogWithRetry(id))); + + await Promise.all( + [...Array(NumErrorAlerts)].map(async () => { + const errorAlertId = await createTestAlert({ + rule_type_id: 'test.throw', + schedule: { interval: '24h' }, + }); + errorAlertIds.push(errorAlertId); + objectRemover.add(Spaces.space1.id, errorAlertId, 'rule', 'alerting'); + }) + ); + + await Promise.all(errorAlertIds.map((id) => getEventLogWithRetry(id))); + + await retry.try(async () => { + const response = await supertest + .post(`${getUrlPrefix(Spaces.space1.id)}/internal/alerting/rules/_aggregate`) + .set('kbn-xsrf', 'foo') + .send({ consumers: ['alertsFixture'] }); + + expect(response.status).to.eql(200); + expect(response.body).to.eql({ + rule_execution_status: { + error: NumErrorAlerts, + active: NumActiveAlerts, + ok: 0, + pending: 0, + unknown: 0, + warning: 0, + }, + rule_last_run_outcome: { failed: 2, succeeded: 1, warning: 0 }, + rule_enabled_status: { enabled: 3, disabled: 0 }, + rule_muted_status: { muted: 0, unmuted: 3 }, + rule_snoozed_status: { snoozed: 0 }, + rule_tags: ['foo'], + }); + }); + }); + describe('tags limit', () => { it('should be 50 be default', async () => { const numOfAlerts = 3; diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/find.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/find.ts index e730dd657d2f1..f6b48df9b9f17 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/find.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/find.ts @@ -33,10 +33,13 @@ export default function createFindTests({ getService }: FtrProviderContext) { describe('find public API', () => { const objectRemover = new ObjectRemover(supertest); - afterEach(() => objectRemover.removeAll()); + afterEach(async () => { + await objectRemover.removeAll(); + }); describe('handle find alert request', function () { this.tags('skipFIPS'); + it('should handle find alert request appropriately', async () => { const { body: createdAction } = await supertest .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector`) @@ -290,6 +293,48 @@ export default function createFindTests({ getService }: FtrProviderContext) { 'Error find rules: Filter is not supported on this field alert.attributes.mapped_params.risk_score' ); }); + + it('should throw when using rule_type_ids', async () => { + const { body: createdAlert } = await supertest + .post(`${getUrlPrefix(Spaces.space1.id)}/api/alerting/rule`) + .set('kbn-xsrf', 'foo') + .send(getTestRuleData()) + .expect(200); + + objectRemover.add(Spaces.space1.id, createdAlert.id, 'rule', 'alerting'); + + const response = await supertest.get( + `${getUrlPrefix(Spaces.space1.id)}/api/alerting/rules/_find?rule_type_ids=foo` + ); + + expect(response.statusCode).to.eql(400); + expect(response.body).to.eql({ + statusCode: 400, + error: 'Bad Request', + message: '[request query.rule_type_ids]: definition for this key is missing', + }); + }); + + it('should throw when using consumers', async () => { + const { body: createdAlert } = await supertest + .post(`${getUrlPrefix(Spaces.space1.id)}/api/alerting/rule`) + .set('kbn-xsrf', 'foo') + .send(getTestRuleData()) + .expect(200); + + objectRemover.add(Spaces.space1.id, createdAlert.id, 'rule', 'alerting'); + + const response = await supertest.get( + `${getUrlPrefix(Spaces.space1.id)}/api/alerting/rules/_find?consumers=foo` + ); + + expect(response.statusCode).to.eql(400); + expect(response.body).to.eql({ + statusCode: 400, + error: 'Bad Request', + message: '[request query.consumers]: definition for this key is missing', + }); + }); }); describe('legacy', function () { diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/find_internal.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/find_internal.ts index 25fc54a5229d3..7c10b9be598bb 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/find_internal.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/find_internal.ts @@ -22,6 +22,7 @@ async function createAlert( .set('kbn-xsrf', 'foo') .send(getTestRuleData(overwrites)) .expect(200); + objectRemover.add(Spaces.space1.id, createdAlert.id, 'rule', 'alerting'); return createdAlert; } @@ -33,10 +34,13 @@ export default function createFindTests({ getService }: FtrProviderContext) { describe('find internal API', () => { const objectRemover = new ObjectRemover(supertest); - afterEach(() => objectRemover.removeAll()); + afterEach(async () => { + await objectRemover.removeAll(); + }); describe('handle find alert request', function () { this.tags('skipFIPS'); + it('should handle find alert request appropriately', async () => { const { body: createdAction } = await supertest .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector`) @@ -276,7 +280,7 @@ export default function createFindTests({ getService }: FtrProviderContext) { it('should filter on parameters', async () => { const response = await supertest - .get(`${getUrlPrefix(Spaces.space1.id)}/internal/alerting/rules/_find`) + .post(`${getUrlPrefix(Spaces.space1.id)}/internal/alerting/rules/_find`) .set('kbn-xsrf', 'foo') .send({ filter: 'alert.attributes.params.risk_score:40', @@ -286,17 +290,52 @@ export default function createFindTests({ getService }: FtrProviderContext) { expect(response.body.total).to.equal(1); expect(response.body.data[0].params.risk_score).to.eql(40); }); + }); - it('should error if filtering on mapped parameters directly using the public API', async () => { - const response = await supertest - .post(`${getUrlPrefix(Spaces.space1.id)}/internal/alerting/rules/_find`) - .set('kbn-xsrf', 'foo') - .send({ - filter: 'alert.attributes.mapped_params.risk_score:40', - }); + it('should filter rules by rule type IDs', async () => { + await createAlert(objectRemover, supertest, { + rule_type_id: 'test.noop', + consumer: 'alertsFixture', + }); - expect(response.status).to.eql(200); + await createAlert(objectRemover, supertest, { + rule_type_id: 'test.restricted-noop', + consumer: 'alertsRestrictedFixture', }); + + const response = await supertest + .post(`${getUrlPrefix(Spaces.space1.id)}/internal/alerting/rules/_find`) + .set('kbn-xsrf', 'foo') + .send({ + rule_type_ids: ['test.restricted-noop'], + }); + + expect(response.status).to.eql(200); + expect(response.body.total).to.equal(1); + expect(response.body.data[0].rule_type_id).to.eql('test.restricted-noop'); + }); + + it('should filter rules by consumers', async () => { + await createAlert(objectRemover, supertest, { + rule_type_id: 'test.noop', + consumer: 'alertsFixture', + }); + + await createAlert(objectRemover, supertest, { + rule_type_id: 'test.restricted-noop', + consumer: 'alertsRestrictedFixture', + }); + + const response = await supertest + .post(`${getUrlPrefix(Spaces.space1.id)}/internal/alerting/rules/_find`) + .set('kbn-xsrf', 'foo') + .send({ + consumers: ['alertsRestrictedFixture'], + }); + + expect(response.status).to.eql(200); + expect(response.body.total).to.equal(1); + expect(response.body.data[0].consumer).to.eql('alertsRestrictedFixture'); }); describe('legacy', function () { @@ -309,11 +348,7 @@ export default function createFindTests({ getService }: FtrProviderContext) { .expect(200); objectRemover.add(Spaces.space1.id, createdAlert.id, 'rule', 'alerting'); - const response = await supertest.get( - `${getUrlPrefix( - Spaces.space1.id - )}/api/alerts/_find?search=test.noop&search_fields=alertTypeId` - ); + const response = await supertest.get(`${getUrlPrefix(Spaces.space1.id)}/api/alerts/_find`); expect(response.status).to.eql(200); expect(response.body.page).to.equal(1); diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/index.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/index.ts index 7a0c24878d07f..d750fd7bcfb4e 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/index.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/index.ts @@ -14,12 +14,13 @@ export default function alertingTests({ loadTestFile, getService }: FtrProviderC before(async () => await buildUp(getService)); after(async () => await tearDown(getService)); - loadTestFile(require.resolve('./aggregate_post')); + loadTestFile(require.resolve('./aggregate')); loadTestFile(require.resolve('./create')); loadTestFile(require.resolve('./delete')); loadTestFile(require.resolve('./disable')); loadTestFile(require.resolve('./enable')); loadTestFile(require.resolve('./find')); + loadTestFile(require.resolve('./find_internal')); loadTestFile(require.resolve('./get')); loadTestFile(require.resolve('./get_alert_state')); loadTestFile(require.resolve('./get_alert_summary')); diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/ephemeral.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/ephemeral.ts deleted file mode 100644 index 51149a3008ff0..0000000000000 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/ephemeral.ts +++ /dev/null @@ -1,124 +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 expect from '@kbn/expect'; -import { flatten } from 'lodash'; -import { IValidatedEvent } from '@kbn/event-log-plugin/server'; -import { DEFAULT_MAX_EPHEMERAL_ACTIONS_PER_ALERT } from '@kbn/alerting-plugin/server/config'; -import { ESTestIndexTool, ES_TEST_INDEX_NAME } from '@kbn/alerting-api-integration-helpers'; -import { Spaces } from '../../../scenarios'; -import { getUrlPrefix, ObjectRemover, getTestRuleData, getEventLog } from '../../../../common/lib'; -import { FtrProviderContext } from '../../../../common/ftr_provider_context'; - -// eslint-disable-next-line import/no-default-export -export default function createNotifyWhenTests({ getService }: FtrProviderContext) { - const supertest = getService('supertest'); - const retry = getService('retry'); - const es = getService('es'); - - const esTestIndexTool = new ESTestIndexTool(es, retry); - - describe('ephemeral', () => { - const objectRemover = new ObjectRemover(supertest); - - beforeEach(async () => { - await esTestIndexTool.destroy(); - await esTestIndexTool.setup(); - }); - afterEach(async () => await esTestIndexTool.destroy()); - after(async () => { - await objectRemover.removeAll(); - }); - - it('should execute all requests, when some will be ephemeral and some not', async () => { - const nonEphemeralTasks = 3; - const actionPromises = []; - for (let i = 0; i < DEFAULT_MAX_EPHEMERAL_ACTIONS_PER_ALERT + nonEphemeralTasks; i++) { - actionPromises.push( - supertest - .post(`${getUrlPrefix(Spaces.space1.id)}/api/actions/connector`) - .set('kbn-xsrf', 'foo') - .send({ - name: `My action${i}`, - connector_type_id: 'test.index-record', - config: { - unencrypted: `This value shouldn't get encrypted`, - }, - secrets: { - encrypted: 'This value should be encrypted', - }, - }) - .expect(200) - ); - } - const createdActions = await Promise.all(actionPromises); - createdActions.forEach((createdAction) => - objectRemover.add(Spaces.space1.id, createdAction.body.id, 'connector', 'actions') - ); - - const pattern = { - instance: [true, true, true, false, true, true], - }; - const alertData = getTestRuleData({ - rule_type_id: 'test.patternFiring', - params: { pattern }, - schedule: { interval: '1m' }, - throttle: null, - notify_when: 'onActiveAlert', - actions: createdActions.map((createdAction) => { - return { - id: createdAction.body.id, - group: 'default', - params: { - index: ES_TEST_INDEX_NAME, - reference: '', - message: 'test message', - }, - }; - }), - }); - const { body: createdAlert } = await supertest - .post(`${getUrlPrefix(Spaces.space1.id)}/api/alerting/rule`) - .set('kbn-xsrf', 'foo') - .send(alertData) - .expect(200); - objectRemover.add(Spaces.space1.id, createdAlert.id, 'rule', 'alerting'); - - const events = flatten( - await Promise.all( - createdActions.map(async (createdAction) => { - return await retry.try(async () => { - return await getEventLog({ - getService, - spaceId: Spaces.space1.id, - type: 'action', - id: createdAction.body.id, - provider: 'actions', - actions: new Map([['execute', { gte: 1 }]]), - }); - }); - }) - ) - ); - - const executeActionsEvents = getEventsByAction(events, 'execute'); - expect(executeActionsEvents.length).equal( - nonEphemeralTasks + DEFAULT_MAX_EPHEMERAL_ACTIONS_PER_ALERT - ); - - const searchResult = await esTestIndexTool.search('action:test.index-record'); - // @ts-expect-error doesnt handle total: number - expect(searchResult.body.hits.total.value).equal( - nonEphemeralTasks + DEFAULT_MAX_EPHEMERAL_ACTIONS_PER_ALERT - ); - }); - }); -} - -function getEventsByAction(events: IValidatedEvent[], action: string) { - return events.filter((event) => event?.event?.action === action); -} diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/index.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/index.ts index 79dae86b6a8d5..1da03fbbcc54c 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/index.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/index.ts @@ -18,7 +18,6 @@ export default function alertingTests({ loadTestFile, getService }: FtrProviderC loadTestFile(require.resolve('./builtin_alert_types')); loadTestFile(require.resolve('./mustache_templates.ts')); loadTestFile(require.resolve('./notify_when')); - loadTestFile(require.resolve('./ephemeral')); loadTestFile(require.resolve('./event_log_alerts')); loadTestFile(require.resolve('./snooze')); loadTestFile(require.resolve('./unsnooze')); diff --git a/x-pack/test/api_integration/apis/features/features/features.ts b/x-pack/test/api_integration/apis/features/features/features.ts index 4ded1782c9086..7541b2171b2cb 100644 --- a/x-pack/test/api_integration/apis/features/features/features.ts +++ b/x-pack/test/api_integration/apis/features/features/features.ts @@ -136,6 +136,7 @@ export default function ({ getService }: FtrProviderContext) { 'securitySolutionCasesV2', 'fleet', 'fleetv2', + 'entityManager', ].sort() ); }); @@ -186,6 +187,7 @@ export default function ({ getService }: FtrProviderContext) { 'securitySolutionCasesV2', 'fleet', 'fleetv2', + 'entityManager', ]; const features = body.filter( diff --git a/x-pack/test/api_integration/apis/management/index_management/index.ts b/x-pack/test/api_integration/apis/management/index_management/index.ts index 63ab1f3371941..e17da6cae3b6f 100644 --- a/x-pack/test/api_integration/apis/management/index_management/index.ts +++ b/x-pack/test/api_integration/apis/management/index_management/index.ts @@ -22,5 +22,6 @@ export default function ({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./enrich_policies')); loadTestFile(require.resolve('./create_enrich_policy')); loadTestFile(require.resolve('./data_enrichers')); + loadTestFile(require.resolve('./searchprofiler')); }); } diff --git a/x-pack/test/api_integration/apis/management/index_management/searchprofiler.ts b/x-pack/test/api_integration/apis/management/index_management/searchprofiler.ts new file mode 100644 index 0000000000000..01c4347945118 --- /dev/null +++ b/x-pack/test/api_integration/apis/management/index_management/searchprofiler.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import expect from 'expect'; +import { FtrProviderContext } from '../../../ftr_provider_context'; + +const API_BASE_PATH = '/api/searchprofiler'; + +export default function ({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + + describe('Searchprofiler', function () { + it('Can retrive has indices', async () => { + const { body } = await supertest.get(`${API_BASE_PATH}/has_indices`).expect(200); + expect(body).toStrictEqual({ hasIndices: true }); + }); + }); +} diff --git a/x-pack/test/api_integration/apis/ml/trained_models/get_models.ts b/x-pack/test/api_integration/apis/ml/trained_models/get_models.ts index a3953a87b82b2..654f55c7e1254 100644 --- a/x-pack/test/api_integration/apis/ml/trained_models/get_models.ts +++ b/x-pack/test/api_integration/apis/ml/trained_models/get_models.ts @@ -16,61 +16,27 @@ export default ({ getService }: FtrProviderContext) => { const esDeleteAllIndices = getService('esDeleteAllIndices'); describe('GET trained_models', () => { - let testModelIds: string[] = []; - before(async () => { await ml.api.initSavedObjects(); await ml.testResources.setKibanaTimeZoneToUTC(); - testModelIds = await ml.api.createTestTrainedModels('regression', 5, true); - await ml.api.createModelAlias('dfa_regression_model_n_0', 'dfa_regression_model_alias'); - await ml.api.createIngestPipeline('dfa_regression_model_alias'); - - // Creating an indices that are tied to modelId: dfa_regression_model_n_1 - await ml.api.createIndex(`user-index_dfa_regression_model_n_1`, undefined, { - index: { default_pipeline: `pipeline_dfa_regression_model_n_1` }, - }); + await ml.api.createTestTrainedModels('regression', 5, true); }); after(async () => { await esDeleteAllIndices('user-index_dfa*'); - - // delete created ingest pipelines - await Promise.all( - ['dfa_regression_model_alias', ...testModelIds].map((modelId) => - ml.api.deleteIngestPipeline(modelId) - ) - ); await ml.testResources.cleanMLSavedObjects(); await ml.api.cleanMlIndices(); }); - it('returns all trained models with associated pipelines including aliases', async () => { + it('returns all trained models', async () => { const { body, status } = await supertest - .get(`/internal/ml/trained_models?with_pipelines=true`) + .get(`/internal/ml/trained_models`) .auth(USER.ML_POWERUSER, ml.securityCommon.getPasswordForUser(USER.ML_POWERUSER)) .set(getCommonRequestHeader('1')); ml.api.assertResponseStatusCode(200, status, body); // Created models + system model expect(body.length).to.eql(6); - - const sampleModel = body.find((v: any) => v.model_id === 'dfa_regression_model_n_0'); - - expect(Object.keys(sampleModel.pipelines).length).to.eql(2); - }); - - it('returns models without pipeline in case user does not have required permission', async () => { - const { body, status } = await supertest - .get(`/internal/ml/trained_models?with_pipelines=true&with_indices=true`) - .auth(USER.ML_VIEWER, ml.securityCommon.getPasswordForUser(USER.ML_VIEWER)) - .set(getCommonRequestHeader('1')); - ml.api.assertResponseStatusCode(200, status, body); - - // Created models + system model - expect(body.length).to.eql(6); - const sampleModel = body.find((v: any) => v.model_id === 'dfa_regression_model_n_0'); - - expect(sampleModel.pipelines).to.eql(undefined); }); it('returns trained model by id', async () => { @@ -84,58 +50,6 @@ export default ({ getService }: FtrProviderContext) => { const sampleModel = body[0]; expect(sampleModel.model_id).to.eql('dfa_regression_model_n_1'); - expect(sampleModel.pipelines).to.eql(undefined); - expect(sampleModel.indices).to.eql(undefined); - }); - - it('returns trained model by id with_pipelines=true,with_indices=false', async () => { - const { body, status } = await supertest - .get( - `/internal/ml/trained_models/dfa_regression_model_n_1?with_pipelines=true&with_indices=false` - ) - .auth(USER.ML_POWERUSER, ml.securityCommon.getPasswordForUser(USER.ML_POWERUSER)) - .set(getCommonRequestHeader('1')); - ml.api.assertResponseStatusCode(200, status, body); - - expect(body.length).to.eql(1); - const sampleModel = body[0]; - - expect(sampleModel.model_id).to.eql('dfa_regression_model_n_1'); - expect(Object.keys(sampleModel.pipelines).length).to.eql( - 1, - `Expected number of pipelines for dfa_regression_model_n_1 to be ${1} (got ${ - Object.keys(sampleModel.pipelines).length - })` - ); - expect(sampleModel.indices).to.eql( - undefined, - `Expected indices for dfa_regression_model_n_1 to be undefined (got ${sampleModel.indices})` - ); - }); - - it('returns trained model by id with_pipelines=true,with_indices=true', async () => { - const { body, status } = await supertest - .get( - `/internal/ml/trained_models/dfa_regression_model_n_1?with_pipelines=true&with_indices=true` - ) - .auth(USER.ML_POWERUSER, ml.securityCommon.getPasswordForUser(USER.ML_POWERUSER)) - .set(getCommonRequestHeader('1')); - ml.api.assertResponseStatusCode(200, status, body); - - const sampleModel = body[0]; - expect(sampleModel.model_id).to.eql('dfa_regression_model_n_1'); - expect(Object.keys(sampleModel.pipelines).length).to.eql( - 1, - `Expected number of pipelines for dfa_regression_model_n_1 to be ${1} (got ${ - Object.keys(sampleModel.pipelines).length - })` - ); - expect(sampleModel.indices.length).to.eql( - 1, - `Expected number of indices for dfa_regression_model_n_1 to be ${1} (got ${ - sampleModel.indices.length - })` - ); }); it('returns 404 if requested trained model does not exist', async () => { diff --git a/x-pack/test/api_integration/apis/ml/trained_models/index.ts b/x-pack/test/api_integration/apis/ml/trained_models/index.ts index c9bf98545e2b4..319899ec9a693 100644 --- a/x-pack/test/api_integration/apis/ml/trained_models/index.ts +++ b/x-pack/test/api_integration/apis/ml/trained_models/index.ts @@ -9,6 +9,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('trained models', function () { + loadTestFile(require.resolve('./trained_models_list')); loadTestFile(require.resolve('./get_models')); loadTestFile(require.resolve('./get_model_stats')); loadTestFile(require.resolve('./get_model_pipelines')); diff --git a/x-pack/test/api_integration/apis/ml/trained_models/trained_models_list.ts b/x-pack/test/api_integration/apis/ml/trained_models/trained_models_list.ts new file mode 100644 index 0000000000000..1feac44b13ca8 --- /dev/null +++ b/x-pack/test/api_integration/apis/ml/trained_models/trained_models_list.ts @@ -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 expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { USER } from '../../../../functional/services/ml/security_common'; +import { getCommonRequestHeader } from '../../../../functional/services/ml/common_api'; + +export default ({ getService }: FtrProviderContext) => { + const supertest = getService('supertestWithoutAuth'); + const ml = getService('ml'); + const esDeleteAllIndices = getService('esDeleteAllIndices'); + + describe('GET trained_models_list', () => { + let testModelIds: string[] = []; + + before(async () => { + await ml.api.initSavedObjects(); + await ml.testResources.setKibanaTimeZoneToUTC(); + testModelIds = await ml.api.createTestTrainedModels('regression', 5, true); + await ml.api.createModelAlias('dfa_regression_model_n_0', 'dfa_regression_model_alias'); + await ml.api.createIngestPipeline('dfa_regression_model_alias'); + + // Creating an index that is tied to modelId: dfa_regression_model_n_1 + await ml.api.createIndex(`user-index_dfa_regression_model_n_1`, undefined, { + index: { default_pipeline: `pipeline_dfa_regression_model_n_1` }, + }); + }); + + after(async () => { + await esDeleteAllIndices('user-index_dfa*'); + + // delete created ingest pipelines + await Promise.all( + ['dfa_regression_model_alias', ...testModelIds].map((modelId) => + ml.api.deleteIngestPipeline(modelId) + ) + ); + await ml.testResources.cleanMLSavedObjects(); + await ml.api.cleanMlIndices(); + }); + + it('returns a formatted list of trained model with stats, associated pipelines and indices', async () => { + const { body, status } = await supertest + .get(`/internal/ml/trained_models_list`) + .auth(USER.ML_POWERUSER, ml.securityCommon.getPasswordForUser(USER.ML_POWERUSER)) + .set(getCommonRequestHeader('1')); + ml.api.assertResponseStatusCode(200, status, body); + + // Created models + system model + model downloads + expect(body.length).to.eql(10); + + const dfaRegressionN0 = body.find((v: any) => v.model_id === 'dfa_regression_model_n_0'); + + expect(Object.keys(dfaRegressionN0.pipelines).length).to.eql(2); + + const dfaRegressionN1 = body.find((v: any) => v.model_id === 'dfa_regression_model_n_1'); + expect(Object.keys(dfaRegressionN1.pipelines).length).to.eql( + 1, + `Expected number of pipelines for dfa_regression_model_n_1 to be ${1} (got ${ + Object.keys(dfaRegressionN1.pipelines).length + })` + ); + expect(dfaRegressionN1.indices.length).to.eql( + 1, + `Expected number of indices for dfa_regression_model_n_1 to be ${1} (got ${ + dfaRegressionN1.indices.length + })` + ); + }); + + it('returns models without pipeline in case user does not have required permission', async () => { + const { body, status } = await supertest + .get(`/internal/ml/trained_models_list`) + .auth(USER.ML_VIEWER, ml.securityCommon.getPasswordForUser(USER.ML_VIEWER)) + .set(getCommonRequestHeader('1')); + ml.api.assertResponseStatusCode(200, status, body); + + expect(body.length).to.eql(10); + const sampleModel = body.find((v: any) => v.model_id === 'dfa_regression_model_n_0'); + expect(sampleModel.pipelines).to.eql(undefined); + }); + + it('returns an error for unauthorized user', async () => { + const { body, status } = await supertest + .get(`/internal/ml/trained_models_list`) + .auth(USER.ML_UNAUTHORIZED, ml.securityCommon.getPasswordForUser(USER.ML_UNAUTHORIZED)) + .set(getCommonRequestHeader('1')); + ml.api.assertResponseStatusCode(403, status, body); + }); + }); +}; diff --git a/x-pack/test/api_integration/apis/security/license_downgrade.ts b/x-pack/test/api_integration/apis/security/license_downgrade.ts index ad7fba3ac3d64..812a6385af970 100644 --- a/x-pack/test/api_integration/apis/security/license_downgrade.ts +++ b/x-pack/test/api_integration/apis/security/license_downgrade.ts @@ -26,6 +26,7 @@ export default function ({ getService }: FtrProviderContext) { 'minimal_read', 'url_create', 'store_search_session', + 'generate_report', ]; const trialPrivileges = await supertest .get('/api/security/privileges') diff --git a/x-pack/test/api_integration/apis/security/privileges.ts b/x-pack/test/api_integration/apis/security/privileges.ts index b269aef6ae1cc..4cf8cc46a9338 100644 --- a/x-pack/test/api_integration/apis/security/privileges.ts +++ b/x-pack/test/api_integration/apis/security/privileges.ts @@ -20,7 +20,7 @@ export default function ({ getService }: FtrProviderContext) { features: { graph: ['all', 'read', 'minimal_all', 'minimal_read'], savedObjectsTagging: ['all', 'read', 'minimal_all', 'minimal_read'], - canvas: ['all', 'read', 'minimal_all', 'minimal_read'], + canvas: ['all', 'read', 'minimal_all', 'minimal_read', 'generate_report'], maps: ['all', 'read', 'minimal_all', 'minimal_read'], generalCases: [ 'all', @@ -91,7 +91,14 @@ export default function ({ getService }: FtrProviderContext) { 'execute_operations_all', 'scan_operations_all', ], - uptime: ['all', 'read', 'minimal_all', 'minimal_read', 'elastic_managed_locations_enabled'], + uptime: [ + 'all', + 'read', + 'minimal_all', + 'minimal_read', + 'elastic_managed_locations_enabled', + 'can_manage_private_locations', + ], securitySolutionAssistant: [ 'all', 'read', @@ -130,8 +137,9 @@ export default function ({ getService }: FtrProviderContext) { 'minimal_read', 'url_create', 'store_search_session', + 'generate_report', ], - visualize: ['all', 'read', 'minimal_all', 'minimal_read', 'url_create'], + visualize: ['all', 'read', 'minimal_all', 'minimal_read', 'url_create', 'generate_report'], dashboard: [ 'all', 'read', @@ -139,6 +147,8 @@ export default function ({ getService }: FtrProviderContext) { 'minimal_read', 'url_create', 'store_search_session', + 'generate_report', + 'download_csv_report', ], dev_tools: ['all', 'read', 'minimal_all', 'minimal_read'], advancedSettings: ['all', 'read', 'minimal_all', 'minimal_read'], @@ -173,6 +183,7 @@ export default function ({ getService }: FtrProviderContext) { guidedOnboardingFeature: ['all', 'read', 'minimal_all', 'minimal_read'], aiAssistantManagementSelection: ['all', 'read', 'minimal_all', 'minimal_read'], inventory: ['all', 'read', 'minimal_all', 'minimal_read'], + entityManager: ['all', 'read', 'minimal_all', 'minimal_read'], }, reserved: ['fleet-setup', 'ml_user', 'ml_admin', 'ml_apm_user', 'monitoring'], }; diff --git a/x-pack/test/api_integration/apis/security/privileges_basic.ts b/x-pack/test/api_integration/apis/security/privileges_basic.ts index a97ee360062c0..3911d95ea9bed 100644 --- a/x-pack/test/api_integration/apis/security/privileges_basic.ts +++ b/x-pack/test/api_integration/apis/security/privileges_basic.ts @@ -63,6 +63,7 @@ export default function ({ getService }: FtrProviderContext) { aiAssistantManagementSelection: ['all', 'read', 'minimal_all', 'minimal_read'], inventory: ['all', 'read', 'minimal_all', 'minimal_read'], dataQuality: ['all', 'read', 'minimal_all', 'minimal_read'], + entityManager: ['all', 'read', 'minimal_all', 'minimal_read'], }, global: ['all', 'read'], space: ['all', 'read'], @@ -178,6 +179,7 @@ export default function ({ getService }: FtrProviderContext) { ], uptime: [ 'all', + 'can_manage_private_locations', 'elastic_managed_locations_enabled', 'read', 'minimal_all', @@ -221,6 +223,7 @@ export default function ({ getService }: FtrProviderContext) { 'minimal_read', 'url_create', 'store_search_session', + 'generate_report', ], visualize: ['all', 'read', 'minimal_all', 'minimal_read', 'url_create'], dashboard: [ @@ -230,6 +233,7 @@ export default function ({ getService }: FtrProviderContext) { 'minimal_read', 'url_create', 'store_search_session', + 'download_csv_report', ], dev_tools: ['all', 'read', 'minimal_all', 'minimal_read'], advancedSettings: ['all', 'read', 'minimal_all', 'minimal_read'], @@ -264,6 +268,7 @@ export default function ({ getService }: FtrProviderContext) { guidedOnboardingFeature: ['all', 'read', 'minimal_all', 'minimal_read'], aiAssistantManagementSelection: ['all', 'read', 'minimal_all', 'minimal_read'], inventory: ['all', 'read', 'minimal_all', 'minimal_read'], + entityManager: ['all', 'read', 'minimal_all', 'minimal_read'], }, reserved: ['fleet-setup', 'ml_user', 'ml_admin', 'ml_apm_user', 'monitoring'], }; diff --git a/x-pack/test/api_integration/apis/streams/full_flow.ts b/x-pack/test/api_integration/apis/streams/full_flow.ts index 03c0cc9e0e219..aad931ab11816 100644 --- a/x-pack/test/api_integration/apis/streams/full_flow.ts +++ b/x-pack/test/api_integration/apis/streams/full_flow.ts @@ -135,6 +135,137 @@ export default function ({ getService }: FtrProviderContext) { log: { level: 'info', logger: 'nginx' }, }); }); + + it('Fork logs to logs.nginx.error with invalid condition', async () => { + const body = { + stream: { + id: 'logs.nginx.error', + fields: [], + processing: [], + }, + condition: { field: 'log', operator: 'eq', value: 'error' }, + }; + const response = await forkStream(supertest, 'logs.nginx', body); + expect(response).to.have.property('acknowledged', true); + }); + + it('Index an Nginx error log message, should goto logs.nginx.error but fails', async () => { + const doc = { + '@timestamp': '2024-01-01T00:00:20.000Z', + message: JSON.stringify({ + 'log.level': 'error', + 'log.logger': 'nginx', + message: 'test', + }), + }; + const response = await indexDocument(esClient, 'logs', doc); + expect(response.result).to.eql('created'); + + await waitForDocumentInIndex({ + esClient, + indexName: 'logs.nginx', + retryService, + logger, + docCountTarget: 2, + }); + + const result = await fetchDocument(esClient, 'logs.nginx', response._id); + expect(result._index).to.match(/^\.ds\-logs.nginx-.*/); + expect(result._source).to.eql({ + '@timestamp': '2024-01-01T00:00:20.000Z', + message: 'test', + log: { level: 'error', logger: 'nginx' }, + }); + }); + + it('Fork logs to logs.number-test', async () => { + const body = { + stream: { + id: 'logs.number-test', + fields: [], + processing: [], + }, + condition: { field: 'code', operator: 'gte', value: '500' }, + }; + const response = await forkStream(supertest, 'logs', body); + expect(response).to.have.property('acknowledged', true); + }); + + it('Index documents with numbers and strings for logs.number-test condition', async () => { + const doc1 = { + '@timestamp': '2024-01-01T00:00:20.000Z', + message: JSON.stringify({ + code: '500', + message: 'test', + }), + }; + const doc2 = { + '@timestamp': '2024-01-01T00:00:20.000Z', + message: JSON.stringify({ + code: 500, + message: 'test', + }), + }; + const response1 = await indexDocument(esClient, 'logs', doc1); + expect(response1.result).to.eql('created'); + const response2 = await indexDocument(esClient, 'logs', doc2); + expect(response2.result).to.eql('created'); + + await waitForDocumentInIndex({ + esClient, + indexName: 'logs.number-test', + retryService, + logger, + docCountTarget: 2, + retries: 20, + }); + }); + + it('Fork logs to logs.string-test', async () => { + const body = { + stream: { + id: 'logs.string-test', + fields: [], + processing: [], + }, + condition: { + or: [ + { field: 'message', operator: 'contains', value: '500' }, + { field: 'message', operator: 'contains', value: 400 }, + ], + }, + }; + const response = await forkStream(supertest, 'logs', body); + expect(response).to.have.property('acknowledged', true); + }); + + it('Index documents with numbers and strings for logs.string-test condition', async () => { + const doc1 = { + '@timestamp': '2024-01-01T00:00:20.000Z', + message: JSON.stringify({ + message: 'status_code: 500', + }), + }; + const doc2 = { + '@timestamp': '2024-01-01T00:00:20.000Z', + message: JSON.stringify({ + message: 'status_code: 400', + }), + }; + const response1 = await indexDocument(esClient, 'logs', doc1); + expect(response1.result).to.eql('created'); + const response2 = await indexDocument(esClient, 'logs', doc2); + expect(response2.result).to.eql('created'); + + await waitForDocumentInIndex({ + esClient, + indexName: 'logs.string-test', + retryService, + logger, + docCountTarget: 2, + retries: 20, + }); + }); }); }); } diff --git a/x-pack/test/api_integration/apis/synthetics/private_location_apis.ts b/x-pack/test/api_integration/apis/synthetics/private_location_apis.ts index 415c91af28347..a4351ede2eda0 100644 --- a/x-pack/test/api_integration/apis/synthetics/private_location_apis.ts +++ b/x-pack/test/api_integration/apis/synthetics/private_location_apis.ts @@ -11,16 +11,21 @@ import { legacyPrivateLocationsSavedObjectName, privateLocationSavedObjectName, } from '@kbn/synthetics-plugin/common/saved_objects/private_locations'; +import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants'; +import { PrivateLocation } from '@kbn/synthetics-plugin/common/runtime_types'; +import { SyntheticsMonitorTestService } from './services/synthetics_monitor_test_service'; import { FtrProviderContext } from '../../ftr_provider_context'; import { PrivateLocationTestService } from './services/private_location_test_service'; export default function ({ getService }: FtrProviderContext) { describe('PrivateLocationAPI', function () { this.tags('skipCloud'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); const kServer = getService('kibanaServer'); const testPrivateLocations = new PrivateLocationTestService(getService); + const monitorTestService = new SyntheticsMonitorTestService(getService); before(async () => { await testPrivateLocations.installSyntheticsPackage(); @@ -60,5 +65,72 @@ export default function ({ getService }: FtrProviderContext) { expect(e.response.status).to.be(404); } }); + + it('cannot create private location if privileges are missing', async () => { + const apiResponse = await testPrivateLocations.addFleetPolicy(); + const agentPolicyId = apiResponse.body.item.id; + + const { username, password } = await monitorTestService.addsNewSpace(['minimal_all']); + + const location: Omit = { + label: 'Test private location 10', + agentPolicyId: agentPolicyId!, + geo: { + lat: 0, + lon: 0, + }, + }; + const response = await supertestWithoutAuth + .post(SYNTHETICS_API_URLS.PRIVATE_LOCATIONS) + .auth(username, password) + .set('kbn-xsrf', 'true') + .send(location); + + expect(response.status).to.be(403); + }); + + it('can create private location if privileges are added', async () => { + const apiResponse = await testPrivateLocations.addFleetPolicy(); + const agentPolicyId = apiResponse.body.item.id; + + const { username, password } = await monitorTestService.addsNewSpace([ + 'minimal_all', + 'can_manage_private_locations', + ]); + + const location: Omit = { + label: 'Test private location 10', + agentPolicyId: agentPolicyId!, + geo: { + lat: 0, + lon: 0, + }, + }; + const response = await supertestWithoutAuth + .post(SYNTHETICS_API_URLS.PRIVATE_LOCATIONS) + .auth(username, password) + .set('kbn-xsrf', 'true') + .send(location); + + expect(response.status).to.be(200); + }); + + it('can delete private location if privileges are added', async () => { + const locs = await testPrivateLocations.fetchAll(); + + const { username, password } = await monitorTestService.addsNewSpace([ + 'minimal_all', + 'can_manage_private_locations', + ]); + + for (const loc of locs.body) { + const deleteResponse = await supertestWithoutAuth + .delete(`${SYNTHETICS_API_URLS.PRIVATE_LOCATIONS}/${loc.id}`) + .auth(username, password) + .set('kbn-xsrf', 'true'); + + expect(deleteResponse.status).to.be(200); + } + }); }); } diff --git a/x-pack/test/api_integration/apis/synthetics/synthetics_api_security.ts b/x-pack/test/api_integration/apis/synthetics/synthetics_api_security.ts index ddd0d4b209940..3969dcae88219 100644 --- a/x-pack/test/api_integration/apis/synthetics/synthetics_api_security.ts +++ b/x-pack/test/api_integration/apis/synthetics/synthetics_api_security.ts @@ -33,12 +33,18 @@ export default function ({ getService }: FtrProviderContext) { password: string; writeAccess?: boolean; tags?: string; + readUser?: boolean; } ) => { let resp; - const { statusCodes, SPACE_ID, username, password, writeAccess } = options; - const tags = !writeAccess ? '[uptime-read]' : options.tags ?? '[uptime-read,uptime-write]'; - const getStatusMessage = (respStatus: string) => + const { statusCodes, SPACE_ID, username, password, writeAccess, readUser } = options; + let tags = !writeAccess ? '[uptime-read]' : options.tags ?? '[uptime-read,uptime-write]'; + if ((method === 'POST' || method === 'DELETE') && path.includes('private_locations')) { + tags = readUser + ? '[private-location-write,uptime-write]' + : '[uptime-read,private-location-write,uptime-write]'; + } + const getStatusMessage = (respStatus: string | number) => `Expected ${statusCodes?.join( ',' )}, got ${respStatus} status code doesn't match, for path: ${path} and method ${method}`; @@ -132,6 +138,7 @@ export default function ({ getService }: FtrProviderContext) { password, writeAccess: route.writeAccess ?? true, tags: '[uptime-write]', + readUser: true, }); } }); diff --git a/x-pack/test/api_integration/apis/upgrade_assistant/config.ts b/x-pack/test/api_integration/apis/upgrade_assistant/config.ts index 5f335f116fefe..762cb8baa1ef2 100644 --- a/x-pack/test/api_integration/apis/upgrade_assistant/config.ts +++ b/x-pack/test/api_integration/apis/upgrade_assistant/config.ts @@ -13,5 +13,15 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { return { ...baseIntegrationTestsConfig.getAll(), testFiles: [require.resolve('.')], + kbnTestServer: { + ...baseIntegrationTestsConfig.get('kbnTestServer'), + serverArgs: [ + ...baseIntegrationTestsConfig.get('kbnTestServer.serverArgs'), + '--xpack.upgrade_assistant.featureSet.mlSnapshots=true', + '--xpack.upgrade_assistant.featureSet.migrateSystemIndices=true', + '--xpack.upgrade_assistant.featureSet.migrateDataStreams=true', + '--xpack.upgrade_assistant.featureSet.reindexCorrectiveActions=true', + ], + }, }; } diff --git a/x-pack/test/api_integration/apis/upgrade_assistant/upgrade_assistant.ts b/x-pack/test/api_integration/apis/upgrade_assistant/upgrade_assistant.ts index 7d7e035741bbb..f03cb6fb80e37 100644 --- a/x-pack/test/api_integration/apis/upgrade_assistant/upgrade_assistant.ts +++ b/x-pack/test/api_integration/apis/upgrade_assistant/upgrade_assistant.ts @@ -14,8 +14,7 @@ export default function ({ getService }: FtrProviderContext) { const es = getService('es'); const supertest = getService('supertest'); - // Failing: See https://github.com/elastic/kibana/issues/199719 - describe.skip('Upgrade Assistant', function () { + describe('Upgrade Assistant', function () { describe('Reindex operation saved object', () => { const dotKibanaIndex = '.kibana'; const fakeSavedObjectId = 'fakeSavedObjectId'; diff --git a/x-pack/test/api_integration/deployment_agnostic/README.md b/x-pack/test/api_integration/deployment_agnostic/README.md index 3bc1c70dda1ab..6064d52cdcf6b 100644 --- a/x-pack/test/api_integration/deployment_agnostic/README.md +++ b/x-pack/test/api_integration/deployment_agnostic/README.md @@ -9,6 +9,12 @@ A deployment-agnostic API integration test is a test suite that fulfills the fol A deployment-agnostic test should be loaded in stateful and at least 1 serverless FTR config files. +## Tests, that are not deployment-agnostic: +- tests verifying Kibana behavior under a basic license. +- tests dependent on ES/Kibana server arguments, that are not set in Elastic Cloud +- tests requiring a custom plugin to be loaded specifically for testing purposes. +- tests dependent on varying user privileges between serverless and stateful environments. + ## Tests Design Requirements A deployment-agnostic test is contained within a single test file and always utilizes the [DeploymentAgnosticFtrProviderContext](https://github.com/elastic/kibana/blob/main/x-pack/test/api_integration/deployment_agnostic/ftr_provider_context.d.ts) to load compatible FTR services. A compatible FTR service must support: @@ -243,3 +249,15 @@ node scripts/functional_test_runner --config x-pack/test/api_integration/deploym Since deployment-agnostic tests are designed to run both locally and on MKI/Cloud, we believe no extra tagging is required. If a test is not working on MKI/Cloud or both, there is most likely an issue with the FTR service or the configuration file it uses. When a test fails on CI, automation will apply `.skip` to the top-level describe block. This means the test will be skipped in **both serverless and stateful environments**. If a test is unstable in a specific environment only, it is probably a sign that the test is not truly deployment-agnostic. + +## Migrating existing tests +If your tests align with the outlined criteria and requirements, you can migrate them to deployment-agnostic by following these steps: + +1. Move your tests to the `x-pack/test/api_integration/deployment_agnostic/apis/` directory. +2. Update each test file to use the `DeploymentAgnosticFtrProviderContext` context and load the required FTR services it provides. +3. Ensure the `roleScopedSupertest` or `samlAuth` service is used instead for `supertest` for authentication and test API calls. +4. Remove all usage of the `supertest` service. It is authenticated as system index superuser and often causes test failures on Cloud, where priveleges are more strict. +5. Avoid modifying `config` files, as this could disrupt test runs in Cloud environments. +6. Include your tests in both the platform and at least one solution index file. +7. Execute your tests locally against a local environment. +8. Verify your tests by running them locally against a real MKI project and an ESS deployment to ensure full compatibility. diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/check_and_load_integration.ts b/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/check_and_load_integration.ts new file mode 100644 index 0000000000000..801b5cde58833 --- /dev/null +++ b/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/check_and_load_integration.ts @@ -0,0 +1,175 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { log, timerange } from '@kbn/apm-synthtrace-client'; +import expect from '@kbn/expect'; + +import { LogsSynthtraceEsClient } from '@kbn/apm-synthtrace'; +import { DeploymentAgnosticFtrProviderContext } from '../../../ftr_provider_context'; +import { RoleCredentials, SupertestWithRoleScopeType } from '../../../services'; + +export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { + const samlAuth = getService('samlAuth'); + const roleScopedSupertest = getService('roleScopedSupertest'); + const synthtrace = getService('synthtrace'); + const packageApi = getService('packageApi'); + const start = '2024-11-04T11:00:00.000Z'; + const end = '2024-11-04T11:01:00.000Z'; + const type = 'logs'; + const dataset = 'synth'; + const nginxDataset = 'nginx.access'; + const apmDataset = 'apm.app.test'; + const namespace = 'default'; + const serviceName = 'my-service'; + const hostName = 'synth-host'; + const dataStreamName = `${type}-${dataset}-${namespace}`; + const nginxDataStreamName = `${type}-${nginxDataset}-${namespace}`; + const apmAppDataStreamName = `${type}-${apmDataset}-${namespace}`; + + const pkg = 'nginx'; + + async function callApiAs({ + roleScopedSupertestWithCookieCredentials, + apiParams: { dataStream }, + }: { + roleScopedSupertestWithCookieCredentials: SupertestWithRoleScopeType; + apiParams: { + dataStream: string; + }; + }) { + return roleScopedSupertestWithCookieCredentials.get( + `/internal/dataset_quality/data_streams/${dataStream}/integration/check` + ); + } + + describe('Check and load integrations', function () { + let adminRoleAuthc: RoleCredentials; + let supertestAdminWithCookieCredentials: SupertestWithRoleScopeType; + let synthtraceLogsEsClient: LogsSynthtraceEsClient; + + before(async () => { + synthtraceLogsEsClient = await synthtrace.createLogsSynthtraceEsClient(); + adminRoleAuthc = await samlAuth.createM2mApiKeyWithRoleScope('admin'); + supertestAdminWithCookieCredentials = await roleScopedSupertest.getSupertestWithRoleScope( + 'admin', + { + useCookieHeader: true, + withInternalHeaders: true, + } + ); + // Install nginx package + await packageApi.installPackage({ + roleAuthc: adminRoleAuthc, + pkg, + }); + + await synthtraceLogsEsClient.index([ + // Ingest degraded data in Nginx data stream + timerange(start, end) + .interval('1m') + .rate(1) + .generator((timestamp) => + log + .create() + .message('This is a log message') + .timestamp(timestamp) + .dataset(nginxDataset) + .namespace(namespace) + .defaults({ + 'log.file.path': '/my-service.log', + 'service.name': serviceName, + 'host.name': hostName, + }) + ), + // ingest data in apm app data stream + timerange(start, end) + .interval('1m') + .rate(1) + .generator((timestamp) => + log + .create() + .message('This is a log message') + .timestamp(timestamp) + .dataset(apmDataset) + .namespace(namespace) + .defaults({ + 'log.file.path': '/my-service.log', + 'service.name': serviceName, + 'host.name': hostName, + }) + ), + + // Ingest data in regular datastream which is not an integration + timerange(start, end) + .interval('1m') + .rate(1) + .generator((timestamp) => + log + .create() + .message('This is a log message') + .timestamp(timestamp) + .dataset(dataset) + .namespace(namespace) + .defaults({ + 'log.file.path': '/my-service.log', + 'service.name': serviceName, + 'host.name': hostName, + }) + ), + ]); + }); + + after(async () => { + await synthtraceLogsEsClient.clean(); + await packageApi.uninstallPackage({ + roleAuthc: adminRoleAuthc, + pkg, + }); + await samlAuth.invalidateM2mApiKeyWithRoleScope(adminRoleAuthc); + }); + + describe('returns integration status', () => { + it('returns integration as false for regular data stream', async () => { + const resp = await callApiAs({ + roleScopedSupertestWithCookieCredentials: supertestAdminWithCookieCredentials, + apiParams: { + dataStream: dataStreamName, + }, + }); + + expect(resp.body.isIntegration).to.be(false); + expect(resp.body.areAssetsAvailable).to.be(false); + }); + + it('returns integration as true for nginx data stream as we installed the integration', async () => { + const resp = await callApiAs({ + roleScopedSupertestWithCookieCredentials: supertestAdminWithCookieCredentials, + apiParams: { + dataStream: nginxDataStreamName, + }, + }); + + expect(resp.body.isIntegration).to.be(true); + expect(resp.body.areAssetsAvailable).to.be(true); + expect(resp.body.integration.name).to.be(pkg); + expect(resp.body.integration.datasets[nginxDataset]).to.be.a('string'); + }); + + it('returns integration as false but assets are available for apm.app data stream as its preinstalled', async () => { + const resp = await callApiAs({ + roleScopedSupertestWithCookieCredentials: supertestAdminWithCookieCredentials, + apiParams: { + dataStream: apmAppDataStreamName, + }, + }); + + expect(resp.body.isIntegration).to.be(false); + expect(resp.body.areAssetsAvailable).to.be(true); + }); + }); + }); +} diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/index.ts b/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/index.ts index 0481e882aee6e..17ce93321b511 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/index.ts +++ b/x-pack/test/api_integration/deployment_agnostic/apis/observability/dataset_quality/index.ts @@ -14,6 +14,7 @@ export default function ({ loadTestFile }: DeploymentAgnosticFtrProviderContext) loadTestFile(require.resolve('./data_stream_settings')); loadTestFile(require.resolve('./data_stream_rollover')); loadTestFile(require.resolve('./update_field_limit')); + loadTestFile(require.resolve('./check_and_load_integration')); loadTestFile(require.resolve('./data_stream_total_docs')); loadTestFile(require.resolve('./degraded_docs')); loadTestFile(require.resolve('./degraded_fields')); diff --git a/x-pack/test/api_integration/services/security_solution_api.gen.ts b/x-pack/test/api_integration/services/security_solution_api.gen.ts index a0b1bf74926b4..3561ff6fac35a 100644 --- a/x-pack/test/api_integration/services/security_solution_api.gen.ts +++ b/x-pack/test/api_integration/services/security_solution_api.gen.ts @@ -92,14 +92,19 @@ import { GetRuleExecutionResultsRequestQueryInput, GetRuleExecutionResultsRequestParamsInput, } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_results/get_rule_execution_results_route.gen'; -import { GetRuleMigrationRequestParamsInput } from '@kbn/security-solution-plugin/common/siem_migrations/model/api/rules/rule_migration.gen'; +import { + GetRuleMigrationRequestQueryInput, + GetRuleMigrationRequestParamsInput, +} from '@kbn/security-solution-plugin/common/siem_migrations/model/api/rules/rule_migration.gen'; import { GetRuleMigrationResourcesRequestQueryInput, GetRuleMigrationResourcesRequestParamsInput, } from '@kbn/security-solution-plugin/common/siem_migrations/model/api/rules/rule_migration.gen'; import { GetRuleMigrationStatsRequestParamsInput } from '@kbn/security-solution-plugin/common/siem_migrations/model/api/rules/rule_migration.gen'; +import { GetRuleMigrationTranslationStatsRequestParamsInput } from '@kbn/security-solution-plugin/common/siem_migrations/model/api/rules/rule_migration.gen'; import { GetTimelineRequestQueryInput } from '@kbn/security-solution-plugin/common/api/timeline/get_timeline/get_timeline_route.gen'; import { GetTimelinesRequestQueryInput } from '@kbn/security-solution-plugin/common/api/timeline/get_timelines/get_timelines_route.gen'; +import { GetWorkflowInsightsRequestQueryInput } from '@kbn/security-solution-plugin/common/api/endpoint/workflow_insights/workflow_insights.gen'; import { ImportRulesRequestQueryInput } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_management/import_rules/import_rules_route.gen'; import { ImportTimelinesRequestBodyInput } from '@kbn/security-solution-plugin/common/api/timeline/import_timelines/import_timelines_route.gen'; import { @@ -146,6 +151,10 @@ import { SuggestUserProfilesRequestQueryInput } from '@kbn/security-solution-plu import { TriggerRiskScoreCalculationRequestBodyInput } from '@kbn/security-solution-plugin/common/api/entity_analytics/risk_engine/entity_calculation_route.gen'; import { UpdateRuleRequestBodyInput } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_management/crud/update_rule/update_rule_route.gen'; import { UpdateRuleMigrationRequestBodyInput } from '@kbn/security-solution-plugin/common/siem_migrations/model/api/rules/rule_migration.gen'; +import { + UpdateWorkflowInsightRequestParamsInput, + UpdateWorkflowInsightRequestBodyInput, +} from '@kbn/security-solution-plugin/common/api/endpoint/workflow_insights/workflow_insights.gen'; import { UpsertRuleMigrationResourcesRequestParamsInput, UpsertRuleMigrationResourcesRequestBodyInput, @@ -937,7 +946,8 @@ finalize it. ) .set('kbn-xsrf', 'true') .set(ELASTIC_HTTP_VERSION_HEADER, '1') - .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana'); + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .query(props.query); }, /** * Retrieves resources for an existing SIEM rules migration @@ -973,6 +983,27 @@ finalize it. .set(ELASTIC_HTTP_VERSION_HEADER, '1') .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana'); }, + /** + * Retrieves the translation stats of a SIEM rules migration using the migration id provided + */ + getRuleMigrationTranslationStats( + props: GetRuleMigrationTranslationStatsProps, + kibanaSpace: string = 'default' + ) { + return supertest + .get( + routeWithNamespace( + replaceParams( + '/internal/siem_migrations/rules/{migration_id}/translation_stats', + props.params + ), + kibanaSpace + ) + ) + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '1') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana'); + }, /** * Get the details of an existing saved Timeline or Timeline template. */ @@ -995,6 +1026,14 @@ finalize it. .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .query(props.query); }, + getWorkflowInsights(props: GetWorkflowInsightsProps, kibanaSpace: string = 'default') { + return supertest + .get(routeWithNamespace('/internal/api/endpoint/workflow_insights', kibanaSpace)) + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '1') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .query(props.query); + }, /** * Import detection rules from an `.ndjson` file, including actions and exception lists. The request must include: - The `Content-Type: multipart/form-data` HTTP header. @@ -1477,6 +1516,19 @@ detection engine rules. .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .send(props.body as object); }, + updateWorkflowInsight(props: UpdateWorkflowInsightProps, kibanaSpace: string = 'default') { + return supertest + .put( + routeWithNamespace( + replaceParams('/internal/api/endpoint/workflow_insights/{insightId}', props.params), + kibanaSpace + ) + ) + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '1') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .send(props.body as object); + }, uploadAssetCriticalityRecords(kibanaSpace: string = 'default') { return supertest .post(routeWithNamespace('/api/asset_criticality/upload_csv', kibanaSpace)) @@ -1667,6 +1719,7 @@ export interface GetRuleExecutionResultsProps { params: GetRuleExecutionResultsRequestParamsInput; } export interface GetRuleMigrationProps { + query: GetRuleMigrationRequestQueryInput; params: GetRuleMigrationRequestParamsInput; } export interface GetRuleMigrationResourcesProps { @@ -1676,12 +1729,18 @@ export interface GetRuleMigrationResourcesProps { export interface GetRuleMigrationStatsProps { params: GetRuleMigrationStatsRequestParamsInput; } +export interface GetRuleMigrationTranslationStatsProps { + params: GetRuleMigrationTranslationStatsRequestParamsInput; +} export interface GetTimelineProps { query: GetTimelineRequestQueryInput; } export interface GetTimelinesProps { query: GetTimelinesRequestQueryInput; } +export interface GetWorkflowInsightsProps { + query: GetWorkflowInsightsRequestQueryInput; +} export interface ImportRulesProps { query: ImportRulesRequestQueryInput; } @@ -1780,6 +1839,10 @@ export interface UpdateRuleProps { export interface UpdateRuleMigrationProps { body: UpdateRuleMigrationRequestBodyInput; } +export interface UpdateWorkflowInsightProps { + params: UpdateWorkflowInsightRequestParamsInput; + body: UpdateWorkflowInsightRequestBodyInput; +} export interface UpsertRuleMigrationResourcesProps { params: UpsertRuleMigrationResourcesRequestParamsInput; body: UpsertRuleMigrationResourcesRequestBodyInput; diff --git a/x-pack/test/apm_api_integration/tests/transactions/__snapshots__/breakdown.spec.snap b/x-pack/test/apm_api_integration/tests/transactions/__snapshots__/breakdown.spec.snap index d8e3d13525cc9..68495907b3c7f 100644 --- a/x-pack/test/apm_api_integration/tests/transactions/__snapshots__/breakdown.spec.snap +++ b/x-pack/test/apm_api_integration/tests/transactions/__snapshots__/breakdown.spec.snap @@ -20,39 +20,39 @@ Object { }, Object { "x": 1627973490000, - "y": 0.0833333333333333, + "y": 0.08333333, }, Object { "x": 1627973520000, - "y": 0.628571428571429, + "y": 0.62857143, }, Object { "x": 1627973550000, - "y": 0.733333333333333, + "y": 0.73333333, }, Object { "x": 1627973580000, - "y": 0.490909090909091, + "y": 0.49090909, }, Object { "x": 1627973610000, - "y": 0.135593220338983, + "y": 0.13559322, }, Object { "x": 1627973640000, - "y": 0.692307692307692, + "y": 0.69230769, }, Object { "x": 1627973670000, - "y": 0.097165991902834, + "y": 0.09716599, }, Object { "x": 1627973700000, - "y": 0.303030303030303, + "y": 0.3030303, }, Object { "x": 1627973730000, - "y": 0.153846153846154, + "y": 0.15384615, }, Object { "x": 1627973760000, @@ -60,11 +60,11 @@ Object { }, Object { "x": 1627973790000, - "y": 0.0857142857142857, + "y": 0.08571429, }, Object { "x": 1627973820000, - "y": 0.155172413793103, + "y": 0.15517241, }, Object { "x": 1627973850000, @@ -76,31 +76,31 @@ Object { }, Object { "x": 1627973910000, - "y": 0.142857142857143, + "y": 0.14285714, }, Object { "x": 1627973940000, - "y": 0.0810810810810811, + "y": 0.08108108, }, Object { "x": 1627973970000, - "y": 0.473684210526316, + "y": 0.47368421, }, Object { "x": 1627974000000, - "y": 0.633333333333333, + "y": 0.63333333, }, Object { "x": 1627974030000, - "y": 0.111111111111111, + "y": 0.11111111, }, Object { "x": 1627974060000, - "y": 0.467741935483871, + "y": 0.46774194, }, Object { "x": 1627974090000, - "y": 0.129496402877698, + "y": 0.1294964, }, Object { "x": 1627974120000, @@ -108,19 +108,19 @@ Object { }, Object { "x": 1627974150000, - "y": 0.30188679245283, + "y": 0.30188679, }, Object { "x": 1627974180000, - "y": 0.464285714285714, + "y": 0.46428571, }, Object { "x": 1627974210000, - "y": 0.123674911660777, + "y": 0.12367491, }, Object { "x": 1627974240000, - "y": 0.384615384615385, + "y": 0.38461538, }, Object { "x": 1627974270000, @@ -128,19 +128,19 @@ Object { }, Object { "x": 1627974300000, - "y": 0.222222222222222, + "y": 0.22222222, }, Object { "x": 1627974330000, - "y": 0.00248447204968944, + "y": 0.00248447, }, Object { "x": 1627974360000, - "y": 0.0645161290322581, + "y": 0.06451613, }, Object { "x": 1627974390000, - "y": 0.569444444444444, + "y": 0.56944444, }, Object { "x": 1627974420000, @@ -152,19 +152,19 @@ Object { }, Object { "x": 1627974480000, - "y": 0.143646408839779, + "y": 0.14364641, }, Object { "x": 1627974510000, - "y": 0.298850574712644, + "y": 0.29885057, }, Object { "x": 1627974540000, - "y": 0.111111111111111, + "y": 0.11111111, }, Object { "x": 1627974570000, - "y": 0.267857142857143, + "y": 0.26785714, }, Object { "x": 1627974600000, @@ -172,11 +172,11 @@ Object { }, Object { "x": 1627974630000, - "y": 0.185185185185185, + "y": 0.18518519, }, Object { "x": 1627974660000, - "y": 0.0973451327433628, + "y": 0.09734513, }, Object { "x": 1627974690000, @@ -184,15 +184,15 @@ Object { }, Object { "x": 1627974720000, - "y": 0.480769230769231, + "y": 0.48076923, }, Object { "x": 1627974750000, - "y": 0.383458646616541, + "y": 0.38345865, }, Object { "x": 1627974780000, - "y": 0.153061224489796, + "y": 0.15306122, }, Object { "x": 1627974810000, @@ -200,23 +200,23 @@ Object { }, Object { "x": 1627974840000, - "y": 0.739130434782609, + "y": 0.73913043, }, Object { "x": 1627974870000, - "y": 0.260869565217391, + "y": 0.26086957, }, Object { "x": 1627974900000, - "y": 0.605633802816901, + "y": 0.6056338, }, Object { "x": 1627974930000, - "y": 0.326923076923077, + "y": 0.32692308, }, Object { "x": 1627974960000, - "y": 0.103448275862069, + "y": 0.10344828, }, Object { "x": 1627974990000, @@ -228,19 +228,19 @@ Object { }, Object { "x": 1627975050000, - "y": 0.114285714285714, + "y": 0.11428571, }, Object { "x": 1627975080000, - "y": 0.238636363636364, + "y": 0.23863636, }, Object { "x": 1627975110000, - "y": 0.684210526315789, + "y": 0.68421053, }, Object { "x": 1627975140000, - "y": 0.368421052631579, + "y": 0.36842105, }, Object { "x": 1627975170000, @@ -248,7 +248,7 @@ Object { }, Object { "x": 1627975200000, - "y": 0.235294117647059, + "y": 0.23529412, }, ], "hideLegend": false, @@ -265,7 +265,7 @@ Object { }, Object { "x": 1627973430000, - "y": 0.790322580645161, + "y": 0.79032258, }, Object { "x": 1627973460000, @@ -273,11 +273,11 @@ Object { }, Object { "x": 1627973490000, - "y": 0.876543209876543, + "y": 0.87654321, }, Object { "x": 1627973520000, - "y": 0.114285714285714, + "y": 0.11428571, }, Object { "x": 1627973550000, @@ -285,11 +285,11 @@ Object { }, Object { "x": 1627973580000, - "y": 0.309090909090909, + "y": 0.30909091, }, Object { "x": 1627973610000, - "y": 0.864406779661017, + "y": 0.86440678, }, Object { "x": 1627973640000, @@ -297,15 +297,15 @@ Object { }, Object { "x": 1627973670000, - "y": 0.862348178137652, + "y": 0.86234818, }, Object { "x": 1627973700000, - "y": 0.636363636363636, + "y": 0.63636364, }, Object { "x": 1627973730000, - "y": 0.846153846153846, + "y": 0.84615385, }, Object { "x": 1627973760000, @@ -313,11 +313,11 @@ Object { }, Object { "x": 1627973790000, - "y": 0.914285714285714, + "y": 0.91428571, }, Object { "x": 1627973820000, - "y": 0.844827586206897, + "y": 0.84482759, }, Object { "x": 1627973850000, @@ -329,11 +329,11 @@ Object { }, Object { "x": 1627973910000, - "y": 0.857142857142857, + "y": 0.85714286, }, Object { "x": 1627973940000, - "y": 0.918918918918919, + "y": 0.91891892, }, Object { "x": 1627973970000, @@ -345,15 +345,15 @@ Object { }, Object { "x": 1627974030000, - "y": 0.872222222222222, + "y": 0.87222222, }, Object { "x": 1627974060000, - "y": 0.290322580645161, + "y": 0.29032258, }, Object { "x": 1627974090000, - "y": 0.848920863309353, + "y": 0.84892086, }, Object { "x": 1627974120000, @@ -361,19 +361,19 @@ Object { }, Object { "x": 1627974150000, - "y": 0.613207547169811, + "y": 0.61320755, }, Object { "x": 1627974180000, - "y": 0.339285714285714, + "y": 0.33928571, }, Object { "x": 1627974210000, - "y": 0.787985865724382, + "y": 0.78798587, }, Object { "x": 1627974240000, - "y": 0.557692307692308, + "y": 0.55769231, }, Object { "x": 1627974270000, @@ -381,15 +381,15 @@ Object { }, Object { "x": 1627974300000, - "y": 0.685990338164251, + "y": 0.68599034, }, Object { "x": 1627974330000, - "y": 0.995807453416149, + "y": 0.99580745, }, Object { "x": 1627974360000, - "y": 0.935483870967742, + "y": 0.93548387, }, Object { "x": 1627974390000, @@ -405,15 +405,15 @@ Object { }, Object { "x": 1627974480000, - "y": 0.831491712707182, + "y": 0.83149171, }, Object { "x": 1627974510000, - "y": 0.505747126436782, + "y": 0.50574713, }, Object { "x": 1627974540000, - "y": 0.888888888888889, + "y": 0.88888889, }, Object { "x": 1627974570000, @@ -425,11 +425,11 @@ Object { }, Object { "x": 1627974630000, - "y": 0.71957671957672, + "y": 0.71957672, }, Object { "x": 1627974660000, - "y": 0.867256637168142, + "y": 0.86725664, }, Object { "x": 1627974690000, @@ -437,15 +437,15 @@ Object { }, Object { "x": 1627974720000, - "y": 0.288461538461538, + "y": 0.28846154, }, Object { "x": 1627974750000, - "y": 0.406015037593985, + "y": 0.40601504, }, Object { "x": 1627974780000, - "y": 0.775510204081633, + "y": 0.7755102, }, Object { "x": 1627974810000, @@ -457,7 +457,7 @@ Object { }, Object { "x": 1627974870000, - "y": 0.623188405797101, + "y": 0.62318841, }, Object { "x": 1627974900000, @@ -465,11 +465,11 @@ Object { }, Object { "x": 1627974930000, - "y": 0.423076923076923, + "y": 0.42307692, }, Object { "x": 1627974960000, - "y": 0.896551724137931, + "y": 0.89655172, }, Object { "x": 1627974990000, @@ -481,11 +481,11 @@ Object { }, Object { "x": 1627975050000, - "y": 0.885714285714286, + "y": 0.88571429, }, Object { "x": 1627975080000, - "y": 0.681818181818182, + "y": 0.68181818, }, Object { "x": 1627975110000, @@ -493,7 +493,7 @@ Object { }, Object { "x": 1627975140000, - "y": 0.456140350877193, + "y": 0.45614035, }, Object { "x": 1627975170000, @@ -501,7 +501,7 @@ Object { }, Object { "x": 1627975200000, - "y": 0.541176470588235, + "y": 0.54117647, }, ], "hideLegend": false, @@ -518,7 +518,7 @@ Object { }, Object { "x": 1627973430000, - "y": 0.0806451612903226, + "y": 0.08064516, }, Object { "x": 1627973460000, @@ -526,19 +526,19 @@ Object { }, Object { "x": 1627973490000, - "y": 0.0277777777777778, + "y": 0.02777778, }, Object { "x": 1627973520000, - "y": 0.171428571428571, + "y": 0.17142857, }, Object { "x": 1627973550000, - "y": 0.266666666666667, + "y": 0.26666667, }, Object { "x": 1627973580000, - "y": 0.181818181818182, + "y": 0.18181818, }, Object { "x": 1627973610000, @@ -546,15 +546,15 @@ Object { }, Object { "x": 1627973640000, - "y": 0.307692307692308, + "y": 0.30769231, }, Object { "x": 1627973670000, - "y": 0.0364372469635627, + "y": 0.03643725, }, Object { "x": 1627973700000, - "y": 0.0454545454545455, + "y": 0.04545455, }, Object { "x": 1627973730000, @@ -562,7 +562,7 @@ Object { }, Object { "x": 1627973760000, - "y": 0.0416666666666667, + "y": 0.04166667, }, Object { "x": 1627973790000, @@ -590,7 +590,7 @@ Object { }, Object { "x": 1627973970000, - "y": 0.526315789473684, + "y": 0.52631579, }, Object { "x": 1627974000000, @@ -598,15 +598,15 @@ Object { }, Object { "x": 1627974030000, - "y": 0.0166666666666667, + "y": 0.01666667, }, Object { "x": 1627974060000, - "y": 0.129032258064516, + "y": 0.12903226, }, Object { "x": 1627974090000, - "y": 0.0143884892086331, + "y": 0.01438849, }, Object { "x": 1627974120000, @@ -614,19 +614,19 @@ Object { }, Object { "x": 1627974150000, - "y": 0.0471698113207547, + "y": 0.04716981, }, Object { "x": 1627974180000, - "y": 0.160714285714286, + "y": 0.16071429, }, Object { "x": 1627974210000, - "y": 0.0565371024734982, + "y": 0.0565371, }, Object { "x": 1627974240000, - "y": 0.0384615384615385, + "y": 0.03846154, }, Object { "x": 1627974270000, @@ -634,11 +634,11 @@ Object { }, Object { "x": 1627974300000, - "y": 0.0579710144927536, + "y": 0.05797101, }, Object { "x": 1627974330000, - "y": 0.00108695652173913, + "y": 0.00108696, }, Object { "x": 1627974360000, @@ -646,7 +646,7 @@ Object { }, Object { "x": 1627974390000, - "y": 0.263888888888889, + "y": 0.26388889, }, Object { "x": 1627974420000, @@ -658,11 +658,11 @@ Object { }, Object { "x": 1627974480000, - "y": 0.0193370165745856, + "y": 0.01933702, }, Object { "x": 1627974510000, - "y": 0.183908045977011, + "y": 0.18390805, }, Object { "x": 1627974540000, @@ -670,7 +670,7 @@ Object { }, Object { "x": 1627974570000, - "y": 0.0357142857142857, + "y": 0.03571429, }, Object { "x": 1627974600000, @@ -678,11 +678,11 @@ Object { }, Object { "x": 1627974630000, - "y": 0.0793650793650794, + "y": 0.07936508, }, Object { "x": 1627974660000, - "y": 0.0265486725663717, + "y": 0.02654867, }, Object { "x": 1627974690000, @@ -690,15 +690,15 @@ Object { }, Object { "x": 1627974720000, - "y": 0.192307692307692, + "y": 0.19230769, }, Object { "x": 1627974750000, - "y": 0.150375939849624, + "y": 0.15037594, }, Object { "x": 1627974780000, - "y": 0.0561224489795918, + "y": 0.05612245, }, Object { "x": 1627974810000, @@ -706,15 +706,15 @@ Object { }, Object { "x": 1627974840000, - "y": 0.217391304347826, + "y": 0.2173913, }, Object { "x": 1627974870000, - "y": 0.115942028985507, + "y": 0.11594203, }, Object { "x": 1627974900000, - "y": 0.380281690140845, + "y": 0.38028169, }, Object { "x": 1627974930000, @@ -738,15 +738,15 @@ Object { }, Object { "x": 1627975080000, - "y": 0.0738636363636364, + "y": 0.07386364, }, Object { "x": 1627975110000, - "y": 0.157894736842105, + "y": 0.15789474, }, Object { "x": 1627975140000, - "y": 0.175438596491228, + "y": 0.1754386, }, Object { "x": 1627975170000, @@ -754,7 +754,7 @@ Object { }, Object { "x": 1627975200000, - "y": 0.211764705882353, + "y": 0.21176471, }, ], "hideLegend": false, @@ -771,7 +771,7 @@ Object { }, Object { "x": 1627973430000, - "y": 0.00403225806451613, + "y": 0.00403226, }, Object { "x": 1627973460000, @@ -779,11 +779,11 @@ Object { }, Object { "x": 1627973490000, - "y": 0.0123456790123457, + "y": 0.01234568, }, Object { "x": 1627973520000, - "y": 0.0857142857142857, + "y": 0.08571429, }, Object { "x": 1627973550000, @@ -791,7 +791,7 @@ Object { }, Object { "x": 1627973580000, - "y": 0.0181818181818182, + "y": 0.01818182, }, Object { "x": 1627973610000, @@ -803,11 +803,11 @@ Object { }, Object { "x": 1627973670000, - "y": 0.00404858299595142, + "y": 0.00404858, }, Object { "x": 1627973700000, - "y": 0.0151515151515152, + "y": 0.01515152, }, Object { "x": 1627973730000, @@ -815,7 +815,7 @@ Object { }, Object { "x": 1627973760000, - "y": 0.00520833333333333, + "y": 0.00520833, }, Object { "x": 1627973790000, @@ -847,7 +847,7 @@ Object { }, Object { "x": 1627974000000, - "y": 0.0166666666666667, + "y": 0.01666667, }, Object { "x": 1627974030000, @@ -855,11 +855,11 @@ Object { }, Object { "x": 1627974060000, - "y": 0.112903225806452, + "y": 0.11290323, }, Object { "x": 1627974090000, - "y": 0.00719424460431655, + "y": 0.00719424, }, Object { "x": 1627974120000, @@ -867,19 +867,19 @@ Object { }, Object { "x": 1627974150000, - "y": 0.0377358490566038, + "y": 0.03773585, }, Object { "x": 1627974180000, - "y": 0.0357142857142857, + "y": 0.03571429, }, Object { "x": 1627974210000, - "y": 0.0318021201413428, + "y": 0.03180212, }, Object { "x": 1627974240000, - "y": 0.0192307692307692, + "y": 0.01923077, }, Object { "x": 1627974270000, @@ -887,11 +887,11 @@ Object { }, Object { "x": 1627974300000, - "y": 0.0338164251207729, + "y": 0.03381643, }, Object { "x": 1627974330000, - "y": 0.00062111801242236, + "y": 0.00062112, }, Object { "x": 1627974360000, @@ -899,7 +899,7 @@ Object { }, Object { "x": 1627974390000, - "y": 0.0416666666666667, + "y": 0.04166667, }, Object { "x": 1627974420000, @@ -911,11 +911,11 @@ Object { }, Object { "x": 1627974480000, - "y": 0.00552486187845304, + "y": 0.00552486, }, Object { "x": 1627974510000, - "y": 0.0114942528735632, + "y": 0.01149425, }, Object { "x": 1627974540000, @@ -923,7 +923,7 @@ Object { }, Object { "x": 1627974570000, - "y": 0.0714285714285714, + "y": 0.07142857, }, Object { "x": 1627974600000, @@ -931,11 +931,11 @@ Object { }, Object { "x": 1627974630000, - "y": 0.0158730158730159, + "y": 0.01587302, }, Object { "x": 1627974660000, - "y": 0.00884955752212389, + "y": 0.00884956, }, Object { "x": 1627974690000, @@ -943,15 +943,15 @@ Object { }, Object { "x": 1627974720000, - "y": 0.0384615384615385, + "y": 0.03846154, }, Object { "x": 1627974750000, - "y": 0.0601503759398496, + "y": 0.06015038, }, Object { "x": 1627974780000, - "y": 0.0153061224489796, + "y": 0.01530612, }, Object { "x": 1627974810000, @@ -959,7 +959,7 @@ Object { }, Object { "x": 1627974840000, - "y": 0.0434782608695652, + "y": 0.04347826, }, Object { "x": 1627974870000, @@ -967,7 +967,7 @@ Object { }, Object { "x": 1627974900000, - "y": 0.0140845070422535, + "y": 0.01408451, }, Object { "x": 1627974930000, @@ -991,11 +991,11 @@ Object { }, Object { "x": 1627975080000, - "y": 0.00568181818181818, + "y": 0.00568182, }, Object { "x": 1627975110000, - "y": 0.157894736842105, + "y": 0.15789474, }, Object { "x": 1627975140000, @@ -1007,7 +1007,7 @@ Object { }, Object { "x": 1627975200000, - "y": 0.0117647058823529, + "y": 0.01176471, }, ], "hideLegend": false, diff --git a/x-pack/test/automatic_import_api_integration/common/config.ts b/x-pack/test/automatic_import_api_integration/common/config.ts new file mode 100644 index 0000000000000..aa83401a5e8b6 --- /dev/null +++ b/x-pack/test/automatic_import_api_integration/common/config.ts @@ -0,0 +1,89 @@ +/* + * 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 { CA_CERT_PATH } from '@kbn/dev-utils'; +import { FtrConfigProviderContext } from '@kbn/test'; +import { services } from './services'; + +interface CreateTestConfigOptions { + license: string; + disabledPlugins?: string[]; + ssl?: boolean; + testFiles?: string[]; + publicBaseUrl?: boolean; +} + +const enabledActionTypes = ['.bedrock', '.gemini', '.gen-ai']; + +export function createTestConfig(name: string, options: CreateTestConfigOptions) { + const { license = 'trial', disabledPlugins = [], ssl = false, testFiles = [] } = options; + + return async ({ readConfigFile }: FtrConfigProviderContext) => { + const xPackApiIntegrationTestsConfig = await readConfigFile( + require.resolve('../../api_integration/config.ts') + ); + + const servers = { + ...xPackApiIntegrationTestsConfig.get('servers'), + elasticsearch: { + ...xPackApiIntegrationTestsConfig.get('servers.elasticsearch'), + protocol: ssl ? 'https' : 'http', + }, + }; + + return { + testFiles, + servers, + services, + junit: { + reportName: 'X-Pack Automatic Import API Integration Tests', + }, + esTestCluster: { + ...xPackApiIntegrationTestsConfig.get('esTestCluster'), + license, + ssl, + serverArgs: [ + `xpack.license.self_generated.type=${license}`, + `xpack.security.enabled=${ + !disabledPlugins.includes('security') && ['trial', 'basic'].includes(license) + }`, + ], + }, + kbnTestServer: { + ...xPackApiIntegrationTestsConfig.get('kbnTestServer'), + serverArgs: [ + ...xPackApiIntegrationTestsConfig.get('kbnTestServer.serverArgs'), + ...(options.publicBaseUrl ? ['--server.publicBaseUrl=https://localhost:5601'] : []), + `--xpack.actions.allowedHosts=${JSON.stringify(['localhost', 'some.non.existent.com'])}`, + `--xpack.actions.enabledActionTypes=${JSON.stringify(enabledActionTypes)}`, + '--xpack.eventLog.logEntries=true', + // Configure a bedrock connector as a default + `--xpack.actions.preconfigured=${JSON.stringify({ + 'preconfigured-bedrock': { + name: 'preconfigured-bedrock', + actionTypeId: '.bedrock', + config: { + apiUrl: 'https://example.com', + }, + secrets: { + username: 'elastic', + password: 'elastic', + }, + }, + })}`, + ...(ssl + ? [ + `--elasticsearch.hosts=${servers.elasticsearch.protocol}://${servers.elasticsearch.hostname}:${servers.elasticsearch.port}`, + `--elasticsearch.ssl.certificateAuthorities=${CA_CERT_PATH}`, + ] + : []), + '--xpack.integration_assistant.enabled=true', + ], + }, + }; + }; +} diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/index.ts b/x-pack/test/automatic_import_api_integration/common/ftr_provider_context.d.ts similarity index 59% rename from x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/index.ts rename to x-pack/test/automatic_import_api_integration/common/ftr_provider_context.d.ts index 90d007d1d9411..aa56557c09df8 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/version_mismatch/index.ts +++ b/x-pack/test/automatic_import_api_integration/common/ftr_provider_context.d.ts @@ -5,5 +5,8 @@ * 2.0. */ -export { VersionMismatchPage } from './version_mismatch_page'; -export { VersionMismatchError } from './version_mismatch_error'; +import { GenericFtrProviderContext } from '@kbn/test'; + +import { services } from './services'; + +export type FtrProviderContext = GenericFtrProviderContext; diff --git a/x-pack/test/automatic_import_api_integration/common/lib/api/analyze_logs.ts b/x-pack/test/automatic_import_api_integration/common/lib/api/analyze_logs.ts new file mode 100644 index 0000000000000..4ad3034a0f55b --- /dev/null +++ b/x-pack/test/automatic_import_api_integration/common/lib/api/analyze_logs.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 SuperTest from 'supertest'; +import { + AnalyzeLogsRequestBody, + ANALYZE_LOGS_PATH, + AnalyzeLogsResponse, +} from '@kbn/integration-assistant-plugin/common'; +import { superUser } from '../authentication/users'; +import { User } from '../authentication/types'; + +export const postAnalyzeLogs = async ({ + supertest, + req, + expectedHttpCode = 404, + auth = { user: superUser }, +}: { + supertest: SuperTest.Agent; + req: AnalyzeLogsRequestBody; + expectedHttpCode?: number; + auth: { user: User }; +}): Promise => { + const { body: response } = await supertest + .post(`${ANALYZE_LOGS_PATH}`) + .send(req) + .set('kbn-xsrf', 'abc') + .set('elastic-api-version', '1') + .auth(auth.user.username, auth.user.password) + .expect(expectedHttpCode); + + return response; +}; diff --git a/x-pack/test/automatic_import_api_integration/common/lib/api/categorization.ts b/x-pack/test/automatic_import_api_integration/common/lib/api/categorization.ts new file mode 100644 index 0000000000000..f14efc63ee8a0 --- /dev/null +++ b/x-pack/test/automatic_import_api_integration/common/lib/api/categorization.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 SuperTest from 'supertest'; +import { + CategorizationRequestBody, + CATEGORIZATION_GRAPH_PATH, + CategorizationResponse, +} from '@kbn/integration-assistant-plugin/common'; +import { superUser } from '../authentication/users'; +import { User } from '../authentication/types'; + +export const postCategorization = async ({ + supertest, + req, + expectedHttpCode = 404, + auth = { user: superUser }, +}: { + supertest: SuperTest.Agent; + req: CategorizationRequestBody; + expectedHttpCode?: number; + auth: { user: User }; +}): Promise => { + const { body: response } = await supertest + .post(`${CATEGORIZATION_GRAPH_PATH}`) + .send(req) + .set('kbn-xsrf', 'abc') + .set('elastic-api-version', '1') + .auth(auth.user.username, auth.user.password) + .expect(expectedHttpCode); + + return response; +}; diff --git a/x-pack/test/automatic_import_api_integration/common/lib/api/ecs.ts b/x-pack/test/automatic_import_api_integration/common/lib/api/ecs.ts new file mode 100644 index 0000000000000..3169659d7e2f3 --- /dev/null +++ b/x-pack/test/automatic_import_api_integration/common/lib/api/ecs.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 SuperTest from 'supertest'; +import { + EcsMappingRequestBody, + ECS_GRAPH_PATH, + EcsMappingResponse, +} from '@kbn/integration-assistant-plugin/common'; +import { superUser } from '../authentication/users'; +import { User } from '../authentication/types'; + +export const postEcsMapping = async ({ + supertest, + req, + expectedHttpCode = 404, + auth = { user: superUser }, +}: { + supertest: SuperTest.Agent; + req: EcsMappingRequestBody; + expectedHttpCode?: number; + auth: { user: User }; +}): Promise => { + const { body: response } = await supertest + .post(`${ECS_GRAPH_PATH}`) + .send(req) + .set('kbn-xsrf', 'abc') + .set('elastic-api-version', '1') + .auth(auth.user.username, auth.user.password) + .expect(expectedHttpCode); + + return response; +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/error_state/index.ts b/x-pack/test/automatic_import_api_integration/common/lib/api/index.ts similarity index 84% rename from x-pack/plugins/enterprise_search/public/applications/workplace_search/views/error_state/index.ts rename to x-pack/test/automatic_import_api_integration/common/lib/api/index.ts index 9e27852336849..d07ba14d384fd 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/error_state/index.ts +++ b/x-pack/test/automatic_import_api_integration/common/lib/api/index.ts @@ -4,5 +4,4 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - -export { ErrorState } from './error_state'; +export * from './user_profiles'; diff --git a/x-pack/test/automatic_import_api_integration/common/lib/api/related.ts b/x-pack/test/automatic_import_api_integration/common/lib/api/related.ts new file mode 100644 index 0000000000000..7ebe3d3bf89c2 --- /dev/null +++ b/x-pack/test/automatic_import_api_integration/common/lib/api/related.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 SuperTest from 'supertest'; +import { + RelatedRequestBody, + RELATED_GRAPH_PATH, + RelatedResponse, +} from '@kbn/integration-assistant-plugin/common'; +import { superUser } from '../authentication/users'; +import { User } from '../authentication/types'; + +export const postRelated = async ({ + supertest, + req, + expectedHttpCode = 404, + auth = { user: superUser }, +}: { + supertest: SuperTest.Agent; + req: RelatedRequestBody; + expectedHttpCode?: number; + auth: { user: User }; +}): Promise => { + const { body: response } = await supertest + .post(`${RELATED_GRAPH_PATH}`) + .send(req) + .set('kbn-xsrf', 'abc') + .set('elastic-api-version', '1') + .auth(auth.user.username, auth.user.password) + .expect(expectedHttpCode); + + return response; +}; diff --git a/x-pack/test/automatic_import_api_integration/common/lib/api/user_profiles.ts b/x-pack/test/automatic_import_api_integration/common/lib/api/user_profiles.ts new file mode 100644 index 0000000000000..4a5c083e00fd6 --- /dev/null +++ b/x-pack/test/automatic_import_api_integration/common/lib/api/user_profiles.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. + */ + +import type SuperTest from 'supertest'; +import { parse as parseCookie, Cookie } from 'tough-cookie'; +import { superUser } from '../authentication/users'; +import { User } from '../authentication/types'; + +export const loginUsers = async ({ + supertest, + users = [superUser], +}: { + supertest: SuperTest.Agent; + users?: User[]; +}) => { + const cookies: Cookie[] = []; + + for (const user of users) { + const response = await supertest + .post('/internal/security/login') + .set('kbn-xsrf', 'xxx') + .send({ + providerType: 'basic', + providerName: 'basic', + currentURL: '/', + params: { username: user.username, password: user.password }, + }) + .expect(200); + + cookies.push(parseCookie(response.header['set-cookie'][0])!); + } + + return cookies; +}; diff --git a/x-pack/test/automatic_import_api_integration/common/lib/authentication/index.ts b/x-pack/test/automatic_import_api_integration/common/lib/authentication/index.ts new file mode 100644 index 0000000000000..a886cf111d3f3 --- /dev/null +++ b/x-pack/test/automatic_import_api_integration/common/lib/authentication/index.ts @@ -0,0 +1,85 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FtrProviderContext as CommonFtrProviderContext } from '../../ftr_provider_context'; +import { Role, User, UserInfo } from './types'; +import { noIntegrationsUser, users } from './users'; +import { roles } from './roles'; +import { loginUsers } from '../api'; + +export const getUserInfo = (user: User): UserInfo => ({ + username: user.username, + full_name: user.username.replace('_', ' '), + email: `${user.username}@elastic.co`, +}); + +/** + * Creates the users and roles for use in the tests. Defaults to specific users and roles used by the security + * scenarios but can be passed specific ones as well. + */ +export const createUsersAndRoles = async ( + getService: CommonFtrProviderContext['getService'], + usersToCreate: User[] = users, + rolesToCreate: Role[] = roles +) => { + const security = getService('security'); + + const createRole = async ({ name, privileges }: Role) => { + return await security.role.create(name, privileges); + }; + + const createUser = async (user: User) => { + const userInfo = getUserInfo(user); + + return await security.user.create(user.username, { + password: user.password, + roles: user.roles, + full_name: userInfo.full_name, + email: userInfo.email, + }); + }; + + await Promise.all(rolesToCreate.map((role) => createRole(role))); + await Promise.all(usersToCreate.map((user) => createUser(user))); +}; + +export const deleteUsersAndRoles = async ( + getService: CommonFtrProviderContext['getService'], + usersToDelete: User[] = users, + rolesToDelete: Role[] = roles +) => { + const security = getService('security'); + + try { + await Promise.allSettled(usersToDelete.map((user) => security.user.delete(user.username))); + } catch (error) { + // ignore errors because if a migration is run it will delete the .kibana index which remove the spaces and users + } + + try { + await Promise.allSettled(rolesToDelete.map((role) => security.role.delete(role.name))); + } catch (error) { + // ignore errors because if a migration is run it will delete the .kibana index which remove the spaces and users + } +}; + +export const createUsers = async (getService: CommonFtrProviderContext['getService']) => { + await createUsersAndRoles(getService); +}; + +export const deleteUsers = async (getService: CommonFtrProviderContext['getService']) => { + await deleteUsersAndRoles(getService); +}; + +export const activateUserProfiles = async (getService: CommonFtrProviderContext['getService']) => { + const supertestWithoutAuth = getService('supertestWithoutAuth'); + + await loginUsers({ + supertest: supertestWithoutAuth, + users: [noIntegrationsUser], + }); +}; diff --git a/x-pack/test/automatic_import_api_integration/common/lib/authentication/roles.ts b/x-pack/test/automatic_import_api_integration/common/lib/authentication/roles.ts new file mode 100644 index 0000000000000..dbd561aba4a58 --- /dev/null +++ b/x-pack/test/automatic_import_api_integration/common/lib/authentication/roles.ts @@ -0,0 +1,56 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { Role } from './types'; + +export const noIntegrationsPrivileges: Role = { + name: 'no_integrations_kibana_privileges', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + fleetv2: ['read'], + fleet: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + +export const onlyActions: Role = { + name: 'only_actions', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + actions: ['all'], + actionsSimulators: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + +export const roles = [noIntegrationsPrivileges, onlyActions]; diff --git a/x-pack/test/automatic_import_api_integration/common/lib/authentication/types.ts b/x-pack/test/automatic_import_api_integration/common/lib/authentication/types.ts new file mode 100644 index 0000000000000..3bf3629441f93 --- /dev/null +++ b/x-pack/test/automatic_import_api_integration/common/lib/authentication/types.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. + */ + +export interface Space { + id: string; + namespace?: string; + name: string; + disabledFeatures: string[]; +} + +export interface User { + username: string; + password: string; + description?: string; + roles: string[]; +} + +export interface UserInfo { + username: string; + full_name: string; + email: string; +} + +interface FeaturesPrivileges { + [featureId: string]: string[]; +} + +interface ElasticsearchIndices { + names: string[]; + privileges: string[]; +} + +export interface ElasticSearchPrivilege { + cluster?: string[]; + indices?: ElasticsearchIndices[]; +} + +export interface KibanaPrivilege { + spaces: string[]; + base?: string[]; + feature?: FeaturesPrivileges; +} + +export interface Role { + name: string; + privileges: { + elasticsearch?: ElasticSearchPrivilege; + kibana?: KibanaPrivilege[]; + }; +} diff --git a/x-pack/test/automatic_import_api_integration/common/lib/authentication/users.ts b/x-pack/test/automatic_import_api_integration/common/lib/authentication/users.ts new file mode 100644 index 0000000000000..6fea381d1e145 --- /dev/null +++ b/x-pack/test/automatic_import_api_integration/common/lib/authentication/users.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 { noIntegrationsPrivileges, onlyActions as onlyActionsRole } from './roles'; +import { User } from './types'; + +export const superUser: User = { + username: 'superuser', + password: 'superuser', + roles: ['superuser'], +}; + +export const noIntegrationsUser: User = { + username: 'no_integrations_user', + password: 'no_integrations_user', + roles: [noIntegrationsPrivileges.name], +}; + +export const onlyActions: User = { + username: 'only_actions', + password: 'only_actions', + roles: [onlyActionsRole.name], +}; + +export const users = [superUser, noIntegrationsUser, onlyActions]; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/error_connecting/index.ts b/x-pack/test/automatic_import_api_integration/common/services.ts similarity index 81% rename from x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/error_connecting/index.ts rename to x-pack/test/automatic_import_api_integration/common/services.ts index 59ac4e0e37efe..7e415338c405f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_overview/components/error_connecting/index.ts +++ b/x-pack/test/automatic_import_api_integration/common/services.ts @@ -5,4 +5,4 @@ * 2.0. */ -export { ErrorConnecting } from './error_connecting'; +export { services } from '../../api_integration/services'; diff --git a/x-pack/test/automatic_import_api_integration/security/config_basic.ts b/x-pack/test/automatic_import_api_integration/security/config_basic.ts new file mode 100644 index 0000000000000..ebda3390790e3 --- /dev/null +++ b/x-pack/test/automatic_import_api_integration/security/config_basic.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 { createTestConfig } from '../common/config'; + +// eslint-disable-next-line import/no-default-export +export default createTestConfig('security', { + license: 'basic', + ssl: true, + testFiles: [require.resolve('./tests/basic')], + publicBaseUrl: true, +}); diff --git a/x-pack/test/automatic_import_api_integration/security/tests/basic/graphs/analyze_logs.ts b/x-pack/test/automatic_import_api_integration/security/tests/basic/graphs/analyze_logs.ts new file mode 100644 index 0000000000000..6fb3abf127747 --- /dev/null +++ b/x-pack/test/automatic_import_api_integration/security/tests/basic/graphs/analyze_logs.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 { postAnalyzeLogs } from '../../../../common/lib/api/analyze_logs'; +import { FtrProviderContext } from '../../../../../common/ftr_provider_context'; +import { User } from '../../../../common/lib/authentication/types'; + +// eslint-disable-next-line import/no-default-export +export default ({ getService }: FtrProviderContext): void => { + const supertest = getService('supertest'); + + describe('Run analyze logs', () => { + it('should get 404 when trying to run analyze_logs with basic license', async () => { + return await postAnalyzeLogs({ + supertest, + req: { + packageName: 'some-package', + dataStreamName: 'some-data-stream', + connectorId: 'bedrock-connector', + packageTitle: 'packageTitle', + dataStreamTitle: 'dataStreamTitle', + logSamples: ['sample1', 'sample2'], + }, + auth: { + user: { username: 'elastic', password: 'elastic' } as User, + }, + }); + }); + }); +}; diff --git a/x-pack/test/automatic_import_api_integration/security/tests/basic/graphs/categorization.ts b/x-pack/test/automatic_import_api_integration/security/tests/basic/graphs/categorization.ts new file mode 100644 index 0000000000000..4d9a3a0853109 --- /dev/null +++ b/x-pack/test/automatic_import_api_integration/security/tests/basic/graphs/categorization.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. + */ + +import { postCategorization } from '../../../../common/lib/api/categorization'; +import { FtrProviderContext } from '../../../../../common/ftr_provider_context'; +import { User } from '../../../../common/lib/authentication/types'; + +// eslint-disable-next-line import/no-default-export +export default ({ getService }: FtrProviderContext): void => { + const supertest = getService('supertest'); + + describe('Run categorization', () => { + it('should get 404 when trying to run categorization with basic license', async () => { + return await postCategorization({ + supertest, + req: { + packageName: 'some-package', + dataStreamName: 'some-data-stream', + rawSamples: ['sample1', 'sample2'], + samplesFormat: { + name: 'json', + }, + connectorId: 'bedrock-connector', + currentPipeline: { + processors: [], + }, + }, + auth: { + user: { username: 'elastic', password: 'elastic' } as User, + }, + }); + }); + }); +}; diff --git a/x-pack/test/automatic_import_api_integration/security/tests/basic/graphs/ecs.ts b/x-pack/test/automatic_import_api_integration/security/tests/basic/graphs/ecs.ts new file mode 100644 index 0000000000000..d24a72f796d44 --- /dev/null +++ b/x-pack/test/automatic_import_api_integration/security/tests/basic/graphs/ecs.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 { postEcsMapping } from '../../../../common/lib/api/ecs'; +import { FtrProviderContext } from '../../../../../common/ftr_provider_context'; +import { User } from '../../../../common/lib/authentication/types'; + +// eslint-disable-next-line import/no-default-export +export default ({ getService }: FtrProviderContext): void => { + const supertest = getService('supertest'); + + describe('Run ecs_mapping', () => { + it('should get 404 when trying to run ecs_mapping with basic license', async () => { + return await postEcsMapping({ + supertest, + req: { + packageName: 'some-package', + dataStreamName: 'some-data-stream', + rawSamples: ['sample1', 'sample2'], + samplesFormat: { + name: 'json', + }, + connectorId: 'bedrock-connector', + }, + auth: { + user: { username: 'elastic', password: 'elastic' } as User, + }, + }); + }); + }); +}; diff --git a/x-pack/test/automatic_import_api_integration/security/tests/basic/graphs/related.ts b/x-pack/test/automatic_import_api_integration/security/tests/basic/graphs/related.ts new file mode 100644 index 0000000000000..6091b64f7c224 --- /dev/null +++ b/x-pack/test/automatic_import_api_integration/security/tests/basic/graphs/related.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. + */ + +import { postRelated } from '../../../../common/lib/api/related'; +import { FtrProviderContext } from '../../../../../common/ftr_provider_context'; +import { User } from '../../../../common/lib/authentication/types'; + +// eslint-disable-next-line import/no-default-export +export default ({ getService }: FtrProviderContext): void => { + const supertest = getService('supertest'); + + describe('Run related', () => { + it('should get 404 when trying to run related graph with basic license', async () => { + return await postRelated({ + supertest, + req: { + packageName: 'some-package', + dataStreamName: 'some-data-stream', + rawSamples: ['sample1', 'sample2'], + samplesFormat: { + name: 'json', + }, + connectorId: 'bedrock-connector', + currentPipeline: { + processors: [], + }, + }, + auth: { + user: { username: 'elastic', password: 'elastic' } as User, + }, + }); + }); + }); +}; diff --git a/x-pack/test/automatic_import_api_integration/security/tests/basic/index.ts b/x-pack/test/automatic_import_api_integration/security/tests/basic/index.ts new file mode 100644 index 0000000000000..7391c1e3ae9ed --- /dev/null +++ b/x-pack/test/automatic_import_api_integration/security/tests/basic/index.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 { FtrProviderContext } from '../../../common/ftr_provider_context'; +import { + createUsersAndRoles, + deleteUsersAndRoles, + activateUserProfiles, +} from '../../../common/lib/authentication'; + +// eslint-disable-next-line import/no-default-export +export default ({ loadTestFile, getService }: FtrProviderContext): void => { + describe('Automatic Import enabled: basic', function () { + before(async () => { + await createUsersAndRoles(getService); + // once a user profile is created the only way to remove it is to delete the user and roles, so best to activate + // before all the tests + await activateUserProfiles(getService); + }); + + after(async () => { + await deleteUsersAndRoles(getService); + }); + + // Basic + loadTestFile(require.resolve('./graphs/ecs')); + }); +}; diff --git a/x-pack/test/common/services/search_secure.ts b/x-pack/test/common/services/search_secure.ts index f46e9e57ef275..9f25140df5d23 100644 --- a/x-pack/test/common/services/search_secure.ts +++ b/x-pack/test/common/services/search_secure.ts @@ -44,10 +44,12 @@ export class SearchSecureService extends FtrService { space, }: SendOptions) { const spaceUrl = getSpaceUrlPrefix(space); + const statusesWithoutRetry = [200, 400, 403, 500]; const { body } = await this.retry.try(async () => { let result; const url = `${spaceUrl}/internal/search/${strategy}`; + if (referer && kibanaVersion) { result = await supertestWithoutAuth .post(url) @@ -89,9 +91,11 @@ export class SearchSecureService extends FtrService { .set('kbn-xsrf', 'true') .send(options); } - if ((result.status === 500 || result.status === 200) && result.body) { + + if (statusesWithoutRetry.includes(result.status) && result.body) { return result; } + throw new Error('try again'); }); diff --git a/x-pack/test/custom_branding/tests/settings.ts b/x-pack/test/custom_branding/tests/settings.ts index df4ccc53e7893..4b26641e3e4f2 100644 --- a/x-pack/test/custom_branding/tests/settings.ts +++ b/x-pack/test/custom_branding/tests/settings.ts @@ -91,8 +91,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { require.resolve('./acme_text.png') ); await goToSettings(); - const logo = await testSubjects.find('logo'); - const img = await logo.findByCssSelector('.chrHeaderLogo__mark'); + const img = await testSubjects.find('logoMark'); const imgSrc = (await img.getAttribute('src')) ?? ''; expect(imgSrc.startsWith('data:image/png')).to.be(true); }); diff --git a/x-pack/test/functional/apps/canvas/feature_controls/canvas_security.ts b/x-pack/test/functional/apps/canvas/feature_controls/canvas_security.ts index afcee962374db..1790fdd914289 100644 --- a/x-pack/test/functional/apps/canvas/feature_controls/canvas_security.ts +++ b/x-pack/test/functional/apps/canvas/feature_controls/canvas_security.ts @@ -69,7 +69,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('shows canvas navlink', async () => { const navLinks = (await appsMenu.readLinks()).map((link) => link.text); - expect(navLinks).to.eql(['Canvas']); + expect(navLinks).to.eql(['Canvas', 'Stack Management']); // access to the Reporting feature grants access to Stack Management }); it(`landing page shows "Create new workpad" button`, async () => { diff --git a/x-pack/test/functional/apps/canvas/reports.ts b/x-pack/test/functional/apps/canvas/reports.ts index 147f9c2b4b91d..880a8573991d0 100644 --- a/x-pack/test/functional/apps/canvas/reports.ts +++ b/x-pack/test/functional/apps/canvas/reports.ts @@ -27,14 +27,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { { spaces: ['*'], base: [], - feature: { canvas: ['read'] }, + feature: { canvas: ['read', 'generate_report'] }, }, ], }); - await security.testUser.setRoles([ - 'test_canvas_user', - 'reporting_user', // NOTE: the built-in role granting full reporting access is deprecated. See xpack.reporting.roles.enabled - ]); + await security.testUser.setRoles(['test_canvas_user']); await kibanaServer.importExport.load(archive); await browser.setWindowSize(1600, 850); }); diff --git a/x-pack/test/functional/apps/dashboard/group3/reporting/screenshots.ts b/x-pack/test/functional/apps/dashboard/group3/reporting/screenshots.ts index 60a7f754933de..30a715dc472a7 100644 --- a/x-pack/test/functional/apps/dashboard/group3/reporting/screenshots.ts +++ b/x-pack/test/functional/apps/dashboard/group3/reporting/screenshots.ts @@ -62,15 +62,12 @@ export default function ({ { spaces: ['*'], base: [], - feature: { dashboard: ['minimal_all'] }, + feature: { dashboard: ['minimal_all', 'generate_report'] }, }, ], }); - await security.testUser.setRoles([ - 'test_dashboard_user', - 'reporting_user', // NOTE: the built-in role granting full reporting access is deprecated. See the xpack.reporting.roles.enabled setting - ]); + await security.testUser.setRoles(['test_dashboard_user']); }); after('clean up archives', async () => { await share.closeShareModal(); @@ -221,7 +218,6 @@ export default function ({ }); it('downloads a PDF file with saved search given EuiDataGrid enabled', async function () { - await kibanaServer.uiSettings.update({ 'doc_table:legacy': false }); this.timeout(300000); await dashboard.navigateToApp(); await dashboard.loadSavedDashboard('Ecom Dashboard'); diff --git a/x-pack/test/functional/apps/dataset_quality/dataset_quality_details.ts b/x-pack/test/functional/apps/dataset_quality/dataset_quality_details.ts index 01dbbe1a0fc80..28a7cc9a9963d 100644 --- a/x-pack/test/functional/apps/dataset_quality/dataset_quality_details.ts +++ b/x-pack/test/functional/apps/dataset_quality/dataset_quality_details.ts @@ -250,7 +250,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid ); }); - it('Should navigate to integration overview page on clicking integration overview action', async () => { + it('should navigate to integration overview page on clicking integration overview action', async () => { await PageObjects.datasetQuality.navigateToDetails({ dataStream: bitbucketAuditDataStreamName, }); @@ -359,7 +359,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid ); }); - it('should show the degraded fields table with data when present', async () => { + it('should show the degraded fields table with data and spark plots when present', async () => { await PageObjects.datasetQuality.navigateToDetails({ dataStream: degradedDataStreamName, }); @@ -372,15 +372,6 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid await PageObjects.datasetQuality.getDatasetQualityDetailsDegradedFieldTableRows(); expect(rows.length).to.eql(3); - }); - - it('should display Spark Plot for every row of degraded fields', async () => { - await PageObjects.datasetQuality.navigateToDetails({ - dataStream: degradedDataStreamName, - }); - - const rows = - await PageObjects.datasetQuality.getDatasetQualityDetailsDegradedFieldTableRows(); const sparkPlots = await testSubjects.findAll( PageObjects.datasetQuality.testSubjectSelectors.datasetQualitySparkPlot diff --git a/x-pack/test/functional/apps/dataset_quality/degraded_field_flyout.ts b/x-pack/test/functional/apps/dataset_quality/degraded_field_flyout.ts index f5d695b8f165c..19a2001603925 100644 --- a/x-pack/test/functional/apps/dataset_quality/degraded_field_flyout.ts +++ b/x-pack/test/functional/apps/dataset_quality/degraded_field_flyout.ts @@ -42,13 +42,16 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid const customComponentTemplateName = 'logs-synth@mappings'; const nginxAccessDatasetName = 'nginx.access'; - const customComponentTemplateNameNginx = 'logs-nginx.access@custom'; + const customComponentTemplateNameNginx = `logs-${nginxAccessDatasetName}@custom`; const nginxAccessDataStreamName = `${type}-${nginxAccessDatasetName}-${defaultNamespace}`; const nginxPkg = { name: 'nginx', version: '1.23.0', }; + const apmAppDatasetName = 'apm.app.tug'; + const apmAppDataStreamName = `${type}-${apmAppDatasetName}-${defaultNamespace}`; + describe('Degraded fields flyout', () => { describe('degraded field flyout open-close', () => { before(async () => { @@ -131,7 +134,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid // Install Nginx Integration and ingest logs for it await PageObjects.observabilityLogsExplorer.installPackage(nginxPkg); - // Create custom component template to avoid issues with LogsDB + // Create custom component template for Nginx to avoid issues with LogsDB await synthtrace.createComponentTemplate( customComponentTemplateNameNginx, logsNginxMappings(nginxAccessDatasetName) @@ -184,6 +187,29 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid .timestamp(timestamp) ); }), + // Ingest Degraded Logs with 26 fields in Apm DataSet + timerange(moment(to).subtract(count, 'minute'), moment(to)) + .interval('1m') + .rate(1) + .generator((timestamp) => { + return Array(1) + .fill(0) + .flatMap(() => + log + .create() + .dataset(apmAppDatasetName) + .message('a log message') + .logLevel(MORE_THAN_1024_CHARS) + .service(serviceName) + .namespace(defaultNamespace) + .defaults({ + 'service.name': serviceName, + 'trace.id': generateShortId(), + test_field: [MORE_THAN_1024_CHARS, ANOTHER_1024_CHARS], + }) + .timestamp(timestamp) + ); + }), ]); // Set Limit of 25 @@ -199,6 +225,11 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid 'mapping.total_fields.limit': 42, }); + // Set Limit of 26 + await PageObjects.datasetQuality.setDataStreamSettings(apmAppDataStreamName, { + 'mapping.total_fields.limit': 25, + }); + await synthtrace.index([ // Ingest Degraded Logs with 26 field timerange(moment(to).subtract(count, 'minute'), moment(to)) @@ -248,11 +279,36 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid .timestamp(timestamp) ); }), + // Ingest Degraded Logs with 27 fields in Apm APP DataSet + timerange(moment(to).subtract(count, 'minute'), moment(to)) + .interval('1m') + .rate(1) + .generator((timestamp) => { + return Array(1) + .fill(0) + .flatMap(() => + log + .create() + .dataset(apmAppDatasetName) + .message('a log message') + .logLevel(MORE_THAN_1024_CHARS) + .service(serviceName) + .namespace(defaultNamespace) + .defaults({ + 'service.name': serviceName, + 'trace.id': generateShortId(), + test_field: [MORE_THAN_1024_CHARS, ANOTHER_1024_CHARS], + 'cloud.project.id': generateShortId(), + }) + .timestamp(timestamp) + ); + }), ]); // Rollover Datastream to reset the limit to default which is 1000 await PageObjects.datasetQuality.rolloverDataStream(degradedDatasetWithLimitDataStreamName); await PageObjects.datasetQuality.rolloverDataStream(nginxAccessDataStreamName); + await PageObjects.datasetQuality.rolloverDataStream(apmAppDataStreamName); // Set Limit of 26 await PageObjects.datasetQuality.setDataStreamSettings( @@ -274,6 +330,16 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid } ); + // Set Limit of 27 + await PageObjects.datasetQuality.setDataStreamSettings( + PageObjects.datasetQuality.generateBackingIndexNameWithoutVersion({ + dataset: apmAppDatasetName, + }) + '-000002', + { + 'mapping.total_fields.limit': 27, + } + ); + await synthtrace.index([ // Ingest Degraded Logs with 26 field timerange(moment(to).subtract(count, 'minute'), moment(to)) @@ -323,6 +389,30 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid .timestamp(timestamp) ); }), + // Ingest Degraded Logs with 27 fields in Apm APP DataSet + timerange(moment(to).subtract(count, 'minute'), moment(to)) + .interval('1m') + .rate(1) + .generator((timestamp) => { + return Array(1) + .fill(0) + .flatMap(() => + log + .create() + .dataset(apmAppDatasetName) + .message('a log message') + .logLevel(MORE_THAN_1024_CHARS) + .service(serviceName) + .namespace(defaultNamespace) + .defaults({ + 'service.name': serviceName, + 'trace.id': generateShortId(), + test_field: [MORE_THAN_1024_CHARS, ANOTHER_1024_CHARS], + 'cloud.project.id': generateShortId(), + }) + .timestamp(timestamp) + ); + }), ]); }); @@ -568,6 +658,8 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid expandedDegradedField: 'test_field', }); + await PageObjects.datasetQuality.waitUntilPossibleMitigationsLoaded(); + // Possible Mitigation Section should exist await testSubjects.existOrFail( 'datasetQualityDetailsDegradedFieldFlyoutPossibleMitigationTitle' @@ -703,6 +795,36 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid expect(linkURL?.endsWith('mapping-settings-limit.html')).to.be(true); }); + it('should display increase field limit as a possible mitigation for special packages like apm app', async () => { + await PageObjects.datasetQuality.navigateToDetails({ + dataStream: apmAppDataStreamName, + expandedDegradedField: 'cloud.project', + }); + + // Field Limit Mitigation Section should exist + await testSubjects.existOrFail( + 'datasetQualityDetailsDegradedFieldFlyoutFieldLimitMitigationAccordion' + ); + + // Should display the panel to increase field limit + await testSubjects.existOrFail( + 'datasetQualityDetailsDegradedFieldFlyoutIncreaseFieldLimitPanel' + ); + + // Should display official online documentation link + await testSubjects.existOrFail( + 'datasetQualityManualMitigationsPipelineOfficialDocumentationLink' + ); + + const linkButton = await testSubjects.find( + 'datasetQualityManualMitigationsPipelineOfficialDocumentationLink' + ); + + const linkURL = await linkButton.getAttribute('href'); + + expect(linkURL?.endsWith('mapping-settings-limit.html')).to.be(true); + }); + it('should display increase field limit as a possible mitigation for non integration', async () => { await PageObjects.datasetQuality.navigateToDetails({ dataStream: degradedDatasetWithLimitDataStreamName, @@ -764,10 +886,10 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid expect(newFieldLimit).to.be(newLimit); // Should display the apply button - await testSubjects.existOrFail('datasetQualityIncreaseFieldMappingLimitButtonButton'); + await testSubjects.existOrFail('datasetQualityIncreaseFieldMappingLimitButton'); const applyButton = await testSubjects.find( - 'datasetQualityIncreaseFieldMappingLimitButtonButton' + 'datasetQualityIncreaseFieldMappingLimitButton' ); const applyButtonDisabledStatus = await applyButton.getAttribute('disabled'); @@ -792,7 +914,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid ); const applyButton = await testSubjects.find( - 'datasetQualityIncreaseFieldMappingLimitButtonButton' + 'datasetQualityIncreaseFieldMappingLimitButton' ); const applyButtonDisabledStatus = await applyButton.getAttribute('disabled'); @@ -814,7 +936,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid }); const applyButton = await testSubjects.find( - 'datasetQualityIncreaseFieldMappingLimitButtonButton' + 'datasetQualityIncreaseFieldMappingLimitButton' ); await applyButton.click(); diff --git a/x-pack/test/functional/apps/discover/saved_searches.ts b/x-pack/test/functional/apps/discover/saved_searches.ts index 3b039c8da9eee..ee733b4c4c46d 100644 --- a/x-pack/test/functional/apps/discover/saved_searches.ts +++ b/x-pack/test/functional/apps/discover/saved_searches.ts @@ -28,7 +28,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const ecommerceSOPath = 'x-pack/test/functional/fixtures/kbn_archiver/reporting/ecommerce.json'; const defaultSettings = { defaultIndex: 'logstash-*', - 'doc_table:legacy': false, }; const from = 'Apr 27, 2019 @ 23:56:51.374'; @@ -47,7 +46,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await esArchiver.unload('x-pack/test/functional/es_archives/reporting/ecommerce'); await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover'); await kibanaServer.importExport.unload(ecommerceSOPath); - await kibanaServer.uiSettings.unset('doc_table:legacy'); await common.unsetTime(); }); diff --git a/x-pack/test/functional/apps/discover/value_suggestions.ts b/x-pack/test/functional/apps/discover/value_suggestions.ts index f949a890d90c2..21a577ece13bf 100644 --- a/x-pack/test/functional/apps/discover/value_suggestions.ts +++ b/x-pack/test/functional/apps/discover/value_suggestions.ts @@ -35,14 +35,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await kibanaServer.importExport.load( 'x-pack/test/functional/fixtures/kbn_archiver/dashboard_drilldowns/drilldowns' ); - await kibanaServer.uiSettings.update({ - 'doc_table:legacy': false, - }); await timePicker.setDefaultAbsoluteRangeViaUiSettings(); }); after(async () => { - await kibanaServer.uiSettings.unset('doc_table:legacy'); await common.unsetTime(); await kibanaServer.savedObjects.cleanStandardList(); }); diff --git a/x-pack/test/functional/apps/discover/value_suggestions_non_timebased.ts b/x-pack/test/functional/apps/discover/value_suggestions_non_timebased.ts index b40c74bf06e41..47cc04b5b60fd 100644 --- a/x-pack/test/functional/apps/discover/value_suggestions_non_timebased.ts +++ b/x-pack/test/functional/apps/discover/value_suggestions_non_timebased.ts @@ -23,9 +23,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'test/functional/fixtures/kbn_archiver/index_pattern_without_timefield' ); await kibanaServer.uiSettings.replace({ defaultIndex: 'without-timefield' }); - await kibanaServer.uiSettings.update({ - 'doc_table:legacy': false, - }); }); after(async () => { @@ -34,7 +31,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ); await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); await kibanaServer.uiSettings.unset('defaultIndex'); - await kibanaServer.uiSettings.unset('doc_table:legacy'); }); it('shows all autosuggest options for a filter in discover context app', async () => { diff --git a/x-pack/test/functional/apps/index_management/config.ts b/x-pack/test/functional/apps/index_management/config.ts index d0d07ff200281..16999df37efd0 100644 --- a/x-pack/test/functional/apps/index_management/config.ts +++ b/x-pack/test/functional/apps/index_management/config.ts @@ -10,8 +10,90 @@ import { FtrConfigProviderContext } from '@kbn/test'; export default async function ({ readConfigFile }: FtrConfigProviderContext) { const functionalConfig = await readConfigFile(require.resolve('../../config.base.js')); + const baseConfig = functionalConfig.getAll(); + + baseConfig.security.roles.index_management_manage_index_templates = { + elasticsearch: { + cluster: ['manage_index_templates'], + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + advancedSettings: ['read'], + }, + spaces: ['*'], + }, + ], + }; + + baseConfig.security.roles.index_management_monitor_only = { + elasticsearch: { + cluster: ['monitor'], + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + advancedSettings: ['read'], + }, + spaces: ['*'], + }, + ], + }; + + baseConfig.security.roles.index_management_manage_enrich_only = { + elasticsearch: { + cluster: ['manage_enrich'], + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + advancedSettings: ['read'], + }, + spaces: ['*'], + }, + ], + }; + + baseConfig.security.roles.index_management_monitor_enrich_only = { + elasticsearch: { + cluster: ['monitor_enrich'], + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + advancedSettings: ['read'], + }, + spaces: ['*'], + }, + ], + }; + return { - ...functionalConfig.getAll(), + ...baseConfig, testFiles: [require.resolve('.')], }; } diff --git a/x-pack/test/functional/apps/index_management/enrich_policies_tab/enrich_policies_tab.ts b/x-pack/test/functional/apps/index_management/enrich_policies_tab/enrich_policies_tab.ts index a473a33d298c0..e74a14fe4f26b 100644 --- a/x-pack/test/functional/apps/index_management/enrich_policies_tab/enrich_policies_tab.ts +++ b/x-pack/test/functional/apps/index_management/enrich_policies_tab/enrich_policies_tab.ts @@ -23,6 +23,12 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { describe('Enrich policies tab', function () { before(async () => { await log.debug('Creating required index and enrich policy'); + + try { + await es.indices.delete({ index: ENRICH_INDEX_NAME }); + // eslint-disable-next-line no-empty + } catch (e) {} + try { await es.indices.create({ index: ENRICH_INDEX_NAME, @@ -94,7 +100,22 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { expect(await successToast.getVisibleText()).to.contain(`Executed ${ENRICH_POLICY_NAME}`); }); + it('read only access', async () => { + await security.testUser.setRoles(['index_management_monitor_enrich_only']); + await pageObjects.common.navigateToApp('indexManagement'); + await pageObjects.indexManagement.changeTabs('enrich_policiesTab'); + await pageObjects.header.waitUntilLoadingHasFinished(); + + await testSubjects.missingOrFail('createPolicyButton'); + await testSubjects.missingOrFail('deletePolicyButton'); + }); + it('can delete a policy', async () => { + await security.testUser.setRoles(['index_management_user']); + await pageObjects.common.navigateToApp('indexManagement'); + // Navigate to the enrich policies tab + await pageObjects.indexManagement.changeTabs('enrich_policiesTab'); + await pageObjects.header.waitUntilLoadingHasFinished(); // Since we disabled wait_for_completion in the server request, we dont know when // a given policy will finish executing. Until that happens the policy cannot // be deleted. 2s seems to be plenty enough to guarantee that, at least for this @@ -104,8 +125,14 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await pageObjects.indexManagement.clickDeleteEnrichPolicyAt(0); await pageObjects.indexManagement.clickConfirmModalButton(); - const successToast = await toasts.getElementByIndex(2); + const successToast = await toasts.getElementByIndex(1); expect(await successToast.getVisibleText()).to.contain(`Deleted ${ENRICH_POLICY_NAME}`); }); + + it('no access', async () => { + await security.testUser.setRoles(['index_management_monitor_only']); + await pageObjects.common.navigateToApp('indexManagement'); + await testSubjects.missingOrFail('enrich_policiesTab'); + }); }); }; diff --git a/x-pack/test/functional/apps/infra/hosts_view.ts b/x-pack/test/functional/apps/infra/hosts_view.ts index dd6a420d27fbe..52b3484ed50e5 100644 --- a/x-pack/test/functional/apps/infra/hosts_view.ts +++ b/x-pack/test/functional/apps/infra/hosts_view.ts @@ -341,7 +341,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const currentUrl = await browser.getCurrentUrl(); const parsedUrl = new URL(currentUrl); const baseUrl = `${parsedUrl.protocol}//${parsedUrl.host}`; - const expectedUrlPattern = `${baseUrl}/app/observabilityOnboarding/?category=logs`; + const expectedUrlPattern = `${baseUrl}/app/observabilityOnboarding/?category=host`; expect(currentUrl).to.equal(expectedUrlPattern); }); }); diff --git a/x-pack/test/functional/apps/infra/metrics_source_configuration.ts b/x-pack/test/functional/apps/infra/metrics_source_configuration.ts index 46d20489e4d36..39c6b33d2f3e2 100644 --- a/x-pack/test/functional/apps/infra/metrics_source_configuration.ts +++ b/x-pack/test/functional/apps/infra/metrics_source_configuration.ts @@ -7,13 +7,10 @@ import { cleanup, Dataset, generate, PartialConfig } from '@kbn/data-forge'; import expect from '@kbn/expect'; -import { - Aggregators, - InfraRuleType, - MetricThresholdParams, -} from '@kbn/infra-plugin/common/alerting/metrics'; +import { Aggregators, MetricThresholdParams } from '@kbn/infra-plugin/common/alerting/metrics'; import { COMPARATORS } from '@kbn/alerting-comparators'; +import { InfraRuleType } from '@kbn/rule-data-utils'; import { createRule } from '../../../alerting_api_integration/observability/helpers/alerting_api_helper'; import { waitForDocumentInIndex, diff --git a/x-pack/test/functional/apps/lens/group2/persistent_context.ts b/x-pack/test/functional/apps/lens/group2/persistent_context.ts index 6a6f56578882b..b1e78d0ccb34d 100644 --- a/x-pack/test/functional/apps/lens/group2/persistent_context.ts +++ b/x-pack/test/functional/apps/lens/group2/persistent_context.ts @@ -73,9 +73,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visualize.gotoVisualizationLandingPage(); await listingTable.searchForItemWithName('lnsTableVis'); await lens.clickVisualizeListItemTitle('lnsTableVis'); - await navigationalSearch.focus(); - await navigationalSearch.searchFor('type:application lens'); - await navigationalSearch.clickOnOption(0); + await retry.try(async () => { + await navigationalSearch.focus(); + await navigationalSearch.searchFor('type:application lens'); + await navigationalSearch.clickOnOption(0); + }); await lens.waitForEmptyWorkspace(); await lens.switchToVisualization('lnsLegacyMetric'); await lens.dragFieldToWorkspace('@timestamp', 'legacyMtrVis'); diff --git a/x-pack/test/functional/apps/lens/group6/lens_reporting.ts b/x-pack/test/functional/apps/lens/group6/lens_reporting.ts index 26f68e73d10ef..f3bde620f21f9 100644 --- a/x-pack/test/functional/apps/lens/group6/lens_reporting.ts +++ b/x-pack/test/functional/apps/lens/group6/lens_reporting.ts @@ -30,12 +30,25 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'x-pack/test/functional/fixtures/kbn_archiver/lens/reporting' ); await timePicker.setDefaultAbsoluteRangeViaUiSettings(); + + // need reporting privileges in dashboard + await security.role.create('test_dashboard_user', { + elasticsearch: { cluster: [], indices: [], run_as: [] }, + kibana: [ + { + spaces: ['*'], + base: [], + feature: { dashboard: ['minimal_read', 'generate_report'] }, + }, + ], + }); + await security.testUser.setRoles( [ 'test_logstash_reader', 'global_dashboard_read', 'global_visualize_all', - 'reporting_user', // NOTE: the built-in role granting full reporting access is deprecated. See xpack.reporting.roles.enabled + 'test_dashboard_user', ], { skipBrowserRefresh: true } ); diff --git a/x-pack/test/functional/apps/lens/group6/workspace_size.ts b/x-pack/test/functional/apps/lens/group6/workspace_size.ts index 9ae8f21cebf69..86f5c481fff6c 100644 --- a/x-pack/test/functional/apps/lens/group6/workspace_size.ts +++ b/x-pack/test/functional/apps/lens/group6/workspace_size.ts @@ -267,15 +267,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await assertWorkspaceDimensions('600px', '375px'); }); - // Fails in chrome 128+: https://github.com/elastic/kibana-operations/issues/199 - it.skip('gauge size (absolute pixels) - major arc', async () => { + it('gauge size (absolute pixels) - major arc', async () => { await lens.openVisualOptions(); await lens.setGaugeShape('Major arc'); await assertWorkspaceDimensions('600px', '430px'); }); - // Fails in chrome 129+: https://github.com/elastic/kibana-operations/issues/199 - it.skip('gauge size (absolute pixels) - circle', async () => { + it('gauge size (absolute pixels) - circle', async () => { await lens.openVisualOptions(); await lens.setGaugeShape('Circle'); await assertWorkspaceDimensions('600px', '430px'); diff --git a/x-pack/test/functional/apps/management/feature_controls/management_security.ts b/x-pack/test/functional/apps/management/feature_controls/management_security.ts index 4e0b41270d231..286963b77d53b 100644 --- a/x-pack/test/functional/apps/management/feature_controls/management_security.ts +++ b/x-pack/test/functional/apps/management/feature_controls/management_security.ts @@ -72,6 +72,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { 'triggersActions', 'cases', 'triggersActionsConnectors', + 'reporting', 'jobsListLink', 'maintenanceWindows', ], diff --git a/x-pack/test/functional/apps/ml/short_tests/model_management/model_list.ts b/x-pack/test/functional/apps/ml/short_tests/model_management/model_list.ts index 7977f17bf5f65..c0d4af068832e 100644 --- a/x-pack/test/functional/apps/ml/short_tests/model_management/model_list.ts +++ b/x-pack/test/functional/apps/ml/short_tests/model_management/model_list.ts @@ -17,6 +17,8 @@ export default function ({ getService }: FtrProviderContext) { id: model.name, })); + const modelAllSpaces = SUPPORTED_TRAINED_MODELS.TINY_ELSER; + describe('trained models', function () { // 'Created at' will be different on each run, // so we will just assert that the value is in the expected timestamp format. @@ -91,6 +93,10 @@ export default function ({ getService }: FtrProviderContext) { await ml.api.importTrainedModel(model.id, model.name); } + // Assign model to all spaces + await ml.api.updateTrainedModelSpaces(modelAllSpaces.name, ['*'], ['default']); + await ml.api.assertTrainedModelSpaces(modelAllSpaces.name, ['*']); + await ml.api.createTestTrainedModels('classification', 15, true); await ml.api.createTestTrainedModels('regression', 15); @@ -173,9 +179,10 @@ export default function ({ getService }: FtrProviderContext) { await ml.securityUI.logout(); }); - it('should not be able to delete a model assigned to all spaces, and show a warning copy explaining the situation', async () => { - await ml.testExecution.logTestStep('should select the model named elser_model_2'); - await ml.trainedModels.selectModel('.elser_model_2'); + it.skip('should not be able to delete a model assigned to all spaces, and show a warning copy explaining the situation', async () => { + await ml.testExecution.logTestStep('should select a model'); + await ml.trainedModelsTable.filterWithSearchString(modelAllSpaces.name, 1); + await ml.trainedModels.selectModel(modelAllSpaces.name); await ml.testExecution.logTestStep('should attempt to delete the model'); await ml.trainedModels.clickBulkDelete(); @@ -493,6 +500,11 @@ export default function ({ getService }: FtrProviderContext) { await ml.trainedModelsTable.assertStatsTabContent(); await ml.trainedModelsTable.assertPipelinesTabContent(false); }); + } + + describe('supports actions for an imported model', function () { + // It's enough to test the actions for one model + const model = trainedModels[trainedModels.length - 1]; it(`starts deployment of the imported model ${model.id}`, async () => { await ml.trainedModelsTable.startDeploymentWithParams(model.id, { @@ -513,7 +525,7 @@ export default function ({ getService }: FtrProviderContext) { it(`deletes the imported model ${model.id}`, async () => { await ml.trainedModelsTable.deleteModel(model.id); }); - } + }); }); }); 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 cd2cdfba1ea31..7907121ae2e55 100644 --- a/x-pack/test/functional/apps/reporting_management/report_listing.ts +++ b/x-pack/test/functional/apps/reporting_management/report_listing.ts @@ -27,7 +27,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { before(async () => { await security.testUser.setRoles([ 'kibana_admin', // to access stack management - 'reporting_user', // NOTE: the built-in role granting full reporting access is deprecated. See xpack.reporting.roles.enabled ]); await kibanaServer.savedObjects.cleanStandardList(); await kibanaServer.importExport.load(kbnArchive); diff --git a/x-pack/test/functional/es_archives/observability/alerts/data.json.gz b/x-pack/test/functional/es_archives/observability/alerts/data.json.gz index 4017aaab1bddf..bcab15f41c449 100644 Binary files a/x-pack/test/functional/es_archives/observability/alerts/data.json.gz and b/x-pack/test/functional/es_archives/observability/alerts/data.json.gz differ diff --git a/x-pack/test/functional/es_archives/security_solution/alerts/8.1.0/data.json.gz b/x-pack/test/functional/es_archives/security_solution/alerts/8.1.0/data.json.gz index 50d664aa24ced..bebcb0d90f838 100644 Binary files a/x-pack/test/functional/es_archives/security_solution/alerts/8.1.0/data.json.gz and b/x-pack/test/functional/es_archives/security_solution/alerts/8.1.0/data.json.gz differ diff --git a/x-pack/test/functional/es_archives/task_manager_removed_types/data.json b/x-pack/test/functional/es_archives/task_manager_removed_types/data.json index 3fc1a2cad2d28..29333b60b292b 100644 --- a/x-pack/test/functional/es_archives/task_manager_removed_types/data.json +++ b/x-pack/test/functional/es_archives/task_manager_removed_types/data.json @@ -2,11 +2,9 @@ "type": "doc", "value": { "id": "task:ce7e1250-3322-11eb-94c1-db6995e83f6b", - "index": ".kibana_task_manager_1", + "index": ".kibana_task_manager", "source": { - "migrationVersion": { - "task": "7.6.0" - }, + "typeMigrationVersion": "7.6.0", "references": [ ], "task": { @@ -33,11 +31,9 @@ "type": "doc", "value": { "id": "task:be7e1250-3322-11eb-94c1-db6995e83f6a", - "index": ".kibana_task_manager_1", + "index": ".kibana_task_manager", "source": { - "migrationVersion": { - "task": "7.6.0" - }, + "typeMigrationVersion": "7.6.0", "references": [ ], "task": { diff --git a/x-pack/test/functional/es_archives/task_manager_removed_types/mappings.json b/x-pack/test/functional/es_archives/task_manager_removed_types/mappings.json deleted file mode 100644 index f35681efb089d..0000000000000 --- a/x-pack/test/functional/es_archives/task_manager_removed_types/mappings.json +++ /dev/null @@ -1,224 +0,0 @@ -{ - "type": "index", - "value": { - "aliases": { - ".kibana": { - } - }, - "index": ".kibana_1", - "mappings": { - "_meta": { - "migrationMappingPropertyHashes": { - "action": "6e96ac5e648f57523879661ea72525b7", - "action_task_params": "a9d49f184ee89641044be0ca2950fa3a", - "alert": "0359d7fcc04da9878ee9aadbda38ba55", - "api_key_pending_invalidation": "16f515278a295f6245149ad7c5ddedb7", - "apm-indices": "9bb9b2bf1fa636ed8619cbab5ce6a1dd", - "apm-telemetry": "3d1b76c39bfb2cc8296b024d73854724", - "app_search_telemetry": "3d1b76c39bfb2cc8296b024d73854724", - "application_usage_daily": "43b8830d5d0df85a6823d290885fc9fd", - "application_usage_totals": "3d1b76c39bfb2cc8296b024d73854724", - "application_usage_transactional": "3d1b76c39bfb2cc8296b024d73854724", - "search-session": "721df406dbb7e35ac22e4df6c3ad2b2a", - "canvas-element": "7390014e1091044523666d97247392fc", - "canvas-workpad": "b0a1706d356228dbdcb4a17e6b9eb231", - "canvas-workpad-template": "ae2673f678281e2c055d764b153e9715", - "cases": "477f214ff61acc3af26a7b7818e380c1", - "cases-comments": "8a50736330e953bca91747723a319593", - "cases-configure": "387c5f3a3bda7e0ae0dd4e106f914a69", - "cases-user-actions": "32277330ec6b721abe3b846cfd939a71", - "config": "c63748b75f39d0c54de12d12c1ccbc20", - "dashboard": "40554caf09725935e2c02e02563a2d07", - "endpoint:user-artifact": "4a11183eee21e6fbad864f7a30b39ad0", - "endpoint:user-artifact-manifest": "a0d7b04ad405eed54d76e279c3727862", - "enterprise_search_telemetry": "3d1b76c39bfb2cc8296b024d73854724", - "epm-packages": "2b83397e3eaaaa8ef15e38813f3721c3", - "event_log_test": "bef808d4a9c27f204ffbda3359233931", - "exception-list": "67f055ab8c10abd7b2ebfd969b836788", - "exception-list-agnostic": "67f055ab8c10abd7b2ebfd969b836788", - "file-upload-telemetry": "0ed4d3e1983d1217a30982630897092e", - "fleet-agent-actions": "9511b565b1cc6441a42033db3d5de8e9", - "fleet-agent-events": "e20a508b6e805189356be381dbfac8db", - "fleet-agents": "cb661e8ede2b640c42c8e5ef99db0683", - "fleet-enrollment-api-keys": "a69ef7ae661dab31561d6c6f052ef2a7", - "graph-workspace": "cd7ba1330e6682e9cc00b78850874be1", - "index-pattern": "45915a1ad866812242df474eb0479052", - "infrastructure-ui-source": "3d1b76c39bfb2cc8296b024d73854724", - "ingest-agent-policies": "8b0733cce189659593659dad8db426f0", - "ingest-outputs": "8854f34453a47e26f86a29f8f3b80b4e", - "ingest-package-policies": "c91ca97b1ff700f0fc64dc6b13d65a85", - "ingest_manager_settings": "02a03095f0e05b7a538fa801b88a217f", - "inventory-view": "3d1b76c39bfb2cc8296b024d73854724", - "kql-telemetry": "d12a98a6f19a2d273696597547e064ee", - "lens": "52346cfec69ff7b47d5f0c12361a2797", - "lens-ui-telemetry": "509bfa5978586998e05f9e303c07a327", - "map": "4a05b35c3a3a58fbc72dd0202dc3487f", - "maps-telemetry": "5ef305b18111b77789afefbd36b66171", - "metrics-explorer-view": "3d1b76c39bfb2cc8296b024d73854724", - "migrationVersion": "4a1746014a75ade3a714e1db5763276f", - "ml-job": "3bb64c31915acf93fc724af137a0891b", - "ml-telemetry": "257fd1d4b4fdbb9cb4b8a3b27da201e9", - "monitoring-telemetry": "2669d5ec15e82391cf58df4294ee9c68", - "namespace": "2f4316de49999235636386fe51dc06c1", - "namespaces": "2f4316de49999235636386fe51dc06c1", - "originId": "2f4316de49999235636386fe51dc06c1", - "query": "11aaeb7f5f7fa5bb43f25e18ce26e7d9", - "references": "7997cf5a56cc02bdc9c93361bde732b0", - "sample-data-telemetry": "7d3cfeb915303c9641c59681967ffeb4", - "search": "43012c7ebc4cb57054e0a490e4b43023", - "search-telemetry": "3d1b76c39bfb2cc8296b024d73854724", - "siem-detection-engine-rule-actions": "6569b288c169539db10cb262bf79de18", - "siem-detection-engine-rule-status": "ae783f41c6937db6b7a2ef5c93a9e9b0", - "siem-ui-timeline": "d12c5474364d737d17252acf1dc4585c", - "siem-ui-timeline-note": "8874706eedc49059d4cf0f5094559084", - "siem-ui-timeline-pinned-event": "20638091112f0e14f0e443d512301c29", - "space": "c5ca8acafa0beaa4d08d014a97b6bc6b", - "tag": "83d55da58f6530f7055415717ec06474", - "telemetry": "36a616f7026dfa617d6655df850fe16d", - "tsvb-validation-telemetry": "3a37ef6c8700ae6fc97d5c7da00e9215", - "type": "2f4316de49999235636386fe51dc06c1", - "ui-metric": "0d409297dc5ebe1e3a1da691c6ee32e3", - "updated_at": "00da57df13e94e9d98437d13ace4bfe0", - "upgrade-assistant-reindex-operation": "215107c281839ea9b3ad5f6419819763", - "upgrade-assistant-telemetry": "56702cec857e0a9dacfb696655b4ff7b", - "uptime-dynamic-settings": "3d1b76c39bfb2cc8296b024d73854724", - "url": "c7f66a0df8b1b52f17c28c4adb111105", - "visualization": "f819cf6636b75c9e76ba733a0c6ef355", - "workplace_search_telemetry": "3d1b76c39bfb2cc8296b024d73854724" - } - }, - "dynamic": "strict", - "properties": { - "type": { - "type": "keyword" - }, - "updated_at": { - "type": "date" - } - } - }, - "settings": { - "index": { - "auto_expand_replicas": "0-1", - "number_of_replicas": "0", - "number_of_shards": "1" - } - } - } -} - -{ - "type": "index", - "value": { - "aliases": { - ".kibana_task_manager": { - } - }, - "index": ".kibana_task_manager_1", - "mappings": { - "_meta": { - "migrationMappingPropertyHashes": { - "migrationVersion": "4a1746014a75ade3a714e1db5763276f", - "namespace": "2f4316de49999235636386fe51dc06c1", - "namespaces": "2f4316de49999235636386fe51dc06c1", - "originId": "2f4316de49999235636386fe51dc06c1", - "references": "7997cf5a56cc02bdc9c93361bde732b0", - "task": "235412e52d09e7165fac8a67a43ad6b4", - "type": "2f4316de49999235636386fe51dc06c1", - "updated_at": "00da57df13e94e9d98437d13ace4bfe0" - } - }, - "dynamic": "strict", - "properties": { - "migrationVersion": { - "dynamic": "true", - "properties": { - "task": { - "fields": { - "keyword": { - "ignore_above": 256, - "type": "keyword" - } - }, - "type": "text" - } - } - }, - "references": { - "properties": { - "id": { - "type": "keyword" - }, - "name": { - "type": "keyword" - }, - "type": { - "type": "keyword" - } - }, - "type": "nested" - }, - "task": { - "properties": { - "attempts": { - "type": "integer" - }, - "ownerId": { - "type": "keyword" - }, - "params": { - "type": "text" - }, - "retryAt": { - "type": "date" - }, - "runAt": { - "type": "date" - }, - "schedule": { - "properties": { - "interval": { - "type": "keyword" - } - } - }, - "scheduledAt": { - "type": "date" - }, - "scope": { - "type": "keyword" - }, - "startedAt": { - "type": "date" - }, - "state": { - "type": "text" - }, - "status": { - "type": "keyword" - }, - "taskType": { - "type": "keyword" - }, - "user": { - "type": "keyword" - } - } - }, - "type": { - "type": "keyword" - }, - "updated_at": { - "type": "date" - } - } - }, - "settings": { - "index": { - "auto_expand_replicas": "0-1", - "number_of_replicas": "0", - "number_of_shards": "1" - } - } - } -} diff --git a/x-pack/test/functional/page_objects/dataset_quality.ts b/x-pack/test/functional/page_objects/dataset_quality.ts index cef881fe0797c..47a9261c906f7 100644 --- a/x-pack/test/functional/page_objects/dataset_quality.ts +++ b/x-pack/test/functional/page_objects/dataset_quality.ts @@ -205,7 +205,10 @@ export function DatasetQualityPageObject({ getPageObjects, getService }: FtrProv }, async waitUntilPossibleMitigationsLoaded() { - await find.waitForDeletedByCssSelector('.euiFlyoutBody .euiSkeletonRectangle', 20 * 1000); + await find.waitForDeletedByCssSelector( + '.euiFlyoutBody .datasetQualityDetailsFlyoutManualMitigationsLoading', + 20 * 1000 + ); }, async waitUntilDegradedFieldFlyoutLoaded() { diff --git a/x-pack/test/functional/services/observability/alerts/common.ts b/x-pack/test/functional/services/observability/alerts/common.ts index 7f327664f1b71..b005add20ba55 100644 --- a/x-pack/test/functional/services/observability/alerts/common.ts +++ b/x-pack/test/functional/services/observability/alerts/common.ts @@ -155,6 +155,10 @@ export function ObservabilityAlertsCommonProvider({ return await (await getQueryBar()).type(query); }); + const clickOnQueryBar = retryOnStale.wrap(async () => { + return await (await getQueryBar()).click(); + }); + const submitQuery = async (query: string) => { await typeInQueryBar(query); await testSubjects.click('querySubmitButton'); @@ -382,6 +386,7 @@ export function ObservabilityAlertsCommonProvider({ return { getQueryBar, clearQueryBar, + clickOnQueryBar, closeAlertsFlyout, filterForValueButtonExists, getAlertsFlyout, diff --git a/x-pack/test/functional_execution_context/plugins/alerts/server/plugin.ts b/x-pack/test/functional_execution_context/plugins/alerts/server/plugin.ts index 9f6d33d9ca164..78c79375f3e9f 100644 --- a/x-pack/test/functional_execution_context/plugins/alerts/server/plugin.ts +++ b/x-pack/test/functional_execution_context/plugins/alerts/server/plugin.ts @@ -7,7 +7,7 @@ import apmAgent from 'elastic-apm-node'; import type { Plugin, CoreSetup } from '@kbn/core/server'; -import { PluginSetupContract as AlertingPluginSetup } from '@kbn/alerting-plugin/server/plugin'; +import { AlertingServerSetup } from '@kbn/alerting-plugin/server/plugin'; import { EncryptedSavedObjectsPluginStart } from '@kbn/encrypted-saved-objects-plugin/server'; import { FeaturesPluginSetup } from '@kbn/features-plugin/server'; import { SpacesPluginStart } from '@kbn/spaces-plugin/server'; @@ -16,7 +16,7 @@ import { KibanaFeatureScope } from '@kbn/features-plugin/common'; export interface FixtureSetupDeps { features: FeaturesPluginSetup; - alerting: AlertingPluginSetup; + alerting: AlertingServerSetup; } export interface FixtureStartDeps { @@ -34,8 +34,8 @@ export class FixturePlugin implements Plugin; + +export { services, pageObjects }; diff --git a/x-pack/test/functional_gen_ai/inference/tests/chat_complete.ts b/x-pack/test/functional_gen_ai/inference/tests/chat_complete.ts new file mode 100644 index 0000000000000..35bf7bf2b3e07 --- /dev/null +++ b/x-pack/test/functional_gen_ai/inference/tests/chat_complete.ts @@ -0,0 +1,263 @@ +/* + * 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 { lastValueFrom, toArray } from 'rxjs'; +import expect from '@kbn/expect'; +import { supertestToObservable } from '@kbn/sse-utils-server'; +import type { AvailableConnectorWithId } from '@kbn/gen-ai-functional-testing'; +import type { FtrProviderContext } from '../ftr_provider_context'; + +export const chatCompleteSuite = ( + { id: connectorId, actionTypeId: connectorType }: AvailableConnectorWithId, + { getService }: FtrProviderContext +) => { + const supertest = getService('supertest'); + + describe('chatComplete API', () => { + describe('streaming disabled', () => { + it('returns a chat completion message for a simple prompt', async () => { + const response = await supertest + .post(`/internal/inference/chat_complete`) + .set('kbn-xsrf', 'kibana') + .send({ + connectorId, + system: 'Please answer the user question', + messages: [{ role: 'user', content: '2+2 ?' }], + }) + .expect(200); + + const message = response.body; + + expect(message.toolCalls.length).to.eql(0); + expect(message.content).to.contain('4'); + }); + + it('executes a tool with native function calling', async () => { + const response = await supertest + .post(`/internal/inference/chat_complete`) + .set('kbn-xsrf', 'kibana') + .send({ + connectorId, + system: + 'Please answer the user question. You can use the available tools if you think it can help', + messages: [{ role: 'user', content: 'What is the result of 2*4*6*8*10*123 ?' }], + toolChoice: 'required', + tools: { + calculator: { + description: 'The calculator can be used to resolve mathematical calculations', + schema: { + type: 'object', + properties: { + formula: { + type: 'string', + description: `The input for the calculator, in plain text, e.g. "2+(4*8)"`, + }, + }, + }, + }, + }, + }) + .expect(200); + + const message = response.body; + + expect(message.toolCalls.length).to.eql(1); + expect(message.toolCalls[0].function.name).to.eql('calculator'); + expect(message.toolCalls[0].function.arguments.formula).to.contain('123'); + }); + + // simulated FC is only for openAI + if (connectorType === '.gen-ai') { + it('executes a tool with simulated function calling', async () => { + const response = await supertest + .post(`/internal/inference/chat_complete`) + .set('kbn-xsrf', 'kibana') + .send({ + connectorId, + system: + 'Please answer the user question. You can use the available tools if you think it can help', + messages: [{ role: 'user', content: 'What is the result of 2*4*6*8*10*123 ?' }], + functionCalling: 'simulated', + toolChoice: 'required', + tools: { + calculator: { + description: 'The calculator can be used to resolve mathematical calculations', + schema: { + type: 'object', + properties: { + formula: { + type: 'string', + description: `The input for the calculator, in plain text, e.g. "2+(4*8)"`, + }, + }, + }, + }, + }, + }) + .expect(200); + + const message = response.body; + + expect(message.toolCalls.length).to.eql(1); + expect(message.toolCalls[0].function.name).to.eql('calculator'); + expect(message.toolCalls[0].function.arguments.formula).to.contain('123'); + }); + } + + it('returns token counts', async () => { + const response = await supertest + .post(`/internal/inference/chat_complete`) + .set('kbn-xsrf', 'kibana') + .send({ + connectorId, + system: 'Please answer the user question', + messages: [{ role: 'user', content: '2+2 ?' }], + }) + .expect(200); + + const { tokens } = response.body; + + expect(tokens.prompt).to.be.greaterThan(0); + expect(tokens.completion).to.be.greaterThan(0); + expect(tokens.total).eql(tokens.prompt + tokens.completion); + }); + + it('returns an error with the expected shape in case of error', async () => { + const response = await supertest + .post(`/internal/inference/chat_complete`) + .set('kbn-xsrf', 'kibana') + .send({ + connectorId: 'do-not-exist', + system: 'Please answer the user question', + messages: [{ role: 'user', content: '2+2 ?' }], + }) + .expect(400); + + const message = response.body; + + expect(message).to.eql({ + type: 'error', + code: 'requestError', + message: "No connector found for id 'do-not-exist'", + }); + }); + }); + + describe('streaming enabled', () => { + it('returns a chat completion message for a simple prompt', async () => { + const response = supertest + .post(`/internal/inference/chat_complete/stream`) + .set('kbn-xsrf', 'kibana') + .send({ + connectorId, + system: 'Please answer the user question', + messages: [{ role: 'user', content: '2+2 ?' }], + }) + .expect(200); + + const observable = supertestToObservable(response); + + const message = await lastValueFrom(observable); + + expect({ + ...message, + content: '', + }).to.eql({ type: 'chatCompletionMessage', content: '', toolCalls: [] }); + expect(message.content).to.contain('4'); + }); + + it('executes a tool when explicitly requested', async () => { + const response = supertest + .post(`/internal/inference/chat_complete/stream`) + .set('kbn-xsrf', 'kibana') + .send({ + connectorId, + system: + 'Please answer the user question. You can use the available tools if you think it can help', + messages: [{ role: 'user', content: 'What is the result of 2*4*6*8*10*123 ?' }], + toolChoice: 'required', + tools: { + calculator: { + description: 'The calculator can be used to resolve mathematical calculations', + schema: { + type: 'object', + properties: { + formula: { + type: 'string', + description: `The input for the calculator, in plain text, e.g. "2+(4*8)"`, + }, + }, + }, + }, + }, + }) + .expect(200); + + const observable = supertestToObservable(response); + + const message = await lastValueFrom(observable); + + expect(message.toolCalls.length).to.eql(1); + expect(message.toolCalls[0].function.name).to.eql('calculator'); + expect(message.toolCalls[0].function.arguments.formula).to.contain('123'); + }); + + it('returns a token count event', async () => { + const response = supertest + .post(`/internal/inference/chat_complete/stream`) + .set('kbn-xsrf', 'kibana') + .send({ + connectorId, + system: 'Please answer the user question', + messages: [{ role: 'user', content: '2+2 ?' }], + }) + .expect(200); + + const observable = supertestToObservable(response); + + const events = await lastValueFrom(observable.pipe(toArray())); + const tokenEvent = events[events.length - 2]; + + expect(tokenEvent.type).to.eql('chatCompletionTokenCount'); + expect(tokenEvent.tokens.prompt).to.be.greaterThan(0); + expect(tokenEvent.tokens.completion).to.be.greaterThan(0); + expect(tokenEvent.tokens.total).to.be( + tokenEvent.tokens.prompt + tokenEvent.tokens.completion + ); + }); + + it('returns an error with the expected shape in case of error', async () => { + const response = supertest + .post(`/internal/inference/chat_complete/stream`) + .set('kbn-xsrf', 'kibana') + .send({ + connectorId: 'do-not-exist', + system: 'Please answer the user question', + messages: [{ role: 'user', content: '2+2 ?' }], + }) + .expect(200); + + const observable = supertestToObservable(response); + + const events = await lastValueFrom(observable.pipe(toArray())); + + expect(events).to.eql([ + { + type: 'error', + error: { + code: 'requestError', + message: "No connector found for id 'do-not-exist'", + meta: { + status: 400, + }, + }, + }, + ]); + }); + }); + }); +}; diff --git a/x-pack/test/functional_gen_ai/inference/tests/index.ts b/x-pack/test/functional_gen_ai/inference/tests/index.ts new file mode 100644 index 0000000000000..36cf2bbaffa14 --- /dev/null +++ b/x-pack/test/functional_gen_ai/inference/tests/index.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { getAvailableConnectors } from '@kbn/gen-ai-functional-testing'; +import { FtrProviderContext } from '../ftr_provider_context'; +import { chatCompleteSuite } from './chat_complete'; + +// eslint-disable-next-line import/no-default-export +export default function (providerContext: FtrProviderContext) { + describe('Inference plugin - API integration tests', async () => { + getAvailableConnectors().forEach((connector) => { + describe(`Connector ${connector.id}`, () => { + chatCompleteSuite(connector, providerContext); + }); + }); + }); +} diff --git a/x-pack/test/functional_search/tests/classic_navigation.ts b/x-pack/test/functional_search/tests/classic_navigation.ts index 7ec78394dae74..a290f7523f49c 100644 --- a/x-pack/test/functional_search/tests/classic_navigation.ts +++ b/x-pack/test/functional_search/tests/classic_navigation.ts @@ -42,7 +42,7 @@ export default function searchSolutionNavigation({ { id: 'Content', label: 'Content' }, { id: 'Indices', label: 'Indices' }, { id: 'Connectors', label: 'Connectors' }, - { id: 'Crawlers', label: 'Web crawlers' }, + { id: 'Crawlers', label: 'Web Crawlers' }, { id: 'Build', label: 'Build' }, { id: 'Playground', label: 'Playground' }, { id: 'SearchApplications', label: 'Search Applications' }, @@ -76,7 +76,7 @@ export default function searchSolutionNavigation({ await searchClassicNavigation.clickNavItem('Crawlers'); await searchClassicNavigation.expectNavItemActive('Crawlers'); await searchClassicNavigation.breadcrumbs.expectBreadcrumbExists('Content'); - await searchClassicNavigation.breadcrumbs.expectBreadcrumbExists('Web crawlers'); + await searchClassicNavigation.breadcrumbs.expectBreadcrumbExists('Web Crawlers'); // Check Build // > Playground diff --git a/x-pack/test/functional_search/tests/solution_navigation.ts b/x-pack/test/functional_search/tests/solution_navigation.ts index b64367b11675c..89cee21a81d66 100644 --- a/x-pack/test/functional_search/tests/solution_navigation.ts +++ b/x-pack/test/functional_search/tests/solution_navigation.ts @@ -54,7 +54,7 @@ export default function searchSolutionNavigation({ await solutionNavigation.sidenav.expectLinkExists({ text: 'Dashboards' }); await solutionNavigation.sidenav.expectLinkExists({ text: 'Indices' }); await solutionNavigation.sidenav.expectLinkExists({ text: 'Connectors' }); - await solutionNavigation.sidenav.expectLinkExists({ text: 'Web crawlers' }); + await solutionNavigation.sidenav.expectLinkExists({ text: 'Web Crawlers' }); await solutionNavigation.sidenav.expectLinkExists({ text: 'Playground' }); await solutionNavigation.sidenav.expectLinkExists({ text: 'Search applications' }); await solutionNavigation.sidenav.expectLinkExists({ text: 'Behavioral Analytics' }); @@ -147,7 +147,7 @@ export default function searchSolutionNavigation({ deepLinkId: 'enterpriseSearchContent:webCrawlers', }); await solutionNavigation.breadcrumbs.expectBreadcrumbExists({ text: 'Content' }); - await solutionNavigation.breadcrumbs.expectBreadcrumbExists({ text: 'Web crawlers' }); + await solutionNavigation.breadcrumbs.expectBreadcrumbExists({ text: 'Web Crawlers' }); await solutionNavigation.breadcrumbs.expectBreadcrumbExists({ deepLinkId: 'enterpriseSearchContent:webCrawlers', }); diff --git a/x-pack/test/functional_with_es_ssl/apps/cases/common/roles.ts b/x-pack/test/functional_with_es_ssl/apps/cases/common/roles.ts index 0e8cb455ad299..f10fc0394569f 100644 --- a/x-pack/test/functional_with_es_ssl/apps/cases/common/roles.ts +++ b/x-pack/test/functional_with_es_ssl/apps/cases/common/roles.ts @@ -59,6 +59,30 @@ export const casesNoDelete: Role = { }, }; +export const casesReadAndEditSettings: Role = { + name: 'cases_read_and_edit_settings', + privileges: { + elasticsearch: { + indices: [ + { + names: ['*'], + privileges: ['all'], + }, + ], + }, + kibana: [ + { + feature: { + generalCasesV2: ['minimal_read', 'cases_settings'], + actions: ['all'], + actionsSimulators: ['all'], + }, + spaces: ['*'], + }, + ], + }, +}; + export const casesAll: Role = { name: 'cases_all_role', privileges: { @@ -83,4 +107,4 @@ export const casesAll: Role = { }, }; -export const roles = [casesReadDelete, casesNoDelete, casesAll]; +export const roles = [casesReadDelete, casesNoDelete, casesAll, casesReadAndEditSettings]; diff --git a/x-pack/test/functional_with_es_ssl/apps/cases/common/users.ts b/x-pack/test/functional_with_es_ssl/apps/cases/common/users.ts index 8d213e5b78075..8964f414662fc 100644 --- a/x-pack/test/functional_with_es_ssl/apps/cases/common/users.ts +++ b/x-pack/test/functional_with_es_ssl/apps/cases/common/users.ts @@ -6,7 +6,7 @@ */ import { User } from '../../../../cases_api_integration/common/lib/authentication/types'; -import { casesAll, casesNoDelete, casesReadDelete } from './roles'; +import { casesAll, casesNoDelete, casesReadDelete, casesReadAndEditSettings } from './roles'; /** * Users for Cases in the Stack @@ -18,12 +18,6 @@ export const casesReadDeleteUser: User = { roles: [casesReadDelete.name], }; -export const casesNoDeleteUser: User = { - username: 'cases_no_delete_user', - password: 'password', - roles: [casesNoDelete.name], -}; - export const casesAllUser: User = { username: 'cases_all_user', password: 'password', @@ -36,4 +30,22 @@ export const casesAllUser2: User = { roles: [casesAll.name], }; -export const users = [casesReadDeleteUser, casesNoDeleteUser, casesAllUser, casesAllUser2]; +export const casesReadAndEditSettingsUser: User = { + username: 'cases_read_and_edit_settings_user', + password: 'password', + roles: [casesReadAndEditSettings.name], +}; + +export const casesNoDeleteUser: User = { + username: 'cases_no_delete_user', + password: 'password', + roles: [casesNoDelete.name], +}; + +export const users = [ + casesReadDeleteUser, + casesNoDeleteUser, + casesAllUser, + casesAllUser2, + casesReadAndEditSettingsUser, +]; diff --git a/x-pack/test/functional_with_es_ssl/apps/cases/group1/index.ts b/x-pack/test/functional_with_es_ssl/apps/cases/group1/index.ts index 330bd820aea85..c7a1405c562b4 100644 --- a/x-pack/test/functional_with_es_ssl/apps/cases/group1/index.ts +++ b/x-pack/test/functional_with_es_ssl/apps/cases/group1/index.ts @@ -11,6 +11,6 @@ export default ({ loadTestFile }: FtrProviderContext) => { describe('Cases - group 1', function () { loadTestFile(require.resolve('./create_case_form')); loadTestFile(require.resolve('./view_case')); - loadTestFile(require.resolve('./deletion')); + loadTestFile(require.resolve('./sub_privileges')); }); }; diff --git a/x-pack/test/functional_with_es_ssl/apps/cases/group1/deletion.ts b/x-pack/test/functional_with_es_ssl/apps/cases/group1/sub_privileges.ts similarity index 69% rename from x-pack/test/functional_with_es_ssl/apps/cases/group1/deletion.ts rename to x-pack/test/functional_with_es_ssl/apps/cases/group1/sub_privileges.ts index f23d0d01867cf..aecdb1623ff3d 100644 --- a/x-pack/test/functional_with_es_ssl/apps/cases/group1/deletion.ts +++ b/x-pack/test/functional_with_es_ssl/apps/cases/group1/sub_privileges.ts @@ -5,8 +5,16 @@ * 2.0. */ +import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; -import { users, roles, casesReadDeleteUser, casesAllUser, casesNoDeleteUser } from '../common'; +import { + users, + roles, + casesReadDeleteUser, + casesAllUser, + casesNoDeleteUser, + casesReadAndEditSettingsUser, +} from '../common'; import { createUsersAndRoles, deleteUsersAndRoles, @@ -16,8 +24,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const PageObjects = getPageObjects(['security', 'header']); const testSubjects = getService('testSubjects'); const cases = getService('cases'); + const toasts = getService('toasts'); - describe('cases deletion sub privilege', () => { + describe('cases sub privilege', () => { before(async () => { await createUsersAndRoles(getService, users, roles); await PageObjects.security.forceLogout(); @@ -29,7 +38,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await PageObjects.security.forceLogout(); }); - describe('create two cases', () => { + describe('cases_delete', () => { beforeEach(async () => { await cases.api.createNthRandomCases(2); }); @@ -119,6 +128,56 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }); } }); + + describe('cases_settings', () => { + afterEach(async () => { + await cases.api.deleteAllCases(); + }); + + for (const user of [casesReadAndEditSettingsUser, casesAllUser]) { + describe(`logging in with user ${user.username}`, () => { + before(async () => { + await PageObjects.security.login(user.username, user.password); + }); + + after(async () => { + await PageObjects.security.forceLogout(); + }); + + it(`User ${user.username} can navigate to settings`, async () => { + await cases.navigation.navigateToConfigurationPage(); + }); + + it(`User ${user.username} can update settings`, async () => { + await cases.common.selectRadioGroupValue( + 'closure-options-radio-group', + 'close-by-pushing' + ); + const toast = await toasts.getElementByIndex(1); + expect(await toast.getVisibleText()).to.be('Settings successfully updated'); + await toasts.dismissAll(); + }); + }); + } + + // below users do not have access to settings + for (const user of [casesNoDeleteUser, casesReadDeleteUser]) { + describe(`cannot access settings page with user ${user.username}`, () => { + before(async () => { + await PageObjects.security.login(user.username, user.password); + }); + + after(async () => { + await PageObjects.security.forceLogout(); + }); + + it(`User ${user.username} cannot navigate to settings`, async () => { + await cases.navigation.navigateToApp(); + await testSubjects.missingOrFail('configure-case-button'); + }); + }); + } + }); }); }; diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alert_create_flyout.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alert_create_flyout.ts index 07e6aa841f8e2..1c563ed9382f6 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alert_create_flyout.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alert_create_flyout.ts @@ -120,7 +120,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { } // Failing: See https://github.com/elastic/kibana/issues/196153 - describe('create alert', function () { + // Failing: See https://github.com/elastic/kibana/issues/196153 + // Failing: See https://github.com/elastic/kibana/issues/202328 + describe.skip('create alert', function () { let apmSynthtraceEsClient: ApmSynthtraceEsClient; const webhookConnectorName = 'webhook-test'; before(async () => { diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/home_page.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/home_page.ts index c03d6dcf74a88..bffe63a97634f 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/home_page.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/home_page.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../ftr_provider_context'; import { ObjectRemover } from '../../lib/object_remover'; -import { getTestAlertData, getTestConnectorData } from '../../lib/get_test_data'; +import { getTestAlertData } from '../../lib/get_test_data'; export default ({ getPageObjects, getService }: FtrProviderContext) => { const testSubjects = getService('testSubjects'); @@ -24,6 +24,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { before(async () => { await security.testUser.setRoles(['alerts_and_actions_role']); }); + after(async () => { await security.testUser.restoreDefaults(); }); @@ -41,6 +42,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { before(async () => { await security.testUser.setRoles(['only_actions_role']); }); + after(async () => { await security.testUser.restoreDefaults(); }); @@ -57,19 +59,35 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await pageObjects.common.navigateToApp('triggersActions'); }); - after(async () => { - await objectRemover.removeAll(); - }); - it('Loads the Alerts page', async () => { - await log.debug('Checking for section heading to say Rules.'); + log.debug('Checking for section heading to say Rules.'); const headingText = await pageObjects.triggersActionsUI.getSectionHeadingText(); expect(headingText).to.be('Rules'); }); describe('Alerts tab', () => { + let createdRule: { name: string; id: string }; + + before(async () => { + const resRule = await supertest + .post(`/api/alerting/rule`) + .set('kbn-xsrf', 'foo') + .send(getTestAlertData()) + .expect(200); + + createdRule = resRule.body; + objectRemover.add(createdRule.id, 'rule', 'alerting'); + }); + + after(async () => { + await objectRemover.removeAll(); + }); + it('renders the alerts tab', async () => { + // refresh to see alert + await browser.refresh(); + // Navigate to the alerts tab await pageObjects.triggersActionsUI.changeTabs('rulesTab'); @@ -84,20 +102,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }); it('navigates to an alert details page', async () => { - const { body: createdConnector } = await supertest - .post(`/api/actions/connector`) - .set('kbn-xsrf', 'foo') - .send(getTestConnectorData()) - .expect(200); - objectRemover.add(createdConnector.id, 'connector', 'actions'); - - const { body: createdAlert } = await supertest - .post(`/api/alerting/rule`) - .set('kbn-xsrf', 'foo') - .send(getTestAlertData()) - .expect(200); - objectRemover.add(createdAlert.id, 'alert', 'alerts'); - // refresh to see alert await browser.refresh(); @@ -107,10 +111,10 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await testSubjects.existOrFail('rulesList'); // click on first alert - await pageObjects.triggersActionsUI.clickOnAlertInAlertsList(createdAlert.name); + await pageObjects.triggersActionsUI.clickOnAlertInAlertsList(createdRule.name); // Verify url - expect(await browser.getCurrentUrl()).to.contain(`/rule/${createdAlert.id}`); + expect(await browser.getCurrentUrl()).to.contain(`/rule/${createdRule.id}`); }); }); }); diff --git a/x-pack/test/functional_with_es_ssl/plugins/alerts/server/plugin.ts b/x-pack/test/functional_with_es_ssl/plugins/alerts/server/plugin.ts index 972b9cf2b3af6..b4a2ee84566cc 100644 --- a/x-pack/test/functional_with_es_ssl/plugins/alerts/server/plugin.ts +++ b/x-pack/test/functional_with_es_ssl/plugins/alerts/server/plugin.ts @@ -6,17 +6,14 @@ */ import { Plugin, CoreSetup } from '@kbn/core/server'; -import { - PluginSetupContract as AlertingSetup, - RuleType, - RuleTypeParams, -} from '@kbn/alerting-plugin/server'; +import { AlertingServerSetup, RuleType, RuleTypeParams } from '@kbn/alerting-plugin/server'; import { FeaturesPluginSetup } from '@kbn/features-plugin/server'; +import { ALERTING_FEATURE_ID } from '@kbn/alerting-plugin/common'; import { KibanaFeatureScope } from '@kbn/features-plugin/common'; // this plugin's dependendencies export interface AlertingExampleDeps { - alerting: AlertingSetup; + alerting: AlertingServerSetup; features: FeaturesPluginSetup; } @@ -117,13 +114,27 @@ export class AlertingFixturePlugin implements Plugin>['services']; +export class ForbiddenApiError extends Error { + status: number; + + constructor(message: string = 'Forbidden') { + super(message); + this.name = 'ForbiddenApiError'; + this.status = 403; + } +} + export function createObservabilityAIAssistantAPIConfig({ config, license, @@ -67,6 +77,7 @@ export function createObservabilityAIAssistantAPIConfig({ viewer: getScopedApiClientForUsername(viewer.username), editor: getScopedApiClientForUsername(editor.username), secondaryEditor: getScopedApiClientForUsername(secondaryEditor.username), + unauthorizedUser: getScopedApiClientForUsername(unauthorizedUser.username), }; }, }, diff --git a/x-pack/test/observability_ai_assistant_api_integration/common/users/users.ts b/x-pack/test/observability_ai_assistant_api_integration/common/users/users.ts index 898954a9bfb97..2dc5a433517f3 100644 --- a/x-pack/test/observability_ai_assistant_api_integration/common/users/users.ts +++ b/x-pack/test/observability_ai_assistant_api_integration/common/users/users.ts @@ -6,10 +6,14 @@ */ import { kbnTestConfig } from '@kbn/test'; + const password = kbnTestConfig.getUrlParts().password!; +export const UNAUTHORIZED_USERNAME = 'unauthorized_user'; +export const UNAUTHORIZED_USER_PASSWORD = 'unauthorized_password'; + export interface User { - username: 'elastic' | 'editor' | 'viewer' | 'secondary_editor'; + username: 'elastic' | 'editor' | 'viewer' | 'secondary_editor' | 'unauthorized_user'; password: string; roles: string[]; } @@ -32,4 +36,10 @@ export const viewer: User = { roles: ['viewer'], }; -export const allUsers = [editor, secondaryEditor, viewer]; +export const unauthorizedUser: User = { + username: UNAUTHORIZED_USERNAME, + password: UNAUTHORIZED_USER_PASSWORD, + roles: [], +}; + +export const allUsers = [editor, secondaryEditor, viewer, unauthorizedUser]; 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 d514d6ddb7025..cedd4c286dc1a 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 @@ -11,10 +11,12 @@ import { PassThrough } from 'stream'; import { createLlmProxy, LlmProxy } from '../../common/create_llm_proxy'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createProxyActionConnector, deleteActionConnector } from '../../common/action_connectors'; +import { ForbiddenApiError } from '../../common/config'; export default function ApiTest({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const log = getService('log'); + const observabilityAIAssistantAPIClient = getService('observabilityAIAssistantAPIClient'); const CHAT_API_URL = `/internal/observability_ai_assistant/chat`; @@ -183,5 +185,27 @@ export default function ApiTest({ getService }: FtrProviderContext) { `Token limit reached. Token limit is 8192, but the current conversation has 11036 tokens.` ); }); + + describe('security roles and access privileges', () => { + it('should deny access for users without the ai_assistant privilege', async () => { + try { + await observabilityAIAssistantAPIClient.unauthorizedUser({ + endpoint: `POST ${CHAT_API_URL}`, + params: { + body: { + name: 'my_api_call', + messages, + connectorId, + functions: [], + scopes: ['all'], + }, + }, + }); + throw new ForbiddenApiError('Expected unauthorizedUser() to throw a 403 Forbidden error'); + } catch (e) { + expect(e.status).to.be(403); + } + }); + }); }); } 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 2eb7c6f986cfd..86e357e2e7760 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 @@ -32,6 +32,7 @@ import { getConversationUpdatedEvent, } from '../conversations/helpers'; import { createProxyActionConnector, deleteActionConnector } from '../../common/action_connectors'; +import { ForbiddenApiError } from '../../common/config'; export default function ApiTest({ getService }: FtrProviderContext) { const supertest = getService('supertest'); @@ -39,7 +40,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { const observabilityAIAssistantAPIClient = getService('observabilityAIAssistantAPIClient'); - const COMPLETE_API_URL = `/internal/observability_ai_assistant/chat/complete`; + const COMPLETE_API_URL = '/internal/observability_ai_assistant/chat/complete'; const messages: Message[] = [ { @@ -486,5 +487,27 @@ export default function ApiTest({ getService }: FtrProviderContext) { // todo it.skip('executes a function', async () => {}); + + describe('security roles and access privileges', () => { + it('should deny access for users without the ai_assistant privilege', async () => { + try { + await observabilityAIAssistantAPIClient.unauthorizedUser({ + endpoint: 'POST /internal/observability_ai_assistant/chat/complete', + params: { + body: { + messages, + connectorId, + persist: false, + screenContexts: [], + scopes: ['all'], + }, + }, + }); + throw new ForbiddenApiError('Expected unauthorizedUser() to throw a 403 Forbidden error'); + } catch (e) { + expect(e.status).to.be(403); + } + }); + }); }); } 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 41700b21555fa..42e1f8751719e 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 @@ -9,12 +9,15 @@ import expect from '@kbn/expect'; import type { Agent as SuperTestAgent } from 'supertest'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { createProxyActionConnector, deleteActionConnector } from '../../common/action_connectors'; +import { ForbiddenApiError } from '../../common/config'; export default function ApiTest({ getService }: FtrProviderContext) { const observabilityAIAssistantAPIClient = getService('observabilityAIAssistantAPIClient'); const supertest = getService('supertest'); const log = getService('log'); + const CONNECTOR_API_URL = '/internal/observability_ai_assistant/connectors'; + describe('List connectors', () => { before(async () => { await deleteAllActionConnectors(supertest); @@ -27,14 +30,14 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('Returns a 2xx for enterprise license', async () => { await observabilityAIAssistantAPIClient .editor({ - endpoint: 'GET /internal/observability_ai_assistant/connectors', + endpoint: `GET ${CONNECTOR_API_URL}`, }) .expect(200); }); it('returns an empty list of connectors', async () => { const res = await observabilityAIAssistantAPIClient.editor({ - endpoint: 'GET /internal/observability_ai_assistant/connectors', + endpoint: `GET ${CONNECTOR_API_URL}`, }); expect(res.body.length).to.be(0); @@ -44,13 +47,26 @@ export default function ApiTest({ getService }: FtrProviderContext) { const connectorId = await createProxyActionConnector({ supertest, log, port: 1234 }); const res = await observabilityAIAssistantAPIClient.editor({ - endpoint: 'GET /internal/observability_ai_assistant/connectors', + endpoint: `GET ${CONNECTOR_API_URL}`, }); expect(res.body.length).to.be(1); await deleteActionConnector({ supertest, connectorId, log }); }); + + describe('security roles and access privileges', () => { + it('should deny access for users without the ai_assistant privilege', async () => { + try { + await observabilityAIAssistantAPIClient.unauthorizedUser({ + endpoint: `GET ${CONNECTOR_API_URL}`, + }); + throw new ForbiddenApiError('Expected unauthorizedUser() to throw a 403 Forbidden error'); + } catch (e) { + expect(e.status).to.be(403); + } + }); + }); }); } diff --git a/x-pack/test/observability_ai_assistant_api_integration/tests/conversations/conversations.spec.ts b/x-pack/test/observability_ai_assistant_api_integration/tests/conversations/conversations.spec.ts index 71eb37d357696..bb85e99b99500 100644 --- a/x-pack/test/observability_ai_assistant_api_integration/tests/conversations/conversations.spec.ts +++ b/x-pack/test/observability_ai_assistant_api_integration/tests/conversations/conversations.spec.ts @@ -14,6 +14,7 @@ import { } from '@kbn/observability-ai-assistant-plugin/common/types'; import type { FtrProviderContext } from '../../common/ftr_provider_context'; import type { SupertestReturnType } from '../../common/observability_ai_assistant_api_client'; +import { ForbiddenApiError } from '../../common/config'; export default function ApiTest({ getService }: FtrProviderContext) { const observabilityAIAssistantAPIClient = getService('observabilityAIAssistantAPIClient'); @@ -250,5 +251,128 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); }); }); + + describe('security roles and access privileges', () => { + describe('should deny access for users without the ai_assistant privilege', () => { + let createResponse: Awaited< + SupertestReturnType<'POST /internal/observability_ai_assistant/conversation'> + >; + before(async () => { + createResponse = await observabilityAIAssistantAPIClient + .editor({ + endpoint: 'POST /internal/observability_ai_assistant/conversation', + params: { + body: { + conversation: conversationCreate, + }, + }, + }) + .expect(200); + }); + + after(async () => { + await observabilityAIAssistantAPIClient + .editor({ + endpoint: 'DELETE /internal/observability_ai_assistant/conversation/{conversationId}', + params: { + path: { + conversationId: createResponse.body.conversation.id, + }, + }, + }) + .expect(200); + }); + + it('POST /internal/observability_ai_assistant/conversation', async () => { + try { + await observabilityAIAssistantAPIClient.unauthorizedUser({ + endpoint: 'POST /internal/observability_ai_assistant/conversation', + params: { + body: { + conversation: conversationCreate, + }, + }, + }); + throw new ForbiddenApiError( + 'Expected unauthorizedUser() to throw a 403 Forbidden error' + ); + } catch (e) { + expect(e.status).to.be(403); + } + }); + + it('POST /internal/observability_ai_assistant/conversations', async () => { + try { + await observabilityAIAssistantAPIClient.unauthorizedUser({ + endpoint: 'POST /internal/observability_ai_assistant/conversations', + }); + throw new ForbiddenApiError( + 'Expected unauthorizedUser() to throw a 403 Forbidden error' + ); + } catch (e) { + expect(e.status).to.be(403); + } + }); + + it('PUT /internal/observability_ai_assistant/conversation/{conversationId}', async () => { + try { + await observabilityAIAssistantAPIClient.unauthorizedUser({ + endpoint: 'PUT /internal/observability_ai_assistant/conversation/{conversationId}', + params: { + path: { + conversationId: createResponse.body.conversation.id, + }, + body: { + conversation: merge(omit(conversationUpdate, 'conversation.id'), { + conversation: { id: createResponse.body.conversation.id }, + }), + }, + }, + }); + throw new ForbiddenApiError( + 'Expected unauthorizedUser() to throw a 403 Forbidden error' + ); + } catch (e) { + expect(e.status).to.be(403); + } + }); + + it('GET /internal/observability_ai_assistant/conversation/{conversationId}', async () => { + try { + await observabilityAIAssistantAPIClient.unauthorizedUser({ + endpoint: 'GET /internal/observability_ai_assistant/conversation/{conversationId}', + params: { + path: { + conversationId: createResponse.body.conversation.id, + }, + }, + }); + throw new ForbiddenApiError( + 'Expected unauthorizedUser() to throw a 403 Forbidden error' + ); + } catch (e) { + expect(e.status).to.be(403); + } + }); + + it('DELETE /internal/observability_ai_assistant/conversation/{conversationId}', async () => { + try { + await observabilityAIAssistantAPIClient.unauthorizedUser({ + endpoint: 'DELETE /internal/observability_ai_assistant/conversation/{conversationId}', + params: { + path: { + conversationId: createResponse.body.conversation.id, + }, + }, + }); + throw new ForbiddenApiError( + 'Expected unauthorizedUser() to throw a 403 Forbidden error' + ); + } catch (e) { + expect(e.status).to.be(403); + } + }); + }); + }); }); } diff --git a/x-pack/test/observability_ai_assistant_api_integration/tests/knowledge_base/knowledge_base.spec.ts b/x-pack/test/observability_ai_assistant_api_integration/tests/knowledge_base/knowledge_base.spec.ts index 8d8c2e2417686..9d80db3baeae6 100644 --- a/x-pack/test/observability_ai_assistant_api_integration/tests/knowledge_base/knowledge_base.spec.ts +++ b/x-pack/test/observability_ai_assistant_api_integration/tests/knowledge_base/knowledge_base.spec.ts @@ -15,6 +15,7 @@ import { deleteInferenceEndpoint, deleteKnowledgeBaseModel, } from './helpers'; +import { ForbiddenApiError } from '../../common/config'; export default function ApiTest({ getService }: FtrProviderContext) { const ml = getService('ml'); @@ -210,6 +211,62 @@ export default function ApiTest({ getService }: FtrProviderContext) { expect(entries[0].title).to.eql('My title b'); }); }); + + describe('security roles and access privileges', () => { + describe('should deny access for users without the ai_assistant privilege', () => { + it('POST /internal/observability_ai_assistant/kb/entries/save', async () => { + try { + await observabilityAIAssistantAPIClient.unauthorizedUser({ + endpoint: 'POST /internal/observability_ai_assistant/kb/entries/save', + params: { + body: { + id: 'my-doc-id-1', + title: 'My title', + text: 'My content', + }, + }, + }); + throw new ForbiddenApiError( + 'Expected unauthorizedUser() to throw a 403 Forbidden error' + ); + } catch (e) { + expect(e.status).to.be(403); + } + }); + + it('GET /internal/observability_ai_assistant/kb/entries', async () => { + try { + await observabilityAIAssistantAPIClient.unauthorizedUser({ + endpoint: 'GET /internal/observability_ai_assistant/kb/entries', + params: { + query: { query: '', sortBy: 'title', sortDirection: 'asc' }, + }, + }); + throw new ForbiddenApiError( + 'Expected unauthorizedUser() to throw a 403 Forbidden error' + ); + } catch (e) { + expect(e.status).to.be(403); + } + }); + + it('DELETE /internal/observability_ai_assistant/kb/entries/{entryId}', async () => { + try { + await observabilityAIAssistantAPIClient.unauthorizedUser({ + endpoint: 'DELETE /internal/observability_ai_assistant/kb/entries/{entryId}', + params: { + path: { entryId: 'my-doc-id-1' }, + }, + }); + throw new ForbiddenApiError( + 'Expected unauthorizedUser() to throw a 403 Forbidden error' + ); + } catch (e) { + expect(e.status).to.be(403); + } + }); + }); + }); }); } diff --git a/x-pack/test/observability_ai_assistant_api_integration/tests/knowledge_base/knowledge_base_setup.spec.ts b/x-pack/test/observability_ai_assistant_api_integration/tests/knowledge_base/knowledge_base_setup.spec.ts index 7903f4b53966a..0d7625bb63ed3 100644 --- a/x-pack/test/observability_ai_assistant_api_integration/tests/knowledge_base/knowledge_base_setup.spec.ts +++ b/x-pack/test/observability_ai_assistant_api_integration/tests/knowledge_base/knowledge_base_setup.spec.ts @@ -13,18 +13,21 @@ import { TINY_ELSER, deleteInferenceEndpoint, } from './helpers'; +import { ForbiddenApiError } from '../../common/config'; export default function ApiTest({ getService }: FtrProviderContext) { const ml = getService('ml'); const es = getService('es'); const observabilityAIAssistantAPIClient = getService('observabilityAIAssistantAPIClient'); + const KNOWLEDGE_BASE_SETUP_API_URL = '/internal/observability_ai_assistant/kb/setup'; + describe('/internal/observability_ai_assistant/kb/setup', () => { it('returns model info when successful', async () => { await createKnowledgeBaseModel(ml); const res = await observabilityAIAssistantAPIClient .admin({ - endpoint: 'POST /internal/observability_ai_assistant/kb/setup', + endpoint: `POST ${KNOWLEDGE_BASE_SETUP_API_URL}`, params: { query: { model_id: TINY_ELSER.id, @@ -43,7 +46,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('returns error message if model is not deployed', async () => { const res = await observabilityAIAssistantAPIClient .admin({ - endpoint: 'POST /internal/observability_ai_assistant/kb/setup', + endpoint: `POST ${KNOWLEDGE_BASE_SETUP_API_URL}`, params: { query: { model_id: TINY_ELSER.id, @@ -60,5 +63,23 @@ export default function ApiTest({ getService }: FtrProviderContext) { // @ts-expect-error expect(res.body.statusCode).to.be(500); }); + + describe('security roles and access privileges', () => { + it('should deny access for users without the ai_assistant privilege', async () => { + try { + await observabilityAIAssistantAPIClient.unauthorizedUser({ + endpoint: `POST ${KNOWLEDGE_BASE_SETUP_API_URL}`, + params: { + query: { + model_id: TINY_ELSER.id, + }, + }, + }); + throw new ForbiddenApiError('Expected unauthorizedUser() to throw a 403 Forbidden error'); + } catch (e) { + expect(e.status).to.be(403); + } + }); + }); }); } diff --git a/x-pack/test/observability_ai_assistant_api_integration/tests/knowledge_base/knowledge_base_status.spec.ts b/x-pack/test/observability_ai_assistant_api_integration/tests/knowledge_base/knowledge_base_status.spec.ts index 8c10a6128d302..3f66931ca0719 100644 --- a/x-pack/test/observability_ai_assistant_api_integration/tests/knowledge_base/knowledge_base_status.spec.ts +++ b/x-pack/test/observability_ai_assistant_api_integration/tests/knowledge_base/knowledge_base_status.spec.ts @@ -13,12 +13,15 @@ import { TINY_ELSER, deleteInferenceEndpoint, } from './helpers'; +import { ForbiddenApiError } from '../../common/config'; export default function ApiTest({ getService }: FtrProviderContext) { const ml = getService('ml'); const es = getService('es'); const observabilityAIAssistantAPIClient = getService('observabilityAIAssistantAPIClient'); + const KNOWLEDGE_BASE_STATUS_API_URL = '/internal/observability_ai_assistant/kb/status'; + describe('/internal/observability_ai_assistant/kb/status', () => { beforeEach(async () => { await createKnowledgeBaseModel(ml); @@ -41,7 +44,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { it('returns correct status after knowledge base is setup', async () => { const res = await observabilityAIAssistantAPIClient - .editor({ endpoint: 'GET /internal/observability_ai_assistant/kb/status' }) + .editor({ endpoint: `GET ${KNOWLEDGE_BASE_STATUS_API_URL}` }) .expect(200); expect(res.body.ready).to.be(true); @@ -54,7 +57,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { const res = await observabilityAIAssistantAPIClient .editor({ - endpoint: 'GET /internal/observability_ai_assistant/kb/status', + endpoint: `GET ${KNOWLEDGE_BASE_STATUS_API_URL}`, }) .expect(200); @@ -70,7 +73,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { const res = await observabilityAIAssistantAPIClient .editor({ - endpoint: 'GET /internal/observability_ai_assistant/kb/status', + endpoint: `GET ${KNOWLEDGE_BASE_STATUS_API_URL}`, }) .expect(200); @@ -80,5 +83,18 @@ export default function ApiTest({ getService }: FtrProviderContext) { 'Inference endpoint not found [obs_ai_assistant_kb_inference]' ); }); + + describe('security roles and access privileges', () => { + it('should deny access for users without the ai_assistant privilege', async () => { + try { + await observabilityAIAssistantAPIClient.unauthorizedUser({ + endpoint: `GET ${KNOWLEDGE_BASE_STATUS_API_URL}`, + }); + throw new ForbiddenApiError('Expected unauthorizedUser() to throw a 403 Forbidden error'); + } catch (e) { + expect(e.status).to.be(403); + } + }); + }); }); } diff --git a/x-pack/test/observability_ai_assistant_api_integration/tests/knowledge_base/knowledge_base_user_instructions.spec.ts b/x-pack/test/observability_ai_assistant_api_integration/tests/knowledge_base/knowledge_base_user_instructions.spec.ts index 6ea2b279fd386..d5022a052d781 100644 --- a/x-pack/test/observability_ai_assistant_api_integration/tests/knowledge_base/knowledge_base_user_instructions.spec.ts +++ b/x-pack/test/observability_ai_assistant_api_integration/tests/knowledge_base/knowledge_base_user_instructions.spec.ts @@ -23,6 +23,7 @@ import { getConversationCreatedEvent } from '../conversations/helpers'; import { LlmProxy, createLlmProxy } from '../../common/create_llm_proxy'; import { createProxyActionConnector, deleteActionConnector } from '../../common/action_connectors'; import { User } from '../../common/users/users'; +import { ForbiddenApiError } from '../../common/config'; export default function ApiTest({ getService }: FtrProviderContext) { const observabilityAIAssistantAPIClient = getService('observabilityAIAssistantAPIClient'); @@ -331,5 +332,73 @@ export default function ApiTest({ getService }: FtrProviderContext) { expect(conversation.messages.length).to.be(5); }); }); + + describe('Instructions can be saved and cleared again', () => { + async function updateInstruction(text: string) { + await observabilityAIAssistantAPIClient + .editor({ + endpoint: 'PUT /internal/observability_ai_assistant/kb/user_instructions', + params: { + body: { + id: 'my-instruction-that-will-be-cleared', + text, + public: false, + }, + }, + }) + .expect(200); + + const res = await observabilityAIAssistantAPIClient + .editor({ endpoint: 'GET /internal/observability_ai_assistant/kb/user_instructions' }) + .expect(200); + + return res.body.userInstructions[0].text; + } + + it('can clear the instruction', async () => { + const res1 = await updateInstruction('This is a user instruction that will be cleared'); + expect(res1).to.be('This is a user instruction that will be cleared'); + + const res2 = await updateInstruction(''); + expect(res2).to.be(''); + }); + }); + + describe('security roles and access privileges', () => { + describe('should deny access for users without the ai_assistant privilege', () => { + it('PUT /internal/observability_ai_assistant/kb/user_instructions', async () => { + try { + await observabilityAIAssistantAPIClient.unauthorizedUser({ + endpoint: 'PUT /internal/observability_ai_assistant/kb/user_instructions', + params: { + body: { + id: 'test-instruction', + text: 'Test user instruction', + public: true, + }, + }, + }); + throw new ForbiddenApiError( + 'Expected unauthorizedUser() to throw a 403 Forbidden error' + ); + } catch (e) { + expect(e.status).to.be(403); + } + }); + + it('GET /internal/observability_ai_assistant/kb/user_instructions', async () => { + try { + await observabilityAIAssistantAPIClient.unauthorizedUser({ + endpoint: 'GET /internal/observability_ai_assistant/kb/user_instructions', + }); + throw new ForbiddenApiError( + 'Expected unauthorizedUser() to throw a 403 Forbidden error' + ); + } catch (e) { + expect(e.status).to.be(403); + } + }); + }); + }); }); } diff --git a/x-pack/test/observability_functional/apps/observability/pages/alerts/index.ts b/x-pack/test/observability_functional/apps/observability/pages/alerts/index.ts index afee499a5b484..c76a84f2dced5 100644 --- a/x-pack/test/observability_functional/apps/observability/pages/alerts/index.ts +++ b/x-pack/test/observability_functional/apps/observability/pages/alerts/index.ts @@ -75,6 +75,7 @@ export default ({ getService }: FtrProviderContext) => { it('Autocompletion works', async () => { await observability.alerts.common.typeInQueryBar('kibana.alert.s'); + await observability.alerts.common.clickOnQueryBar(); await testSubjects.existOrFail('autocompleteSuggestion-field-kibana.alert.start-'); await testSubjects.existOrFail('autocompleteSuggestion-field-kibana.alert.status-'); }); diff --git a/x-pack/test/observability_functional/apps/observability/pages/rules_page.ts b/x-pack/test/observability_functional/apps/observability/pages/rules_page.ts index 4ec0f412e1f03..f084c4ec2a0aa 100644 --- a/x-pack/test/observability_functional/apps/observability/pages/rules_page.ts +++ b/x-pack/test/observability_functional/apps/observability/pages/rules_page.ts @@ -36,6 +36,7 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { search_fields: ['name'], }) .expect(200); + return rules.find((rule: any) => rule.name === name); } diff --git a/x-pack/test/plugin_api_integration/test_suites/task_manager/task_management_removed_types.ts b/x-pack/test/plugin_api_integration/test_suites/task_manager/task_management_removed_types.ts index 60d858206d68e..a7447353e805a 100644 --- a/x-pack/test/plugin_api_integration/test_suites/task_manager/task_management_removed_types.ts +++ b/x-pack/test/plugin_api_integration/test_suites/task_manager/task_management_removed_types.ts @@ -47,8 +47,7 @@ export default function ({ getService }: FtrProviderContext) { const UNREGISTERED_TASK_TYPE_ID = 'ce7e1250-3322-11eb-94c1-db6995e83f6b'; const REMOVED_TASK_TYPE_ID = 'be7e1250-3322-11eb-94c1-db6995e83f6a'; - // FLAKY: https://github.com/elastic/kibana/issues/200154 - describe.skip('not registered task types', () => { + describe('not registered task types', () => { before(async () => { await esArchiver.load('x-pack/test/functional/es_archives/task_manager_removed_types'); }); diff --git a/x-pack/test/reporting_api_integration/reporting_and_security.config.ts b/x-pack/test/reporting_api_integration/reporting_and_security.config.ts index 237bb94ed1dc6..3a7f31ae91033 100644 --- a/x-pack/test/reporting_api_integration/reporting_and_security.config.ts +++ b/x-pack/test/reporting_api_integration/reporting_and_security.config.ts @@ -36,7 +36,6 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { `--xpack.screenshotting.networkPolicy.rules=${JSON.stringify(testPolicyRules)}`, `--xpack.reporting.capture.maxAttempts=1`, `--xpack.reporting.csv.maxSizeBytes=6000`, - '--xpack.reporting.roles.enabled=false', // Reporting access control is implemented by sub-feature application privileges // for testing set buffer duration to 0 to immediately flush counters into saved objects. '--usageCollection.usageCounters.bufferDuration=0', ], diff --git a/x-pack/test/reporting_functional/reporting_and_deprecated_security.config.ts b/x-pack/test/reporting_functional/reporting_and_deprecated_security.config.ts deleted file mode 100644 index a65755e97b0c9..0000000000000 --- a/x-pack/test/reporting_functional/reporting_and_deprecated_security.config.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { FtrConfigProviderContext } from '@kbn/test'; -import { resolve } from 'path'; - -export default async function ({ readConfigFile }: FtrConfigProviderContext) { - const reportingConfig = await readConfigFile(require.resolve('./reporting_and_security.config')); - - return { - ...reportingConfig.getAll(), - junit: { reportName: 'X-Pack Reporting Functional Tests With Deprecated Roles config' }, - testFiles: [resolve(__dirname, './reporting_and_deprecated_security')], - kbnTestServer: { - ...reportingConfig.get('kbnTestServer'), - serverArgs: [ - ...reportingConfig.get('kbnTestServer.serverArgs'), - `--xpack.reporting.roles.enabled=true`, // DEPRECATED: support for `true` will be removed in 8.0 - ], - }, - }; -} diff --git a/x-pack/test/reporting_functional/reporting_and_deprecated_security/index.ts b/x-pack/test/reporting_functional/reporting_and_deprecated_security/index.ts deleted file mode 100644 index 722b6545115cd..0000000000000 --- a/x-pack/test/reporting_functional/reporting_and_deprecated_security/index.ts +++ /dev/null @@ -1,58 +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 { FtrProviderContext } from '../ftr_provider_context'; - -// eslint-disable-next-line import/no-default-export -export default function (context: FtrProviderContext) { - const security = context.getService('security'); - const createDataAnalystRole = async () => { - await security.role.create('data_analyst', { - metadata: {}, - elasticsearch: { - cluster: [], - indices: [ - { - names: ['ecommerce'], - privileges: ['read', 'view_index_metadata'], - allow_restricted_indices: false, - }, - ], - run_as: [], - }, - kibana: [{ base: ['all'], feature: {}, spaces: ['*'] }], - }); - }; - const createDataAnalyst = async () => { - await security.user.create('data_analyst', { - password: 'data_analyst-password', - roles: ['data_analyst', 'kibana_user'], - full_name: 'a kibana user called data_a', - }); - }; - const createReportingUser = async () => { - await security.user.create('reporting_user', { - password: 'reporting_user-password', - roles: ['reporting_user', 'data_analyst', 'kibana_user'], // Deprecated: using built-in `reporting_user` role grants all Reporting privileges - full_name: 'a reporting user', - }); - }; - - describe('Reporting Functional Tests with Deprecated Security configuration enabled', function () { - before(async () => { - const reportingAPI = context.getService('reportingAPI'); - await reportingAPI.logTaskManagerHealth(); - await createDataAnalystRole(); - await createDataAnalyst(); - await createReportingUser(); - }); - - const { loadTestFile } = context; - loadTestFile(require.resolve('./security_roles_privileges')); - loadTestFile(require.resolve('./management')); - }); -} diff --git a/x-pack/test/reporting_functional/reporting_and_deprecated_security/management.ts b/x-pack/test/reporting_functional/reporting_and_deprecated_security/management.ts deleted file mode 100644 index dba16c798d4ff..0000000000000 --- a/x-pack/test/reporting_functional/reporting_and_deprecated_security/management.ts +++ /dev/null @@ -1,37 +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 { FtrProviderContext } from '../ftr_provider_context'; - -// eslint-disable-next-line import/no-default-export -export default ({ getService, getPageObjects }: FtrProviderContext) => { - const PageObjects = getPageObjects(['common', 'reporting', 'discover']); - - const testSubjects = getService('testSubjects'); - const reportingFunctional = getService('reportingFunctional'); - - describe('Access to Management > Reporting', () => { - before(async () => { - await reportingFunctional.initEcommerce(); - }); - after(async () => { - await reportingFunctional.teardownEcommerce(); - }); - - it('does not allow user that does not have reporting_user role', async () => { - await reportingFunctional.loginDataAnalyst(); - await PageObjects.common.navigateToApp('reporting'); - await testSubjects.missingOrFail('reportJobListing'); - }); - - it('does allow user with reporting_user role', async () => { - await reportingFunctional.loginReportingUser(); - await PageObjects.common.navigateToApp('reporting'); - await testSubjects.existOrFail('reportJobListing'); - }); - }); -}; diff --git a/x-pack/test/reporting_functional/reporting_and_deprecated_security/security_roles_privileges.ts b/x-pack/test/reporting_functional/reporting_and_deprecated_security/security_roles_privileges.ts deleted file mode 100644 index f73ec8e39fb48..0000000000000 --- a/x-pack/test/reporting_functional/reporting_and_deprecated_security/security_roles_privileges.ts +++ /dev/null @@ -1,82 +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 { FtrProviderContext } from '../ftr_provider_context'; - -const DASHBOARD_TITLE = 'Ecom Dashboard'; -const SAVEDSEARCH_TITLE = 'Ecommerce Data'; -const VIS_TITLE = 'e-commerce pie chart'; - -// eslint-disable-next-line import/no-default-export -export default function ({ getService }: FtrProviderContext) { - const reportingFunctional = getService('reportingFunctional'); - - describe('Security with `reporting_user` built-in role', () => { - before(async () => { - await reportingFunctional.initEcommerce(); - }); - after(async () => { - await reportingFunctional.teardownEcommerce(); - }); - - describe('Dashboard: Download CSV file', () => { - it('does not allow user that does not have reporting_user role', async () => { - await reportingFunctional.loginDataAnalyst(); - await reportingFunctional.openSavedDashboard(DASHBOARD_TITLE); - await reportingFunctional.tryDashboardGenerateCsvFail('Ecommerce Data'); - }); - - it('does allow user with reporting_user role', async () => { - await reportingFunctional.loginReportingUser(); - await reportingFunctional.openSavedDashboard(DASHBOARD_TITLE); - await reportingFunctional.tryDashboardGenerateCsvSuccess('Ecommerce Data'); - }); - }); - - describe('Dashboard: Generate Screenshot', () => { - it('does not allow user that does not have reporting_user role', async () => { - await reportingFunctional.loginDataAnalyst(); - await reportingFunctional.openSavedDashboard(DASHBOARD_TITLE); - await reportingFunctional.tryGeneratePdfFail(); - }); - - it('does allow user with reporting_user role', async () => { - await reportingFunctional.loginReportingUser(); - await reportingFunctional.openSavedDashboard(DASHBOARD_TITLE); - await reportingFunctional.tryGeneratePdfSuccess(); - }); - }); - - describe('Discover: Generate CSV', () => { - it('does not allow user that does not have reporting_user role', async () => { - await reportingFunctional.loginDataAnalyst(); - await reportingFunctional.openSavedSearch(SAVEDSEARCH_TITLE); - await reportingFunctional.tryDiscoverCsvFail(); - }); - - it('does allow user with reporting_user role', async () => { - await reportingFunctional.loginReportingUser(); - await reportingFunctional.openSavedSearch(SAVEDSEARCH_TITLE); - await reportingFunctional.tryDiscoverCsvSuccess(); - }); - }); - - describe('Visualize Editor: Generate Screenshot', () => { - it('does not allow user that does not have reporting_user role', async () => { - await reportingFunctional.loginDataAnalyst(); - await reportingFunctional.openSavedVisualization(VIS_TITLE); - await reportingFunctional.tryGeneratePdfFail(); - }); - - it('does allow user with reporting_user role', async () => { - await reportingFunctional.loginReportingUser(); - await reportingFunctional.openSavedVisualization(VIS_TITLE); - await reportingFunctional.tryGeneratePdfSuccess(); - }); - }); - }); -} diff --git a/x-pack/test/reporting_functional/reporting_and_security.config.ts b/x-pack/test/reporting_functional/reporting_and_security.config.ts index 7d8c3ed696696..48096dbeb3226 100644 --- a/x-pack/test/reporting_functional/reporting_and_security.config.ts +++ b/x-pack/test/reporting_functional/reporting_and_security.config.ts @@ -25,7 +25,6 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { ...functionalConfig.get('kbnTestServer.serverArgs'), `--xpack.reporting.capture.maxAttempts=1`, `--xpack.reporting.csv.maxSizeBytes=6000`, - '--xpack.reporting.roles.enabled=false', // Reporting access control is implemented by sub-feature application privileges ], }, services: { diff --git a/x-pack/test/rule_registry/security_and_spaces/tests/basic/bulk_update_alerts.ts b/x-pack/test/rule_registry/security_and_spaces/tests/basic/bulk_update_alerts.ts index 68feb37137397..e54af674f6572 100644 --- a/x-pack/test/rule_registry/security_and_spaces/tests/basic/bulk_update_alerts.ts +++ b/x-pack/test/rule_registry/security_and_spaces/tests/basic/bulk_update_alerts.ts @@ -102,7 +102,6 @@ export default ({ getService }: FtrProviderContext) => { function addTests({ space, authorizedUsers, unauthorizedUsers, alertId, index }: TestCase) { authorizedUsers.forEach(({ username, password }) => { it(`${username} should bulk update alert with given id ${alertId} in ${space}/${index}`, async () => { - await esArchiver.load('x-pack/test/functional/es_archives/rule_registry/alerts'); // since this is a success case, reload the test data immediately beforehand const { body: updated } = await supertestWithoutAuth .post(`${getSpaceUrlPrefix(space)}${TEST_URL}/bulk_update`) .auth(username, password) @@ -119,7 +118,6 @@ export default ({ getService }: FtrProviderContext) => { }); it(`${username} should bulk update alerts which match KQL query string in ${space}/${index}`, async () => { - await esArchiver.load('x-pack/test/functional/es_archives/rule_registry/alerts'); // since this is a success case, reload the test data immediately beforehand const { body: updated } = await supertestWithoutAuth .post(`${getSpaceUrlPrefix(space)}${TEST_URL}/bulk_update`) .auth(username, password) @@ -134,7 +132,6 @@ export default ({ getService }: FtrProviderContext) => { }); it(`${username} should bulk update alerts which match query in DSL in ${space}/${index}`, async () => { - await esArchiver.load('x-pack/test/functional/es_archives/rule_registry/alerts'); // since this is a success case, reload the test data immediately beforehand const { body: updated } = await supertestWithoutAuth .post(`${getSpaceUrlPrefix(space)}${TEST_URL}/bulk_update`) .auth(username, password) diff --git a/x-pack/test/rule_registry/security_and_spaces/tests/basic/find_alerts.ts b/x-pack/test/rule_registry/security_and_spaces/tests/basic/find_alerts.ts index 694c27060f191..404250a169e0a 100644 --- a/x-pack/test/rule_registry/security_and_spaces/tests/basic/find_alerts.ts +++ b/x-pack/test/rule_registry/security_and_spaces/tests/basic/find_alerts.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import { - ALERT_RULE_CONSUMER, + ALERT_RULE_TYPE_ID, ALERT_WORKFLOW_STATUS, } from '@kbn/rule-registry-plugin/common/technical_rule_data_field_names'; import { @@ -268,30 +268,30 @@ export default ({ getService }: FtrProviderContext) => { expect(found.body.aggregations.nbr_consumer.value).to.be.equal(2); }); - it(`${superUser.username} should handle 'siem' featureIds`, async () => { + it(`${superUser.username} should handle 'siem' rule type IDs`, async () => { const found = await supertestWithoutAuth .post(`${getSpaceUrlPrefix(SPACE1)}${TEST_URL}/find`) .auth(superUser.username, superUser.password) .set('kbn-xsrf', 'true') .send({ - feature_ids: ['siem'], + rule_type_ids: ['siem.queryRule'], }); - expect(found.body.hits.hits.every((hit: any) => hit[ALERT_RULE_CONSUMER] === 'siem')).equal( + expect(found.body.hits.hits.every((hit: any) => hit[ALERT_RULE_TYPE_ID] === 'siem')).equal( true ); }); - it(`${superUser.username} should handle 'apm' featureIds`, async () => { + it(`${superUser.username} should handle 'apm' rule type IDs`, async () => { const found = await supertestWithoutAuth .post(`${getSpaceUrlPrefix(SPACE1)}${TEST_URL}/find`) .auth(superUser.username, superUser.password) .set('kbn-xsrf', 'true') .send({ - feature_ids: ['apm'], + rule_type_ids: ['apm.error_rate'], }); - expect(found.body.hits.hits.every((hit: any) => hit[ALERT_RULE_CONSUMER] === 'apm')).equal( + expect(found.body.hits.hits.every((hit: any) => hit[ALERT_RULE_TYPE_ID] === 'apm')).equal( true ); }); diff --git a/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_aad_fields_by_rule_type.ts b/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_aad_fields_by_rule_type.ts index 4d8fed02a7c71..1e7759b06c30d 100644 --- a/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_aad_fields_by_rule_type.ts +++ b/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_aad_fields_by_rule_type.ts @@ -38,8 +38,12 @@ export default ({ getService }: FtrProviderContext) => { await esArchiver.load('x-pack/test/functional/es_archives/rule_registry/alerts'); }); + after(async () => { + await esArchiver.unload('x-pack/test/functional/es_archives/rule_registry/alerts'); + }); + describe('Users:', () => { - it(`${obsOnlySpacesAll.username} should be able to get browser fields for o11y featureIds`, async () => { + it(`${obsOnlySpacesAll.username} should be able to get browser fields for o11y rule type ids`, async () => { await retry.try(async () => { const aadFields = await getAADFieldsByRuleType( obsOnlySpacesAll, diff --git a/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_alert_summary.ts b/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_alert_summary.ts index 5da72c7f6a76a..abfc4c9d5aa79 100644 --- a/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_alert_summary.ts +++ b/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_alert_summary.ts @@ -39,7 +39,7 @@ export default ({ getService }: FtrProviderContext) => { .send({ gte: '2020-12-16T15:00:00.000Z', lte: '2020-12-16T16:00:00.000Z', - featureIds: ['logs'], + ruleTypeIds: ['logs.alert.document.count'], fixed_interval: '10m', }) .expect(200); @@ -83,7 +83,7 @@ export default ({ getService }: FtrProviderContext) => { }, }, ], - featureIds: ['logs'], + ruleTypeIds: ['logs.alert.document.count'], fixed_interval: '10m', }) .expect(200); @@ -127,7 +127,7 @@ export default ({ getService }: FtrProviderContext) => { }, }, ], - featureIds: ['logs'], + ruleTypeIds: ['logs.alert.document.count'], fixed_interval: '10m', }) .expect(200); diff --git a/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_alerts_index.ts b/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_alerts_index.ts index 530c0a57b02ef..604cff34865d9 100644 --- a/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_alerts_index.ts +++ b/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_alerts_index.ts @@ -30,16 +30,18 @@ export default ({ getService }: FtrProviderContext) => { const STACK_ALERT_INDEX = '.alerts-stack.alerts-default'; const getIndexName = async ( - featureIds: string[], + ruleTypeIds: string[], user: User, space: string, expectedStatusCode: number = 200 ) => { const resp = await supertestWithoutAuth - .get(`${getSpaceUrlPrefix(space)}${ALERTS_INDEX_URL}?features=${featureIds.join(',')}`) + .get(`${getSpaceUrlPrefix(space)}${ALERTS_INDEX_URL}`) + .query({ ruleTypeIds }) .auth(user.username, user.password) .set('kbn-xsrf', 'true') .expect(expectedStatusCode); + return resp.body.index_name as string[]; }; @@ -47,33 +49,34 @@ export default ({ getService }: FtrProviderContext) => { before(async () => { await esArchiver.load('x-pack/test/functional/es_archives/rule_registry/alerts'); }); + + before(async () => { + await esArchiver.unload('x-pack/test/functional/es_archives/rule_registry/alerts'); + }); + describe('Users:', () => { it(`${obsOnlySpacesAll.username} should be able to access the APM alert in ${SPACE1}`, async () => { - const indexNames = await getIndexName(['apm'], obsOnlySpacesAll, SPACE1); + const indexNames = await getIndexName(['apm.error_rate'], obsOnlySpacesAll, SPACE1); expect(indexNames.includes(APM_ALERT_INDEX)).to.eql(true); // assert this here so we can use constants in the dynamically-defined test cases below }); it(`${superUser.username} should be able to access the APM alert in ${SPACE1}`, async () => { - const indexNames = await getIndexName(['apm'], superUser, SPACE1); + const indexNames = await getIndexName(['apm.error_rate'], superUser, SPACE1); expect(indexNames.includes(APM_ALERT_INDEX)).to.eql(true); // assert this here so we can use constants in the dynamically-defined test cases below }); it(`${secOnlyRead.username} should NOT be able to access the APM alert in ${SPACE1}`, async () => { - const indexNames = await getIndexName(['apm'], secOnlyRead, SPACE1); + const indexNames = await getIndexName(['apm.error_rate'], secOnlyRead, SPACE1); expect(indexNames?.length).to.eql(0); }); it(`${secOnlyRead.username} should be able to access the security solution alert in ${SPACE1}`, async () => { - const indexNames = await getIndexName(['siem'], secOnlyRead, SPACE1); + const indexNames = await getIndexName(['siem.esqlRule'], secOnlyRead, SPACE1); expect(indexNames.includes(`${SECURITY_SOLUTION_ALERT_INDEX}-${SPACE1}`)).to.eql(true); // assert this here so we can use constants in the dynamically-defined test cases below }); it(`${stackAlertsOnlyReadSpacesAll.username} should be able to access the stack alert in ${SPACE1}`, async () => { - const indexNames = await getIndexName( - ['stackAlerts'], - stackAlertsOnlyReadSpacesAll, - SPACE1 - ); + const indexNames = await getIndexName(['.es-query'], stackAlertsOnlyReadSpacesAll, SPACE1); expect(indexNames.includes(STACK_ALERT_INDEX)).to.eql(true); }); }); diff --git a/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_browser_fields_by_feature_id.ts b/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_browser_fields_by_rule_type_ids.ts similarity index 74% rename from x-pack/test/rule_registry/security_and_spaces/tests/basic/get_browser_fields_by_feature_id.ts rename to x-pack/test/rule_registry/security_and_spaces/tests/basic/get_browser_fields_by_rule_type_ids.ts index 352ff0188b015..ac05dad573c65 100644 --- a/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_browser_fields_by_feature_id.ts +++ b/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_browser_fields_by_rule_type_ids.ts @@ -6,6 +6,7 @@ */ import expect from 'expect'; +import { OBSERVABILITY_RULE_TYPE_IDS } from '@kbn/rule-data-utils'; import { superUser, obsOnlySpacesAll, secOnlyRead } from '../../../common/lib/authentication/users'; import type { User } from '../../../common/lib/authentication/types'; import { FtrProviderContext } from '../../../common/ftr_provider_context'; @@ -20,31 +21,38 @@ export default ({ getService }: FtrProviderContext) => { const getBrowserFieldsByFeatureId = async ( user: User, - featureIds: string[], + ruleTypeIds: string[], expectedStatusCode: number = 200 ) => { const resp = await supertestWithoutAuth .get(`${getSpaceUrlPrefix(SPACE1)}${TEST_URL}`) - .query({ featureIds }) + .query({ ruleTypeIds }) .auth(user.username, user.password) .set('kbn-xsrf', 'true') .expect(expectedStatusCode); + return resp.body; }; - describe('Alert - Get browser fields by featureId', () => { + describe('Alert - Get browser fields by rule type IDs', () => { + const ruleTypeIds = [ + ...OBSERVABILITY_RULE_TYPE_IDS, + '.es-query', + 'xpack.ml.anomaly_detection_alert', + ]; + before(async () => { await esArchiver.load('x-pack/test/functional/es_archives/rule_registry/alerts'); }); + after(async () => { + await esArchiver.unload('x-pack/test/functional/es_archives/rule_registry/alerts'); + }); + describe('Users:', () => { - it(`${obsOnlySpacesAll.username} should be able to get browser fields for o11y featureIds`, async () => { - const resp = await getBrowserFieldsByFeatureId(obsOnlySpacesAll, [ - 'apm', - 'infrastructure', - 'logs', - 'uptime', - ]); + it(`${obsOnlySpacesAll.username} should be able to get browser fields for o11y ruleTypeIds that has access to`, async () => { + const resp = await getBrowserFieldsByFeatureId(obsOnlySpacesAll, ruleTypeIds); + expect(Object.keys(resp.browserFields)).toEqual([ 'base', 'agent', @@ -61,13 +69,9 @@ export default ({ getService }: FtrProviderContext) => { ]); }); - it(`${superUser.username} should be able to get browser fields for o11y featureIds`, async () => { - const resp = await getBrowserFieldsByFeatureId(superUser, [ - 'apm', - 'infrastructure', - 'logs', - 'uptime', - ]); + it(`${superUser.username} should be able to get browser fields for all o11y ruleTypeIds`, async () => { + const resp = await getBrowserFieldsByFeatureId(superUser, ruleTypeIds); + expect(Object.keys(resp.browserFields)).toEqual([ 'base', 'agent', @@ -82,17 +86,18 @@ export default ({ getService }: FtrProviderContext) => { 'observer', 'orchestrator', 'service', + 'slo', 'tls', 'url', ]); }); - it(`${superUser.username} should NOT be able to get browser fields for siem featureId`, async () => { - await getBrowserFieldsByFeatureId(superUser, ['siem'], 404); + it(`${superUser.username} should NOT be able to get browser fields for siem rule types`, async () => { + await getBrowserFieldsByFeatureId(superUser, ['siem.queryRule'], 404); }); - it(`${secOnlyRead.username} should NOT be able to get browser fields for siem featureId`, async () => { - await getBrowserFieldsByFeatureId(secOnlyRead, ['siem'], 404); + it(`${secOnlyRead.username} should NOT be able to get browser fields for siem rule types`, async () => { + await getBrowserFieldsByFeatureId(secOnlyRead, ['siem.queryRule'], 404); }); }); }); diff --git a/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_feature_ids_by_registration_contexts.ts b/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_feature_ids_by_registration_contexts.ts deleted file mode 100644 index 5b4063cfe5285..0000000000000 --- a/x-pack/test/rule_registry/security_and_spaces/tests/basic/get_feature_ids_by_registration_contexts.ts +++ /dev/null @@ -1,79 +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 expect from '@kbn/expect'; - -import { superUser, obsOnlySpacesAll, secOnlyRead } from '../../../common/lib/authentication/users'; -import type { User } from '../../../common/lib/authentication/types'; -import { FtrProviderContext } from '../../../common/ftr_provider_context'; -import { getSpaceUrlPrefix } from '../../../common/lib/authentication/spaces'; - -// eslint-disable-next-line import/no-default-export -export default ({ getService }: FtrProviderContext) => { - const supertestWithoutAuth = getService('supertestWithoutAuth'); - const esArchiver = getService('esArchiver'); - - const TEST_URL = '/internal/rac/alerts'; - const ALERTS_FEATURE_IDS_URL = `${TEST_URL}/_feature_ids`; - const SPACE1 = 'space1'; - - const getApmFeatureIdByRegistrationContexts = async ( - user: User, - space: string, - expectedStatusCode: number = 200 - ) => { - const resp = await supertestWithoutAuth - .get( - `${getSpaceUrlPrefix(space)}${ALERTS_FEATURE_IDS_URL}?registrationContext=observability.apm` - ) - .auth(user.username, user.password) - .set('kbn-xsrf', 'true') - .expect(expectedStatusCode); - return resp.body as string[]; - }; - - const getSecurityFeatureIdByRegistrationContexts = async ( - user: User, - space: string, - expectedStatusCode: number = 200 - ) => { - const resp = await supertestWithoutAuth - .get(`${getSpaceUrlPrefix(space)}${ALERTS_FEATURE_IDS_URL}?registrationContext=security`) - .auth(user.username, user.password) - .set('kbn-xsrf', 'true') - .expect(expectedStatusCode); - - return resp.body as string[]; - }; - - describe('Alert - Get feature ids by registration context', () => { - before(async () => { - await esArchiver.load('x-pack/test/functional/es_archives/rule_registry/alerts'); - }); - describe('Users:', () => { - it(`${obsOnlySpacesAll.username} should be able to get feature id for registration context 'observability.apm' in ${SPACE1}`, async () => { - const featureIds = await getApmFeatureIdByRegistrationContexts(obsOnlySpacesAll, SPACE1); - expect(featureIds).to.eql(['apm']); - }); - - it(`${superUser.username} should be able to get feature id for registration context 'observability.apm' in ${SPACE1}`, async () => { - const featureIds = await getApmFeatureIdByRegistrationContexts(superUser, SPACE1); - expect(featureIds).to.eql(['apm']); - }); - - it(`${secOnlyRead.username} should NOT be able to get feature id for registration context 'observability.apm' in ${SPACE1}`, async () => { - const featureIds = await getApmFeatureIdByRegistrationContexts(secOnlyRead, SPACE1); - expect(featureIds).to.eql([]); - }); - - it(`${secOnlyRead.username} should be able to get feature id for registration context 'security' in ${SPACE1}`, async () => { - const featureIds = await getSecurityFeatureIdByRegistrationContexts(secOnlyRead, SPACE1); - expect(featureIds).to.eql(['siem']); - }); - }); - }); -}; diff --git a/x-pack/test/rule_registry/security_and_spaces/tests/basic/index.ts b/x-pack/test/rule_registry/security_and_spaces/tests/basic/index.ts index 5237cd02c0c89..e7593121bc2d0 100644 --- a/x-pack/test/rule_registry/security_and_spaces/tests/basic/index.ts +++ b/x-pack/test/rule_registry/security_and_spaces/tests/basic/index.ts @@ -25,11 +25,10 @@ export default ({ loadTestFile, getService }: FtrProviderContext): void => { // loadTestFile(require.resolve('./update_alert')); // loadTestFile(require.resolve('./bulk_update_alerts')); - loadTestFile(require.resolve('./get_feature_ids_by_registration_contexts')); loadTestFile(require.resolve('./get_alerts_index')); loadTestFile(require.resolve('./find_alerts')); loadTestFile(require.resolve('./search_strategy')); - loadTestFile(require.resolve('./get_browser_fields_by_feature_id')); + loadTestFile(require.resolve('./get_browser_fields_by_rule_type_ids')); loadTestFile(require.resolve('./get_alert_summary')); loadTestFile(require.resolve('./get_aad_fields_by_rule_type')); }); diff --git a/x-pack/test/rule_registry/security_and_spaces/tests/basic/search_strategy.ts b/x-pack/test/rule_registry/security_and_spaces/tests/basic/search_strategy.ts index ffcd6fee5cf85..6462e2a1ec807 100644 --- a/x-pack/test/rule_registry/security_and_spaces/tests/basic/search_strategy.ts +++ b/x-pack/test/rule_registry/security_and_spaces/tests/basic/search_strategy.ts @@ -5,7 +5,6 @@ * 2.0. */ import expect from '@kbn/expect'; -import { AlertConsumers } from '@kbn/rule-data-utils'; import type { RuleRegistrySearchResponse } from '@kbn/rule-registry-plugin/common'; import type { FtrProviderContext } from '../../../common/ftr_provider_context'; @@ -39,6 +38,7 @@ export default ({ getService }: FtrProviderContext) => { before(async () => { await esArchiver.load('x-pack/test/functional/es_archives/observability/alerts'); }); + after(async () => { await esArchiver.unload('x-pack/test/functional/es_archives/observability/alerts'); }); @@ -54,15 +54,14 @@ export default ({ getService }: FtrProviderContext) => { kibanaVersion, internalOrigin: 'Kibana', options: { - featureIds: [AlertConsumers.LOGS], + ruleTypeIds: ['logs.alert.document.count'], }, strategy: 'privateRuleRegistryAlertsSearchStrategy', }); + expect(result.rawResponse.hits.total).to.eql(5); - const consumers = result.rawResponse.hits.hits.map((hit) => { - return hit.fields?.['kibana.alert.rule.consumer']; - }); - expect(consumers.every((consumer) => consumer === AlertConsumers.LOGS)); + + validateRuleTypeIds(result, ['logs.alert.document.count']); }); it('should support pagination and sorting', async () => { @@ -76,7 +75,7 @@ export default ({ getService }: FtrProviderContext) => { kibanaVersion, internalOrigin: 'Kibana', options: { - featureIds: [AlertConsumers.LOGS], + ruleTypeIds: ['logs.alert.document.count'], pagination: { pageSize: 2, pageIndex: 1, @@ -91,25 +90,35 @@ export default ({ getService }: FtrProviderContext) => { }, strategy: 'privateRuleRegistryAlertsSearchStrategy', }); + expect(result.rawResponse.hits.total).to.eql(5); expect(result.rawResponse.hits.hits.length).to.eql(2); + const first = result.rawResponse.hits.hits[0].fields?.['kibana.alert.evaluation.value']; const second = result.rawResponse.hits.hits[1].fields?.['kibana.alert.evaluation.value']; + expect(first > second).to.be(true); }); }); describe('siem', () => { + const siemRuleTypeIds = [ + 'siem.indicatorRule', + 'siem.thresholdRule', + 'siem.eqlRule', + 'siem.queryRule', + ]; + before(async () => { await esArchiver.load('x-pack/test/functional/es_archives/observability/alerts'); await esArchiver.load('x-pack/test/functional/es_archives/security_solution/alerts/8.1.0'); }); after(async () => { + await esArchiver.unload('x-pack/test/functional/es_archives/observability/alerts'); await esArchiver.unload( 'x-pack/test/functional/es_archives/security_solution/alerts/8.1.0' ); - await esArchiver.unload('x-pack/test/functional/es_archives/observability/alerts'); }); it('should return alerts from siem rules', async () => { @@ -123,15 +132,14 @@ export default ({ getService }: FtrProviderContext) => { kibanaVersion, internalOrigin: 'Kibana', options: { - featureIds: [AlertConsumers.SIEM], + ruleTypeIds: siemRuleTypeIds, }, strategy: 'privateRuleRegistryAlertsSearchStrategy', }); + expect(result.rawResponse.hits.total).to.eql(50); - const consumers = result.rawResponse.hits.hits.map( - (hit) => hit.fields?.['kibana.alert.rule.consumer'] - ); - expect(consumers.every((consumer) => consumer === AlertConsumers.SIEM)); + + validateRuleTypeIds(result, siemRuleTypeIds); }); it('should throw an error when trying to to search for more than just siem', async () => { @@ -145,13 +153,14 @@ export default ({ getService }: FtrProviderContext) => { kibanaVersion, internalOrigin: 'Kibana', options: { - featureIds: [AlertConsumers.SIEM, AlertConsumers.LOGS], + ruleTypeIds: ['siem.indicatorRule', 'logs.alert.document.count'], }, strategy: 'privateRuleRegistryAlertsSearchStrategy', }); - expect(result.statusCode).to.be(500); + + expect(result.statusCode).to.be(400); expect(result.message).to.be( - `The privateRuleRegistryAlertsSearchStrategy search strategy is unable to accommodate requests containing multiple feature IDs and one of those IDs is SIEM.` + 'The privateRuleRegistryAlertsSearchStrategy search strategy is unable to accommodate requests containing multiple rule types with mixed authorization.' ); }); @@ -168,7 +177,7 @@ export default ({ getService }: FtrProviderContext) => { kibanaVersion, internalOrigin: 'Kibana', options: { - featureIds: [AlertConsumers.SIEM], + ruleTypeIds: siemRuleTypeIds, runtimeMappings: { [runtimeFieldKey]: { type: 'keyword', @@ -180,18 +189,24 @@ export default ({ getService }: FtrProviderContext) => { }, strategy: 'privateRuleRegistryAlertsSearchStrategy', }); + expect(result.rawResponse.hits.total).to.eql(50); + const runtimeFields = result.rawResponse.hits.hits.map( (hit) => hit.fields?.[runtimeFieldKey] ); + expect(runtimeFields.every((field) => field === runtimeFieldValue)); }); }); describe('apm', () => { + const apmRuleTypeIds = ['apm.transaction_error_rate', 'apm.error_rate']; + before(async () => { await esArchiver.load('x-pack/test/functional/es_archives/observability/alerts'); }); + after(async () => { await esArchiver.unload('x-pack/test/functional/es_archives/observability/alerts'); }); @@ -207,19 +222,20 @@ export default ({ getService }: FtrProviderContext) => { kibanaVersion, internalOrigin: 'Kibana', options: { - featureIds: [AlertConsumers.APM], + ruleTypeIds: apmRuleTypeIds, }, strategy: 'privateRuleRegistryAlertsSearchStrategy', space: 'default', }); + expect(result.rawResponse.hits.total).to.eql(9); - const consumers = result.rawResponse.hits.hits.map( - (hit) => hit.fields?.['kibana.alert.rule.consumer'] - ); - expect(consumers.every((consumer) => consumer === AlertConsumers.APM)); + + validateRuleTypeIds(result, apmRuleTypeIds); }); - it('should not by pass our RBAC authz filter with a should filter', async () => { + it('should return alerts from different rules', async () => { + const ruleTypeIds = [...apmRuleTypeIds, 'logs.alert.document.count']; + const result = await secureSearch.send({ supertestWithoutAuth, auth: { @@ -230,7 +246,83 @@ export default ({ getService }: FtrProviderContext) => { kibanaVersion, internalOrigin: 'Kibana', options: { - featureIds: [AlertConsumers.APM], + ruleTypeIds, + }, + strategy: 'privateRuleRegistryAlertsSearchStrategy', + space: 'default', + }); + + expect(result.rawResponse.hits.total).to.eql(14); + + validateRuleTypeIds(result, ruleTypeIds); + }); + + it('should filter alerts by rule type IDs with consumers', async () => { + const result = await secureSearch.send({ + supertestWithoutAuth, + auth: { + username: obsOnlySpacesAll.username, + password: obsOnlySpacesAll.password, + }, + referer: 'test', + kibanaVersion, + internalOrigin: 'Kibana', + options: { + ruleTypeIds: apmRuleTypeIds, + consumers: ['alerts', 'logs'], + }, + strategy: 'privateRuleRegistryAlertsSearchStrategy', + space: 'default', + }); + + expect(result.rawResponse.hits.total).to.eql(9); + + validateRuleTypeIds(result, apmRuleTypeIds); + }); + + it('should filter alerts by consumers with rule type IDs', async () => { + const ruleTypeIds = [...apmRuleTypeIds, 'logs.alert.document.count']; + + const result = await secureSearch.send({ + supertestWithoutAuth, + auth: { + username: obsOnlySpacesAll.username, + password: obsOnlySpacesAll.password, + }, + referer: 'test', + kibanaVersion, + internalOrigin: 'Kibana', + options: { + ruleTypeIds, + consumers: ['alerts'], + }, + strategy: 'privateRuleRegistryAlertsSearchStrategy', + space: 'default', + }); + + /** + *There are five documents of rule type logs.alert.document.count + * The four have the consumer set to alerts + * and the one has the consumer set to logs. + * All apm rule types (nine in total) have consumer set to alerts. + */ + expect(result.rawResponse.hits.total).to.eql(13); + + validateRuleTypeIds(result, ruleTypeIds); + }); + + it('should not by pass our RBAC authz filter with a should filter for rule type ids', async () => { + const result = await secureSearch.send({ + supertestWithoutAuth, + auth: { + username: obsOnlySpacesAll.username, + password: obsOnlySpacesAll.password, + }, + referer: 'test', + kibanaVersion, + internalOrigin: 'Kibana', + options: { + ruleTypeIds: apmRuleTypeIds, query: { bool: { filter: [], @@ -240,7 +332,7 @@ export default ({ getService }: FtrProviderContext) => { should: [ { match: { - 'kibana.alert.rule.consumer': 'logs', + 'kibana.alert.rule.rule_type_id': 'metrics.alert.inventory.threshold', }, }, ], @@ -256,14 +348,56 @@ export default ({ getService }: FtrProviderContext) => { strategy: 'privateRuleRegistryAlertsSearchStrategy', space: 'default', }); + expect(result.rawResponse.hits.total).to.eql(9); - const consumers = result.rawResponse.hits.hits.map( - (hit) => hit.fields?.['kibana.alert.rule.consumer'] - ); - expect(consumers.every((consumer) => consumer === AlertConsumers.APM)); + + validateRuleTypeIds(result, apmRuleTypeIds); + }); + + it('should not by pass our RBAC authz filter with a should filter for consumers', async () => { + const result = await secureSearch.send({ + supertestWithoutAuth, + auth: { + username: obsOnlySpacesAll.username, + password: obsOnlySpacesAll.password, + }, + referer: 'test', + kibanaVersion, + internalOrigin: 'Kibana', + options: { + ruleTypeIds: apmRuleTypeIds, + query: { + bool: { + filter: [], + should: [ + { + bool: { + should: [ + { + match: { + 'kibana.alert.rule.consumer': 'infrastructure', + }, + }, + ], + minimum_should_match: 1, + }, + }, + ], + must: [], + must_not: [], + }, + }, + }, + strategy: 'privateRuleRegistryAlertsSearchStrategy', + space: 'default', + }); + + expect(result.rawResponse.hits.total).to.eql(9); + + validateRuleTypeIds(result, apmRuleTypeIds); }); - it('should return an empty response with must filter and our RBAC authz filter', async () => { + it('should return an empty response with must filter and our RBAC authz filter for rule type ids', async () => { const result = await secureSearch.send({ supertestWithoutAuth, auth: { @@ -274,7 +408,7 @@ export default ({ getService }: FtrProviderContext) => { kibanaVersion, internalOrigin: 'Kibana', options: { - featureIds: [AlertConsumers.APM], + ruleTypeIds: apmRuleTypeIds, query: { bool: { filter: [], @@ -284,7 +418,7 @@ export default ({ getService }: FtrProviderContext) => { should: [ { match: { - 'kibana.alert.rule.consumer': 'logs', + 'kibana.alert.rule.rule_type_id': 'metrics.alert.inventory.threshold', }, }, ], @@ -300,10 +434,11 @@ export default ({ getService }: FtrProviderContext) => { strategy: 'privateRuleRegistryAlertsSearchStrategy', space: 'default', }); + expect(result.rawResponse.hits.total).to.eql(0); }); - it('should not by pass our RBAC authz filter with must_not filter', async () => { + it('should return an empty response with must filter and our RBAC authz filter for consumers', async () => { const result = await secureSearch.send({ supertestWithoutAuth, auth: { @@ -314,7 +449,91 @@ export default ({ getService }: FtrProviderContext) => { kibanaVersion, internalOrigin: 'Kibana', options: { - featureIds: [AlertConsumers.APM], + ruleTypeIds: apmRuleTypeIds, + query: { + bool: { + filter: [], + must: [ + { + bool: { + should: [ + { + match: { + 'kibana.alert.rule.consumer': 'infrastructure', + }, + }, + ], + minimum_should_match: 1, + }, + }, + ], + should: [], + must_not: [], + }, + }, + }, + strategy: 'privateRuleRegistryAlertsSearchStrategy', + space: 'default', + }); + + expect(result.rawResponse.hits.total).to.eql(0); + }); + + it('should not by pass our RBAC authz filter with must_not filter for rule type ids', async () => { + const result = await secureSearch.send({ + supertestWithoutAuth, + auth: { + username: obsOnlySpacesAll.username, + password: obsOnlySpacesAll.password, + }, + referer: 'test', + kibanaVersion, + internalOrigin: 'Kibana', + options: { + ruleTypeIds: apmRuleTypeIds, + query: { + bool: { + filter: [], + must: [], + must_not: [ + { + bool: { + should: [ + ...apmRuleTypeIds.map((apmRuleTypeId) => ({ + match: { + 'kibana.alert.rule.rule_type_id': apmRuleTypeId, + }, + })), + ], + minimum_should_match: apmRuleTypeIds.length, + }, + }, + ], + should: [], + }, + }, + }, + strategy: 'privateRuleRegistryAlertsSearchStrategy', + space: 'default', + }); + + expect(result.rawResponse.hits.total).to.eql(9); + + validateRuleTypeIds(result, apmRuleTypeIds); + }); + + it('should not by pass our RBAC authz filter with must_not filter for consumers', async () => { + const result = await secureSearch.send({ + supertestWithoutAuth, + auth: { + username: obsOnlySpacesAll.username, + password: obsOnlySpacesAll.password, + }, + referer: 'test', + kibanaVersion, + internalOrigin: 'Kibana', + options: { + ruleTypeIds: apmRuleTypeIds, query: { bool: { filter: [], @@ -340,11 +559,136 @@ export default ({ getService }: FtrProviderContext) => { strategy: 'privateRuleRegistryAlertsSearchStrategy', space: 'default', }); + expect(result.rawResponse.hits.total).to.eql(9); - const consumers = result.rawResponse.hits.hits.map( - (hit) => hit.fields?.['kibana.alert.rule.consumer'] - ); - expect(consumers.every((consumer) => consumer === AlertConsumers.APM)); + + validateRuleTypeIds(result, apmRuleTypeIds); + }); + + it('should not by pass our RBAC authz filter with the ruleTypeIds and consumers parameter', async () => { + const ruleTypeIds = [ + ...apmRuleTypeIds, + 'metrics.alert.inventory.threshold', + 'metrics.alert.threshold', + '.es-query', + ]; + + const result = await secureSearch.send({ + supertestWithoutAuth, + auth: { + /** + * obsOnlySpacesAll does not have access to the following pairs: + * + * Rule type ID: metrics.alert.inventory.threshold + * Consumer: alerts + * + * Rule type ID: metrics.alert.threshold + * Consumer: alerts + * + * Rule type ID: .es-query + * Consumer: discover + */ + username: obsOnlySpacesAll.username, + password: obsOnlySpacesAll.password, + }, + referer: 'test', + kibanaVersion, + internalOrigin: 'Kibana', + options: { + ruleTypeIds, + consumers: ['alerts', 'discover'], + }, + strategy: 'privateRuleRegistryAlertsSearchStrategy', + space: 'default', + }); + + expect(result.rawResponse.hits.total).to.eql(9); + + validateRuleTypeIds(result, apmRuleTypeIds); + }); + + it('should not return any alerts if the user does not have access to any alerts', async () => { + const result = await secureSearch.send({ + supertestWithoutAuth, + auth: { + username: obsOnlySpacesAll.username, + password: obsOnlySpacesAll.password, + }, + referer: 'test', + kibanaVersion, + internalOrigin: 'Kibana', + options: { + ruleTypeIds: ['metrics.alert.threshold', 'metrics.alert.inventory.threshold'], + }, + strategy: 'privateRuleRegistryAlertsSearchStrategy', + space: 'default', + }); + + expect(result.rawResponse.hits.total).to.eql(0); + }); + + it('should not return alerts that the user does not have access to', async () => { + const result = await secureSearch.send({ + supertestWithoutAuth, + auth: { + username: obsOnlySpacesAll.username, + password: obsOnlySpacesAll.password, + }, + referer: 'test', + kibanaVersion, + internalOrigin: 'Kibana', + options: { + ruleTypeIds: ['metrics.alert.threshold', 'logs.alert.document.count'], + }, + strategy: 'privateRuleRegistryAlertsSearchStrategy', + space: 'default', + }); + + expect(result.rawResponse.hits.total).to.eql(5); + validateRuleTypeIds(result, ['logs.alert.document.count']); + }); + + it('should not return alerts if the user does not have access to using a filter', async () => { + const result = await secureSearch.send({ + supertestWithoutAuth, + auth: { + username: obsOnlySpacesAll.username, + password: obsOnlySpacesAll.password, + }, + referer: 'test', + kibanaVersion, + internalOrigin: 'Kibana', + options: { + ruleTypeIds: apmRuleTypeIds, + query: { + bool: { + filter: [], + should: [ + { + bool: { + should: [ + { + match: { + 'kibana.alert.rule.rule_type_id': 'metrics.alert.inventory.threshold', + }, + }, + ], + minimum_should_match: 1, + }, + }, + ], + must: [], + must_not: [], + }, + }, + }, + strategy: 'privateRuleRegistryAlertsSearchStrategy', + space: 'default', + }); + + expect(result.rawResponse.hits.total).to.eql(9); + + validateRuleTypeIds(result, apmRuleTypeIds); }); }); @@ -367,11 +711,13 @@ export default ({ getService }: FtrProviderContext) => { kibanaVersion, internalOrigin: 'Kibana', options: { - featureIds: ['discover'], + ruleTypeIds: ['.es-query'], }, strategy: 'privateRuleRegistryAlertsSearchStrategy', }); + validateRuleTypeIds(result, ['.es-query']); + expect(result.rawResponse.hits.total).to.eql(1); const consumers = result.rawResponse.hits.hits.map((hit) => { @@ -392,11 +738,13 @@ export default ({ getService }: FtrProviderContext) => { kibanaVersion, internalOrigin: 'Kibana', options: { - featureIds: ['discover'], + ruleTypeIds: ['.es-query'], }, strategy: 'privateRuleRegistryAlertsSearchStrategy', }); + validateRuleTypeIds(result, ['.es-query']); + expect(result.rawResponse.hits.total).to.eql(1); const consumers = result.rawResponse.hits.hits.map((hit) => { @@ -417,13 +765,12 @@ export default ({ getService }: FtrProviderContext) => { kibanaVersion, internalOrigin: 'Kibana', options: { - featureIds: ['discover'], + ruleTypeIds: ['.es-query'], }, strategy: 'privateRuleRegistryAlertsSearchStrategy', }); - expect(result.statusCode).to.be(500); - expect(result.message).to.be('Unauthorized to find alerts for any rule types'); + expect(result.rawResponse.hits.total).to.eql(0); }); }); @@ -439,12 +786,29 @@ export default ({ getService }: FtrProviderContext) => { kibanaVersion, internalOrigin: 'Kibana', options: { - featureIds: [], + ruleTypeIds: [], }, strategy: 'privateRuleRegistryAlertsSearchStrategy', }); - expect(result.rawResponse).to.eql({}); + + expect(result.rawResponse.hits.total).to.eql(0); }); }); }); }; + +const validateRuleTypeIds = (result: RuleRegistrySearchResponse, ruleTypeIdsToVerify: string[]) => { + expect(result.rawResponse.hits.total).to.greaterThan(0); + + const ruleTypeIds = result.rawResponse.hits.hits + .map((hit) => { + return hit.fields?.['kibana.alert.rule.rule_type_id']; + }) + .flat(); + + expect( + ruleTypeIds.every((ruleTypeId) => + ruleTypeIdsToVerify.some((ruleTypeIdToVerify) => ruleTypeIdToVerify === ruleTypeId) + ) + ).to.eql(true); +}; diff --git a/x-pack/test/rule_registry/security_and_spaces/tests/basic/update_alert.ts b/x-pack/test/rule_registry/security_and_spaces/tests/basic/update_alert.ts index 4d7607442fbcb..237f492ebf363 100644 --- a/x-pack/test/rule_registry/security_and_spaces/tests/basic/update_alert.ts +++ b/x-pack/test/rule_registry/security_and_spaces/tests/basic/update_alert.ts @@ -101,7 +101,6 @@ export default ({ getService }: FtrProviderContext) => { function addTests({ space, authorizedUsers, unauthorizedUsers, alertId, index }: TestCase) { authorizedUsers.forEach(({ username, password }) => { it(`${username} should be able to update alert ${alertId} in ${space}/${index}`, async () => { - await esArchiver.load('x-pack/test/functional/es_archives/rule_registry/alerts'); // since this is a success case, reload the test data immediately beforehand await supertestWithoutAuth .post(`${getSpaceUrlPrefix(space)}${TEST_URL}`) .auth(username, password) diff --git a/x-pack/test/rule_registry/security_and_spaces/tests/trial/get_alerts.ts b/x-pack/test/rule_registry/security_and_spaces/tests/trial/get_alerts.ts index f4aa5c503bc19..f3c4a4e6146a2 100644 --- a/x-pack/test/rule_registry/security_and_spaces/tests/trial/get_alerts.ts +++ b/x-pack/test/rule_registry/security_and_spaces/tests/trial/get_alerts.ts @@ -47,6 +47,11 @@ export default ({ getService }: FtrProviderContext) => { before(async () => { await esArchiver.load('x-pack/test/functional/es_archives/rule_registry/alerts'); }); + + after(async () => { + await esArchiver.unload('x-pack/test/functional/es_archives/rule_registry/alerts'); + }); + describe('Users:', () => { // user with minimal_read and alerts_read privileges should be able to access apm alert it(`${obsMinReadAlertsRead.username} should be able to access the APM alert in ${SPACE1}`, async () => { diff --git a/x-pack/test/rule_registry/security_and_spaces/tests/trial/update_alert.ts b/x-pack/test/rule_registry/security_and_spaces/tests/trial/update_alert.ts index 9b4e4b70d59c8..0de2adbf0f57f 100644 --- a/x-pack/test/rule_registry/security_and_spaces/tests/trial/update_alert.ts +++ b/x-pack/test/rule_registry/security_and_spaces/tests/trial/update_alert.ts @@ -46,9 +46,11 @@ export default ({ getService }: FtrProviderContext) => { beforeEach(async () => { await esArchiver.load('x-pack/test/functional/es_archives/rule_registry/alerts'); }); + afterEach(async () => { await esArchiver.unload('x-pack/test/functional/es_archives/rule_registry/alerts'); }); + it(`${superUser.username} should be able to update the APM alert in ${SPACE1}`, async () => { const apmIndex = await getAPMIndexName(superUser); await supertestWithoutAuth diff --git a/x-pack/test/rule_registry/spaces_only/tests/trial/update_alert.ts b/x-pack/test/rule_registry/spaces_only/tests/trial/update_alert.ts index 31c3cfdecb9ee..2fe7ff9dac0c4 100644 --- a/x-pack/test/rule_registry/spaces_only/tests/trial/update_alert.ts +++ b/x-pack/test/rule_registry/spaces_only/tests/trial/update_alert.ts @@ -90,7 +90,6 @@ export default ({ getService }: FtrProviderContext) => { }); it(`${superUser.username} should be able to update alert ${APM_ALERT_ID} in ${SPACE2}/${APM_ALERT_INDEX}`, async () => { - await esArchiver.load('x-pack/test/functional/es_archives/rule_registry/alerts'); // since this is a success case, reload the test data immediately beforehand await supertestWithoutAuth .post(`${getSpaceUrlPrefix(SPACE2)}${TEST_URL}`) .set('kbn-xsrf', 'true') diff --git a/x-pack/test/search_sessions_integration/tests/apps/discover/async_search.ts b/x-pack/test/search_sessions_integration/tests/apps/discover/async_search.ts index d4c87209c64c7..eadd2b544953f 100644 --- a/x-pack/test/search_sessions_integration/tests/apps/discover/async_search.ts +++ b/x-pack/test/search_sessions_integration/tests/apps/discover/async_search.ts @@ -28,6 +28,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const retry = getService('retry'); const kibanaServer = getService('kibanaServer'); const toasts = getService('toasts'); + const dataGrid = getService('dataGrid'); // FLAKY: https://github.com/elastic/kibana/issues/195955 describe.skip('discover async search', () => { @@ -95,16 +96,14 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('navigation to context cleans the session', async () => { - const table = await discover.getDocTable(); - const isLegacy = await discover.useLegacyTable(); - await table.clickRowToggle({ rowIndex: 0 }); + await dataGrid.clickRowToggle({ rowIndex: 0 }); await retry.try(async () => { - const rowActions = await table.getRowActions({ rowIndex: 0 }); + const rowActions = await dataGrid.getRowActions({ rowIndex: 0 }); if (!rowActions.length) { throw new Error('row actions empty, trying again'); } - const idxToClick = isLegacy ? 0 : 1; + const idxToClick = 1; await rowActions[idxToClick].click(); }); diff --git a/x-pack/test/security_api_integration/plugins/features_provider/server/index.ts b/x-pack/test/security_api_integration/plugins/features_provider/server/index.ts index 61100babefea7..9b7158aca7b32 100644 --- a/x-pack/test/security_api_integration/plugins/features_provider/server/index.ts +++ b/x-pack/test/security_api_integration/plugins/features_provider/server/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { PluginSetupContract as AlertingPluginsSetup } from '@kbn/alerting-plugin/server/plugin'; +import type { AlertingServerSetup } from '@kbn/alerting-plugin/server/plugin'; import { schema } from '@kbn/config-schema'; import type { CoreSetup, Plugin, PluginInitializer } from '@kbn/core/server'; import { DEFAULT_APP_CATEGORIES } from '@kbn/core/server'; @@ -16,7 +16,7 @@ import { initRoutes } from './init_routes'; export interface PluginSetupDependencies { features: FeaturesPluginSetup; - alerting: AlertingPluginsSetup; + alerting: AlertingServerSetup; } export interface PluginStartDependencies { @@ -110,7 +110,10 @@ function case2FeatureSplit(deps: PluginSetupDependencies) { category: DEFAULT_APP_CATEGORIES.kibana, id: 'case_2_feature_a', name: 'Case #2 feature A (DEPRECATED)', - alerting: ['alerting_rule_type_one', 'alerting_rule_type_two'], + alerting: [ + { ruleTypeId: 'alerting_rule_type_one', consumers: ['case_2_feature_a'] }, + { ruleTypeId: 'alerting_rule_type_two', consumers: ['case_2_feature_a'] }, + ], cases: ['cases_owner_one', 'cases_owner_two'], privileges: { all: { @@ -122,12 +125,18 @@ function case2FeatureSplit(deps: PluginSetupDependencies) { management: { kibana: ['management_one', 'management_two'] }, alerting: { rule: { - all: ['alerting_rule_type_one', 'alerting_rule_type_two'], - read: ['alerting_rule_type_one', 'alerting_rule_type_two'], + all: [ + { ruleTypeId: 'alerting_rule_type_one', consumers: ['case_2_feature_a'] }, + { ruleTypeId: 'alerting_rule_type_two', consumers: ['case_2_feature_a'] }, + ], + read: [ + { ruleTypeId: 'alerting_rule_type_one', consumers: ['case_2_feature_a'] }, + { ruleTypeId: 'alerting_rule_type_two', consumers: ['case_2_feature_a'] }, + ], }, alert: { - all: ['alerting_rule_type_one', 'alerting_rule_type_two'], - read: ['alerting_rule_type_one', 'alerting_rule_type_two'], + all: [{ ruleTypeId: 'alerting_rule_type_one', consumers: ['case_2_feature_a'] }], + read: [{ ruleTypeId: 'alerting_rule_type_two', consumers: ['case_2_feature_a'] }], }, }, cases: { @@ -167,7 +176,12 @@ function case2FeatureSplit(deps: PluginSetupDependencies) { app: ['app_one'], catalogue: ['cat_one'], management: { kibana: ['management_one'] }, - alerting: ['alerting_rule_type_one'], + // In addition to registering the `case_2_feature_b` consumer, we also need to register + // `case_2_feature_a` as an additional consumer to ensure that users with either deprecated or + // replacement privileges can access the rules, regardless of which one created them. + alerting: [ + { ruleTypeId: 'alerting_rule_type_one', consumers: ['case_2_feature_a', 'case_2_feature_b'] }, + ], cases: ['cases_owner_one'], privileges: { all: { @@ -178,8 +192,34 @@ function case2FeatureSplit(deps: PluginSetupDependencies) { catalogue: ['cat_one'], management: { kibana: ['management_one'] }, alerting: { - rule: { all: ['alerting_rule_type_one'], read: ['alerting_rule_type_one'] }, - alert: { all: ['alerting_rule_type_one'], read: ['alerting_rule_type_one'] }, + rule: { + all: [ + { + ruleTypeId: 'alerting_rule_type_one', + consumers: ['case_2_feature_a', 'case_2_feature_b'], + }, + ], + read: [ + { + ruleTypeId: 'alerting_rule_type_one', + consumers: ['case_2_feature_a', 'case_2_feature_b'], + }, + ], + }, + alert: { + all: [ + { + ruleTypeId: 'alerting_rule_type_one', + consumers: ['case_2_feature_a', 'case_2_feature_b'], + }, + ], + read: [ + { + ruleTypeId: 'alerting_rule_type_one', + consumers: ['case_2_feature_a', 'case_2_feature_b'], + }, + ], + }, }, cases: { all: ['cases_owner_one'], @@ -208,7 +248,12 @@ function case2FeatureSplit(deps: PluginSetupDependencies) { app: ['app_two'], catalogue: ['cat_two'], management: { kibana: ['management_two'] }, - alerting: ['alerting_rule_type_two'], + // In addition to registering the `case_2_feature_c` consumer, we also need to register + // `case_2_feature_a` as an additional consumer to ensure that users with either deprecated or + // replacement privileges can access the rules, regardless of which one created them. + alerting: [ + { ruleTypeId: 'alerting_rule_type_two', consumers: ['case_2_feature_a', 'case_2_feature_c'] }, + ], cases: ['cases_owner_two'], privileges: { all: { @@ -219,8 +264,34 @@ function case2FeatureSplit(deps: PluginSetupDependencies) { catalogue: ['cat_two'], management: { kibana: ['management_two'] }, alerting: { - rule: { all: ['alerting_rule_type_two'], read: ['alerting_rule_type_two'] }, - alert: { all: ['alerting_rule_type_two'], read: ['alerting_rule_type_two'] }, + rule: { + all: [ + { + ruleTypeId: 'alerting_rule_type_two', + consumers: ['case_2_feature_a', 'case_2_feature_c'], + }, + ], + read: [ + { + ruleTypeId: 'alerting_rule_type_two', + consumers: ['case_2_feature_a', 'case_2_feature_c'], + }, + ], + }, + alert: { + all: [ + { + ruleTypeId: 'alerting_rule_type_two', + consumers: ['case_2_feature_a', 'case_2_feature_c'], + }, + ], + read: [ + { + ruleTypeId: 'alerting_rule_type_two', + consumers: ['case_2_feature_a', 'case_2_feature_c'], + }, + ], + }, }, cases: { all: ['cases_owner_two'], diff --git a/x-pack/test/security_api_integration/tests/anonymous/capabilities.ts b/x-pack/test/security_api_integration/tests/anonymous/capabilities.ts index f4f43b070f0d5..2327292f3ea44 100644 --- a/x-pack/test/security_api_integration/tests/anonymous/capabilities.ts +++ b/x-pack/test/security_api_integration/tests/anonymous/capabilities.ts @@ -56,6 +56,8 @@ export default function ({ getService }: FtrProviderContext) { "dashboard": Object { "createNew": false, "createShortUrl": false, + "downloadCsv": false, + "generateScreenshot": false, "saveQuery": false, "show": false, "showWriteControls": false, @@ -63,6 +65,7 @@ export default function ({ getService }: FtrProviderContext) { }, "discover": Object { "createShortUrl": false, + "generateCsv": false, "save": false, "saveQuery": false, "show": false, @@ -76,6 +79,7 @@ export default function ({ getService }: FtrProviderContext) { "visualize": Object { "createShortUrl": false, "delete": false, + "generateScreenshot": false, "save": false, "saveQuery": false, "show": false, @@ -87,6 +91,8 @@ export default function ({ getService }: FtrProviderContext) { "dashboard": Object { "createNew": false, "createShortUrl": false, + "downloadCsv": false, + "generateScreenshot": false, "saveQuery": false, "show": false, "showWriteControls": false, @@ -94,6 +100,7 @@ export default function ({ getService }: FtrProviderContext) { }, "discover": Object { "createShortUrl": false, + "generateCsv": false, "save": false, "saveQuery": false, "show": false, @@ -107,6 +114,7 @@ export default function ({ getService }: FtrProviderContext) { "visualize": Object { "createShortUrl": false, "delete": false, + "generateScreenshot": false, "save": false, "saveQuery": false, "show": false, @@ -118,6 +126,8 @@ export default function ({ getService }: FtrProviderContext) { "dashboard": Object { "createNew": false, "createShortUrl": false, + "downloadCsv": false, + "generateScreenshot": false, "saveQuery": false, "show": false, "showWriteControls": false, @@ -125,6 +135,7 @@ export default function ({ getService }: FtrProviderContext) { }, "discover": Object { "createShortUrl": false, + "generateCsv": false, "save": false, "saveQuery": false, "show": false, @@ -138,6 +149,7 @@ export default function ({ getService }: FtrProviderContext) { "visualize": Object { "createShortUrl": false, "delete": false, + "generateScreenshot": false, "save": false, "saveQuery": false, "show": false, @@ -168,6 +180,8 @@ export default function ({ getService }: FtrProviderContext) { "dashboard": Object { "createNew": false, "createShortUrl": false, + "downloadCsv": false, + "generateScreenshot": false, "saveQuery": false, "show": false, "showWriteControls": false, @@ -175,6 +189,7 @@ export default function ({ getService }: FtrProviderContext) { }, "discover": Object { "createShortUrl": false, + "generateCsv": false, "save": false, "saveQuery": false, "show": false, @@ -188,6 +203,7 @@ export default function ({ getService }: FtrProviderContext) { "visualize": Object { "createShortUrl": false, "delete": false, + "generateScreenshot": false, "save": false, "saveQuery": false, "show": false, @@ -199,6 +215,8 @@ export default function ({ getService }: FtrProviderContext) { "dashboard": Object { "createNew": false, "createShortUrl": false, + "downloadCsv": false, + "generateScreenshot": false, "saveQuery": false, "show": false, "showWriteControls": false, @@ -206,6 +224,7 @@ export default function ({ getService }: FtrProviderContext) { }, "discover": Object { "createShortUrl": false, + "generateCsv": false, "save": false, "saveQuery": false, "show": false, @@ -219,6 +238,7 @@ export default function ({ getService }: FtrProviderContext) { "visualize": Object { "createShortUrl": false, "delete": false, + "generateScreenshot": false, "save": false, "saveQuery": false, "show": false, @@ -230,6 +250,8 @@ export default function ({ getService }: FtrProviderContext) { "dashboard": Object { "createNew": false, "createShortUrl": false, + "downloadCsv": false, + "generateScreenshot": false, "saveQuery": false, "show": false, "showWriteControls": false, @@ -237,6 +259,7 @@ export default function ({ getService }: FtrProviderContext) { }, "discover": Object { "createShortUrl": false, + "generateCsv": false, "save": false, "saveQuery": false, "show": false, @@ -250,6 +273,7 @@ export default function ({ getService }: FtrProviderContext) { "visualize": Object { "createShortUrl": false, "delete": false, + "generateScreenshot": false, "save": false, "saveQuery": false, "show": false, @@ -298,6 +322,8 @@ export default function ({ getService }: FtrProviderContext) { "dashboard": Object { "createNew": false, "createShortUrl": false, + "downloadCsv": false, + "generateScreenshot": false, "saveQuery": false, "show": true, "showWriteControls": false, @@ -305,6 +331,7 @@ export default function ({ getService }: FtrProviderContext) { }, "discover": Object { "createShortUrl": false, + "generateCsv": false, "save": false, "saveQuery": false, "show": true, @@ -318,6 +345,7 @@ export default function ({ getService }: FtrProviderContext) { "visualize": Object { "createShortUrl": false, "delete": false, + "generateScreenshot": false, "save": false, "saveQuery": false, "show": true, @@ -331,6 +359,8 @@ export default function ({ getService }: FtrProviderContext) { "dashboard": Object { "createNew": false, "createShortUrl": false, + "downloadCsv": false, + "generateScreenshot": false, "saveQuery": false, "show": false, "showWriteControls": false, @@ -338,6 +368,7 @@ export default function ({ getService }: FtrProviderContext) { }, "discover": Object { "createShortUrl": false, + "generateCsv": false, "save": false, "saveQuery": false, "show": false, @@ -351,6 +382,7 @@ export default function ({ getService }: FtrProviderContext) { "visualize": Object { "createShortUrl": false, "delete": false, + "generateScreenshot": false, "save": false, "saveQuery": false, "show": false, @@ -364,6 +396,8 @@ export default function ({ getService }: FtrProviderContext) { "dashboard": Object { "createNew": false, "createShortUrl": false, + "downloadCsv": false, + "generateScreenshot": false, "saveQuery": false, "show": false, "showWriteControls": false, @@ -371,6 +405,7 @@ export default function ({ getService }: FtrProviderContext) { }, "discover": Object { "createShortUrl": false, + "generateCsv": false, "save": false, "saveQuery": false, "show": false, @@ -384,6 +419,7 @@ export default function ({ getService }: FtrProviderContext) { "visualize": Object { "createShortUrl": false, "delete": false, + "generateScreenshot": false, "save": false, "saveQuery": false, "show": true, diff --git a/x-pack/test/security_api_integration/tests/features/deprecated_features.ts b/x-pack/test/security_api_integration/tests/features/deprecated_features.ts index 29135ff2440b2..7887cd6a23dc0 100644 --- a/x-pack/test/security_api_integration/tests/features/deprecated_features.ts +++ b/x-pack/test/security_api_integration/tests/features/deprecated_features.ts @@ -492,56 +492,88 @@ export default function ({ getService }: FtrProviderContext) { const ruleOneTransformed = await createRule( transformedUser, 'case_2_a_transform_one', - 'case_2_feature_b', + 'case_2_feature_a', 'alerting_rule_type_one' ); const ruleTwoTransformed = await createRule( transformedUser, 'case_2_a_transform_two', + 'case_2_feature_a', + 'alerting_rule_type_two' + ); + + // Create rules as user with new privileges (B). + const newUserB = getUserCredentials('case_2_b_new'); + const ruleOneNewBConsumerA = await createRule( + newUserB, + 'case_2_b_new_one', + 'case_2_feature_a', + 'alerting_rule_type_one' + ); + const ruleOneNewBConsumerB = await createRule( + newUserB, + 'case_2_b_new_one', + 'case_2_feature_b', + 'alerting_rule_type_one' + ); + + // Create cases as user with new privileges (C). + const newUserC = getUserCredentials('case_2_c_new'); + const ruleTwoNewCConsumerA = await createRule( + newUserC, + 'case_2_c_new_two', + 'case_2_feature_a', + 'alerting_rule_type_two' + ); + const ruleTwoNewCConsumerC = await createRule( + newUserC, + 'case_2_c_new_two', 'case_2_feature_c', 'alerting_rule_type_two' ); // Users with deprecated privileges should be able to access rules created by themselves and - // users with new privileges. + // users with new privileges assuming the consumer is the same. for (const ruleToCheck of [ ruleOneDeprecated, ruleTwoDeprecated, ruleOneTransformed, ruleTwoTransformed, + ruleOneNewBConsumerA, + ruleTwoNewCConsumerA, ]) { expect(await getRule(deprecatedUser, ruleToCheck.id)).toBeDefined(); + expect(await getRule(transformedUser, ruleToCheck.id)).toBeDefined(); } - // NOTE: Scenarios below require SO migrations for both alerting rules and alerts to switch to - // a new producer that is tied to feature ID. Presumably we won't have this requirement once - // https://github.com/elastic/kibana/pull/183756 is resolved. - - // Create rules as user with new privileges (B). - // const newUserB = getUserCredentials('case_2_b_new'); - // const caseOneNewB = await createRule(newUserB, { - // title: 'case_2_b_new_one', - // owner: 'cases_owner_one', - // }); - // - // // Create cases as user with new privileges (C). - // const newUserC = getUserCredentials('case_2_c_new'); - // const caseTwoNewC = await createRule(newUserC, { - // title: 'case_2_c_new_two', - // owner: 'cases_owner_two', - // }); - // + // Any new consumer that is not known to the deprecated feature shouldn't be available to the + // users with the deprecated privileges unless deprecated features are update to explicitly + // support new consumers. + for (const ruleToCheck of [ruleOneNewBConsumerB, ruleTwoNewCConsumerC]) { + expect(await getRule(deprecatedUser, ruleToCheck.id)).toBeUndefined(); + expect(await getRule(transformedUser, ruleToCheck.id)).toBeDefined(); + } - // User B and User C should be able to access cases created by themselves and users with - // deprecated and transformed privileges, but only for the specific owner. - // for (const caseToCheck of [ruleOneDeprecated, ruleOneTransformed, caseOneNewB]) { - // expect(await getRule(newUserB, caseToCheck.id)).toBeDefined(); - // expect(await getRule(newUserC, caseToCheck.id)).toBeUndefined(); - // } - // for (const caseToCheck of [ruleTwoDeprecated, ruleTwoTransformed, caseTwoNewC]) { - // expect(await getRule(newUserC, caseToCheck.id)).toBeDefined(); - // expect(await getRule(newUserB, caseToCheck.id)).toBeUndefined(); - // } + // User B and User C should be able to access rule types created by themselves and users with + // deprecated and transformed privileges, but only for the specific consumer. + for (const ruleToCheck of [ + ruleOneDeprecated, + ruleOneTransformed, + ruleOneNewBConsumerA, + ruleOneNewBConsumerB, + ]) { + expect(await getRule(newUserB, ruleToCheck.id)).toBeDefined(); + expect(await getRule(newUserC, ruleToCheck.id)).toBeUndefined(); + } + for (const ruleToCheck of [ + ruleTwoDeprecated, + ruleTwoTransformed, + ruleTwoNewCConsumerA, + ruleTwoNewCConsumerC, + ]) { + expect(await getRule(newUserC, ruleToCheck.id)).toBeDefined(); + expect(await getRule(newUserB, ruleToCheck.id)).toBeUndefined(); + } }); }); } diff --git a/x-pack/test/security_solution_api_integration/README.md b/x-pack/test/security_solution_api_integration/README.md index 8f5aafdf15f94..e2ffcb8ac79dc 100644 --- a/x-pack/test/security_solution_api_integration/README.md +++ b/x-pack/test/security_solution_api_integration/README.md @@ -3,42 +3,39 @@ This directory serves as a centralized location to place the security solution tests that run in Serverless and ESS environments. ## Subdirectories - -1. `config` stores base configurations specific to both the Serverless and ESS environments, These configurations build upon the base configuration provided by `xpack/test_serverless` and `x-pack-api_integrations`, incorporating additional settings such as environment variables and tagging options. - - -2. `test_suites` directory now houses all the tests along with their utility functions. As an initial step, -we have introduced the `detection_response` directory to consolidate all the integration tests related to detection and response APIs. - +- `config` stores base configurations specific to both the Serverless and ESS environments, These configurations build upon the base configuration provided by `xpack/test_serverless` and `x-pack-api_integrations`, incorporating additional settings such as environment variables and tagging options. +- `es_archive` and `es_archive_path_builder` directories contain the data that can be used by the tests +- `scripts` directory contains various scripts used to run the tests +- `test_suites` directory houses all the tests along with their utility functions. As an initial step, we have introduced the `detection_response` directory to consolidate all the integration tests related to detection and response APIs. ## Overview -- In this directory, Mocha tagging is utilized to assign tags to specific test suites and individual test cases. This tagging system enables the ability to selectively apply tags to test suites and test cases, facilitating the exclusion of specific test cases within a test suite as needed. - -- Test suites and cases are prefixed with specific tags to determine their execution in particular environments or to exclude them from specific environments. - -- We are using the following tags: - * `@ess`: Runs in an ESS environment (on-prem installation) as part of the CI validation on PRs. - - * `@serverless`: Runs in the first quality gate and in the periodic pipeline. +Test suites and cases are prefixed with specific tags to determine their execution in particular environments or to exclude them from specific environments: +* `@ess`: Runs in an ESS environment (on-prem installation) as part of the CI validation on PRs. - * `@serverlessQA`: Runs in the Kibana QA quality gate. +* `@serverless`: Runs in an simulated serverless environment as part of the CI validation on PRs and in the periodic pipeline. - * `@skipInEss`: Skipped for ESS environment. +* `@serverlessQA`: Runs in the Kibana QA quality gate. - * `@skipInServerless`: Skipped for all quality gates, CI and periodic pipeline. +* `@skipInEss`: Skipped for ESS environment. +* `@skipInServerless`: Skipped for all quality gates and periodic pipeline. +* `@skipInServerlessMKI`: Skipped from being executed in any MKI environment (periodic pipeline and Kibana QA quality gate), but executed as part of the first quality gate if the `@serverless` tag is present. - * `@skipInServerlessMKI`: Skipped for all the MKI environments. +For example: +```typescript +// tests in this suite will run in both Ess and Serverless on every PRs as well as on the first quality gate and the periodic pipeline +describe('@serverless @ess create_rules', () => { + describe('creating rules', () => { + it('my first test', async () => { ... }); + it('my second test', async () => { ... }); + }); -ex: -``` - describe('@serverless @ess create_rules', () => { ==> tests in this suite will run in both Ess and Serverless - describe('creating rules', () => {}); - - // This test is skipped due to flakiness in serverless environments: https://github.com/elastic/kibana/issues/497777 - describe('@skipInServerless missing timestamps', () => {}); ==> tests in this suite will be excluded in Serverless - - ``` + // tests in this suite will be excluded in Serverless on every PRs as well as on the first quality gate and the periodic pipeline + describe('@skipInServerless missing timestamps', () => { + it('another test', async () => { ... }); + }); +}); +``` # Adding new security area's tests @@ -53,7 +50,8 @@ The default project type configuration in Serverless is complete. If for the nee There are already configurations in the `./scripts/api_configs.json` which you can follow in order to add yours when it is needed. The currently supported configuration, allows **ONLY** the PLIs to be configured. Thus, experimental feature flags **are not yet supported** and the test should be skipped until further notice. -**NOTE**: If a target script living in `package.json` file, does not require any further configuration, then the entry in `./scripts/api_configs.json` file, **can be omitted!** +> **Note:** +>If a target script living in `package.json` file, does not require any further configuration, then the entry in `./scripts/api_configs.json` file, **can be omitted!** # Testing locally @@ -80,41 +78,39 @@ In this project, you can run various commands to execute tests and workflows, ea - Description: Runs the tests for the Detections Response area with the default license. - - 2. Executes particular sets of test suites linked to the designated environment and license: - - The command structure follows this pattern: - - - ``: The test folder or workflow you want to run. - - ``: The type of project to pick the relevant configurations, either "serverless" or "ess." - - "serverless" and "ess" help determine the configuration specific to the chosen test. - - ``: The testing environment, such as "serverlessEnv," "essEnv," or "qaEnv." - - When using "serverlessEnv,.." in the script, it appends the correct grep command for filtering tests in the serverless testing environment. - - "serverlessEnv,..." is used to customize the test execution based on the serverless environment. - - - Here are some command examples for "exceptions" which defined under the "detection_engine" area using the default license: - - 1. **Run the server for "exception_workflows" in the "serverlessEnv" environment:** - ```shell - npm run initialize-server:dr:default exceptions/workflows serverless - ``` - 2. **To run tests for the "exception_workflows" using the serverless runner in the "serverlessEnv" environment, you can use the following command:** - ```shell - npm run run-tests:dr:default exceptions/workflows serverless serverlessEnv - ``` - 3. **Run tests for "exception_workflows" using the serverless runner in the "qaEnv" environment:** - ```shell - npm run run-tests:dr:default exceptions/workflows serverless qaPeriodicEnv - ``` - 4. **Run the server for "exception_workflows" in the "essEnv" environment:** - ```shell - npm run initialize-server:dr:default exceptions/workflows ess - ``` - 5. **Run tests for "exception_workflows" using the ess runner in the "essEnv" environment:** - ```shell - npm run run-tests:dr:default exceptions/workflows ess essEnv - ``` +2. Executes particular sets of test suites linked to the designated environment and license: + + The command structure follows this pattern: + + - ``: The test folder or workflow you want to run. + - ``: The type of project to pick the relevant configurations, either "serverless" or "ess." + - "serverless" and "ess" help determine the configuration specific to the chosen test. + - ``: The testing environment, such as "serverlessEnv," "essEnv," or "qaEnv." + - When using "serverlessEnv,.." in the script, it appends the correct grep command for filtering tests in the serverless testing environment. + - "serverlessEnv,..." is used to customize the test execution based on the serverless environment. + + Here are some command examples for "exceptions" which defined under the "detection_engine" area using the default license: + +- Run the server for "exception_workflows" in the "serverlessEnv" environment: + ```shell + npm run initialize-server:dr:default exceptions/workflows serverless + ``` +- To run tests for the "exception_workflows" using the serverless runner in the "serverlessEnv" environment, you can use the following command: + ```shell + npm run run-tests:dr:default exceptions/workflows serverless serverlessEnv + ``` +- Run tests for "exception_workflows" using the serverless runner in the "qaEnv" environment: + ```shell + npm run run-tests:dr:default exceptions/workflows serverless qaPeriodicEnv + ``` +- Run the server for "exception_workflows" in the "essEnv" environment: + ```shell + npm run initialize-server:dr:default exceptions/workflows ess + ``` +- Run tests for "exception_workflows" using the ess runner in the "essEnv" environment: + ```shell + npm run run-tests:dr:default exceptions/workflows ess essEnv + ``` ## Testing with serverless roles @@ -126,28 +122,29 @@ All API calls using the returned instance will inject the required auth headers. **On ESS, `createSuperTest` returns a basic `supertest` instance without headers.* -```js +```typescript import TestAgent from 'supertest/lib/agent'; export default ({ getService }: FtrProviderContext) => { - const utils = getService('securitySolutionUtils'); + const utils = getService('securitySolutionUtils'); - describe('@ess @serverless my_test', () => { - let supertest: TestAgent; + describe('@ess @serverless my_test', () => { + let supertest: TestAgent; - before(async () => { - supertest = await utils.createSuperTest('admin'); - }); - ... + before(async () => { + supertest = await utils.createSuperTest('admin'); + }); + ... + }); +}); ``` If you need to use multiple roles in a single test, you can instantiate multiple `supertest` versions. -```js +```typescript before(async () => { adminSupertest = await utils.createSuperTest('admin'); viewerSupertest = await utils.createSuperTest('viewer'); }); -... ``` -The helper keeps track of only one active session per role. So, if you instantiate `supertest` twice for the same role, the first instance will have an invalid API key. +The helper keeps track of only one active session per role. So, if you instantiate `supertest` twice for the same role, the first instance will have an invalid API key. \ No newline at end of file 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 a0d2ee79a7b46..25b7a40c9701e 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 @@ -84,6 +84,7 @@ export function createTestConfig(options: CreateTestConfigOptions, testFiles?: s 'previewTelemetryUrlEnabled', 'riskScoringPersistence', 'riskScoringRoutesEnabled', + 'alertSuppressionForSequenceEqlRuleEnabled', ])}`, '--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/eql/trial_license_complete_tier/eql_alert_suppression.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/eql/trial_license_complete_tier/eql_alert_suppression.ts index 0c3069b3c3b62..71403ad7a3728 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/eql/trial_license_complete_tier/eql_alert_suppression.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/eql/trial_license_complete_tier/eql_alert_suppression.ts @@ -8,8 +8,12 @@ import expect from 'expect'; import { v4 as uuidv4 } from 'uuid'; import sortBy from 'lodash/sortBy'; +import partition from 'lodash/partition'; -import { EqlRuleCreateProps } from '@kbn/security-solution-plugin/common/api/detection_engine'; +import { + DetectionAlert, + EqlRuleCreateProps, +} from '@kbn/security-solution-plugin/common/api/detection_engine'; import { ALERT_SUPPRESSION_START, ALERT_SUPPRESSION_END, @@ -23,6 +27,8 @@ import { DETECTION_ENGINE_SIGNALS_STATUS_URL as DETECTION_ENGINE_ALERTS_STATUS_U import { getSuppressionMaxSignalsWarning as getSuppressionMaxAlertsWarning } from '@kbn/security-solution-plugin/server/lib/detection_engine/rule_types/utils/utils'; import { RuleExecutionStatusEnum } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_monitoring'; import { ALERT_ORIGINAL_TIME } from '@kbn/security-solution-plugin/common/field_maps/field_names'; +import { RiskEnrichmentFields } from '@kbn/security-solution-plugin/server/lib/detection_engine/rule_types/utils/enrichments/types'; +import { SearchHit } from '@elastic/elasticsearch/lib/api/types'; import { createRule, deleteAllRules, @@ -45,11 +51,13 @@ import { deleteAllExceptions } from '../../../../../lists_and_exception_lists/ut const getQuery = (id: string) => `any where id == "${id}"`; const getSequenceQuery = (id: string) => - `sequence by id [any where id == "${id}"] [any where id == "${id}"]`; + `sequence [any where id == "${id}"] [any where id == "${id}"]`; export default ({ getService }: FtrProviderContext) => { const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); + const esDeleteAllIndices = getService('esDeleteAllIndices'); + const es = getService('es'); const log = getService('log'); const { @@ -61,6 +69,10 @@ export default ({ getService }: FtrProviderContext) => { log, }); + const partitionSequenceBuildingBlocks = ( + alerts: Array> + ) => partition(alerts, (alert) => alert?._source?.['kibana.alert.group.index'] == null); + // NOTE: Add to second quality gate after feature is GA describe('@ess @serverless Alert Suppression for EQL rules', () => { before(async () => { @@ -69,10 +81,14 @@ export default ({ getService }: FtrProviderContext) => { after(async () => { await esArchiver.unload('x-pack/test/functional/es_archives/security_solution/ecs_compliant'); + await esDeleteAllIndices('.preview.alerts*'); }); afterEach(async () => { - await deleteAllAlerts(supertest, log, es); + await deleteAllAlerts(supertest, log, es, [ + '.preview.alerts-security.alerts-*', + '.alerts-security.alerts-*', + ]); await deleteAllRules(supertest, log); }); @@ -1778,40 +1794,1511 @@ export default ({ getService }: FtrProviderContext) => { }); }); - describe('sequence queries', () => { - it('logs a warning if suppression is configured', async () => { + describe('@skipInServerless sequence queries with suppression "per rule execution"', () => { + it('suppresses alerts in a given rule execution', async () => { const id = uuidv4(); - await indexGeneratedSourceDocuments({ - docsCount: 10, - seed: () => ({ id }), + const timestamp = '2020-10-28T06:50:00.000Z'; + const laterTimestamp = '2020-10-28T06:51:00.000Z'; + const laterTimestamp2 = '2020-10-28T06:53:00.000Z'; + const doc1 = { + id, + '@timestamp': timestamp, + host: { name: 'host-a' }, + }; + const doc1WithLaterTimestamp = { + ...doc1, + '@timestamp': laterTimestamp, + }; + + const doc2WithLaterTimestamp = { + ...doc1, + '@timestamp': laterTimestamp2, + }; + + // sequence alert 1 is made up of doc1 and doc1WithLaterTimestamp, + // sequence alert 2 is made up of doc1WithLaterTimestamp and doc2WithLaterTimestamp + // sequence alert 2 is suppressed because it shares the same + // host.name value as sequence alert 1 + + await indexListOfSourceDocuments([doc1, doc1WithLaterTimestamp, doc2WithLaterTimestamp]); + + const rule: EqlRuleCreateProps = { + ...getEqlRuleForAlertTesting(['ecs_compliant']), + query: getSequenceQuery(id), + alert_suppression: { + group_by: ['host.name'], + missing_fields_strategy: 'suppress', + }, + from: 'now-35m', + interval: '30m', + }; + + const { previewId } = await previewRule({ + supertest, + rule, + timeframeEnd: new Date('2020-10-28T07:00:00.000Z'), + invocationCount: 1, + }); + const previewAlerts = await getPreviewAlerts({ + es, + previewId, + sort: [ALERT_ORIGINAL_TIME], + }); + // we expect one created alert and one suppressed alert + // and two building block alerts, let's confirm that + expect(previewAlerts.length).toEqual(3); + const [sequenceAlert, buildingBlockAlerts] = partitionSequenceBuildingBlocks(previewAlerts); + expect(buildingBlockAlerts.length).toEqual(2); + expect(sequenceAlert.length).toEqual(1); + + expect(sequenceAlert[0]?._source).toEqual({ + ...sequenceAlert[0]?._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'host.name', + value: 'host-a', + }, + ], + [TIMESTAMP]: '2020-10-28T07:00:00.000Z', + [ALERT_LAST_DETECTED]: '2020-10-28T07:00:00.000Z', + [ALERT_SUPPRESSION_DOCS_COUNT]: 1, + }); + }); + + it('suppresses alerts when the rule is a building block type rule', async () => { + const id = uuidv4(); + const timestamp = '2020-10-28T06:50:00.000Z'; + const laterTimestamp = '2020-10-28T06:51:00.000Z'; + const laterTimestamp2 = '2020-10-28T06:53:00.000Z'; + const doc1 = { + id, + '@timestamp': timestamp, + host: { name: 'host-a' }, + }; + const doc1WithLaterTimestamp = { + ...doc1, + '@timestamp': laterTimestamp, + }; + + const doc2WithLaterTimestamp = { + ...doc1, + '@timestamp': laterTimestamp2, + }; + + // sequence alert 1 is made up of doc1 and doc1WithLaterTimestamp, + // sequence alert 2 is made up of doc1WithLaterTimestamp and doc2WithLaterTimestamp + // sequence alert 2 is suppressed because it shares the same + // host.name value as sequence alert 1 + + await indexListOfSourceDocuments([doc1, doc1WithLaterTimestamp, doc2WithLaterTimestamp]); + + const buildingBlockRuleType: EqlRuleCreateProps = { + ...getEqlRuleForAlertTesting(['ecs_compliant']), + building_block_type: 'default', + query: getSequenceQuery(id), + alert_suppression: { + group_by: ['host.name'], + missing_fields_strategy: 'suppress', + }, + from: 'now-35m', + interval: '30m', + }; + + const { previewId } = await previewRule({ + supertest, + rule: buildingBlockRuleType, + timeframeEnd: new Date('2020-10-28T07:00:00.000Z'), + invocationCount: 1, + }); + const previewAlerts = await getPreviewAlerts({ + es, + previewId, + sort: [ALERT_ORIGINAL_TIME], }); + // we expect one created alert and one suppressed alert + // and two building block alerts, let's confirm that + expect(previewAlerts.length).toEqual(3); + const [sequenceAlert, buildingBlockAlerts] = partition( + previewAlerts, + (alert) => alert?._source?.[ALERT_SUPPRESSION_DOCS_COUNT] != null + ); + expect(buildingBlockAlerts.length).toEqual(2); + expect(sequenceAlert.length).toEqual(1); + + expect(sequenceAlert[0]?._source).toEqual({ + ...sequenceAlert[0]?._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'host.name', + value: 'host-a', + }, + ], + [TIMESTAMP]: '2020-10-28T07:00:00.000Z', + [ALERT_LAST_DETECTED]: '2020-10-28T07:00:00.000Z', + [ALERT_SUPPRESSION_DOCS_COUNT]: 1, + }); + }); + + it('suppresses alerts in a given rule execution when a subsequent event for a sequence has the suppression field undefined', async () => { + const id = uuidv4(); + const timestamp = '2020-10-28T06:50:00.000Z'; + const laterTimestamp = '2020-10-28T06:51:00.000Z'; + const laterTimestamp2 = '2020-10-28T06:53:00.000Z'; + const doc1 = { + id, + '@timestamp': timestamp, + host: { name: 'host-a' }, + }; + const doc1WithLaterTimestamp = { + ...doc1, + '@timestamp': laterTimestamp, + }; + + const doc2WithNoHost = { + ...doc1, + '@timestamp': laterTimestamp2, + host: undefined, + }; + + // sequence alert 1 will be doc1 and doc1WithLaterTimestamp + // sequence alert 2 will be doc1WithLaterTimestamp and doc2WithNoHost + // the second sequence alert will have null as the value for + // suppression field host.name because of logic defined in the + // objectPairIntersection function defined in + // x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/build_alert_group_from_sequence.ts + + await indexListOfSourceDocuments([ + doc1, + doc1WithLaterTimestamp, + doc2WithNoHost, + { ...doc2WithNoHost, '@timestamp': '2020-10-28T06:53:01.000Z' }, + ]); const rule: EqlRuleCreateProps = { ...getEqlRuleForAlertTesting(['ecs_compliant']), query: getSequenceQuery(id), alert_suppression: { - group_by: ['agent.name'], - duration: { - value: 300, - unit: 'm', + group_by: ['host.name'], + missing_fields_strategy: 'suppress', + }, + from: 'now-35m', + interval: '30m', + }; + + const { previewId } = await previewRule({ + supertest, + rule, + timeframeEnd: new Date('2020-10-28T07:00:00.000Z'), + invocationCount: 1, + }); + const previewAlerts = await getPreviewAlerts({ + es, + previewId, + sort: [ALERT_ORIGINAL_TIME], + }); + // we expect two sequence alerts + // each sequence alert having two building block alerts + expect(previewAlerts.length).toEqual(6); + const [sequenceAlerts, buildingBlockAlerts] = + partitionSequenceBuildingBlocks(previewAlerts); + expect(buildingBlockAlerts.length).toEqual(4); + expect(sequenceAlerts.length).toEqual(2); + + expect(sequenceAlerts[0]?._source).toEqual({ + ...sequenceAlerts[0]?._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'host.name', + value: 'host-a', + }, + ], + [TIMESTAMP]: '2020-10-28T07:00:00.000Z', + [ALERT_LAST_DETECTED]: '2020-10-28T07:00:00.000Z', + [ALERT_SUPPRESSION_DOCS_COUNT]: 0, + }); + expect(sequenceAlerts[1]?._source).toEqual({ + ...sequenceAlerts[1]?._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'host.name', + value: null, + }, + ], + [TIMESTAMP]: '2020-10-28T07:00:00.000Z', + [ALERT_LAST_DETECTED]: '2020-10-28T07:00:00.000Z', + [ALERT_SUPPRESSION_DOCS_COUNT]: 1, + }); + }); + + it('does not suppress alerts in a given rule execution when doNotSuppress is set and more than one sequence has the suppression field undefined', async () => { + const id = uuidv4(); + const timestamp = '2020-10-28T06:50:00.000Z'; + const laterTimestamp = '2020-10-28T06:51:00.000Z'; + const laterTimestamp2 = '2020-10-28T06:53:00.000Z'; + const laterTimestamp3 = '2020-10-28T06:53:01.000Z'; + + const doc1 = { + id, + '@timestamp': timestamp, + host: { name: 'host-a' }, + }; + const doc1WithLaterTimestamp = { + ...doc1, + '@timestamp': laterTimestamp, + }; + + const doc2WithNoHost = { + ...doc1, + '@timestamp': laterTimestamp2, + host: undefined, + }; + + const doc3WithNoHost = { + ...doc1, + '@timestamp': laterTimestamp3, + host: undefined, + }; + + // this should generate three sequence alerts + // sequence alert 1 will be doc1 and doc1WithLaterTimestamp + // sequence alert 2 will be doc1WithLaterTimestamp and doc2WithNoHost + // sequence alert 3 will be doc2WithNoHost and doc3WithNoHost + // This logic is defined in objectPairIntersection + // x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/build_alert_group_from_sequence.ts + // Any sequence comprised of events where one field contains a value, followed by any number of + // events in the sequence where the value is null or undefined will have that field + // stripped from the sequence alert. So given that, we expect three alerts here + // The sequence comprised of [doc1, doc1WithLaterTimestamp] will have + // host.name and 'host-a' as the suppression values + // the other two sequence alerts comprised of [doc1WithLaterTimestamp, doc2WithNoHost] + // and [doc2WithNoHost, doc3WithNoHost] will have no suppression values set because + // of the logic outlined above + await indexListOfSourceDocuments([ + doc1, + doc1WithLaterTimestamp, + doc2WithNoHost, + doc3WithNoHost, + ]); + + const rule: EqlRuleCreateProps = { + ...getEqlRuleForAlertTesting(['ecs_compliant']), + query: getSequenceQuery(id), + alert_suppression: { + group_by: ['host.name'], + missing_fields_strategy: 'doNotSuppress', + }, + from: 'now-35m', + interval: '30m', + }; + + const { previewId } = await previewRule({ + supertest, + rule, + timeframeEnd: new Date('2020-10-28T07:00:00.000Z'), + invocationCount: 1, + }); + const previewAlerts = await getPreviewAlerts({ + es, + previewId, + sort: [TIMESTAMP], + }); + // we expect one alert and one suppressed alert + // and two building block alerts per shell alert, let's confirm that + const [sequenceAlerts, buildingBlockAlerts] = + partitionSequenceBuildingBlocks(previewAlerts); + expect(buildingBlockAlerts.length).toEqual(6); + expect(sequenceAlerts.length).toEqual(3); + const [suppressedSequenceAlerts] = partition( + sequenceAlerts, + (alert) => (alert?._source?.['kibana.alert.suppression.docs_count'] as number) >= 0 + ); + expect(suppressedSequenceAlerts.length).toEqual(1); + + expect(suppressedSequenceAlerts[0]._source).toEqual({ + ...suppressedSequenceAlerts[0]._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'host.name', + value: 'host-a', }, + ], + [TIMESTAMP]: '2020-10-28T07:00:00.000Z', + [ALERT_SUPPRESSION_DOCS_COUNT]: 0, + }); + }); + + it('does not suppress alerts when suppression field value is undefined for a sequence alert in a given rule execution', async () => { + const id = uuidv4(); + const timestamp = '2020-10-28T06:50:00.000Z'; + const laterTimestamp = '2020-10-28T06:51:00.000Z'; + const laterTimestamp2 = '2020-10-28T06:53:00.000Z'; + const doc1 = { + id, + '@timestamp': timestamp, + host: { name: 'host-a' }, + }; + const doc1WithNoHost = { + ...doc1, + '@timestamp': laterTimestamp, + host: undefined, + }; + + const doc2WithNoHost = { + ...doc1, + '@timestamp': laterTimestamp2, + host: undefined, + }; + + await indexListOfSourceDocuments([doc1, doc1WithNoHost, doc2WithNoHost]); + + const rule: EqlRuleCreateProps = { + ...getEqlRuleForAlertTesting(['ecs_compliant']), + query: getSequenceQuery(id), + alert_suppression: { + group_by: ['host.name'], + missing_fields_strategy: 'doNotSuppress', + }, + from: 'now-35m', + interval: '30m', + }; + + const { previewId } = await previewRule({ + supertest, + rule, + timeframeEnd: new Date('2020-10-28T07:00:00.000Z'), + invocationCount: 1, + }); + const previewAlerts = await getPreviewAlerts({ + es, + previewId, + sort: [ALERT_SUPPRESSION_START], // sorting on null fields was preventing the alerts from yielding + }); + // we expect one alert and two suppressed alerts + // and two building block alerts, let's confirm that + expect(previewAlerts.length).toEqual(6); + const [sequenceAlert, buildingBlockAlerts] = partitionSequenceBuildingBlocks(previewAlerts); + const [suppressedSequenceAlerts] = partition( + sequenceAlert, + (alert) => (alert?._source?.['kibana.alert.suppression.docs_count'] as number) >= 0 + ); + expect(buildingBlockAlerts.length).toEqual(4); + expect(sequenceAlert.length).toEqual(2); + expect(suppressedSequenceAlerts.length).toEqual(0); + expect(sequenceAlert[0]?._source).toEqual({ + ...sequenceAlert[0]?._source, + [ALERT_SUPPRESSION_TERMS]: undefined, + [TIMESTAMP]: '2020-10-28T07:00:00.000Z', + [ALERT_SUPPRESSION_DOCS_COUNT]: undefined, + }); + }); + + it('suppresses alerts when suppression field value is undefined for a sequence alert in a given rule execution', async () => { + const id = uuidv4(); + const timestamp = '2020-10-28T06:50:00.000Z'; + const laterTimestamp = '2020-10-28T06:51:00.000Z'; + const laterTimestamp2 = '2020-10-28T06:53:00.000Z'; + const laterTimestamp3 = '2020-10-28T06:53:01.000Z'; + + const doc1 = { + id, + '@timestamp': timestamp, + host: { name: 'host-a' }, + }; + const doc1WithNoHost = { + ...doc1, + '@timestamp': laterTimestamp, + host: undefined, + }; + + const doc2WithNoHost = { + ...doc1, + '@timestamp': laterTimestamp2, + host: undefined, + }; + + const doc3WithNoHost = { + ...doc1, + '@timestamp': laterTimestamp3, + host: undefined, + }; + + await indexListOfSourceDocuments([doc1, doc1WithNoHost, doc2WithNoHost, doc3WithNoHost]); + + const rule: EqlRuleCreateProps = { + ...getEqlRuleForAlertTesting(['ecs_compliant']), + query: getSequenceQuery(id), + alert_suppression: { + group_by: ['host.name'], missing_fields_strategy: 'suppress', }, from: 'now-35m', interval: '30m', }; - const { logs } = await previewRule({ + const { previewId } = await previewRule({ supertest, rule, + timeframeEnd: new Date('2020-10-28T07:00:00.000Z'), invocationCount: 1, }); + const previewAlerts = await getPreviewAlerts({ + es, + previewId, + sort: [ALERT_ORIGINAL_TIME], + }); + // we expect one alert and two suppressed alerts + // and two building block alerts, let's confirm that + expect(previewAlerts.length).toEqual(3); + const [sequenceAlert, buildingBlockAlerts] = partitionSequenceBuildingBlocks(previewAlerts); + const [suppressedSequenceAlerts] = partition( + sequenceAlert, + (alert) => (alert?._source?.['kibana.alert.suppression.docs_count'] as number) >= 0 + ); + expect(suppressedSequenceAlerts.length).toEqual(1); + expect(buildingBlockAlerts.length).toEqual(2); + expect(sequenceAlert.length).toEqual(1); + + expect(sequenceAlert[0]?._source).toEqual({ + ...sequenceAlert[0]?._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'host.name', + value: null, + }, + ], + [TIMESTAMP]: '2020-10-28T07:00:00.000Z', + [ALERT_LAST_DETECTED]: '2020-10-28T07:00:00.000Z', + [ALERT_SUPPRESSION_DOCS_COUNT]: 2, + }); + }); + + it('does not suppress alerts when "doNotSuppress" is set and suppression field value is undefined for a sequence alert in a given rule execution', async () => { + // This logic should be understood within the confines of the + // objectPairIntersection function defined in + // x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/eql/build_alert_group_from_sequence.ts + // Any sequence comprised of events where one field contains a value, followed by any number of + // events in the sequence where the value is null or undefined will have that field + // stripped from the sequence alert. So given that, we expect three alerts here + // all with the suppression value as undefined + const id = uuidv4(); + const timestamp = '2020-10-28T06:50:00.000Z'; + const laterTimestamp = '2020-10-28T06:51:00.000Z'; + const laterTimestamp2 = '2020-10-28T06:53:00.000Z'; + const laterTimestamp3 = '2020-10-28T06:53:01.000Z'; + + const doc1 = { + id, + '@timestamp': timestamp, + host: { name: 'host-a' }, + }; + const doc1WithNoHost = { + ...doc1, + '@timestamp': laterTimestamp, + host: { name: undefined }, + }; + + const doc2WithNoHost = { + ...doc1, + '@timestamp': laterTimestamp2, + host: { name: undefined }, + }; + + const doc3WithNoHost = { + ...doc1, + '@timestamp': laterTimestamp3, + host: { name: undefined }, + }; + + await indexListOfSourceDocuments([doc1, doc1WithNoHost, doc2WithNoHost, doc3WithNoHost]); + + const rule: EqlRuleCreateProps = { + ...getEqlRuleForAlertTesting(['ecs_compliant']), + query: getSequenceQuery(id), + alert_suppression: { + group_by: ['host.name'], + missing_fields_strategy: 'doNotSuppress', + }, + from: 'now-35m', + interval: '30m', + }; - const [{ warnings }] = logs; + const { previewId } = await previewRule({ + supertest, + rule, + timeframeEnd: new Date('2020-10-28T07:00:00.000Z'), + invocationCount: 1, + }); + const previewAlerts = await getPreviewAlerts({ + es, + previewId, + sort: [ALERT_ORIGINAL_TIME], + }); - expect(warnings).toContain( - 'Suppression is not supported for EQL sequence queries. The rule will proceed without suppression.' + expect(previewAlerts.length).toEqual(9); + const [sequenceAlert, buildingBlockAlerts] = partitionSequenceBuildingBlocks(previewAlerts); + const [suppressedSequenceAlerts] = partition( + sequenceAlert, + (alert) => (alert?._source?.['kibana.alert.suppression.docs_count'] as number) >= 0 ); + // no alerts should be suppressed because doNotSuppress is set + expect(suppressedSequenceAlerts.length).toEqual(0); + expect(buildingBlockAlerts.length).toEqual(6); + // 3 sequence alerts comprised of + // (doc1 + doc1WithNoHost), (doc1WithNoHost + doc2WithNoHost), (doc2WithNoHost + doc3WithNoHost) + expect(sequenceAlert.length).toEqual(3); + + expect(sequenceAlert[0]?._source).toEqual({ + ...sequenceAlert[0]?._source, + [ALERT_SUPPRESSION_TERMS]: undefined, + [ALERT_SUPPRESSION_DOCS_COUNT]: undefined, + }); + }); + + it('does not suppress alerts outside of the current rule execution search range', async () => { + const id = uuidv4(); + const timestamp = '2020-10-28T06:05:00.000Z'; // this should not count towards events + const laterTimestamp = '2020-10-28T06:50:00.000Z'; + const laterTimestamp2 = '2020-10-28T06:51:00.000Z'; + const laterTimestamp3 = '2020-10-28T06:53:00.000Z'; + const doc1 = { + id, + '@timestamp': timestamp, + host: { name: 'host-a' }, + }; + const doc1WithLaterTimestamp = { + ...doc1, + '@timestamp': laterTimestamp, + }; + const doc2WithLaterTimestamp = { ...doc1WithLaterTimestamp, '@timestamp': laterTimestamp2 }; + const doc3WithLaterTimestamp = { ...doc2WithLaterTimestamp, '@timestamp': laterTimestamp3 }; + + await indexListOfSourceDocuments([ + doc1, + doc1WithLaterTimestamp, + doc2WithLaterTimestamp, + doc3WithLaterTimestamp, + ]); + + const rule: EqlRuleCreateProps = { + ...getEqlRuleForAlertTesting(['ecs_compliant']), + query: getSequenceQuery(id), + alert_suppression: { + group_by: ['host.name'], + missing_fields_strategy: 'suppress', + }, + from: 'now-35m', + interval: '30m', + }; + + const { previewId } = await previewRule({ + supertest, + rule, + timeframeEnd: new Date('2020-10-28T07:00:00.000Z'), + invocationCount: 1, + }); + const previewAlerts = await getPreviewAlerts({ + es, + previewId, + sort: [ALERT_ORIGINAL_TIME], + }); + // we expect one alert and two suppressed alerts + // and two building block alerts, let's confirm that + expect(previewAlerts.length).toEqual(3); + const [sequenceAlert, buildingBlockAlerts] = partitionSequenceBuildingBlocks(previewAlerts); + expect(buildingBlockAlerts.length).toEqual(2); + expect(sequenceAlert.length).toEqual(1); + + expect(sequenceAlert[0]?._source).toEqual({ + ...sequenceAlert[0]?._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'host.name', + value: 'host-a', + }, + ], + [TIMESTAMP]: '2020-10-28T07:00:00.000Z', + [ALERT_LAST_DETECTED]: '2020-10-28T07:00:00.000Z', + [ALERT_SUPPRESSION_DOCS_COUNT]: 1, + }); + }); + + it('suppresses sequence alert with suppression value of "null" when all events have unique values for suppression field', async () => { + /* + Sequence alerts only contain values which make up the intersection of + a given field in all events for that sequence. + + So for a sequence alert where the two events contain host name values of + host-a and host-b, the sequence alert will have 'null' for that value and will + suppress on null values if missing_fields_strategy is set to 'suppress' + */ + const id = uuidv4(); + const timestamp = '2020-10-28T06:50:00.000Z'; + const laterTimestamp = '2020-10-28T06:50:01.000Z'; + const laterTimestamp2 = '2020-10-28T06:51:00.000Z'; + const laterTimestamp3 = '2020-10-28T06:53:00.000Z'; + const doc1 = { + id, + '@timestamp': timestamp, + host: { name: 'host-a' }, + }; + const doc1WithLaterTimestamp = { + ...doc1, + '@timestamp': laterTimestamp, + host: { name: 'host-b' }, + }; + const doc2WithLaterTimestamp = { + ...doc1WithLaterTimestamp, + '@timestamp': laterTimestamp2, + host: { name: 'host-c' }, + }; + const doc3WithLaterTimestamp = { + ...doc2WithLaterTimestamp, + '@timestamp': laterTimestamp3, + host: { name: 'host-d' }, + }; + await indexListOfSourceDocuments([ + doc1, + doc1WithLaterTimestamp, + doc2WithLaterTimestamp, + doc3WithLaterTimestamp, + ]); + + const rule: EqlRuleCreateProps = { + ...getEqlRuleForAlertTesting(['ecs_compliant']), + query: getSequenceQuery(id), + alert_suppression: { + group_by: ['host.name'], + missing_fields_strategy: 'suppress', + }, + from: 'now-35m', + interval: '30m', + }; + + const { previewId } = await previewRule({ + supertest, + rule, + timeframeEnd: new Date('2020-10-28T07:00:00.000Z'), + invocationCount: 1, + }); + const previewAlerts = await getPreviewAlerts({ + es, + previewId, + sort: [ALERT_ORIGINAL_TIME], + }); + // we expect one alert and two suppressed alerts + // and two building block alerts, let's confirm that + expect(previewAlerts.length).toEqual(3); + const [sequenceAlert, buildingBlockAlerts] = partitionSequenceBuildingBlocks(previewAlerts); + expect(buildingBlockAlerts.length).toEqual(2); + expect(sequenceAlert.length).toEqual(1); + + expect(sequenceAlert[0]._source).toEqual({ + ...sequenceAlert[0]._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'host.name', + value: null, + }, + ], + [TIMESTAMP]: '2020-10-28T07:00:00.000Z', + [ALERT_LAST_DETECTED]: '2020-10-28T07:00:00.000Z', + [ALERT_SUPPRESSION_DOCS_COUNT]: 2, + }); + }); + + it('suppresses alerts on a field with array values', async () => { + const id = uuidv4(); + + const timestamp = '2020-10-28T06:45:00.000Z'; + const timestamp2 = '2020-10-28T06:46:00.000Z'; + const timestamp3 = '2020-10-28T06:47:00.000Z'; + + const doc1 = { + id, + '@timestamp': timestamp, + host: { name: ['host-a', 'host-b'] }, + }; + + await indexListOfSourceDocuments([ + doc1, + { ...doc1, '@timestamp': timestamp2 }, + { ...doc1, '@timestamp': timestamp3 }, + ]); + const rule: EqlRuleCreateProps = { + ...getEqlRuleForAlertTesting(['ecs_compliant']), + query: getSequenceQuery(id), + alert_suppression: { + group_by: ['host.name'], + missing_fields_strategy: 'suppress', + }, + from: 'now-35m', + interval: '30m', + }; + + const { previewId } = await previewRule({ + supertest, + rule, + timeframeEnd: new Date('2020-10-28T07:00:00.000Z'), + invocationCount: 1, + }); + const previewAlerts = await getPreviewAlerts({ + es, + previewId, + sort: [ALERT_ORIGINAL_TIME], + }); + const [sequenceAlert] = partitionSequenceBuildingBlocks(previewAlerts); + expect(previewAlerts.length).toEqual(3); // one sequence, two building block + expect(sequenceAlert[0]._source).toEqual({ + ...sequenceAlert[0]._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'host.name', + value: ['host-a', 'host-b'], + }, + ], + [TIMESTAMP]: '2020-10-28T07:00:00.000Z', + [ALERT_LAST_DETECTED]: '2020-10-28T07:00:00.000Z', + [ALERT_SUPPRESSION_DOCS_COUNT]: 1, + }); + }); + + it('suppresses alerts with missing fields and multiple suppress by fields', async () => { + const id = uuidv4(); + const timestamp = '2020-10-28T06:45:00.000Z'; + const timestamp2 = '2020-10-28T06:45:01.000Z'; + const timestamp3 = '2020-10-28T06:45:02.000Z'; + const timestamp4 = '2020-10-28T06:45:03.000Z'; + const timestamp5 = '2020-10-28T06:45:04.000Z'; + const timestamp6 = '2020-10-28T06:45:05.000Z'; + const timestamp7 = '2020-10-28T06:45:06.000Z'; + const timestamp8 = '2020-10-28T06:45:07.000Z'; + const timestamp9 = '2020-10-28T06:45:08.000Z'; + const timestamp10 = '2020-10-28T06:45:09.000Z'; + const timestamp11 = '2020-10-28T06:45:10.000Z'; + const timestamp12 = '2020-10-28T06:45:11.000Z'; + + const noMissingFieldsDoc = { + id, + '@timestamp': timestamp, + host: { name: 'host-a' }, + agent: { name: 'agent-a', version: 10 }, + }; + + const missingNameFieldsDoc = { + ...noMissingFieldsDoc, + agent: { version: 10 }, + }; + + const missingVersionFieldsDoc = { + ...noMissingFieldsDoc, + agent: { name: 'agent-a' }, + }; + + const missingAgentFieldsDoc = { + ...noMissingFieldsDoc, + agent: undefined, + }; + + // 4 alerts should be suppressed: 1 for each pair of documents + await indexListOfSourceDocuments([ + noMissingFieldsDoc, + { ...noMissingFieldsDoc, '@timestamp': timestamp2 }, + { ...noMissingFieldsDoc, '@timestamp': timestamp3 }, + + { ...missingNameFieldsDoc, '@timestamp': timestamp4 }, + { ...missingNameFieldsDoc, '@timestamp': timestamp5 }, + { ...missingNameFieldsDoc, '@timestamp': timestamp6 }, + + { ...missingVersionFieldsDoc, '@timestamp': timestamp7 }, + { ...missingVersionFieldsDoc, '@timestamp': timestamp8 }, + { ...missingVersionFieldsDoc, '@timestamp': timestamp9 }, + + { ...missingAgentFieldsDoc, '@timestamp': timestamp10 }, + { ...missingAgentFieldsDoc, '@timestamp': timestamp11 }, + { ...missingAgentFieldsDoc, '@timestamp': timestamp12 }, + ]); + + const rule: EqlRuleCreateProps = { + ...getEqlRuleForAlertTesting(['ecs_compliant']), + query: getSequenceQuery(id), + alert_suppression: { + group_by: ['agent.name', 'agent.version'], + missing_fields_strategy: 'suppress', + }, + from: 'now-35m', + interval: '30m', + }; + + const { previewId } = await previewRule({ + supertest, + rule, + timeframeEnd: new Date('2020-10-28T07:00:00.000Z'), + invocationCount: 1, + }); + const previewAlerts = await getPreviewAlerts({ + es, + previewId, + size: 100, + sort: [ALERT_SUPPRESSION_START], // sorting on null fields was preventing the alerts from yielding + }); + const [sequenceAlert] = partitionSequenceBuildingBlocks(previewAlerts); + + // for sequence alerts if neither of the fields are there, we cannot suppress + expect(sequenceAlert.length).toEqual(4); + expect(sequenceAlert[0]._source).toEqual({ + ...sequenceAlert[0]._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'agent.name', + value: 'agent-a', + }, + { + field: 'agent.version', + value: 10, + }, + ], + [ALERT_SUPPRESSION_DOCS_COUNT]: 1, + }); + + expect(sequenceAlert[1]._source).toEqual({ + ...sequenceAlert[1]._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'agent.name', + value: null, + }, + { + field: 'agent.version', + value: 10, + }, + ], + [ALERT_SUPPRESSION_DOCS_COUNT]: 2, + }); + + expect(sequenceAlert[2]._source).toEqual({ + ...sequenceAlert[2]._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'agent.name', + value: null, + }, + { + field: 'agent.version', + value: null, + }, + ], + [ALERT_SUPPRESSION_DOCS_COUNT]: 3, + }); + + expect(sequenceAlert[3]._source).toEqual({ + ...sequenceAlert[3]._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'agent.name', + value: 'agent-a', + }, + { + field: 'agent.version', + value: null, + }, + ], + [ALERT_SUPPRESSION_DOCS_COUNT]: 1, + }); + }); + + it('does not suppress alerts when "doNotSuppress" is set and we have alerts with missing fields and multiple suppress by fields', async () => { + const id = uuidv4(); + const timestamp = '2020-10-28T06:45:00.000Z'; + const timestamp2 = '2020-10-28T06:45:01.000Z'; + const timestamp3 = '2020-10-28T06:45:02.000Z'; + const timestamp4 = '2020-10-28T06:45:03.000Z'; + const timestamp5 = '2020-10-28T06:45:04.000Z'; + const timestamp6 = '2020-10-28T06:45:05.000Z'; + const timestamp7 = '2020-10-28T06:45:06.000Z'; + const timestamp8 = '2020-10-28T06:45:07.000Z'; + const timestamp9 = '2020-10-28T06:45:08.000Z'; + const timestamp10 = '2020-10-28T06:45:09.000Z'; + const timestamp11 = '2020-10-28T06:45:10.000Z'; + const timestamp12 = '2020-10-28T06:45:11.000Z'; + + const noMissingFieldsDoc = { + id, + '@timestamp': timestamp, + host: { name: 'host-a' }, + agent: { name: 'agent-a', version: 10 }, + }; + + const missingNameFieldsDoc = { + ...noMissingFieldsDoc, + agent: { version: 10 }, + }; + + const missingVersionFieldsDoc = { + ...noMissingFieldsDoc, + agent: { name: 'agent-a' }, + }; + + const missingAgentFieldsDoc = { + ...noMissingFieldsDoc, + agent: undefined, + }; + + // 4 alerts should be suppressed: 1 for each pair of documents + await indexListOfSourceDocuments([ + noMissingFieldsDoc, + { ...noMissingFieldsDoc, '@timestamp': timestamp2 }, + { ...noMissingFieldsDoc, '@timestamp': timestamp3 }, + + { ...missingNameFieldsDoc, '@timestamp': timestamp4 }, + { ...missingNameFieldsDoc, '@timestamp': timestamp5 }, + { ...missingNameFieldsDoc, '@timestamp': timestamp6 }, + + { ...missingVersionFieldsDoc, '@timestamp': timestamp7 }, + { ...missingVersionFieldsDoc, '@timestamp': timestamp8 }, + { ...missingVersionFieldsDoc, '@timestamp': timestamp9 }, + + { ...missingAgentFieldsDoc, '@timestamp': timestamp10 }, + { ...missingAgentFieldsDoc, '@timestamp': timestamp11 }, + { ...missingAgentFieldsDoc, '@timestamp': timestamp12 }, + ]); + + const rule: EqlRuleCreateProps = { + ...getEqlRuleForAlertTesting(['ecs_compliant']), + query: getSequenceQuery(id), + alert_suppression: { + group_by: ['agent.name', 'agent.version'], + missing_fields_strategy: 'doNotSuppress', + }, + from: 'now-35m', + interval: '30m', + }; + + const { previewId } = await previewRule({ + supertest, + rule, + timeframeEnd: new Date('2020-10-28T07:00:00.000Z'), + invocationCount: 1, + }); + const previewAlerts = await getPreviewAlerts({ + es, + previewId, + size: 100, + }); + const [sequenceAlert] = partitionSequenceBuildingBlocks(previewAlerts); + + // for sequence alerts if neither of the fields are there, we cannot suppress + const [suppressedSequenceAlerts] = partition( + sequenceAlert, + (alert) => (alert?._source?.['kibana.alert.suppression.docs_count'] as number) >= 0 + ); + expect(suppressedSequenceAlerts.length).toEqual(1); + expect(suppressedSequenceAlerts[0]._source).toEqual({ + ...suppressedSequenceAlerts[0]._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'agent.name', + value: 'agent-a', + }, + { + field: 'agent.version', + value: 10, + }, + ], + [ALERT_SUPPRESSION_DOCS_COUNT]: 1, + }); + }); + + it('deduplicates multiple alerts while suppressing on rule interval only', async () => { + const id = uuidv4(); + const firstTimestamp = '2020-10-28T05:45:00.000Z'; + const secondTimestamp = '2020-10-28T06:10:00.000Z'; + const secondTimestamp2 = '2020-10-28T06:10:01.000Z'; + const secondTimestamp3 = '2020-10-28T06:10:02.000Z'; + const secondTimestamp4 = '2020-10-28T06:10:03.000Z'; + const secondTimestamp5 = '2020-10-28T06:10:04.000Z'; + const secondTimestamp6 = '2020-10-28T06:10:05.000Z'; + + const doc1 = { + id, + '@timestamp': firstTimestamp, + host: { name: 'host-a' }, + }; + + // 4 alert should be suppressed + await indexListOfSourceDocuments([ + doc1, + { ...doc1, '@timestamp': secondTimestamp }, + { ...doc1, '@timestamp': secondTimestamp2 }, + { ...doc1, '@timestamp': secondTimestamp3 }, + { ...doc1, '@timestamp': secondTimestamp4 }, + { ...doc1, '@timestamp': secondTimestamp5 }, + { ...doc1, '@timestamp': secondTimestamp6 }, + ]); + + const rule: EqlRuleCreateProps = { + ...getEqlRuleForAlertTesting(['ecs_compliant']), + query: getSequenceQuery(id), + alert_suppression: { + group_by: ['host.name'], + missing_fields_strategy: 'suppress', + }, + // large look-back time covers all docs + from: 'now-50m', + interval: '30m', + }; + + const { previewId } = await previewRule({ + supertest, + rule, + timeframeEnd: new Date('2020-10-28T06:30:00.000Z'), + invocationCount: 2, // 2 invocations so we can see that the same sequences are not generated / suppressed again. + }); + const previewAlerts = await getPreviewAlerts({ + es, + previewId, + sort: ['host.name', ALERT_ORIGINAL_TIME], + }); + const [sequenceAlert, buildingBlockAlerts] = partitionSequenceBuildingBlocks(previewAlerts); + + expect(buildingBlockAlerts.length).toEqual(2); + expect(sequenceAlert.length).toEqual(1); + expect(sequenceAlert[0]._source).toEqual({ + ...sequenceAlert[0]._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'host.name', + value: 'host-a', + }, + ], + [ALERT_SUPPRESSION_DOCS_COUNT]: 5, // if deduplication failed this would 12, or the previewAlerts count would be double + }); + }); + }); + + // FLAKY: https://github.com/elastic/kibana/issues/202940 + // FLAKY: https://github.com/elastic/kibana/issues/202945 + describe.skip('@skipInServerless sequence queries with suppression duration', () => { + it('suppresses alerts across two rule executions when the suppression duration exceeds the rule interval', async () => { + const id = uuidv4(); + const firstTimestamp = new Date(Date.now() - 1000).toISOString(); + const firstTimestamp2 = new Date().toISOString(); + + const firstDocument = { + id, + '@timestamp': firstTimestamp, + host: { + name: 'host-a', + }, + }; + await indexListOfSourceDocuments([ + firstDocument, + { ...firstDocument, '@timestamp': firstTimestamp2 }, + ]); + + const rule: EqlRuleCreateProps = { + ...getEqlRuleForAlertTesting(['ecs_compliant']), + query: getSequenceQuery(id), + alert_suppression: { + group_by: ['host.name'], + duration: { + value: 300, + unit: 'm', + }, + missing_fields_strategy: 'suppress', + }, + from: 'now-35m', + interval: '30m', + }; + const createdRule = await createRule(supertest, log, rule); + const alerts = await getOpenAlerts(supertest, log, es, createdRule); + + expect(alerts.hits.hits.length).toEqual(3); + const [sequenceAlert, buildingBlockAlerts] = partitionSequenceBuildingBlocks( + alerts.hits.hits + ); + expect(buildingBlockAlerts.length).toEqual(2); + expect(sequenceAlert.length).toEqual(1); + + // suppression start equal to alert timestamp + const suppressionStart = sequenceAlert[0]._source?.[TIMESTAMP]; + + expect(sequenceAlert[0]._source).toEqual( + expect.objectContaining({ + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'host.name', + value: 'host-a', + }, + ], + // suppression boundaries equal to original event time, since no alert been suppressed + [ALERT_SUPPRESSION_START]: suppressionStart, + [ALERT_SUPPRESSION_END]: suppressionStart, + [ALERT_SUPPRESSION_DOCS_COUNT]: 0, + }) + ); + + // index an event that happened 1 second before the next event in the sequence + const secondTimestamp = new Date(Date.now() - 1000).toISOString(); + const secondDocument = { + id, + '@timestamp': secondTimestamp, + host: { + name: 'host-a', + }, + }; + + // Add a new document, then disable and re-enable to trigger another rule run. The second doc should + // trigger an update to the existing alert without changing the timestamp + await indexListOfSourceDocuments([secondDocument]); + await patchRule(supertest, log, { id: createdRule.id, enabled: false }); + await patchRule(supertest, log, { id: createdRule.id, enabled: true }); + const afterTimestamp = new Date(); + const secondAlerts = await getOpenAlerts( + supertest, + log, + es, + createdRule, + RuleExecutionStatusEnum.succeeded, + undefined, + afterTimestamp + ); + + const [sequenceAlert2] = partitionSequenceBuildingBlocks(secondAlerts.hits.hits); + + expect(sequenceAlert2.length).toEqual(1); + expect(sequenceAlert2[0]._source).toEqual({ + ...sequenceAlert2[0]?._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'host.name', + value: 'host-a', + }, + ], + [ALERT_SUPPRESSION_DOCS_COUNT]: 1, // 1 alert from second rule run, that's why 1 suppressed + }); + // suppression end value should be greater than second document timestamp, but lesser than current time + const suppressionEnd = new Date( + sequenceAlert2[0]._source?.[ALERT_SUPPRESSION_END] as string + ).getTime(); + expect(suppressionEnd).toBeLessThan(new Date().getTime()); + expect(suppressionEnd).toBeGreaterThan(new Date(secondTimestamp).getDate()); + }); + + // Skipped here: https://github.com/elastic/kibana/issues/202945 + it.skip('does not suppress alerts outside of duration', async () => { + const id = uuidv4(); + // this timestamp is 1 minute in the past + const firstTimestamp = new Date(Date.now() - 5000).toISOString(); + const firstTimestamp2 = new Date(Date.now() - 5500).toISOString(); + + const firstDocument = { + id, + '@timestamp': firstTimestamp, + host: { + name: 'host-a', + }, + }; + await indexListOfSourceDocuments([ + firstDocument, + { ...firstDocument, '@timestamp': firstTimestamp2 }, + ]); + + const rule: EqlRuleCreateProps = { + ...getEqlRuleForAlertTesting(['ecs_compliant']), + query: getSequenceQuery(id), + alert_suppression: { + group_by: ['host.name'], + duration: { + value: 7, + unit: 's', + }, + missing_fields_strategy: 'suppress', + }, + from: 'now-10s', + interval: '5s', + }; + const createdRule = await createRule(supertest, log, rule); + const alerts = await getOpenAlerts(supertest, log, es, createdRule); + + expect(alerts.hits.hits.length).toEqual(3); + const [sequenceAlert, buildingBlockAlerts] = partitionSequenceBuildingBlocks( + alerts.hits.hits + ); + expect(buildingBlockAlerts.length).toEqual(2); + expect(sequenceAlert.length).toEqual(1); + + expect(sequenceAlert[0]._source).toEqual({ + ...sequenceAlert[0]._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'host.name', + value: 'host-a', + }, + ], + [ALERT_SUPPRESSION_DOCS_COUNT]: 0, + }); + + const secondTimestamp = new Date(Date.now() - 1000).toISOString(); + const secondTimestamp2 = new Date(Date.now()).toISOString(); + const secondDocument = { + id, + '@timestamp': secondTimestamp, + host: { + name: 'host-a', + }, + }; + + // Add a new document, then disable and re-enable to trigger another rule run. + // the second rule run should generate a new alert + await patchRule(supertest, log, { id: createdRule.id, enabled: false }); + + await indexListOfSourceDocuments([ + secondDocument, + { ...secondDocument, '@timestamp': secondTimestamp2 }, + ]); + await patchRule(supertest, log, { id: createdRule.id, enabled: true }); + const afterTimestamp = new Date(Date.now() + 5000); + const secondAlerts = await getOpenAlerts( + supertest, + log, + es, + createdRule, + RuleExecutionStatusEnum.succeeded, + undefined, + afterTimestamp + ); + + const [sequenceAlert2] = partitionSequenceBuildingBlocks(secondAlerts.hits.hits); + + expect(sequenceAlert2.length).toEqual(2); + expect(sequenceAlert2[0]._source).toEqual({ + ...sequenceAlert2[0]?._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'host.name', + value: 'host-a', + }, + ], + [ALERT_SUPPRESSION_DOCS_COUNT]: 0, // 1 alert from second rule run, that's why 1 suppressed + }); + expect(sequenceAlert2[1]._source).toEqual({ + ...sequenceAlert2[1]?._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'host.name', + value: 'host-a', + }, + ], + [ALERT_SUPPRESSION_DOCS_COUNT]: 0, // 1 alert from second rule run, that's why 1 suppressed + }); + }); + + it('suppresses alerts when query has 3 sequences', async () => { + // the first sequence alert is comprised of events [timestamp1, ...2, ...3] + // the other suppressed alerts will be made up of the following sequences + // [timestamp2, timestamp3, timestamp4] + // [timestamp3, timestamp4, timestamp5] + // [timestamp4, timestamp5, timestamp6] + const id = uuidv4(); + const dateNow = Date.now(); + const timestamp1 = new Date(dateNow - 5000).toISOString(); + const timestamp2 = new Date(dateNow - 5500).toISOString(); + const timestamp3 = new Date(dateNow - 5800).toISOString(); + const timestamp4 = new Date(dateNow - 6000).toISOString(); + const timestamp5 = new Date(dateNow - 6100).toISOString(); + const timestamp6 = new Date(dateNow - 6200).toISOString(); + + const firstSequenceEvent = { + id, + '@timestamp': timestamp1, + host: { + name: 'host-a', + }, + }; + await indexListOfSourceDocuments([ + firstSequenceEvent, + { ...firstSequenceEvent, '@timestamp': timestamp2 }, + { ...firstSequenceEvent, '@timestamp': timestamp3 }, + ]); + + const secondSequenceEvent = { + id, + '@timestamp': timestamp4, + host: { + name: 'host-a', + }, + }; + + await indexListOfSourceDocuments([ + secondSequenceEvent, + { ...secondSequenceEvent, '@timestamp': timestamp5 }, + { ...secondSequenceEvent, '@timestamp': timestamp6 }, + ]); + + const rule: EqlRuleCreateProps = { + ...getEqlRuleForAlertTesting(['ecs_compliant']), + query: `sequence [any where id == "${id}"] [any where id == "${id}"] [any where id == "${id}"]`, + alert_suppression: { + group_by: ['host.name'], + duration: { + value: 10, + unit: 's', + }, + missing_fields_strategy: 'suppress', + }, + from: 'now-30s', + interval: '10s', + }; + const createdRule = await createRule(supertest, log, rule); + const alerts = await getOpenAlerts(supertest, log, es, createdRule); + + // we expect one shell alert + // and three building block alerts + expect(alerts.hits.hits.length).toEqual(4); + const [sequenceAlert, buildingBlockAlerts] = partitionSequenceBuildingBlocks( + alerts.hits.hits + ); + expect(buildingBlockAlerts.length).toEqual(3); + expect(sequenceAlert.length).toEqual(1); + + expect(sequenceAlert[0]._source).toEqual({ + ...sequenceAlert[0]._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'host.name', + value: 'host-a', + }, + ], + [ALERT_SUPPRESSION_DOCS_COUNT]: 3, + }); + }); + + // Skipped here: https://github.com/elastic/kibana/issues/202945 + it.skip('does not suppress alerts outside of duration when query with 3 sequences', async () => { + const id = uuidv4(); + const dateNow = Date.now(); + const timestampSequenceEvent1 = new Date(dateNow - 5000).toISOString(); + const timestampSequenceEvent2 = new Date(dateNow - 5500).toISOString(); + const timestampSequenceEvent3 = new Date(dateNow - 5800).toISOString(); + + const firstSequenceEvent = { + id, + '@timestamp': timestampSequenceEvent1, + host: { + name: 'host-a', + }, + }; + await indexListOfSourceDocuments([ + firstSequenceEvent, + { ...firstSequenceEvent, '@timestamp': timestampSequenceEvent2 }, + { ...firstSequenceEvent, '@timestamp': timestampSequenceEvent3 }, + ]); + + const rule: EqlRuleCreateProps = { + ...getEqlRuleForAlertTesting(['ecs_compliant']), + query: `sequence [any where id == "${id}"] [any where id == "${id}"] [any where id == "${id}"]`, + alert_suppression: { + group_by: ['host.name'], + duration: { + value: 7, + unit: 's', + }, + missing_fields_strategy: 'suppress', + }, + from: 'now-10s', + interval: '5s', + }; + const createdRule = await createRule(supertest, log, rule); + const alerts = await getOpenAlerts(supertest, log, es, createdRule); + + // we expect one shell alert + // and three building block alerts + expect(alerts.hits.hits.length).toEqual(4); + const [sequenceAlert, buildingBlockAlerts] = partitionSequenceBuildingBlocks( + alerts.hits.hits + ); + expect(buildingBlockAlerts.length).toEqual(3); + expect(sequenceAlert.length).toEqual(1); + + expect(sequenceAlert[0]._source).toEqual({ + ...sequenceAlert[0]._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'host.name', + value: 'host-a', + }, + ], + [ALERT_SUPPRESSION_DOCS_COUNT]: 0, + }); + + const dateNow2 = Date.now(); + const secondTimestampEventSequence = new Date(dateNow2 - 2000).toISOString(); + const secondTimestampEventSequence2 = new Date(dateNow2 - 1000).toISOString(); + const secondTimestampEventSequence3 = new Date(dateNow2).toISOString(); + + const secondSequenceEvent = { + id, + '@timestamp': secondTimestampEventSequence, + host: { + name: 'host-a', + }, + }; + + // Add a new document, then disable and re-enable to trigger another rule run. + // the second rule run should generate a new alert + await patchRule(supertest, log, { id: createdRule.id, enabled: false }); + + await indexListOfSourceDocuments([ + secondSequenceEvent, + { ...secondSequenceEvent, '@timestamp': secondTimestampEventSequence2 }, + { ...secondSequenceEvent, '@timestamp': secondTimestampEventSequence3 }, + ]); + await patchRule(supertest, log, { id: createdRule.id, enabled: true }); + const afterTimestamp2 = new Date(dateNow2 + 55000); + const secondAlerts = await getOpenAlerts( + supertest, + log, + es, + createdRule, + RuleExecutionStatusEnum.succeeded, + undefined, + afterTimestamp2 + ); + + const [sequenceAlert2, buildingBlockAlerts2] = partitionSequenceBuildingBlocks( + secondAlerts.hits.hits + ); + + // two sequence alerts because the second one happened + // outside of the rule's suppression duration + expect(sequenceAlert2.length).toEqual(2); + expect(buildingBlockAlerts2.length).toEqual(6); + // timestamps should be different for two alerts, showing they were + // created in different rule executions + expect(sequenceAlert2[0]?._source?.[TIMESTAMP]).not.toEqual( + sequenceAlert2[1]?._source?.[TIMESTAMP] + ); + + expect(sequenceAlert2[0]._source).toEqual({ + ...sequenceAlert2[0]?._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'host.name', + value: 'host-a', + }, + ], + [ALERT_SUPPRESSION_DOCS_COUNT]: 0, // only one alert created, so zero documents are suppressed + }); + expect(sequenceAlert2[1]._source).toEqual({ + ...sequenceAlert2[1]?._source, + [ALERT_SUPPRESSION_TERMS]: [ + { + field: 'host.name', + value: 'host-a', + }, + ], + [ALERT_SUPPRESSION_DOCS_COUNT]: 0, // only one alert created, so zero documents are suppressed + }); }); }); }); diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/general_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/general_logic/trial_license_complete_tier/configs/serverless.config.ts index db3ad04b3d1b9..987b9c5004add 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/general_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/general_logic/trial_license_complete_tier/configs/serverless.config.ts @@ -17,5 +17,8 @@ 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([ + 'alertSuppressionForSequenceEqlRuleEnabled', + ])}`, ], }); diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/indicator_match/trial_license_complete_tier/indicator_match_alert_suppression.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/indicator_match/trial_license_complete_tier/indicator_match_alert_suppression.ts index 1acb416808081..6ede4121610e6 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/indicator_match/trial_license_complete_tier/indicator_match_alert_suppression.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/indicator_match/trial_license_complete_tier/indicator_match_alert_suppression.ts @@ -1250,7 +1250,7 @@ export default ({ getService }: FtrProviderContext) => { await indexGeneratedSourceDocuments({ docsCount: 60000, - interval: [firstTimestamp, '2020-10-28T05:35:50.000Z'], + interval: [firstTimestamp, '2020-10-28T05:45:50.000Z'], seed: (index, _, timestamp) => ({ id, '@timestamp': timestamp, diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_disabled/configs/ess.config.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_disabled/configs/ess.config.ts new file mode 100644 index 0000000000000..2e1b278c9247f --- /dev/null +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_disabled/configs/ess.config.ts @@ -0,0 +1,25 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const functionalConfig = await readConfigFile( + require.resolve('../../../../../../../config/ess/config.base.trial') + ); + + const testConfig = { + ...functionalConfig.getAll(), + testFiles: [require.resolve('..')], + junit: { + reportName: + 'Rules Management - Prebuilt Rule Customization Disabled Integration Tests - ESS Env', + }, + }; + + return testConfig; +} diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_disabled/configs/serverless.config.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_disabled/configs/serverless.config.ts new file mode 100644 index 0000000000000..462a971d8dda7 --- /dev/null +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_disabled/configs/serverless.config.ts @@ -0,0 +1,17 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { createTestConfig } from '../../../../../../../config/serverless/config.base'; + +export default createTestConfig({ + testFiles: [require.resolve('..')], + junit: { + reportName: + 'Rules Management - Prebuilt Rule Customization Disabled Integration Tests - Serverless Env', + }, + kbnTestServerArgs: [], +}); diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_disabled/index.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_disabled/index.ts new file mode 100644 index 0000000000000..0d78605426dbf --- /dev/null +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_disabled/index.ts @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FtrProviderContext } from '../../../../../../ftr_provider_context'; + +export default ({ loadTestFile }: FtrProviderContext): void => { + describe('Rules Management - Prebuilt Rules - Prebuilt Rule Customization Disabled', function () { + loadTestFile(require.resolve('./is_customized_calculation')); + }); +}; diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_disabled/is_customized_calculation.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_disabled/is_customized_calculation.ts new file mode 100644 index 0000000000000..e4ae135b481ed --- /dev/null +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_disabled/is_customized_calculation.ts @@ -0,0 +1,218 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from 'expect'; +import { + BulkActionEditTypeEnum, + BulkActionTypeEnum, +} from '@kbn/security-solution-plugin/common/api/detection_engine'; +import { deleteAllRules } from '../../../../../../../common/utils/security_solution'; +import { FtrProviderContext } from '../../../../../../ftr_provider_context'; +import { + deleteAllPrebuiltRuleAssets, + createRuleAssetSavedObject, + createPrebuiltRuleAssetSavedObjects, + installPrebuiltRules, +} from '../../../../utils'; + +export default ({ getService }: FtrProviderContext) => { + const supertest = getService('supertest'); + const securitySolutionApi = getService('securitySolutionApi'); + const log = getService('log'); + const es = getService('es'); + + const ruleAsset = createRuleAssetSavedObject({ + rule_id: 'test-rule-id', + }); + + describe('@ess @serverless @skipInServerlessMKI is_customized calculation with disabled customization', () => { + beforeEach(async () => { + await deleteAllRules(supertest, log); + await deleteAllPrebuiltRuleAssets(es, log); + }); + + it('should set is_customized to "false" on prebuilt rule PATCH', async () => { + await createPrebuiltRuleAssetSavedObjects(es, [ruleAsset]); + await installPrebuiltRules(es, supertest); + + const { body: findResult } = await securitySolutionApi + .findRules({ + query: { + per_page: 1, + filter: `alert.attributes.params.immutable: true`, + }, + }) + .expect(200); + const prebuiltRule = findResult.data[0]; + + // Check that the rule has been created and is not customized + expect(prebuiltRule).not.toBeNull(); + expect(prebuiltRule.rule_source.is_customized).toEqual(false); + + const { body } = await securitySolutionApi + .patchRule({ + body: { + rule_id: 'test-rule-id', + name: 'some other rule name', + }, + }) + .expect(200); + + // Check that the rule name has been updated and the rule is still not customized + expect(body).toEqual( + expect.objectContaining({ + name: 'some other rule name', + }) + ); + expect(body.rule_source.is_customized).toEqual(false); + }); + + it('should set is_customized to "false" on prebuilt rule UPDATE', async () => { + await createPrebuiltRuleAssetSavedObjects(es, [ruleAsset]); + await installPrebuiltRules(es, supertest); + + const { body: findResult } = await securitySolutionApi + .findRules({ + query: { + per_page: 1, + filter: `alert.attributes.params.immutable: true`, + }, + }) + .expect(200); + const prebuiltRule = findResult.data[0]; + + // Check that the rule has been created and is not customized + expect(prebuiltRule).not.toBeNull(); + expect(prebuiltRule.rule_source.is_customized).toEqual(false); + + const { body } = await securitySolutionApi + .updateRule({ + body: { + ...prebuiltRule, + id: undefined, // id together with rule_id is not allowed + name: 'some other rule name', + }, + }) + .expect(200); + + // Check that the rule name has been updated and the rule is still not customized + expect(body).toEqual( + expect.objectContaining({ + name: 'some other rule name', + }) + ); + expect(body.rule_source.is_customized).toEqual(false); + }); + + it('should not allow prebuilt rule customization on import', async () => { + await createPrebuiltRuleAssetSavedObjects(es, [ruleAsset]); + await installPrebuiltRules(es, supertest); + + const { body: findResult } = await securitySolutionApi + .findRules({ + query: { + per_page: 1, + filter: `alert.attributes.params.immutable: true`, + }, + }) + .expect(200); + const prebuiltRule = findResult.data[0]; + + // Check that the rule has been created and is not customized + expect(prebuiltRule).not.toBeNull(); + expect(prebuiltRule.rule_source.is_customized).toEqual(false); + + const ruleBuffer = Buffer.from( + JSON.stringify({ + ...prebuiltRule, + name: 'some other rule name', + }) + ); + + const { body } = await securitySolutionApi + .importRules({ query: {} }) + .attach('file', ruleBuffer, 'rules.ndjson') + .expect('Content-Type', 'application/json; charset=utf-8') + .expect(200); + + expect(body).toMatchObject({ + rules_count: 1, + success: false, + success_count: 0, + errors: [ + { + error: { + message: expect.stringContaining('Importing prebuilt rules is not supported'), + }, + rule_id: 'test-rule-id', + }, + ], + }); + + // Check that the rule has not been customized + const { body: importedRule } = await securitySolutionApi.readRule({ + query: { rule_id: prebuiltRule.rule_id }, + }); + expect(importedRule.rule_source.is_customized).toEqual(false); + }); + + it('should not allow rule customization on bulk edit', async () => { + await createPrebuiltRuleAssetSavedObjects(es, [ruleAsset]); + await installPrebuiltRules(es, supertest); + + const { body: findResult } = await securitySolutionApi + .findRules({ + query: { + per_page: 1, + filter: `alert.attributes.params.immutable: true`, + }, + }) + .expect(200); + const prebuiltRule = findResult.data[0]; + + // Check that the rule has been created and is not customized + expect(prebuiltRule).not.toBeNull(); + expect(prebuiltRule.rule_source.is_customized).toEqual(false); + + const { body: bulkResult } = await securitySolutionApi + .performRulesBulkAction({ + query: {}, + body: { + ids: [prebuiltRule.id], + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ + { + type: BulkActionEditTypeEnum.add_tags, + value: ['test'], + }, + ], + }, + }) + .expect(500); + + expect(bulkResult).toMatchObject( + expect.objectContaining({ + attributes: expect.objectContaining({ + summary: { + failed: 1, + skipped: 0, + succeeded: 0, + total: 1, + }, + errors: [expect.objectContaining({ message: "Elastic rule can't be edited" })], + }), + }) + ); + + // Check that the rule has not been customized + const { body: ruleAfterUpdate } = await securitySolutionApi.readRule({ + query: { rule_id: prebuiltRule.rule_id }, + }); + expect(ruleAfterUpdate.rule_source.is_customized).toEqual(false); + }); + }); +}; diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/trial_license_complete_tier/configs/ess.config.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_enabled/configs/ess.config.ts similarity index 91% rename from x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/trial_license_complete_tier/configs/ess.config.ts rename to x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_enabled/configs/ess.config.ts index eee14323c9b98..ff46ebb70d7c8 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/trial_license_complete_tier/configs/ess.config.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_enabled/configs/ess.config.ts @@ -17,7 +17,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { testFiles: [require.resolve('..')], junit: { reportName: - 'Rules Management - Prebuilt Rule Customization Integration Tests - ESS Env - Trial License', + 'Rules Management - Prebuilt Rule Customization Enabled Integration Tests - ESS Env', }, }; testConfig.kbnTestServer.serverArgs = testConfig.kbnTestServer.serverArgs.map((arg: string) => { diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/trial_license_complete_tier/configs/serverless.config.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_enabled/configs/serverless.config.ts similarity index 84% rename from x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/trial_license_complete_tier/configs/serverless.config.ts rename to x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_enabled/configs/serverless.config.ts index 79a23c85d2279..8c1d777665667 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/trial_license_complete_tier/configs/serverless.config.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_enabled/configs/serverless.config.ts @@ -11,7 +11,7 @@ export default createTestConfig({ testFiles: [require.resolve('..')], junit: { reportName: - 'Rules Management - Prebuilt Rule Customization Integration Tests - Serverless Env - Complete Tier', + 'Rules Management - Prebuilt Rule Customization Enabled Integration Tests - Serverless Env', }, kbnTestServerArgs: [ `--xpack.securitySolution.enableExperimental=${JSON.stringify([ diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/trial_license_complete_tier/import_rules.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_enabled/import_rules.ts similarity index 100% rename from x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/trial_license_complete_tier/import_rules.ts rename to x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_enabled/import_rules.ts diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/trial_license_complete_tier/index.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_enabled/index.ts similarity index 94% rename from x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/trial_license_complete_tier/index.ts rename to x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_enabled/index.ts index 58904243e51ca..d89f8ed5d49d3 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/trial_license_complete_tier/index.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_enabled/index.ts @@ -8,7 +8,7 @@ import { FtrProviderContext } from '../../../../../../ftr_provider_context'; export default ({ loadTestFile }: FtrProviderContext): void => { - describe('Rules Management - Prebuilt Rules - Prebuilt Rule Customization', function () { + describe('Rules Management - Prebuilt Rules - Prebuilt Rule Customization Enabled', function () { loadTestFile(require.resolve('./is_customized_calculation')); loadTestFile(require.resolve('./import_rules')); loadTestFile(require.resolve('./rules_export')); diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/trial_license_complete_tier/is_customized_calculation.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_enabled/is_customized_calculation.ts similarity index 100% rename from x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/trial_license_complete_tier/is_customized_calculation.ts rename to x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_enabled/is_customized_calculation.ts diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/trial_license_complete_tier/rules_export.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_enabled/rules_export.ts similarity index 100% rename from x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/trial_license_complete_tier/rules_export.ts rename to x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/prebuilt_rules/prebuilt_rule_customization/customization_enabled/rules_export.ts diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/basic_license_essentials_tier/patch_rules.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/basic_license_essentials_tier/patch_rules.ts index 86dde0735424e..f4536821dcaaa 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/basic_license_essentials_tier/patch_rules.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_patch/basic_license_essentials_tier/patch_rules.ts @@ -7,25 +7,21 @@ import expect from 'expect'; +import { createRule, deleteAllRules } from '../../../../../../common/utils/security_solution'; import { FtrProviderContext } from '../../../../../ftr_provider_context'; import { + createHistoricalPrebuiltRuleAssetSavedObjects, + createRuleAssetSavedObject, + deleteAllPrebuiltRuleAssets, + getCustomQueryRuleParams, getSimpleRule, getSimpleRuleOutput, - getCustomQueryRuleParams, + getSimpleRuleOutputWithoutRuleId, + installPrebuiltRules, removeServerGeneratedProperties, removeServerGeneratedPropertiesIncludingRuleId, - getSimpleRuleOutputWithoutRuleId, updateUsername, - createHistoricalPrebuiltRuleAssetSavedObjects, - installPrebuiltRules, - createRuleAssetSavedObject, } from '../../../utils'; -import { - createAlertsIndex, - deleteAllRules, - createRule, - deleteAllAlerts, -} from '../../../../../../common/utils/security_solution'; export default ({ getService }: FtrProviderContext) => { const supertest = getService('supertest'); @@ -37,11 +33,6 @@ export default ({ getService }: FtrProviderContext) => { describe('@ess @serverless @serverlessQA patch_rules', () => { describe('patch rules', () => { beforeEach(async () => { - await createAlertsIndex(supertest, log); - }); - - afterEach(async () => { - await deleteAllAlerts(supertest, log, es); await deleteAllRules(supertest, log); }); @@ -241,8 +232,8 @@ export default ({ getService }: FtrProviderContext) => { }); }); - // Unskip: https://github.com/elastic/kibana/issues/195921 it('@skipInServerlessMKI throws an error if rule has external rule source and non-customizable fields are changed', async () => { + await deleteAllPrebuiltRuleAssets(es, log); // Install base prebuilt detection rule await createHistoricalPrebuiltRuleAssetSavedObjects(es, [ createRuleAssetSavedObject({ rule_id: 'rule-1', author: ['elastic'] }), @@ -262,10 +253,6 @@ export default ({ getService }: FtrProviderContext) => { }); describe('max signals', () => { - afterEach(async () => { - await deleteAllRules(supertest, log); - }); - it('does NOT patch a rule when max_signals is less than 1', async () => { await securitySolutionApi.createRule({ body: getCustomQueryRuleParams({ rule_id: 'rule-1', max_signals: 100 }), diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/get_timestamp.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/get_timestamp.ts index e828767a39650..eb0de446d09d2 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/get_timestamp.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/get_timestamp.ts @@ -4,12 +4,12 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import faker from 'faker'; +import { faker } from '@faker-js/faker'; import type { IndexingInterval } from './types'; export const getTimestamp = (interval?: IndexingInterval) => { if (interval) { - return faker.date.between(...interval).toISOString(); + return faker.date.between({ from: interval[0], to: interval[1] }).toISOString(); } return new Date().toISOString(); diff --git a/x-pack/test/security_solution_cypress/config.ts b/x-pack/test/security_solution_cypress/config.ts index f02968945087d..6b10122213ca7 100644 --- a/x-pack/test/security_solution_cypress/config.ts +++ b/x-pack/test/security_solution_cypress/config.ts @@ -44,6 +44,9 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { // See https://github.com/elastic/kibana/pull/125396 for details '--xpack.alerting.rules.minimumScheduleInterval.value=1s', '--xpack.ruleRegistry.unsafe.legacyMultiTenancy.enabled=true', + `--xpack.securitySolution.enableExperimental=${JSON.stringify([ + 'alertSuppressionForSequenceEqlRuleEnabled', + ])}`, // mock cloud to enable the guided onboarding tour in e2e tests '--xpack.cloud.id=test', `--home.disableWelcomeScreen=true`, diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/eql_rule_suppression.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/eql_rule_suppression.cy.ts index 31855c3efff15..8f4b6a10faeb8 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/eql_rule_suppression.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/eql_rule_suppression.cy.ts @@ -38,7 +38,7 @@ const SUPPRESS_BY_FIELDS = ['agent.type']; describe( 'Detection Rule Creation - EQL Rules - With Alert Suppression', { - tags: ['@ess', '@serverless', '@skipInServerlessMKI'], + tags: ['@ess', '@skipInServerlessMKI'], }, () => { describe('with non-sequence queries', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/eql_rule_suppression_sequence.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/eql_rule_suppression_sequence.cy.ts index 8f07781b7732c..2cf8526a2f9c3 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/eql_rule_suppression_sequence.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/eql_rule_suppression_sequence.cy.ts @@ -8,20 +8,45 @@ import { getEqlSequenceRule } from '../../../../objects/rule'; import { login } from '../../../../tasks/login'; import { visit } from '../../../../tasks/navigation'; +import { getDetails } from '../../../../tasks/rule_details'; import { CREATE_RULE_URL } from '../../../../urls/navigation'; import { deleteAlertsAndRules } from '../../../../tasks/api_calls/common'; -import { fillDefineEqlRule, selectEqlRuleType } from '../../../../tasks/create_new_rule'; +import { + fillAlertSuppressionFields, + fillAboutRuleMinimumAndContinue, + createRuleWithoutEnabling, + skipScheduleRuleAction, + continueFromDefineStep, + selectAlertSuppressionPerInterval, + setAlertSuppressionDuration, + selectDoNotSuppressForMissingFields, + fillDefineEqlRule, + selectEqlRuleType, +} from '../../../../tasks/create_new_rule'; -import { TOOLTIP } from '../../../../screens/common'; import { - ALERT_SUPPRESSION_FIELDS, - ALERT_SUPPRESSION_FIELDS_INPUT, -} from '../../../../screens/create_new_rule'; + DEFINITION_DETAILS, + SUPPRESS_FOR_DETAILS, + SUPPRESS_BY_DETAILS, + SUPPRESS_MISSING_FIELD, + DETAILS_TITLE, +} from '../../../../screens/rule_details'; + +const SUPPRESS_BY_FIELDS = ['agent.type']; describe( 'Detection Rule Creation - EQL Rules - With Alert Suppression', { - tags: ['@ess', '@serverless'], + // skipped in MKI as it depends on feature flag alertSuppressionForEsqlRuleEnabled + // alertSuppressionForEsqlRuleEnabled feature flag is also enabled in a global config + tags: ['@ess', '@skipInServerlessMKI'], + env: { + kbnServerArgs: [ + `--xpack.securitySolution.enableExperimental=${JSON.stringify([ + 'alertSuppressionForSequenceEqlRuleEnabled', + ])}`, + ], + }, }, () => { describe('with sequence queries ', () => { @@ -36,11 +61,70 @@ describe( fillDefineEqlRule(rule); }); - it('disables the suppression fields and presents an informative tooltip', () => { - cy.get(ALERT_SUPPRESSION_FIELDS_INPUT).should('be.disabled'); + it('creates a rule with a "per rule execution" suppression duration', () => { + // selecting only suppression fields, the rest options would be default + fillAlertSuppressionFields(SUPPRESS_BY_FIELDS); + continueFromDefineStep(); + + // ensures details preview works correctly + cy.get(DEFINITION_DETAILS).within(() => { + getDetails(SUPPRESS_BY_DETAILS).should('have.text', SUPPRESS_BY_FIELDS.join('')); + getDetails(SUPPRESS_FOR_DETAILS).should('have.text', 'One rule execution'); + getDetails(SUPPRESS_MISSING_FIELD).should( + 'have.text', + 'Suppress and group alerts for events with missing fields' + ); + + // suppression functionality should be under Tech Preview + cy.contains(DETAILS_TITLE, SUPPRESS_FOR_DETAILS).contains('Technical Preview'); + }); + + fillAboutRuleMinimumAndContinue(rule); + skipScheduleRuleAction(); + createRuleWithoutEnabling(); + + cy.get(DEFINITION_DETAILS).within(() => { + getDetails(SUPPRESS_BY_DETAILS).should('have.text', SUPPRESS_BY_FIELDS.join('')); + getDetails(SUPPRESS_FOR_DETAILS).should('have.text', 'One rule execution'); + getDetails(SUPPRESS_MISSING_FIELD).should( + 'have.text', + 'Suppress and group alerts for events with missing fields' + ); + }); + }); + + it('creates a rule with a "per time interval" suppression duration', () => { + const expectedSuppressByFields = SUPPRESS_BY_FIELDS.slice(0, 1); + + // fill suppress by fields and select non-default suppression options + fillAlertSuppressionFields(expectedSuppressByFields); + selectAlertSuppressionPerInterval(); + setAlertSuppressionDuration(45, 'm'); + selectDoNotSuppressForMissingFields(); + continueFromDefineStep(); + + // ensures details preview works correctly + cy.get(DEFINITION_DETAILS).within(() => { + getDetails(SUPPRESS_BY_DETAILS).should('have.text', expectedSuppressByFields.join('')); + getDetails(SUPPRESS_FOR_DETAILS).should('have.text', '45m'); + getDetails(SUPPRESS_MISSING_FIELD).should( + 'have.text', + 'Do not suppress alerts for events with missing fields' + ); + }); + + fillAboutRuleMinimumAndContinue(rule); + skipScheduleRuleAction(); + createRuleWithoutEnabling(); - cy.get(ALERT_SUPPRESSION_FIELDS).trigger('mouseover'); - cy.get(TOOLTIP).contains('Suppression is not supported for EQL sequence queries.'); + cy.get(DEFINITION_DETAILS).within(() => { + getDetails(SUPPRESS_BY_DETAILS).should('have.text', expectedSuppressByFields.join('')); + getDetails(SUPPRESS_FOR_DETAILS).should('have.text', '45m'); + getDetails(SUPPRESS_MISSING_FIELD).should( + 'have.text', + 'Do not suppress alerts for events with missing fields' + ); + }); }); }); } diff --git a/x-pack/test/spaces_api_integration/spaces_only/telemetry/telemetry.ts b/x-pack/test/spaces_api_integration/spaces_only/telemetry/telemetry.ts index 4a43c3831627c..a74fbf6b75383 100644 --- a/x-pack/test/spaces_api_integration/spaces_only/telemetry/telemetry.ts +++ b/x-pack/test/spaces_api_integration/spaces_only/telemetry/telemetry.ts @@ -100,6 +100,7 @@ export default function ({ getService }: FtrProviderContext) { savedObjectsManagement: 1, savedQueryManagement: 0, dataQuality: 0, + entityManager: 0, }); }); diff --git a/x-pack/test/tsconfig.json b/x-pack/test/tsconfig.json index 9db41aecbb612..95178eca83172 100644 --- a/x-pack/test/tsconfig.json +++ b/x-pack/test/tsconfig.json @@ -188,5 +188,8 @@ "@kbn/ai-assistant-common", "@kbn/core-deprecations-common", "@kbn/usage-collection-plugin", + "@kbn/sse-utils-server", + "@kbn/gen-ai-functional-testing", + "@kbn/integration-assistant-plugin" ] } diff --git a/x-pack/test_serverless/api_integration/test_suites/common/data_usage/tests/data_streams.ts b/x-pack/test_serverless/api_integration/test_suites/common/data_usage/tests/data_streams.ts index d26b73f8689c8..b4dd8d51c331a 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/data_usage/tests/data_streams.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/data_usage/tests/data_streams.ts @@ -14,10 +14,10 @@ import { FtrProviderContext } from '../../../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const svlDatastreamsHelpers = getService('svlDatastreamsHelpers'); const roleScopedSupertest = getService('roleScopedSupertest'); + const retry = getService('retry'); let supertestAdminWithCookieCredentials: SupertestWithRoleScope; const testDataStreamName = 'test-data-stream'; describe(`GET ${DATA_USAGE_DATA_STREAMS_API_ROUTE}`, function () { - // due to the plugin depending on yml config (xpack.dataUsage.enabled), we cannot test in MKI until it is on by default this.tags(['skipMKI']); before(async () => { await svlDatastreamsHelpers.createDataStream(testDataStreamName); @@ -33,18 +33,31 @@ export default function ({ getService }: FtrProviderContext) { await svlDatastreamsHelpers.deleteDataStream(testDataStreamName); }); - // skipped because we filter out data streams with 0 storage size, - // and metering api does not pick up indexed data here - // TODO: route should potentially not depend solely on metering API - it.skip('returns created data streams', async () => { + it('returns created data streams', async () => { + await retry.tryForTime(10000, async () => { + const res = await supertestAdminWithCookieCredentials + .get(DATA_USAGE_DATA_STREAMS_API_ROUTE) + .query({ includeZeroStorage: true }) + .set('elastic-api-version', '1'); + const dataStreams: DataStreamsResponseBodySchemaBody = res.body; + const foundStream = dataStreams.find((stream) => stream.name === testDataStreamName); + if (!foundStream) { + throw new Error(`Data stream "${testDataStreamName}" not found. Retrying...`); + } + expect(res.statusCode).to.be(200); + expect(foundStream?.name).to.be(testDataStreamName); + expect(foundStream?.storageSizeBytes).to.be(0); + return true; + }); + }); + it('does not return created data streams without size', async () => { const res = await supertestAdminWithCookieCredentials .get(DATA_USAGE_DATA_STREAMS_API_ROUTE) .set('elastic-api-version', '1'); const dataStreams: DataStreamsResponseBodySchemaBody = res.body; const foundStream = dataStreams.find((stream) => stream.name === testDataStreamName); - expect(foundStream?.name).to.be(testDataStreamName); - expect(foundStream?.storageSizeBytes).to.be(0); expect(res.statusCode).to.be(200); + expect(foundStream).to.be(undefined); }); }); } diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/platform_security/authorization.ts b/x-pack/test_serverless/api_integration/test_suites/observability/platform_security/authorization.ts index e49a9ed45871e..91812dbecb027 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/platform_security/authorization.ts +++ b/x-pack/test_serverless/api_integration/test_suites/observability/platform_security/authorization.ts @@ -44,6 +44,7 @@ export default function ({ getService }: FtrProviderContext) { const features = Object.fromEntries( Object.entries(body.features).filter(([key]) => compositeFeatureIds.includes(key)) ); + expectSnapshot(features).toMatchInline(` Object { "apm": Object { @@ -126,6 +127,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.error_rate/apm/rule/runSoon", "alerting:apm.error_rate/apm/rule/scheduleBackfill", "alerting:apm.error_rate/apm/rule/deleteBackfill", + "alerting:apm.error_rate/alerts/rule/get", + "alerting:apm.error_rate/alerts/rule/getRuleState", + "alerting:apm.error_rate/alerts/rule/getAlertSummary", + "alerting:apm.error_rate/alerts/rule/getExecutionLog", + "alerting:apm.error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.error_rate/alerts/rule/find", + "alerting:apm.error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.error_rate/alerts/rule/getBackfill", + "alerting:apm.error_rate/alerts/rule/findBackfill", + "alerting:apm.error_rate/alerts/rule/create", + "alerting:apm.error_rate/alerts/rule/delete", + "alerting:apm.error_rate/alerts/rule/update", + "alerting:apm.error_rate/alerts/rule/updateApiKey", + "alerting:apm.error_rate/alerts/rule/enable", + "alerting:apm.error_rate/alerts/rule/disable", + "alerting:apm.error_rate/alerts/rule/muteAll", + "alerting:apm.error_rate/alerts/rule/unmuteAll", + "alerting:apm.error_rate/alerts/rule/muteAlert", + "alerting:apm.error_rate/alerts/rule/unmuteAlert", + "alerting:apm.error_rate/alerts/rule/snooze", + "alerting:apm.error_rate/alerts/rule/bulkEdit", + "alerting:apm.error_rate/alerts/rule/bulkDelete", + "alerting:apm.error_rate/alerts/rule/bulkEnable", + "alerting:apm.error_rate/alerts/rule/bulkDisable", + "alerting:apm.error_rate/alerts/rule/unsnooze", + "alerting:apm.error_rate/alerts/rule/runSoon", + "alerting:apm.error_rate/alerts/rule/scheduleBackfill", + "alerting:apm.error_rate/alerts/rule/deleteBackfill", "alerting:apm.transaction_error_rate/apm/rule/get", "alerting:apm.transaction_error_rate/apm/rule/getRuleState", "alerting:apm.transaction_error_rate/apm/rule/getAlertSummary", @@ -154,6 +183,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_error_rate/apm/rule/runSoon", "alerting:apm.transaction_error_rate/apm/rule/scheduleBackfill", "alerting:apm.transaction_error_rate/apm/rule/deleteBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/get", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleState", + "alerting:apm.transaction_error_rate/alerts/rule/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/rule/getExecutionLog", + "alerting:apm.transaction_error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_error_rate/alerts/rule/find", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_error_rate/alerts/rule/getBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/findBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/create", + "alerting:apm.transaction_error_rate/alerts/rule/delete", + "alerting:apm.transaction_error_rate/alerts/rule/update", + "alerting:apm.transaction_error_rate/alerts/rule/updateApiKey", + "alerting:apm.transaction_error_rate/alerts/rule/enable", + "alerting:apm.transaction_error_rate/alerts/rule/disable", + "alerting:apm.transaction_error_rate/alerts/rule/muteAll", + "alerting:apm.transaction_error_rate/alerts/rule/unmuteAll", + "alerting:apm.transaction_error_rate/alerts/rule/muteAlert", + "alerting:apm.transaction_error_rate/alerts/rule/unmuteAlert", + "alerting:apm.transaction_error_rate/alerts/rule/snooze", + "alerting:apm.transaction_error_rate/alerts/rule/bulkEdit", + "alerting:apm.transaction_error_rate/alerts/rule/bulkDelete", + "alerting:apm.transaction_error_rate/alerts/rule/bulkEnable", + "alerting:apm.transaction_error_rate/alerts/rule/bulkDisable", + "alerting:apm.transaction_error_rate/alerts/rule/unsnooze", + "alerting:apm.transaction_error_rate/alerts/rule/runSoon", + "alerting:apm.transaction_error_rate/alerts/rule/scheduleBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/deleteBackfill", "alerting:apm.transaction_duration/apm/rule/get", "alerting:apm.transaction_duration/apm/rule/getRuleState", "alerting:apm.transaction_duration/apm/rule/getAlertSummary", @@ -182,6 +239,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_duration/apm/rule/runSoon", "alerting:apm.transaction_duration/apm/rule/scheduleBackfill", "alerting:apm.transaction_duration/apm/rule/deleteBackfill", + "alerting:apm.transaction_duration/alerts/rule/get", + "alerting:apm.transaction_duration/alerts/rule/getRuleState", + "alerting:apm.transaction_duration/alerts/rule/getAlertSummary", + "alerting:apm.transaction_duration/alerts/rule/getExecutionLog", + "alerting:apm.transaction_duration/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_duration/alerts/rule/find", + "alerting:apm.transaction_duration/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_duration/alerts/rule/getBackfill", + "alerting:apm.transaction_duration/alerts/rule/findBackfill", + "alerting:apm.transaction_duration/alerts/rule/create", + "alerting:apm.transaction_duration/alerts/rule/delete", + "alerting:apm.transaction_duration/alerts/rule/update", + "alerting:apm.transaction_duration/alerts/rule/updateApiKey", + "alerting:apm.transaction_duration/alerts/rule/enable", + "alerting:apm.transaction_duration/alerts/rule/disable", + "alerting:apm.transaction_duration/alerts/rule/muteAll", + "alerting:apm.transaction_duration/alerts/rule/unmuteAll", + "alerting:apm.transaction_duration/alerts/rule/muteAlert", + "alerting:apm.transaction_duration/alerts/rule/unmuteAlert", + "alerting:apm.transaction_duration/alerts/rule/snooze", + "alerting:apm.transaction_duration/alerts/rule/bulkEdit", + "alerting:apm.transaction_duration/alerts/rule/bulkDelete", + "alerting:apm.transaction_duration/alerts/rule/bulkEnable", + "alerting:apm.transaction_duration/alerts/rule/bulkDisable", + "alerting:apm.transaction_duration/alerts/rule/unsnooze", + "alerting:apm.transaction_duration/alerts/rule/runSoon", + "alerting:apm.transaction_duration/alerts/rule/scheduleBackfill", + "alerting:apm.transaction_duration/alerts/rule/deleteBackfill", "alerting:apm.anomaly/apm/rule/get", "alerting:apm.anomaly/apm/rule/getRuleState", "alerting:apm.anomaly/apm/rule/getAlertSummary", @@ -210,26 +295,74 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.anomaly/apm/rule/runSoon", "alerting:apm.anomaly/apm/rule/scheduleBackfill", "alerting:apm.anomaly/apm/rule/deleteBackfill", + "alerting:apm.anomaly/alerts/rule/get", + "alerting:apm.anomaly/alerts/rule/getRuleState", + "alerting:apm.anomaly/alerts/rule/getAlertSummary", + "alerting:apm.anomaly/alerts/rule/getExecutionLog", + "alerting:apm.anomaly/alerts/rule/getActionErrorLog", + "alerting:apm.anomaly/alerts/rule/find", + "alerting:apm.anomaly/alerts/rule/getRuleExecutionKPI", + "alerting:apm.anomaly/alerts/rule/getBackfill", + "alerting:apm.anomaly/alerts/rule/findBackfill", + "alerting:apm.anomaly/alerts/rule/create", + "alerting:apm.anomaly/alerts/rule/delete", + "alerting:apm.anomaly/alerts/rule/update", + "alerting:apm.anomaly/alerts/rule/updateApiKey", + "alerting:apm.anomaly/alerts/rule/enable", + "alerting:apm.anomaly/alerts/rule/disable", + "alerting:apm.anomaly/alerts/rule/muteAll", + "alerting:apm.anomaly/alerts/rule/unmuteAll", + "alerting:apm.anomaly/alerts/rule/muteAlert", + "alerting:apm.anomaly/alerts/rule/unmuteAlert", + "alerting:apm.anomaly/alerts/rule/snooze", + "alerting:apm.anomaly/alerts/rule/bulkEdit", + "alerting:apm.anomaly/alerts/rule/bulkDelete", + "alerting:apm.anomaly/alerts/rule/bulkEnable", + "alerting:apm.anomaly/alerts/rule/bulkDisable", + "alerting:apm.anomaly/alerts/rule/unsnooze", + "alerting:apm.anomaly/alerts/rule/runSoon", + "alerting:apm.anomaly/alerts/rule/scheduleBackfill", + "alerting:apm.anomaly/alerts/rule/deleteBackfill", "alerting:apm.error_rate/apm/alert/get", "alerting:apm.error_rate/apm/alert/find", "alerting:apm.error_rate/apm/alert/getAuthorizedAlertsIndices", "alerting:apm.error_rate/apm/alert/getAlertSummary", "alerting:apm.error_rate/apm/alert/update", + "alerting:apm.error_rate/alerts/alert/get", + "alerting:apm.error_rate/alerts/alert/find", + "alerting:apm.error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/alerts/alert/getAlertSummary", + "alerting:apm.error_rate/alerts/alert/update", "alerting:apm.transaction_error_rate/apm/alert/get", "alerting:apm.transaction_error_rate/apm/alert/find", "alerting:apm.transaction_error_rate/apm/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_error_rate/apm/alert/getAlertSummary", "alerting:apm.transaction_error_rate/apm/alert/update", + "alerting:apm.transaction_error_rate/alerts/alert/get", + "alerting:apm.transaction_error_rate/alerts/alert/find", + "alerting:apm.transaction_error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/alerts/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/alert/update", "alerting:apm.transaction_duration/apm/alert/get", "alerting:apm.transaction_duration/apm/alert/find", "alerting:apm.transaction_duration/apm/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_duration/apm/alert/getAlertSummary", "alerting:apm.transaction_duration/apm/alert/update", + "alerting:apm.transaction_duration/alerts/alert/get", + "alerting:apm.transaction_duration/alerts/alert/find", + "alerting:apm.transaction_duration/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/alerts/alert/getAlertSummary", + "alerting:apm.transaction_duration/alerts/alert/update", "alerting:apm.anomaly/apm/alert/get", "alerting:apm.anomaly/apm/alert/find", "alerting:apm.anomaly/apm/alert/getAuthorizedAlertsIndices", "alerting:apm.anomaly/apm/alert/getAlertSummary", "alerting:apm.anomaly/apm/alert/update", + "alerting:apm.anomaly/alerts/alert/get", + "alerting:apm.anomaly/alerts/alert/find", + "alerting:apm.anomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/alerts/alert/getAlertSummary", + "alerting:apm.anomaly/alerts/alert/update", "api:infra", "app:infra", "app:logs", @@ -294,6 +427,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:logs.alert.document.count/logs/rule/runSoon", "alerting:logs.alert.document.count/logs/rule/scheduleBackfill", "alerting:logs.alert.document.count/logs/rule/deleteBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/create", + "alerting:logs.alert.document.count/alerts/rule/delete", + "alerting:logs.alert.document.count/alerts/rule/update", + "alerting:logs.alert.document.count/alerts/rule/updateApiKey", + "alerting:logs.alert.document.count/alerts/rule/enable", + "alerting:logs.alert.document.count/alerts/rule/disable", + "alerting:logs.alert.document.count/alerts/rule/muteAll", + "alerting:logs.alert.document.count/alerts/rule/unmuteAll", + "alerting:logs.alert.document.count/alerts/rule/muteAlert", + "alerting:logs.alert.document.count/alerts/rule/unmuteAlert", + "alerting:logs.alert.document.count/alerts/rule/snooze", + "alerting:logs.alert.document.count/alerts/rule/bulkEdit", + "alerting:logs.alert.document.count/alerts/rule/bulkDelete", + "alerting:logs.alert.document.count/alerts/rule/bulkEnable", + "alerting:logs.alert.document.count/alerts/rule/bulkDisable", + "alerting:logs.alert.document.count/alerts/rule/unsnooze", + "alerting:logs.alert.document.count/alerts/rule/runSoon", + "alerting:logs.alert.document.count/alerts/rule/scheduleBackfill", + "alerting:logs.alert.document.count/alerts/rule/deleteBackfill", "alerting:.es-query/logs/rule/get", "alerting:.es-query/logs/rule/getRuleState", "alerting:.es-query/logs/rule/getAlertSummary", @@ -322,6 +483,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:.es-query/logs/rule/runSoon", "alerting:.es-query/logs/rule/scheduleBackfill", "alerting:.es-query/logs/rule/deleteBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", + "alerting:.es-query/alerts/rule/create", + "alerting:.es-query/alerts/rule/delete", + "alerting:.es-query/alerts/rule/update", + "alerting:.es-query/alerts/rule/updateApiKey", + "alerting:.es-query/alerts/rule/enable", + "alerting:.es-query/alerts/rule/disable", + "alerting:.es-query/alerts/rule/muteAll", + "alerting:.es-query/alerts/rule/unmuteAll", + "alerting:.es-query/alerts/rule/muteAlert", + "alerting:.es-query/alerts/rule/unmuteAlert", + "alerting:.es-query/alerts/rule/snooze", + "alerting:.es-query/alerts/rule/bulkEdit", + "alerting:.es-query/alerts/rule/bulkDelete", + "alerting:.es-query/alerts/rule/bulkEnable", + "alerting:.es-query/alerts/rule/bulkDisable", + "alerting:.es-query/alerts/rule/unsnooze", + "alerting:.es-query/alerts/rule/runSoon", + "alerting:.es-query/alerts/rule/scheduleBackfill", + "alerting:.es-query/alerts/rule/deleteBackfill", "alerting:observability.rules.custom_threshold/logs/rule/get", "alerting:observability.rules.custom_threshold/logs/rule/getRuleState", "alerting:observability.rules.custom_threshold/logs/rule/getAlertSummary", @@ -350,6 +539,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:observability.rules.custom_threshold/logs/rule/runSoon", "alerting:observability.rules.custom_threshold/logs/rule/scheduleBackfill", "alerting:observability.rules.custom_threshold/logs/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/create", + "alerting:observability.rules.custom_threshold/alerts/rule/delete", + "alerting:observability.rules.custom_threshold/alerts/rule/update", + "alerting:observability.rules.custom_threshold/alerts/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/alerts/rule/enable", + "alerting:observability.rules.custom_threshold/alerts/rule/disable", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/snooze", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/alerts/rule/unsnooze", + "alerting:observability.rules.custom_threshold/alerts/rule/runSoon", + "alerting:observability.rules.custom_threshold/alerts/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/deleteBackfill", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/get", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getRuleState", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getAlertSummary", @@ -378,171 +595,79 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.ml.anomaly_detection_alert/logs/rule/runSoon", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/scheduleBackfill", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/deleteBackfill", "alerting:logs.alert.document.count/logs/alert/get", "alerting:logs.alert.document.count/logs/alert/find", "alerting:logs.alert.document.count/logs/alert/getAuthorizedAlertsIndices", "alerting:logs.alert.document.count/logs/alert/getAlertSummary", "alerting:logs.alert.document.count/logs/alert/update", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/update", "alerting:.es-query/logs/alert/get", "alerting:.es-query/logs/alert/find", "alerting:.es-query/logs/alert/getAuthorizedAlertsIndices", "alerting:.es-query/logs/alert/getAlertSummary", "alerting:.es-query/logs/alert/update", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/update", "alerting:observability.rules.custom_threshold/logs/alert/get", "alerting:observability.rules.custom_threshold/logs/alert/find", "alerting:observability.rules.custom_threshold/logs/alert/getAuthorizedAlertsIndices", "alerting:observability.rules.custom_threshold/logs/alert/getAlertSummary", "alerting:observability.rules.custom_threshold/logs/alert/update", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/update", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/get", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/find", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAuthorizedAlertsIndices", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAlertSummary", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/update", "app:observability", "ui:catalogue/observability", "ui:navLinks/observability", "ui:observability/read", "ui:observability/write", - "alerting:slo.rules.burnRate/observability/rule/get", - "alerting:slo.rules.burnRate/observability/rule/getRuleState", - "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", - "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", - "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", - "alerting:slo.rules.burnRate/observability/rule/find", - "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", - "alerting:slo.rules.burnRate/observability/rule/getBackfill", - "alerting:slo.rules.burnRate/observability/rule/findBackfill", - "alerting:slo.rules.burnRate/observability/rule/create", - "alerting:slo.rules.burnRate/observability/rule/delete", - "alerting:slo.rules.burnRate/observability/rule/update", - "alerting:slo.rules.burnRate/observability/rule/updateApiKey", - "alerting:slo.rules.burnRate/observability/rule/enable", - "alerting:slo.rules.burnRate/observability/rule/disable", - "alerting:slo.rules.burnRate/observability/rule/muteAll", - "alerting:slo.rules.burnRate/observability/rule/unmuteAll", - "alerting:slo.rules.burnRate/observability/rule/muteAlert", - "alerting:slo.rules.burnRate/observability/rule/unmuteAlert", - "alerting:slo.rules.burnRate/observability/rule/snooze", - "alerting:slo.rules.burnRate/observability/rule/bulkEdit", - "alerting:slo.rules.burnRate/observability/rule/bulkDelete", - "alerting:slo.rules.burnRate/observability/rule/bulkEnable", - "alerting:slo.rules.burnRate/observability/rule/bulkDisable", - "alerting:slo.rules.burnRate/observability/rule/unsnooze", - "alerting:slo.rules.burnRate/observability/rule/runSoon", - "alerting:slo.rules.burnRate/observability/rule/scheduleBackfill", - "alerting:slo.rules.burnRate/observability/rule/deleteBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/get", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", - "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", - "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", - "alerting:observability.rules.custom_threshold/observability/rule/find", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", - "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/create", - "alerting:observability.rules.custom_threshold/observability/rule/delete", - "alerting:observability.rules.custom_threshold/observability/rule/update", - "alerting:observability.rules.custom_threshold/observability/rule/updateApiKey", - "alerting:observability.rules.custom_threshold/observability/rule/enable", - "alerting:observability.rules.custom_threshold/observability/rule/disable", - "alerting:observability.rules.custom_threshold/observability/rule/muteAll", - "alerting:observability.rules.custom_threshold/observability/rule/unmuteAll", - "alerting:observability.rules.custom_threshold/observability/rule/muteAlert", - "alerting:observability.rules.custom_threshold/observability/rule/unmuteAlert", - "alerting:observability.rules.custom_threshold/observability/rule/snooze", - "alerting:observability.rules.custom_threshold/observability/rule/bulkEdit", - "alerting:observability.rules.custom_threshold/observability/rule/bulkDelete", - "alerting:observability.rules.custom_threshold/observability/rule/bulkEnable", - "alerting:observability.rules.custom_threshold/observability/rule/bulkDisable", - "alerting:observability.rules.custom_threshold/observability/rule/unsnooze", - "alerting:observability.rules.custom_threshold/observability/rule/runSoon", - "alerting:observability.rules.custom_threshold/observability/rule/scheduleBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/deleteBackfill", - "alerting:.es-query/observability/rule/get", - "alerting:.es-query/observability/rule/getRuleState", - "alerting:.es-query/observability/rule/getAlertSummary", - "alerting:.es-query/observability/rule/getExecutionLog", - "alerting:.es-query/observability/rule/getActionErrorLog", - "alerting:.es-query/observability/rule/find", - "alerting:.es-query/observability/rule/getRuleExecutionKPI", - "alerting:.es-query/observability/rule/getBackfill", - "alerting:.es-query/observability/rule/findBackfill", - "alerting:.es-query/observability/rule/create", - "alerting:.es-query/observability/rule/delete", - "alerting:.es-query/observability/rule/update", - "alerting:.es-query/observability/rule/updateApiKey", - "alerting:.es-query/observability/rule/enable", - "alerting:.es-query/observability/rule/disable", - "alerting:.es-query/observability/rule/muteAll", - "alerting:.es-query/observability/rule/unmuteAll", - "alerting:.es-query/observability/rule/muteAlert", - "alerting:.es-query/observability/rule/unmuteAlert", - "alerting:.es-query/observability/rule/snooze", - "alerting:.es-query/observability/rule/bulkEdit", - "alerting:.es-query/observability/rule/bulkDelete", - "alerting:.es-query/observability/rule/bulkEnable", - "alerting:.es-query/observability/rule/bulkDisable", - "alerting:.es-query/observability/rule/unsnooze", - "alerting:.es-query/observability/rule/runSoon", - "alerting:.es-query/observability/rule/scheduleBackfill", - "alerting:.es-query/observability/rule/deleteBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/create", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/delete", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/update", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/updateApiKey", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/enable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/disable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAll", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAll", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAlert", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAlert", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/snooze", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEdit", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDelete", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEnable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDisable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unsnooze", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/runSoon", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/scheduleBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/deleteBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/get", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", - "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/find", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", - "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/create", - "alerting:metrics.alert.inventory.threshold/observability/rule/delete", - "alerting:metrics.alert.inventory.threshold/observability/rule/update", - "alerting:metrics.alert.inventory.threshold/observability/rule/updateApiKey", - "alerting:metrics.alert.inventory.threshold/observability/rule/enable", - "alerting:metrics.alert.inventory.threshold/observability/rule/disable", - "alerting:metrics.alert.inventory.threshold/observability/rule/muteAll", - "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAll", - "alerting:metrics.alert.inventory.threshold/observability/rule/muteAlert", - "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAlert", - "alerting:metrics.alert.inventory.threshold/observability/rule/snooze", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEdit", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDelete", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEnable", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDisable", - "alerting:metrics.alert.inventory.threshold/observability/rule/unsnooze", - "alerting:metrics.alert.inventory.threshold/observability/rule/runSoon", - "alerting:metrics.alert.inventory.threshold/observability/rule/scheduleBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/deleteBackfill", "alerting:apm.error_rate/observability/rule/get", "alerting:apm.error_rate/observability/rule/getRuleState", "alerting:apm.error_rate/observability/rule/getAlertSummary", @@ -683,6 +808,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/runSoon", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/scheduleBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/deleteBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/create", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/delete", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/update", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/updateApiKey", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/enable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/disable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/muteAll", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unmuteAll", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/muteAlert", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unmuteAlert", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/snooze", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkEdit", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkDelete", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkEnable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unsnooze", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/runSoon", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/deleteBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/get", "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.tls/observability/rule/getAlertSummary", @@ -711,121 +864,728 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/rule/runSoon", "alerting:xpack.synthetics.alerts.tls/observability/rule/scheduleBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/deleteBackfill", - "alerting:slo.rules.burnRate/observability/alert/get", - "alerting:slo.rules.burnRate/observability/alert/find", - "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", - "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", - "alerting:slo.rules.burnRate/observability/alert/update", - "alerting:observability.rules.custom_threshold/observability/alert/get", - "alerting:observability.rules.custom_threshold/observability/alert/find", - "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/alert/update", - "alerting:.es-query/observability/alert/get", - "alerting:.es-query/observability/alert/find", - "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", - "alerting:.es-query/observability/alert/getAlertSummary", - "alerting:.es-query/observability/alert/update", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/update", - "alerting:metrics.alert.inventory.threshold/observability/alert/get", - "alerting:metrics.alert.inventory.threshold/observability/alert/find", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/alert/update", - "alerting:apm.error_rate/observability/alert/get", - "alerting:apm.error_rate/observability/alert/find", - "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", - "alerting:apm.error_rate/observability/alert/getAlertSummary", - "alerting:apm.error_rate/observability/alert/update", - "alerting:apm.transaction_error_rate/observability/alert/get", - "alerting:apm.transaction_error_rate/observability/alert/find", - "alerting:apm.transaction_error_rate/observability/alert/getAuthorizedAlertsIndices", - "alerting:apm.transaction_error_rate/observability/alert/getAlertSummary", - "alerting:apm.transaction_error_rate/observability/alert/update", - "alerting:apm.transaction_duration/observability/alert/get", - "alerting:apm.transaction_duration/observability/alert/find", - "alerting:apm.transaction_duration/observability/alert/getAuthorizedAlertsIndices", - "alerting:apm.transaction_duration/observability/alert/getAlertSummary", - "alerting:apm.transaction_duration/observability/alert/update", - "alerting:apm.anomaly/observability/alert/get", - "alerting:apm.anomaly/observability/alert/find", - "alerting:apm.anomaly/observability/alert/getAuthorizedAlertsIndices", - "alerting:apm.anomaly/observability/alert/getAlertSummary", - "alerting:apm.anomaly/observability/alert/update", - "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/get", - "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", - "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAlertSummary", - "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/update", - "alerting:xpack.synthetics.alerts.tls/observability/alert/get", - "alerting:xpack.synthetics.alerts.tls/observability/alert/find", - "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", - "alerting:xpack.synthetics.alerts.tls/observability/alert/update", - ], - "minimal_all": Array [ - "login:", - "api:apm", - "api:apm_write", - "api:rac", - "app:apm", - "app:ux", - "app:kibana", - "ui:catalogue/apm", - "ui:management/insightsAndAlerting/triggersActions", - "ui:navLinks/apm", - "ui:navLinks/ux", - "ui:navLinks/kibana", - "saved_object:telemetry/bulk_get", - "saved_object:telemetry/get", - "saved_object:telemetry/find", - "saved_object:telemetry/open_point_in_time", - "saved_object:telemetry/close_point_in_time", - "saved_object:telemetry/create", - "saved_object:telemetry/bulk_create", - "saved_object:telemetry/update", - "saved_object:telemetry/bulk_update", - "saved_object:telemetry/delete", - "saved_object:telemetry/bulk_delete", - "saved_object:telemetry/share_to_space", - "saved_object:apm-indices/bulk_get", - "saved_object:apm-indices/get", - "saved_object:apm-indices/find", - "saved_object:apm-indices/open_point_in_time", - "saved_object:apm-indices/close_point_in_time", - "saved_object:config/bulk_get", - "saved_object:config/get", - "saved_object:config/find", - "saved_object:config/open_point_in_time", - "saved_object:config/close_point_in_time", - "saved_object:config-global/bulk_get", - "saved_object:config-global/get", - "saved_object:config-global/find", - "saved_object:config-global/open_point_in_time", - "saved_object:config-global/close_point_in_time", - "saved_object:url/bulk_get", - "saved_object:url/get", - "saved_object:url/find", - "saved_object:url/open_point_in_time", - "saved_object:url/close_point_in_time", - "ui:apm/show", - "ui:apm/save", - "ui:apm/alerting:show", - "ui:apm/alerting:save", - "alerting:apm.error_rate/apm/rule/get", - "alerting:apm.error_rate/apm/rule/getRuleState", - "alerting:apm.error_rate/apm/rule/getAlertSummary", - "alerting:apm.error_rate/apm/rule/getExecutionLog", - "alerting:apm.error_rate/apm/rule/getActionErrorLog", - "alerting:apm.error_rate/apm/rule/find", - "alerting:apm.error_rate/apm/rule/getRuleExecutionKPI", - "alerting:apm.error_rate/apm/rule/getBackfill", - "alerting:apm.error_rate/apm/rule/findBackfill", - "alerting:apm.error_rate/apm/rule/create", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/get", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/find", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/create", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/delete", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/update", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/updateApiKey", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/enable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/disable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/muteAll", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unmuteAll", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/muteAlert", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unmuteAlert", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/snooze", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkEdit", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkDelete", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkEnable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unsnooze", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/runSoon", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/deleteBackfill", + "alerting:metrics.alert.threshold/observability/rule/get", + "alerting:metrics.alert.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/observability/rule/find", + "alerting:metrics.alert.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.threshold/observability/rule/create", + "alerting:metrics.alert.threshold/observability/rule/delete", + "alerting:metrics.alert.threshold/observability/rule/update", + "alerting:metrics.alert.threshold/observability/rule/updateApiKey", + "alerting:metrics.alert.threshold/observability/rule/enable", + "alerting:metrics.alert.threshold/observability/rule/disable", + "alerting:metrics.alert.threshold/observability/rule/muteAll", + "alerting:metrics.alert.threshold/observability/rule/unmuteAll", + "alerting:metrics.alert.threshold/observability/rule/muteAlert", + "alerting:metrics.alert.threshold/observability/rule/unmuteAlert", + "alerting:metrics.alert.threshold/observability/rule/snooze", + "alerting:metrics.alert.threshold/observability/rule/bulkEdit", + "alerting:metrics.alert.threshold/observability/rule/bulkDelete", + "alerting:metrics.alert.threshold/observability/rule/bulkEnable", + "alerting:metrics.alert.threshold/observability/rule/bulkDisable", + "alerting:metrics.alert.threshold/observability/rule/unsnooze", + "alerting:metrics.alert.threshold/observability/rule/runSoon", + "alerting:metrics.alert.threshold/observability/rule/scheduleBackfill", + "alerting:metrics.alert.threshold/observability/rule/deleteBackfill", + "alerting:metrics.alert.threshold/alerts/rule/get", + "alerting:metrics.alert.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/alerts/rule/find", + "alerting:metrics.alert.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.threshold/alerts/rule/create", + "alerting:metrics.alert.threshold/alerts/rule/delete", + "alerting:metrics.alert.threshold/alerts/rule/update", + "alerting:metrics.alert.threshold/alerts/rule/updateApiKey", + "alerting:metrics.alert.threshold/alerts/rule/enable", + "alerting:metrics.alert.threshold/alerts/rule/disable", + "alerting:metrics.alert.threshold/alerts/rule/muteAll", + "alerting:metrics.alert.threshold/alerts/rule/unmuteAll", + "alerting:metrics.alert.threshold/alerts/rule/muteAlert", + "alerting:metrics.alert.threshold/alerts/rule/unmuteAlert", + "alerting:metrics.alert.threshold/alerts/rule/snooze", + "alerting:metrics.alert.threshold/alerts/rule/bulkEdit", + "alerting:metrics.alert.threshold/alerts/rule/bulkDelete", + "alerting:metrics.alert.threshold/alerts/rule/bulkEnable", + "alerting:metrics.alert.threshold/alerts/rule/bulkDisable", + "alerting:metrics.alert.threshold/alerts/rule/unsnooze", + "alerting:metrics.alert.threshold/alerts/rule/runSoon", + "alerting:metrics.alert.threshold/alerts/rule/scheduleBackfill", + "alerting:metrics.alert.threshold/alerts/rule/deleteBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/get", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/find", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/create", + "alerting:metrics.alert.inventory.threshold/observability/rule/delete", + "alerting:metrics.alert.inventory.threshold/observability/rule/update", + "alerting:metrics.alert.inventory.threshold/observability/rule/updateApiKey", + "alerting:metrics.alert.inventory.threshold/observability/rule/enable", + "alerting:metrics.alert.inventory.threshold/observability/rule/disable", + "alerting:metrics.alert.inventory.threshold/observability/rule/muteAll", + "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAll", + "alerting:metrics.alert.inventory.threshold/observability/rule/muteAlert", + "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAlert", + "alerting:metrics.alert.inventory.threshold/observability/rule/snooze", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEdit", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDelete", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEnable", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDisable", + "alerting:metrics.alert.inventory.threshold/observability/rule/unsnooze", + "alerting:metrics.alert.inventory.threshold/observability/rule/runSoon", + "alerting:metrics.alert.inventory.threshold/observability/rule/scheduleBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/deleteBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/get", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/find", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/create", + "alerting:metrics.alert.inventory.threshold/alerts/rule/delete", + "alerting:metrics.alert.inventory.threshold/alerts/rule/update", + "alerting:metrics.alert.inventory.threshold/alerts/rule/updateApiKey", + "alerting:metrics.alert.inventory.threshold/alerts/rule/enable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/disable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/muteAll", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unmuteAll", + "alerting:metrics.alert.inventory.threshold/alerts/rule/muteAlert", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unmuteAlert", + "alerting:metrics.alert.inventory.threshold/alerts/rule/snooze", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkEdit", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkDelete", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkEnable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkDisable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unsnooze", + "alerting:metrics.alert.inventory.threshold/alerts/rule/runSoon", + "alerting:metrics.alert.inventory.threshold/alerts/rule/scheduleBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/get", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/find", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/create", + "alerting:xpack.uptime.alerts.tls/observability/rule/delete", + "alerting:xpack.uptime.alerts.tls/observability/rule/update", + "alerting:xpack.uptime.alerts.tls/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tls/observability/rule/enable", + "alerting:xpack.uptime.alerts.tls/observability/rule/disable", + "alerting:xpack.uptime.alerts.tls/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.tls/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tls/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.tls/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tls/observability/rule/snooze", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tls/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.tls/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.tls/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/get", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/find", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/create", + "alerting:xpack.uptime.alerts.tls/alerts/rule/delete", + "alerting:xpack.uptime.alerts.tls/alerts/rule/update", + "alerting:xpack.uptime.alerts.tls/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tls/alerts/rule/enable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/disable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tls/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tls/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.tls/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.tls/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/create", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/delete", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/update", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/enable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/disable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/snooze", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/create", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/delete", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/update", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/enable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/disable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/create", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/delete", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/update", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/enable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/disable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/snooze", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/create", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/delete", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/update", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/enable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/disable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/create", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/delete", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/update", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/enable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/disable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/snooze", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/create", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/delete", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/update", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/enable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/disable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/deleteBackfill", + "alerting:logs.alert.document.count/observability/rule/get", + "alerting:logs.alert.document.count/observability/rule/getRuleState", + "alerting:logs.alert.document.count/observability/rule/getAlertSummary", + "alerting:logs.alert.document.count/observability/rule/getExecutionLog", + "alerting:logs.alert.document.count/observability/rule/getActionErrorLog", + "alerting:logs.alert.document.count/observability/rule/find", + "alerting:logs.alert.document.count/observability/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/observability/rule/getBackfill", + "alerting:logs.alert.document.count/observability/rule/findBackfill", + "alerting:logs.alert.document.count/observability/rule/create", + "alerting:logs.alert.document.count/observability/rule/delete", + "alerting:logs.alert.document.count/observability/rule/update", + "alerting:logs.alert.document.count/observability/rule/updateApiKey", + "alerting:logs.alert.document.count/observability/rule/enable", + "alerting:logs.alert.document.count/observability/rule/disable", + "alerting:logs.alert.document.count/observability/rule/muteAll", + "alerting:logs.alert.document.count/observability/rule/unmuteAll", + "alerting:logs.alert.document.count/observability/rule/muteAlert", + "alerting:logs.alert.document.count/observability/rule/unmuteAlert", + "alerting:logs.alert.document.count/observability/rule/snooze", + "alerting:logs.alert.document.count/observability/rule/bulkEdit", + "alerting:logs.alert.document.count/observability/rule/bulkDelete", + "alerting:logs.alert.document.count/observability/rule/bulkEnable", + "alerting:logs.alert.document.count/observability/rule/bulkDisable", + "alerting:logs.alert.document.count/observability/rule/unsnooze", + "alerting:logs.alert.document.count/observability/rule/runSoon", + "alerting:logs.alert.document.count/observability/rule/scheduleBackfill", + "alerting:logs.alert.document.count/observability/rule/deleteBackfill", + "alerting:slo.rules.burnRate/observability/rule/get", + "alerting:slo.rules.burnRate/observability/rule/getRuleState", + "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", + "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", + "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/observability/rule/find", + "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/observability/rule/getBackfill", + "alerting:slo.rules.burnRate/observability/rule/findBackfill", + "alerting:slo.rules.burnRate/observability/rule/create", + "alerting:slo.rules.burnRate/observability/rule/delete", + "alerting:slo.rules.burnRate/observability/rule/update", + "alerting:slo.rules.burnRate/observability/rule/updateApiKey", + "alerting:slo.rules.burnRate/observability/rule/enable", + "alerting:slo.rules.burnRate/observability/rule/disable", + "alerting:slo.rules.burnRate/observability/rule/muteAll", + "alerting:slo.rules.burnRate/observability/rule/unmuteAll", + "alerting:slo.rules.burnRate/observability/rule/muteAlert", + "alerting:slo.rules.burnRate/observability/rule/unmuteAlert", + "alerting:slo.rules.burnRate/observability/rule/snooze", + "alerting:slo.rules.burnRate/observability/rule/bulkEdit", + "alerting:slo.rules.burnRate/observability/rule/bulkDelete", + "alerting:slo.rules.burnRate/observability/rule/bulkEnable", + "alerting:slo.rules.burnRate/observability/rule/bulkDisable", + "alerting:slo.rules.burnRate/observability/rule/unsnooze", + "alerting:slo.rules.burnRate/observability/rule/runSoon", + "alerting:slo.rules.burnRate/observability/rule/scheduleBackfill", + "alerting:slo.rules.burnRate/observability/rule/deleteBackfill", + "alerting:slo.rules.burnRate/alerts/rule/get", + "alerting:slo.rules.burnRate/alerts/rule/getRuleState", + "alerting:slo.rules.burnRate/alerts/rule/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/rule/getExecutionLog", + "alerting:slo.rules.burnRate/alerts/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/alerts/rule/find", + "alerting:slo.rules.burnRate/alerts/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/alerts/rule/getBackfill", + "alerting:slo.rules.burnRate/alerts/rule/findBackfill", + "alerting:slo.rules.burnRate/alerts/rule/create", + "alerting:slo.rules.burnRate/alerts/rule/delete", + "alerting:slo.rules.burnRate/alerts/rule/update", + "alerting:slo.rules.burnRate/alerts/rule/updateApiKey", + "alerting:slo.rules.burnRate/alerts/rule/enable", + "alerting:slo.rules.burnRate/alerts/rule/disable", + "alerting:slo.rules.burnRate/alerts/rule/muteAll", + "alerting:slo.rules.burnRate/alerts/rule/unmuteAll", + "alerting:slo.rules.burnRate/alerts/rule/muteAlert", + "alerting:slo.rules.burnRate/alerts/rule/unmuteAlert", + "alerting:slo.rules.burnRate/alerts/rule/snooze", + "alerting:slo.rules.burnRate/alerts/rule/bulkEdit", + "alerting:slo.rules.burnRate/alerts/rule/bulkDelete", + "alerting:slo.rules.burnRate/alerts/rule/bulkEnable", + "alerting:slo.rules.burnRate/alerts/rule/bulkDisable", + "alerting:slo.rules.burnRate/alerts/rule/unsnooze", + "alerting:slo.rules.burnRate/alerts/rule/runSoon", + "alerting:slo.rules.burnRate/alerts/rule/scheduleBackfill", + "alerting:slo.rules.burnRate/alerts/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/get", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", + "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/observability/rule/find", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/create", + "alerting:observability.rules.custom_threshold/observability/rule/delete", + "alerting:observability.rules.custom_threshold/observability/rule/update", + "alerting:observability.rules.custom_threshold/observability/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/observability/rule/enable", + "alerting:observability.rules.custom_threshold/observability/rule/disable", + "alerting:observability.rules.custom_threshold/observability/rule/muteAll", + "alerting:observability.rules.custom_threshold/observability/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/observability/rule/muteAlert", + "alerting:observability.rules.custom_threshold/observability/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/observability/rule/snooze", + "alerting:observability.rules.custom_threshold/observability/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/observability/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/observability/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/observability/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/observability/rule/unsnooze", + "alerting:observability.rules.custom_threshold/observability/rule/runSoon", + "alerting:observability.rules.custom_threshold/observability/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/deleteBackfill", + "alerting:.es-query/observability/rule/get", + "alerting:.es-query/observability/rule/getRuleState", + "alerting:.es-query/observability/rule/getAlertSummary", + "alerting:.es-query/observability/rule/getExecutionLog", + "alerting:.es-query/observability/rule/getActionErrorLog", + "alerting:.es-query/observability/rule/find", + "alerting:.es-query/observability/rule/getRuleExecutionKPI", + "alerting:.es-query/observability/rule/getBackfill", + "alerting:.es-query/observability/rule/findBackfill", + "alerting:.es-query/observability/rule/create", + "alerting:.es-query/observability/rule/delete", + "alerting:.es-query/observability/rule/update", + "alerting:.es-query/observability/rule/updateApiKey", + "alerting:.es-query/observability/rule/enable", + "alerting:.es-query/observability/rule/disable", + "alerting:.es-query/observability/rule/muteAll", + "alerting:.es-query/observability/rule/unmuteAll", + "alerting:.es-query/observability/rule/muteAlert", + "alerting:.es-query/observability/rule/unmuteAlert", + "alerting:.es-query/observability/rule/snooze", + "alerting:.es-query/observability/rule/bulkEdit", + "alerting:.es-query/observability/rule/bulkDelete", + "alerting:.es-query/observability/rule/bulkEnable", + "alerting:.es-query/observability/rule/bulkDisable", + "alerting:.es-query/observability/rule/unsnooze", + "alerting:.es-query/observability/rule/runSoon", + "alerting:.es-query/observability/rule/scheduleBackfill", + "alerting:.es-query/observability/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/deleteBackfill", + "alerting:apm.error_rate/observability/alert/get", + "alerting:apm.error_rate/observability/alert/find", + "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/observability/alert/getAlertSummary", + "alerting:apm.error_rate/observability/alert/update", + "alerting:apm.transaction_error_rate/observability/alert/get", + "alerting:apm.transaction_error_rate/observability/alert/find", + "alerting:apm.transaction_error_rate/observability/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/observability/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/observability/alert/update", + "alerting:apm.transaction_duration/observability/alert/get", + "alerting:apm.transaction_duration/observability/alert/find", + "alerting:apm.transaction_duration/observability/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/observability/alert/getAlertSummary", + "alerting:apm.transaction_duration/observability/alert/update", + "alerting:apm.anomaly/observability/alert/get", + "alerting:apm.anomaly/observability/alert/find", + "alerting:apm.anomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/observability/alert/getAlertSummary", + "alerting:apm.anomaly/observability/alert/update", + "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/update", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/update", + "alerting:xpack.synthetics.alerts.tls/observability/alert/get", + "alerting:xpack.synthetics.alerts.tls/observability/alert/find", + "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/observability/alert/update", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/get", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/find", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/update", + "alerting:metrics.alert.threshold/observability/alert/get", + "alerting:metrics.alert.threshold/observability/alert/find", + "alerting:metrics.alert.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.threshold/observability/alert/update", + "alerting:metrics.alert.threshold/alerts/alert/get", + "alerting:metrics.alert.threshold/alerts/alert/find", + "alerting:metrics.alert.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/alert/update", + "alerting:metrics.alert.inventory.threshold/observability/alert/get", + "alerting:metrics.alert.inventory.threshold/observability/alert/find", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/alert/update", + "alerting:metrics.alert.inventory.threshold/alerts/alert/get", + "alerting:metrics.alert.inventory.threshold/alerts/alert/find", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/alert/update", + "alerting:xpack.uptime.alerts.tls/observability/alert/get", + "alerting:xpack.uptime.alerts.tls/observability/alert/find", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/alert/update", + "alerting:xpack.uptime.alerts.tls/alerts/alert/get", + "alerting:xpack.uptime.alerts.tls/alerts/alert/find", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/alert/update", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/update", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/update", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/update", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/update", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/update", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/update", + "alerting:logs.alert.document.count/observability/alert/get", + "alerting:logs.alert.document.count/observability/alert/find", + "alerting:logs.alert.document.count/observability/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/observability/alert/getAlertSummary", + "alerting:logs.alert.document.count/observability/alert/update", + "alerting:slo.rules.burnRate/observability/alert/get", + "alerting:slo.rules.burnRate/observability/alert/find", + "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", + "alerting:slo.rules.burnRate/observability/alert/update", + "alerting:slo.rules.burnRate/alerts/alert/get", + "alerting:slo.rules.burnRate/alerts/alert/find", + "alerting:slo.rules.burnRate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/alerts/alert/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/alert/update", + "alerting:observability.rules.custom_threshold/observability/alert/get", + "alerting:observability.rules.custom_threshold/observability/alert/find", + "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/alert/update", + "alerting:.es-query/observability/alert/get", + "alerting:.es-query/observability/alert/find", + "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/observability/alert/getAlertSummary", + "alerting:.es-query/observability/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/update", + ], + "minimal_all": Array [ + "login:", + "api:apm", + "api:apm_write", + "api:rac", + "app:apm", + "app:ux", + "app:kibana", + "ui:catalogue/apm", + "ui:management/insightsAndAlerting/triggersActions", + "ui:navLinks/apm", + "ui:navLinks/ux", + "ui:navLinks/kibana", + "saved_object:telemetry/bulk_get", + "saved_object:telemetry/get", + "saved_object:telemetry/find", + "saved_object:telemetry/open_point_in_time", + "saved_object:telemetry/close_point_in_time", + "saved_object:telemetry/create", + "saved_object:telemetry/bulk_create", + "saved_object:telemetry/update", + "saved_object:telemetry/bulk_update", + "saved_object:telemetry/delete", + "saved_object:telemetry/bulk_delete", + "saved_object:telemetry/share_to_space", + "saved_object:apm-indices/bulk_get", + "saved_object:apm-indices/get", + "saved_object:apm-indices/find", + "saved_object:apm-indices/open_point_in_time", + "saved_object:apm-indices/close_point_in_time", + "saved_object:config/bulk_get", + "saved_object:config/get", + "saved_object:config/find", + "saved_object:config/open_point_in_time", + "saved_object:config/close_point_in_time", + "saved_object:config-global/bulk_get", + "saved_object:config-global/get", + "saved_object:config-global/find", + "saved_object:config-global/open_point_in_time", + "saved_object:config-global/close_point_in_time", + "saved_object:url/bulk_get", + "saved_object:url/get", + "saved_object:url/find", + "saved_object:url/open_point_in_time", + "saved_object:url/close_point_in_time", + "ui:apm/show", + "ui:apm/save", + "ui:apm/alerting:show", + "ui:apm/alerting:save", + "alerting:apm.error_rate/apm/rule/get", + "alerting:apm.error_rate/apm/rule/getRuleState", + "alerting:apm.error_rate/apm/rule/getAlertSummary", + "alerting:apm.error_rate/apm/rule/getExecutionLog", + "alerting:apm.error_rate/apm/rule/getActionErrorLog", + "alerting:apm.error_rate/apm/rule/find", + "alerting:apm.error_rate/apm/rule/getRuleExecutionKPI", + "alerting:apm.error_rate/apm/rule/getBackfill", + "alerting:apm.error_rate/apm/rule/findBackfill", + "alerting:apm.error_rate/apm/rule/create", "alerting:apm.error_rate/apm/rule/delete", "alerting:apm.error_rate/apm/rule/update", "alerting:apm.error_rate/apm/rule/updateApiKey", @@ -844,6 +1604,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.error_rate/apm/rule/runSoon", "alerting:apm.error_rate/apm/rule/scheduleBackfill", "alerting:apm.error_rate/apm/rule/deleteBackfill", + "alerting:apm.error_rate/alerts/rule/get", + "alerting:apm.error_rate/alerts/rule/getRuleState", + "alerting:apm.error_rate/alerts/rule/getAlertSummary", + "alerting:apm.error_rate/alerts/rule/getExecutionLog", + "alerting:apm.error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.error_rate/alerts/rule/find", + "alerting:apm.error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.error_rate/alerts/rule/getBackfill", + "alerting:apm.error_rate/alerts/rule/findBackfill", + "alerting:apm.error_rate/alerts/rule/create", + "alerting:apm.error_rate/alerts/rule/delete", + "alerting:apm.error_rate/alerts/rule/update", + "alerting:apm.error_rate/alerts/rule/updateApiKey", + "alerting:apm.error_rate/alerts/rule/enable", + "alerting:apm.error_rate/alerts/rule/disable", + "alerting:apm.error_rate/alerts/rule/muteAll", + "alerting:apm.error_rate/alerts/rule/unmuteAll", + "alerting:apm.error_rate/alerts/rule/muteAlert", + "alerting:apm.error_rate/alerts/rule/unmuteAlert", + "alerting:apm.error_rate/alerts/rule/snooze", + "alerting:apm.error_rate/alerts/rule/bulkEdit", + "alerting:apm.error_rate/alerts/rule/bulkDelete", + "alerting:apm.error_rate/alerts/rule/bulkEnable", + "alerting:apm.error_rate/alerts/rule/bulkDisable", + "alerting:apm.error_rate/alerts/rule/unsnooze", + "alerting:apm.error_rate/alerts/rule/runSoon", + "alerting:apm.error_rate/alerts/rule/scheduleBackfill", + "alerting:apm.error_rate/alerts/rule/deleteBackfill", "alerting:apm.transaction_error_rate/apm/rule/get", "alerting:apm.transaction_error_rate/apm/rule/getRuleState", "alerting:apm.transaction_error_rate/apm/rule/getAlertSummary", @@ -872,6 +1660,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_error_rate/apm/rule/runSoon", "alerting:apm.transaction_error_rate/apm/rule/scheduleBackfill", "alerting:apm.transaction_error_rate/apm/rule/deleteBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/get", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleState", + "alerting:apm.transaction_error_rate/alerts/rule/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/rule/getExecutionLog", + "alerting:apm.transaction_error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_error_rate/alerts/rule/find", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_error_rate/alerts/rule/getBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/findBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/create", + "alerting:apm.transaction_error_rate/alerts/rule/delete", + "alerting:apm.transaction_error_rate/alerts/rule/update", + "alerting:apm.transaction_error_rate/alerts/rule/updateApiKey", + "alerting:apm.transaction_error_rate/alerts/rule/enable", + "alerting:apm.transaction_error_rate/alerts/rule/disable", + "alerting:apm.transaction_error_rate/alerts/rule/muteAll", + "alerting:apm.transaction_error_rate/alerts/rule/unmuteAll", + "alerting:apm.transaction_error_rate/alerts/rule/muteAlert", + "alerting:apm.transaction_error_rate/alerts/rule/unmuteAlert", + "alerting:apm.transaction_error_rate/alerts/rule/snooze", + "alerting:apm.transaction_error_rate/alerts/rule/bulkEdit", + "alerting:apm.transaction_error_rate/alerts/rule/bulkDelete", + "alerting:apm.transaction_error_rate/alerts/rule/bulkEnable", + "alerting:apm.transaction_error_rate/alerts/rule/bulkDisable", + "alerting:apm.transaction_error_rate/alerts/rule/unsnooze", + "alerting:apm.transaction_error_rate/alerts/rule/runSoon", + "alerting:apm.transaction_error_rate/alerts/rule/scheduleBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/deleteBackfill", "alerting:apm.transaction_duration/apm/rule/get", "alerting:apm.transaction_duration/apm/rule/getRuleState", "alerting:apm.transaction_duration/apm/rule/getAlertSummary", @@ -900,6 +1716,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_duration/apm/rule/runSoon", "alerting:apm.transaction_duration/apm/rule/scheduleBackfill", "alerting:apm.transaction_duration/apm/rule/deleteBackfill", + "alerting:apm.transaction_duration/alerts/rule/get", + "alerting:apm.transaction_duration/alerts/rule/getRuleState", + "alerting:apm.transaction_duration/alerts/rule/getAlertSummary", + "alerting:apm.transaction_duration/alerts/rule/getExecutionLog", + "alerting:apm.transaction_duration/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_duration/alerts/rule/find", + "alerting:apm.transaction_duration/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_duration/alerts/rule/getBackfill", + "alerting:apm.transaction_duration/alerts/rule/findBackfill", + "alerting:apm.transaction_duration/alerts/rule/create", + "alerting:apm.transaction_duration/alerts/rule/delete", + "alerting:apm.transaction_duration/alerts/rule/update", + "alerting:apm.transaction_duration/alerts/rule/updateApiKey", + "alerting:apm.transaction_duration/alerts/rule/enable", + "alerting:apm.transaction_duration/alerts/rule/disable", + "alerting:apm.transaction_duration/alerts/rule/muteAll", + "alerting:apm.transaction_duration/alerts/rule/unmuteAll", + "alerting:apm.transaction_duration/alerts/rule/muteAlert", + "alerting:apm.transaction_duration/alerts/rule/unmuteAlert", + "alerting:apm.transaction_duration/alerts/rule/snooze", + "alerting:apm.transaction_duration/alerts/rule/bulkEdit", + "alerting:apm.transaction_duration/alerts/rule/bulkDelete", + "alerting:apm.transaction_duration/alerts/rule/bulkEnable", + "alerting:apm.transaction_duration/alerts/rule/bulkDisable", + "alerting:apm.transaction_duration/alerts/rule/unsnooze", + "alerting:apm.transaction_duration/alerts/rule/runSoon", + "alerting:apm.transaction_duration/alerts/rule/scheduleBackfill", + "alerting:apm.transaction_duration/alerts/rule/deleteBackfill", "alerting:apm.anomaly/apm/rule/get", "alerting:apm.anomaly/apm/rule/getRuleState", "alerting:apm.anomaly/apm/rule/getAlertSummary", @@ -928,26 +1772,74 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.anomaly/apm/rule/runSoon", "alerting:apm.anomaly/apm/rule/scheduleBackfill", "alerting:apm.anomaly/apm/rule/deleteBackfill", + "alerting:apm.anomaly/alerts/rule/get", + "alerting:apm.anomaly/alerts/rule/getRuleState", + "alerting:apm.anomaly/alerts/rule/getAlertSummary", + "alerting:apm.anomaly/alerts/rule/getExecutionLog", + "alerting:apm.anomaly/alerts/rule/getActionErrorLog", + "alerting:apm.anomaly/alerts/rule/find", + "alerting:apm.anomaly/alerts/rule/getRuleExecutionKPI", + "alerting:apm.anomaly/alerts/rule/getBackfill", + "alerting:apm.anomaly/alerts/rule/findBackfill", + "alerting:apm.anomaly/alerts/rule/create", + "alerting:apm.anomaly/alerts/rule/delete", + "alerting:apm.anomaly/alerts/rule/update", + "alerting:apm.anomaly/alerts/rule/updateApiKey", + "alerting:apm.anomaly/alerts/rule/enable", + "alerting:apm.anomaly/alerts/rule/disable", + "alerting:apm.anomaly/alerts/rule/muteAll", + "alerting:apm.anomaly/alerts/rule/unmuteAll", + "alerting:apm.anomaly/alerts/rule/muteAlert", + "alerting:apm.anomaly/alerts/rule/unmuteAlert", + "alerting:apm.anomaly/alerts/rule/snooze", + "alerting:apm.anomaly/alerts/rule/bulkEdit", + "alerting:apm.anomaly/alerts/rule/bulkDelete", + "alerting:apm.anomaly/alerts/rule/bulkEnable", + "alerting:apm.anomaly/alerts/rule/bulkDisable", + "alerting:apm.anomaly/alerts/rule/unsnooze", + "alerting:apm.anomaly/alerts/rule/runSoon", + "alerting:apm.anomaly/alerts/rule/scheduleBackfill", + "alerting:apm.anomaly/alerts/rule/deleteBackfill", "alerting:apm.error_rate/apm/alert/get", "alerting:apm.error_rate/apm/alert/find", "alerting:apm.error_rate/apm/alert/getAuthorizedAlertsIndices", "alerting:apm.error_rate/apm/alert/getAlertSummary", "alerting:apm.error_rate/apm/alert/update", + "alerting:apm.error_rate/alerts/alert/get", + "alerting:apm.error_rate/alerts/alert/find", + "alerting:apm.error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/alerts/alert/getAlertSummary", + "alerting:apm.error_rate/alerts/alert/update", "alerting:apm.transaction_error_rate/apm/alert/get", "alerting:apm.transaction_error_rate/apm/alert/find", "alerting:apm.transaction_error_rate/apm/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_error_rate/apm/alert/getAlertSummary", "alerting:apm.transaction_error_rate/apm/alert/update", + "alerting:apm.transaction_error_rate/alerts/alert/get", + "alerting:apm.transaction_error_rate/alerts/alert/find", + "alerting:apm.transaction_error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/alerts/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/alert/update", "alerting:apm.transaction_duration/apm/alert/get", "alerting:apm.transaction_duration/apm/alert/find", "alerting:apm.transaction_duration/apm/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_duration/apm/alert/getAlertSummary", "alerting:apm.transaction_duration/apm/alert/update", + "alerting:apm.transaction_duration/alerts/alert/get", + "alerting:apm.transaction_duration/alerts/alert/find", + "alerting:apm.transaction_duration/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/alerts/alert/getAlertSummary", + "alerting:apm.transaction_duration/alerts/alert/update", "alerting:apm.anomaly/apm/alert/get", "alerting:apm.anomaly/apm/alert/find", "alerting:apm.anomaly/apm/alert/getAuthorizedAlertsIndices", "alerting:apm.anomaly/apm/alert/getAlertSummary", "alerting:apm.anomaly/apm/alert/update", + "alerting:apm.anomaly/alerts/alert/get", + "alerting:apm.anomaly/alerts/alert/find", + "alerting:apm.anomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/alerts/alert/getAlertSummary", + "alerting:apm.anomaly/alerts/alert/update", "api:infra", "app:infra", "app:logs", @@ -1012,6 +1904,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:logs.alert.document.count/logs/rule/runSoon", "alerting:logs.alert.document.count/logs/rule/scheduleBackfill", "alerting:logs.alert.document.count/logs/rule/deleteBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/create", + "alerting:logs.alert.document.count/alerts/rule/delete", + "alerting:logs.alert.document.count/alerts/rule/update", + "alerting:logs.alert.document.count/alerts/rule/updateApiKey", + "alerting:logs.alert.document.count/alerts/rule/enable", + "alerting:logs.alert.document.count/alerts/rule/disable", + "alerting:logs.alert.document.count/alerts/rule/muteAll", + "alerting:logs.alert.document.count/alerts/rule/unmuteAll", + "alerting:logs.alert.document.count/alerts/rule/muteAlert", + "alerting:logs.alert.document.count/alerts/rule/unmuteAlert", + "alerting:logs.alert.document.count/alerts/rule/snooze", + "alerting:logs.alert.document.count/alerts/rule/bulkEdit", + "alerting:logs.alert.document.count/alerts/rule/bulkDelete", + "alerting:logs.alert.document.count/alerts/rule/bulkEnable", + "alerting:logs.alert.document.count/alerts/rule/bulkDisable", + "alerting:logs.alert.document.count/alerts/rule/unsnooze", + "alerting:logs.alert.document.count/alerts/rule/runSoon", + "alerting:logs.alert.document.count/alerts/rule/scheduleBackfill", + "alerting:logs.alert.document.count/alerts/rule/deleteBackfill", "alerting:.es-query/logs/rule/get", "alerting:.es-query/logs/rule/getRuleState", "alerting:.es-query/logs/rule/getAlertSummary", @@ -1040,6 +1960,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:.es-query/logs/rule/runSoon", "alerting:.es-query/logs/rule/scheduleBackfill", "alerting:.es-query/logs/rule/deleteBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", + "alerting:.es-query/alerts/rule/create", + "alerting:.es-query/alerts/rule/delete", + "alerting:.es-query/alerts/rule/update", + "alerting:.es-query/alerts/rule/updateApiKey", + "alerting:.es-query/alerts/rule/enable", + "alerting:.es-query/alerts/rule/disable", + "alerting:.es-query/alerts/rule/muteAll", + "alerting:.es-query/alerts/rule/unmuteAll", + "alerting:.es-query/alerts/rule/muteAlert", + "alerting:.es-query/alerts/rule/unmuteAlert", + "alerting:.es-query/alerts/rule/snooze", + "alerting:.es-query/alerts/rule/bulkEdit", + "alerting:.es-query/alerts/rule/bulkDelete", + "alerting:.es-query/alerts/rule/bulkEnable", + "alerting:.es-query/alerts/rule/bulkDisable", + "alerting:.es-query/alerts/rule/unsnooze", + "alerting:.es-query/alerts/rule/runSoon", + "alerting:.es-query/alerts/rule/scheduleBackfill", + "alerting:.es-query/alerts/rule/deleteBackfill", "alerting:observability.rules.custom_threshold/logs/rule/get", "alerting:observability.rules.custom_threshold/logs/rule/getRuleState", "alerting:observability.rules.custom_threshold/logs/rule/getAlertSummary", @@ -1068,6 +2016,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:observability.rules.custom_threshold/logs/rule/runSoon", "alerting:observability.rules.custom_threshold/logs/rule/scheduleBackfill", "alerting:observability.rules.custom_threshold/logs/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/create", + "alerting:observability.rules.custom_threshold/alerts/rule/delete", + "alerting:observability.rules.custom_threshold/alerts/rule/update", + "alerting:observability.rules.custom_threshold/alerts/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/alerts/rule/enable", + "alerting:observability.rules.custom_threshold/alerts/rule/disable", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/snooze", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/alerts/rule/unsnooze", + "alerting:observability.rules.custom_threshold/alerts/rule/runSoon", + "alerting:observability.rules.custom_threshold/alerts/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/deleteBackfill", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/get", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getRuleState", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getAlertSummary", @@ -1096,171 +2072,79 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.ml.anomaly_detection_alert/logs/rule/runSoon", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/scheduleBackfill", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/deleteBackfill", "alerting:logs.alert.document.count/logs/alert/get", "alerting:logs.alert.document.count/logs/alert/find", "alerting:logs.alert.document.count/logs/alert/getAuthorizedAlertsIndices", "alerting:logs.alert.document.count/logs/alert/getAlertSummary", "alerting:logs.alert.document.count/logs/alert/update", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/update", "alerting:.es-query/logs/alert/get", "alerting:.es-query/logs/alert/find", "alerting:.es-query/logs/alert/getAuthorizedAlertsIndices", "alerting:.es-query/logs/alert/getAlertSummary", "alerting:.es-query/logs/alert/update", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/update", "alerting:observability.rules.custom_threshold/logs/alert/get", "alerting:observability.rules.custom_threshold/logs/alert/find", "alerting:observability.rules.custom_threshold/logs/alert/getAuthorizedAlertsIndices", "alerting:observability.rules.custom_threshold/logs/alert/getAlertSummary", "alerting:observability.rules.custom_threshold/logs/alert/update", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/update", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/get", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/find", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAuthorizedAlertsIndices", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAlertSummary", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/update", "app:observability", "ui:catalogue/observability", "ui:navLinks/observability", "ui:observability/read", "ui:observability/write", - "alerting:slo.rules.burnRate/observability/rule/get", - "alerting:slo.rules.burnRate/observability/rule/getRuleState", - "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", - "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", - "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", - "alerting:slo.rules.burnRate/observability/rule/find", - "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", - "alerting:slo.rules.burnRate/observability/rule/getBackfill", - "alerting:slo.rules.burnRate/observability/rule/findBackfill", - "alerting:slo.rules.burnRate/observability/rule/create", - "alerting:slo.rules.burnRate/observability/rule/delete", - "alerting:slo.rules.burnRate/observability/rule/update", - "alerting:slo.rules.burnRate/observability/rule/updateApiKey", - "alerting:slo.rules.burnRate/observability/rule/enable", - "alerting:slo.rules.burnRate/observability/rule/disable", - "alerting:slo.rules.burnRate/observability/rule/muteAll", - "alerting:slo.rules.burnRate/observability/rule/unmuteAll", - "alerting:slo.rules.burnRate/observability/rule/muteAlert", - "alerting:slo.rules.burnRate/observability/rule/unmuteAlert", - "alerting:slo.rules.burnRate/observability/rule/snooze", - "alerting:slo.rules.burnRate/observability/rule/bulkEdit", - "alerting:slo.rules.burnRate/observability/rule/bulkDelete", - "alerting:slo.rules.burnRate/observability/rule/bulkEnable", - "alerting:slo.rules.burnRate/observability/rule/bulkDisable", - "alerting:slo.rules.burnRate/observability/rule/unsnooze", - "alerting:slo.rules.burnRate/observability/rule/runSoon", - "alerting:slo.rules.burnRate/observability/rule/scheduleBackfill", - "alerting:slo.rules.burnRate/observability/rule/deleteBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/get", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", - "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", - "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", - "alerting:observability.rules.custom_threshold/observability/rule/find", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", - "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/create", - "alerting:observability.rules.custom_threshold/observability/rule/delete", - "alerting:observability.rules.custom_threshold/observability/rule/update", - "alerting:observability.rules.custom_threshold/observability/rule/updateApiKey", - "alerting:observability.rules.custom_threshold/observability/rule/enable", - "alerting:observability.rules.custom_threshold/observability/rule/disable", - "alerting:observability.rules.custom_threshold/observability/rule/muteAll", - "alerting:observability.rules.custom_threshold/observability/rule/unmuteAll", - "alerting:observability.rules.custom_threshold/observability/rule/muteAlert", - "alerting:observability.rules.custom_threshold/observability/rule/unmuteAlert", - "alerting:observability.rules.custom_threshold/observability/rule/snooze", - "alerting:observability.rules.custom_threshold/observability/rule/bulkEdit", - "alerting:observability.rules.custom_threshold/observability/rule/bulkDelete", - "alerting:observability.rules.custom_threshold/observability/rule/bulkEnable", - "alerting:observability.rules.custom_threshold/observability/rule/bulkDisable", - "alerting:observability.rules.custom_threshold/observability/rule/unsnooze", - "alerting:observability.rules.custom_threshold/observability/rule/runSoon", - "alerting:observability.rules.custom_threshold/observability/rule/scheduleBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/deleteBackfill", - "alerting:.es-query/observability/rule/get", - "alerting:.es-query/observability/rule/getRuleState", - "alerting:.es-query/observability/rule/getAlertSummary", - "alerting:.es-query/observability/rule/getExecutionLog", - "alerting:.es-query/observability/rule/getActionErrorLog", - "alerting:.es-query/observability/rule/find", - "alerting:.es-query/observability/rule/getRuleExecutionKPI", - "alerting:.es-query/observability/rule/getBackfill", - "alerting:.es-query/observability/rule/findBackfill", - "alerting:.es-query/observability/rule/create", - "alerting:.es-query/observability/rule/delete", - "alerting:.es-query/observability/rule/update", - "alerting:.es-query/observability/rule/updateApiKey", - "alerting:.es-query/observability/rule/enable", - "alerting:.es-query/observability/rule/disable", - "alerting:.es-query/observability/rule/muteAll", - "alerting:.es-query/observability/rule/unmuteAll", - "alerting:.es-query/observability/rule/muteAlert", - "alerting:.es-query/observability/rule/unmuteAlert", - "alerting:.es-query/observability/rule/snooze", - "alerting:.es-query/observability/rule/bulkEdit", - "alerting:.es-query/observability/rule/bulkDelete", - "alerting:.es-query/observability/rule/bulkEnable", - "alerting:.es-query/observability/rule/bulkDisable", - "alerting:.es-query/observability/rule/unsnooze", - "alerting:.es-query/observability/rule/runSoon", - "alerting:.es-query/observability/rule/scheduleBackfill", - "alerting:.es-query/observability/rule/deleteBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/create", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/delete", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/update", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/updateApiKey", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/enable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/disable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAll", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAll", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAlert", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAlert", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/snooze", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEdit", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDelete", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEnable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDisable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unsnooze", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/runSoon", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/scheduleBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/deleteBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/get", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", - "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/find", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", - "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/create", - "alerting:metrics.alert.inventory.threshold/observability/rule/delete", - "alerting:metrics.alert.inventory.threshold/observability/rule/update", - "alerting:metrics.alert.inventory.threshold/observability/rule/updateApiKey", - "alerting:metrics.alert.inventory.threshold/observability/rule/enable", - "alerting:metrics.alert.inventory.threshold/observability/rule/disable", - "alerting:metrics.alert.inventory.threshold/observability/rule/muteAll", - "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAll", - "alerting:metrics.alert.inventory.threshold/observability/rule/muteAlert", - "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAlert", - "alerting:metrics.alert.inventory.threshold/observability/rule/snooze", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEdit", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDelete", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEnable", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDisable", - "alerting:metrics.alert.inventory.threshold/observability/rule/unsnooze", - "alerting:metrics.alert.inventory.threshold/observability/rule/runSoon", - "alerting:metrics.alert.inventory.threshold/observability/rule/scheduleBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/deleteBackfill", "alerting:apm.error_rate/observability/rule/get", "alerting:apm.error_rate/observability/rule/getRuleState", "alerting:apm.error_rate/observability/rule/getAlertSummary", @@ -1401,6 +2285,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/runSoon", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/scheduleBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/deleteBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/create", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/delete", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/update", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/updateApiKey", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/enable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/disable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/muteAll", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unmuteAll", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/muteAlert", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unmuteAlert", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/snooze", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkEdit", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkDelete", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkEnable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unsnooze", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/runSoon", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/deleteBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/get", "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.tls/observability/rule/getAlertSummary", @@ -1429,128 +2341,762 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/rule/runSoon", "alerting:xpack.synthetics.alerts.tls/observability/rule/scheduleBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/deleteBackfill", - "alerting:slo.rules.burnRate/observability/alert/get", - "alerting:slo.rules.burnRate/observability/alert/find", - "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", - "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", - "alerting:slo.rules.burnRate/observability/alert/update", - "alerting:observability.rules.custom_threshold/observability/alert/get", - "alerting:observability.rules.custom_threshold/observability/alert/find", - "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/alert/update", - "alerting:.es-query/observability/alert/get", - "alerting:.es-query/observability/alert/find", - "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", - "alerting:.es-query/observability/alert/getAlertSummary", - "alerting:.es-query/observability/alert/update", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/update", - "alerting:metrics.alert.inventory.threshold/observability/alert/get", - "alerting:metrics.alert.inventory.threshold/observability/alert/find", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/alert/update", - "alerting:apm.error_rate/observability/alert/get", - "alerting:apm.error_rate/observability/alert/find", - "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", - "alerting:apm.error_rate/observability/alert/getAlertSummary", - "alerting:apm.error_rate/observability/alert/update", - "alerting:apm.transaction_error_rate/observability/alert/get", - "alerting:apm.transaction_error_rate/observability/alert/find", - "alerting:apm.transaction_error_rate/observability/alert/getAuthorizedAlertsIndices", - "alerting:apm.transaction_error_rate/observability/alert/getAlertSummary", - "alerting:apm.transaction_error_rate/observability/alert/update", - "alerting:apm.transaction_duration/observability/alert/get", - "alerting:apm.transaction_duration/observability/alert/find", - "alerting:apm.transaction_duration/observability/alert/getAuthorizedAlertsIndices", - "alerting:apm.transaction_duration/observability/alert/getAlertSummary", - "alerting:apm.transaction_duration/observability/alert/update", - "alerting:apm.anomaly/observability/alert/get", - "alerting:apm.anomaly/observability/alert/find", - "alerting:apm.anomaly/observability/alert/getAuthorizedAlertsIndices", - "alerting:apm.anomaly/observability/alert/getAlertSummary", - "alerting:apm.anomaly/observability/alert/update", - "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/get", - "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", - "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAlertSummary", - "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/update", - "alerting:xpack.synthetics.alerts.tls/observability/alert/get", - "alerting:xpack.synthetics.alerts.tls/observability/alert/find", - "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", - "alerting:xpack.synthetics.alerts.tls/observability/alert/update", - ], - "minimal_read": Array [ - "login:", - "api:apm", - "api:rac", - "app:apm", - "app:ux", - "app:kibana", - "ui:catalogue/apm", - "ui:management/insightsAndAlerting/triggersActions", - "ui:navLinks/apm", - "ui:navLinks/ux", - "ui:navLinks/kibana", - "saved_object:apm-indices/bulk_get", - "saved_object:apm-indices/get", - "saved_object:apm-indices/find", - "saved_object:apm-indices/open_point_in_time", - "saved_object:apm-indices/close_point_in_time", - "saved_object:config/bulk_get", - "saved_object:config/get", - "saved_object:config/find", - "saved_object:config/open_point_in_time", - "saved_object:config/close_point_in_time", - "saved_object:config-global/bulk_get", - "saved_object:config-global/get", - "saved_object:config-global/find", - "saved_object:config-global/open_point_in_time", - "saved_object:config-global/close_point_in_time", - "saved_object:telemetry/bulk_get", - "saved_object:telemetry/get", - "saved_object:telemetry/find", - "saved_object:telemetry/open_point_in_time", - "saved_object:telemetry/close_point_in_time", - "saved_object:url/bulk_get", - "saved_object:url/get", - "saved_object:url/find", - "saved_object:url/open_point_in_time", - "saved_object:url/close_point_in_time", - "ui:apm/show", - "ui:apm/alerting:show", - "alerting:apm.error_rate/apm/rule/get", - "alerting:apm.error_rate/apm/rule/getRuleState", - "alerting:apm.error_rate/apm/rule/getAlertSummary", - "alerting:apm.error_rate/apm/rule/getExecutionLog", - "alerting:apm.error_rate/apm/rule/getActionErrorLog", - "alerting:apm.error_rate/apm/rule/find", - "alerting:apm.error_rate/apm/rule/getRuleExecutionKPI", - "alerting:apm.error_rate/apm/rule/getBackfill", - "alerting:apm.error_rate/apm/rule/findBackfill", - "alerting:apm.transaction_error_rate/apm/rule/get", - "alerting:apm.transaction_error_rate/apm/rule/getRuleState", - "alerting:apm.transaction_error_rate/apm/rule/getAlertSummary", - "alerting:apm.transaction_error_rate/apm/rule/getExecutionLog", - "alerting:apm.transaction_error_rate/apm/rule/getActionErrorLog", - "alerting:apm.transaction_error_rate/apm/rule/find", - "alerting:apm.transaction_error_rate/apm/rule/getRuleExecutionKPI", - "alerting:apm.transaction_error_rate/apm/rule/getBackfill", - "alerting:apm.transaction_error_rate/apm/rule/findBackfill", - "alerting:apm.transaction_duration/apm/rule/get", - "alerting:apm.transaction_duration/apm/rule/getRuleState", - "alerting:apm.transaction_duration/apm/rule/getAlertSummary", - "alerting:apm.transaction_duration/apm/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/get", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/find", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/create", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/delete", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/update", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/updateApiKey", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/enable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/disable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/muteAll", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unmuteAll", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/muteAlert", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unmuteAlert", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/snooze", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkEdit", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkDelete", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkEnable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unsnooze", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/runSoon", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/deleteBackfill", + "alerting:metrics.alert.threshold/observability/rule/get", + "alerting:metrics.alert.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/observability/rule/find", + "alerting:metrics.alert.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.threshold/observability/rule/create", + "alerting:metrics.alert.threshold/observability/rule/delete", + "alerting:metrics.alert.threshold/observability/rule/update", + "alerting:metrics.alert.threshold/observability/rule/updateApiKey", + "alerting:metrics.alert.threshold/observability/rule/enable", + "alerting:metrics.alert.threshold/observability/rule/disable", + "alerting:metrics.alert.threshold/observability/rule/muteAll", + "alerting:metrics.alert.threshold/observability/rule/unmuteAll", + "alerting:metrics.alert.threshold/observability/rule/muteAlert", + "alerting:metrics.alert.threshold/observability/rule/unmuteAlert", + "alerting:metrics.alert.threshold/observability/rule/snooze", + "alerting:metrics.alert.threshold/observability/rule/bulkEdit", + "alerting:metrics.alert.threshold/observability/rule/bulkDelete", + "alerting:metrics.alert.threshold/observability/rule/bulkEnable", + "alerting:metrics.alert.threshold/observability/rule/bulkDisable", + "alerting:metrics.alert.threshold/observability/rule/unsnooze", + "alerting:metrics.alert.threshold/observability/rule/runSoon", + "alerting:metrics.alert.threshold/observability/rule/scheduleBackfill", + "alerting:metrics.alert.threshold/observability/rule/deleteBackfill", + "alerting:metrics.alert.threshold/alerts/rule/get", + "alerting:metrics.alert.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/alerts/rule/find", + "alerting:metrics.alert.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.threshold/alerts/rule/create", + "alerting:metrics.alert.threshold/alerts/rule/delete", + "alerting:metrics.alert.threshold/alerts/rule/update", + "alerting:metrics.alert.threshold/alerts/rule/updateApiKey", + "alerting:metrics.alert.threshold/alerts/rule/enable", + "alerting:metrics.alert.threshold/alerts/rule/disable", + "alerting:metrics.alert.threshold/alerts/rule/muteAll", + "alerting:metrics.alert.threshold/alerts/rule/unmuteAll", + "alerting:metrics.alert.threshold/alerts/rule/muteAlert", + "alerting:metrics.alert.threshold/alerts/rule/unmuteAlert", + "alerting:metrics.alert.threshold/alerts/rule/snooze", + "alerting:metrics.alert.threshold/alerts/rule/bulkEdit", + "alerting:metrics.alert.threshold/alerts/rule/bulkDelete", + "alerting:metrics.alert.threshold/alerts/rule/bulkEnable", + "alerting:metrics.alert.threshold/alerts/rule/bulkDisable", + "alerting:metrics.alert.threshold/alerts/rule/unsnooze", + "alerting:metrics.alert.threshold/alerts/rule/runSoon", + "alerting:metrics.alert.threshold/alerts/rule/scheduleBackfill", + "alerting:metrics.alert.threshold/alerts/rule/deleteBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/get", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/find", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/create", + "alerting:metrics.alert.inventory.threshold/observability/rule/delete", + "alerting:metrics.alert.inventory.threshold/observability/rule/update", + "alerting:metrics.alert.inventory.threshold/observability/rule/updateApiKey", + "alerting:metrics.alert.inventory.threshold/observability/rule/enable", + "alerting:metrics.alert.inventory.threshold/observability/rule/disable", + "alerting:metrics.alert.inventory.threshold/observability/rule/muteAll", + "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAll", + "alerting:metrics.alert.inventory.threshold/observability/rule/muteAlert", + "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAlert", + "alerting:metrics.alert.inventory.threshold/observability/rule/snooze", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEdit", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDelete", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEnable", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDisable", + "alerting:metrics.alert.inventory.threshold/observability/rule/unsnooze", + "alerting:metrics.alert.inventory.threshold/observability/rule/runSoon", + "alerting:metrics.alert.inventory.threshold/observability/rule/scheduleBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/deleteBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/get", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/find", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/create", + "alerting:metrics.alert.inventory.threshold/alerts/rule/delete", + "alerting:metrics.alert.inventory.threshold/alerts/rule/update", + "alerting:metrics.alert.inventory.threshold/alerts/rule/updateApiKey", + "alerting:metrics.alert.inventory.threshold/alerts/rule/enable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/disable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/muteAll", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unmuteAll", + "alerting:metrics.alert.inventory.threshold/alerts/rule/muteAlert", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unmuteAlert", + "alerting:metrics.alert.inventory.threshold/alerts/rule/snooze", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkEdit", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkDelete", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkEnable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkDisable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unsnooze", + "alerting:metrics.alert.inventory.threshold/alerts/rule/runSoon", + "alerting:metrics.alert.inventory.threshold/alerts/rule/scheduleBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/get", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/find", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/create", + "alerting:xpack.uptime.alerts.tls/observability/rule/delete", + "alerting:xpack.uptime.alerts.tls/observability/rule/update", + "alerting:xpack.uptime.alerts.tls/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tls/observability/rule/enable", + "alerting:xpack.uptime.alerts.tls/observability/rule/disable", + "alerting:xpack.uptime.alerts.tls/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.tls/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tls/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.tls/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tls/observability/rule/snooze", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tls/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.tls/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.tls/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/get", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/find", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/create", + "alerting:xpack.uptime.alerts.tls/alerts/rule/delete", + "alerting:xpack.uptime.alerts.tls/alerts/rule/update", + "alerting:xpack.uptime.alerts.tls/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tls/alerts/rule/enable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/disable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tls/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tls/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.tls/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.tls/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/create", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/delete", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/update", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/enable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/disable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/snooze", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/create", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/delete", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/update", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/enable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/disable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/create", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/delete", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/update", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/enable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/disable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/snooze", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/create", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/delete", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/update", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/enable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/disable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/create", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/delete", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/update", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/enable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/disable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/snooze", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/create", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/delete", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/update", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/enable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/disable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/deleteBackfill", + "alerting:logs.alert.document.count/observability/rule/get", + "alerting:logs.alert.document.count/observability/rule/getRuleState", + "alerting:logs.alert.document.count/observability/rule/getAlertSummary", + "alerting:logs.alert.document.count/observability/rule/getExecutionLog", + "alerting:logs.alert.document.count/observability/rule/getActionErrorLog", + "alerting:logs.alert.document.count/observability/rule/find", + "alerting:logs.alert.document.count/observability/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/observability/rule/getBackfill", + "alerting:logs.alert.document.count/observability/rule/findBackfill", + "alerting:logs.alert.document.count/observability/rule/create", + "alerting:logs.alert.document.count/observability/rule/delete", + "alerting:logs.alert.document.count/observability/rule/update", + "alerting:logs.alert.document.count/observability/rule/updateApiKey", + "alerting:logs.alert.document.count/observability/rule/enable", + "alerting:logs.alert.document.count/observability/rule/disable", + "alerting:logs.alert.document.count/observability/rule/muteAll", + "alerting:logs.alert.document.count/observability/rule/unmuteAll", + "alerting:logs.alert.document.count/observability/rule/muteAlert", + "alerting:logs.alert.document.count/observability/rule/unmuteAlert", + "alerting:logs.alert.document.count/observability/rule/snooze", + "alerting:logs.alert.document.count/observability/rule/bulkEdit", + "alerting:logs.alert.document.count/observability/rule/bulkDelete", + "alerting:logs.alert.document.count/observability/rule/bulkEnable", + "alerting:logs.alert.document.count/observability/rule/bulkDisable", + "alerting:logs.alert.document.count/observability/rule/unsnooze", + "alerting:logs.alert.document.count/observability/rule/runSoon", + "alerting:logs.alert.document.count/observability/rule/scheduleBackfill", + "alerting:logs.alert.document.count/observability/rule/deleteBackfill", + "alerting:slo.rules.burnRate/observability/rule/get", + "alerting:slo.rules.burnRate/observability/rule/getRuleState", + "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", + "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", + "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/observability/rule/find", + "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/observability/rule/getBackfill", + "alerting:slo.rules.burnRate/observability/rule/findBackfill", + "alerting:slo.rules.burnRate/observability/rule/create", + "alerting:slo.rules.burnRate/observability/rule/delete", + "alerting:slo.rules.burnRate/observability/rule/update", + "alerting:slo.rules.burnRate/observability/rule/updateApiKey", + "alerting:slo.rules.burnRate/observability/rule/enable", + "alerting:slo.rules.burnRate/observability/rule/disable", + "alerting:slo.rules.burnRate/observability/rule/muteAll", + "alerting:slo.rules.burnRate/observability/rule/unmuteAll", + "alerting:slo.rules.burnRate/observability/rule/muteAlert", + "alerting:slo.rules.burnRate/observability/rule/unmuteAlert", + "alerting:slo.rules.burnRate/observability/rule/snooze", + "alerting:slo.rules.burnRate/observability/rule/bulkEdit", + "alerting:slo.rules.burnRate/observability/rule/bulkDelete", + "alerting:slo.rules.burnRate/observability/rule/bulkEnable", + "alerting:slo.rules.burnRate/observability/rule/bulkDisable", + "alerting:slo.rules.burnRate/observability/rule/unsnooze", + "alerting:slo.rules.burnRate/observability/rule/runSoon", + "alerting:slo.rules.burnRate/observability/rule/scheduleBackfill", + "alerting:slo.rules.burnRate/observability/rule/deleteBackfill", + "alerting:slo.rules.burnRate/alerts/rule/get", + "alerting:slo.rules.burnRate/alerts/rule/getRuleState", + "alerting:slo.rules.burnRate/alerts/rule/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/rule/getExecutionLog", + "alerting:slo.rules.burnRate/alerts/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/alerts/rule/find", + "alerting:slo.rules.burnRate/alerts/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/alerts/rule/getBackfill", + "alerting:slo.rules.burnRate/alerts/rule/findBackfill", + "alerting:slo.rules.burnRate/alerts/rule/create", + "alerting:slo.rules.burnRate/alerts/rule/delete", + "alerting:slo.rules.burnRate/alerts/rule/update", + "alerting:slo.rules.burnRate/alerts/rule/updateApiKey", + "alerting:slo.rules.burnRate/alerts/rule/enable", + "alerting:slo.rules.burnRate/alerts/rule/disable", + "alerting:slo.rules.burnRate/alerts/rule/muteAll", + "alerting:slo.rules.burnRate/alerts/rule/unmuteAll", + "alerting:slo.rules.burnRate/alerts/rule/muteAlert", + "alerting:slo.rules.burnRate/alerts/rule/unmuteAlert", + "alerting:slo.rules.burnRate/alerts/rule/snooze", + "alerting:slo.rules.burnRate/alerts/rule/bulkEdit", + "alerting:slo.rules.burnRate/alerts/rule/bulkDelete", + "alerting:slo.rules.burnRate/alerts/rule/bulkEnable", + "alerting:slo.rules.burnRate/alerts/rule/bulkDisable", + "alerting:slo.rules.burnRate/alerts/rule/unsnooze", + "alerting:slo.rules.burnRate/alerts/rule/runSoon", + "alerting:slo.rules.burnRate/alerts/rule/scheduleBackfill", + "alerting:slo.rules.burnRate/alerts/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/get", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", + "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/observability/rule/find", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/create", + "alerting:observability.rules.custom_threshold/observability/rule/delete", + "alerting:observability.rules.custom_threshold/observability/rule/update", + "alerting:observability.rules.custom_threshold/observability/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/observability/rule/enable", + "alerting:observability.rules.custom_threshold/observability/rule/disable", + "alerting:observability.rules.custom_threshold/observability/rule/muteAll", + "alerting:observability.rules.custom_threshold/observability/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/observability/rule/muteAlert", + "alerting:observability.rules.custom_threshold/observability/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/observability/rule/snooze", + "alerting:observability.rules.custom_threshold/observability/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/observability/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/observability/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/observability/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/observability/rule/unsnooze", + "alerting:observability.rules.custom_threshold/observability/rule/runSoon", + "alerting:observability.rules.custom_threshold/observability/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/deleteBackfill", + "alerting:.es-query/observability/rule/get", + "alerting:.es-query/observability/rule/getRuleState", + "alerting:.es-query/observability/rule/getAlertSummary", + "alerting:.es-query/observability/rule/getExecutionLog", + "alerting:.es-query/observability/rule/getActionErrorLog", + "alerting:.es-query/observability/rule/find", + "alerting:.es-query/observability/rule/getRuleExecutionKPI", + "alerting:.es-query/observability/rule/getBackfill", + "alerting:.es-query/observability/rule/findBackfill", + "alerting:.es-query/observability/rule/create", + "alerting:.es-query/observability/rule/delete", + "alerting:.es-query/observability/rule/update", + "alerting:.es-query/observability/rule/updateApiKey", + "alerting:.es-query/observability/rule/enable", + "alerting:.es-query/observability/rule/disable", + "alerting:.es-query/observability/rule/muteAll", + "alerting:.es-query/observability/rule/unmuteAll", + "alerting:.es-query/observability/rule/muteAlert", + "alerting:.es-query/observability/rule/unmuteAlert", + "alerting:.es-query/observability/rule/snooze", + "alerting:.es-query/observability/rule/bulkEdit", + "alerting:.es-query/observability/rule/bulkDelete", + "alerting:.es-query/observability/rule/bulkEnable", + "alerting:.es-query/observability/rule/bulkDisable", + "alerting:.es-query/observability/rule/unsnooze", + "alerting:.es-query/observability/rule/runSoon", + "alerting:.es-query/observability/rule/scheduleBackfill", + "alerting:.es-query/observability/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/deleteBackfill", + "alerting:apm.error_rate/observability/alert/get", + "alerting:apm.error_rate/observability/alert/find", + "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/observability/alert/getAlertSummary", + "alerting:apm.error_rate/observability/alert/update", + "alerting:apm.transaction_error_rate/observability/alert/get", + "alerting:apm.transaction_error_rate/observability/alert/find", + "alerting:apm.transaction_error_rate/observability/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/observability/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/observability/alert/update", + "alerting:apm.transaction_duration/observability/alert/get", + "alerting:apm.transaction_duration/observability/alert/find", + "alerting:apm.transaction_duration/observability/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/observability/alert/getAlertSummary", + "alerting:apm.transaction_duration/observability/alert/update", + "alerting:apm.anomaly/observability/alert/get", + "alerting:apm.anomaly/observability/alert/find", + "alerting:apm.anomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/observability/alert/getAlertSummary", + "alerting:apm.anomaly/observability/alert/update", + "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/update", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/update", + "alerting:xpack.synthetics.alerts.tls/observability/alert/get", + "alerting:xpack.synthetics.alerts.tls/observability/alert/find", + "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/observability/alert/update", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/get", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/find", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/update", + "alerting:metrics.alert.threshold/observability/alert/get", + "alerting:metrics.alert.threshold/observability/alert/find", + "alerting:metrics.alert.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.threshold/observability/alert/update", + "alerting:metrics.alert.threshold/alerts/alert/get", + "alerting:metrics.alert.threshold/alerts/alert/find", + "alerting:metrics.alert.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/alert/update", + "alerting:metrics.alert.inventory.threshold/observability/alert/get", + "alerting:metrics.alert.inventory.threshold/observability/alert/find", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/alert/update", + "alerting:metrics.alert.inventory.threshold/alerts/alert/get", + "alerting:metrics.alert.inventory.threshold/alerts/alert/find", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/alert/update", + "alerting:xpack.uptime.alerts.tls/observability/alert/get", + "alerting:xpack.uptime.alerts.tls/observability/alert/find", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/alert/update", + "alerting:xpack.uptime.alerts.tls/alerts/alert/get", + "alerting:xpack.uptime.alerts.tls/alerts/alert/find", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/alert/update", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/update", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/update", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/update", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/update", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/update", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/update", + "alerting:logs.alert.document.count/observability/alert/get", + "alerting:logs.alert.document.count/observability/alert/find", + "alerting:logs.alert.document.count/observability/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/observability/alert/getAlertSummary", + "alerting:logs.alert.document.count/observability/alert/update", + "alerting:slo.rules.burnRate/observability/alert/get", + "alerting:slo.rules.burnRate/observability/alert/find", + "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", + "alerting:slo.rules.burnRate/observability/alert/update", + "alerting:slo.rules.burnRate/alerts/alert/get", + "alerting:slo.rules.burnRate/alerts/alert/find", + "alerting:slo.rules.burnRate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/alerts/alert/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/alert/update", + "alerting:observability.rules.custom_threshold/observability/alert/get", + "alerting:observability.rules.custom_threshold/observability/alert/find", + "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/alert/update", + "alerting:.es-query/observability/alert/get", + "alerting:.es-query/observability/alert/find", + "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/observability/alert/getAlertSummary", + "alerting:.es-query/observability/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/update", + ], + "minimal_read": Array [ + "login:", + "api:apm", + "api:rac", + "app:apm", + "app:ux", + "app:kibana", + "ui:catalogue/apm", + "ui:management/insightsAndAlerting/triggersActions", + "ui:navLinks/apm", + "ui:navLinks/ux", + "ui:navLinks/kibana", + "saved_object:apm-indices/bulk_get", + "saved_object:apm-indices/get", + "saved_object:apm-indices/find", + "saved_object:apm-indices/open_point_in_time", + "saved_object:apm-indices/close_point_in_time", + "saved_object:config/bulk_get", + "saved_object:config/get", + "saved_object:config/find", + "saved_object:config/open_point_in_time", + "saved_object:config/close_point_in_time", + "saved_object:config-global/bulk_get", + "saved_object:config-global/get", + "saved_object:config-global/find", + "saved_object:config-global/open_point_in_time", + "saved_object:config-global/close_point_in_time", + "saved_object:telemetry/bulk_get", + "saved_object:telemetry/get", + "saved_object:telemetry/find", + "saved_object:telemetry/open_point_in_time", + "saved_object:telemetry/close_point_in_time", + "saved_object:url/bulk_get", + "saved_object:url/get", + "saved_object:url/find", + "saved_object:url/open_point_in_time", + "saved_object:url/close_point_in_time", + "ui:apm/show", + "ui:apm/alerting:show", + "alerting:apm.error_rate/apm/rule/get", + "alerting:apm.error_rate/apm/rule/getRuleState", + "alerting:apm.error_rate/apm/rule/getAlertSummary", + "alerting:apm.error_rate/apm/rule/getExecutionLog", + "alerting:apm.error_rate/apm/rule/getActionErrorLog", + "alerting:apm.error_rate/apm/rule/find", + "alerting:apm.error_rate/apm/rule/getRuleExecutionKPI", + "alerting:apm.error_rate/apm/rule/getBackfill", + "alerting:apm.error_rate/apm/rule/findBackfill", + "alerting:apm.error_rate/alerts/rule/get", + "alerting:apm.error_rate/alerts/rule/getRuleState", + "alerting:apm.error_rate/alerts/rule/getAlertSummary", + "alerting:apm.error_rate/alerts/rule/getExecutionLog", + "alerting:apm.error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.error_rate/alerts/rule/find", + "alerting:apm.error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.error_rate/alerts/rule/getBackfill", + "alerting:apm.error_rate/alerts/rule/findBackfill", + "alerting:apm.transaction_error_rate/apm/rule/get", + "alerting:apm.transaction_error_rate/apm/rule/getRuleState", + "alerting:apm.transaction_error_rate/apm/rule/getAlertSummary", + "alerting:apm.transaction_error_rate/apm/rule/getExecutionLog", + "alerting:apm.transaction_error_rate/apm/rule/getActionErrorLog", + "alerting:apm.transaction_error_rate/apm/rule/find", + "alerting:apm.transaction_error_rate/apm/rule/getRuleExecutionKPI", + "alerting:apm.transaction_error_rate/apm/rule/getBackfill", + "alerting:apm.transaction_error_rate/apm/rule/findBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/get", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleState", + "alerting:apm.transaction_error_rate/alerts/rule/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/rule/getExecutionLog", + "alerting:apm.transaction_error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_error_rate/alerts/rule/find", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_error_rate/alerts/rule/getBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/findBackfill", + "alerting:apm.transaction_duration/apm/rule/get", + "alerting:apm.transaction_duration/apm/rule/getRuleState", + "alerting:apm.transaction_duration/apm/rule/getAlertSummary", + "alerting:apm.transaction_duration/apm/rule/getExecutionLog", "alerting:apm.transaction_duration/apm/rule/getActionErrorLog", "alerting:apm.transaction_duration/apm/rule/find", "alerting:apm.transaction_duration/apm/rule/getRuleExecutionKPI", "alerting:apm.transaction_duration/apm/rule/getBackfill", "alerting:apm.transaction_duration/apm/rule/findBackfill", + "alerting:apm.transaction_duration/alerts/rule/get", + "alerting:apm.transaction_duration/alerts/rule/getRuleState", + "alerting:apm.transaction_duration/alerts/rule/getAlertSummary", + "alerting:apm.transaction_duration/alerts/rule/getExecutionLog", + "alerting:apm.transaction_duration/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_duration/alerts/rule/find", + "alerting:apm.transaction_duration/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_duration/alerts/rule/getBackfill", + "alerting:apm.transaction_duration/alerts/rule/findBackfill", "alerting:apm.anomaly/apm/rule/get", "alerting:apm.anomaly/apm/rule/getRuleState", "alerting:apm.anomaly/apm/rule/getAlertSummary", @@ -1560,22 +3106,47 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.anomaly/apm/rule/getRuleExecutionKPI", "alerting:apm.anomaly/apm/rule/getBackfill", "alerting:apm.anomaly/apm/rule/findBackfill", + "alerting:apm.anomaly/alerts/rule/get", + "alerting:apm.anomaly/alerts/rule/getRuleState", + "alerting:apm.anomaly/alerts/rule/getAlertSummary", + "alerting:apm.anomaly/alerts/rule/getExecutionLog", + "alerting:apm.anomaly/alerts/rule/getActionErrorLog", + "alerting:apm.anomaly/alerts/rule/find", + "alerting:apm.anomaly/alerts/rule/getRuleExecutionKPI", + "alerting:apm.anomaly/alerts/rule/getBackfill", + "alerting:apm.anomaly/alerts/rule/findBackfill", "alerting:apm.error_rate/apm/alert/get", "alerting:apm.error_rate/apm/alert/find", "alerting:apm.error_rate/apm/alert/getAuthorizedAlertsIndices", "alerting:apm.error_rate/apm/alert/getAlertSummary", + "alerting:apm.error_rate/alerts/alert/get", + "alerting:apm.error_rate/alerts/alert/find", + "alerting:apm.error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/alerts/alert/getAlertSummary", "alerting:apm.transaction_error_rate/apm/alert/get", "alerting:apm.transaction_error_rate/apm/alert/find", "alerting:apm.transaction_error_rate/apm/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_error_rate/apm/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/alert/get", + "alerting:apm.transaction_error_rate/alerts/alert/find", + "alerting:apm.transaction_error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/alerts/alert/getAlertSummary", "alerting:apm.transaction_duration/apm/alert/get", "alerting:apm.transaction_duration/apm/alert/find", "alerting:apm.transaction_duration/apm/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_duration/apm/alert/getAlertSummary", + "alerting:apm.transaction_duration/alerts/alert/get", + "alerting:apm.transaction_duration/alerts/alert/find", + "alerting:apm.transaction_duration/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/alerts/alert/getAlertSummary", "alerting:apm.anomaly/apm/alert/get", "alerting:apm.anomaly/apm/alert/find", "alerting:apm.anomaly/apm/alert/getAuthorizedAlertsIndices", "alerting:apm.anomaly/apm/alert/getAlertSummary", + "alerting:apm.anomaly/alerts/alert/get", + "alerting:apm.anomaly/alerts/alert/find", + "alerting:apm.anomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/alerts/alert/getAlertSummary", "api:infra", "app:infra", "app:logs", @@ -1605,6 +3176,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:logs.alert.document.count/logs/rule/getRuleExecutionKPI", "alerting:logs.alert.document.count/logs/rule/getBackfill", "alerting:logs.alert.document.count/logs/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", "alerting:.es-query/logs/rule/get", "alerting:.es-query/logs/rule/getRuleState", "alerting:.es-query/logs/rule/getAlertSummary", @@ -1614,6 +3194,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:.es-query/logs/rule/getRuleExecutionKPI", "alerting:.es-query/logs/rule/getBackfill", "alerting:.es-query/logs/rule/findBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", "alerting:observability.rules.custom_threshold/logs/rule/get", "alerting:observability.rules.custom_threshold/logs/rule/getRuleState", "alerting:observability.rules.custom_threshold/logs/rule/getAlertSummary", @@ -1623,6 +3212,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:observability.rules.custom_threshold/logs/rule/getRuleExecutionKPI", "alerting:observability.rules.custom_threshold/logs/rule/getBackfill", "alerting:observability.rules.custom_threshold/logs/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/get", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getRuleState", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getAlertSummary", @@ -1632,71 +3230,51 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getRuleExecutionKPI", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getBackfill", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", "alerting:logs.alert.document.count/logs/alert/get", "alerting:logs.alert.document.count/logs/alert/find", "alerting:logs.alert.document.count/logs/alert/getAuthorizedAlertsIndices", "alerting:logs.alert.document.count/logs/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", "alerting:.es-query/logs/alert/get", "alerting:.es-query/logs/alert/find", "alerting:.es-query/logs/alert/getAuthorizedAlertsIndices", "alerting:.es-query/logs/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", "alerting:observability.rules.custom_threshold/logs/alert/get", "alerting:observability.rules.custom_threshold/logs/alert/find", "alerting:observability.rules.custom_threshold/logs/alert/getAuthorizedAlertsIndices", "alerting:observability.rules.custom_threshold/logs/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/get", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/find", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAuthorizedAlertsIndices", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", "app:observability", "ui:catalogue/observability", "ui:navLinks/observability", "ui:observability/read", - "alerting:slo.rules.burnRate/observability/rule/get", - "alerting:slo.rules.burnRate/observability/rule/getRuleState", - "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", - "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", - "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", - "alerting:slo.rules.burnRate/observability/rule/find", - "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", - "alerting:slo.rules.burnRate/observability/rule/getBackfill", - "alerting:slo.rules.burnRate/observability/rule/findBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/get", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", - "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", - "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", - "alerting:observability.rules.custom_threshold/observability/rule/find", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", - "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", - "alerting:.es-query/observability/rule/get", - "alerting:.es-query/observability/rule/getRuleState", - "alerting:.es-query/observability/rule/getAlertSummary", - "alerting:.es-query/observability/rule/getExecutionLog", - "alerting:.es-query/observability/rule/getActionErrorLog", - "alerting:.es-query/observability/rule/find", - "alerting:.es-query/observability/rule/getRuleExecutionKPI", - "alerting:.es-query/observability/rule/getBackfill", - "alerting:.es-query/observability/rule/findBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/get", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", - "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/find", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", - "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", "alerting:apm.error_rate/observability/rule/get", "alerting:apm.error_rate/observability/rule/getRuleState", "alerting:apm.error_rate/observability/rule/getAlertSummary", @@ -1742,6 +3320,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/findBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/get", "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.tls/observability/rule/getAlertSummary", @@ -1751,26 +3338,177 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleExecutionKPI", "alerting:xpack.synthetics.alerts.tls/observability/rule/getBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/findBackfill", - "alerting:slo.rules.burnRate/observability/alert/get", - "alerting:slo.rules.burnRate/observability/alert/find", - "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", - "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/alert/get", - "alerting:observability.rules.custom_threshold/observability/alert/find", - "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", - "alerting:.es-query/observability/alert/get", - "alerting:.es-query/observability/alert/find", - "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", - "alerting:.es-query/observability/alert/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/alert/get", - "alerting:metrics.alert.inventory.threshold/observability/alert/find", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/get", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/find", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/findBackfill", + "alerting:metrics.alert.threshold/observability/rule/get", + "alerting:metrics.alert.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/observability/rule/find", + "alerting:metrics.alert.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.threshold/alerts/rule/get", + "alerting:metrics.alert.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/alerts/rule/find", + "alerting:metrics.alert.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/get", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/find", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/get", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/find", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/get", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/find", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/get", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/find", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/findBackfill", + "alerting:logs.alert.document.count/observability/rule/get", + "alerting:logs.alert.document.count/observability/rule/getRuleState", + "alerting:logs.alert.document.count/observability/rule/getAlertSummary", + "alerting:logs.alert.document.count/observability/rule/getExecutionLog", + "alerting:logs.alert.document.count/observability/rule/getActionErrorLog", + "alerting:logs.alert.document.count/observability/rule/find", + "alerting:logs.alert.document.count/observability/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/observability/rule/getBackfill", + "alerting:logs.alert.document.count/observability/rule/findBackfill", + "alerting:slo.rules.burnRate/observability/rule/get", + "alerting:slo.rules.burnRate/observability/rule/getRuleState", + "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", + "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", + "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/observability/rule/find", + "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/observability/rule/getBackfill", + "alerting:slo.rules.burnRate/observability/rule/findBackfill", + "alerting:slo.rules.burnRate/alerts/rule/get", + "alerting:slo.rules.burnRate/alerts/rule/getRuleState", + "alerting:slo.rules.burnRate/alerts/rule/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/rule/getExecutionLog", + "alerting:slo.rules.burnRate/alerts/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/alerts/rule/find", + "alerting:slo.rules.burnRate/alerts/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/alerts/rule/getBackfill", + "alerting:slo.rules.burnRate/alerts/rule/findBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/get", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", + "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/observability/rule/find", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", + "alerting:.es-query/observability/rule/get", + "alerting:.es-query/observability/rule/getRuleState", + "alerting:.es-query/observability/rule/getAlertSummary", + "alerting:.es-query/observability/rule/getExecutionLog", + "alerting:.es-query/observability/rule/getActionErrorLog", + "alerting:.es-query/observability/rule/find", + "alerting:.es-query/observability/rule/getRuleExecutionKPI", + "alerting:.es-query/observability/rule/getBackfill", + "alerting:.es-query/observability/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", "alerting:apm.error_rate/observability/alert/get", "alerting:apm.error_rate/observability/alert/find", "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", @@ -1791,10 +3529,90 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.tls/observability/alert/get", "alerting:xpack.synthetics.alerts.tls/observability/alert/find", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/get", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/find", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAlertSummary", + "alerting:metrics.alert.threshold/observability/alert/get", + "alerting:metrics.alert.threshold/observability/alert/find", + "alerting:metrics.alert.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/alert/get", + "alerting:metrics.alert.threshold/alerts/alert/find", + "alerting:metrics.alert.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/alert/get", + "alerting:metrics.alert.inventory.threshold/observability/alert/find", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/alert/get", + "alerting:metrics.alert.inventory.threshold/alerts/alert/find", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/alert/get", + "alerting:xpack.uptime.alerts.tls/observability/alert/find", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/alert/get", + "alerting:xpack.uptime.alerts.tls/alerts/alert/find", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAlertSummary", + "alerting:logs.alert.document.count/observability/alert/get", + "alerting:logs.alert.document.count/observability/alert/find", + "alerting:logs.alert.document.count/observability/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/observability/alert/getAlertSummary", + "alerting:slo.rules.burnRate/observability/alert/get", + "alerting:slo.rules.burnRate/observability/alert/find", + "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/alert/get", + "alerting:slo.rules.burnRate/alerts/alert/find", + "alerting:slo.rules.burnRate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/alerts/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/alert/get", + "alerting:observability.rules.custom_threshold/observability/alert/find", + "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", + "alerting:.es-query/observability/alert/get", + "alerting:.es-query/observability/alert/find", + "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/observability/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", ], "read": Array [ "login:", @@ -1844,6 +3662,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.error_rate/apm/rule/getRuleExecutionKPI", "alerting:apm.error_rate/apm/rule/getBackfill", "alerting:apm.error_rate/apm/rule/findBackfill", + "alerting:apm.error_rate/alerts/rule/get", + "alerting:apm.error_rate/alerts/rule/getRuleState", + "alerting:apm.error_rate/alerts/rule/getAlertSummary", + "alerting:apm.error_rate/alerts/rule/getExecutionLog", + "alerting:apm.error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.error_rate/alerts/rule/find", + "alerting:apm.error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.error_rate/alerts/rule/getBackfill", + "alerting:apm.error_rate/alerts/rule/findBackfill", "alerting:apm.transaction_error_rate/apm/rule/get", "alerting:apm.transaction_error_rate/apm/rule/getRuleState", "alerting:apm.transaction_error_rate/apm/rule/getAlertSummary", @@ -1853,6 +3680,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_error_rate/apm/rule/getRuleExecutionKPI", "alerting:apm.transaction_error_rate/apm/rule/getBackfill", "alerting:apm.transaction_error_rate/apm/rule/findBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/get", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleState", + "alerting:apm.transaction_error_rate/alerts/rule/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/rule/getExecutionLog", + "alerting:apm.transaction_error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_error_rate/alerts/rule/find", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_error_rate/alerts/rule/getBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/findBackfill", "alerting:apm.transaction_duration/apm/rule/get", "alerting:apm.transaction_duration/apm/rule/getRuleState", "alerting:apm.transaction_duration/apm/rule/getAlertSummary", @@ -1862,6 +3698,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_duration/apm/rule/getRuleExecutionKPI", "alerting:apm.transaction_duration/apm/rule/getBackfill", "alerting:apm.transaction_duration/apm/rule/findBackfill", + "alerting:apm.transaction_duration/alerts/rule/get", + "alerting:apm.transaction_duration/alerts/rule/getRuleState", + "alerting:apm.transaction_duration/alerts/rule/getAlertSummary", + "alerting:apm.transaction_duration/alerts/rule/getExecutionLog", + "alerting:apm.transaction_duration/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_duration/alerts/rule/find", + "alerting:apm.transaction_duration/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_duration/alerts/rule/getBackfill", + "alerting:apm.transaction_duration/alerts/rule/findBackfill", "alerting:apm.anomaly/apm/rule/get", "alerting:apm.anomaly/apm/rule/getRuleState", "alerting:apm.anomaly/apm/rule/getAlertSummary", @@ -1871,22 +3716,47 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.anomaly/apm/rule/getRuleExecutionKPI", "alerting:apm.anomaly/apm/rule/getBackfill", "alerting:apm.anomaly/apm/rule/findBackfill", + "alerting:apm.anomaly/alerts/rule/get", + "alerting:apm.anomaly/alerts/rule/getRuleState", + "alerting:apm.anomaly/alerts/rule/getAlertSummary", + "alerting:apm.anomaly/alerts/rule/getExecutionLog", + "alerting:apm.anomaly/alerts/rule/getActionErrorLog", + "alerting:apm.anomaly/alerts/rule/find", + "alerting:apm.anomaly/alerts/rule/getRuleExecutionKPI", + "alerting:apm.anomaly/alerts/rule/getBackfill", + "alerting:apm.anomaly/alerts/rule/findBackfill", "alerting:apm.error_rate/apm/alert/get", "alerting:apm.error_rate/apm/alert/find", "alerting:apm.error_rate/apm/alert/getAuthorizedAlertsIndices", "alerting:apm.error_rate/apm/alert/getAlertSummary", + "alerting:apm.error_rate/alerts/alert/get", + "alerting:apm.error_rate/alerts/alert/find", + "alerting:apm.error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/alerts/alert/getAlertSummary", "alerting:apm.transaction_error_rate/apm/alert/get", "alerting:apm.transaction_error_rate/apm/alert/find", "alerting:apm.transaction_error_rate/apm/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_error_rate/apm/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/alert/get", + "alerting:apm.transaction_error_rate/alerts/alert/find", + "alerting:apm.transaction_error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/alerts/alert/getAlertSummary", "alerting:apm.transaction_duration/apm/alert/get", "alerting:apm.transaction_duration/apm/alert/find", "alerting:apm.transaction_duration/apm/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_duration/apm/alert/getAlertSummary", + "alerting:apm.transaction_duration/alerts/alert/get", + "alerting:apm.transaction_duration/alerts/alert/find", + "alerting:apm.transaction_duration/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/alerts/alert/getAlertSummary", "alerting:apm.anomaly/apm/alert/get", "alerting:apm.anomaly/apm/alert/find", "alerting:apm.anomaly/apm/alert/getAuthorizedAlertsIndices", "alerting:apm.anomaly/apm/alert/getAlertSummary", + "alerting:apm.anomaly/alerts/alert/get", + "alerting:apm.anomaly/alerts/alert/find", + "alerting:apm.anomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/alerts/alert/getAlertSummary", "api:infra", "app:infra", "app:logs", @@ -1916,6 +3786,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:logs.alert.document.count/logs/rule/getRuleExecutionKPI", "alerting:logs.alert.document.count/logs/rule/getBackfill", "alerting:logs.alert.document.count/logs/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", "alerting:.es-query/logs/rule/get", "alerting:.es-query/logs/rule/getRuleState", "alerting:.es-query/logs/rule/getAlertSummary", @@ -1925,6 +3804,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:.es-query/logs/rule/getRuleExecutionKPI", "alerting:.es-query/logs/rule/getBackfill", "alerting:.es-query/logs/rule/findBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", "alerting:observability.rules.custom_threshold/logs/rule/get", "alerting:observability.rules.custom_threshold/logs/rule/getRuleState", "alerting:observability.rules.custom_threshold/logs/rule/getAlertSummary", @@ -1934,6 +3822,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:observability.rules.custom_threshold/logs/rule/getRuleExecutionKPI", "alerting:observability.rules.custom_threshold/logs/rule/getBackfill", "alerting:observability.rules.custom_threshold/logs/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/get", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getRuleState", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getAlertSummary", @@ -1943,71 +3840,51 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getRuleExecutionKPI", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getBackfill", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", "alerting:logs.alert.document.count/logs/alert/get", "alerting:logs.alert.document.count/logs/alert/find", "alerting:logs.alert.document.count/logs/alert/getAuthorizedAlertsIndices", "alerting:logs.alert.document.count/logs/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", "alerting:.es-query/logs/alert/get", "alerting:.es-query/logs/alert/find", "alerting:.es-query/logs/alert/getAuthorizedAlertsIndices", "alerting:.es-query/logs/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", "alerting:observability.rules.custom_threshold/logs/alert/get", "alerting:observability.rules.custom_threshold/logs/alert/find", "alerting:observability.rules.custom_threshold/logs/alert/getAuthorizedAlertsIndices", "alerting:observability.rules.custom_threshold/logs/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/get", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/find", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAlertSummary", - "app:observability", - "ui:catalogue/observability", - "ui:navLinks/observability", - "ui:observability/read", - "alerting:slo.rules.burnRate/observability/rule/get", - "alerting:slo.rules.burnRate/observability/rule/getRuleState", - "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", - "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", - "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", - "alerting:slo.rules.burnRate/observability/rule/find", - "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", - "alerting:slo.rules.burnRate/observability/rule/getBackfill", - "alerting:slo.rules.burnRate/observability/rule/findBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/get", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", - "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", - "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", - "alerting:observability.rules.custom_threshold/observability/rule/find", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", - "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", - "alerting:.es-query/observability/rule/get", - "alerting:.es-query/observability/rule/getRuleState", - "alerting:.es-query/observability/rule/getAlertSummary", - "alerting:.es-query/observability/rule/getExecutionLog", - "alerting:.es-query/observability/rule/getActionErrorLog", - "alerting:.es-query/observability/rule/find", - "alerting:.es-query/observability/rule/getRuleExecutionKPI", - "alerting:.es-query/observability/rule/getBackfill", - "alerting:.es-query/observability/rule/findBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/get", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", - "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/find", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", - "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", + "app:observability", + "ui:catalogue/observability", + "ui:navLinks/observability", + "ui:observability/read", "alerting:apm.error_rate/observability/rule/get", "alerting:apm.error_rate/observability/rule/getRuleState", "alerting:apm.error_rate/observability/rule/getAlertSummary", @@ -2053,6 +3930,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/findBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/get", "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.tls/observability/rule/getAlertSummary", @@ -2062,26 +3948,177 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleExecutionKPI", "alerting:xpack.synthetics.alerts.tls/observability/rule/getBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/findBackfill", - "alerting:slo.rules.burnRate/observability/alert/get", - "alerting:slo.rules.burnRate/observability/alert/find", - "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", - "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/alert/get", - "alerting:observability.rules.custom_threshold/observability/alert/find", - "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", - "alerting:.es-query/observability/alert/get", - "alerting:.es-query/observability/alert/find", - "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", - "alerting:.es-query/observability/alert/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/alert/get", - "alerting:metrics.alert.inventory.threshold/observability/alert/find", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/get", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/find", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/findBackfill", + "alerting:metrics.alert.threshold/observability/rule/get", + "alerting:metrics.alert.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/observability/rule/find", + "alerting:metrics.alert.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.threshold/alerts/rule/get", + "alerting:metrics.alert.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/alerts/rule/find", + "alerting:metrics.alert.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/get", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/find", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/get", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/find", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/get", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/find", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/get", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/find", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/findBackfill", + "alerting:logs.alert.document.count/observability/rule/get", + "alerting:logs.alert.document.count/observability/rule/getRuleState", + "alerting:logs.alert.document.count/observability/rule/getAlertSummary", + "alerting:logs.alert.document.count/observability/rule/getExecutionLog", + "alerting:logs.alert.document.count/observability/rule/getActionErrorLog", + "alerting:logs.alert.document.count/observability/rule/find", + "alerting:logs.alert.document.count/observability/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/observability/rule/getBackfill", + "alerting:logs.alert.document.count/observability/rule/findBackfill", + "alerting:slo.rules.burnRate/observability/rule/get", + "alerting:slo.rules.burnRate/observability/rule/getRuleState", + "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", + "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", + "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/observability/rule/find", + "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/observability/rule/getBackfill", + "alerting:slo.rules.burnRate/observability/rule/findBackfill", + "alerting:slo.rules.burnRate/alerts/rule/get", + "alerting:slo.rules.burnRate/alerts/rule/getRuleState", + "alerting:slo.rules.burnRate/alerts/rule/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/rule/getExecutionLog", + "alerting:slo.rules.burnRate/alerts/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/alerts/rule/find", + "alerting:slo.rules.burnRate/alerts/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/alerts/rule/getBackfill", + "alerting:slo.rules.burnRate/alerts/rule/findBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/get", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", + "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/observability/rule/find", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", + "alerting:.es-query/observability/rule/get", + "alerting:.es-query/observability/rule/getRuleState", + "alerting:.es-query/observability/rule/getAlertSummary", + "alerting:.es-query/observability/rule/getExecutionLog", + "alerting:.es-query/observability/rule/getActionErrorLog", + "alerting:.es-query/observability/rule/find", + "alerting:.es-query/observability/rule/getRuleExecutionKPI", + "alerting:.es-query/observability/rule/getBackfill", + "alerting:.es-query/observability/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", "alerting:apm.error_rate/observability/alert/get", "alerting:apm.error_rate/observability/alert/find", "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", @@ -2102,10 +4139,90 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.tls/observability/alert/get", "alerting:xpack.synthetics.alerts.tls/observability/alert/find", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/get", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/find", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAlertSummary", + "alerting:metrics.alert.threshold/observability/alert/get", + "alerting:metrics.alert.threshold/observability/alert/find", + "alerting:metrics.alert.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/alert/get", + "alerting:metrics.alert.threshold/alerts/alert/find", + "alerting:metrics.alert.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/alert/get", + "alerting:metrics.alert.inventory.threshold/observability/alert/find", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/alert/get", + "alerting:metrics.alert.inventory.threshold/alerts/alert/find", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/alert/get", + "alerting:xpack.uptime.alerts.tls/observability/alert/find", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/alert/get", + "alerting:xpack.uptime.alerts.tls/alerts/alert/find", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAlertSummary", + "alerting:logs.alert.document.count/observability/alert/get", + "alerting:logs.alert.document.count/observability/alert/find", + "alerting:logs.alert.document.count/observability/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/observability/alert/getAlertSummary", + "alerting:slo.rules.burnRate/observability/alert/get", + "alerting:slo.rules.burnRate/observability/alert/find", + "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/alert/get", + "alerting:slo.rules.burnRate/alerts/alert/find", + "alerting:slo.rules.burnRate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/alerts/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/alert/get", + "alerting:observability.rules.custom_threshold/observability/alert/find", + "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", + "alerting:.es-query/observability/alert/get", + "alerting:.es-query/observability/alert/find", + "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/observability/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", ], "settings_save": Array [ "login:", @@ -2118,6 +4235,8 @@ export default function ({ getService }: FtrProviderContext) { "login:", "api:bulkGetUserProfiles", "api:dashboardUsageStats", + "api:savedQuery:manage", + "api:savedQuery:read", "api:store_search_session", "api:generateReport", "api:downloadCsv", @@ -2301,6 +4420,8 @@ export default function ({ getService }: FtrProviderContext) { "login:", "api:bulkGetUserProfiles", "api:dashboardUsageStats", + "api:savedQuery:manage", + "api:savedQuery:read", "app:dashboards", "app:kibana", "ui:catalogue/dashboard", @@ -2453,6 +4574,7 @@ export default function ({ getService }: FtrProviderContext) { "login:", "api:bulkGetUserProfiles", "api:dashboardUsageStats", + "api:savedQuery:read", "app:dashboards", "app:kibana", "ui:catalogue/dashboard", @@ -2552,6 +4674,7 @@ export default function ({ getService }: FtrProviderContext) { "login:", "api:bulkGetUserProfiles", "api:dashboardUsageStats", + "api:savedQuery:read", "app:dashboards", "app:kibana", "ui:catalogue/dashboard", @@ -2687,6 +4810,8 @@ export default function ({ getService }: FtrProviderContext) { "all": Array [ "login:", "api:fileUpload:analyzeFile", + "api:savedQuery:manage", + "api:savedQuery:read", "api:store_search_session", "api:generateReport", "app:discover", @@ -2757,172 +4882,32 @@ export default function ({ getService }: FtrProviderContext) { "saved_object:search-session/bulk_delete", "saved_object:search-session/share_to_space", "saved_object:index-pattern/bulk_get", - "saved_object:index-pattern/get", - "saved_object:index-pattern/find", - "saved_object:index-pattern/open_point_in_time", - "saved_object:index-pattern/close_point_in_time", - "saved_object:config/bulk_get", - "saved_object:config/get", - "saved_object:config/find", - "saved_object:config/open_point_in_time", - "saved_object:config/close_point_in_time", - "saved_object:config-global/bulk_get", - "saved_object:config-global/get", - "saved_object:config-global/find", - "saved_object:config-global/open_point_in_time", - "saved_object:config-global/close_point_in_time", - "ui:discover/show", - "ui:discover/save", - "ui:discover/saveQuery", - "ui:discover/createShortUrl", - "ui:discover/storeSearchSession", - "ui:discover/generateCsv", - "api:rac", - "app:observability", - "ui:catalogue/observability", - "ui:navLinks/observability", - "ui:observability/read", - "ui:observability/write", - "alerting:slo.rules.burnRate/observability/rule/get", - "alerting:slo.rules.burnRate/observability/rule/getRuleState", - "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", - "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", - "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", - "alerting:slo.rules.burnRate/observability/rule/find", - "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", - "alerting:slo.rules.burnRate/observability/rule/getBackfill", - "alerting:slo.rules.burnRate/observability/rule/findBackfill", - "alerting:slo.rules.burnRate/observability/rule/create", - "alerting:slo.rules.burnRate/observability/rule/delete", - "alerting:slo.rules.burnRate/observability/rule/update", - "alerting:slo.rules.burnRate/observability/rule/updateApiKey", - "alerting:slo.rules.burnRate/observability/rule/enable", - "alerting:slo.rules.burnRate/observability/rule/disable", - "alerting:slo.rules.burnRate/observability/rule/muteAll", - "alerting:slo.rules.burnRate/observability/rule/unmuteAll", - "alerting:slo.rules.burnRate/observability/rule/muteAlert", - "alerting:slo.rules.burnRate/observability/rule/unmuteAlert", - "alerting:slo.rules.burnRate/observability/rule/snooze", - "alerting:slo.rules.burnRate/observability/rule/bulkEdit", - "alerting:slo.rules.burnRate/observability/rule/bulkDelete", - "alerting:slo.rules.burnRate/observability/rule/bulkEnable", - "alerting:slo.rules.burnRate/observability/rule/bulkDisable", - "alerting:slo.rules.burnRate/observability/rule/unsnooze", - "alerting:slo.rules.burnRate/observability/rule/runSoon", - "alerting:slo.rules.burnRate/observability/rule/scheduleBackfill", - "alerting:slo.rules.burnRate/observability/rule/deleteBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/get", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", - "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", - "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", - "alerting:observability.rules.custom_threshold/observability/rule/find", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", - "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/create", - "alerting:observability.rules.custom_threshold/observability/rule/delete", - "alerting:observability.rules.custom_threshold/observability/rule/update", - "alerting:observability.rules.custom_threshold/observability/rule/updateApiKey", - "alerting:observability.rules.custom_threshold/observability/rule/enable", - "alerting:observability.rules.custom_threshold/observability/rule/disable", - "alerting:observability.rules.custom_threshold/observability/rule/muteAll", - "alerting:observability.rules.custom_threshold/observability/rule/unmuteAll", - "alerting:observability.rules.custom_threshold/observability/rule/muteAlert", - "alerting:observability.rules.custom_threshold/observability/rule/unmuteAlert", - "alerting:observability.rules.custom_threshold/observability/rule/snooze", - "alerting:observability.rules.custom_threshold/observability/rule/bulkEdit", - "alerting:observability.rules.custom_threshold/observability/rule/bulkDelete", - "alerting:observability.rules.custom_threshold/observability/rule/bulkEnable", - "alerting:observability.rules.custom_threshold/observability/rule/bulkDisable", - "alerting:observability.rules.custom_threshold/observability/rule/unsnooze", - "alerting:observability.rules.custom_threshold/observability/rule/runSoon", - "alerting:observability.rules.custom_threshold/observability/rule/scheduleBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/deleteBackfill", - "alerting:.es-query/observability/rule/get", - "alerting:.es-query/observability/rule/getRuleState", - "alerting:.es-query/observability/rule/getAlertSummary", - "alerting:.es-query/observability/rule/getExecutionLog", - "alerting:.es-query/observability/rule/getActionErrorLog", - "alerting:.es-query/observability/rule/find", - "alerting:.es-query/observability/rule/getRuleExecutionKPI", - "alerting:.es-query/observability/rule/getBackfill", - "alerting:.es-query/observability/rule/findBackfill", - "alerting:.es-query/observability/rule/create", - "alerting:.es-query/observability/rule/delete", - "alerting:.es-query/observability/rule/update", - "alerting:.es-query/observability/rule/updateApiKey", - "alerting:.es-query/observability/rule/enable", - "alerting:.es-query/observability/rule/disable", - "alerting:.es-query/observability/rule/muteAll", - "alerting:.es-query/observability/rule/unmuteAll", - "alerting:.es-query/observability/rule/muteAlert", - "alerting:.es-query/observability/rule/unmuteAlert", - "alerting:.es-query/observability/rule/snooze", - "alerting:.es-query/observability/rule/bulkEdit", - "alerting:.es-query/observability/rule/bulkDelete", - "alerting:.es-query/observability/rule/bulkEnable", - "alerting:.es-query/observability/rule/bulkDisable", - "alerting:.es-query/observability/rule/unsnooze", - "alerting:.es-query/observability/rule/runSoon", - "alerting:.es-query/observability/rule/scheduleBackfill", - "alerting:.es-query/observability/rule/deleteBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/create", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/delete", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/update", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/updateApiKey", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/enable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/disable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAll", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAll", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAlert", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAlert", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/snooze", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEdit", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDelete", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEnable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDisable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unsnooze", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/runSoon", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/scheduleBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/deleteBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/get", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", - "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/find", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", - "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/create", - "alerting:metrics.alert.inventory.threshold/observability/rule/delete", - "alerting:metrics.alert.inventory.threshold/observability/rule/update", - "alerting:metrics.alert.inventory.threshold/observability/rule/updateApiKey", - "alerting:metrics.alert.inventory.threshold/observability/rule/enable", - "alerting:metrics.alert.inventory.threshold/observability/rule/disable", - "alerting:metrics.alert.inventory.threshold/observability/rule/muteAll", - "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAll", - "alerting:metrics.alert.inventory.threshold/observability/rule/muteAlert", - "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAlert", - "alerting:metrics.alert.inventory.threshold/observability/rule/snooze", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEdit", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDelete", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEnable", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDisable", - "alerting:metrics.alert.inventory.threshold/observability/rule/unsnooze", - "alerting:metrics.alert.inventory.threshold/observability/rule/runSoon", - "alerting:metrics.alert.inventory.threshold/observability/rule/scheduleBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/deleteBackfill", + "saved_object:index-pattern/get", + "saved_object:index-pattern/find", + "saved_object:index-pattern/open_point_in_time", + "saved_object:index-pattern/close_point_in_time", + "saved_object:config/bulk_get", + "saved_object:config/get", + "saved_object:config/find", + "saved_object:config/open_point_in_time", + "saved_object:config/close_point_in_time", + "saved_object:config-global/bulk_get", + "saved_object:config-global/get", + "saved_object:config-global/find", + "saved_object:config-global/open_point_in_time", + "saved_object:config-global/close_point_in_time", + "ui:discover/show", + "ui:discover/save", + "ui:discover/saveQuery", + "ui:discover/createShortUrl", + "ui:discover/storeSearchSession", + "ui:discover/generateCsv", + "api:rac", + "app:observability", + "ui:catalogue/observability", + "ui:navLinks/observability", + "ui:observability/read", + "ui:observability/write", "alerting:apm.error_rate/observability/rule/get", "alerting:apm.error_rate/observability/rule/getRuleState", "alerting:apm.error_rate/observability/rule/getAlertSummary", @@ -2951,6 +4936,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.error_rate/observability/rule/runSoon", "alerting:apm.error_rate/observability/rule/scheduleBackfill", "alerting:apm.error_rate/observability/rule/deleteBackfill", + "alerting:apm.error_rate/alerts/rule/get", + "alerting:apm.error_rate/alerts/rule/getRuleState", + "alerting:apm.error_rate/alerts/rule/getAlertSummary", + "alerting:apm.error_rate/alerts/rule/getExecutionLog", + "alerting:apm.error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.error_rate/alerts/rule/find", + "alerting:apm.error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.error_rate/alerts/rule/getBackfill", + "alerting:apm.error_rate/alerts/rule/findBackfill", + "alerting:apm.error_rate/alerts/rule/create", + "alerting:apm.error_rate/alerts/rule/delete", + "alerting:apm.error_rate/alerts/rule/update", + "alerting:apm.error_rate/alerts/rule/updateApiKey", + "alerting:apm.error_rate/alerts/rule/enable", + "alerting:apm.error_rate/alerts/rule/disable", + "alerting:apm.error_rate/alerts/rule/muteAll", + "alerting:apm.error_rate/alerts/rule/unmuteAll", + "alerting:apm.error_rate/alerts/rule/muteAlert", + "alerting:apm.error_rate/alerts/rule/unmuteAlert", + "alerting:apm.error_rate/alerts/rule/snooze", + "alerting:apm.error_rate/alerts/rule/bulkEdit", + "alerting:apm.error_rate/alerts/rule/bulkDelete", + "alerting:apm.error_rate/alerts/rule/bulkEnable", + "alerting:apm.error_rate/alerts/rule/bulkDisable", + "alerting:apm.error_rate/alerts/rule/unsnooze", + "alerting:apm.error_rate/alerts/rule/runSoon", + "alerting:apm.error_rate/alerts/rule/scheduleBackfill", + "alerting:apm.error_rate/alerts/rule/deleteBackfill", "alerting:apm.transaction_error_rate/observability/rule/get", "alerting:apm.transaction_error_rate/observability/rule/getRuleState", "alerting:apm.transaction_error_rate/observability/rule/getAlertSummary", @@ -2979,6 +4992,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_error_rate/observability/rule/runSoon", "alerting:apm.transaction_error_rate/observability/rule/scheduleBackfill", "alerting:apm.transaction_error_rate/observability/rule/deleteBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/get", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleState", + "alerting:apm.transaction_error_rate/alerts/rule/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/rule/getExecutionLog", + "alerting:apm.transaction_error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_error_rate/alerts/rule/find", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_error_rate/alerts/rule/getBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/findBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/create", + "alerting:apm.transaction_error_rate/alerts/rule/delete", + "alerting:apm.transaction_error_rate/alerts/rule/update", + "alerting:apm.transaction_error_rate/alerts/rule/updateApiKey", + "alerting:apm.transaction_error_rate/alerts/rule/enable", + "alerting:apm.transaction_error_rate/alerts/rule/disable", + "alerting:apm.transaction_error_rate/alerts/rule/muteAll", + "alerting:apm.transaction_error_rate/alerts/rule/unmuteAll", + "alerting:apm.transaction_error_rate/alerts/rule/muteAlert", + "alerting:apm.transaction_error_rate/alerts/rule/unmuteAlert", + "alerting:apm.transaction_error_rate/alerts/rule/snooze", + "alerting:apm.transaction_error_rate/alerts/rule/bulkEdit", + "alerting:apm.transaction_error_rate/alerts/rule/bulkDelete", + "alerting:apm.transaction_error_rate/alerts/rule/bulkEnable", + "alerting:apm.transaction_error_rate/alerts/rule/bulkDisable", + "alerting:apm.transaction_error_rate/alerts/rule/unsnooze", + "alerting:apm.transaction_error_rate/alerts/rule/runSoon", + "alerting:apm.transaction_error_rate/alerts/rule/scheduleBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/deleteBackfill", "alerting:apm.transaction_duration/observability/rule/get", "alerting:apm.transaction_duration/observability/rule/getRuleState", "alerting:apm.transaction_duration/observability/rule/getAlertSummary", @@ -3007,6 +5048,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_duration/observability/rule/runSoon", "alerting:apm.transaction_duration/observability/rule/scheduleBackfill", "alerting:apm.transaction_duration/observability/rule/deleteBackfill", + "alerting:apm.transaction_duration/alerts/rule/get", + "alerting:apm.transaction_duration/alerts/rule/getRuleState", + "alerting:apm.transaction_duration/alerts/rule/getAlertSummary", + "alerting:apm.transaction_duration/alerts/rule/getExecutionLog", + "alerting:apm.transaction_duration/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_duration/alerts/rule/find", + "alerting:apm.transaction_duration/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_duration/alerts/rule/getBackfill", + "alerting:apm.transaction_duration/alerts/rule/findBackfill", + "alerting:apm.transaction_duration/alerts/rule/create", + "alerting:apm.transaction_duration/alerts/rule/delete", + "alerting:apm.transaction_duration/alerts/rule/update", + "alerting:apm.transaction_duration/alerts/rule/updateApiKey", + "alerting:apm.transaction_duration/alerts/rule/enable", + "alerting:apm.transaction_duration/alerts/rule/disable", + "alerting:apm.transaction_duration/alerts/rule/muteAll", + "alerting:apm.transaction_duration/alerts/rule/unmuteAll", + "alerting:apm.transaction_duration/alerts/rule/muteAlert", + "alerting:apm.transaction_duration/alerts/rule/unmuteAlert", + "alerting:apm.transaction_duration/alerts/rule/snooze", + "alerting:apm.transaction_duration/alerts/rule/bulkEdit", + "alerting:apm.transaction_duration/alerts/rule/bulkDelete", + "alerting:apm.transaction_duration/alerts/rule/bulkEnable", + "alerting:apm.transaction_duration/alerts/rule/bulkDisable", + "alerting:apm.transaction_duration/alerts/rule/unsnooze", + "alerting:apm.transaction_duration/alerts/rule/runSoon", + "alerting:apm.transaction_duration/alerts/rule/scheduleBackfill", + "alerting:apm.transaction_duration/alerts/rule/deleteBackfill", "alerting:apm.anomaly/observability/rule/get", "alerting:apm.anomaly/observability/rule/getRuleState", "alerting:apm.anomaly/observability/rule/getAlertSummary", @@ -3035,6 +5104,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.anomaly/observability/rule/runSoon", "alerting:apm.anomaly/observability/rule/scheduleBackfill", "alerting:apm.anomaly/observability/rule/deleteBackfill", + "alerting:apm.anomaly/alerts/rule/get", + "alerting:apm.anomaly/alerts/rule/getRuleState", + "alerting:apm.anomaly/alerts/rule/getAlertSummary", + "alerting:apm.anomaly/alerts/rule/getExecutionLog", + "alerting:apm.anomaly/alerts/rule/getActionErrorLog", + "alerting:apm.anomaly/alerts/rule/find", + "alerting:apm.anomaly/alerts/rule/getRuleExecutionKPI", + "alerting:apm.anomaly/alerts/rule/getBackfill", + "alerting:apm.anomaly/alerts/rule/findBackfill", + "alerting:apm.anomaly/alerts/rule/create", + "alerting:apm.anomaly/alerts/rule/delete", + "alerting:apm.anomaly/alerts/rule/update", + "alerting:apm.anomaly/alerts/rule/updateApiKey", + "alerting:apm.anomaly/alerts/rule/enable", + "alerting:apm.anomaly/alerts/rule/disable", + "alerting:apm.anomaly/alerts/rule/muteAll", + "alerting:apm.anomaly/alerts/rule/unmuteAll", + "alerting:apm.anomaly/alerts/rule/muteAlert", + "alerting:apm.anomaly/alerts/rule/unmuteAlert", + "alerting:apm.anomaly/alerts/rule/snooze", + "alerting:apm.anomaly/alerts/rule/bulkEdit", + "alerting:apm.anomaly/alerts/rule/bulkDelete", + "alerting:apm.anomaly/alerts/rule/bulkEnable", + "alerting:apm.anomaly/alerts/rule/bulkDisable", + "alerting:apm.anomaly/alerts/rule/unsnooze", + "alerting:apm.anomaly/alerts/rule/runSoon", + "alerting:apm.anomaly/alerts/rule/scheduleBackfill", + "alerting:apm.anomaly/alerts/rule/deleteBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getAlertSummary", @@ -3063,6 +5160,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/runSoon", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/scheduleBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/deleteBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/create", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/delete", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/update", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/updateApiKey", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/enable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/disable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/muteAll", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unmuteAll", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/muteAlert", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unmuteAlert", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/snooze", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkEdit", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkDelete", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkEnable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unsnooze", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/runSoon", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/deleteBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/get", "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.tls/observability/rule/getAlertSummary", @@ -3091,141 +5216,426 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/rule/runSoon", "alerting:xpack.synthetics.alerts.tls/observability/rule/scheduleBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/deleteBackfill", - "alerting:slo.rules.burnRate/observability/alert/get", - "alerting:slo.rules.burnRate/observability/alert/find", - "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", - "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", - "alerting:slo.rules.burnRate/observability/alert/update", - "alerting:observability.rules.custom_threshold/observability/alert/get", - "alerting:observability.rules.custom_threshold/observability/alert/find", - "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/alert/update", - "alerting:.es-query/observability/alert/get", - "alerting:.es-query/observability/alert/find", - "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", - "alerting:.es-query/observability/alert/getAlertSummary", - "alerting:.es-query/observability/alert/update", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/update", - "alerting:metrics.alert.inventory.threshold/observability/alert/get", - "alerting:metrics.alert.inventory.threshold/observability/alert/find", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/alert/update", - "alerting:apm.error_rate/observability/alert/get", - "alerting:apm.error_rate/observability/alert/find", - "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", - "alerting:apm.error_rate/observability/alert/getAlertSummary", - "alerting:apm.error_rate/observability/alert/update", - "alerting:apm.transaction_error_rate/observability/alert/get", - "alerting:apm.transaction_error_rate/observability/alert/find", - "alerting:apm.transaction_error_rate/observability/alert/getAuthorizedAlertsIndices", - "alerting:apm.transaction_error_rate/observability/alert/getAlertSummary", - "alerting:apm.transaction_error_rate/observability/alert/update", - "alerting:apm.transaction_duration/observability/alert/get", - "alerting:apm.transaction_duration/observability/alert/find", - "alerting:apm.transaction_duration/observability/alert/getAuthorizedAlertsIndices", - "alerting:apm.transaction_duration/observability/alert/getAlertSummary", - "alerting:apm.transaction_duration/observability/alert/update", - "alerting:apm.anomaly/observability/alert/get", - "alerting:apm.anomaly/observability/alert/find", - "alerting:apm.anomaly/observability/alert/getAuthorizedAlertsIndices", - "alerting:apm.anomaly/observability/alert/getAlertSummary", - "alerting:apm.anomaly/observability/alert/update", - "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/get", - "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", - "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAlertSummary", - "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/update", - "alerting:xpack.synthetics.alerts.tls/observability/alert/get", - "alerting:xpack.synthetics.alerts.tls/observability/alert/find", - "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", - "alerting:xpack.synthetics.alerts.tls/observability/alert/update", - ], - "generate_report": Array [ - "login:", - "api:generateReport", - "ui:management/insightsAndAlerting/reporting", - "ui:discover/generateCsv", - ], - "minimal_all": Array [ - "login:", - "api:fileUpload:analyzeFile", - "app:discover", - "app:kibana", - "ui:catalogue/discover", - "ui:navLinks/discover", - "ui:navLinks/kibana", - "saved_object:search/bulk_get", - "saved_object:search/get", - "saved_object:search/find", - "saved_object:search/open_point_in_time", - "saved_object:search/close_point_in_time", - "saved_object:search/create", - "saved_object:search/bulk_create", - "saved_object:search/update", - "saved_object:search/bulk_update", - "saved_object:search/delete", - "saved_object:search/bulk_delete", - "saved_object:search/share_to_space", - "saved_object:query/bulk_get", - "saved_object:query/get", - "saved_object:query/find", - "saved_object:query/open_point_in_time", - "saved_object:query/close_point_in_time", - "saved_object:query/create", - "saved_object:query/bulk_create", - "saved_object:query/update", - "saved_object:query/bulk_update", - "saved_object:query/delete", - "saved_object:query/bulk_delete", - "saved_object:query/share_to_space", - "saved_object:telemetry/bulk_get", - "saved_object:telemetry/get", - "saved_object:telemetry/find", - "saved_object:telemetry/open_point_in_time", - "saved_object:telemetry/close_point_in_time", - "saved_object:telemetry/create", - "saved_object:telemetry/bulk_create", - "saved_object:telemetry/update", - "saved_object:telemetry/bulk_update", - "saved_object:telemetry/delete", - "saved_object:telemetry/bulk_delete", - "saved_object:telemetry/share_to_space", - "saved_object:index-pattern/bulk_get", - "saved_object:index-pattern/get", - "saved_object:index-pattern/find", - "saved_object:index-pattern/open_point_in_time", - "saved_object:index-pattern/close_point_in_time", - "saved_object:config/bulk_get", - "saved_object:config/get", - "saved_object:config/find", - "saved_object:config/open_point_in_time", - "saved_object:config/close_point_in_time", - "saved_object:config-global/bulk_get", - "saved_object:config-global/get", - "saved_object:config-global/find", - "saved_object:config-global/open_point_in_time", - "saved_object:config-global/close_point_in_time", - "saved_object:url/bulk_get", - "saved_object:url/get", - "saved_object:url/find", - "saved_object:url/open_point_in_time", - "saved_object:url/close_point_in_time", - "ui:discover/show", - "ui:discover/save", - "ui:discover/saveQuery", - "api:rac", - "app:observability", - "ui:catalogue/observability", - "ui:navLinks/observability", - "ui:observability/read", - "ui:observability/write", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/get", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/find", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/create", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/delete", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/update", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/updateApiKey", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/enable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/disable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/muteAll", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unmuteAll", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/muteAlert", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unmuteAlert", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/snooze", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkEdit", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkDelete", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkEnable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unsnooze", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/runSoon", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/deleteBackfill", + "alerting:metrics.alert.threshold/observability/rule/get", + "alerting:metrics.alert.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/observability/rule/find", + "alerting:metrics.alert.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.threshold/observability/rule/create", + "alerting:metrics.alert.threshold/observability/rule/delete", + "alerting:metrics.alert.threshold/observability/rule/update", + "alerting:metrics.alert.threshold/observability/rule/updateApiKey", + "alerting:metrics.alert.threshold/observability/rule/enable", + "alerting:metrics.alert.threshold/observability/rule/disable", + "alerting:metrics.alert.threshold/observability/rule/muteAll", + "alerting:metrics.alert.threshold/observability/rule/unmuteAll", + "alerting:metrics.alert.threshold/observability/rule/muteAlert", + "alerting:metrics.alert.threshold/observability/rule/unmuteAlert", + "alerting:metrics.alert.threshold/observability/rule/snooze", + "alerting:metrics.alert.threshold/observability/rule/bulkEdit", + "alerting:metrics.alert.threshold/observability/rule/bulkDelete", + "alerting:metrics.alert.threshold/observability/rule/bulkEnable", + "alerting:metrics.alert.threshold/observability/rule/bulkDisable", + "alerting:metrics.alert.threshold/observability/rule/unsnooze", + "alerting:metrics.alert.threshold/observability/rule/runSoon", + "alerting:metrics.alert.threshold/observability/rule/scheduleBackfill", + "alerting:metrics.alert.threshold/observability/rule/deleteBackfill", + "alerting:metrics.alert.threshold/alerts/rule/get", + "alerting:metrics.alert.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/alerts/rule/find", + "alerting:metrics.alert.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.threshold/alerts/rule/create", + "alerting:metrics.alert.threshold/alerts/rule/delete", + "alerting:metrics.alert.threshold/alerts/rule/update", + "alerting:metrics.alert.threshold/alerts/rule/updateApiKey", + "alerting:metrics.alert.threshold/alerts/rule/enable", + "alerting:metrics.alert.threshold/alerts/rule/disable", + "alerting:metrics.alert.threshold/alerts/rule/muteAll", + "alerting:metrics.alert.threshold/alerts/rule/unmuteAll", + "alerting:metrics.alert.threshold/alerts/rule/muteAlert", + "alerting:metrics.alert.threshold/alerts/rule/unmuteAlert", + "alerting:metrics.alert.threshold/alerts/rule/snooze", + "alerting:metrics.alert.threshold/alerts/rule/bulkEdit", + "alerting:metrics.alert.threshold/alerts/rule/bulkDelete", + "alerting:metrics.alert.threshold/alerts/rule/bulkEnable", + "alerting:metrics.alert.threshold/alerts/rule/bulkDisable", + "alerting:metrics.alert.threshold/alerts/rule/unsnooze", + "alerting:metrics.alert.threshold/alerts/rule/runSoon", + "alerting:metrics.alert.threshold/alerts/rule/scheduleBackfill", + "alerting:metrics.alert.threshold/alerts/rule/deleteBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/get", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/find", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/create", + "alerting:metrics.alert.inventory.threshold/observability/rule/delete", + "alerting:metrics.alert.inventory.threshold/observability/rule/update", + "alerting:metrics.alert.inventory.threshold/observability/rule/updateApiKey", + "alerting:metrics.alert.inventory.threshold/observability/rule/enable", + "alerting:metrics.alert.inventory.threshold/observability/rule/disable", + "alerting:metrics.alert.inventory.threshold/observability/rule/muteAll", + "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAll", + "alerting:metrics.alert.inventory.threshold/observability/rule/muteAlert", + "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAlert", + "alerting:metrics.alert.inventory.threshold/observability/rule/snooze", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEdit", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDelete", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEnable", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDisable", + "alerting:metrics.alert.inventory.threshold/observability/rule/unsnooze", + "alerting:metrics.alert.inventory.threshold/observability/rule/runSoon", + "alerting:metrics.alert.inventory.threshold/observability/rule/scheduleBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/deleteBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/get", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/find", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/create", + "alerting:metrics.alert.inventory.threshold/alerts/rule/delete", + "alerting:metrics.alert.inventory.threshold/alerts/rule/update", + "alerting:metrics.alert.inventory.threshold/alerts/rule/updateApiKey", + "alerting:metrics.alert.inventory.threshold/alerts/rule/enable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/disable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/muteAll", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unmuteAll", + "alerting:metrics.alert.inventory.threshold/alerts/rule/muteAlert", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unmuteAlert", + "alerting:metrics.alert.inventory.threshold/alerts/rule/snooze", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkEdit", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkDelete", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkEnable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkDisable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unsnooze", + "alerting:metrics.alert.inventory.threshold/alerts/rule/runSoon", + "alerting:metrics.alert.inventory.threshold/alerts/rule/scheduleBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/get", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/find", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/create", + "alerting:xpack.uptime.alerts.tls/observability/rule/delete", + "alerting:xpack.uptime.alerts.tls/observability/rule/update", + "alerting:xpack.uptime.alerts.tls/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tls/observability/rule/enable", + "alerting:xpack.uptime.alerts.tls/observability/rule/disable", + "alerting:xpack.uptime.alerts.tls/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.tls/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tls/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.tls/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tls/observability/rule/snooze", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tls/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.tls/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.tls/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/get", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/find", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/create", + "alerting:xpack.uptime.alerts.tls/alerts/rule/delete", + "alerting:xpack.uptime.alerts.tls/alerts/rule/update", + "alerting:xpack.uptime.alerts.tls/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tls/alerts/rule/enable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/disable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tls/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tls/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.tls/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.tls/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/create", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/delete", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/update", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/enable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/disable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/snooze", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/create", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/delete", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/update", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/enable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/disable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/create", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/delete", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/update", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/enable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/disable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/snooze", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/create", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/delete", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/update", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/enable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/disable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/create", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/delete", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/update", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/enable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/disable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/snooze", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/create", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/delete", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/update", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/enable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/disable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/deleteBackfill", + "alerting:logs.alert.document.count/observability/rule/get", + "alerting:logs.alert.document.count/observability/rule/getRuleState", + "alerting:logs.alert.document.count/observability/rule/getAlertSummary", + "alerting:logs.alert.document.count/observability/rule/getExecutionLog", + "alerting:logs.alert.document.count/observability/rule/getActionErrorLog", + "alerting:logs.alert.document.count/observability/rule/find", + "alerting:logs.alert.document.count/observability/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/observability/rule/getBackfill", + "alerting:logs.alert.document.count/observability/rule/findBackfill", + "alerting:logs.alert.document.count/observability/rule/create", + "alerting:logs.alert.document.count/observability/rule/delete", + "alerting:logs.alert.document.count/observability/rule/update", + "alerting:logs.alert.document.count/observability/rule/updateApiKey", + "alerting:logs.alert.document.count/observability/rule/enable", + "alerting:logs.alert.document.count/observability/rule/disable", + "alerting:logs.alert.document.count/observability/rule/muteAll", + "alerting:logs.alert.document.count/observability/rule/unmuteAll", + "alerting:logs.alert.document.count/observability/rule/muteAlert", + "alerting:logs.alert.document.count/observability/rule/unmuteAlert", + "alerting:logs.alert.document.count/observability/rule/snooze", + "alerting:logs.alert.document.count/observability/rule/bulkEdit", + "alerting:logs.alert.document.count/observability/rule/bulkDelete", + "alerting:logs.alert.document.count/observability/rule/bulkEnable", + "alerting:logs.alert.document.count/observability/rule/bulkDisable", + "alerting:logs.alert.document.count/observability/rule/unsnooze", + "alerting:logs.alert.document.count/observability/rule/runSoon", + "alerting:logs.alert.document.count/observability/rule/scheduleBackfill", + "alerting:logs.alert.document.count/observability/rule/deleteBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/create", + "alerting:logs.alert.document.count/alerts/rule/delete", + "alerting:logs.alert.document.count/alerts/rule/update", + "alerting:logs.alert.document.count/alerts/rule/updateApiKey", + "alerting:logs.alert.document.count/alerts/rule/enable", + "alerting:logs.alert.document.count/alerts/rule/disable", + "alerting:logs.alert.document.count/alerts/rule/muteAll", + "alerting:logs.alert.document.count/alerts/rule/unmuteAll", + "alerting:logs.alert.document.count/alerts/rule/muteAlert", + "alerting:logs.alert.document.count/alerts/rule/unmuteAlert", + "alerting:logs.alert.document.count/alerts/rule/snooze", + "alerting:logs.alert.document.count/alerts/rule/bulkEdit", + "alerting:logs.alert.document.count/alerts/rule/bulkDelete", + "alerting:logs.alert.document.count/alerts/rule/bulkEnable", + "alerting:logs.alert.document.count/alerts/rule/bulkDisable", + "alerting:logs.alert.document.count/alerts/rule/unsnooze", + "alerting:logs.alert.document.count/alerts/rule/runSoon", + "alerting:logs.alert.document.count/alerts/rule/scheduleBackfill", + "alerting:logs.alert.document.count/alerts/rule/deleteBackfill", "alerting:slo.rules.burnRate/observability/rule/get", "alerting:slo.rules.burnRate/observability/rule/getRuleState", "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", @@ -3254,6 +5664,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:slo.rules.burnRate/observability/rule/runSoon", "alerting:slo.rules.burnRate/observability/rule/scheduleBackfill", "alerting:slo.rules.burnRate/observability/rule/deleteBackfill", + "alerting:slo.rules.burnRate/alerts/rule/get", + "alerting:slo.rules.burnRate/alerts/rule/getRuleState", + "alerting:slo.rules.burnRate/alerts/rule/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/rule/getExecutionLog", + "alerting:slo.rules.burnRate/alerts/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/alerts/rule/find", + "alerting:slo.rules.burnRate/alerts/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/alerts/rule/getBackfill", + "alerting:slo.rules.burnRate/alerts/rule/findBackfill", + "alerting:slo.rules.burnRate/alerts/rule/create", + "alerting:slo.rules.burnRate/alerts/rule/delete", + "alerting:slo.rules.burnRate/alerts/rule/update", + "alerting:slo.rules.burnRate/alerts/rule/updateApiKey", + "alerting:slo.rules.burnRate/alerts/rule/enable", + "alerting:slo.rules.burnRate/alerts/rule/disable", + "alerting:slo.rules.burnRate/alerts/rule/muteAll", + "alerting:slo.rules.burnRate/alerts/rule/unmuteAll", + "alerting:slo.rules.burnRate/alerts/rule/muteAlert", + "alerting:slo.rules.burnRate/alerts/rule/unmuteAlert", + "alerting:slo.rules.burnRate/alerts/rule/snooze", + "alerting:slo.rules.burnRate/alerts/rule/bulkEdit", + "alerting:slo.rules.burnRate/alerts/rule/bulkDelete", + "alerting:slo.rules.burnRate/alerts/rule/bulkEnable", + "alerting:slo.rules.burnRate/alerts/rule/bulkDisable", + "alerting:slo.rules.burnRate/alerts/rule/unsnooze", + "alerting:slo.rules.burnRate/alerts/rule/runSoon", + "alerting:slo.rules.burnRate/alerts/rule/scheduleBackfill", + "alerting:slo.rules.burnRate/alerts/rule/deleteBackfill", "alerting:observability.rules.custom_threshold/observability/rule/get", "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", @@ -3282,6 +5720,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:observability.rules.custom_threshold/observability/rule/runSoon", "alerting:observability.rules.custom_threshold/observability/rule/scheduleBackfill", "alerting:observability.rules.custom_threshold/observability/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/create", + "alerting:observability.rules.custom_threshold/alerts/rule/delete", + "alerting:observability.rules.custom_threshold/alerts/rule/update", + "alerting:observability.rules.custom_threshold/alerts/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/alerts/rule/enable", + "alerting:observability.rules.custom_threshold/alerts/rule/disable", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/snooze", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/alerts/rule/unsnooze", + "alerting:observability.rules.custom_threshold/alerts/rule/runSoon", + "alerting:observability.rules.custom_threshold/alerts/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/deleteBackfill", "alerting:.es-query/observability/rule/get", "alerting:.es-query/observability/rule/getRuleState", "alerting:.es-query/observability/rule/getAlertSummary", @@ -3310,6 +5776,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:.es-query/observability/rule/runSoon", "alerting:.es-query/observability/rule/scheduleBackfill", "alerting:.es-query/observability/rule/deleteBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", + "alerting:.es-query/alerts/rule/create", + "alerting:.es-query/alerts/rule/delete", + "alerting:.es-query/alerts/rule/update", + "alerting:.es-query/alerts/rule/updateApiKey", + "alerting:.es-query/alerts/rule/enable", + "alerting:.es-query/alerts/rule/disable", + "alerting:.es-query/alerts/rule/muteAll", + "alerting:.es-query/alerts/rule/unmuteAll", + "alerting:.es-query/alerts/rule/muteAlert", + "alerting:.es-query/alerts/rule/unmuteAlert", + "alerting:.es-query/alerts/rule/snooze", + "alerting:.es-query/alerts/rule/bulkEdit", + "alerting:.es-query/alerts/rule/bulkDelete", + "alerting:.es-query/alerts/rule/bulkEnable", + "alerting:.es-query/alerts/rule/bulkDisable", + "alerting:.es-query/alerts/rule/unsnooze", + "alerting:.es-query/alerts/rule/runSoon", + "alerting:.es-query/alerts/rule/scheduleBackfill", + "alerting:.es-query/alerts/rule/deleteBackfill", "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", @@ -3338,34 +5832,286 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.ml.anomaly_detection_alert/observability/rule/runSoon", "alerting:xpack.ml.anomaly_detection_alert/observability/rule/scheduleBackfill", "alerting:xpack.ml.anomaly_detection_alert/observability/rule/deleteBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/get", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", - "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/find", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", - "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/create", - "alerting:metrics.alert.inventory.threshold/observability/rule/delete", - "alerting:metrics.alert.inventory.threshold/observability/rule/update", - "alerting:metrics.alert.inventory.threshold/observability/rule/updateApiKey", - "alerting:metrics.alert.inventory.threshold/observability/rule/enable", - "alerting:metrics.alert.inventory.threshold/observability/rule/disable", - "alerting:metrics.alert.inventory.threshold/observability/rule/muteAll", - "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAll", - "alerting:metrics.alert.inventory.threshold/observability/rule/muteAlert", - "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAlert", - "alerting:metrics.alert.inventory.threshold/observability/rule/snooze", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEdit", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDelete", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEnable", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDisable", - "alerting:metrics.alert.inventory.threshold/observability/rule/unsnooze", - "alerting:metrics.alert.inventory.threshold/observability/rule/runSoon", - "alerting:metrics.alert.inventory.threshold/observability/rule/scheduleBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/deleteBackfill", + "alerting:apm.error_rate/observability/alert/get", + "alerting:apm.error_rate/observability/alert/find", + "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/observability/alert/getAlertSummary", + "alerting:apm.error_rate/observability/alert/update", + "alerting:apm.error_rate/alerts/alert/get", + "alerting:apm.error_rate/alerts/alert/find", + "alerting:apm.error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/alerts/alert/getAlertSummary", + "alerting:apm.error_rate/alerts/alert/update", + "alerting:apm.transaction_error_rate/observability/alert/get", + "alerting:apm.transaction_error_rate/observability/alert/find", + "alerting:apm.transaction_error_rate/observability/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/observability/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/observability/alert/update", + "alerting:apm.transaction_error_rate/alerts/alert/get", + "alerting:apm.transaction_error_rate/alerts/alert/find", + "alerting:apm.transaction_error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/alerts/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/alert/update", + "alerting:apm.transaction_duration/observability/alert/get", + "alerting:apm.transaction_duration/observability/alert/find", + "alerting:apm.transaction_duration/observability/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/observability/alert/getAlertSummary", + "alerting:apm.transaction_duration/observability/alert/update", + "alerting:apm.transaction_duration/alerts/alert/get", + "alerting:apm.transaction_duration/alerts/alert/find", + "alerting:apm.transaction_duration/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/alerts/alert/getAlertSummary", + "alerting:apm.transaction_duration/alerts/alert/update", + "alerting:apm.anomaly/observability/alert/get", + "alerting:apm.anomaly/observability/alert/find", + "alerting:apm.anomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/observability/alert/getAlertSummary", + "alerting:apm.anomaly/observability/alert/update", + "alerting:apm.anomaly/alerts/alert/get", + "alerting:apm.anomaly/alerts/alert/find", + "alerting:apm.anomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/alerts/alert/getAlertSummary", + "alerting:apm.anomaly/alerts/alert/update", + "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/update", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/update", + "alerting:xpack.synthetics.alerts.tls/observability/alert/get", + "alerting:xpack.synthetics.alerts.tls/observability/alert/find", + "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/observability/alert/update", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/get", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/find", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/update", + "alerting:metrics.alert.threshold/observability/alert/get", + "alerting:metrics.alert.threshold/observability/alert/find", + "alerting:metrics.alert.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.threshold/observability/alert/update", + "alerting:metrics.alert.threshold/alerts/alert/get", + "alerting:metrics.alert.threshold/alerts/alert/find", + "alerting:metrics.alert.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/alert/update", + "alerting:metrics.alert.inventory.threshold/observability/alert/get", + "alerting:metrics.alert.inventory.threshold/observability/alert/find", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/alert/update", + "alerting:metrics.alert.inventory.threshold/alerts/alert/get", + "alerting:metrics.alert.inventory.threshold/alerts/alert/find", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/alert/update", + "alerting:xpack.uptime.alerts.tls/observability/alert/get", + "alerting:xpack.uptime.alerts.tls/observability/alert/find", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/alert/update", + "alerting:xpack.uptime.alerts.tls/alerts/alert/get", + "alerting:xpack.uptime.alerts.tls/alerts/alert/find", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/alert/update", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/update", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/update", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/update", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/update", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/update", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/update", + "alerting:logs.alert.document.count/observability/alert/get", + "alerting:logs.alert.document.count/observability/alert/find", + "alerting:logs.alert.document.count/observability/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/observability/alert/getAlertSummary", + "alerting:logs.alert.document.count/observability/alert/update", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/update", + "alerting:slo.rules.burnRate/observability/alert/get", + "alerting:slo.rules.burnRate/observability/alert/find", + "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", + "alerting:slo.rules.burnRate/observability/alert/update", + "alerting:slo.rules.burnRate/alerts/alert/get", + "alerting:slo.rules.burnRate/alerts/alert/find", + "alerting:slo.rules.burnRate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/alerts/alert/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/alert/update", + "alerting:observability.rules.custom_threshold/observability/alert/get", + "alerting:observability.rules.custom_threshold/observability/alert/find", + "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/alert/update", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/update", + "alerting:.es-query/observability/alert/get", + "alerting:.es-query/observability/alert/find", + "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/observability/alert/getAlertSummary", + "alerting:.es-query/observability/alert/update", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/update", + ], + "generate_report": Array [ + "login:", + "api:generateReport", + "ui:management/insightsAndAlerting/reporting", + "ui:discover/generateCsv", + ], + "minimal_all": Array [ + "login:", + "api:fileUpload:analyzeFile", + "api:savedQuery:manage", + "api:savedQuery:read", + "app:discover", + "app:kibana", + "ui:catalogue/discover", + "ui:navLinks/discover", + "ui:navLinks/kibana", + "saved_object:search/bulk_get", + "saved_object:search/get", + "saved_object:search/find", + "saved_object:search/open_point_in_time", + "saved_object:search/close_point_in_time", + "saved_object:search/create", + "saved_object:search/bulk_create", + "saved_object:search/update", + "saved_object:search/bulk_update", + "saved_object:search/delete", + "saved_object:search/bulk_delete", + "saved_object:search/share_to_space", + "saved_object:query/bulk_get", + "saved_object:query/get", + "saved_object:query/find", + "saved_object:query/open_point_in_time", + "saved_object:query/close_point_in_time", + "saved_object:query/create", + "saved_object:query/bulk_create", + "saved_object:query/update", + "saved_object:query/bulk_update", + "saved_object:query/delete", + "saved_object:query/bulk_delete", + "saved_object:query/share_to_space", + "saved_object:telemetry/bulk_get", + "saved_object:telemetry/get", + "saved_object:telemetry/find", + "saved_object:telemetry/open_point_in_time", + "saved_object:telemetry/close_point_in_time", + "saved_object:telemetry/create", + "saved_object:telemetry/bulk_create", + "saved_object:telemetry/update", + "saved_object:telemetry/bulk_update", + "saved_object:telemetry/delete", + "saved_object:telemetry/bulk_delete", + "saved_object:telemetry/share_to_space", + "saved_object:index-pattern/bulk_get", + "saved_object:index-pattern/get", + "saved_object:index-pattern/find", + "saved_object:index-pattern/open_point_in_time", + "saved_object:index-pattern/close_point_in_time", + "saved_object:config/bulk_get", + "saved_object:config/get", + "saved_object:config/find", + "saved_object:config/open_point_in_time", + "saved_object:config/close_point_in_time", + "saved_object:config-global/bulk_get", + "saved_object:config-global/get", + "saved_object:config-global/find", + "saved_object:config-global/open_point_in_time", + "saved_object:config-global/close_point_in_time", + "saved_object:url/bulk_get", + "saved_object:url/get", + "saved_object:url/find", + "saved_object:url/open_point_in_time", + "saved_object:url/close_point_in_time", + "ui:discover/show", + "ui:discover/save", + "ui:discover/saveQuery", + "api:rac", + "app:observability", + "ui:catalogue/observability", + "ui:navLinks/observability", + "ui:observability/read", + "ui:observability/write", "alerting:apm.error_rate/observability/rule/get", "alerting:apm.error_rate/observability/rule/getRuleState", "alerting:apm.error_rate/observability/rule/getAlertSummary", @@ -3394,6 +6140,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.error_rate/observability/rule/runSoon", "alerting:apm.error_rate/observability/rule/scheduleBackfill", "alerting:apm.error_rate/observability/rule/deleteBackfill", + "alerting:apm.error_rate/alerts/rule/get", + "alerting:apm.error_rate/alerts/rule/getRuleState", + "alerting:apm.error_rate/alerts/rule/getAlertSummary", + "alerting:apm.error_rate/alerts/rule/getExecutionLog", + "alerting:apm.error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.error_rate/alerts/rule/find", + "alerting:apm.error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.error_rate/alerts/rule/getBackfill", + "alerting:apm.error_rate/alerts/rule/findBackfill", + "alerting:apm.error_rate/alerts/rule/create", + "alerting:apm.error_rate/alerts/rule/delete", + "alerting:apm.error_rate/alerts/rule/update", + "alerting:apm.error_rate/alerts/rule/updateApiKey", + "alerting:apm.error_rate/alerts/rule/enable", + "alerting:apm.error_rate/alerts/rule/disable", + "alerting:apm.error_rate/alerts/rule/muteAll", + "alerting:apm.error_rate/alerts/rule/unmuteAll", + "alerting:apm.error_rate/alerts/rule/muteAlert", + "alerting:apm.error_rate/alerts/rule/unmuteAlert", + "alerting:apm.error_rate/alerts/rule/snooze", + "alerting:apm.error_rate/alerts/rule/bulkEdit", + "alerting:apm.error_rate/alerts/rule/bulkDelete", + "alerting:apm.error_rate/alerts/rule/bulkEnable", + "alerting:apm.error_rate/alerts/rule/bulkDisable", + "alerting:apm.error_rate/alerts/rule/unsnooze", + "alerting:apm.error_rate/alerts/rule/runSoon", + "alerting:apm.error_rate/alerts/rule/scheduleBackfill", + "alerting:apm.error_rate/alerts/rule/deleteBackfill", "alerting:apm.transaction_error_rate/observability/rule/get", "alerting:apm.transaction_error_rate/observability/rule/getRuleState", "alerting:apm.transaction_error_rate/observability/rule/getAlertSummary", @@ -3422,6 +6196,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_error_rate/observability/rule/runSoon", "alerting:apm.transaction_error_rate/observability/rule/scheduleBackfill", "alerting:apm.transaction_error_rate/observability/rule/deleteBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/get", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleState", + "alerting:apm.transaction_error_rate/alerts/rule/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/rule/getExecutionLog", + "alerting:apm.transaction_error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_error_rate/alerts/rule/find", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_error_rate/alerts/rule/getBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/findBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/create", + "alerting:apm.transaction_error_rate/alerts/rule/delete", + "alerting:apm.transaction_error_rate/alerts/rule/update", + "alerting:apm.transaction_error_rate/alerts/rule/updateApiKey", + "alerting:apm.transaction_error_rate/alerts/rule/enable", + "alerting:apm.transaction_error_rate/alerts/rule/disable", + "alerting:apm.transaction_error_rate/alerts/rule/muteAll", + "alerting:apm.transaction_error_rate/alerts/rule/unmuteAll", + "alerting:apm.transaction_error_rate/alerts/rule/muteAlert", + "alerting:apm.transaction_error_rate/alerts/rule/unmuteAlert", + "alerting:apm.transaction_error_rate/alerts/rule/snooze", + "alerting:apm.transaction_error_rate/alerts/rule/bulkEdit", + "alerting:apm.transaction_error_rate/alerts/rule/bulkDelete", + "alerting:apm.transaction_error_rate/alerts/rule/bulkEnable", + "alerting:apm.transaction_error_rate/alerts/rule/bulkDisable", + "alerting:apm.transaction_error_rate/alerts/rule/unsnooze", + "alerting:apm.transaction_error_rate/alerts/rule/runSoon", + "alerting:apm.transaction_error_rate/alerts/rule/scheduleBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/deleteBackfill", "alerting:apm.transaction_duration/observability/rule/get", "alerting:apm.transaction_duration/observability/rule/getRuleState", "alerting:apm.transaction_duration/observability/rule/getAlertSummary", @@ -3450,6 +6252,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_duration/observability/rule/runSoon", "alerting:apm.transaction_duration/observability/rule/scheduleBackfill", "alerting:apm.transaction_duration/observability/rule/deleteBackfill", + "alerting:apm.transaction_duration/alerts/rule/get", + "alerting:apm.transaction_duration/alerts/rule/getRuleState", + "alerting:apm.transaction_duration/alerts/rule/getAlertSummary", + "alerting:apm.transaction_duration/alerts/rule/getExecutionLog", + "alerting:apm.transaction_duration/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_duration/alerts/rule/find", + "alerting:apm.transaction_duration/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_duration/alerts/rule/getBackfill", + "alerting:apm.transaction_duration/alerts/rule/findBackfill", + "alerting:apm.transaction_duration/alerts/rule/create", + "alerting:apm.transaction_duration/alerts/rule/delete", + "alerting:apm.transaction_duration/alerts/rule/update", + "alerting:apm.transaction_duration/alerts/rule/updateApiKey", + "alerting:apm.transaction_duration/alerts/rule/enable", + "alerting:apm.transaction_duration/alerts/rule/disable", + "alerting:apm.transaction_duration/alerts/rule/muteAll", + "alerting:apm.transaction_duration/alerts/rule/unmuteAll", + "alerting:apm.transaction_duration/alerts/rule/muteAlert", + "alerting:apm.transaction_duration/alerts/rule/unmuteAlert", + "alerting:apm.transaction_duration/alerts/rule/snooze", + "alerting:apm.transaction_duration/alerts/rule/bulkEdit", + "alerting:apm.transaction_duration/alerts/rule/bulkDelete", + "alerting:apm.transaction_duration/alerts/rule/bulkEnable", + "alerting:apm.transaction_duration/alerts/rule/bulkDisable", + "alerting:apm.transaction_duration/alerts/rule/unsnooze", + "alerting:apm.transaction_duration/alerts/rule/runSoon", + "alerting:apm.transaction_duration/alerts/rule/scheduleBackfill", + "alerting:apm.transaction_duration/alerts/rule/deleteBackfill", "alerting:apm.anomaly/observability/rule/get", "alerting:apm.anomaly/observability/rule/getRuleState", "alerting:apm.anomaly/observability/rule/getAlertSummary", @@ -3478,6 +6308,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.anomaly/observability/rule/runSoon", "alerting:apm.anomaly/observability/rule/scheduleBackfill", "alerting:apm.anomaly/observability/rule/deleteBackfill", + "alerting:apm.anomaly/alerts/rule/get", + "alerting:apm.anomaly/alerts/rule/getRuleState", + "alerting:apm.anomaly/alerts/rule/getAlertSummary", + "alerting:apm.anomaly/alerts/rule/getExecutionLog", + "alerting:apm.anomaly/alerts/rule/getActionErrorLog", + "alerting:apm.anomaly/alerts/rule/find", + "alerting:apm.anomaly/alerts/rule/getRuleExecutionKPI", + "alerting:apm.anomaly/alerts/rule/getBackfill", + "alerting:apm.anomaly/alerts/rule/findBackfill", + "alerting:apm.anomaly/alerts/rule/create", + "alerting:apm.anomaly/alerts/rule/delete", + "alerting:apm.anomaly/alerts/rule/update", + "alerting:apm.anomaly/alerts/rule/updateApiKey", + "alerting:apm.anomaly/alerts/rule/enable", + "alerting:apm.anomaly/alerts/rule/disable", + "alerting:apm.anomaly/alerts/rule/muteAll", + "alerting:apm.anomaly/alerts/rule/unmuteAll", + "alerting:apm.anomaly/alerts/rule/muteAlert", + "alerting:apm.anomaly/alerts/rule/unmuteAlert", + "alerting:apm.anomaly/alerts/rule/snooze", + "alerting:apm.anomaly/alerts/rule/bulkEdit", + "alerting:apm.anomaly/alerts/rule/bulkDelete", + "alerting:apm.anomaly/alerts/rule/bulkEnable", + "alerting:apm.anomaly/alerts/rule/bulkDisable", + "alerting:apm.anomaly/alerts/rule/unsnooze", + "alerting:apm.anomaly/alerts/rule/runSoon", + "alerting:apm.anomaly/alerts/rule/scheduleBackfill", + "alerting:apm.anomaly/alerts/rule/deleteBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getAlertSummary", @@ -3506,6 +6364,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/runSoon", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/scheduleBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/deleteBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/create", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/delete", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/update", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/updateApiKey", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/enable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/disable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/muteAll", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unmuteAll", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/muteAlert", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unmuteAlert", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/snooze", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkEdit", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkDelete", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkEnable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unsnooze", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/runSoon", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/deleteBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/get", "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.tls/observability/rule/getAlertSummary", @@ -3534,64 +6420,824 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/rule/runSoon", "alerting:xpack.synthetics.alerts.tls/observability/rule/scheduleBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/deleteBackfill", - "alerting:slo.rules.burnRate/observability/alert/get", - "alerting:slo.rules.burnRate/observability/alert/find", - "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", - "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", - "alerting:slo.rules.burnRate/observability/alert/update", - "alerting:observability.rules.custom_threshold/observability/alert/get", - "alerting:observability.rules.custom_threshold/observability/alert/find", - "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/alert/update", - "alerting:.es-query/observability/alert/get", - "alerting:.es-query/observability/alert/find", - "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", - "alerting:.es-query/observability/alert/getAlertSummary", - "alerting:.es-query/observability/alert/update", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/update", - "alerting:metrics.alert.inventory.threshold/observability/alert/get", - "alerting:metrics.alert.inventory.threshold/observability/alert/find", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/alert/update", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/get", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/find", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/create", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/delete", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/update", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/updateApiKey", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/enable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/disable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/muteAll", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unmuteAll", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/muteAlert", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unmuteAlert", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/snooze", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkEdit", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkDelete", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkEnable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unsnooze", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/runSoon", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/deleteBackfill", + "alerting:metrics.alert.threshold/observability/rule/get", + "alerting:metrics.alert.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/observability/rule/find", + "alerting:metrics.alert.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.threshold/observability/rule/create", + "alerting:metrics.alert.threshold/observability/rule/delete", + "alerting:metrics.alert.threshold/observability/rule/update", + "alerting:metrics.alert.threshold/observability/rule/updateApiKey", + "alerting:metrics.alert.threshold/observability/rule/enable", + "alerting:metrics.alert.threshold/observability/rule/disable", + "alerting:metrics.alert.threshold/observability/rule/muteAll", + "alerting:metrics.alert.threshold/observability/rule/unmuteAll", + "alerting:metrics.alert.threshold/observability/rule/muteAlert", + "alerting:metrics.alert.threshold/observability/rule/unmuteAlert", + "alerting:metrics.alert.threshold/observability/rule/snooze", + "alerting:metrics.alert.threshold/observability/rule/bulkEdit", + "alerting:metrics.alert.threshold/observability/rule/bulkDelete", + "alerting:metrics.alert.threshold/observability/rule/bulkEnable", + "alerting:metrics.alert.threshold/observability/rule/bulkDisable", + "alerting:metrics.alert.threshold/observability/rule/unsnooze", + "alerting:metrics.alert.threshold/observability/rule/runSoon", + "alerting:metrics.alert.threshold/observability/rule/scheduleBackfill", + "alerting:metrics.alert.threshold/observability/rule/deleteBackfill", + "alerting:metrics.alert.threshold/alerts/rule/get", + "alerting:metrics.alert.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/alerts/rule/find", + "alerting:metrics.alert.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.threshold/alerts/rule/create", + "alerting:metrics.alert.threshold/alerts/rule/delete", + "alerting:metrics.alert.threshold/alerts/rule/update", + "alerting:metrics.alert.threshold/alerts/rule/updateApiKey", + "alerting:metrics.alert.threshold/alerts/rule/enable", + "alerting:metrics.alert.threshold/alerts/rule/disable", + "alerting:metrics.alert.threshold/alerts/rule/muteAll", + "alerting:metrics.alert.threshold/alerts/rule/unmuteAll", + "alerting:metrics.alert.threshold/alerts/rule/muteAlert", + "alerting:metrics.alert.threshold/alerts/rule/unmuteAlert", + "alerting:metrics.alert.threshold/alerts/rule/snooze", + "alerting:metrics.alert.threshold/alerts/rule/bulkEdit", + "alerting:metrics.alert.threshold/alerts/rule/bulkDelete", + "alerting:metrics.alert.threshold/alerts/rule/bulkEnable", + "alerting:metrics.alert.threshold/alerts/rule/bulkDisable", + "alerting:metrics.alert.threshold/alerts/rule/unsnooze", + "alerting:metrics.alert.threshold/alerts/rule/runSoon", + "alerting:metrics.alert.threshold/alerts/rule/scheduleBackfill", + "alerting:metrics.alert.threshold/alerts/rule/deleteBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/get", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/find", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/create", + "alerting:metrics.alert.inventory.threshold/observability/rule/delete", + "alerting:metrics.alert.inventory.threshold/observability/rule/update", + "alerting:metrics.alert.inventory.threshold/observability/rule/updateApiKey", + "alerting:metrics.alert.inventory.threshold/observability/rule/enable", + "alerting:metrics.alert.inventory.threshold/observability/rule/disable", + "alerting:metrics.alert.inventory.threshold/observability/rule/muteAll", + "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAll", + "alerting:metrics.alert.inventory.threshold/observability/rule/muteAlert", + "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAlert", + "alerting:metrics.alert.inventory.threshold/observability/rule/snooze", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEdit", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDelete", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEnable", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDisable", + "alerting:metrics.alert.inventory.threshold/observability/rule/unsnooze", + "alerting:metrics.alert.inventory.threshold/observability/rule/runSoon", + "alerting:metrics.alert.inventory.threshold/observability/rule/scheduleBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/deleteBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/get", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/find", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/create", + "alerting:metrics.alert.inventory.threshold/alerts/rule/delete", + "alerting:metrics.alert.inventory.threshold/alerts/rule/update", + "alerting:metrics.alert.inventory.threshold/alerts/rule/updateApiKey", + "alerting:metrics.alert.inventory.threshold/alerts/rule/enable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/disable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/muteAll", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unmuteAll", + "alerting:metrics.alert.inventory.threshold/alerts/rule/muteAlert", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unmuteAlert", + "alerting:metrics.alert.inventory.threshold/alerts/rule/snooze", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkEdit", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkDelete", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkEnable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkDisable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unsnooze", + "alerting:metrics.alert.inventory.threshold/alerts/rule/runSoon", + "alerting:metrics.alert.inventory.threshold/alerts/rule/scheduleBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/get", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/find", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/create", + "alerting:xpack.uptime.alerts.tls/observability/rule/delete", + "alerting:xpack.uptime.alerts.tls/observability/rule/update", + "alerting:xpack.uptime.alerts.tls/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tls/observability/rule/enable", + "alerting:xpack.uptime.alerts.tls/observability/rule/disable", + "alerting:xpack.uptime.alerts.tls/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.tls/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tls/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.tls/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tls/observability/rule/snooze", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tls/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.tls/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.tls/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/get", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/find", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/create", + "alerting:xpack.uptime.alerts.tls/alerts/rule/delete", + "alerting:xpack.uptime.alerts.tls/alerts/rule/update", + "alerting:xpack.uptime.alerts.tls/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tls/alerts/rule/enable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/disable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tls/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tls/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.tls/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.tls/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/create", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/delete", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/update", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/enable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/disable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/snooze", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/create", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/delete", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/update", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/enable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/disable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/create", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/delete", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/update", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/enable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/disable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/snooze", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/create", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/delete", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/update", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/enable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/disable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/create", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/delete", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/update", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/enable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/disable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/snooze", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/create", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/delete", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/update", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/enable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/disable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/deleteBackfill", + "alerting:logs.alert.document.count/observability/rule/get", + "alerting:logs.alert.document.count/observability/rule/getRuleState", + "alerting:logs.alert.document.count/observability/rule/getAlertSummary", + "alerting:logs.alert.document.count/observability/rule/getExecutionLog", + "alerting:logs.alert.document.count/observability/rule/getActionErrorLog", + "alerting:logs.alert.document.count/observability/rule/find", + "alerting:logs.alert.document.count/observability/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/observability/rule/getBackfill", + "alerting:logs.alert.document.count/observability/rule/findBackfill", + "alerting:logs.alert.document.count/observability/rule/create", + "alerting:logs.alert.document.count/observability/rule/delete", + "alerting:logs.alert.document.count/observability/rule/update", + "alerting:logs.alert.document.count/observability/rule/updateApiKey", + "alerting:logs.alert.document.count/observability/rule/enable", + "alerting:logs.alert.document.count/observability/rule/disable", + "alerting:logs.alert.document.count/observability/rule/muteAll", + "alerting:logs.alert.document.count/observability/rule/unmuteAll", + "alerting:logs.alert.document.count/observability/rule/muteAlert", + "alerting:logs.alert.document.count/observability/rule/unmuteAlert", + "alerting:logs.alert.document.count/observability/rule/snooze", + "alerting:logs.alert.document.count/observability/rule/bulkEdit", + "alerting:logs.alert.document.count/observability/rule/bulkDelete", + "alerting:logs.alert.document.count/observability/rule/bulkEnable", + "alerting:logs.alert.document.count/observability/rule/bulkDisable", + "alerting:logs.alert.document.count/observability/rule/unsnooze", + "alerting:logs.alert.document.count/observability/rule/runSoon", + "alerting:logs.alert.document.count/observability/rule/scheduleBackfill", + "alerting:logs.alert.document.count/observability/rule/deleteBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/create", + "alerting:logs.alert.document.count/alerts/rule/delete", + "alerting:logs.alert.document.count/alerts/rule/update", + "alerting:logs.alert.document.count/alerts/rule/updateApiKey", + "alerting:logs.alert.document.count/alerts/rule/enable", + "alerting:logs.alert.document.count/alerts/rule/disable", + "alerting:logs.alert.document.count/alerts/rule/muteAll", + "alerting:logs.alert.document.count/alerts/rule/unmuteAll", + "alerting:logs.alert.document.count/alerts/rule/muteAlert", + "alerting:logs.alert.document.count/alerts/rule/unmuteAlert", + "alerting:logs.alert.document.count/alerts/rule/snooze", + "alerting:logs.alert.document.count/alerts/rule/bulkEdit", + "alerting:logs.alert.document.count/alerts/rule/bulkDelete", + "alerting:logs.alert.document.count/alerts/rule/bulkEnable", + "alerting:logs.alert.document.count/alerts/rule/bulkDisable", + "alerting:logs.alert.document.count/alerts/rule/unsnooze", + "alerting:logs.alert.document.count/alerts/rule/runSoon", + "alerting:logs.alert.document.count/alerts/rule/scheduleBackfill", + "alerting:logs.alert.document.count/alerts/rule/deleteBackfill", + "alerting:slo.rules.burnRate/observability/rule/get", + "alerting:slo.rules.burnRate/observability/rule/getRuleState", + "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", + "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", + "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/observability/rule/find", + "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/observability/rule/getBackfill", + "alerting:slo.rules.burnRate/observability/rule/findBackfill", + "alerting:slo.rules.burnRate/observability/rule/create", + "alerting:slo.rules.burnRate/observability/rule/delete", + "alerting:slo.rules.burnRate/observability/rule/update", + "alerting:slo.rules.burnRate/observability/rule/updateApiKey", + "alerting:slo.rules.burnRate/observability/rule/enable", + "alerting:slo.rules.burnRate/observability/rule/disable", + "alerting:slo.rules.burnRate/observability/rule/muteAll", + "alerting:slo.rules.burnRate/observability/rule/unmuteAll", + "alerting:slo.rules.burnRate/observability/rule/muteAlert", + "alerting:slo.rules.burnRate/observability/rule/unmuteAlert", + "alerting:slo.rules.burnRate/observability/rule/snooze", + "alerting:slo.rules.burnRate/observability/rule/bulkEdit", + "alerting:slo.rules.burnRate/observability/rule/bulkDelete", + "alerting:slo.rules.burnRate/observability/rule/bulkEnable", + "alerting:slo.rules.burnRate/observability/rule/bulkDisable", + "alerting:slo.rules.burnRate/observability/rule/unsnooze", + "alerting:slo.rules.burnRate/observability/rule/runSoon", + "alerting:slo.rules.burnRate/observability/rule/scheduleBackfill", + "alerting:slo.rules.burnRate/observability/rule/deleteBackfill", + "alerting:slo.rules.burnRate/alerts/rule/get", + "alerting:slo.rules.burnRate/alerts/rule/getRuleState", + "alerting:slo.rules.burnRate/alerts/rule/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/rule/getExecutionLog", + "alerting:slo.rules.burnRate/alerts/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/alerts/rule/find", + "alerting:slo.rules.burnRate/alerts/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/alerts/rule/getBackfill", + "alerting:slo.rules.burnRate/alerts/rule/findBackfill", + "alerting:slo.rules.burnRate/alerts/rule/create", + "alerting:slo.rules.burnRate/alerts/rule/delete", + "alerting:slo.rules.burnRate/alerts/rule/update", + "alerting:slo.rules.burnRate/alerts/rule/updateApiKey", + "alerting:slo.rules.burnRate/alerts/rule/enable", + "alerting:slo.rules.burnRate/alerts/rule/disable", + "alerting:slo.rules.burnRate/alerts/rule/muteAll", + "alerting:slo.rules.burnRate/alerts/rule/unmuteAll", + "alerting:slo.rules.burnRate/alerts/rule/muteAlert", + "alerting:slo.rules.burnRate/alerts/rule/unmuteAlert", + "alerting:slo.rules.burnRate/alerts/rule/snooze", + "alerting:slo.rules.burnRate/alerts/rule/bulkEdit", + "alerting:slo.rules.burnRate/alerts/rule/bulkDelete", + "alerting:slo.rules.burnRate/alerts/rule/bulkEnable", + "alerting:slo.rules.burnRate/alerts/rule/bulkDisable", + "alerting:slo.rules.burnRate/alerts/rule/unsnooze", + "alerting:slo.rules.burnRate/alerts/rule/runSoon", + "alerting:slo.rules.burnRate/alerts/rule/scheduleBackfill", + "alerting:slo.rules.burnRate/alerts/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/get", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", + "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/observability/rule/find", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/create", + "alerting:observability.rules.custom_threshold/observability/rule/delete", + "alerting:observability.rules.custom_threshold/observability/rule/update", + "alerting:observability.rules.custom_threshold/observability/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/observability/rule/enable", + "alerting:observability.rules.custom_threshold/observability/rule/disable", + "alerting:observability.rules.custom_threshold/observability/rule/muteAll", + "alerting:observability.rules.custom_threshold/observability/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/observability/rule/muteAlert", + "alerting:observability.rules.custom_threshold/observability/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/observability/rule/snooze", + "alerting:observability.rules.custom_threshold/observability/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/observability/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/observability/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/observability/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/observability/rule/unsnooze", + "alerting:observability.rules.custom_threshold/observability/rule/runSoon", + "alerting:observability.rules.custom_threshold/observability/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/create", + "alerting:observability.rules.custom_threshold/alerts/rule/delete", + "alerting:observability.rules.custom_threshold/alerts/rule/update", + "alerting:observability.rules.custom_threshold/alerts/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/alerts/rule/enable", + "alerting:observability.rules.custom_threshold/alerts/rule/disable", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/snooze", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/alerts/rule/unsnooze", + "alerting:observability.rules.custom_threshold/alerts/rule/runSoon", + "alerting:observability.rules.custom_threshold/alerts/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/deleteBackfill", + "alerting:.es-query/observability/rule/get", + "alerting:.es-query/observability/rule/getRuleState", + "alerting:.es-query/observability/rule/getAlertSummary", + "alerting:.es-query/observability/rule/getExecutionLog", + "alerting:.es-query/observability/rule/getActionErrorLog", + "alerting:.es-query/observability/rule/find", + "alerting:.es-query/observability/rule/getRuleExecutionKPI", + "alerting:.es-query/observability/rule/getBackfill", + "alerting:.es-query/observability/rule/findBackfill", + "alerting:.es-query/observability/rule/create", + "alerting:.es-query/observability/rule/delete", + "alerting:.es-query/observability/rule/update", + "alerting:.es-query/observability/rule/updateApiKey", + "alerting:.es-query/observability/rule/enable", + "alerting:.es-query/observability/rule/disable", + "alerting:.es-query/observability/rule/muteAll", + "alerting:.es-query/observability/rule/unmuteAll", + "alerting:.es-query/observability/rule/muteAlert", + "alerting:.es-query/observability/rule/unmuteAlert", + "alerting:.es-query/observability/rule/snooze", + "alerting:.es-query/observability/rule/bulkEdit", + "alerting:.es-query/observability/rule/bulkDelete", + "alerting:.es-query/observability/rule/bulkEnable", + "alerting:.es-query/observability/rule/bulkDisable", + "alerting:.es-query/observability/rule/unsnooze", + "alerting:.es-query/observability/rule/runSoon", + "alerting:.es-query/observability/rule/scheduleBackfill", + "alerting:.es-query/observability/rule/deleteBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", + "alerting:.es-query/alerts/rule/create", + "alerting:.es-query/alerts/rule/delete", + "alerting:.es-query/alerts/rule/update", + "alerting:.es-query/alerts/rule/updateApiKey", + "alerting:.es-query/alerts/rule/enable", + "alerting:.es-query/alerts/rule/disable", + "alerting:.es-query/alerts/rule/muteAll", + "alerting:.es-query/alerts/rule/unmuteAll", + "alerting:.es-query/alerts/rule/muteAlert", + "alerting:.es-query/alerts/rule/unmuteAlert", + "alerting:.es-query/alerts/rule/snooze", + "alerting:.es-query/alerts/rule/bulkEdit", + "alerting:.es-query/alerts/rule/bulkDelete", + "alerting:.es-query/alerts/rule/bulkEnable", + "alerting:.es-query/alerts/rule/bulkDisable", + "alerting:.es-query/alerts/rule/unsnooze", + "alerting:.es-query/alerts/rule/runSoon", + "alerting:.es-query/alerts/rule/scheduleBackfill", + "alerting:.es-query/alerts/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/deleteBackfill", "alerting:apm.error_rate/observability/alert/get", "alerting:apm.error_rate/observability/alert/find", "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.error_rate/observability/alert/getAlertSummary", "alerting:apm.error_rate/observability/alert/update", + "alerting:apm.error_rate/alerts/alert/get", + "alerting:apm.error_rate/alerts/alert/find", + "alerting:apm.error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/alerts/alert/getAlertSummary", + "alerting:apm.error_rate/alerts/alert/update", "alerting:apm.transaction_error_rate/observability/alert/get", "alerting:apm.transaction_error_rate/observability/alert/find", "alerting:apm.transaction_error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_error_rate/observability/alert/getAlertSummary", "alerting:apm.transaction_error_rate/observability/alert/update", + "alerting:apm.transaction_error_rate/alerts/alert/get", + "alerting:apm.transaction_error_rate/alerts/alert/find", + "alerting:apm.transaction_error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/alerts/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/alert/update", "alerting:apm.transaction_duration/observability/alert/get", "alerting:apm.transaction_duration/observability/alert/find", "alerting:apm.transaction_duration/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_duration/observability/alert/getAlertSummary", "alerting:apm.transaction_duration/observability/alert/update", + "alerting:apm.transaction_duration/alerts/alert/get", + "alerting:apm.transaction_duration/alerts/alert/find", + "alerting:apm.transaction_duration/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/alerts/alert/getAlertSummary", + "alerting:apm.transaction_duration/alerts/alert/update", "alerting:apm.anomaly/observability/alert/get", "alerting:apm.anomaly/observability/alert/find", "alerting:apm.anomaly/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.anomaly/observability/alert/getAlertSummary", "alerting:apm.anomaly/observability/alert/update", + "alerting:apm.anomaly/alerts/alert/get", + "alerting:apm.anomaly/alerts/alert/find", + "alerting:apm.anomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/alerts/alert/getAlertSummary", + "alerting:apm.anomaly/alerts/alert/update", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/update", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/update", "alerting:xpack.synthetics.alerts.tls/observability/alert/get", "alerting:xpack.synthetics.alerts.tls/observability/alert/find", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.tls/observability/alert/update", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/get", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/find", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/update", + "alerting:metrics.alert.threshold/observability/alert/get", + "alerting:metrics.alert.threshold/observability/alert/find", + "alerting:metrics.alert.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.threshold/observability/alert/update", + "alerting:metrics.alert.threshold/alerts/alert/get", + "alerting:metrics.alert.threshold/alerts/alert/find", + "alerting:metrics.alert.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/alert/update", + "alerting:metrics.alert.inventory.threshold/observability/alert/get", + "alerting:metrics.alert.inventory.threshold/observability/alert/find", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/alert/update", + "alerting:metrics.alert.inventory.threshold/alerts/alert/get", + "alerting:metrics.alert.inventory.threshold/alerts/alert/find", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/alert/update", + "alerting:xpack.uptime.alerts.tls/observability/alert/get", + "alerting:xpack.uptime.alerts.tls/observability/alert/find", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/alert/update", + "alerting:xpack.uptime.alerts.tls/alerts/alert/get", + "alerting:xpack.uptime.alerts.tls/alerts/alert/find", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/alert/update", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/update", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/update", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/update", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/update", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/update", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/update", + "alerting:logs.alert.document.count/observability/alert/get", + "alerting:logs.alert.document.count/observability/alert/find", + "alerting:logs.alert.document.count/observability/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/observability/alert/getAlertSummary", + "alerting:logs.alert.document.count/observability/alert/update", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/update", + "alerting:slo.rules.burnRate/observability/alert/get", + "alerting:slo.rules.burnRate/observability/alert/find", + "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", + "alerting:slo.rules.burnRate/observability/alert/update", + "alerting:slo.rules.burnRate/alerts/alert/get", + "alerting:slo.rules.burnRate/alerts/alert/find", + "alerting:slo.rules.burnRate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/alerts/alert/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/alert/update", + "alerting:observability.rules.custom_threshold/observability/alert/get", + "alerting:observability.rules.custom_threshold/observability/alert/find", + "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/alert/update", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/update", + "alerting:.es-query/observability/alert/get", + "alerting:.es-query/observability/alert/find", + "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/observability/alert/getAlertSummary", + "alerting:.es-query/observability/alert/update", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/update", ], "minimal_read": Array [ "login:", + "api:savedQuery:read", "app:discover", "app:kibana", "ui:catalogue/discover", @@ -3638,51 +7284,6 @@ export default function ({ getService }: FtrProviderContext) { "ui:catalogue/observability", "ui:navLinks/observability", "ui:observability/read", - "alerting:slo.rules.burnRate/observability/rule/get", - "alerting:slo.rules.burnRate/observability/rule/getRuleState", - "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", - "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", - "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", - "alerting:slo.rules.burnRate/observability/rule/find", - "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", - "alerting:slo.rules.burnRate/observability/rule/getBackfill", - "alerting:slo.rules.burnRate/observability/rule/findBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/get", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", - "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", - "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", - "alerting:observability.rules.custom_threshold/observability/rule/find", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", - "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", - "alerting:.es-query/observability/rule/get", - "alerting:.es-query/observability/rule/getRuleState", - "alerting:.es-query/observability/rule/getAlertSummary", - "alerting:.es-query/observability/rule/getExecutionLog", - "alerting:.es-query/observability/rule/getActionErrorLog", - "alerting:.es-query/observability/rule/find", - "alerting:.es-query/observability/rule/getRuleExecutionKPI", - "alerting:.es-query/observability/rule/getBackfill", - "alerting:.es-query/observability/rule/findBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/get", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", - "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/find", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", - "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", "alerting:apm.error_rate/observability/rule/get", "alerting:apm.error_rate/observability/rule/getRuleState", "alerting:apm.error_rate/observability/rule/getAlertSummary", @@ -3692,6 +7293,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.error_rate/observability/rule/getRuleExecutionKPI", "alerting:apm.error_rate/observability/rule/getBackfill", "alerting:apm.error_rate/observability/rule/findBackfill", + "alerting:apm.error_rate/alerts/rule/get", + "alerting:apm.error_rate/alerts/rule/getRuleState", + "alerting:apm.error_rate/alerts/rule/getAlertSummary", + "alerting:apm.error_rate/alerts/rule/getExecutionLog", + "alerting:apm.error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.error_rate/alerts/rule/find", + "alerting:apm.error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.error_rate/alerts/rule/getBackfill", + "alerting:apm.error_rate/alerts/rule/findBackfill", "alerting:apm.transaction_error_rate/observability/rule/get", "alerting:apm.transaction_error_rate/observability/rule/getRuleState", "alerting:apm.transaction_error_rate/observability/rule/getAlertSummary", @@ -3701,6 +7311,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_error_rate/observability/rule/getRuleExecutionKPI", "alerting:apm.transaction_error_rate/observability/rule/getBackfill", "alerting:apm.transaction_error_rate/observability/rule/findBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/get", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleState", + "alerting:apm.transaction_error_rate/alerts/rule/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/rule/getExecutionLog", + "alerting:apm.transaction_error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_error_rate/alerts/rule/find", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_error_rate/alerts/rule/getBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/findBackfill", "alerting:apm.transaction_duration/observability/rule/get", "alerting:apm.transaction_duration/observability/rule/getRuleState", "alerting:apm.transaction_duration/observability/rule/getAlertSummary", @@ -3710,6 +7329,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_duration/observability/rule/getRuleExecutionKPI", "alerting:apm.transaction_duration/observability/rule/getBackfill", "alerting:apm.transaction_duration/observability/rule/findBackfill", + "alerting:apm.transaction_duration/alerts/rule/get", + "alerting:apm.transaction_duration/alerts/rule/getRuleState", + "alerting:apm.transaction_duration/alerts/rule/getAlertSummary", + "alerting:apm.transaction_duration/alerts/rule/getExecutionLog", + "alerting:apm.transaction_duration/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_duration/alerts/rule/find", + "alerting:apm.transaction_duration/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_duration/alerts/rule/getBackfill", + "alerting:apm.transaction_duration/alerts/rule/findBackfill", "alerting:apm.anomaly/observability/rule/get", "alerting:apm.anomaly/observability/rule/getRuleState", "alerting:apm.anomaly/observability/rule/getAlertSummary", @@ -3719,6 +7347,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.anomaly/observability/rule/getRuleExecutionKPI", "alerting:apm.anomaly/observability/rule/getBackfill", "alerting:apm.anomaly/observability/rule/findBackfill", + "alerting:apm.anomaly/alerts/rule/get", + "alerting:apm.anomaly/alerts/rule/getRuleState", + "alerting:apm.anomaly/alerts/rule/getAlertSummary", + "alerting:apm.anomaly/alerts/rule/getExecutionLog", + "alerting:apm.anomaly/alerts/rule/getActionErrorLog", + "alerting:apm.anomaly/alerts/rule/find", + "alerting:apm.anomaly/alerts/rule/getRuleExecutionKPI", + "alerting:apm.anomaly/alerts/rule/getBackfill", + "alerting:apm.anomaly/alerts/rule/findBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getAlertSummary", @@ -3728,6 +7365,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/findBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/get", "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.tls/observability/rule/getAlertSummary", @@ -3737,53 +7383,353 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleExecutionKPI", "alerting:xpack.synthetics.alerts.tls/observability/rule/getBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/findBackfill", - "alerting:slo.rules.burnRate/observability/alert/get", - "alerting:slo.rules.burnRate/observability/alert/find", - "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", - "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/alert/get", - "alerting:observability.rules.custom_threshold/observability/alert/find", - "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", - "alerting:.es-query/observability/alert/get", - "alerting:.es-query/observability/alert/find", - "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", - "alerting:.es-query/observability/alert/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/alert/get", - "alerting:metrics.alert.inventory.threshold/observability/alert/find", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/get", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/find", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/findBackfill", + "alerting:metrics.alert.threshold/observability/rule/get", + "alerting:metrics.alert.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/observability/rule/find", + "alerting:metrics.alert.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.threshold/alerts/rule/get", + "alerting:metrics.alert.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/alerts/rule/find", + "alerting:metrics.alert.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/get", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/find", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/get", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/find", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/get", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/find", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/get", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/find", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/findBackfill", + "alerting:logs.alert.document.count/observability/rule/get", + "alerting:logs.alert.document.count/observability/rule/getRuleState", + "alerting:logs.alert.document.count/observability/rule/getAlertSummary", + "alerting:logs.alert.document.count/observability/rule/getExecutionLog", + "alerting:logs.alert.document.count/observability/rule/getActionErrorLog", + "alerting:logs.alert.document.count/observability/rule/find", + "alerting:logs.alert.document.count/observability/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/observability/rule/getBackfill", + "alerting:logs.alert.document.count/observability/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", + "alerting:slo.rules.burnRate/observability/rule/get", + "alerting:slo.rules.burnRate/observability/rule/getRuleState", + "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", + "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", + "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/observability/rule/find", + "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/observability/rule/getBackfill", + "alerting:slo.rules.burnRate/observability/rule/findBackfill", + "alerting:slo.rules.burnRate/alerts/rule/get", + "alerting:slo.rules.burnRate/alerts/rule/getRuleState", + "alerting:slo.rules.burnRate/alerts/rule/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/rule/getExecutionLog", + "alerting:slo.rules.burnRate/alerts/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/alerts/rule/find", + "alerting:slo.rules.burnRate/alerts/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/alerts/rule/getBackfill", + "alerting:slo.rules.burnRate/alerts/rule/findBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/get", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", + "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/observability/rule/find", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", + "alerting:.es-query/observability/rule/get", + "alerting:.es-query/observability/rule/getRuleState", + "alerting:.es-query/observability/rule/getAlertSummary", + "alerting:.es-query/observability/rule/getExecutionLog", + "alerting:.es-query/observability/rule/getActionErrorLog", + "alerting:.es-query/observability/rule/find", + "alerting:.es-query/observability/rule/getRuleExecutionKPI", + "alerting:.es-query/observability/rule/getBackfill", + "alerting:.es-query/observability/rule/findBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", "alerting:apm.error_rate/observability/alert/get", "alerting:apm.error_rate/observability/alert/find", "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.error_rate/observability/alert/getAlertSummary", + "alerting:apm.error_rate/alerts/alert/get", + "alerting:apm.error_rate/alerts/alert/find", + "alerting:apm.error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/alerts/alert/getAlertSummary", "alerting:apm.transaction_error_rate/observability/alert/get", "alerting:apm.transaction_error_rate/observability/alert/find", "alerting:apm.transaction_error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_error_rate/observability/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/alert/get", + "alerting:apm.transaction_error_rate/alerts/alert/find", + "alerting:apm.transaction_error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/alerts/alert/getAlertSummary", "alerting:apm.transaction_duration/observability/alert/get", "alerting:apm.transaction_duration/observability/alert/find", "alerting:apm.transaction_duration/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_duration/observability/alert/getAlertSummary", + "alerting:apm.transaction_duration/alerts/alert/get", + "alerting:apm.transaction_duration/alerts/alert/find", + "alerting:apm.transaction_duration/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/alerts/alert/getAlertSummary", "alerting:apm.anomaly/observability/alert/get", "alerting:apm.anomaly/observability/alert/find", "alerting:apm.anomaly/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.anomaly/observability/alert/getAlertSummary", + "alerting:apm.anomaly/alerts/alert/get", + "alerting:apm.anomaly/alerts/alert/find", + "alerting:apm.anomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/alerts/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.tls/observability/alert/get", "alerting:xpack.synthetics.alerts.tls/observability/alert/find", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/get", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/find", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAlertSummary", + "alerting:metrics.alert.threshold/observability/alert/get", + "alerting:metrics.alert.threshold/observability/alert/find", + "alerting:metrics.alert.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/alert/get", + "alerting:metrics.alert.threshold/alerts/alert/find", + "alerting:metrics.alert.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/alert/get", + "alerting:metrics.alert.inventory.threshold/observability/alert/find", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/alert/get", + "alerting:metrics.alert.inventory.threshold/alerts/alert/find", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/alert/get", + "alerting:xpack.uptime.alerts.tls/observability/alert/find", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/alert/get", + "alerting:xpack.uptime.alerts.tls/alerts/alert/find", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAlertSummary", + "alerting:logs.alert.document.count/observability/alert/get", + "alerting:logs.alert.document.count/observability/alert/find", + "alerting:logs.alert.document.count/observability/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/observability/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", + "alerting:slo.rules.burnRate/observability/alert/get", + "alerting:slo.rules.burnRate/observability/alert/find", + "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/alert/get", + "alerting:slo.rules.burnRate/alerts/alert/find", + "alerting:slo.rules.burnRate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/alerts/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/alert/get", + "alerting:observability.rules.custom_threshold/observability/alert/find", + "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", + "alerting:.es-query/observability/alert/get", + "alerting:.es-query/observability/alert/find", + "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/observability/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", ], "read": Array [ "login:", + "api:savedQuery:read", "app:discover", "app:kibana", "ui:catalogue/discover", @@ -3838,51 +7784,6 @@ export default function ({ getService }: FtrProviderContext) { "ui:catalogue/observability", "ui:navLinks/observability", "ui:observability/read", - "alerting:slo.rules.burnRate/observability/rule/get", - "alerting:slo.rules.burnRate/observability/rule/getRuleState", - "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", - "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", - "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", - "alerting:slo.rules.burnRate/observability/rule/find", - "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", - "alerting:slo.rules.burnRate/observability/rule/getBackfill", - "alerting:slo.rules.burnRate/observability/rule/findBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/get", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", - "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", - "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", - "alerting:observability.rules.custom_threshold/observability/rule/find", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", - "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", - "alerting:.es-query/observability/rule/get", - "alerting:.es-query/observability/rule/getRuleState", - "alerting:.es-query/observability/rule/getAlertSummary", - "alerting:.es-query/observability/rule/getExecutionLog", - "alerting:.es-query/observability/rule/getActionErrorLog", - "alerting:.es-query/observability/rule/find", - "alerting:.es-query/observability/rule/getRuleExecutionKPI", - "alerting:.es-query/observability/rule/getBackfill", - "alerting:.es-query/observability/rule/findBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/get", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", - "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/find", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", - "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", "alerting:apm.error_rate/observability/rule/get", "alerting:apm.error_rate/observability/rule/getRuleState", "alerting:apm.error_rate/observability/rule/getAlertSummary", @@ -3892,6 +7793,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.error_rate/observability/rule/getRuleExecutionKPI", "alerting:apm.error_rate/observability/rule/getBackfill", "alerting:apm.error_rate/observability/rule/findBackfill", + "alerting:apm.error_rate/alerts/rule/get", + "alerting:apm.error_rate/alerts/rule/getRuleState", + "alerting:apm.error_rate/alerts/rule/getAlertSummary", + "alerting:apm.error_rate/alerts/rule/getExecutionLog", + "alerting:apm.error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.error_rate/alerts/rule/find", + "alerting:apm.error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.error_rate/alerts/rule/getBackfill", + "alerting:apm.error_rate/alerts/rule/findBackfill", "alerting:apm.transaction_error_rate/observability/rule/get", "alerting:apm.transaction_error_rate/observability/rule/getRuleState", "alerting:apm.transaction_error_rate/observability/rule/getAlertSummary", @@ -3901,6 +7811,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_error_rate/observability/rule/getRuleExecutionKPI", "alerting:apm.transaction_error_rate/observability/rule/getBackfill", "alerting:apm.transaction_error_rate/observability/rule/findBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/get", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleState", + "alerting:apm.transaction_error_rate/alerts/rule/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/rule/getExecutionLog", + "alerting:apm.transaction_error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_error_rate/alerts/rule/find", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_error_rate/alerts/rule/getBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/findBackfill", "alerting:apm.transaction_duration/observability/rule/get", "alerting:apm.transaction_duration/observability/rule/getRuleState", "alerting:apm.transaction_duration/observability/rule/getAlertSummary", @@ -3910,6 +7829,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_duration/observability/rule/getRuleExecutionKPI", "alerting:apm.transaction_duration/observability/rule/getBackfill", "alerting:apm.transaction_duration/observability/rule/findBackfill", + "alerting:apm.transaction_duration/alerts/rule/get", + "alerting:apm.transaction_duration/alerts/rule/getRuleState", + "alerting:apm.transaction_duration/alerts/rule/getAlertSummary", + "alerting:apm.transaction_duration/alerts/rule/getExecutionLog", + "alerting:apm.transaction_duration/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_duration/alerts/rule/find", + "alerting:apm.transaction_duration/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_duration/alerts/rule/getBackfill", + "alerting:apm.transaction_duration/alerts/rule/findBackfill", "alerting:apm.anomaly/observability/rule/get", "alerting:apm.anomaly/observability/rule/getRuleState", "alerting:apm.anomaly/observability/rule/getAlertSummary", @@ -3919,6 +7847,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.anomaly/observability/rule/getRuleExecutionKPI", "alerting:apm.anomaly/observability/rule/getBackfill", "alerting:apm.anomaly/observability/rule/findBackfill", + "alerting:apm.anomaly/alerts/rule/get", + "alerting:apm.anomaly/alerts/rule/getRuleState", + "alerting:apm.anomaly/alerts/rule/getAlertSummary", + "alerting:apm.anomaly/alerts/rule/getExecutionLog", + "alerting:apm.anomaly/alerts/rule/getActionErrorLog", + "alerting:apm.anomaly/alerts/rule/find", + "alerting:apm.anomaly/alerts/rule/getRuleExecutionKPI", + "alerting:apm.anomaly/alerts/rule/getBackfill", + "alerting:apm.anomaly/alerts/rule/findBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getAlertSummary", @@ -3928,6 +7865,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/findBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/get", "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.tls/observability/rule/getAlertSummary", @@ -3937,50 +7883,349 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleExecutionKPI", "alerting:xpack.synthetics.alerts.tls/observability/rule/getBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/findBackfill", - "alerting:slo.rules.burnRate/observability/alert/get", - "alerting:slo.rules.burnRate/observability/alert/find", - "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", - "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/alert/get", - "alerting:observability.rules.custom_threshold/observability/alert/find", - "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", - "alerting:.es-query/observability/alert/get", - "alerting:.es-query/observability/alert/find", - "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", - "alerting:.es-query/observability/alert/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/alert/get", - "alerting:metrics.alert.inventory.threshold/observability/alert/find", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/get", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/find", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/findBackfill", + "alerting:metrics.alert.threshold/observability/rule/get", + "alerting:metrics.alert.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/observability/rule/find", + "alerting:metrics.alert.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.threshold/alerts/rule/get", + "alerting:metrics.alert.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/alerts/rule/find", + "alerting:metrics.alert.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/get", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/find", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/get", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/find", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/get", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/find", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/get", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/find", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/findBackfill", + "alerting:logs.alert.document.count/observability/rule/get", + "alerting:logs.alert.document.count/observability/rule/getRuleState", + "alerting:logs.alert.document.count/observability/rule/getAlertSummary", + "alerting:logs.alert.document.count/observability/rule/getExecutionLog", + "alerting:logs.alert.document.count/observability/rule/getActionErrorLog", + "alerting:logs.alert.document.count/observability/rule/find", + "alerting:logs.alert.document.count/observability/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/observability/rule/getBackfill", + "alerting:logs.alert.document.count/observability/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", + "alerting:slo.rules.burnRate/observability/rule/get", + "alerting:slo.rules.burnRate/observability/rule/getRuleState", + "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", + "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", + "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/observability/rule/find", + "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/observability/rule/getBackfill", + "alerting:slo.rules.burnRate/observability/rule/findBackfill", + "alerting:slo.rules.burnRate/alerts/rule/get", + "alerting:slo.rules.burnRate/alerts/rule/getRuleState", + "alerting:slo.rules.burnRate/alerts/rule/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/rule/getExecutionLog", + "alerting:slo.rules.burnRate/alerts/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/alerts/rule/find", + "alerting:slo.rules.burnRate/alerts/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/alerts/rule/getBackfill", + "alerting:slo.rules.burnRate/alerts/rule/findBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/get", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", + "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/observability/rule/find", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", + "alerting:.es-query/observability/rule/get", + "alerting:.es-query/observability/rule/getRuleState", + "alerting:.es-query/observability/rule/getAlertSummary", + "alerting:.es-query/observability/rule/getExecutionLog", + "alerting:.es-query/observability/rule/getActionErrorLog", + "alerting:.es-query/observability/rule/find", + "alerting:.es-query/observability/rule/getRuleExecutionKPI", + "alerting:.es-query/observability/rule/getBackfill", + "alerting:.es-query/observability/rule/findBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", "alerting:apm.error_rate/observability/alert/get", "alerting:apm.error_rate/observability/alert/find", "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.error_rate/observability/alert/getAlertSummary", + "alerting:apm.error_rate/alerts/alert/get", + "alerting:apm.error_rate/alerts/alert/find", + "alerting:apm.error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/alerts/alert/getAlertSummary", "alerting:apm.transaction_error_rate/observability/alert/get", "alerting:apm.transaction_error_rate/observability/alert/find", "alerting:apm.transaction_error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_error_rate/observability/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/alert/get", + "alerting:apm.transaction_error_rate/alerts/alert/find", + "alerting:apm.transaction_error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/alerts/alert/getAlertSummary", "alerting:apm.transaction_duration/observability/alert/get", "alerting:apm.transaction_duration/observability/alert/find", "alerting:apm.transaction_duration/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_duration/observability/alert/getAlertSummary", + "alerting:apm.transaction_duration/alerts/alert/get", + "alerting:apm.transaction_duration/alerts/alert/find", + "alerting:apm.transaction_duration/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/alerts/alert/getAlertSummary", "alerting:apm.anomaly/observability/alert/get", "alerting:apm.anomaly/observability/alert/find", "alerting:apm.anomaly/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.anomaly/observability/alert/getAlertSummary", + "alerting:apm.anomaly/alerts/alert/get", + "alerting:apm.anomaly/alerts/alert/find", + "alerting:apm.anomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/alerts/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.tls/observability/alert/get", "alerting:xpack.synthetics.alerts.tls/observability/alert/find", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/get", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/find", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAlertSummary", + "alerting:metrics.alert.threshold/observability/alert/get", + "alerting:metrics.alert.threshold/observability/alert/find", + "alerting:metrics.alert.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/alert/get", + "alerting:metrics.alert.threshold/alerts/alert/find", + "alerting:metrics.alert.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/alert/get", + "alerting:metrics.alert.inventory.threshold/observability/alert/find", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/alert/get", + "alerting:metrics.alert.inventory.threshold/alerts/alert/find", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/alert/get", + "alerting:xpack.uptime.alerts.tls/observability/alert/find", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/alert/get", + "alerting:xpack.uptime.alerts.tls/alerts/alert/find", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAlertSummary", + "alerting:logs.alert.document.count/observability/alert/get", + "alerting:logs.alert.document.count/observability/alert/find", + "alerting:logs.alert.document.count/observability/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/observability/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", + "alerting:slo.rules.burnRate/observability/alert/get", + "alerting:slo.rules.burnRate/observability/alert/find", + "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/alert/get", + "alerting:slo.rules.burnRate/alerts/alert/find", + "alerting:slo.rules.burnRate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/alerts/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/alert/get", + "alerting:observability.rules.custom_threshold/observability/alert/find", + "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", + "alerting:.es-query/observability/alert/get", + "alerting:.es-query/observability/alert/find", + "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/observability/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", ], "store_search_session": Array [ "login:", @@ -4266,6 +8511,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:logs.alert.document.count/logs/rule/runSoon", "alerting:logs.alert.document.count/logs/rule/scheduleBackfill", "alerting:logs.alert.document.count/logs/rule/deleteBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/create", + "alerting:logs.alert.document.count/alerts/rule/delete", + "alerting:logs.alert.document.count/alerts/rule/update", + "alerting:logs.alert.document.count/alerts/rule/updateApiKey", + "alerting:logs.alert.document.count/alerts/rule/enable", + "alerting:logs.alert.document.count/alerts/rule/disable", + "alerting:logs.alert.document.count/alerts/rule/muteAll", + "alerting:logs.alert.document.count/alerts/rule/unmuteAll", + "alerting:logs.alert.document.count/alerts/rule/muteAlert", + "alerting:logs.alert.document.count/alerts/rule/unmuteAlert", + "alerting:logs.alert.document.count/alerts/rule/snooze", + "alerting:logs.alert.document.count/alerts/rule/bulkEdit", + "alerting:logs.alert.document.count/alerts/rule/bulkDelete", + "alerting:logs.alert.document.count/alerts/rule/bulkEnable", + "alerting:logs.alert.document.count/alerts/rule/bulkDisable", + "alerting:logs.alert.document.count/alerts/rule/unsnooze", + "alerting:logs.alert.document.count/alerts/rule/runSoon", + "alerting:logs.alert.document.count/alerts/rule/scheduleBackfill", + "alerting:logs.alert.document.count/alerts/rule/deleteBackfill", "alerting:.es-query/logs/rule/get", "alerting:.es-query/logs/rule/getRuleState", "alerting:.es-query/logs/rule/getAlertSummary", @@ -4294,6 +8567,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:.es-query/logs/rule/runSoon", "alerting:.es-query/logs/rule/scheduleBackfill", "alerting:.es-query/logs/rule/deleteBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", + "alerting:.es-query/alerts/rule/create", + "alerting:.es-query/alerts/rule/delete", + "alerting:.es-query/alerts/rule/update", + "alerting:.es-query/alerts/rule/updateApiKey", + "alerting:.es-query/alerts/rule/enable", + "alerting:.es-query/alerts/rule/disable", + "alerting:.es-query/alerts/rule/muteAll", + "alerting:.es-query/alerts/rule/unmuteAll", + "alerting:.es-query/alerts/rule/muteAlert", + "alerting:.es-query/alerts/rule/unmuteAlert", + "alerting:.es-query/alerts/rule/snooze", + "alerting:.es-query/alerts/rule/bulkEdit", + "alerting:.es-query/alerts/rule/bulkDelete", + "alerting:.es-query/alerts/rule/bulkEnable", + "alerting:.es-query/alerts/rule/bulkDisable", + "alerting:.es-query/alerts/rule/unsnooze", + "alerting:.es-query/alerts/rule/runSoon", + "alerting:.es-query/alerts/rule/scheduleBackfill", + "alerting:.es-query/alerts/rule/deleteBackfill", "alerting:observability.rules.custom_threshold/logs/rule/get", "alerting:observability.rules.custom_threshold/logs/rule/getRuleState", "alerting:observability.rules.custom_threshold/logs/rule/getAlertSummary", @@ -4322,6 +8623,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:observability.rules.custom_threshold/logs/rule/runSoon", "alerting:observability.rules.custom_threshold/logs/rule/scheduleBackfill", "alerting:observability.rules.custom_threshold/logs/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/create", + "alerting:observability.rules.custom_threshold/alerts/rule/delete", + "alerting:observability.rules.custom_threshold/alerts/rule/update", + "alerting:observability.rules.custom_threshold/alerts/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/alerts/rule/enable", + "alerting:observability.rules.custom_threshold/alerts/rule/disable", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/snooze", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/alerts/rule/unsnooze", + "alerting:observability.rules.custom_threshold/alerts/rule/runSoon", + "alerting:observability.rules.custom_threshold/alerts/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/deleteBackfill", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/get", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getRuleState", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getAlertSummary", @@ -4350,26 +8679,74 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.ml.anomaly_detection_alert/logs/rule/runSoon", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/scheduleBackfill", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/deleteBackfill", "alerting:logs.alert.document.count/logs/alert/get", "alerting:logs.alert.document.count/logs/alert/find", "alerting:logs.alert.document.count/logs/alert/getAuthorizedAlertsIndices", "alerting:logs.alert.document.count/logs/alert/getAlertSummary", "alerting:logs.alert.document.count/logs/alert/update", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/update", "alerting:.es-query/logs/alert/get", "alerting:.es-query/logs/alert/find", "alerting:.es-query/logs/alert/getAuthorizedAlertsIndices", "alerting:.es-query/logs/alert/getAlertSummary", "alerting:.es-query/logs/alert/update", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/update", "alerting:observability.rules.custom_threshold/logs/alert/get", "alerting:observability.rules.custom_threshold/logs/alert/find", "alerting:observability.rules.custom_threshold/logs/alert/getAuthorizedAlertsIndices", "alerting:observability.rules.custom_threshold/logs/alert/getAlertSummary", "alerting:observability.rules.custom_threshold/logs/alert/update", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/update", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/get", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/find", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAuthorizedAlertsIndices", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAlertSummary", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/update", ], "minimal_all": Array [ "login:", @@ -4619,6 +8996,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:logs.alert.document.count/logs/rule/runSoon", "alerting:logs.alert.document.count/logs/rule/scheduleBackfill", "alerting:logs.alert.document.count/logs/rule/deleteBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/create", + "alerting:logs.alert.document.count/alerts/rule/delete", + "alerting:logs.alert.document.count/alerts/rule/update", + "alerting:logs.alert.document.count/alerts/rule/updateApiKey", + "alerting:logs.alert.document.count/alerts/rule/enable", + "alerting:logs.alert.document.count/alerts/rule/disable", + "alerting:logs.alert.document.count/alerts/rule/muteAll", + "alerting:logs.alert.document.count/alerts/rule/unmuteAll", + "alerting:logs.alert.document.count/alerts/rule/muteAlert", + "alerting:logs.alert.document.count/alerts/rule/unmuteAlert", + "alerting:logs.alert.document.count/alerts/rule/snooze", + "alerting:logs.alert.document.count/alerts/rule/bulkEdit", + "alerting:logs.alert.document.count/alerts/rule/bulkDelete", + "alerting:logs.alert.document.count/alerts/rule/bulkEnable", + "alerting:logs.alert.document.count/alerts/rule/bulkDisable", + "alerting:logs.alert.document.count/alerts/rule/unsnooze", + "alerting:logs.alert.document.count/alerts/rule/runSoon", + "alerting:logs.alert.document.count/alerts/rule/scheduleBackfill", + "alerting:logs.alert.document.count/alerts/rule/deleteBackfill", "alerting:.es-query/logs/rule/get", "alerting:.es-query/logs/rule/getRuleState", "alerting:.es-query/logs/rule/getAlertSummary", @@ -4647,6 +9052,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:.es-query/logs/rule/runSoon", "alerting:.es-query/logs/rule/scheduleBackfill", "alerting:.es-query/logs/rule/deleteBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", + "alerting:.es-query/alerts/rule/create", + "alerting:.es-query/alerts/rule/delete", + "alerting:.es-query/alerts/rule/update", + "alerting:.es-query/alerts/rule/updateApiKey", + "alerting:.es-query/alerts/rule/enable", + "alerting:.es-query/alerts/rule/disable", + "alerting:.es-query/alerts/rule/muteAll", + "alerting:.es-query/alerts/rule/unmuteAll", + "alerting:.es-query/alerts/rule/muteAlert", + "alerting:.es-query/alerts/rule/unmuteAlert", + "alerting:.es-query/alerts/rule/snooze", + "alerting:.es-query/alerts/rule/bulkEdit", + "alerting:.es-query/alerts/rule/bulkDelete", + "alerting:.es-query/alerts/rule/bulkEnable", + "alerting:.es-query/alerts/rule/bulkDisable", + "alerting:.es-query/alerts/rule/unsnooze", + "alerting:.es-query/alerts/rule/runSoon", + "alerting:.es-query/alerts/rule/scheduleBackfill", + "alerting:.es-query/alerts/rule/deleteBackfill", "alerting:observability.rules.custom_threshold/logs/rule/get", "alerting:observability.rules.custom_threshold/logs/rule/getRuleState", "alerting:observability.rules.custom_threshold/logs/rule/getAlertSummary", @@ -4675,6 +9108,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:observability.rules.custom_threshold/logs/rule/runSoon", "alerting:observability.rules.custom_threshold/logs/rule/scheduleBackfill", "alerting:observability.rules.custom_threshold/logs/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/create", + "alerting:observability.rules.custom_threshold/alerts/rule/delete", + "alerting:observability.rules.custom_threshold/alerts/rule/update", + "alerting:observability.rules.custom_threshold/alerts/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/alerts/rule/enable", + "alerting:observability.rules.custom_threshold/alerts/rule/disable", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/snooze", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/alerts/rule/unsnooze", + "alerting:observability.rules.custom_threshold/alerts/rule/runSoon", + "alerting:observability.rules.custom_threshold/alerts/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/deleteBackfill", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/get", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getRuleState", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getAlertSummary", @@ -4703,26 +9164,74 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.ml.anomaly_detection_alert/logs/rule/runSoon", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/scheduleBackfill", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/deleteBackfill", "alerting:logs.alert.document.count/logs/alert/get", "alerting:logs.alert.document.count/logs/alert/find", "alerting:logs.alert.document.count/logs/alert/getAuthorizedAlertsIndices", "alerting:logs.alert.document.count/logs/alert/getAlertSummary", "alerting:logs.alert.document.count/logs/alert/update", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/update", "alerting:.es-query/logs/alert/get", "alerting:.es-query/logs/alert/find", "alerting:.es-query/logs/alert/getAuthorizedAlertsIndices", "alerting:.es-query/logs/alert/getAlertSummary", "alerting:.es-query/logs/alert/update", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/update", "alerting:observability.rules.custom_threshold/logs/alert/get", "alerting:observability.rules.custom_threshold/logs/alert/find", "alerting:observability.rules.custom_threshold/logs/alert/getAuthorizedAlertsIndices", "alerting:observability.rules.custom_threshold/logs/alert/getAlertSummary", "alerting:observability.rules.custom_threshold/logs/alert/update", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/update", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/get", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/find", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAuthorizedAlertsIndices", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAlertSummary", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/update", ], "minimal_read": Array [ "login:", @@ -4844,6 +9353,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:logs.alert.document.count/logs/rule/getRuleExecutionKPI", "alerting:logs.alert.document.count/logs/rule/getBackfill", "alerting:logs.alert.document.count/logs/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", "alerting:.es-query/logs/rule/get", "alerting:.es-query/logs/rule/getRuleState", "alerting:.es-query/logs/rule/getAlertSummary", @@ -4853,6 +9371,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:.es-query/logs/rule/getRuleExecutionKPI", "alerting:.es-query/logs/rule/getBackfill", "alerting:.es-query/logs/rule/findBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", "alerting:observability.rules.custom_threshold/logs/rule/get", "alerting:observability.rules.custom_threshold/logs/rule/getRuleState", "alerting:observability.rules.custom_threshold/logs/rule/getAlertSummary", @@ -4862,6 +9389,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:observability.rules.custom_threshold/logs/rule/getRuleExecutionKPI", "alerting:observability.rules.custom_threshold/logs/rule/getBackfill", "alerting:observability.rules.custom_threshold/logs/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/get", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getRuleState", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getAlertSummary", @@ -4871,22 +9407,47 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getRuleExecutionKPI", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getBackfill", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", "alerting:logs.alert.document.count/logs/alert/get", "alerting:logs.alert.document.count/logs/alert/find", "alerting:logs.alert.document.count/logs/alert/getAuthorizedAlertsIndices", "alerting:logs.alert.document.count/logs/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", "alerting:.es-query/logs/alert/get", "alerting:.es-query/logs/alert/find", "alerting:.es-query/logs/alert/getAuthorizedAlertsIndices", "alerting:.es-query/logs/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", "alerting:observability.rules.custom_threshold/logs/alert/get", "alerting:observability.rules.custom_threshold/logs/alert/find", "alerting:observability.rules.custom_threshold/logs/alert/getAuthorizedAlertsIndices", "alerting:observability.rules.custom_threshold/logs/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/get", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/find", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAuthorizedAlertsIndices", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", ], "read": Array [ "login:", @@ -5008,6 +9569,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:logs.alert.document.count/logs/rule/getRuleExecutionKPI", "alerting:logs.alert.document.count/logs/rule/getBackfill", "alerting:logs.alert.document.count/logs/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", "alerting:.es-query/logs/rule/get", "alerting:.es-query/logs/rule/getRuleState", "alerting:.es-query/logs/rule/getAlertSummary", @@ -5017,6 +9587,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:.es-query/logs/rule/getRuleExecutionKPI", "alerting:.es-query/logs/rule/getBackfill", "alerting:.es-query/logs/rule/findBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", "alerting:observability.rules.custom_threshold/logs/rule/get", "alerting:observability.rules.custom_threshold/logs/rule/getRuleState", "alerting:observability.rules.custom_threshold/logs/rule/getAlertSummary", @@ -5026,6 +9605,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:observability.rules.custom_threshold/logs/rule/getRuleExecutionKPI", "alerting:observability.rules.custom_threshold/logs/rule/getBackfill", "alerting:observability.rules.custom_threshold/logs/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/get", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getRuleState", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getAlertSummary", @@ -5035,22 +9623,47 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getRuleExecutionKPI", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getBackfill", "alerting:xpack.ml.anomaly_detection_alert/logs/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", "alerting:logs.alert.document.count/logs/alert/get", "alerting:logs.alert.document.count/logs/alert/find", "alerting:logs.alert.document.count/logs/alert/getAuthorizedAlertsIndices", "alerting:logs.alert.document.count/logs/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", "alerting:.es-query/logs/alert/get", "alerting:.es-query/logs/alert/find", "alerting:.es-query/logs/alert/getAuthorizedAlertsIndices", "alerting:.es-query/logs/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", "alerting:observability.rules.custom_threshold/logs/alert/get", "alerting:observability.rules.custom_threshold/logs/alert/find", "alerting:observability.rules.custom_threshold/logs/alert/getAuthorizedAlertsIndices", "alerting:observability.rules.custom_threshold/logs/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/get", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/find", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAuthorizedAlertsIndices", "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", ], }, "infrastructure": Object { @@ -5154,6 +9767,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:metrics.alert.threshold/infrastructure/rule/runSoon", "alerting:metrics.alert.threshold/infrastructure/rule/scheduleBackfill", "alerting:metrics.alert.threshold/infrastructure/rule/deleteBackfill", + "alerting:metrics.alert.threshold/alerts/rule/get", + "alerting:metrics.alert.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/alerts/rule/find", + "alerting:metrics.alert.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.threshold/alerts/rule/create", + "alerting:metrics.alert.threshold/alerts/rule/delete", + "alerting:metrics.alert.threshold/alerts/rule/update", + "alerting:metrics.alert.threshold/alerts/rule/updateApiKey", + "alerting:metrics.alert.threshold/alerts/rule/enable", + "alerting:metrics.alert.threshold/alerts/rule/disable", + "alerting:metrics.alert.threshold/alerts/rule/muteAll", + "alerting:metrics.alert.threshold/alerts/rule/unmuteAll", + "alerting:metrics.alert.threshold/alerts/rule/muteAlert", + "alerting:metrics.alert.threshold/alerts/rule/unmuteAlert", + "alerting:metrics.alert.threshold/alerts/rule/snooze", + "alerting:metrics.alert.threshold/alerts/rule/bulkEdit", + "alerting:metrics.alert.threshold/alerts/rule/bulkDelete", + "alerting:metrics.alert.threshold/alerts/rule/bulkEnable", + "alerting:metrics.alert.threshold/alerts/rule/bulkDisable", + "alerting:metrics.alert.threshold/alerts/rule/unsnooze", + "alerting:metrics.alert.threshold/alerts/rule/runSoon", + "alerting:metrics.alert.threshold/alerts/rule/scheduleBackfill", + "alerting:metrics.alert.threshold/alerts/rule/deleteBackfill", "alerting:metrics.alert.inventory.threshold/infrastructure/rule/get", "alerting:metrics.alert.inventory.threshold/infrastructure/rule/getRuleState", "alerting:metrics.alert.inventory.threshold/infrastructure/rule/getAlertSummary", @@ -5182,6 +9823,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:metrics.alert.inventory.threshold/infrastructure/rule/runSoon", "alerting:metrics.alert.inventory.threshold/infrastructure/rule/scheduleBackfill", "alerting:metrics.alert.inventory.threshold/infrastructure/rule/deleteBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/get", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/find", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/create", + "alerting:metrics.alert.inventory.threshold/alerts/rule/delete", + "alerting:metrics.alert.inventory.threshold/alerts/rule/update", + "alerting:metrics.alert.inventory.threshold/alerts/rule/updateApiKey", + "alerting:metrics.alert.inventory.threshold/alerts/rule/enable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/disable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/muteAll", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unmuteAll", + "alerting:metrics.alert.inventory.threshold/alerts/rule/muteAlert", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unmuteAlert", + "alerting:metrics.alert.inventory.threshold/alerts/rule/snooze", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkEdit", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkDelete", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkEnable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkDisable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unsnooze", + "alerting:metrics.alert.inventory.threshold/alerts/rule/runSoon", + "alerting:metrics.alert.inventory.threshold/alerts/rule/scheduleBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/deleteBackfill", "alerting:.es-query/infrastructure/rule/get", "alerting:.es-query/infrastructure/rule/getRuleState", "alerting:.es-query/infrastructure/rule/getAlertSummary", @@ -5210,6 +9879,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:.es-query/infrastructure/rule/runSoon", "alerting:.es-query/infrastructure/rule/scheduleBackfill", "alerting:.es-query/infrastructure/rule/deleteBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", + "alerting:.es-query/alerts/rule/create", + "alerting:.es-query/alerts/rule/delete", + "alerting:.es-query/alerts/rule/update", + "alerting:.es-query/alerts/rule/updateApiKey", + "alerting:.es-query/alerts/rule/enable", + "alerting:.es-query/alerts/rule/disable", + "alerting:.es-query/alerts/rule/muteAll", + "alerting:.es-query/alerts/rule/unmuteAll", + "alerting:.es-query/alerts/rule/muteAlert", + "alerting:.es-query/alerts/rule/unmuteAlert", + "alerting:.es-query/alerts/rule/snooze", + "alerting:.es-query/alerts/rule/bulkEdit", + "alerting:.es-query/alerts/rule/bulkDelete", + "alerting:.es-query/alerts/rule/bulkEnable", + "alerting:.es-query/alerts/rule/bulkDisable", + "alerting:.es-query/alerts/rule/unsnooze", + "alerting:.es-query/alerts/rule/runSoon", + "alerting:.es-query/alerts/rule/scheduleBackfill", + "alerting:.es-query/alerts/rule/deleteBackfill", "alerting:observability.rules.custom_threshold/infrastructure/rule/get", "alerting:observability.rules.custom_threshold/infrastructure/rule/getRuleState", "alerting:observability.rules.custom_threshold/infrastructure/rule/getAlertSummary", @@ -5238,6 +9935,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:observability.rules.custom_threshold/infrastructure/rule/runSoon", "alerting:observability.rules.custom_threshold/infrastructure/rule/scheduleBackfill", "alerting:observability.rules.custom_threshold/infrastructure/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/create", + "alerting:observability.rules.custom_threshold/alerts/rule/delete", + "alerting:observability.rules.custom_threshold/alerts/rule/update", + "alerting:observability.rules.custom_threshold/alerts/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/alerts/rule/enable", + "alerting:observability.rules.custom_threshold/alerts/rule/disable", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/snooze", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/alerts/rule/unsnooze", + "alerting:observability.rules.custom_threshold/alerts/rule/runSoon", + "alerting:observability.rules.custom_threshold/alerts/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/deleteBackfill", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/get", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/getRuleState", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/getAlertSummary", @@ -5266,31 +9991,84 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/runSoon", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/scheduleBackfill", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/deleteBackfill", "alerting:metrics.alert.threshold/infrastructure/alert/get", "alerting:metrics.alert.threshold/infrastructure/alert/find", "alerting:metrics.alert.threshold/infrastructure/alert/getAuthorizedAlertsIndices", "alerting:metrics.alert.threshold/infrastructure/alert/getAlertSummary", "alerting:metrics.alert.threshold/infrastructure/alert/update", + "alerting:metrics.alert.threshold/alerts/alert/get", + "alerting:metrics.alert.threshold/alerts/alert/find", + "alerting:metrics.alert.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/alert/update", "alerting:metrics.alert.inventory.threshold/infrastructure/alert/get", "alerting:metrics.alert.inventory.threshold/infrastructure/alert/find", "alerting:metrics.alert.inventory.threshold/infrastructure/alert/getAuthorizedAlertsIndices", "alerting:metrics.alert.inventory.threshold/infrastructure/alert/getAlertSummary", "alerting:metrics.alert.inventory.threshold/infrastructure/alert/update", + "alerting:metrics.alert.inventory.threshold/alerts/alert/get", + "alerting:metrics.alert.inventory.threshold/alerts/alert/find", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/alert/update", "alerting:.es-query/infrastructure/alert/get", "alerting:.es-query/infrastructure/alert/find", "alerting:.es-query/infrastructure/alert/getAuthorizedAlertsIndices", "alerting:.es-query/infrastructure/alert/getAlertSummary", "alerting:.es-query/infrastructure/alert/update", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/update", "alerting:observability.rules.custom_threshold/infrastructure/alert/get", "alerting:observability.rules.custom_threshold/infrastructure/alert/find", "alerting:observability.rules.custom_threshold/infrastructure/alert/getAuthorizedAlertsIndices", "alerting:observability.rules.custom_threshold/infrastructure/alert/getAlertSummary", "alerting:observability.rules.custom_threshold/infrastructure/alert/update", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/update", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/alert/get", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/alert/find", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/alert/getAuthorizedAlertsIndices", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/alert/getAlertSummary", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/update", "app:logs", "app:observability-logs-explorer", "ui:catalogue/infralogging", @@ -5340,6 +10118,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:logs.alert.document.count/logs/rule/runSoon", "alerting:logs.alert.document.count/logs/rule/scheduleBackfill", "alerting:logs.alert.document.count/logs/rule/deleteBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/create", + "alerting:logs.alert.document.count/alerts/rule/delete", + "alerting:logs.alert.document.count/alerts/rule/update", + "alerting:logs.alert.document.count/alerts/rule/updateApiKey", + "alerting:logs.alert.document.count/alerts/rule/enable", + "alerting:logs.alert.document.count/alerts/rule/disable", + "alerting:logs.alert.document.count/alerts/rule/muteAll", + "alerting:logs.alert.document.count/alerts/rule/unmuteAll", + "alerting:logs.alert.document.count/alerts/rule/muteAlert", + "alerting:logs.alert.document.count/alerts/rule/unmuteAlert", + "alerting:logs.alert.document.count/alerts/rule/snooze", + "alerting:logs.alert.document.count/alerts/rule/bulkEdit", + "alerting:logs.alert.document.count/alerts/rule/bulkDelete", + "alerting:logs.alert.document.count/alerts/rule/bulkEnable", + "alerting:logs.alert.document.count/alerts/rule/bulkDisable", + "alerting:logs.alert.document.count/alerts/rule/unsnooze", + "alerting:logs.alert.document.count/alerts/rule/runSoon", + "alerting:logs.alert.document.count/alerts/rule/scheduleBackfill", + "alerting:logs.alert.document.count/alerts/rule/deleteBackfill", "alerting:.es-query/logs/rule/get", "alerting:.es-query/logs/rule/getRuleState", "alerting:.es-query/logs/rule/getAlertSummary", @@ -5367,228 +10173,93 @@ export default function ({ getService }: FtrProviderContext) { "alerting:.es-query/logs/rule/unsnooze", "alerting:.es-query/logs/rule/runSoon", "alerting:.es-query/logs/rule/scheduleBackfill", - "alerting:.es-query/logs/rule/deleteBackfill", - "alerting:observability.rules.custom_threshold/logs/rule/get", - "alerting:observability.rules.custom_threshold/logs/rule/getRuleState", - "alerting:observability.rules.custom_threshold/logs/rule/getAlertSummary", - "alerting:observability.rules.custom_threshold/logs/rule/getExecutionLog", - "alerting:observability.rules.custom_threshold/logs/rule/getActionErrorLog", - "alerting:observability.rules.custom_threshold/logs/rule/find", - "alerting:observability.rules.custom_threshold/logs/rule/getRuleExecutionKPI", - "alerting:observability.rules.custom_threshold/logs/rule/getBackfill", - "alerting:observability.rules.custom_threshold/logs/rule/findBackfill", - "alerting:observability.rules.custom_threshold/logs/rule/create", - "alerting:observability.rules.custom_threshold/logs/rule/delete", - "alerting:observability.rules.custom_threshold/logs/rule/update", - "alerting:observability.rules.custom_threshold/logs/rule/updateApiKey", - "alerting:observability.rules.custom_threshold/logs/rule/enable", - "alerting:observability.rules.custom_threshold/logs/rule/disable", - "alerting:observability.rules.custom_threshold/logs/rule/muteAll", - "alerting:observability.rules.custom_threshold/logs/rule/unmuteAll", - "alerting:observability.rules.custom_threshold/logs/rule/muteAlert", - "alerting:observability.rules.custom_threshold/logs/rule/unmuteAlert", - "alerting:observability.rules.custom_threshold/logs/rule/snooze", - "alerting:observability.rules.custom_threshold/logs/rule/bulkEdit", - "alerting:observability.rules.custom_threshold/logs/rule/bulkDelete", - "alerting:observability.rules.custom_threshold/logs/rule/bulkEnable", - "alerting:observability.rules.custom_threshold/logs/rule/bulkDisable", - "alerting:observability.rules.custom_threshold/logs/rule/unsnooze", - "alerting:observability.rules.custom_threshold/logs/rule/runSoon", - "alerting:observability.rules.custom_threshold/logs/rule/scheduleBackfill", - "alerting:observability.rules.custom_threshold/logs/rule/deleteBackfill", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/get", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getRuleState", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getExecutionLog", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getActionErrorLog", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/find", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getRuleExecutionKPI", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getBackfill", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/findBackfill", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/create", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/delete", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/update", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/updateApiKey", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/enable", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/disable", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/muteAll", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/unmuteAll", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/muteAlert", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/unmuteAlert", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/snooze", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/bulkEdit", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/bulkDelete", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/bulkEnable", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/bulkDisable", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/unsnooze", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/runSoon", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/scheduleBackfill", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/deleteBackfill", - "alerting:logs.alert.document.count/logs/alert/get", - "alerting:logs.alert.document.count/logs/alert/find", - "alerting:logs.alert.document.count/logs/alert/getAuthorizedAlertsIndices", - "alerting:logs.alert.document.count/logs/alert/getAlertSummary", - "alerting:logs.alert.document.count/logs/alert/update", - "alerting:.es-query/logs/alert/get", - "alerting:.es-query/logs/alert/find", - "alerting:.es-query/logs/alert/getAuthorizedAlertsIndices", - "alerting:.es-query/logs/alert/getAlertSummary", - "alerting:.es-query/logs/alert/update", - "alerting:observability.rules.custom_threshold/logs/alert/get", - "alerting:observability.rules.custom_threshold/logs/alert/find", - "alerting:observability.rules.custom_threshold/logs/alert/getAuthorizedAlertsIndices", - "alerting:observability.rules.custom_threshold/logs/alert/getAlertSummary", - "alerting:observability.rules.custom_threshold/logs/alert/update", - "alerting:xpack.ml.anomaly_detection_alert/logs/alert/get", - "alerting:xpack.ml.anomaly_detection_alert/logs/alert/find", - "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/logs/alert/update", - "app:observability", - "ui:catalogue/observability", - "ui:navLinks/observability", - "ui:observability/read", - "ui:observability/write", - "alerting:slo.rules.burnRate/observability/rule/get", - "alerting:slo.rules.burnRate/observability/rule/getRuleState", - "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", - "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", - "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", - "alerting:slo.rules.burnRate/observability/rule/find", - "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", - "alerting:slo.rules.burnRate/observability/rule/getBackfill", - "alerting:slo.rules.burnRate/observability/rule/findBackfill", - "alerting:slo.rules.burnRate/observability/rule/create", - "alerting:slo.rules.burnRate/observability/rule/delete", - "alerting:slo.rules.burnRate/observability/rule/update", - "alerting:slo.rules.burnRate/observability/rule/updateApiKey", - "alerting:slo.rules.burnRate/observability/rule/enable", - "alerting:slo.rules.burnRate/observability/rule/disable", - "alerting:slo.rules.burnRate/observability/rule/muteAll", - "alerting:slo.rules.burnRate/observability/rule/unmuteAll", - "alerting:slo.rules.burnRate/observability/rule/muteAlert", - "alerting:slo.rules.burnRate/observability/rule/unmuteAlert", - "alerting:slo.rules.burnRate/observability/rule/snooze", - "alerting:slo.rules.burnRate/observability/rule/bulkEdit", - "alerting:slo.rules.burnRate/observability/rule/bulkDelete", - "alerting:slo.rules.burnRate/observability/rule/bulkEnable", - "alerting:slo.rules.burnRate/observability/rule/bulkDisable", - "alerting:slo.rules.burnRate/observability/rule/unsnooze", - "alerting:slo.rules.burnRate/observability/rule/runSoon", - "alerting:slo.rules.burnRate/observability/rule/scheduleBackfill", - "alerting:slo.rules.burnRate/observability/rule/deleteBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/get", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", - "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", - "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", - "alerting:observability.rules.custom_threshold/observability/rule/find", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", - "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/create", - "alerting:observability.rules.custom_threshold/observability/rule/delete", - "alerting:observability.rules.custom_threshold/observability/rule/update", - "alerting:observability.rules.custom_threshold/observability/rule/updateApiKey", - "alerting:observability.rules.custom_threshold/observability/rule/enable", - "alerting:observability.rules.custom_threshold/observability/rule/disable", - "alerting:observability.rules.custom_threshold/observability/rule/muteAll", - "alerting:observability.rules.custom_threshold/observability/rule/unmuteAll", - "alerting:observability.rules.custom_threshold/observability/rule/muteAlert", - "alerting:observability.rules.custom_threshold/observability/rule/unmuteAlert", - "alerting:observability.rules.custom_threshold/observability/rule/snooze", - "alerting:observability.rules.custom_threshold/observability/rule/bulkEdit", - "alerting:observability.rules.custom_threshold/observability/rule/bulkDelete", - "alerting:observability.rules.custom_threshold/observability/rule/bulkEnable", - "alerting:observability.rules.custom_threshold/observability/rule/bulkDisable", - "alerting:observability.rules.custom_threshold/observability/rule/unsnooze", - "alerting:observability.rules.custom_threshold/observability/rule/runSoon", - "alerting:observability.rules.custom_threshold/observability/rule/scheduleBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/deleteBackfill", - "alerting:.es-query/observability/rule/get", - "alerting:.es-query/observability/rule/getRuleState", - "alerting:.es-query/observability/rule/getAlertSummary", - "alerting:.es-query/observability/rule/getExecutionLog", - "alerting:.es-query/observability/rule/getActionErrorLog", - "alerting:.es-query/observability/rule/find", - "alerting:.es-query/observability/rule/getRuleExecutionKPI", - "alerting:.es-query/observability/rule/getBackfill", - "alerting:.es-query/observability/rule/findBackfill", - "alerting:.es-query/observability/rule/create", - "alerting:.es-query/observability/rule/delete", - "alerting:.es-query/observability/rule/update", - "alerting:.es-query/observability/rule/updateApiKey", - "alerting:.es-query/observability/rule/enable", - "alerting:.es-query/observability/rule/disable", - "alerting:.es-query/observability/rule/muteAll", - "alerting:.es-query/observability/rule/unmuteAll", - "alerting:.es-query/observability/rule/muteAlert", - "alerting:.es-query/observability/rule/unmuteAlert", - "alerting:.es-query/observability/rule/snooze", - "alerting:.es-query/observability/rule/bulkEdit", - "alerting:.es-query/observability/rule/bulkDelete", - "alerting:.es-query/observability/rule/bulkEnable", - "alerting:.es-query/observability/rule/bulkDisable", - "alerting:.es-query/observability/rule/unsnooze", - "alerting:.es-query/observability/rule/runSoon", - "alerting:.es-query/observability/rule/scheduleBackfill", - "alerting:.es-query/observability/rule/deleteBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/create", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/delete", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/update", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/updateApiKey", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/enable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/disable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAll", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAll", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAlert", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAlert", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/snooze", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEdit", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDelete", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEnable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDisable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unsnooze", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/runSoon", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/scheduleBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/deleteBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/get", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", - "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/find", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", - "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/create", - "alerting:metrics.alert.inventory.threshold/observability/rule/delete", - "alerting:metrics.alert.inventory.threshold/observability/rule/update", - "alerting:metrics.alert.inventory.threshold/observability/rule/updateApiKey", - "alerting:metrics.alert.inventory.threshold/observability/rule/enable", - "alerting:metrics.alert.inventory.threshold/observability/rule/disable", - "alerting:metrics.alert.inventory.threshold/observability/rule/muteAll", - "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAll", - "alerting:metrics.alert.inventory.threshold/observability/rule/muteAlert", - "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAlert", - "alerting:metrics.alert.inventory.threshold/observability/rule/snooze", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEdit", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDelete", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEnable", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDisable", - "alerting:metrics.alert.inventory.threshold/observability/rule/unsnooze", - "alerting:metrics.alert.inventory.threshold/observability/rule/runSoon", - "alerting:metrics.alert.inventory.threshold/observability/rule/scheduleBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/deleteBackfill", + "alerting:.es-query/logs/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/logs/rule/get", + "alerting:observability.rules.custom_threshold/logs/rule/getRuleState", + "alerting:observability.rules.custom_threshold/logs/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/logs/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/logs/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/logs/rule/find", + "alerting:observability.rules.custom_threshold/logs/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/logs/rule/getBackfill", + "alerting:observability.rules.custom_threshold/logs/rule/findBackfill", + "alerting:observability.rules.custom_threshold/logs/rule/create", + "alerting:observability.rules.custom_threshold/logs/rule/delete", + "alerting:observability.rules.custom_threshold/logs/rule/update", + "alerting:observability.rules.custom_threshold/logs/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/logs/rule/enable", + "alerting:observability.rules.custom_threshold/logs/rule/disable", + "alerting:observability.rules.custom_threshold/logs/rule/muteAll", + "alerting:observability.rules.custom_threshold/logs/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/logs/rule/muteAlert", + "alerting:observability.rules.custom_threshold/logs/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/logs/rule/snooze", + "alerting:observability.rules.custom_threshold/logs/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/logs/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/logs/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/logs/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/logs/rule/unsnooze", + "alerting:observability.rules.custom_threshold/logs/rule/runSoon", + "alerting:observability.rules.custom_threshold/logs/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/logs/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/deleteBackfill", + "alerting:logs.alert.document.count/logs/alert/get", + "alerting:logs.alert.document.count/logs/alert/find", + "alerting:logs.alert.document.count/logs/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/logs/alert/getAlertSummary", + "alerting:logs.alert.document.count/logs/alert/update", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/update", + "alerting:.es-query/logs/alert/get", + "alerting:.es-query/logs/alert/find", + "alerting:.es-query/logs/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/logs/alert/getAlertSummary", + "alerting:.es-query/logs/alert/update", + "alerting:observability.rules.custom_threshold/logs/alert/get", + "alerting:observability.rules.custom_threshold/logs/alert/find", + "alerting:observability.rules.custom_threshold/logs/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/logs/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/logs/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/logs/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/logs/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/logs/alert/update", + "app:observability", + "ui:catalogue/observability", + "ui:navLinks/observability", + "ui:observability/read", + "ui:observability/write", "alerting:apm.error_rate/observability/rule/get", "alerting:apm.error_rate/observability/rule/getRuleState", "alerting:apm.error_rate/observability/rule/getAlertSummary", @@ -5617,6 +10288,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.error_rate/observability/rule/runSoon", "alerting:apm.error_rate/observability/rule/scheduleBackfill", "alerting:apm.error_rate/observability/rule/deleteBackfill", + "alerting:apm.error_rate/alerts/rule/get", + "alerting:apm.error_rate/alerts/rule/getRuleState", + "alerting:apm.error_rate/alerts/rule/getAlertSummary", + "alerting:apm.error_rate/alerts/rule/getExecutionLog", + "alerting:apm.error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.error_rate/alerts/rule/find", + "alerting:apm.error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.error_rate/alerts/rule/getBackfill", + "alerting:apm.error_rate/alerts/rule/findBackfill", + "alerting:apm.error_rate/alerts/rule/create", + "alerting:apm.error_rate/alerts/rule/delete", + "alerting:apm.error_rate/alerts/rule/update", + "alerting:apm.error_rate/alerts/rule/updateApiKey", + "alerting:apm.error_rate/alerts/rule/enable", + "alerting:apm.error_rate/alerts/rule/disable", + "alerting:apm.error_rate/alerts/rule/muteAll", + "alerting:apm.error_rate/alerts/rule/unmuteAll", + "alerting:apm.error_rate/alerts/rule/muteAlert", + "alerting:apm.error_rate/alerts/rule/unmuteAlert", + "alerting:apm.error_rate/alerts/rule/snooze", + "alerting:apm.error_rate/alerts/rule/bulkEdit", + "alerting:apm.error_rate/alerts/rule/bulkDelete", + "alerting:apm.error_rate/alerts/rule/bulkEnable", + "alerting:apm.error_rate/alerts/rule/bulkDisable", + "alerting:apm.error_rate/alerts/rule/unsnooze", + "alerting:apm.error_rate/alerts/rule/runSoon", + "alerting:apm.error_rate/alerts/rule/scheduleBackfill", + "alerting:apm.error_rate/alerts/rule/deleteBackfill", "alerting:apm.transaction_error_rate/observability/rule/get", "alerting:apm.transaction_error_rate/observability/rule/getRuleState", "alerting:apm.transaction_error_rate/observability/rule/getAlertSummary", @@ -5645,6 +10344,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_error_rate/observability/rule/runSoon", "alerting:apm.transaction_error_rate/observability/rule/scheduleBackfill", "alerting:apm.transaction_error_rate/observability/rule/deleteBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/get", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleState", + "alerting:apm.transaction_error_rate/alerts/rule/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/rule/getExecutionLog", + "alerting:apm.transaction_error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_error_rate/alerts/rule/find", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_error_rate/alerts/rule/getBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/findBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/create", + "alerting:apm.transaction_error_rate/alerts/rule/delete", + "alerting:apm.transaction_error_rate/alerts/rule/update", + "alerting:apm.transaction_error_rate/alerts/rule/updateApiKey", + "alerting:apm.transaction_error_rate/alerts/rule/enable", + "alerting:apm.transaction_error_rate/alerts/rule/disable", + "alerting:apm.transaction_error_rate/alerts/rule/muteAll", + "alerting:apm.transaction_error_rate/alerts/rule/unmuteAll", + "alerting:apm.transaction_error_rate/alerts/rule/muteAlert", + "alerting:apm.transaction_error_rate/alerts/rule/unmuteAlert", + "alerting:apm.transaction_error_rate/alerts/rule/snooze", + "alerting:apm.transaction_error_rate/alerts/rule/bulkEdit", + "alerting:apm.transaction_error_rate/alerts/rule/bulkDelete", + "alerting:apm.transaction_error_rate/alerts/rule/bulkEnable", + "alerting:apm.transaction_error_rate/alerts/rule/bulkDisable", + "alerting:apm.transaction_error_rate/alerts/rule/unsnooze", + "alerting:apm.transaction_error_rate/alerts/rule/runSoon", + "alerting:apm.transaction_error_rate/alerts/rule/scheduleBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/deleteBackfill", "alerting:apm.transaction_duration/observability/rule/get", "alerting:apm.transaction_duration/observability/rule/getRuleState", "alerting:apm.transaction_duration/observability/rule/getAlertSummary", @@ -5673,6 +10400,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_duration/observability/rule/runSoon", "alerting:apm.transaction_duration/observability/rule/scheduleBackfill", "alerting:apm.transaction_duration/observability/rule/deleteBackfill", + "alerting:apm.transaction_duration/alerts/rule/get", + "alerting:apm.transaction_duration/alerts/rule/getRuleState", + "alerting:apm.transaction_duration/alerts/rule/getAlertSummary", + "alerting:apm.transaction_duration/alerts/rule/getExecutionLog", + "alerting:apm.transaction_duration/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_duration/alerts/rule/find", + "alerting:apm.transaction_duration/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_duration/alerts/rule/getBackfill", + "alerting:apm.transaction_duration/alerts/rule/findBackfill", + "alerting:apm.transaction_duration/alerts/rule/create", + "alerting:apm.transaction_duration/alerts/rule/delete", + "alerting:apm.transaction_duration/alerts/rule/update", + "alerting:apm.transaction_duration/alerts/rule/updateApiKey", + "alerting:apm.transaction_duration/alerts/rule/enable", + "alerting:apm.transaction_duration/alerts/rule/disable", + "alerting:apm.transaction_duration/alerts/rule/muteAll", + "alerting:apm.transaction_duration/alerts/rule/unmuteAll", + "alerting:apm.transaction_duration/alerts/rule/muteAlert", + "alerting:apm.transaction_duration/alerts/rule/unmuteAlert", + "alerting:apm.transaction_duration/alerts/rule/snooze", + "alerting:apm.transaction_duration/alerts/rule/bulkEdit", + "alerting:apm.transaction_duration/alerts/rule/bulkDelete", + "alerting:apm.transaction_duration/alerts/rule/bulkEnable", + "alerting:apm.transaction_duration/alerts/rule/bulkDisable", + "alerting:apm.transaction_duration/alerts/rule/unsnooze", + "alerting:apm.transaction_duration/alerts/rule/runSoon", + "alerting:apm.transaction_duration/alerts/rule/scheduleBackfill", + "alerting:apm.transaction_duration/alerts/rule/deleteBackfill", "alerting:apm.anomaly/observability/rule/get", "alerting:apm.anomaly/observability/rule/getRuleState", "alerting:apm.anomaly/observability/rule/getAlertSummary", @@ -5701,6 +10456,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.anomaly/observability/rule/runSoon", "alerting:apm.anomaly/observability/rule/scheduleBackfill", "alerting:apm.anomaly/observability/rule/deleteBackfill", + "alerting:apm.anomaly/alerts/rule/get", + "alerting:apm.anomaly/alerts/rule/getRuleState", + "alerting:apm.anomaly/alerts/rule/getAlertSummary", + "alerting:apm.anomaly/alerts/rule/getExecutionLog", + "alerting:apm.anomaly/alerts/rule/getActionErrorLog", + "alerting:apm.anomaly/alerts/rule/find", + "alerting:apm.anomaly/alerts/rule/getRuleExecutionKPI", + "alerting:apm.anomaly/alerts/rule/getBackfill", + "alerting:apm.anomaly/alerts/rule/findBackfill", + "alerting:apm.anomaly/alerts/rule/create", + "alerting:apm.anomaly/alerts/rule/delete", + "alerting:apm.anomaly/alerts/rule/update", + "alerting:apm.anomaly/alerts/rule/updateApiKey", + "alerting:apm.anomaly/alerts/rule/enable", + "alerting:apm.anomaly/alerts/rule/disable", + "alerting:apm.anomaly/alerts/rule/muteAll", + "alerting:apm.anomaly/alerts/rule/unmuteAll", + "alerting:apm.anomaly/alerts/rule/muteAlert", + "alerting:apm.anomaly/alerts/rule/unmuteAlert", + "alerting:apm.anomaly/alerts/rule/snooze", + "alerting:apm.anomaly/alerts/rule/bulkEdit", + "alerting:apm.anomaly/alerts/rule/bulkDelete", + "alerting:apm.anomaly/alerts/rule/bulkEnable", + "alerting:apm.anomaly/alerts/rule/bulkDisable", + "alerting:apm.anomaly/alerts/rule/unsnooze", + "alerting:apm.anomaly/alerts/rule/runSoon", + "alerting:apm.anomaly/alerts/rule/scheduleBackfill", + "alerting:apm.anomaly/alerts/rule/deleteBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getAlertSummary", @@ -5729,6 +10512,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/runSoon", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/scheduleBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/deleteBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/create", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/delete", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/update", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/updateApiKey", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/enable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/disable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/muteAll", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unmuteAll", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/muteAlert", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unmuteAlert", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/snooze", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkEdit", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkDelete", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkEnable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unsnooze", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/runSoon", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/deleteBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/get", "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.tls/observability/rule/getAlertSummary", @@ -5757,61 +10568,622 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/rule/runSoon", "alerting:xpack.synthetics.alerts.tls/observability/rule/scheduleBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/deleteBackfill", - "alerting:slo.rules.burnRate/observability/alert/get", - "alerting:slo.rules.burnRate/observability/alert/find", - "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", - "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", - "alerting:slo.rules.burnRate/observability/alert/update", - "alerting:observability.rules.custom_threshold/observability/alert/get", - "alerting:observability.rules.custom_threshold/observability/alert/find", - "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/alert/update", - "alerting:.es-query/observability/alert/get", - "alerting:.es-query/observability/alert/find", - "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", - "alerting:.es-query/observability/alert/getAlertSummary", - "alerting:.es-query/observability/alert/update", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/update", - "alerting:metrics.alert.inventory.threshold/observability/alert/get", - "alerting:metrics.alert.inventory.threshold/observability/alert/find", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/alert/update", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/get", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/find", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/create", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/delete", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/update", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/updateApiKey", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/enable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/disable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/muteAll", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unmuteAll", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/muteAlert", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unmuteAlert", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/snooze", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkEdit", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkDelete", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkEnable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unsnooze", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/runSoon", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/deleteBackfill", + "alerting:metrics.alert.threshold/observability/rule/get", + "alerting:metrics.alert.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/observability/rule/find", + "alerting:metrics.alert.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.threshold/observability/rule/create", + "alerting:metrics.alert.threshold/observability/rule/delete", + "alerting:metrics.alert.threshold/observability/rule/update", + "alerting:metrics.alert.threshold/observability/rule/updateApiKey", + "alerting:metrics.alert.threshold/observability/rule/enable", + "alerting:metrics.alert.threshold/observability/rule/disable", + "alerting:metrics.alert.threshold/observability/rule/muteAll", + "alerting:metrics.alert.threshold/observability/rule/unmuteAll", + "alerting:metrics.alert.threshold/observability/rule/muteAlert", + "alerting:metrics.alert.threshold/observability/rule/unmuteAlert", + "alerting:metrics.alert.threshold/observability/rule/snooze", + "alerting:metrics.alert.threshold/observability/rule/bulkEdit", + "alerting:metrics.alert.threshold/observability/rule/bulkDelete", + "alerting:metrics.alert.threshold/observability/rule/bulkEnable", + "alerting:metrics.alert.threshold/observability/rule/bulkDisable", + "alerting:metrics.alert.threshold/observability/rule/unsnooze", + "alerting:metrics.alert.threshold/observability/rule/runSoon", + "alerting:metrics.alert.threshold/observability/rule/scheduleBackfill", + "alerting:metrics.alert.threshold/observability/rule/deleteBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/get", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/find", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/create", + "alerting:metrics.alert.inventory.threshold/observability/rule/delete", + "alerting:metrics.alert.inventory.threshold/observability/rule/update", + "alerting:metrics.alert.inventory.threshold/observability/rule/updateApiKey", + "alerting:metrics.alert.inventory.threshold/observability/rule/enable", + "alerting:metrics.alert.inventory.threshold/observability/rule/disable", + "alerting:metrics.alert.inventory.threshold/observability/rule/muteAll", + "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAll", + "alerting:metrics.alert.inventory.threshold/observability/rule/muteAlert", + "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAlert", + "alerting:metrics.alert.inventory.threshold/observability/rule/snooze", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEdit", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDelete", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEnable", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDisable", + "alerting:metrics.alert.inventory.threshold/observability/rule/unsnooze", + "alerting:metrics.alert.inventory.threshold/observability/rule/runSoon", + "alerting:metrics.alert.inventory.threshold/observability/rule/scheduleBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/get", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/find", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/create", + "alerting:xpack.uptime.alerts.tls/observability/rule/delete", + "alerting:xpack.uptime.alerts.tls/observability/rule/update", + "alerting:xpack.uptime.alerts.tls/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tls/observability/rule/enable", + "alerting:xpack.uptime.alerts.tls/observability/rule/disable", + "alerting:xpack.uptime.alerts.tls/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.tls/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tls/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.tls/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tls/observability/rule/snooze", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tls/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.tls/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.tls/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/get", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/find", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/create", + "alerting:xpack.uptime.alerts.tls/alerts/rule/delete", + "alerting:xpack.uptime.alerts.tls/alerts/rule/update", + "alerting:xpack.uptime.alerts.tls/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tls/alerts/rule/enable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/disable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tls/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tls/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.tls/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.tls/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/create", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/delete", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/update", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/enable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/disable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/snooze", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/create", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/delete", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/update", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/enable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/disable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/create", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/delete", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/update", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/enable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/disable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/snooze", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/create", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/delete", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/update", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/enable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/disable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/create", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/delete", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/update", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/enable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/disable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/snooze", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/create", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/delete", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/update", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/enable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/disable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/deleteBackfill", + "alerting:logs.alert.document.count/observability/rule/get", + "alerting:logs.alert.document.count/observability/rule/getRuleState", + "alerting:logs.alert.document.count/observability/rule/getAlertSummary", + "alerting:logs.alert.document.count/observability/rule/getExecutionLog", + "alerting:logs.alert.document.count/observability/rule/getActionErrorLog", + "alerting:logs.alert.document.count/observability/rule/find", + "alerting:logs.alert.document.count/observability/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/observability/rule/getBackfill", + "alerting:logs.alert.document.count/observability/rule/findBackfill", + "alerting:logs.alert.document.count/observability/rule/create", + "alerting:logs.alert.document.count/observability/rule/delete", + "alerting:logs.alert.document.count/observability/rule/update", + "alerting:logs.alert.document.count/observability/rule/updateApiKey", + "alerting:logs.alert.document.count/observability/rule/enable", + "alerting:logs.alert.document.count/observability/rule/disable", + "alerting:logs.alert.document.count/observability/rule/muteAll", + "alerting:logs.alert.document.count/observability/rule/unmuteAll", + "alerting:logs.alert.document.count/observability/rule/muteAlert", + "alerting:logs.alert.document.count/observability/rule/unmuteAlert", + "alerting:logs.alert.document.count/observability/rule/snooze", + "alerting:logs.alert.document.count/observability/rule/bulkEdit", + "alerting:logs.alert.document.count/observability/rule/bulkDelete", + "alerting:logs.alert.document.count/observability/rule/bulkEnable", + "alerting:logs.alert.document.count/observability/rule/bulkDisable", + "alerting:logs.alert.document.count/observability/rule/unsnooze", + "alerting:logs.alert.document.count/observability/rule/runSoon", + "alerting:logs.alert.document.count/observability/rule/scheduleBackfill", + "alerting:logs.alert.document.count/observability/rule/deleteBackfill", + "alerting:slo.rules.burnRate/observability/rule/get", + "alerting:slo.rules.burnRate/observability/rule/getRuleState", + "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", + "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", + "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/observability/rule/find", + "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/observability/rule/getBackfill", + "alerting:slo.rules.burnRate/observability/rule/findBackfill", + "alerting:slo.rules.burnRate/observability/rule/create", + "alerting:slo.rules.burnRate/observability/rule/delete", + "alerting:slo.rules.burnRate/observability/rule/update", + "alerting:slo.rules.burnRate/observability/rule/updateApiKey", + "alerting:slo.rules.burnRate/observability/rule/enable", + "alerting:slo.rules.burnRate/observability/rule/disable", + "alerting:slo.rules.burnRate/observability/rule/muteAll", + "alerting:slo.rules.burnRate/observability/rule/unmuteAll", + "alerting:slo.rules.burnRate/observability/rule/muteAlert", + "alerting:slo.rules.burnRate/observability/rule/unmuteAlert", + "alerting:slo.rules.burnRate/observability/rule/snooze", + "alerting:slo.rules.burnRate/observability/rule/bulkEdit", + "alerting:slo.rules.burnRate/observability/rule/bulkDelete", + "alerting:slo.rules.burnRate/observability/rule/bulkEnable", + "alerting:slo.rules.burnRate/observability/rule/bulkDisable", + "alerting:slo.rules.burnRate/observability/rule/unsnooze", + "alerting:slo.rules.burnRate/observability/rule/runSoon", + "alerting:slo.rules.burnRate/observability/rule/scheduleBackfill", + "alerting:slo.rules.burnRate/observability/rule/deleteBackfill", + "alerting:slo.rules.burnRate/alerts/rule/get", + "alerting:slo.rules.burnRate/alerts/rule/getRuleState", + "alerting:slo.rules.burnRate/alerts/rule/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/rule/getExecutionLog", + "alerting:slo.rules.burnRate/alerts/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/alerts/rule/find", + "alerting:slo.rules.burnRate/alerts/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/alerts/rule/getBackfill", + "alerting:slo.rules.burnRate/alerts/rule/findBackfill", + "alerting:slo.rules.burnRate/alerts/rule/create", + "alerting:slo.rules.burnRate/alerts/rule/delete", + "alerting:slo.rules.burnRate/alerts/rule/update", + "alerting:slo.rules.burnRate/alerts/rule/updateApiKey", + "alerting:slo.rules.burnRate/alerts/rule/enable", + "alerting:slo.rules.burnRate/alerts/rule/disable", + "alerting:slo.rules.burnRate/alerts/rule/muteAll", + "alerting:slo.rules.burnRate/alerts/rule/unmuteAll", + "alerting:slo.rules.burnRate/alerts/rule/muteAlert", + "alerting:slo.rules.burnRate/alerts/rule/unmuteAlert", + "alerting:slo.rules.burnRate/alerts/rule/snooze", + "alerting:slo.rules.burnRate/alerts/rule/bulkEdit", + "alerting:slo.rules.burnRate/alerts/rule/bulkDelete", + "alerting:slo.rules.burnRate/alerts/rule/bulkEnable", + "alerting:slo.rules.burnRate/alerts/rule/bulkDisable", + "alerting:slo.rules.burnRate/alerts/rule/unsnooze", + "alerting:slo.rules.burnRate/alerts/rule/runSoon", + "alerting:slo.rules.burnRate/alerts/rule/scheduleBackfill", + "alerting:slo.rules.burnRate/alerts/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/get", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", + "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/observability/rule/find", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/create", + "alerting:observability.rules.custom_threshold/observability/rule/delete", + "alerting:observability.rules.custom_threshold/observability/rule/update", + "alerting:observability.rules.custom_threshold/observability/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/observability/rule/enable", + "alerting:observability.rules.custom_threshold/observability/rule/disable", + "alerting:observability.rules.custom_threshold/observability/rule/muteAll", + "alerting:observability.rules.custom_threshold/observability/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/observability/rule/muteAlert", + "alerting:observability.rules.custom_threshold/observability/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/observability/rule/snooze", + "alerting:observability.rules.custom_threshold/observability/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/observability/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/observability/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/observability/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/observability/rule/unsnooze", + "alerting:observability.rules.custom_threshold/observability/rule/runSoon", + "alerting:observability.rules.custom_threshold/observability/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/deleteBackfill", + "alerting:.es-query/observability/rule/get", + "alerting:.es-query/observability/rule/getRuleState", + "alerting:.es-query/observability/rule/getAlertSummary", + "alerting:.es-query/observability/rule/getExecutionLog", + "alerting:.es-query/observability/rule/getActionErrorLog", + "alerting:.es-query/observability/rule/find", + "alerting:.es-query/observability/rule/getRuleExecutionKPI", + "alerting:.es-query/observability/rule/getBackfill", + "alerting:.es-query/observability/rule/findBackfill", + "alerting:.es-query/observability/rule/create", + "alerting:.es-query/observability/rule/delete", + "alerting:.es-query/observability/rule/update", + "alerting:.es-query/observability/rule/updateApiKey", + "alerting:.es-query/observability/rule/enable", + "alerting:.es-query/observability/rule/disable", + "alerting:.es-query/observability/rule/muteAll", + "alerting:.es-query/observability/rule/unmuteAll", + "alerting:.es-query/observability/rule/muteAlert", + "alerting:.es-query/observability/rule/unmuteAlert", + "alerting:.es-query/observability/rule/snooze", + "alerting:.es-query/observability/rule/bulkEdit", + "alerting:.es-query/observability/rule/bulkDelete", + "alerting:.es-query/observability/rule/bulkEnable", + "alerting:.es-query/observability/rule/bulkDisable", + "alerting:.es-query/observability/rule/unsnooze", + "alerting:.es-query/observability/rule/runSoon", + "alerting:.es-query/observability/rule/scheduleBackfill", + "alerting:.es-query/observability/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/deleteBackfill", "alerting:apm.error_rate/observability/alert/get", "alerting:apm.error_rate/observability/alert/find", "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.error_rate/observability/alert/getAlertSummary", "alerting:apm.error_rate/observability/alert/update", + "alerting:apm.error_rate/alerts/alert/get", + "alerting:apm.error_rate/alerts/alert/find", + "alerting:apm.error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/alerts/alert/getAlertSummary", + "alerting:apm.error_rate/alerts/alert/update", "alerting:apm.transaction_error_rate/observability/alert/get", "alerting:apm.transaction_error_rate/observability/alert/find", "alerting:apm.transaction_error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_error_rate/observability/alert/getAlertSummary", "alerting:apm.transaction_error_rate/observability/alert/update", + "alerting:apm.transaction_error_rate/alerts/alert/get", + "alerting:apm.transaction_error_rate/alerts/alert/find", + "alerting:apm.transaction_error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/alerts/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/alert/update", "alerting:apm.transaction_duration/observability/alert/get", "alerting:apm.transaction_duration/observability/alert/find", "alerting:apm.transaction_duration/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_duration/observability/alert/getAlertSummary", "alerting:apm.transaction_duration/observability/alert/update", + "alerting:apm.transaction_duration/alerts/alert/get", + "alerting:apm.transaction_duration/alerts/alert/find", + "alerting:apm.transaction_duration/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/alerts/alert/getAlertSummary", + "alerting:apm.transaction_duration/alerts/alert/update", "alerting:apm.anomaly/observability/alert/get", "alerting:apm.anomaly/observability/alert/find", "alerting:apm.anomaly/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.anomaly/observability/alert/getAlertSummary", "alerting:apm.anomaly/observability/alert/update", + "alerting:apm.anomaly/alerts/alert/get", + "alerting:apm.anomaly/alerts/alert/find", + "alerting:apm.anomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/alerts/alert/getAlertSummary", + "alerting:apm.anomaly/alerts/alert/update", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/update", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/update", "alerting:xpack.synthetics.alerts.tls/observability/alert/get", "alerting:xpack.synthetics.alerts.tls/observability/alert/find", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.tls/observability/alert/update", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/get", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/find", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/update", + "alerting:metrics.alert.threshold/observability/alert/get", + "alerting:metrics.alert.threshold/observability/alert/find", + "alerting:metrics.alert.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.threshold/observability/alert/update", + "alerting:metrics.alert.inventory.threshold/observability/alert/get", + "alerting:metrics.alert.inventory.threshold/observability/alert/find", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/alert/update", + "alerting:xpack.uptime.alerts.tls/observability/alert/get", + "alerting:xpack.uptime.alerts.tls/observability/alert/find", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/alert/update", + "alerting:xpack.uptime.alerts.tls/alerts/alert/get", + "alerting:xpack.uptime.alerts.tls/alerts/alert/find", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/alert/update", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/update", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/update", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/update", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/update", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/update", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/update", + "alerting:logs.alert.document.count/observability/alert/get", + "alerting:logs.alert.document.count/observability/alert/find", + "alerting:logs.alert.document.count/observability/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/observability/alert/getAlertSummary", + "alerting:logs.alert.document.count/observability/alert/update", + "alerting:slo.rules.burnRate/observability/alert/get", + "alerting:slo.rules.burnRate/observability/alert/find", + "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", + "alerting:slo.rules.burnRate/observability/alert/update", + "alerting:slo.rules.burnRate/alerts/alert/get", + "alerting:slo.rules.burnRate/alerts/alert/find", + "alerting:slo.rules.burnRate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/alerts/alert/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/alert/update", + "alerting:observability.rules.custom_threshold/observability/alert/get", + "alerting:observability.rules.custom_threshold/observability/alert/find", + "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/alert/update", + "alerting:.es-query/observability/alert/get", + "alerting:.es-query/observability/alert/find", + "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/observability/alert/getAlertSummary", + "alerting:.es-query/observability/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/update", ], "minimal_all": Array [ "login:", @@ -5913,6 +11285,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:metrics.alert.threshold/infrastructure/rule/runSoon", "alerting:metrics.alert.threshold/infrastructure/rule/scheduleBackfill", "alerting:metrics.alert.threshold/infrastructure/rule/deleteBackfill", + "alerting:metrics.alert.threshold/alerts/rule/get", + "alerting:metrics.alert.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/alerts/rule/find", + "alerting:metrics.alert.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.threshold/alerts/rule/create", + "alerting:metrics.alert.threshold/alerts/rule/delete", + "alerting:metrics.alert.threshold/alerts/rule/update", + "alerting:metrics.alert.threshold/alerts/rule/updateApiKey", + "alerting:metrics.alert.threshold/alerts/rule/enable", + "alerting:metrics.alert.threshold/alerts/rule/disable", + "alerting:metrics.alert.threshold/alerts/rule/muteAll", + "alerting:metrics.alert.threshold/alerts/rule/unmuteAll", + "alerting:metrics.alert.threshold/alerts/rule/muteAlert", + "alerting:metrics.alert.threshold/alerts/rule/unmuteAlert", + "alerting:metrics.alert.threshold/alerts/rule/snooze", + "alerting:metrics.alert.threshold/alerts/rule/bulkEdit", + "alerting:metrics.alert.threshold/alerts/rule/bulkDelete", + "alerting:metrics.alert.threshold/alerts/rule/bulkEnable", + "alerting:metrics.alert.threshold/alerts/rule/bulkDisable", + "alerting:metrics.alert.threshold/alerts/rule/unsnooze", + "alerting:metrics.alert.threshold/alerts/rule/runSoon", + "alerting:metrics.alert.threshold/alerts/rule/scheduleBackfill", + "alerting:metrics.alert.threshold/alerts/rule/deleteBackfill", "alerting:metrics.alert.inventory.threshold/infrastructure/rule/get", "alerting:metrics.alert.inventory.threshold/infrastructure/rule/getRuleState", "alerting:metrics.alert.inventory.threshold/infrastructure/rule/getAlertSummary", @@ -5941,6 +11341,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:metrics.alert.inventory.threshold/infrastructure/rule/runSoon", "alerting:metrics.alert.inventory.threshold/infrastructure/rule/scheduleBackfill", "alerting:metrics.alert.inventory.threshold/infrastructure/rule/deleteBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/get", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/find", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/create", + "alerting:metrics.alert.inventory.threshold/alerts/rule/delete", + "alerting:metrics.alert.inventory.threshold/alerts/rule/update", + "alerting:metrics.alert.inventory.threshold/alerts/rule/updateApiKey", + "alerting:metrics.alert.inventory.threshold/alerts/rule/enable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/disable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/muteAll", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unmuteAll", + "alerting:metrics.alert.inventory.threshold/alerts/rule/muteAlert", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unmuteAlert", + "alerting:metrics.alert.inventory.threshold/alerts/rule/snooze", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkEdit", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkDelete", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkEnable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkDisable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unsnooze", + "alerting:metrics.alert.inventory.threshold/alerts/rule/runSoon", + "alerting:metrics.alert.inventory.threshold/alerts/rule/scheduleBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/deleteBackfill", "alerting:.es-query/infrastructure/rule/get", "alerting:.es-query/infrastructure/rule/getRuleState", "alerting:.es-query/infrastructure/rule/getAlertSummary", @@ -5969,6 +11397,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:.es-query/infrastructure/rule/runSoon", "alerting:.es-query/infrastructure/rule/scheduleBackfill", "alerting:.es-query/infrastructure/rule/deleteBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", + "alerting:.es-query/alerts/rule/create", + "alerting:.es-query/alerts/rule/delete", + "alerting:.es-query/alerts/rule/update", + "alerting:.es-query/alerts/rule/updateApiKey", + "alerting:.es-query/alerts/rule/enable", + "alerting:.es-query/alerts/rule/disable", + "alerting:.es-query/alerts/rule/muteAll", + "alerting:.es-query/alerts/rule/unmuteAll", + "alerting:.es-query/alerts/rule/muteAlert", + "alerting:.es-query/alerts/rule/unmuteAlert", + "alerting:.es-query/alerts/rule/snooze", + "alerting:.es-query/alerts/rule/bulkEdit", + "alerting:.es-query/alerts/rule/bulkDelete", + "alerting:.es-query/alerts/rule/bulkEnable", + "alerting:.es-query/alerts/rule/bulkDisable", + "alerting:.es-query/alerts/rule/unsnooze", + "alerting:.es-query/alerts/rule/runSoon", + "alerting:.es-query/alerts/rule/scheduleBackfill", + "alerting:.es-query/alerts/rule/deleteBackfill", "alerting:observability.rules.custom_threshold/infrastructure/rule/get", "alerting:observability.rules.custom_threshold/infrastructure/rule/getRuleState", "alerting:observability.rules.custom_threshold/infrastructure/rule/getAlertSummary", @@ -5997,6 +11453,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:observability.rules.custom_threshold/infrastructure/rule/runSoon", "alerting:observability.rules.custom_threshold/infrastructure/rule/scheduleBackfill", "alerting:observability.rules.custom_threshold/infrastructure/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/create", + "alerting:observability.rules.custom_threshold/alerts/rule/delete", + "alerting:observability.rules.custom_threshold/alerts/rule/update", + "alerting:observability.rules.custom_threshold/alerts/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/alerts/rule/enable", + "alerting:observability.rules.custom_threshold/alerts/rule/disable", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/snooze", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/alerts/rule/unsnooze", + "alerting:observability.rules.custom_threshold/alerts/rule/runSoon", + "alerting:observability.rules.custom_threshold/alerts/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/deleteBackfill", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/get", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/getRuleState", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/getAlertSummary", @@ -6025,31 +11509,84 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/runSoon", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/scheduleBackfill", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/deleteBackfill", "alerting:metrics.alert.threshold/infrastructure/alert/get", "alerting:metrics.alert.threshold/infrastructure/alert/find", "alerting:metrics.alert.threshold/infrastructure/alert/getAuthorizedAlertsIndices", "alerting:metrics.alert.threshold/infrastructure/alert/getAlertSummary", "alerting:metrics.alert.threshold/infrastructure/alert/update", + "alerting:metrics.alert.threshold/alerts/alert/get", + "alerting:metrics.alert.threshold/alerts/alert/find", + "alerting:metrics.alert.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/alert/update", "alerting:metrics.alert.inventory.threshold/infrastructure/alert/get", "alerting:metrics.alert.inventory.threshold/infrastructure/alert/find", "alerting:metrics.alert.inventory.threshold/infrastructure/alert/getAuthorizedAlertsIndices", "alerting:metrics.alert.inventory.threshold/infrastructure/alert/getAlertSummary", "alerting:metrics.alert.inventory.threshold/infrastructure/alert/update", + "alerting:metrics.alert.inventory.threshold/alerts/alert/get", + "alerting:metrics.alert.inventory.threshold/alerts/alert/find", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/alert/update", "alerting:.es-query/infrastructure/alert/get", "alerting:.es-query/infrastructure/alert/find", "alerting:.es-query/infrastructure/alert/getAuthorizedAlertsIndices", "alerting:.es-query/infrastructure/alert/getAlertSummary", "alerting:.es-query/infrastructure/alert/update", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/update", "alerting:observability.rules.custom_threshold/infrastructure/alert/get", "alerting:observability.rules.custom_threshold/infrastructure/alert/find", "alerting:observability.rules.custom_threshold/infrastructure/alert/getAuthorizedAlertsIndices", "alerting:observability.rules.custom_threshold/infrastructure/alert/getAlertSummary", "alerting:observability.rules.custom_threshold/infrastructure/alert/update", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/update", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/alert/get", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/alert/find", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/alert/getAuthorizedAlertsIndices", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/alert/getAlertSummary", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/update", "app:logs", "app:observability-logs-explorer", "ui:catalogue/infralogging", @@ -6099,6 +11636,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:logs.alert.document.count/logs/rule/runSoon", "alerting:logs.alert.document.count/logs/rule/scheduleBackfill", "alerting:logs.alert.document.count/logs/rule/deleteBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/create", + "alerting:logs.alert.document.count/alerts/rule/delete", + "alerting:logs.alert.document.count/alerts/rule/update", + "alerting:logs.alert.document.count/alerts/rule/updateApiKey", + "alerting:logs.alert.document.count/alerts/rule/enable", + "alerting:logs.alert.document.count/alerts/rule/disable", + "alerting:logs.alert.document.count/alerts/rule/muteAll", + "alerting:logs.alert.document.count/alerts/rule/unmuteAll", + "alerting:logs.alert.document.count/alerts/rule/muteAlert", + "alerting:logs.alert.document.count/alerts/rule/unmuteAlert", + "alerting:logs.alert.document.count/alerts/rule/snooze", + "alerting:logs.alert.document.count/alerts/rule/bulkEdit", + "alerting:logs.alert.document.count/alerts/rule/bulkDelete", + "alerting:logs.alert.document.count/alerts/rule/bulkEnable", + "alerting:logs.alert.document.count/alerts/rule/bulkDisable", + "alerting:logs.alert.document.count/alerts/rule/unsnooze", + "alerting:logs.alert.document.count/alerts/rule/runSoon", + "alerting:logs.alert.document.count/alerts/rule/scheduleBackfill", + "alerting:logs.alert.document.count/alerts/rule/deleteBackfill", "alerting:.es-query/logs/rule/get", "alerting:.es-query/logs/rule/getRuleState", "alerting:.es-query/logs/rule/getAlertSummary", @@ -6108,246 +11673,111 @@ export default function ({ getService }: FtrProviderContext) { "alerting:.es-query/logs/rule/getRuleExecutionKPI", "alerting:.es-query/logs/rule/getBackfill", "alerting:.es-query/logs/rule/findBackfill", - "alerting:.es-query/logs/rule/create", - "alerting:.es-query/logs/rule/delete", - "alerting:.es-query/logs/rule/update", - "alerting:.es-query/logs/rule/updateApiKey", - "alerting:.es-query/logs/rule/enable", - "alerting:.es-query/logs/rule/disable", - "alerting:.es-query/logs/rule/muteAll", - "alerting:.es-query/logs/rule/unmuteAll", - "alerting:.es-query/logs/rule/muteAlert", - "alerting:.es-query/logs/rule/unmuteAlert", - "alerting:.es-query/logs/rule/snooze", - "alerting:.es-query/logs/rule/bulkEdit", - "alerting:.es-query/logs/rule/bulkDelete", - "alerting:.es-query/logs/rule/bulkEnable", - "alerting:.es-query/logs/rule/bulkDisable", - "alerting:.es-query/logs/rule/unsnooze", - "alerting:.es-query/logs/rule/runSoon", - "alerting:.es-query/logs/rule/scheduleBackfill", - "alerting:.es-query/logs/rule/deleteBackfill", - "alerting:observability.rules.custom_threshold/logs/rule/get", - "alerting:observability.rules.custom_threshold/logs/rule/getRuleState", - "alerting:observability.rules.custom_threshold/logs/rule/getAlertSummary", - "alerting:observability.rules.custom_threshold/logs/rule/getExecutionLog", - "alerting:observability.rules.custom_threshold/logs/rule/getActionErrorLog", - "alerting:observability.rules.custom_threshold/logs/rule/find", - "alerting:observability.rules.custom_threshold/logs/rule/getRuleExecutionKPI", - "alerting:observability.rules.custom_threshold/logs/rule/getBackfill", - "alerting:observability.rules.custom_threshold/logs/rule/findBackfill", - "alerting:observability.rules.custom_threshold/logs/rule/create", - "alerting:observability.rules.custom_threshold/logs/rule/delete", - "alerting:observability.rules.custom_threshold/logs/rule/update", - "alerting:observability.rules.custom_threshold/logs/rule/updateApiKey", - "alerting:observability.rules.custom_threshold/logs/rule/enable", - "alerting:observability.rules.custom_threshold/logs/rule/disable", - "alerting:observability.rules.custom_threshold/logs/rule/muteAll", - "alerting:observability.rules.custom_threshold/logs/rule/unmuteAll", - "alerting:observability.rules.custom_threshold/logs/rule/muteAlert", - "alerting:observability.rules.custom_threshold/logs/rule/unmuteAlert", - "alerting:observability.rules.custom_threshold/logs/rule/snooze", - "alerting:observability.rules.custom_threshold/logs/rule/bulkEdit", - "alerting:observability.rules.custom_threshold/logs/rule/bulkDelete", - "alerting:observability.rules.custom_threshold/logs/rule/bulkEnable", - "alerting:observability.rules.custom_threshold/logs/rule/bulkDisable", - "alerting:observability.rules.custom_threshold/logs/rule/unsnooze", - "alerting:observability.rules.custom_threshold/logs/rule/runSoon", - "alerting:observability.rules.custom_threshold/logs/rule/scheduleBackfill", - "alerting:observability.rules.custom_threshold/logs/rule/deleteBackfill", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/get", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getRuleState", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getExecutionLog", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getActionErrorLog", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/find", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getRuleExecutionKPI", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getBackfill", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/findBackfill", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/create", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/delete", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/update", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/updateApiKey", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/enable", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/disable", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/muteAll", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/unmuteAll", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/muteAlert", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/unmuteAlert", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/snooze", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/bulkEdit", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/bulkDelete", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/bulkEnable", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/bulkDisable", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/unsnooze", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/runSoon", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/scheduleBackfill", - "alerting:xpack.ml.anomaly_detection_alert/logs/rule/deleteBackfill", - "alerting:logs.alert.document.count/logs/alert/get", - "alerting:logs.alert.document.count/logs/alert/find", - "alerting:logs.alert.document.count/logs/alert/getAuthorizedAlertsIndices", - "alerting:logs.alert.document.count/logs/alert/getAlertSummary", - "alerting:logs.alert.document.count/logs/alert/update", - "alerting:.es-query/logs/alert/get", - "alerting:.es-query/logs/alert/find", - "alerting:.es-query/logs/alert/getAuthorizedAlertsIndices", - "alerting:.es-query/logs/alert/getAlertSummary", - "alerting:.es-query/logs/alert/update", - "alerting:observability.rules.custom_threshold/logs/alert/get", - "alerting:observability.rules.custom_threshold/logs/alert/find", - "alerting:observability.rules.custom_threshold/logs/alert/getAuthorizedAlertsIndices", - "alerting:observability.rules.custom_threshold/logs/alert/getAlertSummary", - "alerting:observability.rules.custom_threshold/logs/alert/update", - "alerting:xpack.ml.anomaly_detection_alert/logs/alert/get", - "alerting:xpack.ml.anomaly_detection_alert/logs/alert/find", - "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/logs/alert/update", - "app:observability", - "ui:catalogue/observability", - "ui:navLinks/observability", - "ui:observability/read", - "ui:observability/write", - "alerting:slo.rules.burnRate/observability/rule/get", - "alerting:slo.rules.burnRate/observability/rule/getRuleState", - "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", - "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", - "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", - "alerting:slo.rules.burnRate/observability/rule/find", - "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", - "alerting:slo.rules.burnRate/observability/rule/getBackfill", - "alerting:slo.rules.burnRate/observability/rule/findBackfill", - "alerting:slo.rules.burnRate/observability/rule/create", - "alerting:slo.rules.burnRate/observability/rule/delete", - "alerting:slo.rules.burnRate/observability/rule/update", - "alerting:slo.rules.burnRate/observability/rule/updateApiKey", - "alerting:slo.rules.burnRate/observability/rule/enable", - "alerting:slo.rules.burnRate/observability/rule/disable", - "alerting:slo.rules.burnRate/observability/rule/muteAll", - "alerting:slo.rules.burnRate/observability/rule/unmuteAll", - "alerting:slo.rules.burnRate/observability/rule/muteAlert", - "alerting:slo.rules.burnRate/observability/rule/unmuteAlert", - "alerting:slo.rules.burnRate/observability/rule/snooze", - "alerting:slo.rules.burnRate/observability/rule/bulkEdit", - "alerting:slo.rules.burnRate/observability/rule/bulkDelete", - "alerting:slo.rules.burnRate/observability/rule/bulkEnable", - "alerting:slo.rules.burnRate/observability/rule/bulkDisable", - "alerting:slo.rules.burnRate/observability/rule/unsnooze", - "alerting:slo.rules.burnRate/observability/rule/runSoon", - "alerting:slo.rules.burnRate/observability/rule/scheduleBackfill", - "alerting:slo.rules.burnRate/observability/rule/deleteBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/get", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", - "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", - "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", - "alerting:observability.rules.custom_threshold/observability/rule/find", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", - "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/create", - "alerting:observability.rules.custom_threshold/observability/rule/delete", - "alerting:observability.rules.custom_threshold/observability/rule/update", - "alerting:observability.rules.custom_threshold/observability/rule/updateApiKey", - "alerting:observability.rules.custom_threshold/observability/rule/enable", - "alerting:observability.rules.custom_threshold/observability/rule/disable", - "alerting:observability.rules.custom_threshold/observability/rule/muteAll", - "alerting:observability.rules.custom_threshold/observability/rule/unmuteAll", - "alerting:observability.rules.custom_threshold/observability/rule/muteAlert", - "alerting:observability.rules.custom_threshold/observability/rule/unmuteAlert", - "alerting:observability.rules.custom_threshold/observability/rule/snooze", - "alerting:observability.rules.custom_threshold/observability/rule/bulkEdit", - "alerting:observability.rules.custom_threshold/observability/rule/bulkDelete", - "alerting:observability.rules.custom_threshold/observability/rule/bulkEnable", - "alerting:observability.rules.custom_threshold/observability/rule/bulkDisable", - "alerting:observability.rules.custom_threshold/observability/rule/unsnooze", - "alerting:observability.rules.custom_threshold/observability/rule/runSoon", - "alerting:observability.rules.custom_threshold/observability/rule/scheduleBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/deleteBackfill", - "alerting:.es-query/observability/rule/get", - "alerting:.es-query/observability/rule/getRuleState", - "alerting:.es-query/observability/rule/getAlertSummary", - "alerting:.es-query/observability/rule/getExecutionLog", - "alerting:.es-query/observability/rule/getActionErrorLog", - "alerting:.es-query/observability/rule/find", - "alerting:.es-query/observability/rule/getRuleExecutionKPI", - "alerting:.es-query/observability/rule/getBackfill", - "alerting:.es-query/observability/rule/findBackfill", - "alerting:.es-query/observability/rule/create", - "alerting:.es-query/observability/rule/delete", - "alerting:.es-query/observability/rule/update", - "alerting:.es-query/observability/rule/updateApiKey", - "alerting:.es-query/observability/rule/enable", - "alerting:.es-query/observability/rule/disable", - "alerting:.es-query/observability/rule/muteAll", - "alerting:.es-query/observability/rule/unmuteAll", - "alerting:.es-query/observability/rule/muteAlert", - "alerting:.es-query/observability/rule/unmuteAlert", - "alerting:.es-query/observability/rule/snooze", - "alerting:.es-query/observability/rule/bulkEdit", - "alerting:.es-query/observability/rule/bulkDelete", - "alerting:.es-query/observability/rule/bulkEnable", - "alerting:.es-query/observability/rule/bulkDisable", - "alerting:.es-query/observability/rule/unsnooze", - "alerting:.es-query/observability/rule/runSoon", - "alerting:.es-query/observability/rule/scheduleBackfill", - "alerting:.es-query/observability/rule/deleteBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/create", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/delete", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/update", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/updateApiKey", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/enable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/disable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAll", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAll", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAlert", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAlert", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/snooze", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEdit", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDelete", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEnable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDisable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unsnooze", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/runSoon", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/scheduleBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/deleteBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/get", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", - "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/find", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", - "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/create", - "alerting:metrics.alert.inventory.threshold/observability/rule/delete", - "alerting:metrics.alert.inventory.threshold/observability/rule/update", - "alerting:metrics.alert.inventory.threshold/observability/rule/updateApiKey", - "alerting:metrics.alert.inventory.threshold/observability/rule/enable", - "alerting:metrics.alert.inventory.threshold/observability/rule/disable", - "alerting:metrics.alert.inventory.threshold/observability/rule/muteAll", - "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAll", - "alerting:metrics.alert.inventory.threshold/observability/rule/muteAlert", - "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAlert", - "alerting:metrics.alert.inventory.threshold/observability/rule/snooze", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEdit", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDelete", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEnable", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDisable", - "alerting:metrics.alert.inventory.threshold/observability/rule/unsnooze", - "alerting:metrics.alert.inventory.threshold/observability/rule/runSoon", - "alerting:metrics.alert.inventory.threshold/observability/rule/scheduleBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/deleteBackfill", + "alerting:.es-query/logs/rule/create", + "alerting:.es-query/logs/rule/delete", + "alerting:.es-query/logs/rule/update", + "alerting:.es-query/logs/rule/updateApiKey", + "alerting:.es-query/logs/rule/enable", + "alerting:.es-query/logs/rule/disable", + "alerting:.es-query/logs/rule/muteAll", + "alerting:.es-query/logs/rule/unmuteAll", + "alerting:.es-query/logs/rule/muteAlert", + "alerting:.es-query/logs/rule/unmuteAlert", + "alerting:.es-query/logs/rule/snooze", + "alerting:.es-query/logs/rule/bulkEdit", + "alerting:.es-query/logs/rule/bulkDelete", + "alerting:.es-query/logs/rule/bulkEnable", + "alerting:.es-query/logs/rule/bulkDisable", + "alerting:.es-query/logs/rule/unsnooze", + "alerting:.es-query/logs/rule/runSoon", + "alerting:.es-query/logs/rule/scheduleBackfill", + "alerting:.es-query/logs/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/logs/rule/get", + "alerting:observability.rules.custom_threshold/logs/rule/getRuleState", + "alerting:observability.rules.custom_threshold/logs/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/logs/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/logs/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/logs/rule/find", + "alerting:observability.rules.custom_threshold/logs/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/logs/rule/getBackfill", + "alerting:observability.rules.custom_threshold/logs/rule/findBackfill", + "alerting:observability.rules.custom_threshold/logs/rule/create", + "alerting:observability.rules.custom_threshold/logs/rule/delete", + "alerting:observability.rules.custom_threshold/logs/rule/update", + "alerting:observability.rules.custom_threshold/logs/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/logs/rule/enable", + "alerting:observability.rules.custom_threshold/logs/rule/disable", + "alerting:observability.rules.custom_threshold/logs/rule/muteAll", + "alerting:observability.rules.custom_threshold/logs/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/logs/rule/muteAlert", + "alerting:observability.rules.custom_threshold/logs/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/logs/rule/snooze", + "alerting:observability.rules.custom_threshold/logs/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/logs/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/logs/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/logs/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/logs/rule/unsnooze", + "alerting:observability.rules.custom_threshold/logs/rule/runSoon", + "alerting:observability.rules.custom_threshold/logs/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/logs/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/logs/rule/deleteBackfill", + "alerting:logs.alert.document.count/logs/alert/get", + "alerting:logs.alert.document.count/logs/alert/find", + "alerting:logs.alert.document.count/logs/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/logs/alert/getAlertSummary", + "alerting:logs.alert.document.count/logs/alert/update", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/update", + "alerting:.es-query/logs/alert/get", + "alerting:.es-query/logs/alert/find", + "alerting:.es-query/logs/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/logs/alert/getAlertSummary", + "alerting:.es-query/logs/alert/update", + "alerting:observability.rules.custom_threshold/logs/alert/get", + "alerting:observability.rules.custom_threshold/logs/alert/find", + "alerting:observability.rules.custom_threshold/logs/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/logs/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/logs/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/logs/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/logs/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/logs/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/logs/alert/update", + "app:observability", + "ui:catalogue/observability", + "ui:navLinks/observability", + "ui:observability/read", + "ui:observability/write", "alerting:apm.error_rate/observability/rule/get", "alerting:apm.error_rate/observability/rule/getRuleState", "alerting:apm.error_rate/observability/rule/getAlertSummary", @@ -6376,6 +11806,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.error_rate/observability/rule/runSoon", "alerting:apm.error_rate/observability/rule/scheduleBackfill", "alerting:apm.error_rate/observability/rule/deleteBackfill", + "alerting:apm.error_rate/alerts/rule/get", + "alerting:apm.error_rate/alerts/rule/getRuleState", + "alerting:apm.error_rate/alerts/rule/getAlertSummary", + "alerting:apm.error_rate/alerts/rule/getExecutionLog", + "alerting:apm.error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.error_rate/alerts/rule/find", + "alerting:apm.error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.error_rate/alerts/rule/getBackfill", + "alerting:apm.error_rate/alerts/rule/findBackfill", + "alerting:apm.error_rate/alerts/rule/create", + "alerting:apm.error_rate/alerts/rule/delete", + "alerting:apm.error_rate/alerts/rule/update", + "alerting:apm.error_rate/alerts/rule/updateApiKey", + "alerting:apm.error_rate/alerts/rule/enable", + "alerting:apm.error_rate/alerts/rule/disable", + "alerting:apm.error_rate/alerts/rule/muteAll", + "alerting:apm.error_rate/alerts/rule/unmuteAll", + "alerting:apm.error_rate/alerts/rule/muteAlert", + "alerting:apm.error_rate/alerts/rule/unmuteAlert", + "alerting:apm.error_rate/alerts/rule/snooze", + "alerting:apm.error_rate/alerts/rule/bulkEdit", + "alerting:apm.error_rate/alerts/rule/bulkDelete", + "alerting:apm.error_rate/alerts/rule/bulkEnable", + "alerting:apm.error_rate/alerts/rule/bulkDisable", + "alerting:apm.error_rate/alerts/rule/unsnooze", + "alerting:apm.error_rate/alerts/rule/runSoon", + "alerting:apm.error_rate/alerts/rule/scheduleBackfill", + "alerting:apm.error_rate/alerts/rule/deleteBackfill", "alerting:apm.transaction_error_rate/observability/rule/get", "alerting:apm.transaction_error_rate/observability/rule/getRuleState", "alerting:apm.transaction_error_rate/observability/rule/getAlertSummary", @@ -6404,6 +11862,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_error_rate/observability/rule/runSoon", "alerting:apm.transaction_error_rate/observability/rule/scheduleBackfill", "alerting:apm.transaction_error_rate/observability/rule/deleteBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/get", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleState", + "alerting:apm.transaction_error_rate/alerts/rule/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/rule/getExecutionLog", + "alerting:apm.transaction_error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_error_rate/alerts/rule/find", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_error_rate/alerts/rule/getBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/findBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/create", + "alerting:apm.transaction_error_rate/alerts/rule/delete", + "alerting:apm.transaction_error_rate/alerts/rule/update", + "alerting:apm.transaction_error_rate/alerts/rule/updateApiKey", + "alerting:apm.transaction_error_rate/alerts/rule/enable", + "alerting:apm.transaction_error_rate/alerts/rule/disable", + "alerting:apm.transaction_error_rate/alerts/rule/muteAll", + "alerting:apm.transaction_error_rate/alerts/rule/unmuteAll", + "alerting:apm.transaction_error_rate/alerts/rule/muteAlert", + "alerting:apm.transaction_error_rate/alerts/rule/unmuteAlert", + "alerting:apm.transaction_error_rate/alerts/rule/snooze", + "alerting:apm.transaction_error_rate/alerts/rule/bulkEdit", + "alerting:apm.transaction_error_rate/alerts/rule/bulkDelete", + "alerting:apm.transaction_error_rate/alerts/rule/bulkEnable", + "alerting:apm.transaction_error_rate/alerts/rule/bulkDisable", + "alerting:apm.transaction_error_rate/alerts/rule/unsnooze", + "alerting:apm.transaction_error_rate/alerts/rule/runSoon", + "alerting:apm.transaction_error_rate/alerts/rule/scheduleBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/deleteBackfill", "alerting:apm.transaction_duration/observability/rule/get", "alerting:apm.transaction_duration/observability/rule/getRuleState", "alerting:apm.transaction_duration/observability/rule/getAlertSummary", @@ -6432,6 +11918,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_duration/observability/rule/runSoon", "alerting:apm.transaction_duration/observability/rule/scheduleBackfill", "alerting:apm.transaction_duration/observability/rule/deleteBackfill", + "alerting:apm.transaction_duration/alerts/rule/get", + "alerting:apm.transaction_duration/alerts/rule/getRuleState", + "alerting:apm.transaction_duration/alerts/rule/getAlertSummary", + "alerting:apm.transaction_duration/alerts/rule/getExecutionLog", + "alerting:apm.transaction_duration/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_duration/alerts/rule/find", + "alerting:apm.transaction_duration/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_duration/alerts/rule/getBackfill", + "alerting:apm.transaction_duration/alerts/rule/findBackfill", + "alerting:apm.transaction_duration/alerts/rule/create", + "alerting:apm.transaction_duration/alerts/rule/delete", + "alerting:apm.transaction_duration/alerts/rule/update", + "alerting:apm.transaction_duration/alerts/rule/updateApiKey", + "alerting:apm.transaction_duration/alerts/rule/enable", + "alerting:apm.transaction_duration/alerts/rule/disable", + "alerting:apm.transaction_duration/alerts/rule/muteAll", + "alerting:apm.transaction_duration/alerts/rule/unmuteAll", + "alerting:apm.transaction_duration/alerts/rule/muteAlert", + "alerting:apm.transaction_duration/alerts/rule/unmuteAlert", + "alerting:apm.transaction_duration/alerts/rule/snooze", + "alerting:apm.transaction_duration/alerts/rule/bulkEdit", + "alerting:apm.transaction_duration/alerts/rule/bulkDelete", + "alerting:apm.transaction_duration/alerts/rule/bulkEnable", + "alerting:apm.transaction_duration/alerts/rule/bulkDisable", + "alerting:apm.transaction_duration/alerts/rule/unsnooze", + "alerting:apm.transaction_duration/alerts/rule/runSoon", + "alerting:apm.transaction_duration/alerts/rule/scheduleBackfill", + "alerting:apm.transaction_duration/alerts/rule/deleteBackfill", "alerting:apm.anomaly/observability/rule/get", "alerting:apm.anomaly/observability/rule/getRuleState", "alerting:apm.anomaly/observability/rule/getAlertSummary", @@ -6460,6 +11974,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.anomaly/observability/rule/runSoon", "alerting:apm.anomaly/observability/rule/scheduleBackfill", "alerting:apm.anomaly/observability/rule/deleteBackfill", + "alerting:apm.anomaly/alerts/rule/get", + "alerting:apm.anomaly/alerts/rule/getRuleState", + "alerting:apm.anomaly/alerts/rule/getAlertSummary", + "alerting:apm.anomaly/alerts/rule/getExecutionLog", + "alerting:apm.anomaly/alerts/rule/getActionErrorLog", + "alerting:apm.anomaly/alerts/rule/find", + "alerting:apm.anomaly/alerts/rule/getRuleExecutionKPI", + "alerting:apm.anomaly/alerts/rule/getBackfill", + "alerting:apm.anomaly/alerts/rule/findBackfill", + "alerting:apm.anomaly/alerts/rule/create", + "alerting:apm.anomaly/alerts/rule/delete", + "alerting:apm.anomaly/alerts/rule/update", + "alerting:apm.anomaly/alerts/rule/updateApiKey", + "alerting:apm.anomaly/alerts/rule/enable", + "alerting:apm.anomaly/alerts/rule/disable", + "alerting:apm.anomaly/alerts/rule/muteAll", + "alerting:apm.anomaly/alerts/rule/unmuteAll", + "alerting:apm.anomaly/alerts/rule/muteAlert", + "alerting:apm.anomaly/alerts/rule/unmuteAlert", + "alerting:apm.anomaly/alerts/rule/snooze", + "alerting:apm.anomaly/alerts/rule/bulkEdit", + "alerting:apm.anomaly/alerts/rule/bulkDelete", + "alerting:apm.anomaly/alerts/rule/bulkEnable", + "alerting:apm.anomaly/alerts/rule/bulkDisable", + "alerting:apm.anomaly/alerts/rule/unsnooze", + "alerting:apm.anomaly/alerts/rule/runSoon", + "alerting:apm.anomaly/alerts/rule/scheduleBackfill", + "alerting:apm.anomaly/alerts/rule/deleteBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getAlertSummary", @@ -6488,6 +12030,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/runSoon", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/scheduleBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/deleteBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/create", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/delete", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/update", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/updateApiKey", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/enable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/disable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/muteAll", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unmuteAll", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/muteAlert", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unmuteAlert", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/snooze", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkEdit", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkDelete", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkEnable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unsnooze", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/runSoon", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/deleteBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/get", "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.tls/observability/rule/getAlertSummary", @@ -6516,61 +12086,622 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/rule/runSoon", "alerting:xpack.synthetics.alerts.tls/observability/rule/scheduleBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/deleteBackfill", - "alerting:slo.rules.burnRate/observability/alert/get", - "alerting:slo.rules.burnRate/observability/alert/find", - "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", - "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", - "alerting:slo.rules.burnRate/observability/alert/update", - "alerting:observability.rules.custom_threshold/observability/alert/get", - "alerting:observability.rules.custom_threshold/observability/alert/find", - "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/alert/update", - "alerting:.es-query/observability/alert/get", - "alerting:.es-query/observability/alert/find", - "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", - "alerting:.es-query/observability/alert/getAlertSummary", - "alerting:.es-query/observability/alert/update", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/update", - "alerting:metrics.alert.inventory.threshold/observability/alert/get", - "alerting:metrics.alert.inventory.threshold/observability/alert/find", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/alert/update", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/get", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/find", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/create", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/delete", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/update", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/updateApiKey", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/enable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/disable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/muteAll", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unmuteAll", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/muteAlert", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unmuteAlert", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/snooze", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkEdit", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkDelete", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkEnable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unsnooze", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/runSoon", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/deleteBackfill", + "alerting:metrics.alert.threshold/observability/rule/get", + "alerting:metrics.alert.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/observability/rule/find", + "alerting:metrics.alert.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.threshold/observability/rule/create", + "alerting:metrics.alert.threshold/observability/rule/delete", + "alerting:metrics.alert.threshold/observability/rule/update", + "alerting:metrics.alert.threshold/observability/rule/updateApiKey", + "alerting:metrics.alert.threshold/observability/rule/enable", + "alerting:metrics.alert.threshold/observability/rule/disable", + "alerting:metrics.alert.threshold/observability/rule/muteAll", + "alerting:metrics.alert.threshold/observability/rule/unmuteAll", + "alerting:metrics.alert.threshold/observability/rule/muteAlert", + "alerting:metrics.alert.threshold/observability/rule/unmuteAlert", + "alerting:metrics.alert.threshold/observability/rule/snooze", + "alerting:metrics.alert.threshold/observability/rule/bulkEdit", + "alerting:metrics.alert.threshold/observability/rule/bulkDelete", + "alerting:metrics.alert.threshold/observability/rule/bulkEnable", + "alerting:metrics.alert.threshold/observability/rule/bulkDisable", + "alerting:metrics.alert.threshold/observability/rule/unsnooze", + "alerting:metrics.alert.threshold/observability/rule/runSoon", + "alerting:metrics.alert.threshold/observability/rule/scheduleBackfill", + "alerting:metrics.alert.threshold/observability/rule/deleteBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/get", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/find", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/create", + "alerting:metrics.alert.inventory.threshold/observability/rule/delete", + "alerting:metrics.alert.inventory.threshold/observability/rule/update", + "alerting:metrics.alert.inventory.threshold/observability/rule/updateApiKey", + "alerting:metrics.alert.inventory.threshold/observability/rule/enable", + "alerting:metrics.alert.inventory.threshold/observability/rule/disable", + "alerting:metrics.alert.inventory.threshold/observability/rule/muteAll", + "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAll", + "alerting:metrics.alert.inventory.threshold/observability/rule/muteAlert", + "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAlert", + "alerting:metrics.alert.inventory.threshold/observability/rule/snooze", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEdit", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDelete", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEnable", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDisable", + "alerting:metrics.alert.inventory.threshold/observability/rule/unsnooze", + "alerting:metrics.alert.inventory.threshold/observability/rule/runSoon", + "alerting:metrics.alert.inventory.threshold/observability/rule/scheduleBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/get", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/find", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/create", + "alerting:xpack.uptime.alerts.tls/observability/rule/delete", + "alerting:xpack.uptime.alerts.tls/observability/rule/update", + "alerting:xpack.uptime.alerts.tls/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tls/observability/rule/enable", + "alerting:xpack.uptime.alerts.tls/observability/rule/disable", + "alerting:xpack.uptime.alerts.tls/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.tls/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tls/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.tls/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tls/observability/rule/snooze", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tls/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.tls/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.tls/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/get", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/find", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/create", + "alerting:xpack.uptime.alerts.tls/alerts/rule/delete", + "alerting:xpack.uptime.alerts.tls/alerts/rule/update", + "alerting:xpack.uptime.alerts.tls/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tls/alerts/rule/enable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/disable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tls/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tls/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.tls/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.tls/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/create", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/delete", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/update", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/enable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/disable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/snooze", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/create", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/delete", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/update", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/enable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/disable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/create", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/delete", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/update", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/enable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/disable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/snooze", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/create", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/delete", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/update", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/enable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/disable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/create", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/delete", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/update", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/enable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/disable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/snooze", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/create", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/delete", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/update", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/enable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/disable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/deleteBackfill", + "alerting:logs.alert.document.count/observability/rule/get", + "alerting:logs.alert.document.count/observability/rule/getRuleState", + "alerting:logs.alert.document.count/observability/rule/getAlertSummary", + "alerting:logs.alert.document.count/observability/rule/getExecutionLog", + "alerting:logs.alert.document.count/observability/rule/getActionErrorLog", + "alerting:logs.alert.document.count/observability/rule/find", + "alerting:logs.alert.document.count/observability/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/observability/rule/getBackfill", + "alerting:logs.alert.document.count/observability/rule/findBackfill", + "alerting:logs.alert.document.count/observability/rule/create", + "alerting:logs.alert.document.count/observability/rule/delete", + "alerting:logs.alert.document.count/observability/rule/update", + "alerting:logs.alert.document.count/observability/rule/updateApiKey", + "alerting:logs.alert.document.count/observability/rule/enable", + "alerting:logs.alert.document.count/observability/rule/disable", + "alerting:logs.alert.document.count/observability/rule/muteAll", + "alerting:logs.alert.document.count/observability/rule/unmuteAll", + "alerting:logs.alert.document.count/observability/rule/muteAlert", + "alerting:logs.alert.document.count/observability/rule/unmuteAlert", + "alerting:logs.alert.document.count/observability/rule/snooze", + "alerting:logs.alert.document.count/observability/rule/bulkEdit", + "alerting:logs.alert.document.count/observability/rule/bulkDelete", + "alerting:logs.alert.document.count/observability/rule/bulkEnable", + "alerting:logs.alert.document.count/observability/rule/bulkDisable", + "alerting:logs.alert.document.count/observability/rule/unsnooze", + "alerting:logs.alert.document.count/observability/rule/runSoon", + "alerting:logs.alert.document.count/observability/rule/scheduleBackfill", + "alerting:logs.alert.document.count/observability/rule/deleteBackfill", + "alerting:slo.rules.burnRate/observability/rule/get", + "alerting:slo.rules.burnRate/observability/rule/getRuleState", + "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", + "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", + "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/observability/rule/find", + "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/observability/rule/getBackfill", + "alerting:slo.rules.burnRate/observability/rule/findBackfill", + "alerting:slo.rules.burnRate/observability/rule/create", + "alerting:slo.rules.burnRate/observability/rule/delete", + "alerting:slo.rules.burnRate/observability/rule/update", + "alerting:slo.rules.burnRate/observability/rule/updateApiKey", + "alerting:slo.rules.burnRate/observability/rule/enable", + "alerting:slo.rules.burnRate/observability/rule/disable", + "alerting:slo.rules.burnRate/observability/rule/muteAll", + "alerting:slo.rules.burnRate/observability/rule/unmuteAll", + "alerting:slo.rules.burnRate/observability/rule/muteAlert", + "alerting:slo.rules.burnRate/observability/rule/unmuteAlert", + "alerting:slo.rules.burnRate/observability/rule/snooze", + "alerting:slo.rules.burnRate/observability/rule/bulkEdit", + "alerting:slo.rules.burnRate/observability/rule/bulkDelete", + "alerting:slo.rules.burnRate/observability/rule/bulkEnable", + "alerting:slo.rules.burnRate/observability/rule/bulkDisable", + "alerting:slo.rules.burnRate/observability/rule/unsnooze", + "alerting:slo.rules.burnRate/observability/rule/runSoon", + "alerting:slo.rules.burnRate/observability/rule/scheduleBackfill", + "alerting:slo.rules.burnRate/observability/rule/deleteBackfill", + "alerting:slo.rules.burnRate/alerts/rule/get", + "alerting:slo.rules.burnRate/alerts/rule/getRuleState", + "alerting:slo.rules.burnRate/alerts/rule/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/rule/getExecutionLog", + "alerting:slo.rules.burnRate/alerts/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/alerts/rule/find", + "alerting:slo.rules.burnRate/alerts/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/alerts/rule/getBackfill", + "alerting:slo.rules.burnRate/alerts/rule/findBackfill", + "alerting:slo.rules.burnRate/alerts/rule/create", + "alerting:slo.rules.burnRate/alerts/rule/delete", + "alerting:slo.rules.burnRate/alerts/rule/update", + "alerting:slo.rules.burnRate/alerts/rule/updateApiKey", + "alerting:slo.rules.burnRate/alerts/rule/enable", + "alerting:slo.rules.burnRate/alerts/rule/disable", + "alerting:slo.rules.burnRate/alerts/rule/muteAll", + "alerting:slo.rules.burnRate/alerts/rule/unmuteAll", + "alerting:slo.rules.burnRate/alerts/rule/muteAlert", + "alerting:slo.rules.burnRate/alerts/rule/unmuteAlert", + "alerting:slo.rules.burnRate/alerts/rule/snooze", + "alerting:slo.rules.burnRate/alerts/rule/bulkEdit", + "alerting:slo.rules.burnRate/alerts/rule/bulkDelete", + "alerting:slo.rules.burnRate/alerts/rule/bulkEnable", + "alerting:slo.rules.burnRate/alerts/rule/bulkDisable", + "alerting:slo.rules.burnRate/alerts/rule/unsnooze", + "alerting:slo.rules.burnRate/alerts/rule/runSoon", + "alerting:slo.rules.burnRate/alerts/rule/scheduleBackfill", + "alerting:slo.rules.burnRate/alerts/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/get", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", + "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/observability/rule/find", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/create", + "alerting:observability.rules.custom_threshold/observability/rule/delete", + "alerting:observability.rules.custom_threshold/observability/rule/update", + "alerting:observability.rules.custom_threshold/observability/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/observability/rule/enable", + "alerting:observability.rules.custom_threshold/observability/rule/disable", + "alerting:observability.rules.custom_threshold/observability/rule/muteAll", + "alerting:observability.rules.custom_threshold/observability/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/observability/rule/muteAlert", + "alerting:observability.rules.custom_threshold/observability/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/observability/rule/snooze", + "alerting:observability.rules.custom_threshold/observability/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/observability/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/observability/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/observability/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/observability/rule/unsnooze", + "alerting:observability.rules.custom_threshold/observability/rule/runSoon", + "alerting:observability.rules.custom_threshold/observability/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/deleteBackfill", + "alerting:.es-query/observability/rule/get", + "alerting:.es-query/observability/rule/getRuleState", + "alerting:.es-query/observability/rule/getAlertSummary", + "alerting:.es-query/observability/rule/getExecutionLog", + "alerting:.es-query/observability/rule/getActionErrorLog", + "alerting:.es-query/observability/rule/find", + "alerting:.es-query/observability/rule/getRuleExecutionKPI", + "alerting:.es-query/observability/rule/getBackfill", + "alerting:.es-query/observability/rule/findBackfill", + "alerting:.es-query/observability/rule/create", + "alerting:.es-query/observability/rule/delete", + "alerting:.es-query/observability/rule/update", + "alerting:.es-query/observability/rule/updateApiKey", + "alerting:.es-query/observability/rule/enable", + "alerting:.es-query/observability/rule/disable", + "alerting:.es-query/observability/rule/muteAll", + "alerting:.es-query/observability/rule/unmuteAll", + "alerting:.es-query/observability/rule/muteAlert", + "alerting:.es-query/observability/rule/unmuteAlert", + "alerting:.es-query/observability/rule/snooze", + "alerting:.es-query/observability/rule/bulkEdit", + "alerting:.es-query/observability/rule/bulkDelete", + "alerting:.es-query/observability/rule/bulkEnable", + "alerting:.es-query/observability/rule/bulkDisable", + "alerting:.es-query/observability/rule/unsnooze", + "alerting:.es-query/observability/rule/runSoon", + "alerting:.es-query/observability/rule/scheduleBackfill", + "alerting:.es-query/observability/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/deleteBackfill", "alerting:apm.error_rate/observability/alert/get", "alerting:apm.error_rate/observability/alert/find", "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.error_rate/observability/alert/getAlertSummary", "alerting:apm.error_rate/observability/alert/update", + "alerting:apm.error_rate/alerts/alert/get", + "alerting:apm.error_rate/alerts/alert/find", + "alerting:apm.error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/alerts/alert/getAlertSummary", + "alerting:apm.error_rate/alerts/alert/update", "alerting:apm.transaction_error_rate/observability/alert/get", "alerting:apm.transaction_error_rate/observability/alert/find", "alerting:apm.transaction_error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_error_rate/observability/alert/getAlertSummary", "alerting:apm.transaction_error_rate/observability/alert/update", + "alerting:apm.transaction_error_rate/alerts/alert/get", + "alerting:apm.transaction_error_rate/alerts/alert/find", + "alerting:apm.transaction_error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/alerts/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/alert/update", "alerting:apm.transaction_duration/observability/alert/get", "alerting:apm.transaction_duration/observability/alert/find", "alerting:apm.transaction_duration/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_duration/observability/alert/getAlertSummary", "alerting:apm.transaction_duration/observability/alert/update", + "alerting:apm.transaction_duration/alerts/alert/get", + "alerting:apm.transaction_duration/alerts/alert/find", + "alerting:apm.transaction_duration/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/alerts/alert/getAlertSummary", + "alerting:apm.transaction_duration/alerts/alert/update", "alerting:apm.anomaly/observability/alert/get", "alerting:apm.anomaly/observability/alert/find", "alerting:apm.anomaly/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.anomaly/observability/alert/getAlertSummary", "alerting:apm.anomaly/observability/alert/update", + "alerting:apm.anomaly/alerts/alert/get", + "alerting:apm.anomaly/alerts/alert/find", + "alerting:apm.anomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/alerts/alert/getAlertSummary", + "alerting:apm.anomaly/alerts/alert/update", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/update", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/update", "alerting:xpack.synthetics.alerts.tls/observability/alert/get", "alerting:xpack.synthetics.alerts.tls/observability/alert/find", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.tls/observability/alert/update", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/get", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/find", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/update", + "alerting:metrics.alert.threshold/observability/alert/get", + "alerting:metrics.alert.threshold/observability/alert/find", + "alerting:metrics.alert.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.threshold/observability/alert/update", + "alerting:metrics.alert.inventory.threshold/observability/alert/get", + "alerting:metrics.alert.inventory.threshold/observability/alert/find", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/alert/update", + "alerting:xpack.uptime.alerts.tls/observability/alert/get", + "alerting:xpack.uptime.alerts.tls/observability/alert/find", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/alert/update", + "alerting:xpack.uptime.alerts.tls/alerts/alert/get", + "alerting:xpack.uptime.alerts.tls/alerts/alert/find", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/alert/update", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/update", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/update", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/update", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/update", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/update", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/update", + "alerting:logs.alert.document.count/observability/alert/get", + "alerting:logs.alert.document.count/observability/alert/find", + "alerting:logs.alert.document.count/observability/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/observability/alert/getAlertSummary", + "alerting:logs.alert.document.count/observability/alert/update", + "alerting:slo.rules.burnRate/observability/alert/get", + "alerting:slo.rules.burnRate/observability/alert/find", + "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", + "alerting:slo.rules.burnRate/observability/alert/update", + "alerting:slo.rules.burnRate/alerts/alert/get", + "alerting:slo.rules.burnRate/alerts/alert/find", + "alerting:slo.rules.burnRate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/alerts/alert/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/alert/update", + "alerting:observability.rules.custom_threshold/observability/alert/get", + "alerting:observability.rules.custom_threshold/observability/alert/find", + "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/alert/update", + "alerting:.es-query/observability/alert/get", + "alerting:.es-query/observability/alert/find", + "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/observability/alert/getAlertSummary", + "alerting:.es-query/observability/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/update", ], "minimal_read": Array [ "login:", @@ -6630,6 +12761,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:metrics.alert.threshold/infrastructure/rule/getRuleExecutionKPI", "alerting:metrics.alert.threshold/infrastructure/rule/getBackfill", "alerting:metrics.alert.threshold/infrastructure/rule/findBackfill", + "alerting:metrics.alert.threshold/alerts/rule/get", + "alerting:metrics.alert.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/alerts/rule/find", + "alerting:metrics.alert.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.threshold/alerts/rule/findBackfill", "alerting:metrics.alert.inventory.threshold/infrastructure/rule/get", "alerting:metrics.alert.inventory.threshold/infrastructure/rule/getRuleState", "alerting:metrics.alert.inventory.threshold/infrastructure/rule/getAlertSummary", @@ -6639,6 +12779,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:metrics.alert.inventory.threshold/infrastructure/rule/getRuleExecutionKPI", "alerting:metrics.alert.inventory.threshold/infrastructure/rule/getBackfill", "alerting:metrics.alert.inventory.threshold/infrastructure/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/get", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/find", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/findBackfill", "alerting:.es-query/infrastructure/rule/get", "alerting:.es-query/infrastructure/rule/getRuleState", "alerting:.es-query/infrastructure/rule/getAlertSummary", @@ -6648,6 +12797,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:.es-query/infrastructure/rule/getRuleExecutionKPI", "alerting:.es-query/infrastructure/rule/getBackfill", "alerting:.es-query/infrastructure/rule/findBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", "alerting:observability.rules.custom_threshold/infrastructure/rule/get", "alerting:observability.rules.custom_threshold/infrastructure/rule/getRuleState", "alerting:observability.rules.custom_threshold/infrastructure/rule/getAlertSummary", @@ -6657,6 +12815,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:observability.rules.custom_threshold/infrastructure/rule/getRuleExecutionKPI", "alerting:observability.rules.custom_threshold/infrastructure/rule/getBackfill", "alerting:observability.rules.custom_threshold/infrastructure/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/get", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/getRuleState", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/getAlertSummary", @@ -6666,26 +12833,55 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/getRuleExecutionKPI", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/getBackfill", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", "alerting:metrics.alert.threshold/infrastructure/alert/get", "alerting:metrics.alert.threshold/infrastructure/alert/find", "alerting:metrics.alert.threshold/infrastructure/alert/getAuthorizedAlertsIndices", "alerting:metrics.alert.threshold/infrastructure/alert/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/alert/get", + "alerting:metrics.alert.threshold/alerts/alert/find", + "alerting:metrics.alert.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/alerts/alert/getAlertSummary", "alerting:metrics.alert.inventory.threshold/infrastructure/alert/get", "alerting:metrics.alert.inventory.threshold/infrastructure/alert/find", "alerting:metrics.alert.inventory.threshold/infrastructure/alert/getAuthorizedAlertsIndices", "alerting:metrics.alert.inventory.threshold/infrastructure/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/alert/get", + "alerting:metrics.alert.inventory.threshold/alerts/alert/find", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAlertSummary", "alerting:.es-query/infrastructure/alert/get", "alerting:.es-query/infrastructure/alert/find", "alerting:.es-query/infrastructure/alert/getAuthorizedAlertsIndices", "alerting:.es-query/infrastructure/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", "alerting:observability.rules.custom_threshold/infrastructure/alert/get", "alerting:observability.rules.custom_threshold/infrastructure/alert/find", "alerting:observability.rules.custom_threshold/infrastructure/alert/getAuthorizedAlertsIndices", "alerting:observability.rules.custom_threshold/infrastructure/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/alert/get", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/alert/find", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/alert/getAuthorizedAlertsIndices", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", "app:logs", "app:observability-logs-explorer", "ui:catalogue/infralogging", @@ -6707,6 +12903,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:logs.alert.document.count/logs/rule/getRuleExecutionKPI", "alerting:logs.alert.document.count/logs/rule/getBackfill", "alerting:logs.alert.document.count/logs/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", "alerting:.es-query/logs/rule/get", "alerting:.es-query/logs/rule/getRuleState", "alerting:.es-query/logs/rule/getAlertSummary", @@ -6738,6 +12943,10 @@ export default function ({ getService }: FtrProviderContext) { "alerting:logs.alert.document.count/logs/alert/find", "alerting:logs.alert.document.count/logs/alert/getAuthorizedAlertsIndices", "alerting:logs.alert.document.count/logs/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", "alerting:.es-query/logs/alert/get", "alerting:.es-query/logs/alert/find", "alerting:.es-query/logs/alert/getAuthorizedAlertsIndices", @@ -6754,51 +12963,6 @@ export default function ({ getService }: FtrProviderContext) { "ui:catalogue/observability", "ui:navLinks/observability", "ui:observability/read", - "alerting:slo.rules.burnRate/observability/rule/get", - "alerting:slo.rules.burnRate/observability/rule/getRuleState", - "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", - "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", - "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", - "alerting:slo.rules.burnRate/observability/rule/find", - "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", - "alerting:slo.rules.burnRate/observability/rule/getBackfill", - "alerting:slo.rules.burnRate/observability/rule/findBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/get", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", - "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", - "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", - "alerting:observability.rules.custom_threshold/observability/rule/find", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", - "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", - "alerting:.es-query/observability/rule/get", - "alerting:.es-query/observability/rule/getRuleState", - "alerting:.es-query/observability/rule/getAlertSummary", - "alerting:.es-query/observability/rule/getExecutionLog", - "alerting:.es-query/observability/rule/getActionErrorLog", - "alerting:.es-query/observability/rule/find", - "alerting:.es-query/observability/rule/getRuleExecutionKPI", - "alerting:.es-query/observability/rule/getBackfill", - "alerting:.es-query/observability/rule/findBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/get", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", - "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/find", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", - "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", "alerting:apm.error_rate/observability/rule/get", "alerting:apm.error_rate/observability/rule/getRuleState", "alerting:apm.error_rate/observability/rule/getAlertSummary", @@ -6808,6 +12972,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.error_rate/observability/rule/getRuleExecutionKPI", "alerting:apm.error_rate/observability/rule/getBackfill", "alerting:apm.error_rate/observability/rule/findBackfill", + "alerting:apm.error_rate/alerts/rule/get", + "alerting:apm.error_rate/alerts/rule/getRuleState", + "alerting:apm.error_rate/alerts/rule/getAlertSummary", + "alerting:apm.error_rate/alerts/rule/getExecutionLog", + "alerting:apm.error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.error_rate/alerts/rule/find", + "alerting:apm.error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.error_rate/alerts/rule/getBackfill", + "alerting:apm.error_rate/alerts/rule/findBackfill", "alerting:apm.transaction_error_rate/observability/rule/get", "alerting:apm.transaction_error_rate/observability/rule/getRuleState", "alerting:apm.transaction_error_rate/observability/rule/getAlertSummary", @@ -6817,6 +12990,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_error_rate/observability/rule/getRuleExecutionKPI", "alerting:apm.transaction_error_rate/observability/rule/getBackfill", "alerting:apm.transaction_error_rate/observability/rule/findBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/get", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleState", + "alerting:apm.transaction_error_rate/alerts/rule/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/rule/getExecutionLog", + "alerting:apm.transaction_error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_error_rate/alerts/rule/find", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_error_rate/alerts/rule/getBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/findBackfill", "alerting:apm.transaction_duration/observability/rule/get", "alerting:apm.transaction_duration/observability/rule/getRuleState", "alerting:apm.transaction_duration/observability/rule/getAlertSummary", @@ -6826,6 +13008,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_duration/observability/rule/getRuleExecutionKPI", "alerting:apm.transaction_duration/observability/rule/getBackfill", "alerting:apm.transaction_duration/observability/rule/findBackfill", + "alerting:apm.transaction_duration/alerts/rule/get", + "alerting:apm.transaction_duration/alerts/rule/getRuleState", + "alerting:apm.transaction_duration/alerts/rule/getAlertSummary", + "alerting:apm.transaction_duration/alerts/rule/getExecutionLog", + "alerting:apm.transaction_duration/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_duration/alerts/rule/find", + "alerting:apm.transaction_duration/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_duration/alerts/rule/getBackfill", + "alerting:apm.transaction_duration/alerts/rule/findBackfill", "alerting:apm.anomaly/observability/rule/get", "alerting:apm.anomaly/observability/rule/getRuleState", "alerting:apm.anomaly/observability/rule/getAlertSummary", @@ -6835,6 +13026,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.anomaly/observability/rule/getRuleExecutionKPI", "alerting:apm.anomaly/observability/rule/getBackfill", "alerting:apm.anomaly/observability/rule/findBackfill", + "alerting:apm.anomaly/alerts/rule/get", + "alerting:apm.anomaly/alerts/rule/getRuleState", + "alerting:apm.anomaly/alerts/rule/getAlertSummary", + "alerting:apm.anomaly/alerts/rule/getExecutionLog", + "alerting:apm.anomaly/alerts/rule/getActionErrorLog", + "alerting:apm.anomaly/alerts/rule/find", + "alerting:apm.anomaly/alerts/rule/getRuleExecutionKPI", + "alerting:apm.anomaly/alerts/rule/getBackfill", + "alerting:apm.anomaly/alerts/rule/findBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getAlertSummary", @@ -6844,6 +13044,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/findBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/get", "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.tls/observability/rule/getAlertSummary", @@ -6853,50 +13062,271 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleExecutionKPI", "alerting:xpack.synthetics.alerts.tls/observability/rule/getBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/findBackfill", - "alerting:slo.rules.burnRate/observability/alert/get", - "alerting:slo.rules.burnRate/observability/alert/find", - "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", - "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/alert/get", - "alerting:observability.rules.custom_threshold/observability/alert/find", - "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", - "alerting:.es-query/observability/alert/get", - "alerting:.es-query/observability/alert/find", - "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", - "alerting:.es-query/observability/alert/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/alert/get", - "alerting:metrics.alert.inventory.threshold/observability/alert/find", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/get", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/find", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/findBackfill", + "alerting:metrics.alert.threshold/observability/rule/get", + "alerting:metrics.alert.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/observability/rule/find", + "alerting:metrics.alert.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/get", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/find", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/get", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/find", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/get", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/find", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/findBackfill", + "alerting:logs.alert.document.count/observability/rule/get", + "alerting:logs.alert.document.count/observability/rule/getRuleState", + "alerting:logs.alert.document.count/observability/rule/getAlertSummary", + "alerting:logs.alert.document.count/observability/rule/getExecutionLog", + "alerting:logs.alert.document.count/observability/rule/getActionErrorLog", + "alerting:logs.alert.document.count/observability/rule/find", + "alerting:logs.alert.document.count/observability/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/observability/rule/getBackfill", + "alerting:logs.alert.document.count/observability/rule/findBackfill", + "alerting:slo.rules.burnRate/observability/rule/get", + "alerting:slo.rules.burnRate/observability/rule/getRuleState", + "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", + "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", + "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/observability/rule/find", + "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/observability/rule/getBackfill", + "alerting:slo.rules.burnRate/observability/rule/findBackfill", + "alerting:slo.rules.burnRate/alerts/rule/get", + "alerting:slo.rules.burnRate/alerts/rule/getRuleState", + "alerting:slo.rules.burnRate/alerts/rule/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/rule/getExecutionLog", + "alerting:slo.rules.burnRate/alerts/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/alerts/rule/find", + "alerting:slo.rules.burnRate/alerts/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/alerts/rule/getBackfill", + "alerting:slo.rules.burnRate/alerts/rule/findBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/get", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", + "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/observability/rule/find", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", + "alerting:.es-query/observability/rule/get", + "alerting:.es-query/observability/rule/getRuleState", + "alerting:.es-query/observability/rule/getAlertSummary", + "alerting:.es-query/observability/rule/getExecutionLog", + "alerting:.es-query/observability/rule/getActionErrorLog", + "alerting:.es-query/observability/rule/find", + "alerting:.es-query/observability/rule/getRuleExecutionKPI", + "alerting:.es-query/observability/rule/getBackfill", + "alerting:.es-query/observability/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", "alerting:apm.error_rate/observability/alert/get", "alerting:apm.error_rate/observability/alert/find", "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.error_rate/observability/alert/getAlertSummary", + "alerting:apm.error_rate/alerts/alert/get", + "alerting:apm.error_rate/alerts/alert/find", + "alerting:apm.error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/alerts/alert/getAlertSummary", "alerting:apm.transaction_error_rate/observability/alert/get", "alerting:apm.transaction_error_rate/observability/alert/find", "alerting:apm.transaction_error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_error_rate/observability/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/alert/get", + "alerting:apm.transaction_error_rate/alerts/alert/find", + "alerting:apm.transaction_error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/alerts/alert/getAlertSummary", "alerting:apm.transaction_duration/observability/alert/get", "alerting:apm.transaction_duration/observability/alert/find", "alerting:apm.transaction_duration/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_duration/observability/alert/getAlertSummary", + "alerting:apm.transaction_duration/alerts/alert/get", + "alerting:apm.transaction_duration/alerts/alert/find", + "alerting:apm.transaction_duration/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/alerts/alert/getAlertSummary", "alerting:apm.anomaly/observability/alert/get", "alerting:apm.anomaly/observability/alert/find", "alerting:apm.anomaly/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.anomaly/observability/alert/getAlertSummary", + "alerting:apm.anomaly/alerts/alert/get", + "alerting:apm.anomaly/alerts/alert/find", + "alerting:apm.anomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/alerts/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.tls/observability/alert/get", "alerting:xpack.synthetics.alerts.tls/observability/alert/find", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/get", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/find", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAlertSummary", + "alerting:metrics.alert.threshold/observability/alert/get", + "alerting:metrics.alert.threshold/observability/alert/find", + "alerting:metrics.alert.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/alert/get", + "alerting:metrics.alert.inventory.threshold/observability/alert/find", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/alert/get", + "alerting:xpack.uptime.alerts.tls/observability/alert/find", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/alert/get", + "alerting:xpack.uptime.alerts.tls/alerts/alert/find", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAlertSummary", + "alerting:logs.alert.document.count/observability/alert/get", + "alerting:logs.alert.document.count/observability/alert/find", + "alerting:logs.alert.document.count/observability/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/observability/alert/getAlertSummary", + "alerting:slo.rules.burnRate/observability/alert/get", + "alerting:slo.rules.burnRate/observability/alert/find", + "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/alert/get", + "alerting:slo.rules.burnRate/alerts/alert/find", + "alerting:slo.rules.burnRate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/alerts/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/alert/get", + "alerting:observability.rules.custom_threshold/observability/alert/find", + "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", + "alerting:.es-query/observability/alert/get", + "alerting:.es-query/observability/alert/find", + "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/observability/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", ], "read": Array [ "login:", @@ -6956,6 +13386,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:metrics.alert.threshold/infrastructure/rule/getRuleExecutionKPI", "alerting:metrics.alert.threshold/infrastructure/rule/getBackfill", "alerting:metrics.alert.threshold/infrastructure/rule/findBackfill", + "alerting:metrics.alert.threshold/alerts/rule/get", + "alerting:metrics.alert.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/alerts/rule/find", + "alerting:metrics.alert.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.threshold/alerts/rule/findBackfill", "alerting:metrics.alert.inventory.threshold/infrastructure/rule/get", "alerting:metrics.alert.inventory.threshold/infrastructure/rule/getRuleState", "alerting:metrics.alert.inventory.threshold/infrastructure/rule/getAlertSummary", @@ -6965,6 +13404,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:metrics.alert.inventory.threshold/infrastructure/rule/getRuleExecutionKPI", "alerting:metrics.alert.inventory.threshold/infrastructure/rule/getBackfill", "alerting:metrics.alert.inventory.threshold/infrastructure/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/get", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/find", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/findBackfill", "alerting:.es-query/infrastructure/rule/get", "alerting:.es-query/infrastructure/rule/getRuleState", "alerting:.es-query/infrastructure/rule/getAlertSummary", @@ -6974,6 +13422,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:.es-query/infrastructure/rule/getRuleExecutionKPI", "alerting:.es-query/infrastructure/rule/getBackfill", "alerting:.es-query/infrastructure/rule/findBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", "alerting:observability.rules.custom_threshold/infrastructure/rule/get", "alerting:observability.rules.custom_threshold/infrastructure/rule/getRuleState", "alerting:observability.rules.custom_threshold/infrastructure/rule/getAlertSummary", @@ -6983,6 +13440,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:observability.rules.custom_threshold/infrastructure/rule/getRuleExecutionKPI", "alerting:observability.rules.custom_threshold/infrastructure/rule/getBackfill", "alerting:observability.rules.custom_threshold/infrastructure/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/get", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/getRuleState", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/getAlertSummary", @@ -6992,26 +13458,55 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/getRuleExecutionKPI", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/getBackfill", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", "alerting:metrics.alert.threshold/infrastructure/alert/get", "alerting:metrics.alert.threshold/infrastructure/alert/find", "alerting:metrics.alert.threshold/infrastructure/alert/getAuthorizedAlertsIndices", "alerting:metrics.alert.threshold/infrastructure/alert/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/alert/get", + "alerting:metrics.alert.threshold/alerts/alert/find", + "alerting:metrics.alert.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/alerts/alert/getAlertSummary", "alerting:metrics.alert.inventory.threshold/infrastructure/alert/get", "alerting:metrics.alert.inventory.threshold/infrastructure/alert/find", "alerting:metrics.alert.inventory.threshold/infrastructure/alert/getAuthorizedAlertsIndices", "alerting:metrics.alert.inventory.threshold/infrastructure/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/alert/get", + "alerting:metrics.alert.inventory.threshold/alerts/alert/find", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAlertSummary", "alerting:.es-query/infrastructure/alert/get", "alerting:.es-query/infrastructure/alert/find", "alerting:.es-query/infrastructure/alert/getAuthorizedAlertsIndices", "alerting:.es-query/infrastructure/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", "alerting:observability.rules.custom_threshold/infrastructure/alert/get", "alerting:observability.rules.custom_threshold/infrastructure/alert/find", "alerting:observability.rules.custom_threshold/infrastructure/alert/getAuthorizedAlertsIndices", "alerting:observability.rules.custom_threshold/infrastructure/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/alert/get", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/alert/find", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/alert/getAuthorizedAlertsIndices", "alerting:xpack.ml.anomaly_detection_alert/infrastructure/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", "app:logs", "app:observability-logs-explorer", "ui:catalogue/infralogging", @@ -7033,6 +13528,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:logs.alert.document.count/logs/rule/getRuleExecutionKPI", "alerting:logs.alert.document.count/logs/rule/getBackfill", "alerting:logs.alert.document.count/logs/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", "alerting:.es-query/logs/rule/get", "alerting:.es-query/logs/rule/getRuleState", "alerting:.es-query/logs/rule/getAlertSummary", @@ -7064,6 +13568,10 @@ export default function ({ getService }: FtrProviderContext) { "alerting:logs.alert.document.count/logs/alert/find", "alerting:logs.alert.document.count/logs/alert/getAuthorizedAlertsIndices", "alerting:logs.alert.document.count/logs/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", "alerting:.es-query/logs/alert/get", "alerting:.es-query/logs/alert/find", "alerting:.es-query/logs/alert/getAuthorizedAlertsIndices", @@ -7080,51 +13588,6 @@ export default function ({ getService }: FtrProviderContext) { "ui:catalogue/observability", "ui:navLinks/observability", "ui:observability/read", - "alerting:slo.rules.burnRate/observability/rule/get", - "alerting:slo.rules.burnRate/observability/rule/getRuleState", - "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", - "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", - "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", - "alerting:slo.rules.burnRate/observability/rule/find", - "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", - "alerting:slo.rules.burnRate/observability/rule/getBackfill", - "alerting:slo.rules.burnRate/observability/rule/findBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/get", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", - "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", - "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", - "alerting:observability.rules.custom_threshold/observability/rule/find", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", - "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", - "alerting:.es-query/observability/rule/get", - "alerting:.es-query/observability/rule/getRuleState", - "alerting:.es-query/observability/rule/getAlertSummary", - "alerting:.es-query/observability/rule/getExecutionLog", - "alerting:.es-query/observability/rule/getActionErrorLog", - "alerting:.es-query/observability/rule/find", - "alerting:.es-query/observability/rule/getRuleExecutionKPI", - "alerting:.es-query/observability/rule/getBackfill", - "alerting:.es-query/observability/rule/findBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/get", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", - "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/find", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", - "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", "alerting:apm.error_rate/observability/rule/get", "alerting:apm.error_rate/observability/rule/getRuleState", "alerting:apm.error_rate/observability/rule/getAlertSummary", @@ -7134,6 +13597,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.error_rate/observability/rule/getRuleExecutionKPI", "alerting:apm.error_rate/observability/rule/getBackfill", "alerting:apm.error_rate/observability/rule/findBackfill", + "alerting:apm.error_rate/alerts/rule/get", + "alerting:apm.error_rate/alerts/rule/getRuleState", + "alerting:apm.error_rate/alerts/rule/getAlertSummary", + "alerting:apm.error_rate/alerts/rule/getExecutionLog", + "alerting:apm.error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.error_rate/alerts/rule/find", + "alerting:apm.error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.error_rate/alerts/rule/getBackfill", + "alerting:apm.error_rate/alerts/rule/findBackfill", "alerting:apm.transaction_error_rate/observability/rule/get", "alerting:apm.transaction_error_rate/observability/rule/getRuleState", "alerting:apm.transaction_error_rate/observability/rule/getAlertSummary", @@ -7143,6 +13615,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_error_rate/observability/rule/getRuleExecutionKPI", "alerting:apm.transaction_error_rate/observability/rule/getBackfill", "alerting:apm.transaction_error_rate/observability/rule/findBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/get", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleState", + "alerting:apm.transaction_error_rate/alerts/rule/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/rule/getExecutionLog", + "alerting:apm.transaction_error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_error_rate/alerts/rule/find", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_error_rate/alerts/rule/getBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/findBackfill", "alerting:apm.transaction_duration/observability/rule/get", "alerting:apm.transaction_duration/observability/rule/getRuleState", "alerting:apm.transaction_duration/observability/rule/getAlertSummary", @@ -7152,6 +13633,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_duration/observability/rule/getRuleExecutionKPI", "alerting:apm.transaction_duration/observability/rule/getBackfill", "alerting:apm.transaction_duration/observability/rule/findBackfill", + "alerting:apm.transaction_duration/alerts/rule/get", + "alerting:apm.transaction_duration/alerts/rule/getRuleState", + "alerting:apm.transaction_duration/alerts/rule/getAlertSummary", + "alerting:apm.transaction_duration/alerts/rule/getExecutionLog", + "alerting:apm.transaction_duration/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_duration/alerts/rule/find", + "alerting:apm.transaction_duration/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_duration/alerts/rule/getBackfill", + "alerting:apm.transaction_duration/alerts/rule/findBackfill", "alerting:apm.anomaly/observability/rule/get", "alerting:apm.anomaly/observability/rule/getRuleState", "alerting:apm.anomaly/observability/rule/getAlertSummary", @@ -7161,6 +13651,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.anomaly/observability/rule/getRuleExecutionKPI", "alerting:apm.anomaly/observability/rule/getBackfill", "alerting:apm.anomaly/observability/rule/findBackfill", + "alerting:apm.anomaly/alerts/rule/get", + "alerting:apm.anomaly/alerts/rule/getRuleState", + "alerting:apm.anomaly/alerts/rule/getAlertSummary", + "alerting:apm.anomaly/alerts/rule/getExecutionLog", + "alerting:apm.anomaly/alerts/rule/getActionErrorLog", + "alerting:apm.anomaly/alerts/rule/find", + "alerting:apm.anomaly/alerts/rule/getRuleExecutionKPI", + "alerting:apm.anomaly/alerts/rule/getBackfill", + "alerting:apm.anomaly/alerts/rule/findBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getAlertSummary", @@ -7170,6 +13669,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/findBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/get", "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.tls/observability/rule/getAlertSummary", @@ -7179,50 +13687,271 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleExecutionKPI", "alerting:xpack.synthetics.alerts.tls/observability/rule/getBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/findBackfill", - "alerting:slo.rules.burnRate/observability/alert/get", - "alerting:slo.rules.burnRate/observability/alert/find", - "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", - "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/alert/get", - "alerting:observability.rules.custom_threshold/observability/alert/find", - "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", - "alerting:.es-query/observability/alert/get", - "alerting:.es-query/observability/alert/find", - "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", - "alerting:.es-query/observability/alert/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/alert/get", - "alerting:metrics.alert.inventory.threshold/observability/alert/find", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/get", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/find", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/findBackfill", + "alerting:metrics.alert.threshold/observability/rule/get", + "alerting:metrics.alert.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/observability/rule/find", + "alerting:metrics.alert.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/get", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/find", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/get", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/find", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/get", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/find", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/findBackfill", + "alerting:logs.alert.document.count/observability/rule/get", + "alerting:logs.alert.document.count/observability/rule/getRuleState", + "alerting:logs.alert.document.count/observability/rule/getAlertSummary", + "alerting:logs.alert.document.count/observability/rule/getExecutionLog", + "alerting:logs.alert.document.count/observability/rule/getActionErrorLog", + "alerting:logs.alert.document.count/observability/rule/find", + "alerting:logs.alert.document.count/observability/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/observability/rule/getBackfill", + "alerting:logs.alert.document.count/observability/rule/findBackfill", + "alerting:slo.rules.burnRate/observability/rule/get", + "alerting:slo.rules.burnRate/observability/rule/getRuleState", + "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", + "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", + "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/observability/rule/find", + "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/observability/rule/getBackfill", + "alerting:slo.rules.burnRate/observability/rule/findBackfill", + "alerting:slo.rules.burnRate/alerts/rule/get", + "alerting:slo.rules.burnRate/alerts/rule/getRuleState", + "alerting:slo.rules.burnRate/alerts/rule/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/rule/getExecutionLog", + "alerting:slo.rules.burnRate/alerts/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/alerts/rule/find", + "alerting:slo.rules.burnRate/alerts/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/alerts/rule/getBackfill", + "alerting:slo.rules.burnRate/alerts/rule/findBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/get", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", + "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/observability/rule/find", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", + "alerting:.es-query/observability/rule/get", + "alerting:.es-query/observability/rule/getRuleState", + "alerting:.es-query/observability/rule/getAlertSummary", + "alerting:.es-query/observability/rule/getExecutionLog", + "alerting:.es-query/observability/rule/getActionErrorLog", + "alerting:.es-query/observability/rule/find", + "alerting:.es-query/observability/rule/getRuleExecutionKPI", + "alerting:.es-query/observability/rule/getBackfill", + "alerting:.es-query/observability/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", "alerting:apm.error_rate/observability/alert/get", "alerting:apm.error_rate/observability/alert/find", "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.error_rate/observability/alert/getAlertSummary", + "alerting:apm.error_rate/alerts/alert/get", + "alerting:apm.error_rate/alerts/alert/find", + "alerting:apm.error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/alerts/alert/getAlertSummary", "alerting:apm.transaction_error_rate/observability/alert/get", "alerting:apm.transaction_error_rate/observability/alert/find", "alerting:apm.transaction_error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_error_rate/observability/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/alert/get", + "alerting:apm.transaction_error_rate/alerts/alert/find", + "alerting:apm.transaction_error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/alerts/alert/getAlertSummary", "alerting:apm.transaction_duration/observability/alert/get", "alerting:apm.transaction_duration/observability/alert/find", "alerting:apm.transaction_duration/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_duration/observability/alert/getAlertSummary", + "alerting:apm.transaction_duration/alerts/alert/get", + "alerting:apm.transaction_duration/alerts/alert/find", + "alerting:apm.transaction_duration/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/alerts/alert/getAlertSummary", "alerting:apm.anomaly/observability/alert/get", "alerting:apm.anomaly/observability/alert/find", "alerting:apm.anomaly/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.anomaly/observability/alert/getAlertSummary", + "alerting:apm.anomaly/alerts/alert/get", + "alerting:apm.anomaly/alerts/alert/find", + "alerting:apm.anomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/alerts/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.tls/observability/alert/get", "alerting:xpack.synthetics.alerts.tls/observability/alert/find", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/get", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/find", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAlertSummary", + "alerting:metrics.alert.threshold/observability/alert/get", + "alerting:metrics.alert.threshold/observability/alert/find", + "alerting:metrics.alert.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/alert/get", + "alerting:metrics.alert.inventory.threshold/observability/alert/find", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/alert/get", + "alerting:xpack.uptime.alerts.tls/observability/alert/find", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/alert/get", + "alerting:xpack.uptime.alerts.tls/alerts/alert/find", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAlertSummary", + "alerting:logs.alert.document.count/observability/alert/get", + "alerting:logs.alert.document.count/observability/alert/find", + "alerting:logs.alert.document.count/observability/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/observability/alert/getAlertSummary", + "alerting:slo.rules.burnRate/observability/alert/get", + "alerting:slo.rules.burnRate/observability/alert/find", + "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/alert/get", + "alerting:slo.rules.burnRate/alerts/alert/find", + "alerting:slo.rules.burnRate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/alerts/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/alert/get", + "alerting:observability.rules.custom_threshold/observability/alert/find", + "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", + "alerting:.es-query/observability/alert/get", + "alerting:.es-query/observability/alert/find", + "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/observability/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", ], }, "reporting": Object { @@ -7436,155 +14165,48 @@ export default function ({ getService }: FtrProviderContext) { "alerting:slo.rules.burnRate/slo/rule/runSoon", "alerting:slo.rules.burnRate/slo/rule/scheduleBackfill", "alerting:slo.rules.burnRate/slo/rule/deleteBackfill", + "alerting:slo.rules.burnRate/alerts/rule/get", + "alerting:slo.rules.burnRate/alerts/rule/getRuleState", + "alerting:slo.rules.burnRate/alerts/rule/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/rule/getExecutionLog", + "alerting:slo.rules.burnRate/alerts/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/alerts/rule/find", + "alerting:slo.rules.burnRate/alerts/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/alerts/rule/getBackfill", + "alerting:slo.rules.burnRate/alerts/rule/findBackfill", + "alerting:slo.rules.burnRate/alerts/rule/create", + "alerting:slo.rules.burnRate/alerts/rule/delete", + "alerting:slo.rules.burnRate/alerts/rule/update", + "alerting:slo.rules.burnRate/alerts/rule/updateApiKey", + "alerting:slo.rules.burnRate/alerts/rule/enable", + "alerting:slo.rules.burnRate/alerts/rule/disable", + "alerting:slo.rules.burnRate/alerts/rule/muteAll", + "alerting:slo.rules.burnRate/alerts/rule/unmuteAll", + "alerting:slo.rules.burnRate/alerts/rule/muteAlert", + "alerting:slo.rules.burnRate/alerts/rule/unmuteAlert", + "alerting:slo.rules.burnRate/alerts/rule/snooze", + "alerting:slo.rules.burnRate/alerts/rule/bulkEdit", + "alerting:slo.rules.burnRate/alerts/rule/bulkDelete", + "alerting:slo.rules.burnRate/alerts/rule/bulkEnable", + "alerting:slo.rules.burnRate/alerts/rule/bulkDisable", + "alerting:slo.rules.burnRate/alerts/rule/unsnooze", + "alerting:slo.rules.burnRate/alerts/rule/runSoon", + "alerting:slo.rules.burnRate/alerts/rule/scheduleBackfill", + "alerting:slo.rules.burnRate/alerts/rule/deleteBackfill", "alerting:slo.rules.burnRate/slo/alert/get", "alerting:slo.rules.burnRate/slo/alert/find", "alerting:slo.rules.burnRate/slo/alert/getAuthorizedAlertsIndices", "alerting:slo.rules.burnRate/slo/alert/getAlertSummary", "alerting:slo.rules.burnRate/slo/alert/update", + "alerting:slo.rules.burnRate/alerts/alert/get", + "alerting:slo.rules.burnRate/alerts/alert/find", + "alerting:slo.rules.burnRate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/alerts/alert/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/alert/update", "app:observability", "ui:navLinks/observability", "ui:observability/read", "ui:observability/write", - "alerting:slo.rules.burnRate/observability/rule/get", - "alerting:slo.rules.burnRate/observability/rule/getRuleState", - "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", - "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", - "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", - "alerting:slo.rules.burnRate/observability/rule/find", - "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", - "alerting:slo.rules.burnRate/observability/rule/getBackfill", - "alerting:slo.rules.burnRate/observability/rule/findBackfill", - "alerting:slo.rules.burnRate/observability/rule/create", - "alerting:slo.rules.burnRate/observability/rule/delete", - "alerting:slo.rules.burnRate/observability/rule/update", - "alerting:slo.rules.burnRate/observability/rule/updateApiKey", - "alerting:slo.rules.burnRate/observability/rule/enable", - "alerting:slo.rules.burnRate/observability/rule/disable", - "alerting:slo.rules.burnRate/observability/rule/muteAll", - "alerting:slo.rules.burnRate/observability/rule/unmuteAll", - "alerting:slo.rules.burnRate/observability/rule/muteAlert", - "alerting:slo.rules.burnRate/observability/rule/unmuteAlert", - "alerting:slo.rules.burnRate/observability/rule/snooze", - "alerting:slo.rules.burnRate/observability/rule/bulkEdit", - "alerting:slo.rules.burnRate/observability/rule/bulkDelete", - "alerting:slo.rules.burnRate/observability/rule/bulkEnable", - "alerting:slo.rules.burnRate/observability/rule/bulkDisable", - "alerting:slo.rules.burnRate/observability/rule/unsnooze", - "alerting:slo.rules.burnRate/observability/rule/runSoon", - "alerting:slo.rules.burnRate/observability/rule/scheduleBackfill", - "alerting:slo.rules.burnRate/observability/rule/deleteBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/get", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", - "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", - "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", - "alerting:observability.rules.custom_threshold/observability/rule/find", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", - "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/create", - "alerting:observability.rules.custom_threshold/observability/rule/delete", - "alerting:observability.rules.custom_threshold/observability/rule/update", - "alerting:observability.rules.custom_threshold/observability/rule/updateApiKey", - "alerting:observability.rules.custom_threshold/observability/rule/enable", - "alerting:observability.rules.custom_threshold/observability/rule/disable", - "alerting:observability.rules.custom_threshold/observability/rule/muteAll", - "alerting:observability.rules.custom_threshold/observability/rule/unmuteAll", - "alerting:observability.rules.custom_threshold/observability/rule/muteAlert", - "alerting:observability.rules.custom_threshold/observability/rule/unmuteAlert", - "alerting:observability.rules.custom_threshold/observability/rule/snooze", - "alerting:observability.rules.custom_threshold/observability/rule/bulkEdit", - "alerting:observability.rules.custom_threshold/observability/rule/bulkDelete", - "alerting:observability.rules.custom_threshold/observability/rule/bulkEnable", - "alerting:observability.rules.custom_threshold/observability/rule/bulkDisable", - "alerting:observability.rules.custom_threshold/observability/rule/unsnooze", - "alerting:observability.rules.custom_threshold/observability/rule/runSoon", - "alerting:observability.rules.custom_threshold/observability/rule/scheduleBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/deleteBackfill", - "alerting:.es-query/observability/rule/get", - "alerting:.es-query/observability/rule/getRuleState", - "alerting:.es-query/observability/rule/getAlertSummary", - "alerting:.es-query/observability/rule/getExecutionLog", - "alerting:.es-query/observability/rule/getActionErrorLog", - "alerting:.es-query/observability/rule/find", - "alerting:.es-query/observability/rule/getRuleExecutionKPI", - "alerting:.es-query/observability/rule/getBackfill", - "alerting:.es-query/observability/rule/findBackfill", - "alerting:.es-query/observability/rule/create", - "alerting:.es-query/observability/rule/delete", - "alerting:.es-query/observability/rule/update", - "alerting:.es-query/observability/rule/updateApiKey", - "alerting:.es-query/observability/rule/enable", - "alerting:.es-query/observability/rule/disable", - "alerting:.es-query/observability/rule/muteAll", - "alerting:.es-query/observability/rule/unmuteAll", - "alerting:.es-query/observability/rule/muteAlert", - "alerting:.es-query/observability/rule/unmuteAlert", - "alerting:.es-query/observability/rule/snooze", - "alerting:.es-query/observability/rule/bulkEdit", - "alerting:.es-query/observability/rule/bulkDelete", - "alerting:.es-query/observability/rule/bulkEnable", - "alerting:.es-query/observability/rule/bulkDisable", - "alerting:.es-query/observability/rule/unsnooze", - "alerting:.es-query/observability/rule/runSoon", - "alerting:.es-query/observability/rule/scheduleBackfill", - "alerting:.es-query/observability/rule/deleteBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/create", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/delete", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/update", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/updateApiKey", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/enable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/disable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAll", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAll", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAlert", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAlert", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/snooze", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEdit", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDelete", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEnable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDisable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unsnooze", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/runSoon", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/scheduleBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/deleteBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/get", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", - "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/find", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", - "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/create", - "alerting:metrics.alert.inventory.threshold/observability/rule/delete", - "alerting:metrics.alert.inventory.threshold/observability/rule/update", - "alerting:metrics.alert.inventory.threshold/observability/rule/updateApiKey", - "alerting:metrics.alert.inventory.threshold/observability/rule/enable", - "alerting:metrics.alert.inventory.threshold/observability/rule/disable", - "alerting:metrics.alert.inventory.threshold/observability/rule/muteAll", - "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAll", - "alerting:metrics.alert.inventory.threshold/observability/rule/muteAlert", - "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAlert", - "alerting:metrics.alert.inventory.threshold/observability/rule/snooze", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEdit", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDelete", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEnable", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDisable", - "alerting:metrics.alert.inventory.threshold/observability/rule/unsnooze", - "alerting:metrics.alert.inventory.threshold/observability/rule/runSoon", - "alerting:metrics.alert.inventory.threshold/observability/rule/scheduleBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/deleteBackfill", "alerting:apm.error_rate/observability/rule/get", "alerting:apm.error_rate/observability/rule/getRuleState", "alerting:apm.error_rate/observability/rule/getAlertSummary", @@ -7613,6 +14235,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.error_rate/observability/rule/runSoon", "alerting:apm.error_rate/observability/rule/scheduleBackfill", "alerting:apm.error_rate/observability/rule/deleteBackfill", + "alerting:apm.error_rate/alerts/rule/get", + "alerting:apm.error_rate/alerts/rule/getRuleState", + "alerting:apm.error_rate/alerts/rule/getAlertSummary", + "alerting:apm.error_rate/alerts/rule/getExecutionLog", + "alerting:apm.error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.error_rate/alerts/rule/find", + "alerting:apm.error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.error_rate/alerts/rule/getBackfill", + "alerting:apm.error_rate/alerts/rule/findBackfill", + "alerting:apm.error_rate/alerts/rule/create", + "alerting:apm.error_rate/alerts/rule/delete", + "alerting:apm.error_rate/alerts/rule/update", + "alerting:apm.error_rate/alerts/rule/updateApiKey", + "alerting:apm.error_rate/alerts/rule/enable", + "alerting:apm.error_rate/alerts/rule/disable", + "alerting:apm.error_rate/alerts/rule/muteAll", + "alerting:apm.error_rate/alerts/rule/unmuteAll", + "alerting:apm.error_rate/alerts/rule/muteAlert", + "alerting:apm.error_rate/alerts/rule/unmuteAlert", + "alerting:apm.error_rate/alerts/rule/snooze", + "alerting:apm.error_rate/alerts/rule/bulkEdit", + "alerting:apm.error_rate/alerts/rule/bulkDelete", + "alerting:apm.error_rate/alerts/rule/bulkEnable", + "alerting:apm.error_rate/alerts/rule/bulkDisable", + "alerting:apm.error_rate/alerts/rule/unsnooze", + "alerting:apm.error_rate/alerts/rule/runSoon", + "alerting:apm.error_rate/alerts/rule/scheduleBackfill", + "alerting:apm.error_rate/alerts/rule/deleteBackfill", "alerting:apm.transaction_error_rate/observability/rule/get", "alerting:apm.transaction_error_rate/observability/rule/getRuleState", "alerting:apm.transaction_error_rate/observability/rule/getAlertSummary", @@ -7641,6 +14291,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_error_rate/observability/rule/runSoon", "alerting:apm.transaction_error_rate/observability/rule/scheduleBackfill", "alerting:apm.transaction_error_rate/observability/rule/deleteBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/get", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleState", + "alerting:apm.transaction_error_rate/alerts/rule/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/rule/getExecutionLog", + "alerting:apm.transaction_error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_error_rate/alerts/rule/find", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_error_rate/alerts/rule/getBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/findBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/create", + "alerting:apm.transaction_error_rate/alerts/rule/delete", + "alerting:apm.transaction_error_rate/alerts/rule/update", + "alerting:apm.transaction_error_rate/alerts/rule/updateApiKey", + "alerting:apm.transaction_error_rate/alerts/rule/enable", + "alerting:apm.transaction_error_rate/alerts/rule/disable", + "alerting:apm.transaction_error_rate/alerts/rule/muteAll", + "alerting:apm.transaction_error_rate/alerts/rule/unmuteAll", + "alerting:apm.transaction_error_rate/alerts/rule/muteAlert", + "alerting:apm.transaction_error_rate/alerts/rule/unmuteAlert", + "alerting:apm.transaction_error_rate/alerts/rule/snooze", + "alerting:apm.transaction_error_rate/alerts/rule/bulkEdit", + "alerting:apm.transaction_error_rate/alerts/rule/bulkDelete", + "alerting:apm.transaction_error_rate/alerts/rule/bulkEnable", + "alerting:apm.transaction_error_rate/alerts/rule/bulkDisable", + "alerting:apm.transaction_error_rate/alerts/rule/unsnooze", + "alerting:apm.transaction_error_rate/alerts/rule/runSoon", + "alerting:apm.transaction_error_rate/alerts/rule/scheduleBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/deleteBackfill", "alerting:apm.transaction_duration/observability/rule/get", "alerting:apm.transaction_duration/observability/rule/getRuleState", "alerting:apm.transaction_duration/observability/rule/getAlertSummary", @@ -7669,6 +14347,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_duration/observability/rule/runSoon", "alerting:apm.transaction_duration/observability/rule/scheduleBackfill", "alerting:apm.transaction_duration/observability/rule/deleteBackfill", + "alerting:apm.transaction_duration/alerts/rule/get", + "alerting:apm.transaction_duration/alerts/rule/getRuleState", + "alerting:apm.transaction_duration/alerts/rule/getAlertSummary", + "alerting:apm.transaction_duration/alerts/rule/getExecutionLog", + "alerting:apm.transaction_duration/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_duration/alerts/rule/find", + "alerting:apm.transaction_duration/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_duration/alerts/rule/getBackfill", + "alerting:apm.transaction_duration/alerts/rule/findBackfill", + "alerting:apm.transaction_duration/alerts/rule/create", + "alerting:apm.transaction_duration/alerts/rule/delete", + "alerting:apm.transaction_duration/alerts/rule/update", + "alerting:apm.transaction_duration/alerts/rule/updateApiKey", + "alerting:apm.transaction_duration/alerts/rule/enable", + "alerting:apm.transaction_duration/alerts/rule/disable", + "alerting:apm.transaction_duration/alerts/rule/muteAll", + "alerting:apm.transaction_duration/alerts/rule/unmuteAll", + "alerting:apm.transaction_duration/alerts/rule/muteAlert", + "alerting:apm.transaction_duration/alerts/rule/unmuteAlert", + "alerting:apm.transaction_duration/alerts/rule/snooze", + "alerting:apm.transaction_duration/alerts/rule/bulkEdit", + "alerting:apm.transaction_duration/alerts/rule/bulkDelete", + "alerting:apm.transaction_duration/alerts/rule/bulkEnable", + "alerting:apm.transaction_duration/alerts/rule/bulkDisable", + "alerting:apm.transaction_duration/alerts/rule/unsnooze", + "alerting:apm.transaction_duration/alerts/rule/runSoon", + "alerting:apm.transaction_duration/alerts/rule/scheduleBackfill", + "alerting:apm.transaction_duration/alerts/rule/deleteBackfill", "alerting:apm.anomaly/observability/rule/get", "alerting:apm.anomaly/observability/rule/getRuleState", "alerting:apm.anomaly/observability/rule/getAlertSummary", @@ -7697,6 +14403,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.anomaly/observability/rule/runSoon", "alerting:apm.anomaly/observability/rule/scheduleBackfill", "alerting:apm.anomaly/observability/rule/deleteBackfill", + "alerting:apm.anomaly/alerts/rule/get", + "alerting:apm.anomaly/alerts/rule/getRuleState", + "alerting:apm.anomaly/alerts/rule/getAlertSummary", + "alerting:apm.anomaly/alerts/rule/getExecutionLog", + "alerting:apm.anomaly/alerts/rule/getActionErrorLog", + "alerting:apm.anomaly/alerts/rule/find", + "alerting:apm.anomaly/alerts/rule/getRuleExecutionKPI", + "alerting:apm.anomaly/alerts/rule/getBackfill", + "alerting:apm.anomaly/alerts/rule/findBackfill", + "alerting:apm.anomaly/alerts/rule/create", + "alerting:apm.anomaly/alerts/rule/delete", + "alerting:apm.anomaly/alerts/rule/update", + "alerting:apm.anomaly/alerts/rule/updateApiKey", + "alerting:apm.anomaly/alerts/rule/enable", + "alerting:apm.anomaly/alerts/rule/disable", + "alerting:apm.anomaly/alerts/rule/muteAll", + "alerting:apm.anomaly/alerts/rule/unmuteAll", + "alerting:apm.anomaly/alerts/rule/muteAlert", + "alerting:apm.anomaly/alerts/rule/unmuteAlert", + "alerting:apm.anomaly/alerts/rule/snooze", + "alerting:apm.anomaly/alerts/rule/bulkEdit", + "alerting:apm.anomaly/alerts/rule/bulkDelete", + "alerting:apm.anomaly/alerts/rule/bulkEnable", + "alerting:apm.anomaly/alerts/rule/bulkDisable", + "alerting:apm.anomaly/alerts/rule/unsnooze", + "alerting:apm.anomaly/alerts/rule/runSoon", + "alerting:apm.anomaly/alerts/rule/scheduleBackfill", + "alerting:apm.anomaly/alerts/rule/deleteBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getAlertSummary", @@ -7725,6 +14459,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/runSoon", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/scheduleBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/deleteBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/create", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/delete", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/update", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/updateApiKey", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/enable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/disable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/muteAll", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unmuteAll", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/muteAlert", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unmuteAlert", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/snooze", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkEdit", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkDelete", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkEnable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unsnooze", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/runSoon", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/deleteBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/get", "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.tls/observability/rule/getAlertSummary", @@ -7753,61 +14515,787 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/rule/runSoon", "alerting:xpack.synthetics.alerts.tls/observability/rule/scheduleBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/deleteBackfill", - "alerting:slo.rules.burnRate/observability/alert/get", - "alerting:slo.rules.burnRate/observability/alert/find", - "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", - "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", - "alerting:slo.rules.burnRate/observability/alert/update", - "alerting:observability.rules.custom_threshold/observability/alert/get", - "alerting:observability.rules.custom_threshold/observability/alert/find", - "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/alert/update", - "alerting:.es-query/observability/alert/get", - "alerting:.es-query/observability/alert/find", - "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", - "alerting:.es-query/observability/alert/getAlertSummary", - "alerting:.es-query/observability/alert/update", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/update", - "alerting:metrics.alert.inventory.threshold/observability/alert/get", - "alerting:metrics.alert.inventory.threshold/observability/alert/find", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/alert/update", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/get", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/find", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/create", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/delete", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/update", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/updateApiKey", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/enable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/disable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/muteAll", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unmuteAll", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/muteAlert", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unmuteAlert", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/snooze", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkEdit", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkDelete", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkEnable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unsnooze", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/runSoon", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/deleteBackfill", + "alerting:metrics.alert.threshold/observability/rule/get", + "alerting:metrics.alert.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/observability/rule/find", + "alerting:metrics.alert.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.threshold/observability/rule/create", + "alerting:metrics.alert.threshold/observability/rule/delete", + "alerting:metrics.alert.threshold/observability/rule/update", + "alerting:metrics.alert.threshold/observability/rule/updateApiKey", + "alerting:metrics.alert.threshold/observability/rule/enable", + "alerting:metrics.alert.threshold/observability/rule/disable", + "alerting:metrics.alert.threshold/observability/rule/muteAll", + "alerting:metrics.alert.threshold/observability/rule/unmuteAll", + "alerting:metrics.alert.threshold/observability/rule/muteAlert", + "alerting:metrics.alert.threshold/observability/rule/unmuteAlert", + "alerting:metrics.alert.threshold/observability/rule/snooze", + "alerting:metrics.alert.threshold/observability/rule/bulkEdit", + "alerting:metrics.alert.threshold/observability/rule/bulkDelete", + "alerting:metrics.alert.threshold/observability/rule/bulkEnable", + "alerting:metrics.alert.threshold/observability/rule/bulkDisable", + "alerting:metrics.alert.threshold/observability/rule/unsnooze", + "alerting:metrics.alert.threshold/observability/rule/runSoon", + "alerting:metrics.alert.threshold/observability/rule/scheduleBackfill", + "alerting:metrics.alert.threshold/observability/rule/deleteBackfill", + "alerting:metrics.alert.threshold/alerts/rule/get", + "alerting:metrics.alert.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/alerts/rule/find", + "alerting:metrics.alert.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.threshold/alerts/rule/create", + "alerting:metrics.alert.threshold/alerts/rule/delete", + "alerting:metrics.alert.threshold/alerts/rule/update", + "alerting:metrics.alert.threshold/alerts/rule/updateApiKey", + "alerting:metrics.alert.threshold/alerts/rule/enable", + "alerting:metrics.alert.threshold/alerts/rule/disable", + "alerting:metrics.alert.threshold/alerts/rule/muteAll", + "alerting:metrics.alert.threshold/alerts/rule/unmuteAll", + "alerting:metrics.alert.threshold/alerts/rule/muteAlert", + "alerting:metrics.alert.threshold/alerts/rule/unmuteAlert", + "alerting:metrics.alert.threshold/alerts/rule/snooze", + "alerting:metrics.alert.threshold/alerts/rule/bulkEdit", + "alerting:metrics.alert.threshold/alerts/rule/bulkDelete", + "alerting:metrics.alert.threshold/alerts/rule/bulkEnable", + "alerting:metrics.alert.threshold/alerts/rule/bulkDisable", + "alerting:metrics.alert.threshold/alerts/rule/unsnooze", + "alerting:metrics.alert.threshold/alerts/rule/runSoon", + "alerting:metrics.alert.threshold/alerts/rule/scheduleBackfill", + "alerting:metrics.alert.threshold/alerts/rule/deleteBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/get", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/find", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/create", + "alerting:metrics.alert.inventory.threshold/observability/rule/delete", + "alerting:metrics.alert.inventory.threshold/observability/rule/update", + "alerting:metrics.alert.inventory.threshold/observability/rule/updateApiKey", + "alerting:metrics.alert.inventory.threshold/observability/rule/enable", + "alerting:metrics.alert.inventory.threshold/observability/rule/disable", + "alerting:metrics.alert.inventory.threshold/observability/rule/muteAll", + "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAll", + "alerting:metrics.alert.inventory.threshold/observability/rule/muteAlert", + "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAlert", + "alerting:metrics.alert.inventory.threshold/observability/rule/snooze", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEdit", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDelete", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEnable", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDisable", + "alerting:metrics.alert.inventory.threshold/observability/rule/unsnooze", + "alerting:metrics.alert.inventory.threshold/observability/rule/runSoon", + "alerting:metrics.alert.inventory.threshold/observability/rule/scheduleBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/deleteBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/get", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/find", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/create", + "alerting:metrics.alert.inventory.threshold/alerts/rule/delete", + "alerting:metrics.alert.inventory.threshold/alerts/rule/update", + "alerting:metrics.alert.inventory.threshold/alerts/rule/updateApiKey", + "alerting:metrics.alert.inventory.threshold/alerts/rule/enable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/disable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/muteAll", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unmuteAll", + "alerting:metrics.alert.inventory.threshold/alerts/rule/muteAlert", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unmuteAlert", + "alerting:metrics.alert.inventory.threshold/alerts/rule/snooze", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkEdit", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkDelete", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkEnable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkDisable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unsnooze", + "alerting:metrics.alert.inventory.threshold/alerts/rule/runSoon", + "alerting:metrics.alert.inventory.threshold/alerts/rule/scheduleBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/get", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/find", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/create", + "alerting:xpack.uptime.alerts.tls/observability/rule/delete", + "alerting:xpack.uptime.alerts.tls/observability/rule/update", + "alerting:xpack.uptime.alerts.tls/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tls/observability/rule/enable", + "alerting:xpack.uptime.alerts.tls/observability/rule/disable", + "alerting:xpack.uptime.alerts.tls/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.tls/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tls/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.tls/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tls/observability/rule/snooze", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tls/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.tls/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.tls/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/get", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/find", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/create", + "alerting:xpack.uptime.alerts.tls/alerts/rule/delete", + "alerting:xpack.uptime.alerts.tls/alerts/rule/update", + "alerting:xpack.uptime.alerts.tls/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tls/alerts/rule/enable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/disable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tls/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tls/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.tls/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.tls/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/create", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/delete", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/update", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/enable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/disable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/snooze", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/create", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/delete", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/update", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/enable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/disable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/create", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/delete", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/update", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/enable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/disable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/snooze", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/create", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/delete", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/update", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/enable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/disable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/create", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/delete", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/update", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/enable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/disable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/snooze", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/create", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/delete", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/update", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/enable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/disable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/deleteBackfill", + "alerting:logs.alert.document.count/observability/rule/get", + "alerting:logs.alert.document.count/observability/rule/getRuleState", + "alerting:logs.alert.document.count/observability/rule/getAlertSummary", + "alerting:logs.alert.document.count/observability/rule/getExecutionLog", + "alerting:logs.alert.document.count/observability/rule/getActionErrorLog", + "alerting:logs.alert.document.count/observability/rule/find", + "alerting:logs.alert.document.count/observability/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/observability/rule/getBackfill", + "alerting:logs.alert.document.count/observability/rule/findBackfill", + "alerting:logs.alert.document.count/observability/rule/create", + "alerting:logs.alert.document.count/observability/rule/delete", + "alerting:logs.alert.document.count/observability/rule/update", + "alerting:logs.alert.document.count/observability/rule/updateApiKey", + "alerting:logs.alert.document.count/observability/rule/enable", + "alerting:logs.alert.document.count/observability/rule/disable", + "alerting:logs.alert.document.count/observability/rule/muteAll", + "alerting:logs.alert.document.count/observability/rule/unmuteAll", + "alerting:logs.alert.document.count/observability/rule/muteAlert", + "alerting:logs.alert.document.count/observability/rule/unmuteAlert", + "alerting:logs.alert.document.count/observability/rule/snooze", + "alerting:logs.alert.document.count/observability/rule/bulkEdit", + "alerting:logs.alert.document.count/observability/rule/bulkDelete", + "alerting:logs.alert.document.count/observability/rule/bulkEnable", + "alerting:logs.alert.document.count/observability/rule/bulkDisable", + "alerting:logs.alert.document.count/observability/rule/unsnooze", + "alerting:logs.alert.document.count/observability/rule/runSoon", + "alerting:logs.alert.document.count/observability/rule/scheduleBackfill", + "alerting:logs.alert.document.count/observability/rule/deleteBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/create", + "alerting:logs.alert.document.count/alerts/rule/delete", + "alerting:logs.alert.document.count/alerts/rule/update", + "alerting:logs.alert.document.count/alerts/rule/updateApiKey", + "alerting:logs.alert.document.count/alerts/rule/enable", + "alerting:logs.alert.document.count/alerts/rule/disable", + "alerting:logs.alert.document.count/alerts/rule/muteAll", + "alerting:logs.alert.document.count/alerts/rule/unmuteAll", + "alerting:logs.alert.document.count/alerts/rule/muteAlert", + "alerting:logs.alert.document.count/alerts/rule/unmuteAlert", + "alerting:logs.alert.document.count/alerts/rule/snooze", + "alerting:logs.alert.document.count/alerts/rule/bulkEdit", + "alerting:logs.alert.document.count/alerts/rule/bulkDelete", + "alerting:logs.alert.document.count/alerts/rule/bulkEnable", + "alerting:logs.alert.document.count/alerts/rule/bulkDisable", + "alerting:logs.alert.document.count/alerts/rule/unsnooze", + "alerting:logs.alert.document.count/alerts/rule/runSoon", + "alerting:logs.alert.document.count/alerts/rule/scheduleBackfill", + "alerting:logs.alert.document.count/alerts/rule/deleteBackfill", + "alerting:slo.rules.burnRate/observability/rule/get", + "alerting:slo.rules.burnRate/observability/rule/getRuleState", + "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", + "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", + "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/observability/rule/find", + "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/observability/rule/getBackfill", + "alerting:slo.rules.burnRate/observability/rule/findBackfill", + "alerting:slo.rules.burnRate/observability/rule/create", + "alerting:slo.rules.burnRate/observability/rule/delete", + "alerting:slo.rules.burnRate/observability/rule/update", + "alerting:slo.rules.burnRate/observability/rule/updateApiKey", + "alerting:slo.rules.burnRate/observability/rule/enable", + "alerting:slo.rules.burnRate/observability/rule/disable", + "alerting:slo.rules.burnRate/observability/rule/muteAll", + "alerting:slo.rules.burnRate/observability/rule/unmuteAll", + "alerting:slo.rules.burnRate/observability/rule/muteAlert", + "alerting:slo.rules.burnRate/observability/rule/unmuteAlert", + "alerting:slo.rules.burnRate/observability/rule/snooze", + "alerting:slo.rules.burnRate/observability/rule/bulkEdit", + "alerting:slo.rules.burnRate/observability/rule/bulkDelete", + "alerting:slo.rules.burnRate/observability/rule/bulkEnable", + "alerting:slo.rules.burnRate/observability/rule/bulkDisable", + "alerting:slo.rules.burnRate/observability/rule/unsnooze", + "alerting:slo.rules.burnRate/observability/rule/runSoon", + "alerting:slo.rules.burnRate/observability/rule/scheduleBackfill", + "alerting:slo.rules.burnRate/observability/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/get", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", + "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/observability/rule/find", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/create", + "alerting:observability.rules.custom_threshold/observability/rule/delete", + "alerting:observability.rules.custom_threshold/observability/rule/update", + "alerting:observability.rules.custom_threshold/observability/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/observability/rule/enable", + "alerting:observability.rules.custom_threshold/observability/rule/disable", + "alerting:observability.rules.custom_threshold/observability/rule/muteAll", + "alerting:observability.rules.custom_threshold/observability/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/observability/rule/muteAlert", + "alerting:observability.rules.custom_threshold/observability/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/observability/rule/snooze", + "alerting:observability.rules.custom_threshold/observability/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/observability/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/observability/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/observability/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/observability/rule/unsnooze", + "alerting:observability.rules.custom_threshold/observability/rule/runSoon", + "alerting:observability.rules.custom_threshold/observability/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/create", + "alerting:observability.rules.custom_threshold/alerts/rule/delete", + "alerting:observability.rules.custom_threshold/alerts/rule/update", + "alerting:observability.rules.custom_threshold/alerts/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/alerts/rule/enable", + "alerting:observability.rules.custom_threshold/alerts/rule/disable", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/snooze", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/alerts/rule/unsnooze", + "alerting:observability.rules.custom_threshold/alerts/rule/runSoon", + "alerting:observability.rules.custom_threshold/alerts/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/deleteBackfill", + "alerting:.es-query/observability/rule/get", + "alerting:.es-query/observability/rule/getRuleState", + "alerting:.es-query/observability/rule/getAlertSummary", + "alerting:.es-query/observability/rule/getExecutionLog", + "alerting:.es-query/observability/rule/getActionErrorLog", + "alerting:.es-query/observability/rule/find", + "alerting:.es-query/observability/rule/getRuleExecutionKPI", + "alerting:.es-query/observability/rule/getBackfill", + "alerting:.es-query/observability/rule/findBackfill", + "alerting:.es-query/observability/rule/create", + "alerting:.es-query/observability/rule/delete", + "alerting:.es-query/observability/rule/update", + "alerting:.es-query/observability/rule/updateApiKey", + "alerting:.es-query/observability/rule/enable", + "alerting:.es-query/observability/rule/disable", + "alerting:.es-query/observability/rule/muteAll", + "alerting:.es-query/observability/rule/unmuteAll", + "alerting:.es-query/observability/rule/muteAlert", + "alerting:.es-query/observability/rule/unmuteAlert", + "alerting:.es-query/observability/rule/snooze", + "alerting:.es-query/observability/rule/bulkEdit", + "alerting:.es-query/observability/rule/bulkDelete", + "alerting:.es-query/observability/rule/bulkEnable", + "alerting:.es-query/observability/rule/bulkDisable", + "alerting:.es-query/observability/rule/unsnooze", + "alerting:.es-query/observability/rule/runSoon", + "alerting:.es-query/observability/rule/scheduleBackfill", + "alerting:.es-query/observability/rule/deleteBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", + "alerting:.es-query/alerts/rule/create", + "alerting:.es-query/alerts/rule/delete", + "alerting:.es-query/alerts/rule/update", + "alerting:.es-query/alerts/rule/updateApiKey", + "alerting:.es-query/alerts/rule/enable", + "alerting:.es-query/alerts/rule/disable", + "alerting:.es-query/alerts/rule/muteAll", + "alerting:.es-query/alerts/rule/unmuteAll", + "alerting:.es-query/alerts/rule/muteAlert", + "alerting:.es-query/alerts/rule/unmuteAlert", + "alerting:.es-query/alerts/rule/snooze", + "alerting:.es-query/alerts/rule/bulkEdit", + "alerting:.es-query/alerts/rule/bulkDelete", + "alerting:.es-query/alerts/rule/bulkEnable", + "alerting:.es-query/alerts/rule/bulkDisable", + "alerting:.es-query/alerts/rule/unsnooze", + "alerting:.es-query/alerts/rule/runSoon", + "alerting:.es-query/alerts/rule/scheduleBackfill", + "alerting:.es-query/alerts/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/deleteBackfill", "alerting:apm.error_rate/observability/alert/get", "alerting:apm.error_rate/observability/alert/find", "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.error_rate/observability/alert/getAlertSummary", "alerting:apm.error_rate/observability/alert/update", + "alerting:apm.error_rate/alerts/alert/get", + "alerting:apm.error_rate/alerts/alert/find", + "alerting:apm.error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/alerts/alert/getAlertSummary", + "alerting:apm.error_rate/alerts/alert/update", "alerting:apm.transaction_error_rate/observability/alert/get", "alerting:apm.transaction_error_rate/observability/alert/find", "alerting:apm.transaction_error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_error_rate/observability/alert/getAlertSummary", "alerting:apm.transaction_error_rate/observability/alert/update", + "alerting:apm.transaction_error_rate/alerts/alert/get", + "alerting:apm.transaction_error_rate/alerts/alert/find", + "alerting:apm.transaction_error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/alerts/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/alert/update", "alerting:apm.transaction_duration/observability/alert/get", "alerting:apm.transaction_duration/observability/alert/find", "alerting:apm.transaction_duration/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_duration/observability/alert/getAlertSummary", "alerting:apm.transaction_duration/observability/alert/update", + "alerting:apm.transaction_duration/alerts/alert/get", + "alerting:apm.transaction_duration/alerts/alert/find", + "alerting:apm.transaction_duration/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/alerts/alert/getAlertSummary", + "alerting:apm.transaction_duration/alerts/alert/update", "alerting:apm.anomaly/observability/alert/get", "alerting:apm.anomaly/observability/alert/find", "alerting:apm.anomaly/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.anomaly/observability/alert/getAlertSummary", "alerting:apm.anomaly/observability/alert/update", + "alerting:apm.anomaly/alerts/alert/get", + "alerting:apm.anomaly/alerts/alert/find", + "alerting:apm.anomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/alerts/alert/getAlertSummary", + "alerting:apm.anomaly/alerts/alert/update", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/update", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/update", "alerting:xpack.synthetics.alerts.tls/observability/alert/get", "alerting:xpack.synthetics.alerts.tls/observability/alert/find", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.tls/observability/alert/update", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/get", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/find", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/update", + "alerting:metrics.alert.threshold/observability/alert/get", + "alerting:metrics.alert.threshold/observability/alert/find", + "alerting:metrics.alert.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.threshold/observability/alert/update", + "alerting:metrics.alert.threshold/alerts/alert/get", + "alerting:metrics.alert.threshold/alerts/alert/find", + "alerting:metrics.alert.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/alert/update", + "alerting:metrics.alert.inventory.threshold/observability/alert/get", + "alerting:metrics.alert.inventory.threshold/observability/alert/find", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/alert/update", + "alerting:metrics.alert.inventory.threshold/alerts/alert/get", + "alerting:metrics.alert.inventory.threshold/alerts/alert/find", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/alert/update", + "alerting:xpack.uptime.alerts.tls/observability/alert/get", + "alerting:xpack.uptime.alerts.tls/observability/alert/find", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/alert/update", + "alerting:xpack.uptime.alerts.tls/alerts/alert/get", + "alerting:xpack.uptime.alerts.tls/alerts/alert/find", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/alert/update", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/update", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/update", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/update", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/update", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/update", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/update", + "alerting:logs.alert.document.count/observability/alert/get", + "alerting:logs.alert.document.count/observability/alert/find", + "alerting:logs.alert.document.count/observability/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/observability/alert/getAlertSummary", + "alerting:logs.alert.document.count/observability/alert/update", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/update", + "alerting:slo.rules.burnRate/observability/alert/get", + "alerting:slo.rules.burnRate/observability/alert/find", + "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", + "alerting:slo.rules.burnRate/observability/alert/update", + "alerting:observability.rules.custom_threshold/observability/alert/get", + "alerting:observability.rules.custom_threshold/observability/alert/find", + "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/alert/update", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/update", + "alerting:.es-query/observability/alert/get", + "alerting:.es-query/observability/alert/find", + "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/observability/alert/getAlertSummary", + "alerting:.es-query/observability/alert/update", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/update", ], "minimal_all": Array [ "login:", @@ -7901,155 +15389,48 @@ export default function ({ getService }: FtrProviderContext) { "alerting:slo.rules.burnRate/slo/rule/runSoon", "alerting:slo.rules.burnRate/slo/rule/scheduleBackfill", "alerting:slo.rules.burnRate/slo/rule/deleteBackfill", + "alerting:slo.rules.burnRate/alerts/rule/get", + "alerting:slo.rules.burnRate/alerts/rule/getRuleState", + "alerting:slo.rules.burnRate/alerts/rule/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/rule/getExecutionLog", + "alerting:slo.rules.burnRate/alerts/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/alerts/rule/find", + "alerting:slo.rules.burnRate/alerts/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/alerts/rule/getBackfill", + "alerting:slo.rules.burnRate/alerts/rule/findBackfill", + "alerting:slo.rules.burnRate/alerts/rule/create", + "alerting:slo.rules.burnRate/alerts/rule/delete", + "alerting:slo.rules.burnRate/alerts/rule/update", + "alerting:slo.rules.burnRate/alerts/rule/updateApiKey", + "alerting:slo.rules.burnRate/alerts/rule/enable", + "alerting:slo.rules.burnRate/alerts/rule/disable", + "alerting:slo.rules.burnRate/alerts/rule/muteAll", + "alerting:slo.rules.burnRate/alerts/rule/unmuteAll", + "alerting:slo.rules.burnRate/alerts/rule/muteAlert", + "alerting:slo.rules.burnRate/alerts/rule/unmuteAlert", + "alerting:slo.rules.burnRate/alerts/rule/snooze", + "alerting:slo.rules.burnRate/alerts/rule/bulkEdit", + "alerting:slo.rules.burnRate/alerts/rule/bulkDelete", + "alerting:slo.rules.burnRate/alerts/rule/bulkEnable", + "alerting:slo.rules.burnRate/alerts/rule/bulkDisable", + "alerting:slo.rules.burnRate/alerts/rule/unsnooze", + "alerting:slo.rules.burnRate/alerts/rule/runSoon", + "alerting:slo.rules.burnRate/alerts/rule/scheduleBackfill", + "alerting:slo.rules.burnRate/alerts/rule/deleteBackfill", "alerting:slo.rules.burnRate/slo/alert/get", "alerting:slo.rules.burnRate/slo/alert/find", "alerting:slo.rules.burnRate/slo/alert/getAuthorizedAlertsIndices", "alerting:slo.rules.burnRate/slo/alert/getAlertSummary", "alerting:slo.rules.burnRate/slo/alert/update", - "app:observability", - "ui:navLinks/observability", - "ui:observability/read", - "ui:observability/write", - "alerting:slo.rules.burnRate/observability/rule/get", - "alerting:slo.rules.burnRate/observability/rule/getRuleState", - "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", - "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", - "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", - "alerting:slo.rules.burnRate/observability/rule/find", - "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", - "alerting:slo.rules.burnRate/observability/rule/getBackfill", - "alerting:slo.rules.burnRate/observability/rule/findBackfill", - "alerting:slo.rules.burnRate/observability/rule/create", - "alerting:slo.rules.burnRate/observability/rule/delete", - "alerting:slo.rules.burnRate/observability/rule/update", - "alerting:slo.rules.burnRate/observability/rule/updateApiKey", - "alerting:slo.rules.burnRate/observability/rule/enable", - "alerting:slo.rules.burnRate/observability/rule/disable", - "alerting:slo.rules.burnRate/observability/rule/muteAll", - "alerting:slo.rules.burnRate/observability/rule/unmuteAll", - "alerting:slo.rules.burnRate/observability/rule/muteAlert", - "alerting:slo.rules.burnRate/observability/rule/unmuteAlert", - "alerting:slo.rules.burnRate/observability/rule/snooze", - "alerting:slo.rules.burnRate/observability/rule/bulkEdit", - "alerting:slo.rules.burnRate/observability/rule/bulkDelete", - "alerting:slo.rules.burnRate/observability/rule/bulkEnable", - "alerting:slo.rules.burnRate/observability/rule/bulkDisable", - "alerting:slo.rules.burnRate/observability/rule/unsnooze", - "alerting:slo.rules.burnRate/observability/rule/runSoon", - "alerting:slo.rules.burnRate/observability/rule/scheduleBackfill", - "alerting:slo.rules.burnRate/observability/rule/deleteBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/get", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", - "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", - "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", - "alerting:observability.rules.custom_threshold/observability/rule/find", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", - "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/create", - "alerting:observability.rules.custom_threshold/observability/rule/delete", - "alerting:observability.rules.custom_threshold/observability/rule/update", - "alerting:observability.rules.custom_threshold/observability/rule/updateApiKey", - "alerting:observability.rules.custom_threshold/observability/rule/enable", - "alerting:observability.rules.custom_threshold/observability/rule/disable", - "alerting:observability.rules.custom_threshold/observability/rule/muteAll", - "alerting:observability.rules.custom_threshold/observability/rule/unmuteAll", - "alerting:observability.rules.custom_threshold/observability/rule/muteAlert", - "alerting:observability.rules.custom_threshold/observability/rule/unmuteAlert", - "alerting:observability.rules.custom_threshold/observability/rule/snooze", - "alerting:observability.rules.custom_threshold/observability/rule/bulkEdit", - "alerting:observability.rules.custom_threshold/observability/rule/bulkDelete", - "alerting:observability.rules.custom_threshold/observability/rule/bulkEnable", - "alerting:observability.rules.custom_threshold/observability/rule/bulkDisable", - "alerting:observability.rules.custom_threshold/observability/rule/unsnooze", - "alerting:observability.rules.custom_threshold/observability/rule/runSoon", - "alerting:observability.rules.custom_threshold/observability/rule/scheduleBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/deleteBackfill", - "alerting:.es-query/observability/rule/get", - "alerting:.es-query/observability/rule/getRuleState", - "alerting:.es-query/observability/rule/getAlertSummary", - "alerting:.es-query/observability/rule/getExecutionLog", - "alerting:.es-query/observability/rule/getActionErrorLog", - "alerting:.es-query/observability/rule/find", - "alerting:.es-query/observability/rule/getRuleExecutionKPI", - "alerting:.es-query/observability/rule/getBackfill", - "alerting:.es-query/observability/rule/findBackfill", - "alerting:.es-query/observability/rule/create", - "alerting:.es-query/observability/rule/delete", - "alerting:.es-query/observability/rule/update", - "alerting:.es-query/observability/rule/updateApiKey", - "alerting:.es-query/observability/rule/enable", - "alerting:.es-query/observability/rule/disable", - "alerting:.es-query/observability/rule/muteAll", - "alerting:.es-query/observability/rule/unmuteAll", - "alerting:.es-query/observability/rule/muteAlert", - "alerting:.es-query/observability/rule/unmuteAlert", - "alerting:.es-query/observability/rule/snooze", - "alerting:.es-query/observability/rule/bulkEdit", - "alerting:.es-query/observability/rule/bulkDelete", - "alerting:.es-query/observability/rule/bulkEnable", - "alerting:.es-query/observability/rule/bulkDisable", - "alerting:.es-query/observability/rule/unsnooze", - "alerting:.es-query/observability/rule/runSoon", - "alerting:.es-query/observability/rule/scheduleBackfill", - "alerting:.es-query/observability/rule/deleteBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/create", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/delete", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/update", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/updateApiKey", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/enable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/disable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAll", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAll", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAlert", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAlert", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/snooze", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEdit", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDelete", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEnable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDisable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unsnooze", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/runSoon", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/scheduleBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/deleteBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/get", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", - "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/find", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", - "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/create", - "alerting:metrics.alert.inventory.threshold/observability/rule/delete", - "alerting:metrics.alert.inventory.threshold/observability/rule/update", - "alerting:metrics.alert.inventory.threshold/observability/rule/updateApiKey", - "alerting:metrics.alert.inventory.threshold/observability/rule/enable", - "alerting:metrics.alert.inventory.threshold/observability/rule/disable", - "alerting:metrics.alert.inventory.threshold/observability/rule/muteAll", - "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAll", - "alerting:metrics.alert.inventory.threshold/observability/rule/muteAlert", - "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAlert", - "alerting:metrics.alert.inventory.threshold/observability/rule/snooze", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEdit", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDelete", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEnable", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDisable", - "alerting:metrics.alert.inventory.threshold/observability/rule/unsnooze", - "alerting:metrics.alert.inventory.threshold/observability/rule/runSoon", - "alerting:metrics.alert.inventory.threshold/observability/rule/scheduleBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/deleteBackfill", + "alerting:slo.rules.burnRate/alerts/alert/get", + "alerting:slo.rules.burnRate/alerts/alert/find", + "alerting:slo.rules.burnRate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/alerts/alert/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/alert/update", + "app:observability", + "ui:navLinks/observability", + "ui:observability/read", + "ui:observability/write", "alerting:apm.error_rate/observability/rule/get", "alerting:apm.error_rate/observability/rule/getRuleState", "alerting:apm.error_rate/observability/rule/getAlertSummary", @@ -8078,6 +15459,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.error_rate/observability/rule/runSoon", "alerting:apm.error_rate/observability/rule/scheduleBackfill", "alerting:apm.error_rate/observability/rule/deleteBackfill", + "alerting:apm.error_rate/alerts/rule/get", + "alerting:apm.error_rate/alerts/rule/getRuleState", + "alerting:apm.error_rate/alerts/rule/getAlertSummary", + "alerting:apm.error_rate/alerts/rule/getExecutionLog", + "alerting:apm.error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.error_rate/alerts/rule/find", + "alerting:apm.error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.error_rate/alerts/rule/getBackfill", + "alerting:apm.error_rate/alerts/rule/findBackfill", + "alerting:apm.error_rate/alerts/rule/create", + "alerting:apm.error_rate/alerts/rule/delete", + "alerting:apm.error_rate/alerts/rule/update", + "alerting:apm.error_rate/alerts/rule/updateApiKey", + "alerting:apm.error_rate/alerts/rule/enable", + "alerting:apm.error_rate/alerts/rule/disable", + "alerting:apm.error_rate/alerts/rule/muteAll", + "alerting:apm.error_rate/alerts/rule/unmuteAll", + "alerting:apm.error_rate/alerts/rule/muteAlert", + "alerting:apm.error_rate/alerts/rule/unmuteAlert", + "alerting:apm.error_rate/alerts/rule/snooze", + "alerting:apm.error_rate/alerts/rule/bulkEdit", + "alerting:apm.error_rate/alerts/rule/bulkDelete", + "alerting:apm.error_rate/alerts/rule/bulkEnable", + "alerting:apm.error_rate/alerts/rule/bulkDisable", + "alerting:apm.error_rate/alerts/rule/unsnooze", + "alerting:apm.error_rate/alerts/rule/runSoon", + "alerting:apm.error_rate/alerts/rule/scheduleBackfill", + "alerting:apm.error_rate/alerts/rule/deleteBackfill", "alerting:apm.transaction_error_rate/observability/rule/get", "alerting:apm.transaction_error_rate/observability/rule/getRuleState", "alerting:apm.transaction_error_rate/observability/rule/getAlertSummary", @@ -8106,6 +15515,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_error_rate/observability/rule/runSoon", "alerting:apm.transaction_error_rate/observability/rule/scheduleBackfill", "alerting:apm.transaction_error_rate/observability/rule/deleteBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/get", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleState", + "alerting:apm.transaction_error_rate/alerts/rule/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/rule/getExecutionLog", + "alerting:apm.transaction_error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_error_rate/alerts/rule/find", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_error_rate/alerts/rule/getBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/findBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/create", + "alerting:apm.transaction_error_rate/alerts/rule/delete", + "alerting:apm.transaction_error_rate/alerts/rule/update", + "alerting:apm.transaction_error_rate/alerts/rule/updateApiKey", + "alerting:apm.transaction_error_rate/alerts/rule/enable", + "alerting:apm.transaction_error_rate/alerts/rule/disable", + "alerting:apm.transaction_error_rate/alerts/rule/muteAll", + "alerting:apm.transaction_error_rate/alerts/rule/unmuteAll", + "alerting:apm.transaction_error_rate/alerts/rule/muteAlert", + "alerting:apm.transaction_error_rate/alerts/rule/unmuteAlert", + "alerting:apm.transaction_error_rate/alerts/rule/snooze", + "alerting:apm.transaction_error_rate/alerts/rule/bulkEdit", + "alerting:apm.transaction_error_rate/alerts/rule/bulkDelete", + "alerting:apm.transaction_error_rate/alerts/rule/bulkEnable", + "alerting:apm.transaction_error_rate/alerts/rule/bulkDisable", + "alerting:apm.transaction_error_rate/alerts/rule/unsnooze", + "alerting:apm.transaction_error_rate/alerts/rule/runSoon", + "alerting:apm.transaction_error_rate/alerts/rule/scheduleBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/deleteBackfill", "alerting:apm.transaction_duration/observability/rule/get", "alerting:apm.transaction_duration/observability/rule/getRuleState", "alerting:apm.transaction_duration/observability/rule/getAlertSummary", @@ -8134,6 +15571,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_duration/observability/rule/runSoon", "alerting:apm.transaction_duration/observability/rule/scheduleBackfill", "alerting:apm.transaction_duration/observability/rule/deleteBackfill", + "alerting:apm.transaction_duration/alerts/rule/get", + "alerting:apm.transaction_duration/alerts/rule/getRuleState", + "alerting:apm.transaction_duration/alerts/rule/getAlertSummary", + "alerting:apm.transaction_duration/alerts/rule/getExecutionLog", + "alerting:apm.transaction_duration/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_duration/alerts/rule/find", + "alerting:apm.transaction_duration/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_duration/alerts/rule/getBackfill", + "alerting:apm.transaction_duration/alerts/rule/findBackfill", + "alerting:apm.transaction_duration/alerts/rule/create", + "alerting:apm.transaction_duration/alerts/rule/delete", + "alerting:apm.transaction_duration/alerts/rule/update", + "alerting:apm.transaction_duration/alerts/rule/updateApiKey", + "alerting:apm.transaction_duration/alerts/rule/enable", + "alerting:apm.transaction_duration/alerts/rule/disable", + "alerting:apm.transaction_duration/alerts/rule/muteAll", + "alerting:apm.transaction_duration/alerts/rule/unmuteAll", + "alerting:apm.transaction_duration/alerts/rule/muteAlert", + "alerting:apm.transaction_duration/alerts/rule/unmuteAlert", + "alerting:apm.transaction_duration/alerts/rule/snooze", + "alerting:apm.transaction_duration/alerts/rule/bulkEdit", + "alerting:apm.transaction_duration/alerts/rule/bulkDelete", + "alerting:apm.transaction_duration/alerts/rule/bulkEnable", + "alerting:apm.transaction_duration/alerts/rule/bulkDisable", + "alerting:apm.transaction_duration/alerts/rule/unsnooze", + "alerting:apm.transaction_duration/alerts/rule/runSoon", + "alerting:apm.transaction_duration/alerts/rule/scheduleBackfill", + "alerting:apm.transaction_duration/alerts/rule/deleteBackfill", "alerting:apm.anomaly/observability/rule/get", "alerting:apm.anomaly/observability/rule/getRuleState", "alerting:apm.anomaly/observability/rule/getAlertSummary", @@ -8162,6 +15627,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.anomaly/observability/rule/runSoon", "alerting:apm.anomaly/observability/rule/scheduleBackfill", "alerting:apm.anomaly/observability/rule/deleteBackfill", + "alerting:apm.anomaly/alerts/rule/get", + "alerting:apm.anomaly/alerts/rule/getRuleState", + "alerting:apm.anomaly/alerts/rule/getAlertSummary", + "alerting:apm.anomaly/alerts/rule/getExecutionLog", + "alerting:apm.anomaly/alerts/rule/getActionErrorLog", + "alerting:apm.anomaly/alerts/rule/find", + "alerting:apm.anomaly/alerts/rule/getRuleExecutionKPI", + "alerting:apm.anomaly/alerts/rule/getBackfill", + "alerting:apm.anomaly/alerts/rule/findBackfill", + "alerting:apm.anomaly/alerts/rule/create", + "alerting:apm.anomaly/alerts/rule/delete", + "alerting:apm.anomaly/alerts/rule/update", + "alerting:apm.anomaly/alerts/rule/updateApiKey", + "alerting:apm.anomaly/alerts/rule/enable", + "alerting:apm.anomaly/alerts/rule/disable", + "alerting:apm.anomaly/alerts/rule/muteAll", + "alerting:apm.anomaly/alerts/rule/unmuteAll", + "alerting:apm.anomaly/alerts/rule/muteAlert", + "alerting:apm.anomaly/alerts/rule/unmuteAlert", + "alerting:apm.anomaly/alerts/rule/snooze", + "alerting:apm.anomaly/alerts/rule/bulkEdit", + "alerting:apm.anomaly/alerts/rule/bulkDelete", + "alerting:apm.anomaly/alerts/rule/bulkEnable", + "alerting:apm.anomaly/alerts/rule/bulkDisable", + "alerting:apm.anomaly/alerts/rule/unsnooze", + "alerting:apm.anomaly/alerts/rule/runSoon", + "alerting:apm.anomaly/alerts/rule/scheduleBackfill", + "alerting:apm.anomaly/alerts/rule/deleteBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getAlertSummary", @@ -8190,6 +15683,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/runSoon", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/scheduleBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/deleteBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/create", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/delete", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/update", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/updateApiKey", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/enable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/disable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/muteAll", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unmuteAll", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/muteAlert", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unmuteAlert", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/snooze", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkEdit", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkDelete", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkEnable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unsnooze", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/runSoon", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/deleteBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/get", "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.tls/observability/rule/getAlertSummary", @@ -8218,61 +15739,787 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/rule/runSoon", "alerting:xpack.synthetics.alerts.tls/observability/rule/scheduleBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/deleteBackfill", - "alerting:slo.rules.burnRate/observability/alert/get", - "alerting:slo.rules.burnRate/observability/alert/find", - "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", - "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", - "alerting:slo.rules.burnRate/observability/alert/update", - "alerting:observability.rules.custom_threshold/observability/alert/get", - "alerting:observability.rules.custom_threshold/observability/alert/find", - "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/alert/update", - "alerting:.es-query/observability/alert/get", - "alerting:.es-query/observability/alert/find", - "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", - "alerting:.es-query/observability/alert/getAlertSummary", - "alerting:.es-query/observability/alert/update", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/update", - "alerting:metrics.alert.inventory.threshold/observability/alert/get", - "alerting:metrics.alert.inventory.threshold/observability/alert/find", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/alert/update", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/get", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/find", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/create", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/delete", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/update", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/updateApiKey", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/enable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/disable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/muteAll", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unmuteAll", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/muteAlert", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unmuteAlert", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/snooze", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkEdit", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkDelete", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkEnable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unsnooze", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/runSoon", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/deleteBackfill", + "alerting:metrics.alert.threshold/observability/rule/get", + "alerting:metrics.alert.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/observability/rule/find", + "alerting:metrics.alert.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.threshold/observability/rule/create", + "alerting:metrics.alert.threshold/observability/rule/delete", + "alerting:metrics.alert.threshold/observability/rule/update", + "alerting:metrics.alert.threshold/observability/rule/updateApiKey", + "alerting:metrics.alert.threshold/observability/rule/enable", + "alerting:metrics.alert.threshold/observability/rule/disable", + "alerting:metrics.alert.threshold/observability/rule/muteAll", + "alerting:metrics.alert.threshold/observability/rule/unmuteAll", + "alerting:metrics.alert.threshold/observability/rule/muteAlert", + "alerting:metrics.alert.threshold/observability/rule/unmuteAlert", + "alerting:metrics.alert.threshold/observability/rule/snooze", + "alerting:metrics.alert.threshold/observability/rule/bulkEdit", + "alerting:metrics.alert.threshold/observability/rule/bulkDelete", + "alerting:metrics.alert.threshold/observability/rule/bulkEnable", + "alerting:metrics.alert.threshold/observability/rule/bulkDisable", + "alerting:metrics.alert.threshold/observability/rule/unsnooze", + "alerting:metrics.alert.threshold/observability/rule/runSoon", + "alerting:metrics.alert.threshold/observability/rule/scheduleBackfill", + "alerting:metrics.alert.threshold/observability/rule/deleteBackfill", + "alerting:metrics.alert.threshold/alerts/rule/get", + "alerting:metrics.alert.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/alerts/rule/find", + "alerting:metrics.alert.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.threshold/alerts/rule/create", + "alerting:metrics.alert.threshold/alerts/rule/delete", + "alerting:metrics.alert.threshold/alerts/rule/update", + "alerting:metrics.alert.threshold/alerts/rule/updateApiKey", + "alerting:metrics.alert.threshold/alerts/rule/enable", + "alerting:metrics.alert.threshold/alerts/rule/disable", + "alerting:metrics.alert.threshold/alerts/rule/muteAll", + "alerting:metrics.alert.threshold/alerts/rule/unmuteAll", + "alerting:metrics.alert.threshold/alerts/rule/muteAlert", + "alerting:metrics.alert.threshold/alerts/rule/unmuteAlert", + "alerting:metrics.alert.threshold/alerts/rule/snooze", + "alerting:metrics.alert.threshold/alerts/rule/bulkEdit", + "alerting:metrics.alert.threshold/alerts/rule/bulkDelete", + "alerting:metrics.alert.threshold/alerts/rule/bulkEnable", + "alerting:metrics.alert.threshold/alerts/rule/bulkDisable", + "alerting:metrics.alert.threshold/alerts/rule/unsnooze", + "alerting:metrics.alert.threshold/alerts/rule/runSoon", + "alerting:metrics.alert.threshold/alerts/rule/scheduleBackfill", + "alerting:metrics.alert.threshold/alerts/rule/deleteBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/get", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/find", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/create", + "alerting:metrics.alert.inventory.threshold/observability/rule/delete", + "alerting:metrics.alert.inventory.threshold/observability/rule/update", + "alerting:metrics.alert.inventory.threshold/observability/rule/updateApiKey", + "alerting:metrics.alert.inventory.threshold/observability/rule/enable", + "alerting:metrics.alert.inventory.threshold/observability/rule/disable", + "alerting:metrics.alert.inventory.threshold/observability/rule/muteAll", + "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAll", + "alerting:metrics.alert.inventory.threshold/observability/rule/muteAlert", + "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAlert", + "alerting:metrics.alert.inventory.threshold/observability/rule/snooze", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEdit", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDelete", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEnable", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDisable", + "alerting:metrics.alert.inventory.threshold/observability/rule/unsnooze", + "alerting:metrics.alert.inventory.threshold/observability/rule/runSoon", + "alerting:metrics.alert.inventory.threshold/observability/rule/scheduleBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/deleteBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/get", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/find", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/create", + "alerting:metrics.alert.inventory.threshold/alerts/rule/delete", + "alerting:metrics.alert.inventory.threshold/alerts/rule/update", + "alerting:metrics.alert.inventory.threshold/alerts/rule/updateApiKey", + "alerting:metrics.alert.inventory.threshold/alerts/rule/enable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/disable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/muteAll", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unmuteAll", + "alerting:metrics.alert.inventory.threshold/alerts/rule/muteAlert", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unmuteAlert", + "alerting:metrics.alert.inventory.threshold/alerts/rule/snooze", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkEdit", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkDelete", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkEnable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkDisable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unsnooze", + "alerting:metrics.alert.inventory.threshold/alerts/rule/runSoon", + "alerting:metrics.alert.inventory.threshold/alerts/rule/scheduleBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/get", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/find", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/create", + "alerting:xpack.uptime.alerts.tls/observability/rule/delete", + "alerting:xpack.uptime.alerts.tls/observability/rule/update", + "alerting:xpack.uptime.alerts.tls/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tls/observability/rule/enable", + "alerting:xpack.uptime.alerts.tls/observability/rule/disable", + "alerting:xpack.uptime.alerts.tls/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.tls/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tls/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.tls/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tls/observability/rule/snooze", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tls/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.tls/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.tls/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/get", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/find", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/create", + "alerting:xpack.uptime.alerts.tls/alerts/rule/delete", + "alerting:xpack.uptime.alerts.tls/alerts/rule/update", + "alerting:xpack.uptime.alerts.tls/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tls/alerts/rule/enable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/disable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tls/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tls/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.tls/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.tls/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/create", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/delete", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/update", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/enable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/disable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/snooze", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/create", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/delete", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/update", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/enable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/disable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/create", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/delete", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/update", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/enable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/disable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/snooze", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/create", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/delete", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/update", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/enable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/disable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/create", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/delete", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/update", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/enable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/disable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/snooze", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/create", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/delete", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/update", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/enable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/disable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/deleteBackfill", + "alerting:logs.alert.document.count/observability/rule/get", + "alerting:logs.alert.document.count/observability/rule/getRuleState", + "alerting:logs.alert.document.count/observability/rule/getAlertSummary", + "alerting:logs.alert.document.count/observability/rule/getExecutionLog", + "alerting:logs.alert.document.count/observability/rule/getActionErrorLog", + "alerting:logs.alert.document.count/observability/rule/find", + "alerting:logs.alert.document.count/observability/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/observability/rule/getBackfill", + "alerting:logs.alert.document.count/observability/rule/findBackfill", + "alerting:logs.alert.document.count/observability/rule/create", + "alerting:logs.alert.document.count/observability/rule/delete", + "alerting:logs.alert.document.count/observability/rule/update", + "alerting:logs.alert.document.count/observability/rule/updateApiKey", + "alerting:logs.alert.document.count/observability/rule/enable", + "alerting:logs.alert.document.count/observability/rule/disable", + "alerting:logs.alert.document.count/observability/rule/muteAll", + "alerting:logs.alert.document.count/observability/rule/unmuteAll", + "alerting:logs.alert.document.count/observability/rule/muteAlert", + "alerting:logs.alert.document.count/observability/rule/unmuteAlert", + "alerting:logs.alert.document.count/observability/rule/snooze", + "alerting:logs.alert.document.count/observability/rule/bulkEdit", + "alerting:logs.alert.document.count/observability/rule/bulkDelete", + "alerting:logs.alert.document.count/observability/rule/bulkEnable", + "alerting:logs.alert.document.count/observability/rule/bulkDisable", + "alerting:logs.alert.document.count/observability/rule/unsnooze", + "alerting:logs.alert.document.count/observability/rule/runSoon", + "alerting:logs.alert.document.count/observability/rule/scheduleBackfill", + "alerting:logs.alert.document.count/observability/rule/deleteBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/create", + "alerting:logs.alert.document.count/alerts/rule/delete", + "alerting:logs.alert.document.count/alerts/rule/update", + "alerting:logs.alert.document.count/alerts/rule/updateApiKey", + "alerting:logs.alert.document.count/alerts/rule/enable", + "alerting:logs.alert.document.count/alerts/rule/disable", + "alerting:logs.alert.document.count/alerts/rule/muteAll", + "alerting:logs.alert.document.count/alerts/rule/unmuteAll", + "alerting:logs.alert.document.count/alerts/rule/muteAlert", + "alerting:logs.alert.document.count/alerts/rule/unmuteAlert", + "alerting:logs.alert.document.count/alerts/rule/snooze", + "alerting:logs.alert.document.count/alerts/rule/bulkEdit", + "alerting:logs.alert.document.count/alerts/rule/bulkDelete", + "alerting:logs.alert.document.count/alerts/rule/bulkEnable", + "alerting:logs.alert.document.count/alerts/rule/bulkDisable", + "alerting:logs.alert.document.count/alerts/rule/unsnooze", + "alerting:logs.alert.document.count/alerts/rule/runSoon", + "alerting:logs.alert.document.count/alerts/rule/scheduleBackfill", + "alerting:logs.alert.document.count/alerts/rule/deleteBackfill", + "alerting:slo.rules.burnRate/observability/rule/get", + "alerting:slo.rules.burnRate/observability/rule/getRuleState", + "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", + "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", + "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/observability/rule/find", + "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/observability/rule/getBackfill", + "alerting:slo.rules.burnRate/observability/rule/findBackfill", + "alerting:slo.rules.burnRate/observability/rule/create", + "alerting:slo.rules.burnRate/observability/rule/delete", + "alerting:slo.rules.burnRate/observability/rule/update", + "alerting:slo.rules.burnRate/observability/rule/updateApiKey", + "alerting:slo.rules.burnRate/observability/rule/enable", + "alerting:slo.rules.burnRate/observability/rule/disable", + "alerting:slo.rules.burnRate/observability/rule/muteAll", + "alerting:slo.rules.burnRate/observability/rule/unmuteAll", + "alerting:slo.rules.burnRate/observability/rule/muteAlert", + "alerting:slo.rules.burnRate/observability/rule/unmuteAlert", + "alerting:slo.rules.burnRate/observability/rule/snooze", + "alerting:slo.rules.burnRate/observability/rule/bulkEdit", + "alerting:slo.rules.burnRate/observability/rule/bulkDelete", + "alerting:slo.rules.burnRate/observability/rule/bulkEnable", + "alerting:slo.rules.burnRate/observability/rule/bulkDisable", + "alerting:slo.rules.burnRate/observability/rule/unsnooze", + "alerting:slo.rules.burnRate/observability/rule/runSoon", + "alerting:slo.rules.burnRate/observability/rule/scheduleBackfill", + "alerting:slo.rules.burnRate/observability/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/get", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", + "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/observability/rule/find", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/create", + "alerting:observability.rules.custom_threshold/observability/rule/delete", + "alerting:observability.rules.custom_threshold/observability/rule/update", + "alerting:observability.rules.custom_threshold/observability/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/observability/rule/enable", + "alerting:observability.rules.custom_threshold/observability/rule/disable", + "alerting:observability.rules.custom_threshold/observability/rule/muteAll", + "alerting:observability.rules.custom_threshold/observability/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/observability/rule/muteAlert", + "alerting:observability.rules.custom_threshold/observability/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/observability/rule/snooze", + "alerting:observability.rules.custom_threshold/observability/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/observability/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/observability/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/observability/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/observability/rule/unsnooze", + "alerting:observability.rules.custom_threshold/observability/rule/runSoon", + "alerting:observability.rules.custom_threshold/observability/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/create", + "alerting:observability.rules.custom_threshold/alerts/rule/delete", + "alerting:observability.rules.custom_threshold/alerts/rule/update", + "alerting:observability.rules.custom_threshold/alerts/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/alerts/rule/enable", + "alerting:observability.rules.custom_threshold/alerts/rule/disable", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/snooze", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/alerts/rule/unsnooze", + "alerting:observability.rules.custom_threshold/alerts/rule/runSoon", + "alerting:observability.rules.custom_threshold/alerts/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/deleteBackfill", + "alerting:.es-query/observability/rule/get", + "alerting:.es-query/observability/rule/getRuleState", + "alerting:.es-query/observability/rule/getAlertSummary", + "alerting:.es-query/observability/rule/getExecutionLog", + "alerting:.es-query/observability/rule/getActionErrorLog", + "alerting:.es-query/observability/rule/find", + "alerting:.es-query/observability/rule/getRuleExecutionKPI", + "alerting:.es-query/observability/rule/getBackfill", + "alerting:.es-query/observability/rule/findBackfill", + "alerting:.es-query/observability/rule/create", + "alerting:.es-query/observability/rule/delete", + "alerting:.es-query/observability/rule/update", + "alerting:.es-query/observability/rule/updateApiKey", + "alerting:.es-query/observability/rule/enable", + "alerting:.es-query/observability/rule/disable", + "alerting:.es-query/observability/rule/muteAll", + "alerting:.es-query/observability/rule/unmuteAll", + "alerting:.es-query/observability/rule/muteAlert", + "alerting:.es-query/observability/rule/unmuteAlert", + "alerting:.es-query/observability/rule/snooze", + "alerting:.es-query/observability/rule/bulkEdit", + "alerting:.es-query/observability/rule/bulkDelete", + "alerting:.es-query/observability/rule/bulkEnable", + "alerting:.es-query/observability/rule/bulkDisable", + "alerting:.es-query/observability/rule/unsnooze", + "alerting:.es-query/observability/rule/runSoon", + "alerting:.es-query/observability/rule/scheduleBackfill", + "alerting:.es-query/observability/rule/deleteBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", + "alerting:.es-query/alerts/rule/create", + "alerting:.es-query/alerts/rule/delete", + "alerting:.es-query/alerts/rule/update", + "alerting:.es-query/alerts/rule/updateApiKey", + "alerting:.es-query/alerts/rule/enable", + "alerting:.es-query/alerts/rule/disable", + "alerting:.es-query/alerts/rule/muteAll", + "alerting:.es-query/alerts/rule/unmuteAll", + "alerting:.es-query/alerts/rule/muteAlert", + "alerting:.es-query/alerts/rule/unmuteAlert", + "alerting:.es-query/alerts/rule/snooze", + "alerting:.es-query/alerts/rule/bulkEdit", + "alerting:.es-query/alerts/rule/bulkDelete", + "alerting:.es-query/alerts/rule/bulkEnable", + "alerting:.es-query/alerts/rule/bulkDisable", + "alerting:.es-query/alerts/rule/unsnooze", + "alerting:.es-query/alerts/rule/runSoon", + "alerting:.es-query/alerts/rule/scheduleBackfill", + "alerting:.es-query/alerts/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/deleteBackfill", "alerting:apm.error_rate/observability/alert/get", "alerting:apm.error_rate/observability/alert/find", "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.error_rate/observability/alert/getAlertSummary", "alerting:apm.error_rate/observability/alert/update", + "alerting:apm.error_rate/alerts/alert/get", + "alerting:apm.error_rate/alerts/alert/find", + "alerting:apm.error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/alerts/alert/getAlertSummary", + "alerting:apm.error_rate/alerts/alert/update", "alerting:apm.transaction_error_rate/observability/alert/get", "alerting:apm.transaction_error_rate/observability/alert/find", "alerting:apm.transaction_error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_error_rate/observability/alert/getAlertSummary", "alerting:apm.transaction_error_rate/observability/alert/update", + "alerting:apm.transaction_error_rate/alerts/alert/get", + "alerting:apm.transaction_error_rate/alerts/alert/find", + "alerting:apm.transaction_error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/alerts/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/alert/update", "alerting:apm.transaction_duration/observability/alert/get", "alerting:apm.transaction_duration/observability/alert/find", "alerting:apm.transaction_duration/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_duration/observability/alert/getAlertSummary", "alerting:apm.transaction_duration/observability/alert/update", + "alerting:apm.transaction_duration/alerts/alert/get", + "alerting:apm.transaction_duration/alerts/alert/find", + "alerting:apm.transaction_duration/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/alerts/alert/getAlertSummary", + "alerting:apm.transaction_duration/alerts/alert/update", "alerting:apm.anomaly/observability/alert/get", "alerting:apm.anomaly/observability/alert/find", "alerting:apm.anomaly/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.anomaly/observability/alert/getAlertSummary", "alerting:apm.anomaly/observability/alert/update", + "alerting:apm.anomaly/alerts/alert/get", + "alerting:apm.anomaly/alerts/alert/find", + "alerting:apm.anomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/alerts/alert/getAlertSummary", + "alerting:apm.anomaly/alerts/alert/update", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/update", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/update", "alerting:xpack.synthetics.alerts.tls/observability/alert/get", "alerting:xpack.synthetics.alerts.tls/observability/alert/find", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.tls/observability/alert/update", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/get", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/find", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/update", + "alerting:metrics.alert.threshold/observability/alert/get", + "alerting:metrics.alert.threshold/observability/alert/find", + "alerting:metrics.alert.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.threshold/observability/alert/update", + "alerting:metrics.alert.threshold/alerts/alert/get", + "alerting:metrics.alert.threshold/alerts/alert/find", + "alerting:metrics.alert.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/alert/update", + "alerting:metrics.alert.inventory.threshold/observability/alert/get", + "alerting:metrics.alert.inventory.threshold/observability/alert/find", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/alert/update", + "alerting:metrics.alert.inventory.threshold/alerts/alert/get", + "alerting:metrics.alert.inventory.threshold/alerts/alert/find", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/alert/update", + "alerting:xpack.uptime.alerts.tls/observability/alert/get", + "alerting:xpack.uptime.alerts.tls/observability/alert/find", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/alert/update", + "alerting:xpack.uptime.alerts.tls/alerts/alert/get", + "alerting:xpack.uptime.alerts.tls/alerts/alert/find", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/alert/update", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/update", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/update", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/update", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/update", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/update", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/update", + "alerting:logs.alert.document.count/observability/alert/get", + "alerting:logs.alert.document.count/observability/alert/find", + "alerting:logs.alert.document.count/observability/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/observability/alert/getAlertSummary", + "alerting:logs.alert.document.count/observability/alert/update", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/update", + "alerting:slo.rules.burnRate/observability/alert/get", + "alerting:slo.rules.burnRate/observability/alert/find", + "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", + "alerting:slo.rules.burnRate/observability/alert/update", + "alerting:observability.rules.custom_threshold/observability/alert/get", + "alerting:observability.rules.custom_threshold/observability/alert/find", + "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/alert/update", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/update", + "alerting:.es-query/observability/alert/get", + "alerting:.es-query/observability/alert/find", + "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/observability/alert/getAlertSummary", + "alerting:.es-query/observability/alert/update", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/update", ], "minimal_read": Array [ "login:", @@ -8314,68 +16561,36 @@ export default function ({ getService }: FtrProviderContext) { "saved_object:url/find", "saved_object:url/open_point_in_time", "saved_object:url/close_point_in_time", - "ui:slo/read", - "alerting:slo.rules.burnRate/slo/rule/get", - "alerting:slo.rules.burnRate/slo/rule/getRuleState", - "alerting:slo.rules.burnRate/slo/rule/getAlertSummary", - "alerting:slo.rules.burnRate/slo/rule/getExecutionLog", - "alerting:slo.rules.burnRate/slo/rule/getActionErrorLog", - "alerting:slo.rules.burnRate/slo/rule/find", - "alerting:slo.rules.burnRate/slo/rule/getRuleExecutionKPI", - "alerting:slo.rules.burnRate/slo/rule/getBackfill", - "alerting:slo.rules.burnRate/slo/rule/findBackfill", - "alerting:slo.rules.burnRate/slo/alert/get", - "alerting:slo.rules.burnRate/slo/alert/find", - "alerting:slo.rules.burnRate/slo/alert/getAuthorizedAlertsIndices", - "alerting:slo.rules.burnRate/slo/alert/getAlertSummary", - "app:observability", - "ui:navLinks/observability", - "ui:observability/read", - "alerting:slo.rules.burnRate/observability/rule/get", - "alerting:slo.rules.burnRate/observability/rule/getRuleState", - "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", - "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", - "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", - "alerting:slo.rules.burnRate/observability/rule/find", - "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", - "alerting:slo.rules.burnRate/observability/rule/getBackfill", - "alerting:slo.rules.burnRate/observability/rule/findBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/get", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", - "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", - "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", - "alerting:observability.rules.custom_threshold/observability/rule/find", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", - "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", - "alerting:.es-query/observability/rule/get", - "alerting:.es-query/observability/rule/getRuleState", - "alerting:.es-query/observability/rule/getAlertSummary", - "alerting:.es-query/observability/rule/getExecutionLog", - "alerting:.es-query/observability/rule/getActionErrorLog", - "alerting:.es-query/observability/rule/find", - "alerting:.es-query/observability/rule/getRuleExecutionKPI", - "alerting:.es-query/observability/rule/getBackfill", - "alerting:.es-query/observability/rule/findBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/get", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", - "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/find", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", - "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "ui:slo/read", + "alerting:slo.rules.burnRate/slo/rule/get", + "alerting:slo.rules.burnRate/slo/rule/getRuleState", + "alerting:slo.rules.burnRate/slo/rule/getAlertSummary", + "alerting:slo.rules.burnRate/slo/rule/getExecutionLog", + "alerting:slo.rules.burnRate/slo/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/slo/rule/find", + "alerting:slo.rules.burnRate/slo/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/slo/rule/getBackfill", + "alerting:slo.rules.burnRate/slo/rule/findBackfill", + "alerting:slo.rules.burnRate/alerts/rule/get", + "alerting:slo.rules.burnRate/alerts/rule/getRuleState", + "alerting:slo.rules.burnRate/alerts/rule/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/rule/getExecutionLog", + "alerting:slo.rules.burnRate/alerts/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/alerts/rule/find", + "alerting:slo.rules.burnRate/alerts/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/alerts/rule/getBackfill", + "alerting:slo.rules.burnRate/alerts/rule/findBackfill", + "alerting:slo.rules.burnRate/slo/alert/get", + "alerting:slo.rules.burnRate/slo/alert/find", + "alerting:slo.rules.burnRate/slo/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/slo/alert/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/alert/get", + "alerting:slo.rules.burnRate/alerts/alert/find", + "alerting:slo.rules.burnRate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/alerts/alert/getAlertSummary", + "app:observability", + "ui:navLinks/observability", + "ui:observability/read", "alerting:apm.error_rate/observability/rule/get", "alerting:apm.error_rate/observability/rule/getRuleState", "alerting:apm.error_rate/observability/rule/getAlertSummary", @@ -8385,6 +16600,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.error_rate/observability/rule/getRuleExecutionKPI", "alerting:apm.error_rate/observability/rule/getBackfill", "alerting:apm.error_rate/observability/rule/findBackfill", + "alerting:apm.error_rate/alerts/rule/get", + "alerting:apm.error_rate/alerts/rule/getRuleState", + "alerting:apm.error_rate/alerts/rule/getAlertSummary", + "alerting:apm.error_rate/alerts/rule/getExecutionLog", + "alerting:apm.error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.error_rate/alerts/rule/find", + "alerting:apm.error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.error_rate/alerts/rule/getBackfill", + "alerting:apm.error_rate/alerts/rule/findBackfill", "alerting:apm.transaction_error_rate/observability/rule/get", "alerting:apm.transaction_error_rate/observability/rule/getRuleState", "alerting:apm.transaction_error_rate/observability/rule/getAlertSummary", @@ -8394,6 +16618,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_error_rate/observability/rule/getRuleExecutionKPI", "alerting:apm.transaction_error_rate/observability/rule/getBackfill", "alerting:apm.transaction_error_rate/observability/rule/findBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/get", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleState", + "alerting:apm.transaction_error_rate/alerts/rule/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/rule/getExecutionLog", + "alerting:apm.transaction_error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_error_rate/alerts/rule/find", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_error_rate/alerts/rule/getBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/findBackfill", "alerting:apm.transaction_duration/observability/rule/get", "alerting:apm.transaction_duration/observability/rule/getRuleState", "alerting:apm.transaction_duration/observability/rule/getAlertSummary", @@ -8403,6 +16636,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_duration/observability/rule/getRuleExecutionKPI", "alerting:apm.transaction_duration/observability/rule/getBackfill", "alerting:apm.transaction_duration/observability/rule/findBackfill", + "alerting:apm.transaction_duration/alerts/rule/get", + "alerting:apm.transaction_duration/alerts/rule/getRuleState", + "alerting:apm.transaction_duration/alerts/rule/getAlertSummary", + "alerting:apm.transaction_duration/alerts/rule/getExecutionLog", + "alerting:apm.transaction_duration/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_duration/alerts/rule/find", + "alerting:apm.transaction_duration/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_duration/alerts/rule/getBackfill", + "alerting:apm.transaction_duration/alerts/rule/findBackfill", "alerting:apm.anomaly/observability/rule/get", "alerting:apm.anomaly/observability/rule/getRuleState", "alerting:apm.anomaly/observability/rule/getAlertSummary", @@ -8412,6 +16654,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.anomaly/observability/rule/getRuleExecutionKPI", "alerting:apm.anomaly/observability/rule/getBackfill", "alerting:apm.anomaly/observability/rule/findBackfill", + "alerting:apm.anomaly/alerts/rule/get", + "alerting:apm.anomaly/alerts/rule/getRuleState", + "alerting:apm.anomaly/alerts/rule/getAlertSummary", + "alerting:apm.anomaly/alerts/rule/getExecutionLog", + "alerting:apm.anomaly/alerts/rule/getActionErrorLog", + "alerting:apm.anomaly/alerts/rule/find", + "alerting:apm.anomaly/alerts/rule/getRuleExecutionKPI", + "alerting:apm.anomaly/alerts/rule/getBackfill", + "alerting:apm.anomaly/alerts/rule/findBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getAlertSummary", @@ -8421,6 +16672,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/findBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/get", "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.tls/observability/rule/getAlertSummary", @@ -8430,50 +16690,336 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleExecutionKPI", "alerting:xpack.synthetics.alerts.tls/observability/rule/getBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/findBackfill", - "alerting:slo.rules.burnRate/observability/alert/get", - "alerting:slo.rules.burnRate/observability/alert/find", - "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", - "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/alert/get", - "alerting:observability.rules.custom_threshold/observability/alert/find", - "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", - "alerting:.es-query/observability/alert/get", - "alerting:.es-query/observability/alert/find", - "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", - "alerting:.es-query/observability/alert/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/alert/get", - "alerting:metrics.alert.inventory.threshold/observability/alert/find", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/get", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/find", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/findBackfill", + "alerting:metrics.alert.threshold/observability/rule/get", + "alerting:metrics.alert.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/observability/rule/find", + "alerting:metrics.alert.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.threshold/alerts/rule/get", + "alerting:metrics.alert.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/alerts/rule/find", + "alerting:metrics.alert.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/get", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/find", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/get", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/find", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/get", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/find", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/get", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/find", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/findBackfill", + "alerting:logs.alert.document.count/observability/rule/get", + "alerting:logs.alert.document.count/observability/rule/getRuleState", + "alerting:logs.alert.document.count/observability/rule/getAlertSummary", + "alerting:logs.alert.document.count/observability/rule/getExecutionLog", + "alerting:logs.alert.document.count/observability/rule/getActionErrorLog", + "alerting:logs.alert.document.count/observability/rule/find", + "alerting:logs.alert.document.count/observability/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/observability/rule/getBackfill", + "alerting:logs.alert.document.count/observability/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", + "alerting:slo.rules.burnRate/observability/rule/get", + "alerting:slo.rules.burnRate/observability/rule/getRuleState", + "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", + "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", + "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/observability/rule/find", + "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/observability/rule/getBackfill", + "alerting:slo.rules.burnRate/observability/rule/findBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/get", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", + "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/observability/rule/find", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", + "alerting:.es-query/observability/rule/get", + "alerting:.es-query/observability/rule/getRuleState", + "alerting:.es-query/observability/rule/getAlertSummary", + "alerting:.es-query/observability/rule/getExecutionLog", + "alerting:.es-query/observability/rule/getActionErrorLog", + "alerting:.es-query/observability/rule/find", + "alerting:.es-query/observability/rule/getRuleExecutionKPI", + "alerting:.es-query/observability/rule/getBackfill", + "alerting:.es-query/observability/rule/findBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", "alerting:apm.error_rate/observability/alert/get", "alerting:apm.error_rate/observability/alert/find", "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.error_rate/observability/alert/getAlertSummary", + "alerting:apm.error_rate/alerts/alert/get", + "alerting:apm.error_rate/alerts/alert/find", + "alerting:apm.error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/alerts/alert/getAlertSummary", "alerting:apm.transaction_error_rate/observability/alert/get", "alerting:apm.transaction_error_rate/observability/alert/find", "alerting:apm.transaction_error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_error_rate/observability/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/alert/get", + "alerting:apm.transaction_error_rate/alerts/alert/find", + "alerting:apm.transaction_error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/alerts/alert/getAlertSummary", "alerting:apm.transaction_duration/observability/alert/get", "alerting:apm.transaction_duration/observability/alert/find", "alerting:apm.transaction_duration/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_duration/observability/alert/getAlertSummary", + "alerting:apm.transaction_duration/alerts/alert/get", + "alerting:apm.transaction_duration/alerts/alert/find", + "alerting:apm.transaction_duration/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/alerts/alert/getAlertSummary", "alerting:apm.anomaly/observability/alert/get", "alerting:apm.anomaly/observability/alert/find", "alerting:apm.anomaly/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.anomaly/observability/alert/getAlertSummary", + "alerting:apm.anomaly/alerts/alert/get", + "alerting:apm.anomaly/alerts/alert/find", + "alerting:apm.anomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/alerts/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.tls/observability/alert/get", "alerting:xpack.synthetics.alerts.tls/observability/alert/find", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/get", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/find", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAlertSummary", + "alerting:metrics.alert.threshold/observability/alert/get", + "alerting:metrics.alert.threshold/observability/alert/find", + "alerting:metrics.alert.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/alert/get", + "alerting:metrics.alert.threshold/alerts/alert/find", + "alerting:metrics.alert.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/alert/get", + "alerting:metrics.alert.inventory.threshold/observability/alert/find", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/alert/get", + "alerting:metrics.alert.inventory.threshold/alerts/alert/find", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/alert/get", + "alerting:xpack.uptime.alerts.tls/observability/alert/find", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/alert/get", + "alerting:xpack.uptime.alerts.tls/alerts/alert/find", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAlertSummary", + "alerting:logs.alert.document.count/observability/alert/get", + "alerting:logs.alert.document.count/observability/alert/find", + "alerting:logs.alert.document.count/observability/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/observability/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", + "alerting:slo.rules.burnRate/observability/alert/get", + "alerting:slo.rules.burnRate/observability/alert/find", + "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/alert/get", + "alerting:observability.rules.custom_threshold/observability/alert/find", + "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", + "alerting:.es-query/observability/alert/get", + "alerting:.es-query/observability/alert/find", + "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/observability/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", ], "read": Array [ "login:", @@ -8525,58 +17071,26 @@ export default function ({ getService }: FtrProviderContext) { "alerting:slo.rules.burnRate/slo/rule/getRuleExecutionKPI", "alerting:slo.rules.burnRate/slo/rule/getBackfill", "alerting:slo.rules.burnRate/slo/rule/findBackfill", + "alerting:slo.rules.burnRate/alerts/rule/get", + "alerting:slo.rules.burnRate/alerts/rule/getRuleState", + "alerting:slo.rules.burnRate/alerts/rule/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/rule/getExecutionLog", + "alerting:slo.rules.burnRate/alerts/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/alerts/rule/find", + "alerting:slo.rules.burnRate/alerts/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/alerts/rule/getBackfill", + "alerting:slo.rules.burnRate/alerts/rule/findBackfill", "alerting:slo.rules.burnRate/slo/alert/get", "alerting:slo.rules.burnRate/slo/alert/find", "alerting:slo.rules.burnRate/slo/alert/getAuthorizedAlertsIndices", "alerting:slo.rules.burnRate/slo/alert/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/alert/get", + "alerting:slo.rules.burnRate/alerts/alert/find", + "alerting:slo.rules.burnRate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/alerts/alert/getAlertSummary", "app:observability", "ui:navLinks/observability", "ui:observability/read", - "alerting:slo.rules.burnRate/observability/rule/get", - "alerting:slo.rules.burnRate/observability/rule/getRuleState", - "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", - "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", - "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", - "alerting:slo.rules.burnRate/observability/rule/find", - "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", - "alerting:slo.rules.burnRate/observability/rule/getBackfill", - "alerting:slo.rules.burnRate/observability/rule/findBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/get", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", - "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", - "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", - "alerting:observability.rules.custom_threshold/observability/rule/find", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", - "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", - "alerting:.es-query/observability/rule/get", - "alerting:.es-query/observability/rule/getRuleState", - "alerting:.es-query/observability/rule/getAlertSummary", - "alerting:.es-query/observability/rule/getExecutionLog", - "alerting:.es-query/observability/rule/getActionErrorLog", - "alerting:.es-query/observability/rule/find", - "alerting:.es-query/observability/rule/getRuleExecutionKPI", - "alerting:.es-query/observability/rule/getBackfill", - "alerting:.es-query/observability/rule/findBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/get", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", - "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/find", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", - "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", "alerting:apm.error_rate/observability/rule/get", "alerting:apm.error_rate/observability/rule/getRuleState", "alerting:apm.error_rate/observability/rule/getAlertSummary", @@ -8586,6 +17100,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.error_rate/observability/rule/getRuleExecutionKPI", "alerting:apm.error_rate/observability/rule/getBackfill", "alerting:apm.error_rate/observability/rule/findBackfill", + "alerting:apm.error_rate/alerts/rule/get", + "alerting:apm.error_rate/alerts/rule/getRuleState", + "alerting:apm.error_rate/alerts/rule/getAlertSummary", + "alerting:apm.error_rate/alerts/rule/getExecutionLog", + "alerting:apm.error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.error_rate/alerts/rule/find", + "alerting:apm.error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.error_rate/alerts/rule/getBackfill", + "alerting:apm.error_rate/alerts/rule/findBackfill", "alerting:apm.transaction_error_rate/observability/rule/get", "alerting:apm.transaction_error_rate/observability/rule/getRuleState", "alerting:apm.transaction_error_rate/observability/rule/getAlertSummary", @@ -8595,6 +17118,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_error_rate/observability/rule/getRuleExecutionKPI", "alerting:apm.transaction_error_rate/observability/rule/getBackfill", "alerting:apm.transaction_error_rate/observability/rule/findBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/get", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleState", + "alerting:apm.transaction_error_rate/alerts/rule/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/rule/getExecutionLog", + "alerting:apm.transaction_error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_error_rate/alerts/rule/find", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_error_rate/alerts/rule/getBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/findBackfill", "alerting:apm.transaction_duration/observability/rule/get", "alerting:apm.transaction_duration/observability/rule/getRuleState", "alerting:apm.transaction_duration/observability/rule/getAlertSummary", @@ -8604,6 +17136,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_duration/observability/rule/getRuleExecutionKPI", "alerting:apm.transaction_duration/observability/rule/getBackfill", "alerting:apm.transaction_duration/observability/rule/findBackfill", + "alerting:apm.transaction_duration/alerts/rule/get", + "alerting:apm.transaction_duration/alerts/rule/getRuleState", + "alerting:apm.transaction_duration/alerts/rule/getAlertSummary", + "alerting:apm.transaction_duration/alerts/rule/getExecutionLog", + "alerting:apm.transaction_duration/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_duration/alerts/rule/find", + "alerting:apm.transaction_duration/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_duration/alerts/rule/getBackfill", + "alerting:apm.transaction_duration/alerts/rule/findBackfill", "alerting:apm.anomaly/observability/rule/get", "alerting:apm.anomaly/observability/rule/getRuleState", "alerting:apm.anomaly/observability/rule/getAlertSummary", @@ -8613,6 +17154,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.anomaly/observability/rule/getRuleExecutionKPI", "alerting:apm.anomaly/observability/rule/getBackfill", "alerting:apm.anomaly/observability/rule/findBackfill", + "alerting:apm.anomaly/alerts/rule/get", + "alerting:apm.anomaly/alerts/rule/getRuleState", + "alerting:apm.anomaly/alerts/rule/getAlertSummary", + "alerting:apm.anomaly/alerts/rule/getExecutionLog", + "alerting:apm.anomaly/alerts/rule/getActionErrorLog", + "alerting:apm.anomaly/alerts/rule/find", + "alerting:apm.anomaly/alerts/rule/getRuleExecutionKPI", + "alerting:apm.anomaly/alerts/rule/getBackfill", + "alerting:apm.anomaly/alerts/rule/findBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getAlertSummary", @@ -8622,6 +17172,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/findBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/get", "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.tls/observability/rule/getAlertSummary", @@ -8631,50 +17190,336 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleExecutionKPI", "alerting:xpack.synthetics.alerts.tls/observability/rule/getBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/findBackfill", - "alerting:slo.rules.burnRate/observability/alert/get", - "alerting:slo.rules.burnRate/observability/alert/find", - "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", - "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/alert/get", - "alerting:observability.rules.custom_threshold/observability/alert/find", - "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", - "alerting:.es-query/observability/alert/get", - "alerting:.es-query/observability/alert/find", - "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", - "alerting:.es-query/observability/alert/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/alert/get", - "alerting:metrics.alert.inventory.threshold/observability/alert/find", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/get", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/find", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/findBackfill", + "alerting:metrics.alert.threshold/observability/rule/get", + "alerting:metrics.alert.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/observability/rule/find", + "alerting:metrics.alert.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.threshold/alerts/rule/get", + "alerting:metrics.alert.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/alerts/rule/find", + "alerting:metrics.alert.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/get", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/find", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/get", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/find", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/get", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/find", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/get", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/find", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/findBackfill", + "alerting:logs.alert.document.count/observability/rule/get", + "alerting:logs.alert.document.count/observability/rule/getRuleState", + "alerting:logs.alert.document.count/observability/rule/getAlertSummary", + "alerting:logs.alert.document.count/observability/rule/getExecutionLog", + "alerting:logs.alert.document.count/observability/rule/getActionErrorLog", + "alerting:logs.alert.document.count/observability/rule/find", + "alerting:logs.alert.document.count/observability/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/observability/rule/getBackfill", + "alerting:logs.alert.document.count/observability/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", + "alerting:slo.rules.burnRate/observability/rule/get", + "alerting:slo.rules.burnRate/observability/rule/getRuleState", + "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", + "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", + "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/observability/rule/find", + "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/observability/rule/getBackfill", + "alerting:slo.rules.burnRate/observability/rule/findBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/get", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", + "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/observability/rule/find", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", + "alerting:.es-query/observability/rule/get", + "alerting:.es-query/observability/rule/getRuleState", + "alerting:.es-query/observability/rule/getAlertSummary", + "alerting:.es-query/observability/rule/getExecutionLog", + "alerting:.es-query/observability/rule/getActionErrorLog", + "alerting:.es-query/observability/rule/find", + "alerting:.es-query/observability/rule/getRuleExecutionKPI", + "alerting:.es-query/observability/rule/getBackfill", + "alerting:.es-query/observability/rule/findBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", "alerting:apm.error_rate/observability/alert/get", "alerting:apm.error_rate/observability/alert/find", "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.error_rate/observability/alert/getAlertSummary", + "alerting:apm.error_rate/alerts/alert/get", + "alerting:apm.error_rate/alerts/alert/find", + "alerting:apm.error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/alerts/alert/getAlertSummary", "alerting:apm.transaction_error_rate/observability/alert/get", "alerting:apm.transaction_error_rate/observability/alert/find", "alerting:apm.transaction_error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_error_rate/observability/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/alert/get", + "alerting:apm.transaction_error_rate/alerts/alert/find", + "alerting:apm.transaction_error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/alerts/alert/getAlertSummary", "alerting:apm.transaction_duration/observability/alert/get", "alerting:apm.transaction_duration/observability/alert/find", "alerting:apm.transaction_duration/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_duration/observability/alert/getAlertSummary", + "alerting:apm.transaction_duration/alerts/alert/get", + "alerting:apm.transaction_duration/alerts/alert/find", + "alerting:apm.transaction_duration/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/alerts/alert/getAlertSummary", "alerting:apm.anomaly/observability/alert/get", "alerting:apm.anomaly/observability/alert/find", "alerting:apm.anomaly/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.anomaly/observability/alert/getAlertSummary", + "alerting:apm.anomaly/alerts/alert/get", + "alerting:apm.anomaly/alerts/alert/find", + "alerting:apm.anomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/alerts/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.tls/observability/alert/get", "alerting:xpack.synthetics.alerts.tls/observability/alert/find", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/get", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/find", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAlertSummary", + "alerting:metrics.alert.threshold/observability/alert/get", + "alerting:metrics.alert.threshold/observability/alert/find", + "alerting:metrics.alert.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/alert/get", + "alerting:metrics.alert.threshold/alerts/alert/find", + "alerting:metrics.alert.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/alert/get", + "alerting:metrics.alert.inventory.threshold/observability/alert/find", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/alert/get", + "alerting:metrics.alert.inventory.threshold/alerts/alert/find", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/alert/get", + "alerting:xpack.uptime.alerts.tls/observability/alert/find", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/alert/get", + "alerting:xpack.uptime.alerts.tls/alerts/alert/find", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAlertSummary", + "alerting:logs.alert.document.count/observability/alert/get", + "alerting:logs.alert.document.count/observability/alert/find", + "alerting:logs.alert.document.count/observability/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/observability/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", + "alerting:slo.rules.burnRate/observability/alert/get", + "alerting:slo.rules.burnRate/observability/alert/find", + "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/alert/get", + "alerting:observability.rules.custom_threshold/observability/alert/find", + "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", + "alerting:.es-query/observability/alert/get", + "alerting:.es-query/observability/alert/find", + "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/observability/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", ], }, "uptime": Object { @@ -8684,6 +17529,7 @@ export default function ({ getService }: FtrProviderContext) { "api:uptime-write", "api:lists-all", "api:rac", + "api:private-location-write", "app:uptime", "app:kibana", "app:synthetics", @@ -8728,30 +17574,6 @@ export default function ({ getService }: FtrProviderContext) { "saved_object:uptime-synthetics-api-key/delete", "saved_object:uptime-synthetics-api-key/bulk_delete", "saved_object:uptime-synthetics-api-key/share_to_space", - "saved_object:synthetics-private-location/bulk_get", - "saved_object:synthetics-private-location/get", - "saved_object:synthetics-private-location/find", - "saved_object:synthetics-private-location/open_point_in_time", - "saved_object:synthetics-private-location/close_point_in_time", - "saved_object:synthetics-private-location/create", - "saved_object:synthetics-private-location/bulk_create", - "saved_object:synthetics-private-location/update", - "saved_object:synthetics-private-location/bulk_update", - "saved_object:synthetics-private-location/delete", - "saved_object:synthetics-private-location/bulk_delete", - "saved_object:synthetics-private-location/share_to_space", - "saved_object:synthetics-privates-locations/bulk_get", - "saved_object:synthetics-privates-locations/get", - "saved_object:synthetics-privates-locations/find", - "saved_object:synthetics-privates-locations/open_point_in_time", - "saved_object:synthetics-privates-locations/close_point_in_time", - "saved_object:synthetics-privates-locations/create", - "saved_object:synthetics-privates-locations/bulk_create", - "saved_object:synthetics-privates-locations/update", - "saved_object:synthetics-privates-locations/bulk_update", - "saved_object:synthetics-privates-locations/delete", - "saved_object:synthetics-privates-locations/bulk_delete", - "saved_object:synthetics-privates-locations/share_to_space", "saved_object:synthetics-param/bulk_get", "saved_object:synthetics-param/get", "saved_object:synthetics-param/find", @@ -8788,6 +17610,30 @@ export default function ({ getService }: FtrProviderContext) { "saved_object:telemetry/delete", "saved_object:telemetry/bulk_delete", "saved_object:telemetry/share_to_space", + "saved_object:synthetics-private-location/bulk_get", + "saved_object:synthetics-private-location/get", + "saved_object:synthetics-private-location/find", + "saved_object:synthetics-private-location/open_point_in_time", + "saved_object:synthetics-private-location/close_point_in_time", + "saved_object:synthetics-private-location/create", + "saved_object:synthetics-private-location/bulk_create", + "saved_object:synthetics-private-location/update", + "saved_object:synthetics-private-location/bulk_update", + "saved_object:synthetics-private-location/delete", + "saved_object:synthetics-private-location/bulk_delete", + "saved_object:synthetics-private-location/share_to_space", + "saved_object:synthetics-privates-locations/bulk_get", + "saved_object:synthetics-privates-locations/get", + "saved_object:synthetics-privates-locations/find", + "saved_object:synthetics-privates-locations/open_point_in_time", + "saved_object:synthetics-privates-locations/close_point_in_time", + "saved_object:synthetics-privates-locations/create", + "saved_object:synthetics-privates-locations/bulk_create", + "saved_object:synthetics-privates-locations/update", + "saved_object:synthetics-privates-locations/bulk_update", + "saved_object:synthetics-privates-locations/delete", + "saved_object:synthetics-privates-locations/bulk_delete", + "saved_object:synthetics-privates-locations/share_to_space", "saved_object:config/bulk_get", "saved_object:config/get", "saved_object:config/find", @@ -8808,6 +17654,7 @@ export default function ({ getService }: FtrProviderContext) { "ui:uptime/show", "ui:uptime/alerting:save", "ui:uptime/elasticManagedLocationsEnabled", + "ui:uptime/canManagePrivateLocations", "alerting:xpack.uptime.alerts.tls/uptime/rule/get", "alerting:xpack.uptime.alerts.tls/uptime/rule/getRuleState", "alerting:xpack.uptime.alerts.tls/uptime/rule/getAlertSummary", @@ -8836,6 +17683,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.uptime.alerts.tls/uptime/rule/runSoon", "alerting:xpack.uptime.alerts.tls/uptime/rule/scheduleBackfill", "alerting:xpack.uptime.alerts.tls/uptime/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/get", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/find", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/create", + "alerting:xpack.uptime.alerts.tls/alerts/rule/delete", + "alerting:xpack.uptime.alerts.tls/alerts/rule/update", + "alerting:xpack.uptime.alerts.tls/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tls/alerts/rule/enable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/disable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tls/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tls/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.tls/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.tls/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/deleteBackfill", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/get", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/getRuleState", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/getAlertSummary", @@ -8864,6 +17739,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/runSoon", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/scheduleBackfill", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/create", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/delete", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/update", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/enable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/disable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/deleteBackfill", "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/get", "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/getRuleState", "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/getAlertSummary", @@ -8892,6 +17795,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/runSoon", "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/scheduleBackfill", "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/create", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/delete", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/update", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/enable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/disable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/deleteBackfill", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/get", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/getRuleState", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/getAlertSummary", @@ -8919,238 +17850,212 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/unsnooze", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/runSoon", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/scheduleBackfill", - "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/deleteBackfill", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/get", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getRuleState", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getAlertSummary", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getExecutionLog", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getActionErrorLog", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/find", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getRuleExecutionKPI", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getBackfill", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/findBackfill", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/create", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/delete", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/update", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/updateApiKey", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/enable", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/disable", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/muteAll", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/unmuteAll", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/muteAlert", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/unmuteAlert", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/snooze", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/bulkEdit", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/bulkDelete", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/bulkEnable", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/bulkDisable", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/unsnooze", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/runSoon", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/scheduleBackfill", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/deleteBackfill", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/get", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/getRuleState", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/getAlertSummary", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/getExecutionLog", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/getActionErrorLog", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/find", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/getRuleExecutionKPI", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/getBackfill", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/findBackfill", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/create", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/delete", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/update", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/updateApiKey", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/enable", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/disable", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/muteAll", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/unmuteAll", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/muteAlert", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/unmuteAlert", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/snooze", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/bulkEdit", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/bulkDelete", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/bulkEnable", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/bulkDisable", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/unsnooze", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/runSoon", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/scheduleBackfill", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/deleteBackfill", - "alerting:xpack.uptime.alerts.tls/uptime/alert/get", - "alerting:xpack.uptime.alerts.tls/uptime/alert/find", - "alerting:xpack.uptime.alerts.tls/uptime/alert/getAuthorizedAlertsIndices", - "alerting:xpack.uptime.alerts.tls/uptime/alert/getAlertSummary", - "alerting:xpack.uptime.alerts.tls/uptime/alert/update", - "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/get", - "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/find", - "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/getAuthorizedAlertsIndices", - "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/getAlertSummary", - "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/update", - "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/get", - "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/find", - "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/getAuthorizedAlertsIndices", - "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/getAlertSummary", - "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/update", - "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/get", - "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/find", - "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/getAuthorizedAlertsIndices", - "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/getAlertSummary", - "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/update", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/get", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/find", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/getAuthorizedAlertsIndices", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/getAlertSummary", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/update", - "alerting:xpack.synthetics.alerts.tls/uptime/alert/get", - "alerting:xpack.synthetics.alerts.tls/uptime/alert/find", - "alerting:xpack.synthetics.alerts.tls/uptime/alert/getAuthorizedAlertsIndices", - "alerting:xpack.synthetics.alerts.tls/uptime/alert/getAlertSummary", - "alerting:xpack.synthetics.alerts.tls/uptime/alert/update", - "app:observability", - "ui:catalogue/observability", - "ui:navLinks/observability", - "ui:observability/read", - "ui:observability/write", - "alerting:slo.rules.burnRate/observability/rule/get", - "alerting:slo.rules.burnRate/observability/rule/getRuleState", - "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", - "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", - "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", - "alerting:slo.rules.burnRate/observability/rule/find", - "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", - "alerting:slo.rules.burnRate/observability/rule/getBackfill", - "alerting:slo.rules.burnRate/observability/rule/findBackfill", - "alerting:slo.rules.burnRate/observability/rule/create", - "alerting:slo.rules.burnRate/observability/rule/delete", - "alerting:slo.rules.burnRate/observability/rule/update", - "alerting:slo.rules.burnRate/observability/rule/updateApiKey", - "alerting:slo.rules.burnRate/observability/rule/enable", - "alerting:slo.rules.burnRate/observability/rule/disable", - "alerting:slo.rules.burnRate/observability/rule/muteAll", - "alerting:slo.rules.burnRate/observability/rule/unmuteAll", - "alerting:slo.rules.burnRate/observability/rule/muteAlert", - "alerting:slo.rules.burnRate/observability/rule/unmuteAlert", - "alerting:slo.rules.burnRate/observability/rule/snooze", - "alerting:slo.rules.burnRate/observability/rule/bulkEdit", - "alerting:slo.rules.burnRate/observability/rule/bulkDelete", - "alerting:slo.rules.burnRate/observability/rule/bulkEnable", - "alerting:slo.rules.burnRate/observability/rule/bulkDisable", - "alerting:slo.rules.burnRate/observability/rule/unsnooze", - "alerting:slo.rules.burnRate/observability/rule/runSoon", - "alerting:slo.rules.burnRate/observability/rule/scheduleBackfill", - "alerting:slo.rules.burnRate/observability/rule/deleteBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/get", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", - "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", - "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", - "alerting:observability.rules.custom_threshold/observability/rule/find", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", - "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/create", - "alerting:observability.rules.custom_threshold/observability/rule/delete", - "alerting:observability.rules.custom_threshold/observability/rule/update", - "alerting:observability.rules.custom_threshold/observability/rule/updateApiKey", - "alerting:observability.rules.custom_threshold/observability/rule/enable", - "alerting:observability.rules.custom_threshold/observability/rule/disable", - "alerting:observability.rules.custom_threshold/observability/rule/muteAll", - "alerting:observability.rules.custom_threshold/observability/rule/unmuteAll", - "alerting:observability.rules.custom_threshold/observability/rule/muteAlert", - "alerting:observability.rules.custom_threshold/observability/rule/unmuteAlert", - "alerting:observability.rules.custom_threshold/observability/rule/snooze", - "alerting:observability.rules.custom_threshold/observability/rule/bulkEdit", - "alerting:observability.rules.custom_threshold/observability/rule/bulkDelete", - "alerting:observability.rules.custom_threshold/observability/rule/bulkEnable", - "alerting:observability.rules.custom_threshold/observability/rule/bulkDisable", - "alerting:observability.rules.custom_threshold/observability/rule/unsnooze", - "alerting:observability.rules.custom_threshold/observability/rule/runSoon", - "alerting:observability.rules.custom_threshold/observability/rule/scheduleBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/deleteBackfill", - "alerting:.es-query/observability/rule/get", - "alerting:.es-query/observability/rule/getRuleState", - "alerting:.es-query/observability/rule/getAlertSummary", - "alerting:.es-query/observability/rule/getExecutionLog", - "alerting:.es-query/observability/rule/getActionErrorLog", - "alerting:.es-query/observability/rule/find", - "alerting:.es-query/observability/rule/getRuleExecutionKPI", - "alerting:.es-query/observability/rule/getBackfill", - "alerting:.es-query/observability/rule/findBackfill", - "alerting:.es-query/observability/rule/create", - "alerting:.es-query/observability/rule/delete", - "alerting:.es-query/observability/rule/update", - "alerting:.es-query/observability/rule/updateApiKey", - "alerting:.es-query/observability/rule/enable", - "alerting:.es-query/observability/rule/disable", - "alerting:.es-query/observability/rule/muteAll", - "alerting:.es-query/observability/rule/unmuteAll", - "alerting:.es-query/observability/rule/muteAlert", - "alerting:.es-query/observability/rule/unmuteAlert", - "alerting:.es-query/observability/rule/snooze", - "alerting:.es-query/observability/rule/bulkEdit", - "alerting:.es-query/observability/rule/bulkDelete", - "alerting:.es-query/observability/rule/bulkEnable", - "alerting:.es-query/observability/rule/bulkDisable", - "alerting:.es-query/observability/rule/unsnooze", - "alerting:.es-query/observability/rule/runSoon", - "alerting:.es-query/observability/rule/scheduleBackfill", - "alerting:.es-query/observability/rule/deleteBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/create", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/delete", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/update", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/updateApiKey", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/enable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/disable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAll", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAll", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAlert", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAlert", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/snooze", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEdit", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDelete", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEnable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDisable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unsnooze", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/runSoon", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/scheduleBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/deleteBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/get", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", - "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/find", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", - "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/create", - "alerting:metrics.alert.inventory.threshold/observability/rule/delete", - "alerting:metrics.alert.inventory.threshold/observability/rule/update", - "alerting:metrics.alert.inventory.threshold/observability/rule/updateApiKey", - "alerting:metrics.alert.inventory.threshold/observability/rule/enable", - "alerting:metrics.alert.inventory.threshold/observability/rule/disable", - "alerting:metrics.alert.inventory.threshold/observability/rule/muteAll", - "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAll", - "alerting:metrics.alert.inventory.threshold/observability/rule/muteAlert", - "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAlert", - "alerting:metrics.alert.inventory.threshold/observability/rule/snooze", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEdit", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDelete", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEnable", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDisable", - "alerting:metrics.alert.inventory.threshold/observability/rule/unsnooze", - "alerting:metrics.alert.inventory.threshold/observability/rule/runSoon", - "alerting:metrics.alert.inventory.threshold/observability/rule/scheduleBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/create", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/delete", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/update", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/enable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/disable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/deleteBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/get", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getRuleState", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/find", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/findBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/create", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/delete", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/update", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/updateApiKey", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/enable", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/disable", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/muteAll", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/unmuteAll", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/muteAlert", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/unmuteAlert", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/snooze", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/bulkEdit", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/bulkDelete", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/bulkEnable", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/unsnooze", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/runSoon", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/deleteBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/create", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/delete", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/update", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/updateApiKey", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/enable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/disable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/muteAll", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unmuteAll", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/muteAlert", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unmuteAlert", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/snooze", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkEdit", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkDelete", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkEnable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unsnooze", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/runSoon", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/deleteBackfill", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/get", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/getRuleState", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/find", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/getBackfill", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/findBackfill", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/create", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/delete", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/update", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/updateApiKey", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/enable", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/disable", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/muteAll", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/unmuteAll", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/muteAlert", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/unmuteAlert", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/snooze", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/bulkEdit", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/bulkDelete", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/bulkEnable", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/unsnooze", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/runSoon", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/deleteBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/get", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/find", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/create", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/delete", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/update", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/updateApiKey", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/enable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/disable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/muteAll", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unmuteAll", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/muteAlert", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unmuteAlert", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/snooze", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkEdit", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkDelete", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkEnable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unsnooze", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/runSoon", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tls/uptime/alert/get", + "alerting:xpack.uptime.alerts.tls/uptime/alert/find", + "alerting:xpack.uptime.alerts.tls/uptime/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/uptime/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/uptime/alert/update", + "alerting:xpack.uptime.alerts.tls/alerts/alert/get", + "alerting:xpack.uptime.alerts.tls/alerts/alert/find", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/alert/update", + "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/update", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/update", + "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/update", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/update", + "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/update", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/update", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/update", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/update", + "alerting:xpack.synthetics.alerts.tls/uptime/alert/get", + "alerting:xpack.synthetics.alerts.tls/uptime/alert/find", + "alerting:xpack.synthetics.alerts.tls/uptime/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/uptime/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/uptime/alert/update", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/get", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/find", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/update", + "app:observability", + "ui:catalogue/observability", + "ui:navLinks/observability", + "ui:observability/read", + "ui:observability/write", "alerting:apm.error_rate/observability/rule/get", "alerting:apm.error_rate/observability/rule/getRuleState", "alerting:apm.error_rate/observability/rule/getAlertSummary", @@ -9179,6 +18084,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.error_rate/observability/rule/runSoon", "alerting:apm.error_rate/observability/rule/scheduleBackfill", "alerting:apm.error_rate/observability/rule/deleteBackfill", + "alerting:apm.error_rate/alerts/rule/get", + "alerting:apm.error_rate/alerts/rule/getRuleState", + "alerting:apm.error_rate/alerts/rule/getAlertSummary", + "alerting:apm.error_rate/alerts/rule/getExecutionLog", + "alerting:apm.error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.error_rate/alerts/rule/find", + "alerting:apm.error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.error_rate/alerts/rule/getBackfill", + "alerting:apm.error_rate/alerts/rule/findBackfill", + "alerting:apm.error_rate/alerts/rule/create", + "alerting:apm.error_rate/alerts/rule/delete", + "alerting:apm.error_rate/alerts/rule/update", + "alerting:apm.error_rate/alerts/rule/updateApiKey", + "alerting:apm.error_rate/alerts/rule/enable", + "alerting:apm.error_rate/alerts/rule/disable", + "alerting:apm.error_rate/alerts/rule/muteAll", + "alerting:apm.error_rate/alerts/rule/unmuteAll", + "alerting:apm.error_rate/alerts/rule/muteAlert", + "alerting:apm.error_rate/alerts/rule/unmuteAlert", + "alerting:apm.error_rate/alerts/rule/snooze", + "alerting:apm.error_rate/alerts/rule/bulkEdit", + "alerting:apm.error_rate/alerts/rule/bulkDelete", + "alerting:apm.error_rate/alerts/rule/bulkEnable", + "alerting:apm.error_rate/alerts/rule/bulkDisable", + "alerting:apm.error_rate/alerts/rule/unsnooze", + "alerting:apm.error_rate/alerts/rule/runSoon", + "alerting:apm.error_rate/alerts/rule/scheduleBackfill", + "alerting:apm.error_rate/alerts/rule/deleteBackfill", "alerting:apm.transaction_error_rate/observability/rule/get", "alerting:apm.transaction_error_rate/observability/rule/getRuleState", "alerting:apm.transaction_error_rate/observability/rule/getAlertSummary", @@ -9207,6 +18140,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_error_rate/observability/rule/runSoon", "alerting:apm.transaction_error_rate/observability/rule/scheduleBackfill", "alerting:apm.transaction_error_rate/observability/rule/deleteBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/get", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleState", + "alerting:apm.transaction_error_rate/alerts/rule/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/rule/getExecutionLog", + "alerting:apm.transaction_error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_error_rate/alerts/rule/find", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_error_rate/alerts/rule/getBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/findBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/create", + "alerting:apm.transaction_error_rate/alerts/rule/delete", + "alerting:apm.transaction_error_rate/alerts/rule/update", + "alerting:apm.transaction_error_rate/alerts/rule/updateApiKey", + "alerting:apm.transaction_error_rate/alerts/rule/enable", + "alerting:apm.transaction_error_rate/alerts/rule/disable", + "alerting:apm.transaction_error_rate/alerts/rule/muteAll", + "alerting:apm.transaction_error_rate/alerts/rule/unmuteAll", + "alerting:apm.transaction_error_rate/alerts/rule/muteAlert", + "alerting:apm.transaction_error_rate/alerts/rule/unmuteAlert", + "alerting:apm.transaction_error_rate/alerts/rule/snooze", + "alerting:apm.transaction_error_rate/alerts/rule/bulkEdit", + "alerting:apm.transaction_error_rate/alerts/rule/bulkDelete", + "alerting:apm.transaction_error_rate/alerts/rule/bulkEnable", + "alerting:apm.transaction_error_rate/alerts/rule/bulkDisable", + "alerting:apm.transaction_error_rate/alerts/rule/unsnooze", + "alerting:apm.transaction_error_rate/alerts/rule/runSoon", + "alerting:apm.transaction_error_rate/alerts/rule/scheduleBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/deleteBackfill", "alerting:apm.transaction_duration/observability/rule/get", "alerting:apm.transaction_duration/observability/rule/getRuleState", "alerting:apm.transaction_duration/observability/rule/getAlertSummary", @@ -9235,6 +18196,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_duration/observability/rule/runSoon", "alerting:apm.transaction_duration/observability/rule/scheduleBackfill", "alerting:apm.transaction_duration/observability/rule/deleteBackfill", + "alerting:apm.transaction_duration/alerts/rule/get", + "alerting:apm.transaction_duration/alerts/rule/getRuleState", + "alerting:apm.transaction_duration/alerts/rule/getAlertSummary", + "alerting:apm.transaction_duration/alerts/rule/getExecutionLog", + "alerting:apm.transaction_duration/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_duration/alerts/rule/find", + "alerting:apm.transaction_duration/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_duration/alerts/rule/getBackfill", + "alerting:apm.transaction_duration/alerts/rule/findBackfill", + "alerting:apm.transaction_duration/alerts/rule/create", + "alerting:apm.transaction_duration/alerts/rule/delete", + "alerting:apm.transaction_duration/alerts/rule/update", + "alerting:apm.transaction_duration/alerts/rule/updateApiKey", + "alerting:apm.transaction_duration/alerts/rule/enable", + "alerting:apm.transaction_duration/alerts/rule/disable", + "alerting:apm.transaction_duration/alerts/rule/muteAll", + "alerting:apm.transaction_duration/alerts/rule/unmuteAll", + "alerting:apm.transaction_duration/alerts/rule/muteAlert", + "alerting:apm.transaction_duration/alerts/rule/unmuteAlert", + "alerting:apm.transaction_duration/alerts/rule/snooze", + "alerting:apm.transaction_duration/alerts/rule/bulkEdit", + "alerting:apm.transaction_duration/alerts/rule/bulkDelete", + "alerting:apm.transaction_duration/alerts/rule/bulkEnable", + "alerting:apm.transaction_duration/alerts/rule/bulkDisable", + "alerting:apm.transaction_duration/alerts/rule/unsnooze", + "alerting:apm.transaction_duration/alerts/rule/runSoon", + "alerting:apm.transaction_duration/alerts/rule/scheduleBackfill", + "alerting:apm.transaction_duration/alerts/rule/deleteBackfill", "alerting:apm.anomaly/observability/rule/get", "alerting:apm.anomaly/observability/rule/getRuleState", "alerting:apm.anomaly/observability/rule/getAlertSummary", @@ -9263,6 +18252,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.anomaly/observability/rule/runSoon", "alerting:apm.anomaly/observability/rule/scheduleBackfill", "alerting:apm.anomaly/observability/rule/deleteBackfill", + "alerting:apm.anomaly/alerts/rule/get", + "alerting:apm.anomaly/alerts/rule/getRuleState", + "alerting:apm.anomaly/alerts/rule/getAlertSummary", + "alerting:apm.anomaly/alerts/rule/getExecutionLog", + "alerting:apm.anomaly/alerts/rule/getActionErrorLog", + "alerting:apm.anomaly/alerts/rule/find", + "alerting:apm.anomaly/alerts/rule/getRuleExecutionKPI", + "alerting:apm.anomaly/alerts/rule/getBackfill", + "alerting:apm.anomaly/alerts/rule/findBackfill", + "alerting:apm.anomaly/alerts/rule/create", + "alerting:apm.anomaly/alerts/rule/delete", + "alerting:apm.anomaly/alerts/rule/update", + "alerting:apm.anomaly/alerts/rule/updateApiKey", + "alerting:apm.anomaly/alerts/rule/enable", + "alerting:apm.anomaly/alerts/rule/disable", + "alerting:apm.anomaly/alerts/rule/muteAll", + "alerting:apm.anomaly/alerts/rule/unmuteAll", + "alerting:apm.anomaly/alerts/rule/muteAlert", + "alerting:apm.anomaly/alerts/rule/unmuteAlert", + "alerting:apm.anomaly/alerts/rule/snooze", + "alerting:apm.anomaly/alerts/rule/bulkEdit", + "alerting:apm.anomaly/alerts/rule/bulkDelete", + "alerting:apm.anomaly/alerts/rule/bulkEnable", + "alerting:apm.anomaly/alerts/rule/bulkDisable", + "alerting:apm.anomaly/alerts/rule/unsnooze", + "alerting:apm.anomaly/alerts/rule/runSoon", + "alerting:apm.anomaly/alerts/rule/scheduleBackfill", + "alerting:apm.anomaly/alerts/rule/deleteBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getAlertSummary", @@ -9319,51 +18336,550 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/rule/runSoon", "alerting:xpack.synthetics.alerts.tls/observability/rule/scheduleBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/deleteBackfill", - "alerting:slo.rules.burnRate/observability/alert/get", - "alerting:slo.rules.burnRate/observability/alert/find", - "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", - "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", - "alerting:slo.rules.burnRate/observability/alert/update", - "alerting:observability.rules.custom_threshold/observability/alert/get", - "alerting:observability.rules.custom_threshold/observability/alert/find", - "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/alert/update", - "alerting:.es-query/observability/alert/get", - "alerting:.es-query/observability/alert/find", - "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", - "alerting:.es-query/observability/alert/getAlertSummary", - "alerting:.es-query/observability/alert/update", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/update", - "alerting:metrics.alert.inventory.threshold/observability/alert/get", - "alerting:metrics.alert.inventory.threshold/observability/alert/find", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/alert/update", + "alerting:metrics.alert.threshold/observability/rule/get", + "alerting:metrics.alert.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/observability/rule/find", + "alerting:metrics.alert.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.threshold/observability/rule/create", + "alerting:metrics.alert.threshold/observability/rule/delete", + "alerting:metrics.alert.threshold/observability/rule/update", + "alerting:metrics.alert.threshold/observability/rule/updateApiKey", + "alerting:metrics.alert.threshold/observability/rule/enable", + "alerting:metrics.alert.threshold/observability/rule/disable", + "alerting:metrics.alert.threshold/observability/rule/muteAll", + "alerting:metrics.alert.threshold/observability/rule/unmuteAll", + "alerting:metrics.alert.threshold/observability/rule/muteAlert", + "alerting:metrics.alert.threshold/observability/rule/unmuteAlert", + "alerting:metrics.alert.threshold/observability/rule/snooze", + "alerting:metrics.alert.threshold/observability/rule/bulkEdit", + "alerting:metrics.alert.threshold/observability/rule/bulkDelete", + "alerting:metrics.alert.threshold/observability/rule/bulkEnable", + "alerting:metrics.alert.threshold/observability/rule/bulkDisable", + "alerting:metrics.alert.threshold/observability/rule/unsnooze", + "alerting:metrics.alert.threshold/observability/rule/runSoon", + "alerting:metrics.alert.threshold/observability/rule/scheduleBackfill", + "alerting:metrics.alert.threshold/observability/rule/deleteBackfill", + "alerting:metrics.alert.threshold/alerts/rule/get", + "alerting:metrics.alert.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/alerts/rule/find", + "alerting:metrics.alert.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.threshold/alerts/rule/create", + "alerting:metrics.alert.threshold/alerts/rule/delete", + "alerting:metrics.alert.threshold/alerts/rule/update", + "alerting:metrics.alert.threshold/alerts/rule/updateApiKey", + "alerting:metrics.alert.threshold/alerts/rule/enable", + "alerting:metrics.alert.threshold/alerts/rule/disable", + "alerting:metrics.alert.threshold/alerts/rule/muteAll", + "alerting:metrics.alert.threshold/alerts/rule/unmuteAll", + "alerting:metrics.alert.threshold/alerts/rule/muteAlert", + "alerting:metrics.alert.threshold/alerts/rule/unmuteAlert", + "alerting:metrics.alert.threshold/alerts/rule/snooze", + "alerting:metrics.alert.threshold/alerts/rule/bulkEdit", + "alerting:metrics.alert.threshold/alerts/rule/bulkDelete", + "alerting:metrics.alert.threshold/alerts/rule/bulkEnable", + "alerting:metrics.alert.threshold/alerts/rule/bulkDisable", + "alerting:metrics.alert.threshold/alerts/rule/unsnooze", + "alerting:metrics.alert.threshold/alerts/rule/runSoon", + "alerting:metrics.alert.threshold/alerts/rule/scheduleBackfill", + "alerting:metrics.alert.threshold/alerts/rule/deleteBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/get", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/find", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/create", + "alerting:metrics.alert.inventory.threshold/observability/rule/delete", + "alerting:metrics.alert.inventory.threshold/observability/rule/update", + "alerting:metrics.alert.inventory.threshold/observability/rule/updateApiKey", + "alerting:metrics.alert.inventory.threshold/observability/rule/enable", + "alerting:metrics.alert.inventory.threshold/observability/rule/disable", + "alerting:metrics.alert.inventory.threshold/observability/rule/muteAll", + "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAll", + "alerting:metrics.alert.inventory.threshold/observability/rule/muteAlert", + "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAlert", + "alerting:metrics.alert.inventory.threshold/observability/rule/snooze", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEdit", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDelete", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEnable", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDisable", + "alerting:metrics.alert.inventory.threshold/observability/rule/unsnooze", + "alerting:metrics.alert.inventory.threshold/observability/rule/runSoon", + "alerting:metrics.alert.inventory.threshold/observability/rule/scheduleBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/deleteBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/get", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/find", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/create", + "alerting:metrics.alert.inventory.threshold/alerts/rule/delete", + "alerting:metrics.alert.inventory.threshold/alerts/rule/update", + "alerting:metrics.alert.inventory.threshold/alerts/rule/updateApiKey", + "alerting:metrics.alert.inventory.threshold/alerts/rule/enable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/disable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/muteAll", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unmuteAll", + "alerting:metrics.alert.inventory.threshold/alerts/rule/muteAlert", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unmuteAlert", + "alerting:metrics.alert.inventory.threshold/alerts/rule/snooze", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkEdit", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkDelete", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkEnable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkDisable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unsnooze", + "alerting:metrics.alert.inventory.threshold/alerts/rule/runSoon", + "alerting:metrics.alert.inventory.threshold/alerts/rule/scheduleBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/get", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/find", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/create", + "alerting:xpack.uptime.alerts.tls/observability/rule/delete", + "alerting:xpack.uptime.alerts.tls/observability/rule/update", + "alerting:xpack.uptime.alerts.tls/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tls/observability/rule/enable", + "alerting:xpack.uptime.alerts.tls/observability/rule/disable", + "alerting:xpack.uptime.alerts.tls/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.tls/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tls/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.tls/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tls/observability/rule/snooze", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tls/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.tls/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.tls/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/create", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/delete", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/update", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/enable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/disable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/snooze", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/create", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/delete", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/update", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/enable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/disable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/snooze", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/create", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/delete", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/update", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/enable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/disable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/snooze", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/deleteBackfill", + "alerting:logs.alert.document.count/observability/rule/get", + "alerting:logs.alert.document.count/observability/rule/getRuleState", + "alerting:logs.alert.document.count/observability/rule/getAlertSummary", + "alerting:logs.alert.document.count/observability/rule/getExecutionLog", + "alerting:logs.alert.document.count/observability/rule/getActionErrorLog", + "alerting:logs.alert.document.count/observability/rule/find", + "alerting:logs.alert.document.count/observability/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/observability/rule/getBackfill", + "alerting:logs.alert.document.count/observability/rule/findBackfill", + "alerting:logs.alert.document.count/observability/rule/create", + "alerting:logs.alert.document.count/observability/rule/delete", + "alerting:logs.alert.document.count/observability/rule/update", + "alerting:logs.alert.document.count/observability/rule/updateApiKey", + "alerting:logs.alert.document.count/observability/rule/enable", + "alerting:logs.alert.document.count/observability/rule/disable", + "alerting:logs.alert.document.count/observability/rule/muteAll", + "alerting:logs.alert.document.count/observability/rule/unmuteAll", + "alerting:logs.alert.document.count/observability/rule/muteAlert", + "alerting:logs.alert.document.count/observability/rule/unmuteAlert", + "alerting:logs.alert.document.count/observability/rule/snooze", + "alerting:logs.alert.document.count/observability/rule/bulkEdit", + "alerting:logs.alert.document.count/observability/rule/bulkDelete", + "alerting:logs.alert.document.count/observability/rule/bulkEnable", + "alerting:logs.alert.document.count/observability/rule/bulkDisable", + "alerting:logs.alert.document.count/observability/rule/unsnooze", + "alerting:logs.alert.document.count/observability/rule/runSoon", + "alerting:logs.alert.document.count/observability/rule/scheduleBackfill", + "alerting:logs.alert.document.count/observability/rule/deleteBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/create", + "alerting:logs.alert.document.count/alerts/rule/delete", + "alerting:logs.alert.document.count/alerts/rule/update", + "alerting:logs.alert.document.count/alerts/rule/updateApiKey", + "alerting:logs.alert.document.count/alerts/rule/enable", + "alerting:logs.alert.document.count/alerts/rule/disable", + "alerting:logs.alert.document.count/alerts/rule/muteAll", + "alerting:logs.alert.document.count/alerts/rule/unmuteAll", + "alerting:logs.alert.document.count/alerts/rule/muteAlert", + "alerting:logs.alert.document.count/alerts/rule/unmuteAlert", + "alerting:logs.alert.document.count/alerts/rule/snooze", + "alerting:logs.alert.document.count/alerts/rule/bulkEdit", + "alerting:logs.alert.document.count/alerts/rule/bulkDelete", + "alerting:logs.alert.document.count/alerts/rule/bulkEnable", + "alerting:logs.alert.document.count/alerts/rule/bulkDisable", + "alerting:logs.alert.document.count/alerts/rule/unsnooze", + "alerting:logs.alert.document.count/alerts/rule/runSoon", + "alerting:logs.alert.document.count/alerts/rule/scheduleBackfill", + "alerting:logs.alert.document.count/alerts/rule/deleteBackfill", + "alerting:slo.rules.burnRate/observability/rule/get", + "alerting:slo.rules.burnRate/observability/rule/getRuleState", + "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", + "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", + "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/observability/rule/find", + "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/observability/rule/getBackfill", + "alerting:slo.rules.burnRate/observability/rule/findBackfill", + "alerting:slo.rules.burnRate/observability/rule/create", + "alerting:slo.rules.burnRate/observability/rule/delete", + "alerting:slo.rules.burnRate/observability/rule/update", + "alerting:slo.rules.burnRate/observability/rule/updateApiKey", + "alerting:slo.rules.burnRate/observability/rule/enable", + "alerting:slo.rules.burnRate/observability/rule/disable", + "alerting:slo.rules.burnRate/observability/rule/muteAll", + "alerting:slo.rules.burnRate/observability/rule/unmuteAll", + "alerting:slo.rules.burnRate/observability/rule/muteAlert", + "alerting:slo.rules.burnRate/observability/rule/unmuteAlert", + "alerting:slo.rules.burnRate/observability/rule/snooze", + "alerting:slo.rules.burnRate/observability/rule/bulkEdit", + "alerting:slo.rules.burnRate/observability/rule/bulkDelete", + "alerting:slo.rules.burnRate/observability/rule/bulkEnable", + "alerting:slo.rules.burnRate/observability/rule/bulkDisable", + "alerting:slo.rules.burnRate/observability/rule/unsnooze", + "alerting:slo.rules.burnRate/observability/rule/runSoon", + "alerting:slo.rules.burnRate/observability/rule/scheduleBackfill", + "alerting:slo.rules.burnRate/observability/rule/deleteBackfill", + "alerting:slo.rules.burnRate/alerts/rule/get", + "alerting:slo.rules.burnRate/alerts/rule/getRuleState", + "alerting:slo.rules.burnRate/alerts/rule/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/rule/getExecutionLog", + "alerting:slo.rules.burnRate/alerts/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/alerts/rule/find", + "alerting:slo.rules.burnRate/alerts/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/alerts/rule/getBackfill", + "alerting:slo.rules.burnRate/alerts/rule/findBackfill", + "alerting:slo.rules.burnRate/alerts/rule/create", + "alerting:slo.rules.burnRate/alerts/rule/delete", + "alerting:slo.rules.burnRate/alerts/rule/update", + "alerting:slo.rules.burnRate/alerts/rule/updateApiKey", + "alerting:slo.rules.burnRate/alerts/rule/enable", + "alerting:slo.rules.burnRate/alerts/rule/disable", + "alerting:slo.rules.burnRate/alerts/rule/muteAll", + "alerting:slo.rules.burnRate/alerts/rule/unmuteAll", + "alerting:slo.rules.burnRate/alerts/rule/muteAlert", + "alerting:slo.rules.burnRate/alerts/rule/unmuteAlert", + "alerting:slo.rules.burnRate/alerts/rule/snooze", + "alerting:slo.rules.burnRate/alerts/rule/bulkEdit", + "alerting:slo.rules.burnRate/alerts/rule/bulkDelete", + "alerting:slo.rules.burnRate/alerts/rule/bulkEnable", + "alerting:slo.rules.burnRate/alerts/rule/bulkDisable", + "alerting:slo.rules.burnRate/alerts/rule/unsnooze", + "alerting:slo.rules.burnRate/alerts/rule/runSoon", + "alerting:slo.rules.burnRate/alerts/rule/scheduleBackfill", + "alerting:slo.rules.burnRate/alerts/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/get", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", + "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/observability/rule/find", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/create", + "alerting:observability.rules.custom_threshold/observability/rule/delete", + "alerting:observability.rules.custom_threshold/observability/rule/update", + "alerting:observability.rules.custom_threshold/observability/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/observability/rule/enable", + "alerting:observability.rules.custom_threshold/observability/rule/disable", + "alerting:observability.rules.custom_threshold/observability/rule/muteAll", + "alerting:observability.rules.custom_threshold/observability/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/observability/rule/muteAlert", + "alerting:observability.rules.custom_threshold/observability/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/observability/rule/snooze", + "alerting:observability.rules.custom_threshold/observability/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/observability/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/observability/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/observability/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/observability/rule/unsnooze", + "alerting:observability.rules.custom_threshold/observability/rule/runSoon", + "alerting:observability.rules.custom_threshold/observability/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/create", + "alerting:observability.rules.custom_threshold/alerts/rule/delete", + "alerting:observability.rules.custom_threshold/alerts/rule/update", + "alerting:observability.rules.custom_threshold/alerts/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/alerts/rule/enable", + "alerting:observability.rules.custom_threshold/alerts/rule/disable", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/snooze", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/alerts/rule/unsnooze", + "alerting:observability.rules.custom_threshold/alerts/rule/runSoon", + "alerting:observability.rules.custom_threshold/alerts/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/deleteBackfill", + "alerting:.es-query/observability/rule/get", + "alerting:.es-query/observability/rule/getRuleState", + "alerting:.es-query/observability/rule/getAlertSummary", + "alerting:.es-query/observability/rule/getExecutionLog", + "alerting:.es-query/observability/rule/getActionErrorLog", + "alerting:.es-query/observability/rule/find", + "alerting:.es-query/observability/rule/getRuleExecutionKPI", + "alerting:.es-query/observability/rule/getBackfill", + "alerting:.es-query/observability/rule/findBackfill", + "alerting:.es-query/observability/rule/create", + "alerting:.es-query/observability/rule/delete", + "alerting:.es-query/observability/rule/update", + "alerting:.es-query/observability/rule/updateApiKey", + "alerting:.es-query/observability/rule/enable", + "alerting:.es-query/observability/rule/disable", + "alerting:.es-query/observability/rule/muteAll", + "alerting:.es-query/observability/rule/unmuteAll", + "alerting:.es-query/observability/rule/muteAlert", + "alerting:.es-query/observability/rule/unmuteAlert", + "alerting:.es-query/observability/rule/snooze", + "alerting:.es-query/observability/rule/bulkEdit", + "alerting:.es-query/observability/rule/bulkDelete", + "alerting:.es-query/observability/rule/bulkEnable", + "alerting:.es-query/observability/rule/bulkDisable", + "alerting:.es-query/observability/rule/unsnooze", + "alerting:.es-query/observability/rule/runSoon", + "alerting:.es-query/observability/rule/scheduleBackfill", + "alerting:.es-query/observability/rule/deleteBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", + "alerting:.es-query/alerts/rule/create", + "alerting:.es-query/alerts/rule/delete", + "alerting:.es-query/alerts/rule/update", + "alerting:.es-query/alerts/rule/updateApiKey", + "alerting:.es-query/alerts/rule/enable", + "alerting:.es-query/alerts/rule/disable", + "alerting:.es-query/alerts/rule/muteAll", + "alerting:.es-query/alerts/rule/unmuteAll", + "alerting:.es-query/alerts/rule/muteAlert", + "alerting:.es-query/alerts/rule/unmuteAlert", + "alerting:.es-query/alerts/rule/snooze", + "alerting:.es-query/alerts/rule/bulkEdit", + "alerting:.es-query/alerts/rule/bulkDelete", + "alerting:.es-query/alerts/rule/bulkEnable", + "alerting:.es-query/alerts/rule/bulkDisable", + "alerting:.es-query/alerts/rule/unsnooze", + "alerting:.es-query/alerts/rule/runSoon", + "alerting:.es-query/alerts/rule/scheduleBackfill", + "alerting:.es-query/alerts/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/deleteBackfill", "alerting:apm.error_rate/observability/alert/get", "alerting:apm.error_rate/observability/alert/find", "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.error_rate/observability/alert/getAlertSummary", "alerting:apm.error_rate/observability/alert/update", + "alerting:apm.error_rate/alerts/alert/get", + "alerting:apm.error_rate/alerts/alert/find", + "alerting:apm.error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/alerts/alert/getAlertSummary", + "alerting:apm.error_rate/alerts/alert/update", "alerting:apm.transaction_error_rate/observability/alert/get", "alerting:apm.transaction_error_rate/observability/alert/find", "alerting:apm.transaction_error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_error_rate/observability/alert/getAlertSummary", "alerting:apm.transaction_error_rate/observability/alert/update", + "alerting:apm.transaction_error_rate/alerts/alert/get", + "alerting:apm.transaction_error_rate/alerts/alert/find", + "alerting:apm.transaction_error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/alerts/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/alert/update", "alerting:apm.transaction_duration/observability/alert/get", "alerting:apm.transaction_duration/observability/alert/find", "alerting:apm.transaction_duration/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_duration/observability/alert/getAlertSummary", "alerting:apm.transaction_duration/observability/alert/update", + "alerting:apm.transaction_duration/alerts/alert/get", + "alerting:apm.transaction_duration/alerts/alert/find", + "alerting:apm.transaction_duration/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/alerts/alert/getAlertSummary", + "alerting:apm.transaction_duration/alerts/alert/update", "alerting:apm.anomaly/observability/alert/get", "alerting:apm.anomaly/observability/alert/find", "alerting:apm.anomaly/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.anomaly/observability/alert/getAlertSummary", "alerting:apm.anomaly/observability/alert/update", + "alerting:apm.anomaly/alerts/alert/get", + "alerting:apm.anomaly/alerts/alert/find", + "alerting:apm.anomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/alerts/alert/getAlertSummary", + "alerting:apm.anomaly/alerts/alert/update", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", @@ -9374,6 +18890,125 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.tls/observability/alert/update", + "alerting:metrics.alert.threshold/observability/alert/get", + "alerting:metrics.alert.threshold/observability/alert/find", + "alerting:metrics.alert.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.threshold/observability/alert/update", + "alerting:metrics.alert.threshold/alerts/alert/get", + "alerting:metrics.alert.threshold/alerts/alert/find", + "alerting:metrics.alert.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/alert/update", + "alerting:metrics.alert.inventory.threshold/observability/alert/get", + "alerting:metrics.alert.inventory.threshold/observability/alert/find", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/alert/update", + "alerting:metrics.alert.inventory.threshold/alerts/alert/get", + "alerting:metrics.alert.inventory.threshold/alerts/alert/find", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/alert/update", + "alerting:xpack.uptime.alerts.tls/observability/alert/get", + "alerting:xpack.uptime.alerts.tls/observability/alert/find", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/alert/update", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/update", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/update", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/update", + "alerting:logs.alert.document.count/observability/alert/get", + "alerting:logs.alert.document.count/observability/alert/find", + "alerting:logs.alert.document.count/observability/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/observability/alert/getAlertSummary", + "alerting:logs.alert.document.count/observability/alert/update", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/update", + "alerting:slo.rules.burnRate/observability/alert/get", + "alerting:slo.rules.burnRate/observability/alert/find", + "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", + "alerting:slo.rules.burnRate/observability/alert/update", + "alerting:slo.rules.burnRate/alerts/alert/get", + "alerting:slo.rules.burnRate/alerts/alert/find", + "alerting:slo.rules.burnRate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/alerts/alert/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/alert/update", + "alerting:observability.rules.custom_threshold/observability/alert/get", + "alerting:observability.rules.custom_threshold/observability/alert/find", + "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/alert/update", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/update", + "alerting:.es-query/observability/alert/get", + "alerting:.es-query/observability/alert/find", + "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/observability/alert/getAlertSummary", + "alerting:.es-query/observability/alert/update", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/update", + ], + "can_manage_private_locations": Array [ + "login:", + "api:private-location-write", + "saved_object:synthetics-private-location/bulk_get", + "saved_object:synthetics-private-location/get", + "saved_object:synthetics-private-location/find", + "saved_object:synthetics-private-location/open_point_in_time", + "saved_object:synthetics-private-location/close_point_in_time", + "saved_object:synthetics-private-location/create", + "saved_object:synthetics-private-location/bulk_create", + "saved_object:synthetics-private-location/update", + "saved_object:synthetics-private-location/bulk_update", + "saved_object:synthetics-private-location/delete", + "saved_object:synthetics-private-location/bulk_delete", + "saved_object:synthetics-private-location/share_to_space", + "saved_object:synthetics-privates-locations/bulk_get", + "saved_object:synthetics-privates-locations/get", + "saved_object:synthetics-privates-locations/find", + "saved_object:synthetics-privates-locations/open_point_in_time", + "saved_object:synthetics-privates-locations/close_point_in_time", + "saved_object:synthetics-privates-locations/create", + "saved_object:synthetics-privates-locations/bulk_create", + "saved_object:synthetics-privates-locations/update", + "saved_object:synthetics-privates-locations/bulk_update", + "saved_object:synthetics-privates-locations/delete", + "saved_object:synthetics-privates-locations/bulk_delete", + "saved_object:synthetics-privates-locations/share_to_space", + "ui:uptime/canManagePrivateLocations", ], "elastic_managed_locations_enabled": Array [ "login:", @@ -9429,30 +19064,6 @@ export default function ({ getService }: FtrProviderContext) { "saved_object:uptime-synthetics-api-key/delete", "saved_object:uptime-synthetics-api-key/bulk_delete", "saved_object:uptime-synthetics-api-key/share_to_space", - "saved_object:synthetics-private-location/bulk_get", - "saved_object:synthetics-private-location/get", - "saved_object:synthetics-private-location/find", - "saved_object:synthetics-private-location/open_point_in_time", - "saved_object:synthetics-private-location/close_point_in_time", - "saved_object:synthetics-private-location/create", - "saved_object:synthetics-private-location/bulk_create", - "saved_object:synthetics-private-location/update", - "saved_object:synthetics-private-location/bulk_update", - "saved_object:synthetics-private-location/delete", - "saved_object:synthetics-private-location/bulk_delete", - "saved_object:synthetics-private-location/share_to_space", - "saved_object:synthetics-privates-locations/bulk_get", - "saved_object:synthetics-privates-locations/get", - "saved_object:synthetics-privates-locations/find", - "saved_object:synthetics-privates-locations/open_point_in_time", - "saved_object:synthetics-privates-locations/close_point_in_time", - "saved_object:synthetics-privates-locations/create", - "saved_object:synthetics-privates-locations/bulk_create", - "saved_object:synthetics-privates-locations/update", - "saved_object:synthetics-privates-locations/bulk_update", - "saved_object:synthetics-privates-locations/delete", - "saved_object:synthetics-privates-locations/bulk_delete", - "saved_object:synthetics-privates-locations/share_to_space", "saved_object:synthetics-param/bulk_get", "saved_object:synthetics-param/get", "saved_object:synthetics-param/find", @@ -9489,6 +19100,16 @@ export default function ({ getService }: FtrProviderContext) { "saved_object:telemetry/delete", "saved_object:telemetry/bulk_delete", "saved_object:telemetry/share_to_space", + "saved_object:synthetics-private-location/bulk_get", + "saved_object:synthetics-private-location/get", + "saved_object:synthetics-private-location/find", + "saved_object:synthetics-private-location/open_point_in_time", + "saved_object:synthetics-private-location/close_point_in_time", + "saved_object:synthetics-privates-locations/bulk_get", + "saved_object:synthetics-privates-locations/get", + "saved_object:synthetics-privates-locations/find", + "saved_object:synthetics-privates-locations/open_point_in_time", + "saved_object:synthetics-privates-locations/close_point_in_time", "saved_object:config/bulk_get", "saved_object:config/get", "saved_object:config/find", @@ -9536,6 +19157,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.uptime.alerts.tls/uptime/rule/runSoon", "alerting:xpack.uptime.alerts.tls/uptime/rule/scheduleBackfill", "alerting:xpack.uptime.alerts.tls/uptime/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/get", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/find", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/create", + "alerting:xpack.uptime.alerts.tls/alerts/rule/delete", + "alerting:xpack.uptime.alerts.tls/alerts/rule/update", + "alerting:xpack.uptime.alerts.tls/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tls/alerts/rule/enable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/disable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tls/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tls/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tls/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.tls/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.tls/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/deleteBackfill", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/get", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/getRuleState", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/getAlertSummary", @@ -9564,6 +19213,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/runSoon", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/scheduleBackfill", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/create", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/delete", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/update", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/enable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/disable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/deleteBackfill", "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/get", "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/getRuleState", "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/getAlertSummary", @@ -9592,6 +19269,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/runSoon", "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/scheduleBackfill", "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/create", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/delete", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/update", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/enable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/disable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/deleteBackfill", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/get", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/getRuleState", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/getAlertSummary", @@ -9620,6 +19325,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/runSoon", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/scheduleBackfill", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/create", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/delete", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/update", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/updateApiKey", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/enable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/disable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/muteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unmuteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/muteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/snooze", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkEdit", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkDelete", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkEnable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/bulkDisable", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/unsnooze", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/runSoon", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/deleteBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/get", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getRuleState", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getAlertSummary", @@ -9648,6 +19381,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/runSoon", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/scheduleBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/deleteBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/create", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/delete", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/update", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/updateApiKey", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/enable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/disable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/muteAll", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unmuteAll", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/muteAlert", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unmuteAlert", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/snooze", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkEdit", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkDelete", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkEnable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/unsnooze", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/runSoon", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/deleteBackfill", "alerting:xpack.synthetics.alerts.tls/uptime/rule/get", "alerting:xpack.synthetics.alerts.tls/uptime/rule/getRuleState", "alerting:xpack.synthetics.alerts.tls/uptime/rule/getAlertSummary", @@ -9676,181 +19437,99 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/uptime/rule/runSoon", "alerting:xpack.synthetics.alerts.tls/uptime/rule/scheduleBackfill", "alerting:xpack.synthetics.alerts.tls/uptime/rule/deleteBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/get", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/find", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/create", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/delete", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/update", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/updateApiKey", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/enable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/disable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/muteAll", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unmuteAll", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/muteAlert", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unmuteAlert", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/snooze", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkEdit", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkDelete", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkEnable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/unsnooze", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/runSoon", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/deleteBackfill", "alerting:xpack.uptime.alerts.tls/uptime/alert/get", "alerting:xpack.uptime.alerts.tls/uptime/alert/find", "alerting:xpack.uptime.alerts.tls/uptime/alert/getAuthorizedAlertsIndices", "alerting:xpack.uptime.alerts.tls/uptime/alert/getAlertSummary", "alerting:xpack.uptime.alerts.tls/uptime/alert/update", + "alerting:xpack.uptime.alerts.tls/alerts/alert/get", + "alerting:xpack.uptime.alerts.tls/alerts/alert/find", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/alert/update", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/get", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/find", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/getAuthorizedAlertsIndices", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/getAlertSummary", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/update", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/update", "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/get", "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/find", "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/getAuthorizedAlertsIndices", "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/getAlertSummary", "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/update", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/update", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/get", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/find", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/getAuthorizedAlertsIndices", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/getAlertSummary", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/update", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/update", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/get", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/find", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/update", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/update", "alerting:xpack.synthetics.alerts.tls/uptime/alert/get", "alerting:xpack.synthetics.alerts.tls/uptime/alert/find", "alerting:xpack.synthetics.alerts.tls/uptime/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.tls/uptime/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.tls/uptime/alert/update", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/get", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/find", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/update", "app:observability", "ui:catalogue/observability", "ui:navLinks/observability", "ui:observability/read", "ui:observability/write", - "alerting:slo.rules.burnRate/observability/rule/get", - "alerting:slo.rules.burnRate/observability/rule/getRuleState", - "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", - "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", - "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", - "alerting:slo.rules.burnRate/observability/rule/find", - "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", - "alerting:slo.rules.burnRate/observability/rule/getBackfill", - "alerting:slo.rules.burnRate/observability/rule/findBackfill", - "alerting:slo.rules.burnRate/observability/rule/create", - "alerting:slo.rules.burnRate/observability/rule/delete", - "alerting:slo.rules.burnRate/observability/rule/update", - "alerting:slo.rules.burnRate/observability/rule/updateApiKey", - "alerting:slo.rules.burnRate/observability/rule/enable", - "alerting:slo.rules.burnRate/observability/rule/disable", - "alerting:slo.rules.burnRate/observability/rule/muteAll", - "alerting:slo.rules.burnRate/observability/rule/unmuteAll", - "alerting:slo.rules.burnRate/observability/rule/muteAlert", - "alerting:slo.rules.burnRate/observability/rule/unmuteAlert", - "alerting:slo.rules.burnRate/observability/rule/snooze", - "alerting:slo.rules.burnRate/observability/rule/bulkEdit", - "alerting:slo.rules.burnRate/observability/rule/bulkDelete", - "alerting:slo.rules.burnRate/observability/rule/bulkEnable", - "alerting:slo.rules.burnRate/observability/rule/bulkDisable", - "alerting:slo.rules.burnRate/observability/rule/unsnooze", - "alerting:slo.rules.burnRate/observability/rule/runSoon", - "alerting:slo.rules.burnRate/observability/rule/scheduleBackfill", - "alerting:slo.rules.burnRate/observability/rule/deleteBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/get", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", - "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", - "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", - "alerting:observability.rules.custom_threshold/observability/rule/find", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", - "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/create", - "alerting:observability.rules.custom_threshold/observability/rule/delete", - "alerting:observability.rules.custom_threshold/observability/rule/update", - "alerting:observability.rules.custom_threshold/observability/rule/updateApiKey", - "alerting:observability.rules.custom_threshold/observability/rule/enable", - "alerting:observability.rules.custom_threshold/observability/rule/disable", - "alerting:observability.rules.custom_threshold/observability/rule/muteAll", - "alerting:observability.rules.custom_threshold/observability/rule/unmuteAll", - "alerting:observability.rules.custom_threshold/observability/rule/muteAlert", - "alerting:observability.rules.custom_threshold/observability/rule/unmuteAlert", - "alerting:observability.rules.custom_threshold/observability/rule/snooze", - "alerting:observability.rules.custom_threshold/observability/rule/bulkEdit", - "alerting:observability.rules.custom_threshold/observability/rule/bulkDelete", - "alerting:observability.rules.custom_threshold/observability/rule/bulkEnable", - "alerting:observability.rules.custom_threshold/observability/rule/bulkDisable", - "alerting:observability.rules.custom_threshold/observability/rule/unsnooze", - "alerting:observability.rules.custom_threshold/observability/rule/runSoon", - "alerting:observability.rules.custom_threshold/observability/rule/scheduleBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/deleteBackfill", - "alerting:.es-query/observability/rule/get", - "alerting:.es-query/observability/rule/getRuleState", - "alerting:.es-query/observability/rule/getAlertSummary", - "alerting:.es-query/observability/rule/getExecutionLog", - "alerting:.es-query/observability/rule/getActionErrorLog", - "alerting:.es-query/observability/rule/find", - "alerting:.es-query/observability/rule/getRuleExecutionKPI", - "alerting:.es-query/observability/rule/getBackfill", - "alerting:.es-query/observability/rule/findBackfill", - "alerting:.es-query/observability/rule/create", - "alerting:.es-query/observability/rule/delete", - "alerting:.es-query/observability/rule/update", - "alerting:.es-query/observability/rule/updateApiKey", - "alerting:.es-query/observability/rule/enable", - "alerting:.es-query/observability/rule/disable", - "alerting:.es-query/observability/rule/muteAll", - "alerting:.es-query/observability/rule/unmuteAll", - "alerting:.es-query/observability/rule/muteAlert", - "alerting:.es-query/observability/rule/unmuteAlert", - "alerting:.es-query/observability/rule/snooze", - "alerting:.es-query/observability/rule/bulkEdit", - "alerting:.es-query/observability/rule/bulkDelete", - "alerting:.es-query/observability/rule/bulkEnable", - "alerting:.es-query/observability/rule/bulkDisable", - "alerting:.es-query/observability/rule/unsnooze", - "alerting:.es-query/observability/rule/runSoon", - "alerting:.es-query/observability/rule/scheduleBackfill", - "alerting:.es-query/observability/rule/deleteBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/create", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/delete", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/update", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/updateApiKey", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/enable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/disable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAll", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAll", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAlert", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAlert", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/snooze", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEdit", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDelete", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEnable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDisable", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unsnooze", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/runSoon", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/scheduleBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/deleteBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/get", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", - "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/find", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", - "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/create", - "alerting:metrics.alert.inventory.threshold/observability/rule/delete", - "alerting:metrics.alert.inventory.threshold/observability/rule/update", - "alerting:metrics.alert.inventory.threshold/observability/rule/updateApiKey", - "alerting:metrics.alert.inventory.threshold/observability/rule/enable", - "alerting:metrics.alert.inventory.threshold/observability/rule/disable", - "alerting:metrics.alert.inventory.threshold/observability/rule/muteAll", - "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAll", - "alerting:metrics.alert.inventory.threshold/observability/rule/muteAlert", - "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAlert", - "alerting:metrics.alert.inventory.threshold/observability/rule/snooze", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEdit", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDelete", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEnable", - "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDisable", - "alerting:metrics.alert.inventory.threshold/observability/rule/unsnooze", - "alerting:metrics.alert.inventory.threshold/observability/rule/runSoon", - "alerting:metrics.alert.inventory.threshold/observability/rule/scheduleBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/deleteBackfill", "alerting:apm.error_rate/observability/rule/get", "alerting:apm.error_rate/observability/rule/getRuleState", "alerting:apm.error_rate/observability/rule/getAlertSummary", @@ -9879,6 +19558,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.error_rate/observability/rule/runSoon", "alerting:apm.error_rate/observability/rule/scheduleBackfill", "alerting:apm.error_rate/observability/rule/deleteBackfill", + "alerting:apm.error_rate/alerts/rule/get", + "alerting:apm.error_rate/alerts/rule/getRuleState", + "alerting:apm.error_rate/alerts/rule/getAlertSummary", + "alerting:apm.error_rate/alerts/rule/getExecutionLog", + "alerting:apm.error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.error_rate/alerts/rule/find", + "alerting:apm.error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.error_rate/alerts/rule/getBackfill", + "alerting:apm.error_rate/alerts/rule/findBackfill", + "alerting:apm.error_rate/alerts/rule/create", + "alerting:apm.error_rate/alerts/rule/delete", + "alerting:apm.error_rate/alerts/rule/update", + "alerting:apm.error_rate/alerts/rule/updateApiKey", + "alerting:apm.error_rate/alerts/rule/enable", + "alerting:apm.error_rate/alerts/rule/disable", + "alerting:apm.error_rate/alerts/rule/muteAll", + "alerting:apm.error_rate/alerts/rule/unmuteAll", + "alerting:apm.error_rate/alerts/rule/muteAlert", + "alerting:apm.error_rate/alerts/rule/unmuteAlert", + "alerting:apm.error_rate/alerts/rule/snooze", + "alerting:apm.error_rate/alerts/rule/bulkEdit", + "alerting:apm.error_rate/alerts/rule/bulkDelete", + "alerting:apm.error_rate/alerts/rule/bulkEnable", + "alerting:apm.error_rate/alerts/rule/bulkDisable", + "alerting:apm.error_rate/alerts/rule/unsnooze", + "alerting:apm.error_rate/alerts/rule/runSoon", + "alerting:apm.error_rate/alerts/rule/scheduleBackfill", + "alerting:apm.error_rate/alerts/rule/deleteBackfill", "alerting:apm.transaction_error_rate/observability/rule/get", "alerting:apm.transaction_error_rate/observability/rule/getRuleState", "alerting:apm.transaction_error_rate/observability/rule/getAlertSummary", @@ -9907,6 +19614,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_error_rate/observability/rule/runSoon", "alerting:apm.transaction_error_rate/observability/rule/scheduleBackfill", "alerting:apm.transaction_error_rate/observability/rule/deleteBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/get", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleState", + "alerting:apm.transaction_error_rate/alerts/rule/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/rule/getExecutionLog", + "alerting:apm.transaction_error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_error_rate/alerts/rule/find", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_error_rate/alerts/rule/getBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/findBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/create", + "alerting:apm.transaction_error_rate/alerts/rule/delete", + "alerting:apm.transaction_error_rate/alerts/rule/update", + "alerting:apm.transaction_error_rate/alerts/rule/updateApiKey", + "alerting:apm.transaction_error_rate/alerts/rule/enable", + "alerting:apm.transaction_error_rate/alerts/rule/disable", + "alerting:apm.transaction_error_rate/alerts/rule/muteAll", + "alerting:apm.transaction_error_rate/alerts/rule/unmuteAll", + "alerting:apm.transaction_error_rate/alerts/rule/muteAlert", + "alerting:apm.transaction_error_rate/alerts/rule/unmuteAlert", + "alerting:apm.transaction_error_rate/alerts/rule/snooze", + "alerting:apm.transaction_error_rate/alerts/rule/bulkEdit", + "alerting:apm.transaction_error_rate/alerts/rule/bulkDelete", + "alerting:apm.transaction_error_rate/alerts/rule/bulkEnable", + "alerting:apm.transaction_error_rate/alerts/rule/bulkDisable", + "alerting:apm.transaction_error_rate/alerts/rule/unsnooze", + "alerting:apm.transaction_error_rate/alerts/rule/runSoon", + "alerting:apm.transaction_error_rate/alerts/rule/scheduleBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/deleteBackfill", "alerting:apm.transaction_duration/observability/rule/get", "alerting:apm.transaction_duration/observability/rule/getRuleState", "alerting:apm.transaction_duration/observability/rule/getAlertSummary", @@ -9935,6 +19670,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_duration/observability/rule/runSoon", "alerting:apm.transaction_duration/observability/rule/scheduleBackfill", "alerting:apm.transaction_duration/observability/rule/deleteBackfill", + "alerting:apm.transaction_duration/alerts/rule/get", + "alerting:apm.transaction_duration/alerts/rule/getRuleState", + "alerting:apm.transaction_duration/alerts/rule/getAlertSummary", + "alerting:apm.transaction_duration/alerts/rule/getExecutionLog", + "alerting:apm.transaction_duration/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_duration/alerts/rule/find", + "alerting:apm.transaction_duration/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_duration/alerts/rule/getBackfill", + "alerting:apm.transaction_duration/alerts/rule/findBackfill", + "alerting:apm.transaction_duration/alerts/rule/create", + "alerting:apm.transaction_duration/alerts/rule/delete", + "alerting:apm.transaction_duration/alerts/rule/update", + "alerting:apm.transaction_duration/alerts/rule/updateApiKey", + "alerting:apm.transaction_duration/alerts/rule/enable", + "alerting:apm.transaction_duration/alerts/rule/disable", + "alerting:apm.transaction_duration/alerts/rule/muteAll", + "alerting:apm.transaction_duration/alerts/rule/unmuteAll", + "alerting:apm.transaction_duration/alerts/rule/muteAlert", + "alerting:apm.transaction_duration/alerts/rule/unmuteAlert", + "alerting:apm.transaction_duration/alerts/rule/snooze", + "alerting:apm.transaction_duration/alerts/rule/bulkEdit", + "alerting:apm.transaction_duration/alerts/rule/bulkDelete", + "alerting:apm.transaction_duration/alerts/rule/bulkEnable", + "alerting:apm.transaction_duration/alerts/rule/bulkDisable", + "alerting:apm.transaction_duration/alerts/rule/unsnooze", + "alerting:apm.transaction_duration/alerts/rule/runSoon", + "alerting:apm.transaction_duration/alerts/rule/scheduleBackfill", + "alerting:apm.transaction_duration/alerts/rule/deleteBackfill", "alerting:apm.anomaly/observability/rule/get", "alerting:apm.anomaly/observability/rule/getRuleState", "alerting:apm.anomaly/observability/rule/getAlertSummary", @@ -9963,6 +19726,34 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.anomaly/observability/rule/runSoon", "alerting:apm.anomaly/observability/rule/scheduleBackfill", "alerting:apm.anomaly/observability/rule/deleteBackfill", + "alerting:apm.anomaly/alerts/rule/get", + "alerting:apm.anomaly/alerts/rule/getRuleState", + "alerting:apm.anomaly/alerts/rule/getAlertSummary", + "alerting:apm.anomaly/alerts/rule/getExecutionLog", + "alerting:apm.anomaly/alerts/rule/getActionErrorLog", + "alerting:apm.anomaly/alerts/rule/find", + "alerting:apm.anomaly/alerts/rule/getRuleExecutionKPI", + "alerting:apm.anomaly/alerts/rule/getBackfill", + "alerting:apm.anomaly/alerts/rule/findBackfill", + "alerting:apm.anomaly/alerts/rule/create", + "alerting:apm.anomaly/alerts/rule/delete", + "alerting:apm.anomaly/alerts/rule/update", + "alerting:apm.anomaly/alerts/rule/updateApiKey", + "alerting:apm.anomaly/alerts/rule/enable", + "alerting:apm.anomaly/alerts/rule/disable", + "alerting:apm.anomaly/alerts/rule/muteAll", + "alerting:apm.anomaly/alerts/rule/unmuteAll", + "alerting:apm.anomaly/alerts/rule/muteAlert", + "alerting:apm.anomaly/alerts/rule/unmuteAlert", + "alerting:apm.anomaly/alerts/rule/snooze", + "alerting:apm.anomaly/alerts/rule/bulkEdit", + "alerting:apm.anomaly/alerts/rule/bulkDelete", + "alerting:apm.anomaly/alerts/rule/bulkEnable", + "alerting:apm.anomaly/alerts/rule/bulkDisable", + "alerting:apm.anomaly/alerts/rule/unsnooze", + "alerting:apm.anomaly/alerts/rule/runSoon", + "alerting:apm.anomaly/alerts/rule/scheduleBackfill", + "alerting:apm.anomaly/alerts/rule/deleteBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getAlertSummary", @@ -10014,56 +19805,555 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/rule/bulkEdit", "alerting:xpack.synthetics.alerts.tls/observability/rule/bulkDelete", "alerting:xpack.synthetics.alerts.tls/observability/rule/bulkEnable", - "alerting:xpack.synthetics.alerts.tls/observability/rule/bulkDisable", - "alerting:xpack.synthetics.alerts.tls/observability/rule/unsnooze", - "alerting:xpack.synthetics.alerts.tls/observability/rule/runSoon", - "alerting:xpack.synthetics.alerts.tls/observability/rule/scheduleBackfill", - "alerting:xpack.synthetics.alerts.tls/observability/rule/deleteBackfill", - "alerting:slo.rules.burnRate/observability/alert/get", - "alerting:slo.rules.burnRate/observability/alert/find", - "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", - "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", - "alerting:slo.rules.burnRate/observability/alert/update", - "alerting:observability.rules.custom_threshold/observability/alert/get", - "alerting:observability.rules.custom_threshold/observability/alert/find", - "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/alert/update", - "alerting:.es-query/observability/alert/get", - "alerting:.es-query/observability/alert/find", - "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", - "alerting:.es-query/observability/alert/getAlertSummary", - "alerting:.es-query/observability/alert/update", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/update", - "alerting:metrics.alert.inventory.threshold/observability/alert/get", - "alerting:metrics.alert.inventory.threshold/observability/alert/find", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/alert/update", + "alerting:xpack.synthetics.alerts.tls/observability/rule/bulkDisable", + "alerting:xpack.synthetics.alerts.tls/observability/rule/unsnooze", + "alerting:xpack.synthetics.alerts.tls/observability/rule/runSoon", + "alerting:xpack.synthetics.alerts.tls/observability/rule/scheduleBackfill", + "alerting:xpack.synthetics.alerts.tls/observability/rule/deleteBackfill", + "alerting:metrics.alert.threshold/observability/rule/get", + "alerting:metrics.alert.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/observability/rule/find", + "alerting:metrics.alert.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.threshold/observability/rule/create", + "alerting:metrics.alert.threshold/observability/rule/delete", + "alerting:metrics.alert.threshold/observability/rule/update", + "alerting:metrics.alert.threshold/observability/rule/updateApiKey", + "alerting:metrics.alert.threshold/observability/rule/enable", + "alerting:metrics.alert.threshold/observability/rule/disable", + "alerting:metrics.alert.threshold/observability/rule/muteAll", + "alerting:metrics.alert.threshold/observability/rule/unmuteAll", + "alerting:metrics.alert.threshold/observability/rule/muteAlert", + "alerting:metrics.alert.threshold/observability/rule/unmuteAlert", + "alerting:metrics.alert.threshold/observability/rule/snooze", + "alerting:metrics.alert.threshold/observability/rule/bulkEdit", + "alerting:metrics.alert.threshold/observability/rule/bulkDelete", + "alerting:metrics.alert.threshold/observability/rule/bulkEnable", + "alerting:metrics.alert.threshold/observability/rule/bulkDisable", + "alerting:metrics.alert.threshold/observability/rule/unsnooze", + "alerting:metrics.alert.threshold/observability/rule/runSoon", + "alerting:metrics.alert.threshold/observability/rule/scheduleBackfill", + "alerting:metrics.alert.threshold/observability/rule/deleteBackfill", + "alerting:metrics.alert.threshold/alerts/rule/get", + "alerting:metrics.alert.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/alerts/rule/find", + "alerting:metrics.alert.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.threshold/alerts/rule/create", + "alerting:metrics.alert.threshold/alerts/rule/delete", + "alerting:metrics.alert.threshold/alerts/rule/update", + "alerting:metrics.alert.threshold/alerts/rule/updateApiKey", + "alerting:metrics.alert.threshold/alerts/rule/enable", + "alerting:metrics.alert.threshold/alerts/rule/disable", + "alerting:metrics.alert.threshold/alerts/rule/muteAll", + "alerting:metrics.alert.threshold/alerts/rule/unmuteAll", + "alerting:metrics.alert.threshold/alerts/rule/muteAlert", + "alerting:metrics.alert.threshold/alerts/rule/unmuteAlert", + "alerting:metrics.alert.threshold/alerts/rule/snooze", + "alerting:metrics.alert.threshold/alerts/rule/bulkEdit", + "alerting:metrics.alert.threshold/alerts/rule/bulkDelete", + "alerting:metrics.alert.threshold/alerts/rule/bulkEnable", + "alerting:metrics.alert.threshold/alerts/rule/bulkDisable", + "alerting:metrics.alert.threshold/alerts/rule/unsnooze", + "alerting:metrics.alert.threshold/alerts/rule/runSoon", + "alerting:metrics.alert.threshold/alerts/rule/scheduleBackfill", + "alerting:metrics.alert.threshold/alerts/rule/deleteBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/get", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/find", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/create", + "alerting:metrics.alert.inventory.threshold/observability/rule/delete", + "alerting:metrics.alert.inventory.threshold/observability/rule/update", + "alerting:metrics.alert.inventory.threshold/observability/rule/updateApiKey", + "alerting:metrics.alert.inventory.threshold/observability/rule/enable", + "alerting:metrics.alert.inventory.threshold/observability/rule/disable", + "alerting:metrics.alert.inventory.threshold/observability/rule/muteAll", + "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAll", + "alerting:metrics.alert.inventory.threshold/observability/rule/muteAlert", + "alerting:metrics.alert.inventory.threshold/observability/rule/unmuteAlert", + "alerting:metrics.alert.inventory.threshold/observability/rule/snooze", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEdit", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDelete", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkEnable", + "alerting:metrics.alert.inventory.threshold/observability/rule/bulkDisable", + "alerting:metrics.alert.inventory.threshold/observability/rule/unsnooze", + "alerting:metrics.alert.inventory.threshold/observability/rule/runSoon", + "alerting:metrics.alert.inventory.threshold/observability/rule/scheduleBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/deleteBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/get", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/find", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/create", + "alerting:metrics.alert.inventory.threshold/alerts/rule/delete", + "alerting:metrics.alert.inventory.threshold/alerts/rule/update", + "alerting:metrics.alert.inventory.threshold/alerts/rule/updateApiKey", + "alerting:metrics.alert.inventory.threshold/alerts/rule/enable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/disable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/muteAll", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unmuteAll", + "alerting:metrics.alert.inventory.threshold/alerts/rule/muteAlert", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unmuteAlert", + "alerting:metrics.alert.inventory.threshold/alerts/rule/snooze", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkEdit", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkDelete", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkEnable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/bulkDisable", + "alerting:metrics.alert.inventory.threshold/alerts/rule/unsnooze", + "alerting:metrics.alert.inventory.threshold/alerts/rule/runSoon", + "alerting:metrics.alert.inventory.threshold/alerts/rule/scheduleBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/get", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/find", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/create", + "alerting:xpack.uptime.alerts.tls/observability/rule/delete", + "alerting:xpack.uptime.alerts.tls/observability/rule/update", + "alerting:xpack.uptime.alerts.tls/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tls/observability/rule/enable", + "alerting:xpack.uptime.alerts.tls/observability/rule/disable", + "alerting:xpack.uptime.alerts.tls/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.tls/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tls/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.tls/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tls/observability/rule/snooze", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tls/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tls/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.tls/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.tls/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/create", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/delete", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/update", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/enable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/disable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/snooze", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/create", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/delete", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/update", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/enable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/disable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/snooze", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/deleteBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/create", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/delete", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/update", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/updateApiKey", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/enable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/disable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/muteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unmuteAll", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/muteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unmuteAlert", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/snooze", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkEdit", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkDelete", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkEnable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/bulkDisable", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/unsnooze", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/runSoon", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/scheduleBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/deleteBackfill", + "alerting:logs.alert.document.count/observability/rule/get", + "alerting:logs.alert.document.count/observability/rule/getRuleState", + "alerting:logs.alert.document.count/observability/rule/getAlertSummary", + "alerting:logs.alert.document.count/observability/rule/getExecutionLog", + "alerting:logs.alert.document.count/observability/rule/getActionErrorLog", + "alerting:logs.alert.document.count/observability/rule/find", + "alerting:logs.alert.document.count/observability/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/observability/rule/getBackfill", + "alerting:logs.alert.document.count/observability/rule/findBackfill", + "alerting:logs.alert.document.count/observability/rule/create", + "alerting:logs.alert.document.count/observability/rule/delete", + "alerting:logs.alert.document.count/observability/rule/update", + "alerting:logs.alert.document.count/observability/rule/updateApiKey", + "alerting:logs.alert.document.count/observability/rule/enable", + "alerting:logs.alert.document.count/observability/rule/disable", + "alerting:logs.alert.document.count/observability/rule/muteAll", + "alerting:logs.alert.document.count/observability/rule/unmuteAll", + "alerting:logs.alert.document.count/observability/rule/muteAlert", + "alerting:logs.alert.document.count/observability/rule/unmuteAlert", + "alerting:logs.alert.document.count/observability/rule/snooze", + "alerting:logs.alert.document.count/observability/rule/bulkEdit", + "alerting:logs.alert.document.count/observability/rule/bulkDelete", + "alerting:logs.alert.document.count/observability/rule/bulkEnable", + "alerting:logs.alert.document.count/observability/rule/bulkDisable", + "alerting:logs.alert.document.count/observability/rule/unsnooze", + "alerting:logs.alert.document.count/observability/rule/runSoon", + "alerting:logs.alert.document.count/observability/rule/scheduleBackfill", + "alerting:logs.alert.document.count/observability/rule/deleteBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/create", + "alerting:logs.alert.document.count/alerts/rule/delete", + "alerting:logs.alert.document.count/alerts/rule/update", + "alerting:logs.alert.document.count/alerts/rule/updateApiKey", + "alerting:logs.alert.document.count/alerts/rule/enable", + "alerting:logs.alert.document.count/alerts/rule/disable", + "alerting:logs.alert.document.count/alerts/rule/muteAll", + "alerting:logs.alert.document.count/alerts/rule/unmuteAll", + "alerting:logs.alert.document.count/alerts/rule/muteAlert", + "alerting:logs.alert.document.count/alerts/rule/unmuteAlert", + "alerting:logs.alert.document.count/alerts/rule/snooze", + "alerting:logs.alert.document.count/alerts/rule/bulkEdit", + "alerting:logs.alert.document.count/alerts/rule/bulkDelete", + "alerting:logs.alert.document.count/alerts/rule/bulkEnable", + "alerting:logs.alert.document.count/alerts/rule/bulkDisable", + "alerting:logs.alert.document.count/alerts/rule/unsnooze", + "alerting:logs.alert.document.count/alerts/rule/runSoon", + "alerting:logs.alert.document.count/alerts/rule/scheduleBackfill", + "alerting:logs.alert.document.count/alerts/rule/deleteBackfill", + "alerting:slo.rules.burnRate/observability/rule/get", + "alerting:slo.rules.burnRate/observability/rule/getRuleState", + "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", + "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", + "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/observability/rule/find", + "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/observability/rule/getBackfill", + "alerting:slo.rules.burnRate/observability/rule/findBackfill", + "alerting:slo.rules.burnRate/observability/rule/create", + "alerting:slo.rules.burnRate/observability/rule/delete", + "alerting:slo.rules.burnRate/observability/rule/update", + "alerting:slo.rules.burnRate/observability/rule/updateApiKey", + "alerting:slo.rules.burnRate/observability/rule/enable", + "alerting:slo.rules.burnRate/observability/rule/disable", + "alerting:slo.rules.burnRate/observability/rule/muteAll", + "alerting:slo.rules.burnRate/observability/rule/unmuteAll", + "alerting:slo.rules.burnRate/observability/rule/muteAlert", + "alerting:slo.rules.burnRate/observability/rule/unmuteAlert", + "alerting:slo.rules.burnRate/observability/rule/snooze", + "alerting:slo.rules.burnRate/observability/rule/bulkEdit", + "alerting:slo.rules.burnRate/observability/rule/bulkDelete", + "alerting:slo.rules.burnRate/observability/rule/bulkEnable", + "alerting:slo.rules.burnRate/observability/rule/bulkDisable", + "alerting:slo.rules.burnRate/observability/rule/unsnooze", + "alerting:slo.rules.burnRate/observability/rule/runSoon", + "alerting:slo.rules.burnRate/observability/rule/scheduleBackfill", + "alerting:slo.rules.burnRate/observability/rule/deleteBackfill", + "alerting:slo.rules.burnRate/alerts/rule/get", + "alerting:slo.rules.burnRate/alerts/rule/getRuleState", + "alerting:slo.rules.burnRate/alerts/rule/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/rule/getExecutionLog", + "alerting:slo.rules.burnRate/alerts/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/alerts/rule/find", + "alerting:slo.rules.burnRate/alerts/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/alerts/rule/getBackfill", + "alerting:slo.rules.burnRate/alerts/rule/findBackfill", + "alerting:slo.rules.burnRate/alerts/rule/create", + "alerting:slo.rules.burnRate/alerts/rule/delete", + "alerting:slo.rules.burnRate/alerts/rule/update", + "alerting:slo.rules.burnRate/alerts/rule/updateApiKey", + "alerting:slo.rules.burnRate/alerts/rule/enable", + "alerting:slo.rules.burnRate/alerts/rule/disable", + "alerting:slo.rules.burnRate/alerts/rule/muteAll", + "alerting:slo.rules.burnRate/alerts/rule/unmuteAll", + "alerting:slo.rules.burnRate/alerts/rule/muteAlert", + "alerting:slo.rules.burnRate/alerts/rule/unmuteAlert", + "alerting:slo.rules.burnRate/alerts/rule/snooze", + "alerting:slo.rules.burnRate/alerts/rule/bulkEdit", + "alerting:slo.rules.burnRate/alerts/rule/bulkDelete", + "alerting:slo.rules.burnRate/alerts/rule/bulkEnable", + "alerting:slo.rules.burnRate/alerts/rule/bulkDisable", + "alerting:slo.rules.burnRate/alerts/rule/unsnooze", + "alerting:slo.rules.burnRate/alerts/rule/runSoon", + "alerting:slo.rules.burnRate/alerts/rule/scheduleBackfill", + "alerting:slo.rules.burnRate/alerts/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/get", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", + "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/observability/rule/find", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/create", + "alerting:observability.rules.custom_threshold/observability/rule/delete", + "alerting:observability.rules.custom_threshold/observability/rule/update", + "alerting:observability.rules.custom_threshold/observability/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/observability/rule/enable", + "alerting:observability.rules.custom_threshold/observability/rule/disable", + "alerting:observability.rules.custom_threshold/observability/rule/muteAll", + "alerting:observability.rules.custom_threshold/observability/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/observability/rule/muteAlert", + "alerting:observability.rules.custom_threshold/observability/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/observability/rule/snooze", + "alerting:observability.rules.custom_threshold/observability/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/observability/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/observability/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/observability/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/observability/rule/unsnooze", + "alerting:observability.rules.custom_threshold/observability/rule/runSoon", + "alerting:observability.rules.custom_threshold/observability/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/deleteBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/create", + "alerting:observability.rules.custom_threshold/alerts/rule/delete", + "alerting:observability.rules.custom_threshold/alerts/rule/update", + "alerting:observability.rules.custom_threshold/alerts/rule/updateApiKey", + "alerting:observability.rules.custom_threshold/alerts/rule/enable", + "alerting:observability.rules.custom_threshold/alerts/rule/disable", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAll", + "alerting:observability.rules.custom_threshold/alerts/rule/muteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/unmuteAlert", + "alerting:observability.rules.custom_threshold/alerts/rule/snooze", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEdit", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDelete", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkEnable", + "alerting:observability.rules.custom_threshold/alerts/rule/bulkDisable", + "alerting:observability.rules.custom_threshold/alerts/rule/unsnooze", + "alerting:observability.rules.custom_threshold/alerts/rule/runSoon", + "alerting:observability.rules.custom_threshold/alerts/rule/scheduleBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/deleteBackfill", + "alerting:.es-query/observability/rule/get", + "alerting:.es-query/observability/rule/getRuleState", + "alerting:.es-query/observability/rule/getAlertSummary", + "alerting:.es-query/observability/rule/getExecutionLog", + "alerting:.es-query/observability/rule/getActionErrorLog", + "alerting:.es-query/observability/rule/find", + "alerting:.es-query/observability/rule/getRuleExecutionKPI", + "alerting:.es-query/observability/rule/getBackfill", + "alerting:.es-query/observability/rule/findBackfill", + "alerting:.es-query/observability/rule/create", + "alerting:.es-query/observability/rule/delete", + "alerting:.es-query/observability/rule/update", + "alerting:.es-query/observability/rule/updateApiKey", + "alerting:.es-query/observability/rule/enable", + "alerting:.es-query/observability/rule/disable", + "alerting:.es-query/observability/rule/muteAll", + "alerting:.es-query/observability/rule/unmuteAll", + "alerting:.es-query/observability/rule/muteAlert", + "alerting:.es-query/observability/rule/unmuteAlert", + "alerting:.es-query/observability/rule/snooze", + "alerting:.es-query/observability/rule/bulkEdit", + "alerting:.es-query/observability/rule/bulkDelete", + "alerting:.es-query/observability/rule/bulkEnable", + "alerting:.es-query/observability/rule/bulkDisable", + "alerting:.es-query/observability/rule/unsnooze", + "alerting:.es-query/observability/rule/runSoon", + "alerting:.es-query/observability/rule/scheduleBackfill", + "alerting:.es-query/observability/rule/deleteBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", + "alerting:.es-query/alerts/rule/create", + "alerting:.es-query/alerts/rule/delete", + "alerting:.es-query/alerts/rule/update", + "alerting:.es-query/alerts/rule/updateApiKey", + "alerting:.es-query/alerts/rule/enable", + "alerting:.es-query/alerts/rule/disable", + "alerting:.es-query/alerts/rule/muteAll", + "alerting:.es-query/alerts/rule/unmuteAll", + "alerting:.es-query/alerts/rule/muteAlert", + "alerting:.es-query/alerts/rule/unmuteAlert", + "alerting:.es-query/alerts/rule/snooze", + "alerting:.es-query/alerts/rule/bulkEdit", + "alerting:.es-query/alerts/rule/bulkDelete", + "alerting:.es-query/alerts/rule/bulkEnable", + "alerting:.es-query/alerts/rule/bulkDisable", + "alerting:.es-query/alerts/rule/unsnooze", + "alerting:.es-query/alerts/rule/runSoon", + "alerting:.es-query/alerts/rule/scheduleBackfill", + "alerting:.es-query/alerts/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/deleteBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/create", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/delete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/updateApiKey", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/enable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/disable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAll", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/muteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unmuteAlert", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/snooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEdit", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDelete", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkEnable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/bulkDisable", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/unsnooze", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/runSoon", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/scheduleBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/deleteBackfill", "alerting:apm.error_rate/observability/alert/get", "alerting:apm.error_rate/observability/alert/find", "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.error_rate/observability/alert/getAlertSummary", "alerting:apm.error_rate/observability/alert/update", + "alerting:apm.error_rate/alerts/alert/get", + "alerting:apm.error_rate/alerts/alert/find", + "alerting:apm.error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/alerts/alert/getAlertSummary", + "alerting:apm.error_rate/alerts/alert/update", "alerting:apm.transaction_error_rate/observability/alert/get", "alerting:apm.transaction_error_rate/observability/alert/find", "alerting:apm.transaction_error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_error_rate/observability/alert/getAlertSummary", "alerting:apm.transaction_error_rate/observability/alert/update", + "alerting:apm.transaction_error_rate/alerts/alert/get", + "alerting:apm.transaction_error_rate/alerts/alert/find", + "alerting:apm.transaction_error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/alerts/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/alert/update", "alerting:apm.transaction_duration/observability/alert/get", "alerting:apm.transaction_duration/observability/alert/find", "alerting:apm.transaction_duration/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_duration/observability/alert/getAlertSummary", "alerting:apm.transaction_duration/observability/alert/update", + "alerting:apm.transaction_duration/alerts/alert/get", + "alerting:apm.transaction_duration/alerts/alert/find", + "alerting:apm.transaction_duration/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/alerts/alert/getAlertSummary", + "alerting:apm.transaction_duration/alerts/alert/update", "alerting:apm.anomaly/observability/alert/get", "alerting:apm.anomaly/observability/alert/find", "alerting:apm.anomaly/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.anomaly/observability/alert/getAlertSummary", "alerting:apm.anomaly/observability/alert/update", + "alerting:apm.anomaly/alerts/alert/get", + "alerting:apm.anomaly/alerts/alert/find", + "alerting:apm.anomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/alerts/alert/getAlertSummary", + "alerting:apm.anomaly/alerts/alert/update", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", @@ -10074,6 +20364,96 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.tls/observability/alert/update", + "alerting:metrics.alert.threshold/observability/alert/get", + "alerting:metrics.alert.threshold/observability/alert/find", + "alerting:metrics.alert.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.threshold/observability/alert/update", + "alerting:metrics.alert.threshold/alerts/alert/get", + "alerting:metrics.alert.threshold/alerts/alert/find", + "alerting:metrics.alert.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/alert/update", + "alerting:metrics.alert.inventory.threshold/observability/alert/get", + "alerting:metrics.alert.inventory.threshold/observability/alert/find", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/alert/update", + "alerting:metrics.alert.inventory.threshold/alerts/alert/get", + "alerting:metrics.alert.inventory.threshold/alerts/alert/find", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/alert/update", + "alerting:xpack.uptime.alerts.tls/observability/alert/get", + "alerting:xpack.uptime.alerts.tls/observability/alert/find", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/alert/update", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/update", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/update", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/update", + "alerting:logs.alert.document.count/observability/alert/get", + "alerting:logs.alert.document.count/observability/alert/find", + "alerting:logs.alert.document.count/observability/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/observability/alert/getAlertSummary", + "alerting:logs.alert.document.count/observability/alert/update", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/update", + "alerting:slo.rules.burnRate/observability/alert/get", + "alerting:slo.rules.burnRate/observability/alert/find", + "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", + "alerting:slo.rules.burnRate/observability/alert/update", + "alerting:slo.rules.burnRate/alerts/alert/get", + "alerting:slo.rules.burnRate/alerts/alert/find", + "alerting:slo.rules.burnRate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/alerts/alert/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/alert/update", + "alerting:observability.rules.custom_threshold/observability/alert/get", + "alerting:observability.rules.custom_threshold/observability/alert/find", + "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/alert/update", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/update", + "alerting:.es-query/observability/alert/get", + "alerting:.es-query/observability/alert/find", + "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/observability/alert/getAlertSummary", + "alerting:.es-query/observability/alert/update", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/update", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/update", ], "minimal_read": Array [ "login:", @@ -10154,6 +20534,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.uptime.alerts.tls/uptime/rule/getRuleExecutionKPI", "alerting:xpack.uptime.alerts.tls/uptime/rule/getBackfill", "alerting:xpack.uptime.alerts.tls/uptime/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/get", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/find", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/findBackfill", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/get", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/getRuleState", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/getAlertSummary", @@ -10163,6 +20552,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/getRuleExecutionKPI", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/getBackfill", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/findBackfill", "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/get", "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/getRuleState", "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/getAlertSummary", @@ -10172,6 +20570,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/getRuleExecutionKPI", "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/getBackfill", "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/findBackfill", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/get", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/getRuleState", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/getAlertSummary", @@ -10181,97 +20588,103 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/getRuleExecutionKPI", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/getBackfill", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/findBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/get", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getRuleState", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getAlertSummary", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getExecutionLog", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getActionErrorLog", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/find", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getRuleExecutionKPI", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getBackfill", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/findBackfill", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/get", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/getRuleState", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/getAlertSummary", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/getExecutionLog", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/getActionErrorLog", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/find", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/getRuleExecutionKPI", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/getBackfill", - "alerting:xpack.synthetics.alerts.tls/uptime/rule/findBackfill", - "alerting:xpack.uptime.alerts.tls/uptime/alert/get", - "alerting:xpack.uptime.alerts.tls/uptime/alert/find", - "alerting:xpack.uptime.alerts.tls/uptime/alert/getAuthorizedAlertsIndices", - "alerting:xpack.uptime.alerts.tls/uptime/alert/getAlertSummary", - "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/get", - "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/find", - "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/getAuthorizedAlertsIndices", - "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/getAlertSummary", - "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/get", - "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/find", - "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/getAuthorizedAlertsIndices", - "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/getAlertSummary", - "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/get", - "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/find", - "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/getAuthorizedAlertsIndices", - "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/getAlertSummary", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/get", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/find", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/getAuthorizedAlertsIndices", - "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/getAlertSummary", - "alerting:xpack.synthetics.alerts.tls/uptime/alert/get", - "alerting:xpack.synthetics.alerts.tls/uptime/alert/find", - "alerting:xpack.synthetics.alerts.tls/uptime/alert/getAuthorizedAlertsIndices", - "alerting:xpack.synthetics.alerts.tls/uptime/alert/getAlertSummary", - "app:observability", - "ui:catalogue/observability", - "ui:navLinks/observability", - "ui:observability/read", - "alerting:slo.rules.burnRate/observability/rule/get", - "alerting:slo.rules.burnRate/observability/rule/getRuleState", - "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", - "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", - "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", - "alerting:slo.rules.burnRate/observability/rule/find", - "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", - "alerting:slo.rules.burnRate/observability/rule/getBackfill", - "alerting:slo.rules.burnRate/observability/rule/findBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/get", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", - "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", - "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", - "alerting:observability.rules.custom_threshold/observability/rule/find", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", - "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", - "alerting:.es-query/observability/rule/get", - "alerting:.es-query/observability/rule/getRuleState", - "alerting:.es-query/observability/rule/getAlertSummary", - "alerting:.es-query/observability/rule/getExecutionLog", - "alerting:.es-query/observability/rule/getActionErrorLog", - "alerting:.es-query/observability/rule/find", - "alerting:.es-query/observability/rule/getRuleExecutionKPI", - "alerting:.es-query/observability/rule/getBackfill", - "alerting:.es-query/observability/rule/findBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/get", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", - "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/find", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", - "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/find", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/findBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/findBackfill", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/get", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/getRuleState", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/find", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/getBackfill", + "alerting:xpack.synthetics.alerts.tls/uptime/rule/findBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/get", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/find", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/uptime/alert/get", + "alerting:xpack.uptime.alerts.tls/uptime/alert/find", + "alerting:xpack.uptime.alerts.tls/uptime/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/uptime/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/alert/get", + "alerting:xpack.uptime.alerts.tls/alerts/alert/find", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/uptime/alert/get", + "alerting:xpack.synthetics.alerts.tls/uptime/alert/find", + "alerting:xpack.synthetics.alerts.tls/uptime/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/uptime/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/get", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/find", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAlertSummary", + "app:observability", + "ui:catalogue/observability", + "ui:navLinks/observability", + "ui:observability/read", "alerting:apm.error_rate/observability/rule/get", "alerting:apm.error_rate/observability/rule/getRuleState", "alerting:apm.error_rate/observability/rule/getAlertSummary", @@ -10281,6 +20694,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.error_rate/observability/rule/getRuleExecutionKPI", "alerting:apm.error_rate/observability/rule/getBackfill", "alerting:apm.error_rate/observability/rule/findBackfill", + "alerting:apm.error_rate/alerts/rule/get", + "alerting:apm.error_rate/alerts/rule/getRuleState", + "alerting:apm.error_rate/alerts/rule/getAlertSummary", + "alerting:apm.error_rate/alerts/rule/getExecutionLog", + "alerting:apm.error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.error_rate/alerts/rule/find", + "alerting:apm.error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.error_rate/alerts/rule/getBackfill", + "alerting:apm.error_rate/alerts/rule/findBackfill", "alerting:apm.transaction_error_rate/observability/rule/get", "alerting:apm.transaction_error_rate/observability/rule/getRuleState", "alerting:apm.transaction_error_rate/observability/rule/getAlertSummary", @@ -10290,6 +20712,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_error_rate/observability/rule/getRuleExecutionKPI", "alerting:apm.transaction_error_rate/observability/rule/getBackfill", "alerting:apm.transaction_error_rate/observability/rule/findBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/get", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleState", + "alerting:apm.transaction_error_rate/alerts/rule/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/rule/getExecutionLog", + "alerting:apm.transaction_error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_error_rate/alerts/rule/find", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_error_rate/alerts/rule/getBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/findBackfill", "alerting:apm.transaction_duration/observability/rule/get", "alerting:apm.transaction_duration/observability/rule/getRuleState", "alerting:apm.transaction_duration/observability/rule/getAlertSummary", @@ -10299,6 +20730,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_duration/observability/rule/getRuleExecutionKPI", "alerting:apm.transaction_duration/observability/rule/getBackfill", "alerting:apm.transaction_duration/observability/rule/findBackfill", + "alerting:apm.transaction_duration/alerts/rule/get", + "alerting:apm.transaction_duration/alerts/rule/getRuleState", + "alerting:apm.transaction_duration/alerts/rule/getAlertSummary", + "alerting:apm.transaction_duration/alerts/rule/getExecutionLog", + "alerting:apm.transaction_duration/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_duration/alerts/rule/find", + "alerting:apm.transaction_duration/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_duration/alerts/rule/getBackfill", + "alerting:apm.transaction_duration/alerts/rule/findBackfill", "alerting:apm.anomaly/observability/rule/get", "alerting:apm.anomaly/observability/rule/getRuleState", "alerting:apm.anomaly/observability/rule/getAlertSummary", @@ -10308,6 +20748,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.anomaly/observability/rule/getRuleExecutionKPI", "alerting:apm.anomaly/observability/rule/getBackfill", "alerting:apm.anomaly/observability/rule/findBackfill", + "alerting:apm.anomaly/alerts/rule/get", + "alerting:apm.anomaly/alerts/rule/getRuleState", + "alerting:apm.anomaly/alerts/rule/getAlertSummary", + "alerting:apm.anomaly/alerts/rule/getExecutionLog", + "alerting:apm.anomaly/alerts/rule/getActionErrorLog", + "alerting:apm.anomaly/alerts/rule/find", + "alerting:apm.anomaly/alerts/rule/getRuleExecutionKPI", + "alerting:apm.anomaly/alerts/rule/getBackfill", + "alerting:apm.anomaly/alerts/rule/findBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getAlertSummary", @@ -10326,42 +20775,200 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleExecutionKPI", "alerting:xpack.synthetics.alerts.tls/observability/rule/getBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/findBackfill", - "alerting:slo.rules.burnRate/observability/alert/get", - "alerting:slo.rules.burnRate/observability/alert/find", - "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", - "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/alert/get", - "alerting:observability.rules.custom_threshold/observability/alert/find", - "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", - "alerting:.es-query/observability/alert/get", - "alerting:.es-query/observability/alert/find", - "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", - "alerting:.es-query/observability/alert/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/alert/get", - "alerting:metrics.alert.inventory.threshold/observability/alert/find", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.threshold/observability/rule/get", + "alerting:metrics.alert.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/observability/rule/find", + "alerting:metrics.alert.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.threshold/alerts/rule/get", + "alerting:metrics.alert.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/alerts/rule/find", + "alerting:metrics.alert.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/get", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/find", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/get", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/find", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/get", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/find", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/findBackfill", + "alerting:logs.alert.document.count/observability/rule/get", + "alerting:logs.alert.document.count/observability/rule/getRuleState", + "alerting:logs.alert.document.count/observability/rule/getAlertSummary", + "alerting:logs.alert.document.count/observability/rule/getExecutionLog", + "alerting:logs.alert.document.count/observability/rule/getActionErrorLog", + "alerting:logs.alert.document.count/observability/rule/find", + "alerting:logs.alert.document.count/observability/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/observability/rule/getBackfill", + "alerting:logs.alert.document.count/observability/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", + "alerting:slo.rules.burnRate/observability/rule/get", + "alerting:slo.rules.burnRate/observability/rule/getRuleState", + "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", + "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", + "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/observability/rule/find", + "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/observability/rule/getBackfill", + "alerting:slo.rules.burnRate/observability/rule/findBackfill", + "alerting:slo.rules.burnRate/alerts/rule/get", + "alerting:slo.rules.burnRate/alerts/rule/getRuleState", + "alerting:slo.rules.burnRate/alerts/rule/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/rule/getExecutionLog", + "alerting:slo.rules.burnRate/alerts/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/alerts/rule/find", + "alerting:slo.rules.burnRate/alerts/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/alerts/rule/getBackfill", + "alerting:slo.rules.burnRate/alerts/rule/findBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/get", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", + "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/observability/rule/find", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", + "alerting:.es-query/observability/rule/get", + "alerting:.es-query/observability/rule/getRuleState", + "alerting:.es-query/observability/rule/getAlertSummary", + "alerting:.es-query/observability/rule/getExecutionLog", + "alerting:.es-query/observability/rule/getActionErrorLog", + "alerting:.es-query/observability/rule/find", + "alerting:.es-query/observability/rule/getRuleExecutionKPI", + "alerting:.es-query/observability/rule/getBackfill", + "alerting:.es-query/observability/rule/findBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", "alerting:apm.error_rate/observability/alert/get", "alerting:apm.error_rate/observability/alert/find", "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.error_rate/observability/alert/getAlertSummary", + "alerting:apm.error_rate/alerts/alert/get", + "alerting:apm.error_rate/alerts/alert/find", + "alerting:apm.error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/alerts/alert/getAlertSummary", "alerting:apm.transaction_error_rate/observability/alert/get", "alerting:apm.transaction_error_rate/observability/alert/find", "alerting:apm.transaction_error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_error_rate/observability/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/alert/get", + "alerting:apm.transaction_error_rate/alerts/alert/find", + "alerting:apm.transaction_error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/alerts/alert/getAlertSummary", "alerting:apm.transaction_duration/observability/alert/get", "alerting:apm.transaction_duration/observability/alert/find", "alerting:apm.transaction_duration/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_duration/observability/alert/getAlertSummary", + "alerting:apm.transaction_duration/alerts/alert/get", + "alerting:apm.transaction_duration/alerts/alert/find", + "alerting:apm.transaction_duration/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/alerts/alert/getAlertSummary", "alerting:apm.anomaly/observability/alert/get", "alerting:apm.anomaly/observability/alert/find", "alerting:apm.anomaly/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.anomaly/observability/alert/getAlertSummary", + "alerting:apm.anomaly/alerts/alert/get", + "alerting:apm.anomaly/alerts/alert/find", + "alerting:apm.anomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/alerts/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", @@ -10370,6 +20977,78 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/alert/find", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", + "alerting:metrics.alert.threshold/observability/alert/get", + "alerting:metrics.alert.threshold/observability/alert/find", + "alerting:metrics.alert.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/alert/get", + "alerting:metrics.alert.threshold/alerts/alert/find", + "alerting:metrics.alert.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/alert/get", + "alerting:metrics.alert.inventory.threshold/observability/alert/find", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/alert/get", + "alerting:metrics.alert.inventory.threshold/alerts/alert/find", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/alert/get", + "alerting:xpack.uptime.alerts.tls/observability/alert/find", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAlertSummary", + "alerting:logs.alert.document.count/observability/alert/get", + "alerting:logs.alert.document.count/observability/alert/find", + "alerting:logs.alert.document.count/observability/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/observability/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", + "alerting:slo.rules.burnRate/observability/alert/get", + "alerting:slo.rules.burnRate/observability/alert/find", + "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/alert/get", + "alerting:slo.rules.burnRate/alerts/alert/find", + "alerting:slo.rules.burnRate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/alerts/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/alert/get", + "alerting:observability.rules.custom_threshold/observability/alert/find", + "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", + "alerting:.es-query/observability/alert/get", + "alerting:.es-query/observability/alert/find", + "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/observability/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", ], "read": Array [ "login:", @@ -10450,6 +21129,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.uptime.alerts.tls/uptime/rule/getRuleExecutionKPI", "alerting:xpack.uptime.alerts.tls/uptime/rule/getBackfill", "alerting:xpack.uptime.alerts.tls/uptime/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/get", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/alerts/rule/find", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/alerts/rule/findBackfill", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/get", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/getRuleState", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/getAlertSummary", @@ -10459,6 +21147,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/getRuleExecutionKPI", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/getBackfill", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/rule/findBackfill", "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/get", "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/getRuleState", "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/getAlertSummary", @@ -10468,6 +21165,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/getRuleExecutionKPI", "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/getBackfill", "alerting:xpack.uptime.alerts.monitorStatus/uptime/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/rule/findBackfill", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/get", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/getRuleState", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/getAlertSummary", @@ -10477,6 +21183,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/getRuleExecutionKPI", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/getBackfill", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/rule/findBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/get", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getRuleState", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getAlertSummary", @@ -10486,6 +21201,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getRuleExecutionKPI", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/getBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/rule/findBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/rule/findBackfill", "alerting:xpack.synthetics.alerts.tls/uptime/rule/get", "alerting:xpack.synthetics.alerts.tls/uptime/rule/getRuleState", "alerting:xpack.synthetics.alerts.tls/uptime/rule/getAlertSummary", @@ -10495,79 +21219,67 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/uptime/rule/getRuleExecutionKPI", "alerting:xpack.synthetics.alerts.tls/uptime/rule/getBackfill", "alerting:xpack.synthetics.alerts.tls/uptime/rule/findBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/get", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleState", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getExecutionLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getActionErrorLog", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/find", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/getBackfill", + "alerting:xpack.synthetics.alerts.tls/alerts/rule/findBackfill", "alerting:xpack.uptime.alerts.tls/uptime/alert/get", "alerting:xpack.uptime.alerts.tls/uptime/alert/find", "alerting:xpack.uptime.alerts.tls/uptime/alert/getAuthorizedAlertsIndices", "alerting:xpack.uptime.alerts.tls/uptime/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/alerts/alert/get", + "alerting:xpack.uptime.alerts.tls/alerts/alert/find", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/alerts/alert/getAlertSummary", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/get", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/find", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/getAuthorizedAlertsIndices", "alerting:xpack.uptime.alerts.tlsCertificate/uptime/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/alerts/alert/getAlertSummary", "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/get", "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/find", "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/getAuthorizedAlertsIndices", "alerting:xpack.uptime.alerts.monitorStatus/uptime/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/alerts/alert/getAlertSummary", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/get", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/find", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/getAuthorizedAlertsIndices", "alerting:xpack.uptime.alerts.durationAnomaly/uptime/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/alerts/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/get", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/find", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.monitorStatus/uptime/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/get", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/find", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.monitorStatus/alerts/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.tls/uptime/alert/get", "alerting:xpack.synthetics.alerts.tls/uptime/alert/find", "alerting:xpack.synthetics.alerts.tls/uptime/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.tls/uptime/alert/getAlertSummary", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/get", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/find", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.synthetics.alerts.tls/alerts/alert/getAlertSummary", "app:observability", "ui:catalogue/observability", "ui:navLinks/observability", "ui:observability/read", - "alerting:slo.rules.burnRate/observability/rule/get", - "alerting:slo.rules.burnRate/observability/rule/getRuleState", - "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", - "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", - "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", - "alerting:slo.rules.burnRate/observability/rule/find", - "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", - "alerting:slo.rules.burnRate/observability/rule/getBackfill", - "alerting:slo.rules.burnRate/observability/rule/findBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/get", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", - "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", - "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", - "alerting:observability.rules.custom_threshold/observability/rule/find", - "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", - "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", - "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", - "alerting:.es-query/observability/rule/get", - "alerting:.es-query/observability/rule/getRuleState", - "alerting:.es-query/observability/rule/getAlertSummary", - "alerting:.es-query/observability/rule/getExecutionLog", - "alerting:.es-query/observability/rule/getActionErrorLog", - "alerting:.es-query/observability/rule/find", - "alerting:.es-query/observability/rule/getRuleExecutionKPI", - "alerting:.es-query/observability/rule/getBackfill", - "alerting:.es-query/observability/rule/findBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", - "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/get", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", - "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", - "alerting:metrics.alert.inventory.threshold/observability/rule/find", - "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", - "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", - "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", "alerting:apm.error_rate/observability/rule/get", "alerting:apm.error_rate/observability/rule/getRuleState", "alerting:apm.error_rate/observability/rule/getAlertSummary", @@ -10577,6 +21289,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.error_rate/observability/rule/getRuleExecutionKPI", "alerting:apm.error_rate/observability/rule/getBackfill", "alerting:apm.error_rate/observability/rule/findBackfill", + "alerting:apm.error_rate/alerts/rule/get", + "alerting:apm.error_rate/alerts/rule/getRuleState", + "alerting:apm.error_rate/alerts/rule/getAlertSummary", + "alerting:apm.error_rate/alerts/rule/getExecutionLog", + "alerting:apm.error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.error_rate/alerts/rule/find", + "alerting:apm.error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.error_rate/alerts/rule/getBackfill", + "alerting:apm.error_rate/alerts/rule/findBackfill", "alerting:apm.transaction_error_rate/observability/rule/get", "alerting:apm.transaction_error_rate/observability/rule/getRuleState", "alerting:apm.transaction_error_rate/observability/rule/getAlertSummary", @@ -10586,6 +21307,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_error_rate/observability/rule/getRuleExecutionKPI", "alerting:apm.transaction_error_rate/observability/rule/getBackfill", "alerting:apm.transaction_error_rate/observability/rule/findBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/get", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleState", + "alerting:apm.transaction_error_rate/alerts/rule/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/rule/getExecutionLog", + "alerting:apm.transaction_error_rate/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_error_rate/alerts/rule/find", + "alerting:apm.transaction_error_rate/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_error_rate/alerts/rule/getBackfill", + "alerting:apm.transaction_error_rate/alerts/rule/findBackfill", "alerting:apm.transaction_duration/observability/rule/get", "alerting:apm.transaction_duration/observability/rule/getRuleState", "alerting:apm.transaction_duration/observability/rule/getAlertSummary", @@ -10595,6 +21325,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.transaction_duration/observability/rule/getRuleExecutionKPI", "alerting:apm.transaction_duration/observability/rule/getBackfill", "alerting:apm.transaction_duration/observability/rule/findBackfill", + "alerting:apm.transaction_duration/alerts/rule/get", + "alerting:apm.transaction_duration/alerts/rule/getRuleState", + "alerting:apm.transaction_duration/alerts/rule/getAlertSummary", + "alerting:apm.transaction_duration/alerts/rule/getExecutionLog", + "alerting:apm.transaction_duration/alerts/rule/getActionErrorLog", + "alerting:apm.transaction_duration/alerts/rule/find", + "alerting:apm.transaction_duration/alerts/rule/getRuleExecutionKPI", + "alerting:apm.transaction_duration/alerts/rule/getBackfill", + "alerting:apm.transaction_duration/alerts/rule/findBackfill", "alerting:apm.anomaly/observability/rule/get", "alerting:apm.anomaly/observability/rule/getRuleState", "alerting:apm.anomaly/observability/rule/getAlertSummary", @@ -10604,6 +21343,15 @@ export default function ({ getService }: FtrProviderContext) { "alerting:apm.anomaly/observability/rule/getRuleExecutionKPI", "alerting:apm.anomaly/observability/rule/getBackfill", "alerting:apm.anomaly/observability/rule/findBackfill", + "alerting:apm.anomaly/alerts/rule/get", + "alerting:apm.anomaly/alerts/rule/getRuleState", + "alerting:apm.anomaly/alerts/rule/getAlertSummary", + "alerting:apm.anomaly/alerts/rule/getExecutionLog", + "alerting:apm.anomaly/alerts/rule/getActionErrorLog", + "alerting:apm.anomaly/alerts/rule/find", + "alerting:apm.anomaly/alerts/rule/getRuleExecutionKPI", + "alerting:apm.anomaly/alerts/rule/getBackfill", + "alerting:apm.anomaly/alerts/rule/findBackfill", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getRuleState", "alerting:xpack.synthetics.alerts.monitorStatus/observability/rule/getAlertSummary", @@ -10622,42 +21370,200 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/rule/getRuleExecutionKPI", "alerting:xpack.synthetics.alerts.tls/observability/rule/getBackfill", "alerting:xpack.synthetics.alerts.tls/observability/rule/findBackfill", - "alerting:slo.rules.burnRate/observability/alert/get", - "alerting:slo.rules.burnRate/observability/alert/find", - "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", - "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", - "alerting:observability.rules.custom_threshold/observability/alert/get", - "alerting:observability.rules.custom_threshold/observability/alert/find", - "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", - "alerting:.es-query/observability/alert/get", - "alerting:.es-query/observability/alert/find", - "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", - "alerting:.es-query/observability/alert/getAlertSummary", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", - "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", - "alerting:metrics.alert.inventory.threshold/observability/alert/get", - "alerting:metrics.alert.inventory.threshold/observability/alert/find", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", - "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.threshold/observability/rule/get", + "alerting:metrics.alert.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/observability/rule/find", + "alerting:metrics.alert.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.threshold/alerts/rule/get", + "alerting:metrics.alert.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.threshold/alerts/rule/find", + "alerting:metrics.alert.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.threshold/alerts/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/get", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/observability/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/observability/rule/find", + "alerting:metrics.alert.inventory.threshold/observability/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/observability/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/observability/rule/findBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/get", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleState", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getExecutionLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getActionErrorLog", + "alerting:metrics.alert.inventory.threshold/alerts/rule/find", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getRuleExecutionKPI", + "alerting:metrics.alert.inventory.threshold/alerts/rule/getBackfill", + "alerting:metrics.alert.inventory.threshold/alerts/rule/findBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/get", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tls/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tls/observability/rule/find", + "alerting:xpack.uptime.alerts.tls/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tls/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tls/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.monitorStatus/observability/rule/findBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleState", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getExecutionLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getActionErrorLog", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getRuleExecutionKPI", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/getBackfill", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/rule/findBackfill", + "alerting:logs.alert.document.count/observability/rule/get", + "alerting:logs.alert.document.count/observability/rule/getRuleState", + "alerting:logs.alert.document.count/observability/rule/getAlertSummary", + "alerting:logs.alert.document.count/observability/rule/getExecutionLog", + "alerting:logs.alert.document.count/observability/rule/getActionErrorLog", + "alerting:logs.alert.document.count/observability/rule/find", + "alerting:logs.alert.document.count/observability/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/observability/rule/getBackfill", + "alerting:logs.alert.document.count/observability/rule/findBackfill", + "alerting:logs.alert.document.count/alerts/rule/get", + "alerting:logs.alert.document.count/alerts/rule/getRuleState", + "alerting:logs.alert.document.count/alerts/rule/getAlertSummary", + "alerting:logs.alert.document.count/alerts/rule/getExecutionLog", + "alerting:logs.alert.document.count/alerts/rule/getActionErrorLog", + "alerting:logs.alert.document.count/alerts/rule/find", + "alerting:logs.alert.document.count/alerts/rule/getRuleExecutionKPI", + "alerting:logs.alert.document.count/alerts/rule/getBackfill", + "alerting:logs.alert.document.count/alerts/rule/findBackfill", + "alerting:slo.rules.burnRate/observability/rule/get", + "alerting:slo.rules.burnRate/observability/rule/getRuleState", + "alerting:slo.rules.burnRate/observability/rule/getAlertSummary", + "alerting:slo.rules.burnRate/observability/rule/getExecutionLog", + "alerting:slo.rules.burnRate/observability/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/observability/rule/find", + "alerting:slo.rules.burnRate/observability/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/observability/rule/getBackfill", + "alerting:slo.rules.burnRate/observability/rule/findBackfill", + "alerting:slo.rules.burnRate/alerts/rule/get", + "alerting:slo.rules.burnRate/alerts/rule/getRuleState", + "alerting:slo.rules.burnRate/alerts/rule/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/rule/getExecutionLog", + "alerting:slo.rules.burnRate/alerts/rule/getActionErrorLog", + "alerting:slo.rules.burnRate/alerts/rule/find", + "alerting:slo.rules.burnRate/alerts/rule/getRuleExecutionKPI", + "alerting:slo.rules.burnRate/alerts/rule/getBackfill", + "alerting:slo.rules.burnRate/alerts/rule/findBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/get", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleState", + "alerting:observability.rules.custom_threshold/observability/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/observability/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/observability/rule/find", + "alerting:observability.rules.custom_threshold/observability/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/observability/rule/getBackfill", + "alerting:observability.rules.custom_threshold/observability/rule/findBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/get", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleState", + "alerting:observability.rules.custom_threshold/alerts/rule/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/rule/getExecutionLog", + "alerting:observability.rules.custom_threshold/alerts/rule/getActionErrorLog", + "alerting:observability.rules.custom_threshold/alerts/rule/find", + "alerting:observability.rules.custom_threshold/alerts/rule/getRuleExecutionKPI", + "alerting:observability.rules.custom_threshold/alerts/rule/getBackfill", + "alerting:observability.rules.custom_threshold/alerts/rule/findBackfill", + "alerting:.es-query/observability/rule/get", + "alerting:.es-query/observability/rule/getRuleState", + "alerting:.es-query/observability/rule/getAlertSummary", + "alerting:.es-query/observability/rule/getExecutionLog", + "alerting:.es-query/observability/rule/getActionErrorLog", + "alerting:.es-query/observability/rule/find", + "alerting:.es-query/observability/rule/getRuleExecutionKPI", + "alerting:.es-query/observability/rule/getBackfill", + "alerting:.es-query/observability/rule/findBackfill", + "alerting:.es-query/alerts/rule/get", + "alerting:.es-query/alerts/rule/getRuleState", + "alerting:.es-query/alerts/rule/getAlertSummary", + "alerting:.es-query/alerts/rule/getExecutionLog", + "alerting:.es-query/alerts/rule/getActionErrorLog", + "alerting:.es-query/alerts/rule/find", + "alerting:.es-query/alerts/rule/getRuleExecutionKPI", + "alerting:.es-query/alerts/rule/getBackfill", + "alerting:.es-query/alerts/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/observability/rule/findBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleState", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getExecutionLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getActionErrorLog", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getRuleExecutionKPI", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/getBackfill", + "alerting:xpack.ml.anomaly_detection_alert/alerts/rule/findBackfill", "alerting:apm.error_rate/observability/alert/get", "alerting:apm.error_rate/observability/alert/find", "alerting:apm.error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.error_rate/observability/alert/getAlertSummary", + "alerting:apm.error_rate/alerts/alert/get", + "alerting:apm.error_rate/alerts/alert/find", + "alerting:apm.error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.error_rate/alerts/alert/getAlertSummary", "alerting:apm.transaction_error_rate/observability/alert/get", "alerting:apm.transaction_error_rate/observability/alert/find", "alerting:apm.transaction_error_rate/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_error_rate/observability/alert/getAlertSummary", + "alerting:apm.transaction_error_rate/alerts/alert/get", + "alerting:apm.transaction_error_rate/alerts/alert/find", + "alerting:apm.transaction_error_rate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_error_rate/alerts/alert/getAlertSummary", "alerting:apm.transaction_duration/observability/alert/get", "alerting:apm.transaction_duration/observability/alert/find", "alerting:apm.transaction_duration/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.transaction_duration/observability/alert/getAlertSummary", + "alerting:apm.transaction_duration/alerts/alert/get", + "alerting:apm.transaction_duration/alerts/alert/find", + "alerting:apm.transaction_duration/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.transaction_duration/alerts/alert/getAlertSummary", "alerting:apm.anomaly/observability/alert/get", "alerting:apm.anomaly/observability/alert/find", "alerting:apm.anomaly/observability/alert/getAuthorizedAlertsIndices", "alerting:apm.anomaly/observability/alert/getAlertSummary", + "alerting:apm.anomaly/alerts/alert/get", + "alerting:apm.anomaly/alerts/alert/find", + "alerting:apm.anomaly/alerts/alert/getAuthorizedAlertsIndices", + "alerting:apm.anomaly/alerts/alert/getAlertSummary", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/get", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/find", "alerting:xpack.synthetics.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", @@ -10666,6 +21572,78 @@ export default function ({ getService }: FtrProviderContext) { "alerting:xpack.synthetics.alerts.tls/observability/alert/find", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAuthorizedAlertsIndices", "alerting:xpack.synthetics.alerts.tls/observability/alert/getAlertSummary", + "alerting:metrics.alert.threshold/observability/alert/get", + "alerting:metrics.alert.threshold/observability/alert/find", + "alerting:metrics.alert.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.threshold/alerts/alert/get", + "alerting:metrics.alert.threshold/alerts/alert/find", + "alerting:metrics.alert.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.threshold/alerts/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/observability/alert/get", + "alerting:metrics.alert.inventory.threshold/observability/alert/find", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/observability/alert/getAlertSummary", + "alerting:metrics.alert.inventory.threshold/alerts/alert/get", + "alerting:metrics.alert.inventory.threshold/alerts/alert/find", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:metrics.alert.inventory.threshold/alerts/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tls/observability/alert/get", + "alerting:xpack.uptime.alerts.tls/observability/alert/find", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tls/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/get", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/find", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.tlsCertificate/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/get", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/find", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.monitorStatus/observability/alert/getAlertSummary", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/get", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/find", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.uptime.alerts.durationAnomaly/observability/alert/getAlertSummary", + "alerting:logs.alert.document.count/observability/alert/get", + "alerting:logs.alert.document.count/observability/alert/find", + "alerting:logs.alert.document.count/observability/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/observability/alert/getAlertSummary", + "alerting:logs.alert.document.count/alerts/alert/get", + "alerting:logs.alert.document.count/alerts/alert/find", + "alerting:logs.alert.document.count/alerts/alert/getAuthorizedAlertsIndices", + "alerting:logs.alert.document.count/alerts/alert/getAlertSummary", + "alerting:slo.rules.burnRate/observability/alert/get", + "alerting:slo.rules.burnRate/observability/alert/find", + "alerting:slo.rules.burnRate/observability/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/observability/alert/getAlertSummary", + "alerting:slo.rules.burnRate/alerts/alert/get", + "alerting:slo.rules.burnRate/alerts/alert/find", + "alerting:slo.rules.burnRate/alerts/alert/getAuthorizedAlertsIndices", + "alerting:slo.rules.burnRate/alerts/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/observability/alert/get", + "alerting:observability.rules.custom_threshold/observability/alert/find", + "alerting:observability.rules.custom_threshold/observability/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/observability/alert/getAlertSummary", + "alerting:observability.rules.custom_threshold/alerts/alert/get", + "alerting:observability.rules.custom_threshold/alerts/alert/find", + "alerting:observability.rules.custom_threshold/alerts/alert/getAuthorizedAlertsIndices", + "alerting:observability.rules.custom_threshold/alerts/alert/getAlertSummary", + "alerting:.es-query/observability/alert/get", + "alerting:.es-query/observability/alert/find", + "alerting:.es-query/observability/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/observability/alert/getAlertSummary", + "alerting:.es-query/alerts/alert/get", + "alerting:.es-query/alerts/alert/find", + "alerting:.es-query/alerts/alert/getAuthorizedAlertsIndices", + "alerting:.es-query/alerts/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/observability/alert/getAlertSummary", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/get", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/find", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAuthorizedAlertsIndices", + "alerting:xpack.ml.anomaly_detection_alert/alerts/alert/getAlertSummary", ], }, } diff --git a/x-pack/test_serverless/api_integration/test_suites/search/platform_security/authorization.ts b/x-pack/test_serverless/api_integration/test_suites/search/platform_security/authorization.ts index a30b8aca571ea..ed9fdd30cbdae 100644 --- a/x-pack/test_serverless/api_integration/test_suites/search/platform_security/authorization.ts +++ b/x-pack/test_serverless/api_integration/test_suites/search/platform_security/authorization.ts @@ -42,6 +42,8 @@ export default function ({ getService }: FtrProviderContext) { "login:", "api:bulkGetUserProfiles", "api:dashboardUsageStats", + "api:savedQuery:manage", + "api:savedQuery:read", "api:store_search_session", "api:generateReport", "api:downloadCsv", @@ -225,6 +227,8 @@ export default function ({ getService }: FtrProviderContext) { "login:", "api:bulkGetUserProfiles", "api:dashboardUsageStats", + "api:savedQuery:manage", + "api:savedQuery:read", "app:dashboards", "app:kibana", "ui:catalogue/dashboard", @@ -377,6 +381,7 @@ export default function ({ getService }: FtrProviderContext) { "login:", "api:bulkGetUserProfiles", "api:dashboardUsageStats", + "api:savedQuery:read", "app:dashboards", "app:kibana", "ui:catalogue/dashboard", @@ -476,6 +481,7 @@ export default function ({ getService }: FtrProviderContext) { "login:", "api:bulkGetUserProfiles", "api:dashboardUsageStats", + "api:savedQuery:read", "app:dashboards", "app:kibana", "ui:catalogue/dashboard", @@ -611,6 +617,8 @@ export default function ({ getService }: FtrProviderContext) { "all": Array [ "login:", "api:fileUpload:analyzeFile", + "api:savedQuery:manage", + "api:savedQuery:read", "api:store_search_session", "api:generateReport", "app:discover", @@ -711,6 +719,8 @@ export default function ({ getService }: FtrProviderContext) { "minimal_all": Array [ "login:", "api:fileUpload:analyzeFile", + "api:savedQuery:manage", + "api:savedQuery:read", "app:discover", "app:kibana", "ui:catalogue/discover", @@ -778,6 +788,7 @@ export default function ({ getService }: FtrProviderContext) { ], "minimal_read": Array [ "login:", + "api:savedQuery:read", "app:discover", "app:kibana", "ui:catalogue/discover", @@ -822,6 +833,7 @@ export default function ({ getService }: FtrProviderContext) { ], "read": Array [ "login:", + "api:savedQuery:read", "app:discover", "app:kibana", "ui:catalogue/discover", diff --git a/x-pack/test_serverless/api_integration/test_suites/security/platform_security/authorization.ts b/x-pack/test_serverless/api_integration/test_suites/security/platform_security/authorization.ts index c3b37539946ff..1f9a7f74fd572 100644 --- a/x-pack/test_serverless/api_integration/test_suites/security/platform_security/authorization.ts +++ b/x-pack/test_serverless/api_integration/test_suites/security/platform_security/authorization.ts @@ -742,6 +742,8 @@ export default function ({ getService }: FtrProviderContext) { "alerting:siem.newTermsRule/siem/alert/getAlertSummary", "alerting:siem.newTermsRule/siem/alert/update", "api:fileUpload:analyzeFile", + "api:savedQuery:manage", + "api:savedQuery:read", "api:store_search_session", "api:generateReport", "app:discover", @@ -1597,6 +1599,8 @@ export default function ({ getService }: FtrProviderContext) { "alerting:siem.newTermsRule/siem/alert/getAlertSummary", "alerting:siem.newTermsRule/siem/alert/update", "api:fileUpload:analyzeFile", + "api:savedQuery:manage", + "api:savedQuery:read", "api:store_search_session", "api:generateReport", "app:discover", @@ -2003,6 +2007,7 @@ export default function ({ getService }: FtrProviderContext) { "alerting:siem.newTermsRule/siem/alert/getAuthorizedAlertsIndices", "alerting:siem.newTermsRule/siem/alert/getAlertSummary", "alerting:siem.newTermsRule/siem/alert/update", + "api:savedQuery:read", "app:discover", "ui:catalogue/discover", "ui:navLinks/discover", @@ -2370,6 +2375,7 @@ export default function ({ getService }: FtrProviderContext) { "alerting:siem.newTermsRule/siem/alert/getAuthorizedAlertsIndices", "alerting:siem.newTermsRule/siem/alert/getAlertSummary", "alerting:siem.newTermsRule/siem/alert/update", + "api:savedQuery:read", "app:discover", "ui:catalogue/discover", "ui:navLinks/discover", diff --git a/x-pack/test_serverless/functional/page_objects/svl_api_keys.ts b/x-pack/test_serverless/functional/page_objects/svl_api_keys.ts index 2228967f29155..183a489a41e78 100644 --- a/x-pack/test_serverless/functional/page_objects/svl_api_keys.ts +++ b/x-pack/test_serverless/functional/page_objects/svl_api_keys.ts @@ -6,6 +6,7 @@ */ import expect from '@kbn/expect'; +import { SecurityApiKey } from '@elastic/elasticsearch/lib/api/types'; import { FtrProviderContext } from '../ftr_provider_context'; const APIKEY_MASK = '•'.repeat(60); @@ -27,6 +28,10 @@ export function SvlApiKeysProvider({ getService, getPageObjects }: FtrProviderCo await browser.clearSessionStorage(); }, + async expectAPIKeyExists() { + await testSubjects.existOrFail('apiKeyFormAPIKey', { timeout: 1000 }); + }, + async expectAPIKeyAvailable() { await testSubjects.existOrFail('apiKeyFormAPIKey'); await retry.try(async () => { @@ -88,8 +93,19 @@ export function SvlApiKeysProvider({ getService, getPageObjects }: FtrProviderCo }, async deleteAPIKeys() { + const filterInvalid = (key: SecurityApiKey) => !key.invalidated; + const { api_keys: apiKeys } = await es.security.getApiKey(); - await es.security.invalidateApiKey({ ids: apiKeys.map((key) => key.id) }); + + const validKeys = apiKeys.filter(filterInvalid); + + if (validKeys.length === 0) { + return; + } + + await es.security.invalidateApiKey({ + ids: validKeys.map((key) => key.id), + }); }, async expectCreateApiKeyAction() { diff --git a/x-pack/test_serverless/functional/page_objects/svl_search_index_detail_page.ts b/x-pack/test_serverless/functional/page_objects/svl_search_index_detail_page.ts index 0609b2bec4aed..17821c7dfe73b 100644 --- a/x-pack/test_serverless/functional/page_objects/svl_search_index_detail_page.ts +++ b/x-pack/test_serverless/functional/page_objects/svl_search_index_detail_page.ts @@ -208,6 +208,33 @@ export function SvlSearchIndexDetailPageProvider({ getService }: FtrProviderCont ); }, + async expectHasSampleDocuments() { + await testSubjects.existOrFail('ingestDataCodeExample-code-block'); + expect(await testSubjects.getVisibleText('ingestDataCodeExample-code-block')).to.contain( + 'Yellowstone National Park' + ); + expect(await testSubjects.getVisibleText('ingestDataCodeExample-code-block')).to.contain( + 'Yosemite National Park' + ); + expect(await testSubjects.getVisibleText('ingestDataCodeExample-code-block')).to.contain( + 'Rocky Mountain National Park' + ); + }, + + async expectSampleDocumentsWithCustomMappings() { + await browser.refresh(); + await testSubjects.existOrFail('ingestDataCodeExample-code-block'); + expect(await testSubjects.getVisibleText('ingestDataCodeExample-code-block')).to.contain( + 'Example text 1' + ); + expect(await testSubjects.getVisibleText('ingestDataCodeExample-code-block')).to.contain( + 'Example text 2' + ); + expect(await testSubjects.getVisibleText('ingestDataCodeExample-code-block')).to.contain( + 'Example text 3' + ); + }, + async clickFirstDocumentDeleteAction() { await testSubjects.existOrFail('documentMetadataButton'); await testSubjects.click('documentMetadataButton'); diff --git a/x-pack/test_serverless/functional/services/deployment_agnostic_services.ts b/x-pack/test_serverless/functional/services/deployment_agnostic_services.ts index 314ecf93fb7be..1f09e7353763f 100644 --- a/x-pack/test_serverless/functional/services/deployment_agnostic_services.ts +++ b/x-pack/test_serverless/functional/services/deployment_agnostic_services.ts @@ -36,7 +36,6 @@ const deploymentAgnosticFunctionalServices = _.pick(functionalServices, [ 'dashboardVisualizations', 'dataGrid', 'dataStreams', - 'docTable', 'dataViews', 'elasticChart', 'embedding', diff --git a/x-pack/test_serverless/functional/test_suites/common/dev_tools/search_profiler.ts b/x-pack/test_serverless/functional/test_suites/common/dev_tools/search_profiler.ts index 979943ffa602c..169f266e0c296 100644 --- a/x-pack/test_serverless/functional/test_suites/common/dev_tools/search_profiler.ts +++ b/x-pack/test_serverless/functional/test_suites/common/dev_tools/search_profiler.ts @@ -18,6 +18,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const PageObjects = getPageObjects(['svlCommonPage', 'common', 'searchProfiler']); const retry = getService('retry'); const es = getService('es'); + const browser = getService('browser'); describe('Search Profiler Editor', () => { before(async () => { @@ -81,6 +82,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('profiles a simple query', async () => { + await browser.refresh(); await PageObjects.searchProfiler.setIndexName(indexName); await PageObjects.searchProfiler.setQuery(testQuery); diff --git a/x-pack/test_serverless/functional/test_suites/common/discover/group6/_sidebar.ts b/x-pack/test_serverless/functional/test_suites/common/discover/group6/_sidebar.ts index 61cd9728223d1..e7be4ab2859f5 100644 --- a/x-pack/test_serverless/functional/test_suites/common/discover/group6/_sidebar.ts +++ b/x-pack/test_serverless/functional/test_suites/common/discover/group6/_sidebar.ts @@ -27,12 +27,26 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const retry = getService('retry'); const dataGrid = getService('dataGrid'); const dataViews = getService('dataViews'); + const queryBar = getService('queryBar'); + const log = getService('log'); const INITIAL_FIELD_LIST_SUMMARY = '48 available fields. 5 empty fields. 4 meta fields.'; - describe('discover sidebar', function describeIndexTests() { - // see details: https://github.com/elastic/kibana/issues/195100 - this.tags(['failsOnMKI']); + const expectFieldListDescription = async (expectedNumber: string) => { + return await retry.try(async () => { + await PageObjects.discover.waitUntilSearchingHasFinished(); + await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); + const ariaDescription = await PageObjects.unifiedFieldList.getSidebarAriaDescription(); + if (ariaDescription !== expectedNumber) { + log.warning( + `Expected Sidebar Aria Description: ${expectedNumber}, got: ${ariaDescription}` + ); + await queryBar.submitQuery(); + } + expect(ariaDescription).to.be(expectedNumber); + }); + }; + describe('discover sidebar', function describeIndexTests() { before(async function () { await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); await PageObjects.svlCommonPage.loginAsAdmin(); @@ -66,36 +80,21 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); await PageObjects.unifiedFieldList.openSidebarFieldFilter(); - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await testSubjects.click('typeFilter-keyword'); - - await retry.waitFor('first updates', async () => { - return ( - (await PageObjects.unifiedFieldList.getSidebarAriaDescription()) === - '6 available fields. 1 empty field. 3 meta fields.' - ); - }); + // first update + await expectFieldListDescription('6 available fields. 1 empty field. 3 meta fields.'); await testSubjects.click('typeFilter-number'); - await retry.waitFor('second updates', async () => { - return ( - (await PageObjects.unifiedFieldList.getSidebarAriaDescription()) === - '10 available fields. 3 empty fields. 4 meta fields.' - ); - }); + // second update + await expectFieldListDescription('10 available fields. 3 empty fields. 4 meta fields.'); await testSubjects.click('fieldListFiltersFieldTypeFilterClearAll'); - await retry.waitFor('reset', async () => { - return ( - (await PageObjects.unifiedFieldList.getSidebarAriaDescription()) === - INITIAL_FIELD_LIST_SUMMARY - ); - }); + // reset + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); }); // TODO: ES|QL tests removed since ES|QL isn't supported in Serverless @@ -103,44 +102,23 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('search', function () { beforeEach(async () => { - await PageObjects.header.waitUntilLoadingHasFinished(); - await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); }); afterEach(async () => { const fieldSearch = await testSubjects.find('clearSearchButton'); await fieldSearch.click(); - await retry.waitFor('reset', async () => { - return ( - (await PageObjects.unifiedFieldList.getSidebarAriaDescription()) === - INITIAL_FIELD_LIST_SUMMARY - ); - }); + // reset + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); }); it('should be able to search by string', async function () { await PageObjects.unifiedFieldList.findFieldByName('i'); - await retry.waitFor('first updates', async () => { - return ( - (await PageObjects.unifiedFieldList.getSidebarAriaDescription()) === - '28 available fields. 2 empty fields. 3 meta fields.' - ); - }); - + await expectFieldListDescription('28 available fields. 2 empty fields. 3 meta fields.'); await PageObjects.unifiedFieldList.findFieldByName('p'); - - await retry.waitFor('second updates', async () => { - return ( - (await PageObjects.unifiedFieldList.getSidebarAriaDescription()) === - '4 available fields. 0 meta fields.' - ); - }); + await expectFieldListDescription('4 available fields. 0 meta fields.'); expect( (await PageObjects.unifiedFieldList.getSidebarSectionFieldNames('available')).join(', ') @@ -149,13 +127,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should be able to search by wildcard', async function () { await PageObjects.unifiedFieldList.findFieldByName('relatedContent*image'); - - await retry.waitFor('updates', async () => { - return ( - (await PageObjects.unifiedFieldList.getSidebarAriaDescription()) === - '2 available fields. 0 meta fields.' - ); - }); + await expectFieldListDescription('2 available fields. 0 meta fields.'); expect( (await PageObjects.unifiedFieldList.getSidebarSectionFieldNames('available')).join(', ') @@ -165,12 +137,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should be able to search with spaces as wildcard', async function () { await PageObjects.unifiedFieldList.findFieldByName('relatedContent image'); - await retry.waitFor('updates', async () => { - return ( - (await PageObjects.unifiedFieldList.getSidebarAriaDescription()) === - '4 available fields. 0 meta fields.' - ); - }); + await expectFieldListDescription('4 available fields. 0 meta fields.'); expect( (await PageObjects.unifiedFieldList.getSidebarSectionFieldNames('available')).join(', ') @@ -181,13 +148,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should be able to search with fuzzy search (1 typo)', async function () { await PageObjects.unifiedFieldList.findFieldByName('rel4tedContent.art'); - - await retry.waitFor('updates', async () => { - return ( - (await PageObjects.unifiedFieldList.getSidebarAriaDescription()) === - '4 available fields. 0 meta fields.' - ); - }); + await expectFieldListDescription('4 available fields. 0 meta fields.'); expect( (await PageObjects.unifiedFieldList.getSidebarSectionFieldNames('available')).join(', ') @@ -204,9 +165,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); // expect no changes in the list - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); }); }); @@ -311,9 +270,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { (await PageObjects.unifiedFieldList.getSidebarSectionFieldNames('meta')).join(', ') ).to.be('_id, _ignored, _index, _score'); - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); }); it('should show field list groups excluding subfields when searched from source', async function () { @@ -354,7 +311,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { (await PageObjects.unifiedFieldList.getSidebarSectionFieldNames('unmapped')).join(', ') ).to.be('relatedContent'); - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( + await expectFieldListDescription( '48 available fields. 1 unmapped field. 5 empty fields. 4 meta fields.' ); }); @@ -375,7 +332,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(availableFields.includes('extension')).to.be(true); expect(availableFields.includes('@message')).to.be(true); - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( + await expectFieldListDescription( '2 selected fields. 2 popular fields. 48 available fields. 5 empty fields. 4 meta fields.' ); @@ -395,7 +352,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { (await PageObjects.unifiedFieldList.getSidebarSectionFieldNames('popular')).join(', ') ).to.be('@message, _id, extension'); - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( + await expectFieldListDescription( '3 selected fields. 3 popular fields. 48 available fields. 5 empty fields. 4 meta fields.' ); }); @@ -408,20 +365,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'test/functional/fixtures/kbn_archiver/index_pattern_without_timefield' ); await browser.refresh(); - await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); - + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await dataViews.switchToAndValidate('with-timefield'); - await PageObjects.header.waitUntilLoadingHasFinished(); - await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - '0 available fields. 0 meta fields.' - ); + await expectFieldListDescription('0 available fields. 0 meta fields.'); await testSubjects.missingOrFail( `${PageObjects.unifiedFieldList.getSidebarSectionSelector('available')}-fetchWarning` ); @@ -433,12 +380,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await dataViews.switchToAndValidate('logstash-*'); - await PageObjects.header.waitUntilLoadingHasFinished(); - await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await kibanaServer.importExport.unload( 'test/functional/fixtures/kbn_archiver/index_pattern_without_timefield' ); @@ -453,29 +395,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ); await browser.refresh(); - await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await dataViews.switchToAndValidate('without-timefield'); - await PageObjects.header.waitUntilLoadingHasFinished(); - await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - '6 available fields. 4 meta fields.' - ); + await expectFieldListDescription('6 available fields. 4 meta fields.'); await dataViews.switchToAndValidate('with-timefield'); - await PageObjects.header.waitUntilLoadingHasFinished(); - await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); + await expectFieldListDescription('0 available fields. 7 empty fields. 4 meta fields.'); - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - '0 available fields. 7 empty fields. 4 meta fields.' - ); await testSubjects.existOrFail( `${PageObjects.unifiedFieldList.getSidebarSectionSelector( 'available' @@ -484,12 +413,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await dataViews.switchToAndValidate('logstash-*'); - await PageObjects.header.waitUntilLoadingHasFinished(); - await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await kibanaServer.importExport.unload( 'test/functional/fixtures/kbn_archiver/index_pattern_without_timefield' @@ -501,11 +425,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should work when filters change', async () => { - await PageObjects.header.waitUntilLoadingHasFinished(); - - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await PageObjects.unifiedFieldList.clickFieldListItem('extension'); expect(await testSubjects.getVisibleText('dscFieldStats-topValues')).to.be( @@ -516,9 +436,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.header.waitUntilLoadingHasFinished(); await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); // check that the filter was passed down to the sidebar await PageObjects.unifiedFieldList.clickFieldListItem('extension'); @@ -530,31 +448,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await kibanaServer.importExport.load( 'test/functional/fixtures/kbn_archiver/many_fields_data_view' ); - + await dataViews.switchToAndValidate('logstash-*'); await browser.refresh(); - await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await dataViews.switchToAndValidate('indices-stats*'); - - await PageObjects.header.waitUntilLoadingHasFinished(); - await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - '6873 available fields. 4 meta fields.' - ); + await expectFieldListDescription('6873 available fields. 4 meta fields.'); await dataViews.switchToAndValidate('logstash-*'); - await PageObjects.header.waitUntilLoadingHasFinished(); - await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await kibanaServer.importExport.unload( 'test/functional/fixtures/kbn_archiver/many_fields_data_view' @@ -569,12 +472,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { hasTimeField: true, }); - await PageObjects.discover.waitUntilSearchingHasFinished(); - await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await PageObjects.discover.addRuntimeField( '_bytes-runtimefield', @@ -585,12 +483,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { return !(await testSubjects.exists('fieldEditor')); }); - await PageObjects.header.waitUntilLoadingHasFinished(); - await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - '49 available fields. 5 empty fields. 4 meta fields.' - ); + await expectFieldListDescription('49 available fields. 5 empty fields. 4 meta fields.'); let allFields = await PageObjects.unifiedFieldList.getAllFieldNames(); expect(allFields.includes('_bytes-runtimefield')).to.be(true); @@ -604,23 +497,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { return !(await testSubjects.exists('fieldEditor')); }); - await PageObjects.header.waitUntilLoadingHasFinished(); - await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - '49 available fields. 5 empty fields. 4 meta fields.' - ); + await expectFieldListDescription('49 available fields. 5 empty fields. 4 meta fields.'); allFields = await PageObjects.unifiedFieldList.getAllFieldNames(); expect(allFields.includes('_bytes-runtimefield2')).to.be(true); expect(allFields.includes('_bytes-runtimefield')).to.be(false); await PageObjects.discover.removeField('_bytes-runtimefield'); - await PageObjects.header.waitUntilLoadingHasFinished(); - await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); allFields = await PageObjects.unifiedFieldList.getAllFieldNames(); expect(allFields.includes('_bytes-runtimefield2')).to.be(false); @@ -628,11 +511,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should render even when retrieving documents failed with an error', async () => { - await PageObjects.header.waitUntilLoadingHasFinished(); - - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await PageObjects.discover.addRuntimeField('_invalid-runtimefield', `emit(‘’);`); @@ -641,12 +520,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { // error in fetching documents because of the invalid runtime field await PageObjects.discover.showsErrorCallout(); - await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); - // check that the sidebar is rendered - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - '49 available fields. 5 empty fields. 4 meta fields.' - ); + await expectFieldListDescription('49 available fields. 5 empty fields. 4 meta fields.'); + let allFields = await PageObjects.unifiedFieldList.getAllFieldNames(); expect(allFields.includes('_invalid-runtimefield')).to.be(true); @@ -671,22 +547,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await kibanaServer.importExport.load( 'test/functional/fixtures/kbn_archiver/index_pattern_without_timefield' ); - await browser.refresh(); - await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - INITIAL_FIELD_LIST_SUMMARY - ); + await expectFieldListDescription(INITIAL_FIELD_LIST_SUMMARY); await dataViews.switchToAndValidate('with-timefield'); - - await PageObjects.header.waitUntilLoadingHasFinished(); - await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - '0 available fields. 7 empty fields. 4 meta fields.' - ); + await expectFieldListDescription('0 available fields. 7 empty fields. 4 meta fields.'); await testSubjects.existOrFail( `${PageObjects.unifiedFieldList.getSidebarSectionSelector( 'available' @@ -698,12 +563,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'Sep 23, 2019 @ 00:00:00.000' ); - await PageObjects.header.waitUntilLoadingHasFinished(); - await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); - - expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( - '7 available fields. 4 meta fields.' - ); + await expectFieldListDescription('7 available fields. 4 meta fields.'); await kibanaServer.importExport.unload( 'test/functional/fixtures/kbn_archiver/index_pattern_without_timefield' diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_details.ts b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_details.ts index 52d114802b524..f4f0c8172de49 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_details.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_details.ts @@ -365,7 +365,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ); }); - it('should show the degraded fields table with data when present', async () => { + it('should show the degraded fields table with data and spark plots when present', async () => { await PageObjects.datasetQuality.navigateToDetails({ dataStream: degradedDataStreamName, }); @@ -378,17 +378,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.datasetQuality.getDatasetQualityDetailsDegradedFieldTableRows(); expect(rows.length).to.eql(3); - }); - - it('should display Spark Plot for every row of degraded fields', async () => { - await PageObjects.datasetQuality.navigateToDetails({ - dataStream: degradedDataStreamName, - }); - - await PageObjects.datasetQuality.waitUntilTableLoaded(); - - const rows = - await PageObjects.datasetQuality.getDatasetQualityDetailsDegradedFieldTableRows(); const sparkPlots = await testSubjects.findAll( PageObjects.datasetQuality.testSubjectSelectors.datasetQualitySparkPlot diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/degraded_field_flyout.ts b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/degraded_field_flyout.ts index 154bd43b3ef7b..7d12db16850cc 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/degraded_field_flyout.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/degraded_field_flyout.ts @@ -44,14 +44,19 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const customComponentTemplateName = 'logs-synth@mappings'; const nginxAccessDatasetName = 'nginx.access'; - const customComponentTemplateNameNginx = 'logs-nginx.access@custom'; + const customComponentTemplateNameNginx = `logs-${nginxAccessDatasetName}@custom`; const nginxAccessDataStreamName = `${type}-${nginxAccessDatasetName}-${defaultNamespace}`; const nginxPkg = { name: 'nginx', version: '1.23.0', }; - describe('Degraded fields flyout', () => { + const apmAppDatasetName = 'apm.app.tug'; + const apmAppDataStreamName = `${type}-${apmAppDatasetName}-${defaultNamespace}`; + + describe('Degraded fields flyout', function () { + // see details: https://github.com/elastic/kibana/issues/202641 + this.tags(['failsOnMKI']); describe('degraded field flyout open-close', () => { before(async () => { await synthtrace.index([ @@ -183,6 +188,29 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { .timestamp(timestamp) ); }), + // Ingest Degraded Logs with 26 fields in Apm DataSet + timerange(moment(to).subtract(count, 'minute'), moment(to)) + .interval('1m') + .rate(1) + .generator((timestamp) => { + return Array(1) + .fill(0) + .flatMap(() => + log + .create() + .dataset(apmAppDatasetName) + .message('a log message') + .logLevel(MORE_THAN_1024_CHARS) + .service(serviceName) + .namespace(defaultNamespace) + .defaults({ + 'service.name': serviceName, + 'trace.id': generateShortId(), + test_field: [MORE_THAN_1024_CHARS, ANOTHER_1024_CHARS], + }) + .timestamp(timestamp) + ); + }), ]); // Set Limit of 25 @@ -198,6 +226,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'mapping.total_fields.limit': 42, }); + // Set Limit of 26 + await PageObjects.datasetQuality.setDataStreamSettings(apmAppDataStreamName, { + 'mapping.total_fields.limit': 25, + }); + await synthtrace.index([ // Ingest Degraded Logs with 26 field timerange(moment(to).subtract(count, 'minute'), moment(to)) @@ -247,11 +280,36 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { .timestamp(timestamp) ); }), + // Ingest Degraded Logs with 27 fields in Apm APP DataSet + timerange(moment(to).subtract(count, 'minute'), moment(to)) + .interval('1m') + .rate(1) + .generator((timestamp) => { + return Array(1) + .fill(0) + .flatMap(() => + log + .create() + .dataset(apmAppDatasetName) + .message('a log message') + .logLevel(MORE_THAN_1024_CHARS) + .service(serviceName) + .namespace(defaultNamespace) + .defaults({ + 'service.name': serviceName, + 'trace.id': generateShortId(), + test_field: [MORE_THAN_1024_CHARS, ANOTHER_1024_CHARS], + 'cloud.project.id': generateShortId(), + }) + .timestamp(timestamp) + ); + }), ]); // Rollover Datastream to reset the limit to default which is 1000 await PageObjects.datasetQuality.rolloverDataStream(degradedDatasetWithLimitDataStreamName); await PageObjects.datasetQuality.rolloverDataStream(nginxAccessDataStreamName); + await PageObjects.datasetQuality.rolloverDataStream(apmAppDataStreamName); // Set Limit of 26 await PageObjects.datasetQuality.setDataStreamSettings( @@ -273,6 +331,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { } ); + // Set Limit of 27 + await PageObjects.datasetQuality.setDataStreamSettings( + PageObjects.datasetQuality.generateBackingIndexNameWithoutVersion({ + dataset: apmAppDatasetName, + }) + '-000002', + { + 'mapping.total_fields.limit': 27, + } + ); + await synthtrace.index([ // Ingest Degraded Logs with 26 field timerange(moment(to).subtract(count, 'minute'), moment(to)) @@ -322,6 +390,30 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { .timestamp(timestamp) ); }), + // Ingest Degraded Logs with 27 fields in Apm APP DataSet + timerange(moment(to).subtract(count, 'minute'), moment(to)) + .interval('1m') + .rate(1) + .generator((timestamp) => { + return Array(1) + .fill(0) + .flatMap(() => + log + .create() + .dataset(apmAppDatasetName) + .message('a log message') + .logLevel(MORE_THAN_1024_CHARS) + .service(serviceName) + .namespace(defaultNamespace) + .defaults({ + 'service.name': serviceName, + 'trace.id': generateShortId(), + test_field: [MORE_THAN_1024_CHARS, ANOTHER_1024_CHARS], + 'cloud.project.id': generateShortId(), + }) + .timestamp(timestamp) + ); + }), ]); await PageObjects.svlCommonPage.loginAsAdmin(); }); @@ -722,6 +814,36 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(linkURL?.endsWith('mapping-settings-limit.html')).to.be(true); }); + it('should display increase field limit as a possible mitigation for special packages like apm app', async () => { + await PageObjects.datasetQuality.navigateToDetails({ + dataStream: apmAppDataStreamName, + expandedDegradedField: 'cloud.project', + }); + + // Field Limit Mitigation Section should exist + await testSubjects.existOrFail( + 'datasetQualityDetailsDegradedFieldFlyoutFieldLimitMitigationAccordion' + ); + + // Should display the panel to increase field limit + await testSubjects.existOrFail( + 'datasetQualityDetailsDegradedFieldFlyoutIncreaseFieldLimitPanel' + ); + + // Should display official online documentation link + await testSubjects.existOrFail( + 'datasetQualityManualMitigationsPipelineOfficialDocumentationLink' + ); + + const linkButton = await testSubjects.find( + 'datasetQualityManualMitigationsPipelineOfficialDocumentationLink' + ); + + const linkURL = await linkButton.getAttribute('href'); + + expect(linkURL?.endsWith('mapping-settings-limit.html')).to.be(true); + }); + it('should display increase field limit as a possible mitigation for non integration', async () => { await PageObjects.datasetQuality.navigateToDetails({ dataStream: degradedDatasetWithLimitDataStreamName, @@ -787,10 +909,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(newFieldLimit).to.be(newLimit); // Should display the apply button - await testSubjects.existOrFail('datasetQualityIncreaseFieldMappingLimitButtonButton'); + await testSubjects.existOrFail('datasetQualityIncreaseFieldMappingLimitButton'); const applyButton = await testSubjects.find( - 'datasetQualityIncreaseFieldMappingLimitButtonButton' + 'datasetQualityIncreaseFieldMappingLimitButton' ); const applyButtonDisabledStatus = await applyButton.getAttribute('disabled'); @@ -817,7 +939,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ); const applyButton = await testSubjects.find( - 'datasetQualityIncreaseFieldMappingLimitButtonButton' + 'datasetQualityIncreaseFieldMappingLimitButton' ); const applyButtonDisabledStatus = await applyButton.getAttribute('disabled'); @@ -844,7 +966,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await retry.tryForTime(5000, async () => { const applyButton = await testSubjects.find( - 'datasetQualityIncreaseFieldMappingLimitButtonButton' + 'datasetQualityIncreaseFieldMappingLimitButton' ); await applyButton.click(); @@ -864,7 +986,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.header.waitUntilLoadingHasFinished(); const applyButton = await testSubjects.find( - 'datasetQualityIncreaseFieldMappingLimitButtonButton' + 'datasetQualityIncreaseFieldMappingLimitButton' ); await applyButton.click(); diff --git a/x-pack/test_serverless/functional/test_suites/search/elasticsearch_start.ts b/x-pack/test_serverless/functional/test_suites/search/elasticsearch_start.ts index ba370871c07ff..da966b21185c5 100644 --- a/x-pack/test_serverless/functional/test_suites/search/elasticsearch_start.ts +++ b/x-pack/test_serverless/functional/test_suites/search/elasticsearch_start.ts @@ -21,13 +21,13 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const esDeleteAllIndices = getService('esDeleteAllIndices'); const es = getService('es'); const browser = getService('browser'); + const retry = getService('retry'); const deleteAllTestIndices = async () => { await esDeleteAllIndices(['search-*', 'test-*']); }; - // Failing: See https://github.com/elastic/kibana/issues/200020 - describe.skip('Elasticsearch Start [Onboarding Empty State]', function () { + describe('Elasticsearch Start [Onboarding Empty State]', function () { describe('developer', function () { before(async () => { await pageObjects.svlCommonPage.loginWithRole('developer'); @@ -96,7 +96,20 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('should show the api key in code view', async () => { await pageObjects.svlSearchElasticsearchStartPage.expectToBeOnStartPage(); await pageObjects.svlSearchElasticsearchStartPage.clickCodeViewButton(); + // sometimes the API key exists in the cluster and its lost in sessionStorage + // if fails we retry to delete the API key and refresh the browser + await retry.try( + async () => { + await pageObjects.svlApiKeys.expectAPIKeyExists(); + }, + async () => { + await pageObjects.svlApiKeys.deleteAPIKeys(); + await browser.refresh(); + await pageObjects.svlSearchElasticsearchStartPage.clickCodeViewButton(); + } + ); await pageObjects.svlApiKeys.expectAPIKeyAvailable(); + const apiKeyUI = await pageObjects.svlApiKeys.getAPIKeyFromUI(); const apiKeySession = await pageObjects.svlApiKeys.getAPIKeyFromSessionStorage(); diff --git a/x-pack/test_serverless/functional/test_suites/search/navigation.ts b/x-pack/test_serverless/functional/test_suites/search/navigation.ts index 74d1c59cbc8e5..abf4b0e2eef69 100644 --- a/x-pack/test_serverless/functional/test_suites/search/navigation.ts +++ b/x-pack/test_serverless/functional/test_suites/search/navigation.ts @@ -241,7 +241,7 @@ export default function ({ getPageObject, getService }: FtrProviderContext) { await solutionNavigation.sidenav.expectLinkExists({ text: 'Data' }); await solutionNavigation.sidenav.expectLinkExists({ text: 'Index Management' }); await solutionNavigation.sidenav.expectLinkExists({ text: 'Connectors' }); - await solutionNavigation.sidenav.expectLinkExists({ text: 'Web crawlers' }); + await solutionNavigation.sidenav.expectLinkExists({ text: 'Web Crawlers' }); await solutionNavigation.sidenav.expectLinkExists({ text: 'Build' }); await solutionNavigation.sidenav.expectLinkExists({ text: 'Dev Tools' }); await solutionNavigation.sidenav.expectLinkExists({ text: 'Playground' }); diff --git a/x-pack/test_serverless/functional/test_suites/search/search_index_detail.ts b/x-pack/test_serverless/functional/test_suites/search/search_index_detail.ts index 097da2201e1e7..0dda7789b6f93 100644 --- a/x-pack/test_serverless/functional/test_suites/search/search_index_detail.ts +++ b/x-pack/test_serverless/functional/test_suites/search/search_index_detail.ts @@ -20,6 +20,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const svlSearchNavigation = getService('svlSearchNavigation'); const es = getService('es'); const security = getService('security'); + const browser = getService('browser'); + const retry = getService('retry'); const esDeleteAllIndices = getService('esDeleteAllIndices'); const indexName = 'test-my-index'; @@ -54,11 +56,48 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await pageObjects.svlSearchIndexDetailPage.expectConnectionDetails(); }); - describe.skip('API key details', () => { - // Flaky test related with deleting API keys + describe('check code example texts', () => { + const indexNameCodeExample = 'test-my-index2'; + before(async () => { + await es.indices.create({ index: indexNameCodeExample }); + await svlSearchNavigation.navigateToIndexDetailPage(indexNameCodeExample); + }); + + after(async () => { + await esDeleteAllIndices(indexNameCodeExample); + }); + + it('should have basic example texts', async () => { + await pageObjects.svlSearchIndexDetailPage.expectHasSampleDocuments(); + }); + + it('should have other example texts when mapping changed', async () => { + await es.indices.putMapping({ + index: indexNameCodeExample, + properties: { + text: { type: 'text' }, + number: { type: 'integer' }, + }, + }); + await pageObjects.svlSearchIndexDetailPage.expectSampleDocumentsWithCustomMappings(); + }); + }); + + describe('API key details', () => { it('should show api key', async () => { await pageObjects.svlApiKeys.deleteAPIKeys(); await svlSearchNavigation.navigateToIndexDetailPage(indexName); + // sometimes the API key exists in the cluster and its lost in sessionStorage + // if fails we retry to delete the API key and refresh the browser + await retry.try( + async () => { + await pageObjects.svlApiKeys.expectAPIKeyExists(); + }, + async () => { + await pageObjects.svlApiKeys.deleteAPIKeys(); + await browser.refresh(); + } + ); await pageObjects.svlApiKeys.expectAPIKeyAvailable(); const apiKey = await pageObjects.svlApiKeys.getAPIKeyFromUI(); await pageObjects.svlSearchIndexDetailPage.expectAPIKeyToBeVisibleInCodeBlock(apiKey); diff --git a/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.agentless.ts b/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.agentless.ts index 692ae096265fb..b203bc6427ed2 100644 --- a/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.agentless.ts +++ b/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.agentless.ts @@ -16,6 +16,8 @@ export default createTestConfig({ reportName: 'Serverless Security Cloud Security Agentless Onboarding Functional Tests', }, kbnServerArgs: [ + `--xpack.cloud.serverless.project_id=some_fake_project_id`, + `--xpack.fleet.packages.0.name=cloud_security_posture`, `--xpack.fleet.packages.0.version=${CLOUD_CREDENTIALS_PACKAGE_VERSION}`, `--xpack.fleet.agentless.enabled=true`, @@ -26,11 +28,10 @@ export default createTestConfig({ `--xpack.fleet.agentPolicies.0.id=agentless`, `--xpack.fleet.agentPolicies.0.name=agentless`, `--xpack.fleet.agentPolicies.0.package_policies=[]`, - `--xpack.cloud.serverless.project_id=some_fake_project_id`, `--xpack.fleet.agentPolicies.0.is_default=true`, `--xpack.fleet.agentPolicies.0.is_default_fleet_server=true`, - // Serverless Agentless API + `--xpack.fleet.agentless.enabled=true`, `--xpack.fleet.agentless.api.url=http://localhost:8089`, `--xpack.fleet.agentless.api.tls.certificate=${KBN_CERT_PATH}`, `--xpack.fleet.agentless.api.tls.key=${KBN_KEY_PATH}`, diff --git a/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.agentless_api.ts b/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.agentless_api.ts deleted file mode 100644 index 0f37f224197ef..0000000000000 --- a/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.agentless_api.ts +++ /dev/null @@ -1,34 +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 { CLOUD_CREDENTIALS_PACKAGE_VERSION } from '@kbn/cloud-security-posture-plugin/common/constants'; -import { CA_CERT_PATH, KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils'; -import { createTestConfig } from '../../config.base'; - -export default createTestConfig({ - serverlessProject: 'security', - junit: { - reportName: 'Serverless Security Cloud Security Agentless API Onboarding Functional Tests', - }, - kbnServerArgs: [ - `--xpack.fleet.packages.0.name=cloud_security_posture`, - `--xpack.fleet.packages.0.version=${CLOUD_CREDENTIALS_PACKAGE_VERSION}`, - - `--xpack.fleet.agents.fleet_server.hosts=["https://ftr.kibana:8220"]`, - `--xpack.fleet.internal.fleetServerStandalone=true`, - - // Agentless Configuration based on Serverless Security Dev Yaml - config/serverless.security.dev.yml - `--xpack.fleet.agentless.enabled=true`, - `--xpack.fleet.agentless.api.url=http://localhost:8089`, - `--xpack.fleet.agentless.api.tls.certificate=${KBN_CERT_PATH}`, - `--xpack.fleet.agentless.api.tls.key=${KBN_KEY_PATH}`, - `--xpack.fleet.agentless.api.tls.ca=${CA_CERT_PATH}`, - `--xpack.cloud.serverless.project_id=some_fake_project_id`, - ], - // load tests in the index file - testFiles: [require.resolve('./ftr/cloud_security_posture/agentless_api')], -}); diff --git a/x-pack/test_serverless/functional/test_suites/security/config.mki_only.ts b/x-pack/test_serverless/functional/test_suites/security/config.mki_only.ts new file mode 100644 index 0000000000000..36d3bd6c7dd93 --- /dev/null +++ b/x-pack/test_serverless/functional/test_suites/security/config.mki_only.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 { KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils'; +import { createTestConfig } from '../../config.base'; + +export default createTestConfig({ + serverlessProject: 'security', + testFiles: [require.resolve('./index.mki_only.ts')], + junit: { + reportName: 'Serverless Security MKI Functional Tests', + }, + suiteTags: { exclude: ['skipSvlSec'] }, + + // include settings from project controller + // https://github.com/elastic/project-controller/blob/main/internal/project/security/config/elasticsearch.yml + esServerArgs: ['xpack.ml.nlp.enabled=true'], + kbnServerArgs: [ + '--xpack.dataUsage.enabled=true', + '--xpack.dataUsage.enableExperimental=[]', + // dataUsage.autoops* config is set in kibana controller + '--xpack.dataUsage.autoops.enabled=true', + '--xpack.dataUsage.autoops.api.url=http://localhost:9000', + `--xpack.dataUsage.autoops.api.tls.certificate=${KBN_CERT_PATH}`, + `--xpack.dataUsage.autoops.api.tls.key=${KBN_KEY_PATH}`, + ], +}); diff --git a/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless/cis_integration_aws.ts b/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless/cis_integration_aws.ts index e669545d135f9..ea499f96da585 100644 --- a/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless/cis_integration_aws.ts +++ b/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless/cis_integration_aws.ts @@ -8,7 +8,7 @@ import { CLOUD_CREDENTIALS_PACKAGE_VERSION } from '@kbn/cloud-security-posture-p import expect from '@kbn/expect'; import * as http from 'http'; import type { FtrProviderContext } from '../../../../../ftr_provider_context'; -import { setupMockServer } from '../agentless_api/mock_agentless_api'; +import { setupMockServer } from './mock_agentless_api'; export default function ({ getPageObjects, getService }: FtrProviderContext) { const mockAgentlessApiService = setupMockServer(); const pageObjects = getPageObjects([ diff --git a/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless/cis_integration_gcp.ts b/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless/cis_integration_gcp.ts index 95f855697c5bd..897a6e589fdb3 100644 --- a/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless/cis_integration_gcp.ts +++ b/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless/cis_integration_gcp.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import { CLOUD_CREDENTIALS_PACKAGE_VERSION } from '@kbn/cloud-security-posture-plugin/common/constants'; import * as http from 'http'; import type { FtrProviderContext } from '../../../../../ftr_provider_context'; -import { setupMockServer } from '../agentless_api/mock_agentless_api'; +import { setupMockServer } from './mock_agentless_api'; export default function ({ getPageObjects, getService }: FtrProviderContext) { const pageObjects = getPageObjects(['common', 'svlCommonPage', 'cisAddIntegration', 'header']); diff --git a/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless_api/create_agent.ts b/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless/create_agent.ts similarity index 73% rename from x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless_api/create_agent.ts rename to x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless/create_agent.ts index bf9fd31b9e266..14351439ac68f 100644 --- a/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless_api/create_agent.ts +++ b/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless/create_agent.ts @@ -8,12 +8,9 @@ import { CLOUD_CREDENTIALS_PACKAGE_VERSION } from '@kbn/cloud-security-posture-plugin/common/constants'; import * as http from 'http'; import expect from '@kbn/expect'; -import equals from 'fast-deep-equal'; import { setupMockServer } from './mock_agentless_api'; import type { FtrProviderContext } from '../../../../../ftr_provider_context'; export default function ({ getPageObjects, getService }: FtrProviderContext) { - const agentCreationTimeout = 1000 * 60 * 1; // 1 minute - const retry = getService('retry'); const mockAgentlessApiService = setupMockServer(); const pageObjects = getPageObjects([ 'svlCommonPage', @@ -28,12 +25,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const AWS_SINGLE_ACCOUNT_TEST_ID = 'awsSingleTestId'; describe('Agentless API Serverless', function () { + this.tags(['skipMKI', 'cloud_security_posture_agentless']); let mockApiServer: http.Server; let cisIntegration: typeof pageObjects.cisAddIntegration; before(async () => { - // If process.env.TEST_CLOUD is set, then the test is running in the Serverless Quality Gates - // and this MSW server will be listening for a request that will never come. mockApiServer = mockAgentlessApiService.listen(8089); // Start the usage api mock server on port 8089 await pageObjects.svlCommonPage.loginAsAdmin(); cisIntegration = pageObjects.cisAddIntegration; @@ -57,22 +53,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await cisIntegration.selectSetupTechnology('agentless'); await cisIntegration.selectAwsCredentials('direct'); - if ( - process.env.TEST_CLOUD && - process.env.CSPM_AWS_ACCOUNT_ID && - process.env.CSPM_AWS_SECRET_KEY - ) { - await cisIntegration.fillInTextField( - cisIntegration.testSubjectIds.DIRECT_ACCESS_KEY_ID_TEST_ID, - process.env.CSPM_AWS_ACCOUNT_ID - ); - - await cisIntegration.fillInTextField( - cisIntegration.testSubjectIds.DIRECT_ACCESS_SECRET_KEY_TEST_ID, - process.env.CSPM_AWS_SECRET_KEY - ); - } - await pageObjects.header.waitUntilLoadingHasFinished(); await cisIntegration.clickSaveButton(); @@ -85,13 +65,9 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { integrationPolicyName ); - // wait for eventually Pending or Healthy status - // purpose of this retry is to wait for the agent to be created and the status to be updated - // not to wait for the agent to be healthy - await retry.tryForTime(agentCreationTimeout, async () => { - const resStatus = await cisIntegration.getFirstCspmIntegrationPageAgentlessStatus(); - expect(equals(resStatus, 'Healthy') || equals(resStatus, 'Pending')).to.be(true); - }); + const resStatus = await cisIntegration.getFirstCspmIntegrationPageAgentlessStatus(); + // The status can only be Pending because the agentless agent will never be created + expect(resStatus).to.be('Pending'); }); it(`should create default agent-based agent`, async () => { diff --git a/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless/index.ts b/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless/index.ts index 235757c508c16..875dd630f2ade 100644 --- a/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless/index.ts +++ b/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless/index.ts @@ -12,5 +12,6 @@ export default function ({ loadTestFile }: FtrProviderContext) { this.tags(['cloud_security_posture_agentless']); loadTestFile(require.resolve('./cis_integration_aws')); loadTestFile(require.resolve('./cis_integration_gcp')); + loadTestFile(require.resolve('./create_agent')); }); } diff --git a/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless_api/mock_agentless_api.ts b/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless/mock_agentless_api.ts similarity index 100% rename from x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless_api/mock_agentless_api.ts rename to x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless/mock_agentless_api.ts diff --git a/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/mki_only/README.md b/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/mki_only/README.md new file mode 100644 index 0000000000000..9af4048016c79 --- /dev/null +++ b/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/mki_only/README.md @@ -0,0 +1,15 @@ +# MKI Serverless Quality Gates + +This folder contains tests that **ONLY** run in the MKI Serverless Quality Gates. These tests are designed to ensure the security and functionality of the system in a serverless environment. + +## Contributing + +Please prefix the tests in this folder with `mki_` so that is clear to the following developer that these tests run only in MKI and Serverless Quality Gates. + +New MKI only test files should be loaded from the root index.ts file of the mki_only directory + +``` +x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/mki_only/index.ts +``` + +If you would like to contribute to these tests, please follow the contribution guidelines outlined in the main project repository. diff --git a/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/mki_only/agentless/mki_create_agent.ts b/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/mki_only/agentless/mki_create_agent.ts new file mode 100644 index 0000000000000..4b357eb8c0f4b --- /dev/null +++ b/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/mki_only/agentless/mki_create_agent.ts @@ -0,0 +1,104 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { CLOUD_CREDENTIALS_PACKAGE_VERSION } from '@kbn/cloud-security-posture-plugin/common/constants'; +import expect from '@kbn/expect'; +import type { FtrProviderContext } from '../../../../../../ftr_provider_context'; +export default function ({ getPageObjects, getService }: FtrProviderContext) { + const testSubjects = getService('testSubjects'); + const pageObjects = getPageObjects([ + 'svlCommonPage', + 'cspSecurity', + 'security', + 'header', + 'cisAddIntegration', + ]); + + const CIS_AWS_OPTION_TEST_ID = 'cisAwsTestId'; + + const AWS_SINGLE_ACCOUNT_TEST_ID = 'awsSingleTestId'; + + // This test suite is only running in the Serverless Quality Gates environment + describe('Agentless API Serverless MKI only', function () { + this.tags(['cloud_security_posture_agentless']); + let cisIntegration: typeof pageObjects.cisAddIntegration; + + before(async () => { + await pageObjects.svlCommonPage.loginAsAdmin(); + cisIntegration = pageObjects.cisAddIntegration; + }); + + it(`should create agentless-agent`, async () => { + const integrationPolicyName = `cloud_security_posture-${new Date().toISOString()}`; + await cisIntegration.navigateToAddIntegrationCspmWithVersionPage( + CLOUD_CREDENTIALS_PACKAGE_VERSION + ); + + await cisIntegration.clickOptionButton(CIS_AWS_OPTION_TEST_ID); + await cisIntegration.clickOptionButton(AWS_SINGLE_ACCOUNT_TEST_ID); + + await cisIntegration.inputIntegrationName(integrationPolicyName); + + await cisIntegration.selectSetupTechnology('agentless'); + await cisIntegration.selectAwsCredentials('direct'); + + await pageObjects.header.waitUntilLoadingHasFinished(); + + if (process.env.CSPM_AWS_ACCOUNT_ID && process.env.CSPM_AWS_SECRET_KEY) { + await cisIntegration.fillInTextField( + cisIntegration.testSubjectIds.DIRECT_ACCESS_KEY_ID_TEST_ID, + process.env.CSPM_AWS_ACCOUNT_ID + ); + + await cisIntegration.fillInTextField( + cisIntegration.testSubjectIds.DIRECT_ACCESS_SECRET_KEY_TEST_ID, + process.env.CSPM_AWS_SECRET_KEY + ); + } + + await cisIntegration.clickSaveButton(); + await pageObjects.header.waitUntilLoadingHasFinished(); + + await cisIntegration.navigateToIntegrationCspList(); + await pageObjects.header.waitUntilLoadingHasFinished(); + + expect(await cisIntegration.getFirstCspmIntegrationPageAgentlessIntegration()).to.be( + integrationPolicyName + ); + + const agentStatusBadge = testSubjects.find('agentlessStatusBadge'); + // The status badge could be either "Pending", "Healthy", or "Unhealthy" so we are just checking that it exists + expect(agentStatusBadge).to.be.ok(); + }); + + it(`should create default agent-based agent`, async () => { + const integrationPolicyName = `cloud_security_posture-${new Date().toISOString()}`; + + await cisIntegration.navigateToAddIntegrationCspmWithVersionPage( + CLOUD_CREDENTIALS_PACKAGE_VERSION + ); + + await cisIntegration.clickOptionButton(CIS_AWS_OPTION_TEST_ID); + await cisIntegration.clickOptionButton(AWS_SINGLE_ACCOUNT_TEST_ID); + + await cisIntegration.inputIntegrationName(integrationPolicyName); + + await cisIntegration.clickSaveButton(); + await pageObjects.header.waitUntilLoadingHasFinished(); + + const agentPolicyName = await cisIntegration.getAgentBasedPolicyValue(); + + await cisIntegration.navigateToIntegrationCspList(); + await pageObjects.header.waitUntilLoadingHasFinished(); + + expect(await cisIntegration.getFirstCspmIntegrationPageIntegration()).to.be( + integrationPolicyName + ); + expect(await cisIntegration.getFirstCspmIntegrationPageAgent()).to.be(agentPolicyName); + }); + }); +} diff --git a/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless_api/index.ts b/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/mki_only/index.ts similarity index 71% rename from x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless_api/index.ts rename to x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/mki_only/index.ts index 0aa5f978445f1..a1b5798f831b3 100644 --- a/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/agentless_api/index.ts +++ b/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/mki_only/index.ts @@ -9,7 +9,9 @@ import { FtrProviderContext } from '../../../../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { describe('cloud_security_posture', function () { - this.tags(['failsOnMKI', 'cloud_security_posture']); - loadTestFile(require.resolve('./create_agent')); + this.tags(['cloud_security_posture']); + + // do not resolve files which are ending with `.essentials.ts` + loadTestFile(require.resolve('./agentless/mki_create_agent')); }); } diff --git a/x-pack/test_serverless/functional/test_suites/security/index.mki_only.ts b/x-pack/test_serverless/functional/test_suites/security/index.mki_only.ts new file mode 100644 index 0000000000000..baff65fb737f6 --- /dev/null +++ b/x-pack/test_serverless/functional/test_suites/security/index.mki_only.ts @@ -0,0 +1,15 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('serverless security UI MKI only', function () { + this.tags(['security-mki-only ']); + loadTestFile(require.resolve('./ftr/cloud_security_posture/mki_only')); + }); +} diff --git a/x-pack/test_serverless/functional/test_suites/security/index.ts b/x-pack/test_serverless/functional/test_suites/security/index.ts index 833df2edb78cd..30f35c52295ce 100644 --- a/x-pack/test_serverless/functional/test_suites/security/index.ts +++ b/x-pack/test_serverless/functional/test_suites/security/index.ts @@ -8,8 +8,6 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ loadTestFile }: FtrProviderContext) { - const isCloud = !!process.env.TEST_CLOUD; - describe('serverless security UI', function () { this.tags(['esGate']); @@ -17,9 +15,5 @@ export default function ({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./ftr/cases')); loadTestFile(require.resolve('./ftr/advanced_settings')); loadTestFile(require.resolve('./ml')); - if (isCloud) { - // only run the agentless API tests in the Serverless Quality Gates - loadTestFile(require.resolve('./ftr/cloud_security_posture/agentless_api')); - } }); } diff --git a/yarn.lock b/yarn.lock index 9a1a2cbfd544d..31b75569d8c6a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -44,6 +44,15 @@ call-me-maybe "^1.0.1" js-yaml "^3.13.1" +"@apidevtools/json-schema-ref-parser@^11.5.5": + version "11.7.2" + resolved "https://registry.yarnpkg.com/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.7.2.tgz#cdf3e0aded21492364a70e193b45b7cf4177f031" + integrity sha512-4gY54eEGEstClvEkGnwVkTkrx0sqwemEFG5OSRRn3tD91XH0+Q8XIkYIfo7IwEWPpJZwILb9GUXeShtplRc/eA== + dependencies: + "@jsdevtools/ono" "^7.1.3" + "@types/json-schema" "^7.0.15" + js-yaml "^4.1.0" + "@apidevtools/json-schema-ref-parser@^9.0.6": version "9.0.9" resolved "https://registry.yarnpkg.com/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz#d720f9256e3609621280584f2b47ae165359268b" @@ -2197,10 +2206,10 @@ dependencies: object-hash "^1.3.0" -"@elastic/charts@68.0.2": - version "68.0.2" - resolved "https://registry.yarnpkg.com/@elastic/charts/-/charts-68.0.2.tgz#8868a1d998137c41985a9b6da340391a31bae2f0" - integrity sha512-d0+qxiUovKwXeDDSrI4JQgTzk5YCbYnKxQAGV0jH37QLUzTo+t7yKqa7VTcCfEXzmtyD9Fwvihe/hCeHo+ii2w== +"@elastic/charts@68.0.3": + version "68.0.3" + resolved "https://registry.yarnpkg.com/@elastic/charts/-/charts-68.0.3.tgz#dc4aaeb4cdc8751d5759b58dc9958efb3c2639da" + integrity sha512-U+NCTo2LCDDSVkV5kGinhzbiAvfEcVAZ4D2YM/0RZQFRvJfJBvelbG+jDkt6N2mEauJ4ECDDcb33995fbs71TA== dependencies: "@popperjs/core" "^2.11.8" bezier-easing "^2.1.0" @@ -2295,25 +2304,25 @@ resolved "https://registry.yarnpkg.com/@elastic/eslint-plugin-eui/-/eslint-plugin-eui-0.0.2.tgz#56b9ef03984a05cc213772ae3713ea8ef47b0314" integrity sha512-IoxURM5zraoQ7C8f+mJb9HYSENiZGgRVcG4tLQxE61yHNNRDXtGDWTZh8N1KIHcsqN1CEPETjuzBXkJYF/fDiQ== -"@elastic/eui-theme-borealis@0.0.3": - version "0.0.3" - resolved "https://registry.yarnpkg.com/@elastic/eui-theme-borealis/-/eui-theme-borealis-0.0.3.tgz#a84c59009a331acd711ed14729237a9f348a14b5" - integrity sha512-aO+41iq3igDC852ZUiCkbI44TAt44buxaw3bQS1/Cy50oYlG7TAGEm4f7WZbEnMRK6EeqCNs3Hj+rU5HMDi9vA== +"@elastic/eui-theme-borealis@0.0.4": + version "0.0.4" + resolved "https://registry.yarnpkg.com/@elastic/eui-theme-borealis/-/eui-theme-borealis-0.0.4.tgz#5a1e8d5cd02f25634928106c9845389f6b8568bb" + integrity sha512-6RV49J0saf2zjcf1uXYpoU9AgRlWs+ot+GszZz6iCBavPl7MdMlR13x5WdT7ewtx7cju9taEWhS1YDVfGVCFSA== -"@elastic/eui-theme-common@0.0.3": - version "0.0.3" - resolved "https://registry.yarnpkg.com/@elastic/eui-theme-common/-/eui-theme-common-0.0.3.tgz#55b916229bed02276d4cf8dc9dfb1f72fc47c482" - integrity sha512-I7x5/Z1xxhNvlWj4oUKbbExUBD3tbfIPMvcijeGy44uXOa10Bs0duAcuOdDsQZqQdB7V44KyT5rH2dTqU5ogQw== +"@elastic/eui-theme-common@0.0.4": + version "0.0.4" + resolved "https://registry.yarnpkg.com/@elastic/eui-theme-common/-/eui-theme-common-0.0.4.tgz#83db50a46251c75e6a3c07df0dee3eedb5d49e17" + integrity sha512-IDQ15ytDwlB5OO2UlPKccUR37QnRp1xZE8zPy8LoCPQAX8hgDYjikk8gjA2eixCuTm9+t6Suz+Xuha69VcMMZg== dependencies: "@types/lodash" "^4.14.202" lodash "^4.17.21" -"@elastic/eui@98.0.0-borealis.1": - version "98.0.0-borealis.1" - resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-98.0.0-borealis.1.tgz#0f4e6a1a0afc3270ad1419f540e0d6d709899d63" - integrity sha512-npPTj62wkG2Hvqi/4bkWGi9R8LYsa6cjNBbwj60u9GQbovzR45ZGSjxWfRxrgR3ajqLqf22MnqCKab5hnu/7Mg== +"@elastic/eui@98.1.0-borealis.0": + version "98.1.0-borealis.0" + resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-98.1.0-borealis.0.tgz#b0db1416d81863816939ae4dc067cc089a9f9789" + integrity sha512-DMu+H0j5WrByhJr3Xc3strmsIiwKHLYCOKsTWOqv9CS8tcRFaYa2zHhwhgVhRuBE7XdX++uCsV4vVGrd8qJMVw== dependencies: - "@elastic/eui-theme-common" "0.0.3" + "@elastic/eui-theme-common" "0.0.4" "@hello-pangea/dnd" "^16.6.0" "@types/lodash" "^4.14.202" "@types/numeral" "^2.0.5" @@ -2394,12 +2403,11 @@ "@elastic/react-search-ui-views" "1.20.2" "@elastic/search-ui" "1.20.2" -"@elastic/request-converter@^8.16.2": - version "8.16.2" - resolved "https://registry.yarnpkg.com/@elastic/request-converter/-/request-converter-8.16.2.tgz#e82c5c794adf8da37795cb8656e2f0334460cb08" - integrity sha512-bljPrXbXkImBglTz5N8Rrpmzc64ahpZxOkBIKFBX1mnU3kv/JDeMjsv1rvfHXrkuhtQQ4kRRZqfwmqzJIwzlag== +"@elastic/request-converter@^8.17.0": + version "8.17.0" + resolved "https://registry.yarnpkg.com/@elastic/request-converter/-/request-converter-8.17.0.tgz#d2ef8f99f5a3e6c03a51859ad03e0e8a0d450032" + integrity sha512-f5WmQBbTdaDw9KrhVTuHeYbu0kulZfRUN9cNdFgCD78CRAVa353K1iqH5imikZ7NLIltN9itm5q5yyLvbHhs+w== dependencies: - child-process-promise "^2.2.1" commander "^12.1.0" find-my-way-ts "^0.1.2" handlebars "^4.7.8" @@ -4000,6 +4008,10 @@ version "0.0.0" uid "" +"@kbn/asset-inventory-plugin@link:x-pack/plugins/asset_inventory": + version "0.0.0" + uid "" + "@kbn/audit-log-plugin@link:x-pack/test/security_api_integration/plugins/audit_log": version "0.0.0" uid "" @@ -5376,7 +5388,7 @@ version "0.0.0" uid "" -"@kbn/doc-links@link:packages/kbn-doc-links": +"@kbn/doc-links@link:src/platform/packages/shared/kbn-doc-links": version "0.0.0" uid "" @@ -5768,6 +5780,10 @@ version "0.0.0" uid "" +"@kbn/gen-ai-functional-testing@link:packages/kbn-gen-ai-functional-testing": + version "0.0.0" + uid "" + "@kbn/gen-ai-streaming-response-example-plugin@link:x-pack/examples/gen_ai_streaming_response_example": version "0.0.0" uid "" @@ -6768,6 +6784,10 @@ version "0.0.0" uid "" +"@kbn/response-ops-rule-form@link:packages/response-ops/rule_form": + version "0.0.0" + uid "" + "@kbn/response-ops-rule-params@link:packages/response-ops/rule_params": version "0.0.0" uid "" @@ -8054,12 +8074,15 @@ "@langchain/core" ">0.1.0 <0.3.0" js-tiktoken "^1.0.12" -"@langtrase/trace-attributes@^3.0.8": - version "3.0.8" - resolved "https://registry.yarnpkg.com/@langtrase/trace-attributes/-/trace-attributes-3.0.8.tgz#ff6ae44cfc048a9da10a7949664b2060a71b6304" - integrity sha512-GXUH+a0EiO8YgrZR2fkqM0B/xrf3Db1OHDlJUOGVuwacC+LJp89MbJQBlmeu3BBJLMMHG0+q4ERYEt8enCHjHw== +"@langtrase/trace-attributes@^7.5.0": + version "7.5.0" + resolved "https://registry.yarnpkg.com/@langtrase/trace-attributes/-/trace-attributes-7.5.0.tgz#b1a523d90f62f233f282fa3949c5da397d3aa0e9" + integrity sha512-U+2dMRJaRv0R6i9qrzh1hXREkrqg01EboCDfrovXeXySFsVGCuvSD8iavXzheOSWVLy9XbiM6gJjekdUFhAhQg== dependencies: + js-tiktoken "^1.0.14" + json-schema-to-typescript "^14.1.0" ncp "^2.0.0" + typescript "^5.5.3" "@launchdarkly/js-sdk-common@2.12.0": version "2.12.0" @@ -8982,12 +9005,12 @@ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== -"@playwright/test@=1.46.0": - version "1.46.0" - resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.46.0.tgz#ccea6d22c40ee7fa567e4192fafbdf2a907e2714" - integrity sha512-/QYft5VArOrGRP5pgkrfKksqsKA6CEFyGQ/gjNe6q0y4tZ1aaPfq4gIjudr1s3D+pXyrPRdsy4opKDrjBabE5w== +"@playwright/test@1.49.0": + version "1.49.0" + resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.49.0.tgz#74227385b58317ee076b86b56d0e1e1b25cff01e" + integrity sha512-DMulbwQURa8rNIQrf94+jPJQ4FmOVdpE5ZppRNvWVjvhC+6sOeo28r8MgIpQRYouXRtt/FCCXU7zn20jnHR4Qw== dependencies: - playwright "1.46.0" + playwright "1.49.0" "@pmmmwh/react-refresh-webpack-plugin@^0.5.3": version "0.5.7" @@ -9113,7 +9136,7 @@ require-from-string "^2.0.2" uri-js-replace "^1.0.1" -"@redocly/cli@^1.25.13": +"@redocly/cli@^1.25.14": version "1.25.14" resolved "https://registry.yarnpkg.com/@redocly/cli/-/cli-1.25.14.tgz#05810916bac2193137020ffbfa0bd766caca2258" integrity sha512-HRDOoN3YpFe4+2rWrL/uTqRUDqqyrRtj1MVHFJ0heKTfBLOFEEfXXUYExw7R6yoiY3+GnptR96wePeFpH1gheg== @@ -9356,13 +9379,13 @@ "@smithy/url-parser" "^3.0.8" tslib "^2.6.2" -"@smithy/eventstream-codec@^3.1.1", "@smithy/eventstream-codec@^3.1.7": - version "3.1.7" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-codec/-/eventstream-codec-3.1.7.tgz#5bfaffbc83ae374ffd85a755a8200ba3c7aed016" - integrity sha512-kVSXScIiRN7q+s1x7BrQtZ1Aa9hvvP9FeCqCdBxv37GimIHgBCOnZ5Ip80HLt0DhnAKpiobFdGqTFgbaJNrazA== +"@smithy/eventstream-codec@^3.1.1", "@smithy/eventstream-codec@^3.1.9": + version "3.1.9" + resolved "https://registry.yarnpkg.com/@smithy/eventstream-codec/-/eventstream-codec-3.1.9.tgz#4271354e75e57d30771fca307da403896c657430" + integrity sha512-F574nX0hhlNOjBnP+noLtsPFqXnWh2L0+nZKCwcu7P7J8k+k+rdIDs+RMnrMwrzhUE4mwMgyN0cYnEn0G8yrnQ== dependencies: "@aws-crypto/crc32" "5.2.0" - "@smithy/types" "^3.6.0" + "@smithy/types" "^3.7.1" "@smithy/util-hex-encoding" "^3.0.0" tslib "^2.6.2" @@ -9383,22 +9406,22 @@ "@smithy/types" "^3.6.0" tslib "^2.6.2" -"@smithy/eventstream-serde-node@^3.0.10", "@smithy/eventstream-serde-node@^3.0.3": - version "3.0.10" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-node/-/eventstream-serde-node-3.0.10.tgz#da40b872001390bb47807186855faba8172b3b5b" - integrity sha512-hjpU1tIsJ9qpcoZq9zGHBJPBOeBGYt+n8vfhDwnITPhEre6APrvqq/y3XMDEGUT2cWQ4ramNqBPRbx3qn55rhw== +"@smithy/eventstream-serde-node@^3.0.10", "@smithy/eventstream-serde-node@^3.0.12": + version "3.0.12" + resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-node/-/eventstream-serde-node-3.0.12.tgz#7312383e821b5807abf2fe12316c2a8967d022f0" + integrity sha512-kiZymxXvZ4tnuYsPSMUHe+MMfc4FTeFWJIc0Q5wygJoUQM4rVHNghvd48y7ppuulNMbuYt95ah71pYc2+o4JOA== dependencies: - "@smithy/eventstream-serde-universal" "^3.0.10" - "@smithy/types" "^3.6.0" + "@smithy/eventstream-serde-universal" "^3.0.12" + "@smithy/types" "^3.7.1" tslib "^2.6.2" -"@smithy/eventstream-serde-universal@^3.0.10": - version "3.0.10" - resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-3.0.10.tgz#b24e66fec9ec003eb0a1d6733fa22ded43129281" - integrity sha512-ewG1GHbbqsFZ4asaq40KmxCmXO+AFSM1b+DcO2C03dyJj/ZH71CiTg853FSE/3SHK9q3jiYQIFjlGSwfxQ9kww== +"@smithy/eventstream-serde-universal@^3.0.10", "@smithy/eventstream-serde-universal@^3.0.12": + version "3.0.12" + resolved "https://registry.yarnpkg.com/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-3.0.12.tgz#803d7beb29a3de4a64e91af97331a4654741c35f" + integrity sha512-1i8ifhLJrOZ+pEifTlF0EfZzMLUGQggYQ6WmZ4d5g77zEKf7oZ0kvh1yKWHPjofvOwqrkwRDVuxuYC8wVd662A== dependencies: - "@smithy/eventstream-codec" "^3.1.7" - "@smithy/types" "^3.6.0" + "@smithy/eventstream-codec" "^3.1.9" + "@smithy/types" "^3.7.1" tslib "^2.6.2" "@smithy/fetch-http-handler@^4.0.0": @@ -9567,29 +9590,16 @@ "@smithy/types" "^3.6.0" tslib "^2.6.2" -"@smithy/signature-v4@^3.1.1": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@smithy/signature-v4/-/signature-v4-3.1.1.tgz#4882aacb3260a47b8279b2ffc6a135e03e225260" - integrity sha512-2/vlG86Sr489XX8TA/F+VDA+P04ESef04pSz0wRtlQBExcSPjqO08rvrkcas2zLnJ51i+7ukOURCkgqixBYjSQ== - dependencies: - "@smithy/is-array-buffer" "^3.0.0" - "@smithy/types" "^3.2.0" - "@smithy/util-hex-encoding" "^3.0.0" - "@smithy/util-middleware" "^3.0.2" - "@smithy/util-uri-escape" "^3.0.0" - "@smithy/util-utf8" "^3.0.0" - tslib "^2.6.2" - -"@smithy/signature-v4@^4.2.0": - version "4.2.1" - resolved "https://registry.yarnpkg.com/@smithy/signature-v4/-/signature-v4-4.2.1.tgz#a918fd7d99af9f60aa07617506fa54be408126ee" - integrity sha512-NsV1jF4EvmO5wqmaSzlnTVetemBS3FZHdyc5CExbDljcyJCEEkJr8ANu2JvtNbVg/9MvKAWV44kTrGS+Pi4INg== +"@smithy/signature-v4@^4.2.0", "@smithy/signature-v4@^4.2.3": + version "4.2.3" + resolved "https://registry.yarnpkg.com/@smithy/signature-v4/-/signature-v4-4.2.3.tgz#abbca5e5fe9158422b3125b2956791a325a27f22" + integrity sha512-pPSQQ2v2vu9vc8iew7sszLd0O09I5TRc5zhY71KA+Ao0xYazIG+uLeHbTJfIWGO3BGVLiXjUr3EEeCcEQLjpWQ== dependencies: "@smithy/is-array-buffer" "^3.0.0" - "@smithy/protocol-http" "^4.1.5" - "@smithy/types" "^3.6.0" + "@smithy/protocol-http" "^4.1.7" + "@smithy/types" "^3.7.1" "@smithy/util-hex-encoding" "^3.0.0" - "@smithy/util-middleware" "^3.0.8" + "@smithy/util-middleware" "^3.0.10" "@smithy/util-uri-escape" "^3.0.0" "@smithy/util-utf8" "^3.0.0" tslib "^2.6.2" @@ -9607,7 +9617,7 @@ "@smithy/util-stream" "^3.2.1" tslib "^2.6.2" -"@smithy/types@^3.2.0", "@smithy/types@^3.6.0", "@smithy/types@^3.7.1": +"@smithy/types@^3.6.0", "@smithy/types@^3.7.1": version "3.7.1" resolved "https://registry.yarnpkg.com/@smithy/types/-/types-3.7.1.tgz#4af54c4e28351e9101996785a33f2fdbf93debe7" integrity sha512-XKLcLXZY7sUQgvvWyeaL/qwNPp6V3dWcUjqrQKjSb+tzYiCy340R/c64LV5j+Tnb2GhmunEX0eou+L+m2hJNYA== @@ -9709,12 +9719,12 @@ dependencies: tslib "^2.6.2" -"@smithy/util-middleware@^3.0.2", "@smithy/util-middleware@^3.0.8": - version "3.0.8" - resolved "https://registry.yarnpkg.com/@smithy/util-middleware/-/util-middleware-3.0.8.tgz#372bc7a2845408ad69da039d277fc23c2734d0c6" - integrity sha512-p7iYAPaQjoeM+AKABpYWeDdtwQNxasr4aXQEA/OmbOaug9V0odRVDy3Wx4ci8soljE/JXQo+abV0qZpW8NX0yA== +"@smithy/util-middleware@^3.0.10", "@smithy/util-middleware@^3.0.8": + version "3.0.10" + resolved "https://registry.yarnpkg.com/@smithy/util-middleware/-/util-middleware-3.0.10.tgz#ab8be99f1aaafe5a5490c344f27a264b72b7592f" + integrity sha512-eJO+/+RsrG2RpmY68jZdwQtnfsxjmPxzMlQpnHKjFPwrYqvlcT+fHdT+ZVwcjlWSrByOhGr9Ff2GG17efc192A== dependencies: - "@smithy/types" "^3.6.0" + "@smithy/types" "^3.7.1" tslib "^2.6.2" "@smithy/util-retry@^3.0.8": @@ -11407,10 +11417,10 @@ "@types/cheerio" "*" "@types/react" "*" -"@types/eslint-scope@^3.7.3": - version "3.7.4" - resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.4.tgz#37fc1223f0786c39627068a12e94d6e6fc61de16" - integrity sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA== +"@types/eslint-scope@^3.7.7": + version "3.7.7" + resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz#3108bd5f18b0cdb277c867b3dd449c9ed7079ac5" + integrity sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg== dependencies: "@types/eslint" "*" "@types/estree" "*" @@ -11449,15 +11459,10 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40" integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== -"@types/estree@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" - integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== - -"@types/estree@^1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" - integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== +"@types/estree@^1.0.0", "@types/estree@^1.0.6": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" + integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== "@types/expect@^1.20.4": version "1.20.4" @@ -11489,11 +11494,6 @@ resolved "https://registry.yarnpkg.com/@types/extract-zip/-/extract-zip-1.6.2.tgz#5c7eb441c41136167a42b88b64051e6260c29e86" integrity sha1-XH60QcQRNhZ6QriLZAUeYmDCnoY= -"@types/faker@^5.1.5": - version "5.1.5" - resolved "https://registry.yarnpkg.com/@types/faker/-/faker-5.1.5.tgz#f14b015e0100232bb00c6dd7611505efb08709a0" - integrity sha512-2uEQFb7bsx68rqD4F8q95wZq6LTLOyexjv6BnvJogCO4jStkyc6IDEkODPQcWfovI6g6M3uPQ2/uD/oedJKkNw== - "@types/fetch-mock@^7.3.1": version "7.3.1" resolved "https://registry.yarnpkg.com/@types/fetch-mock/-/fetch-mock-7.3.1.tgz#df7421e8bcb351b430bfbfa5c52bb353826ac94f" @@ -11710,7 +11710,7 @@ "@types/tough-cookie" "*" parse5 "^7.0.0" -"@types/json-schema@*", "@types/json-schema@^7", "@types/json-schema@^7.0.0", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.6", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": +"@types/json-schema@*", "@types/json-schema@^7.0.0", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.6", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.11" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== @@ -11779,7 +11779,7 @@ resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.0.tgz#d774355e41f372d5350a4d0714abb48194a489c3" integrity sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA== -"@types/lodash@^4.17.13": +"@types/lodash@^4.17.0", "@types/lodash@^4.17.13": version "4.17.13" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.13.tgz#786e2d67cfd95e32862143abe7463a7f90c300eb" integrity sha512-lfx+dftrEZcdBPczf9d0Qv0x+j/rfNCMuC6OcfXmO8gkfeNAY88PgKUbvG56whcN23gc27yenwF6oJZXGFpYxg== @@ -12055,10 +12055,10 @@ dependencies: "@types/node" "*" -"@types/pngjs@^3.4.0": - version "3.4.2" - resolved "https://registry.yarnpkg.com/@types/pngjs/-/pngjs-3.4.2.tgz#8dc49b45fbcf18a5873179e3664f049388e39ecf" - integrity sha512-LJVPDraJ5YFEnMHnzxTN4psdWz1M61MtaAAWPn3qnDk5fvs7BAmmQ9pd3KPlrdrvozMyne4ktanD4pg0L7x1Pw== +"@types/pngjs@^6.0.5": + version "6.0.5" + resolved "https://registry.yarnpkg.com/@types/pngjs/-/pngjs-6.0.5.tgz#6dec2f7eb8284543ca4e423f3c09b119fa939ea3" + integrity sha512-0k5eKfrA83JOZPppLtS2C7OUtyNAl2wKNxfyYl9Q5g9lPkgBl/9hNyAu6HuEH2J4XmIv2znEpkDd0SaZVxW6iQ== dependencies: "@types/node" "*" @@ -13139,11 +13139,6 @@ acorn-globals@^7.0.0: acorn "^8.1.0" acorn-walk "^8.0.2" -acorn-import-assertions@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" - integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== - acorn-import-attributes@^1.9.5: version "1.9.5" resolved "https://registry.yarnpkg.com/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz#7eb1557b1ba05ef18b5ed0ec67591bfab04688ef" @@ -13197,10 +13192,10 @@ acorn@^7.0.0, acorn@^7.4.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.0.4, acorn@^8.1.0, acorn@^8.11.0, acorn@^8.12.1, acorn@^8.4.1, acorn@^8.7.1, acorn@^8.8.0, acorn@^8.8.2, acorn@^8.9.0: - version "8.13.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.13.0.tgz#2a30d670818ad16ddd6a35d3842dacec9e5d7ca3" - integrity sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w== +acorn@^8.0.4, acorn@^8.1.0, acorn@^8.11.0, acorn@^8.12.1, acorn@^8.14.0, acorn@^8.4.1, acorn@^8.8.0, acorn@^8.8.2, acorn@^8.9.0: + version "8.14.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" + integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== address@^1.0.1: version "1.1.2" @@ -13330,7 +13325,7 @@ ajv@^6.1.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.12.4, ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.0, ajv@^8.0.1, ajv@^8.12.0, ajv@^8.17.1, ajv@^8.6.3, ajv@^8.8.0: +ajv@^8.0.0, ajv@^8.0.1, ajv@^8.17.1, ajv@^8.6.3, ajv@^8.8.0: version "8.17.1" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== @@ -13925,10 +13920,10 @@ aws-sign2@~0.7.0: resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= -aws4@^1.12.0, aws4@^1.8.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3" - integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== +aws4@^1.13.2, aws4@^1.8.0: + version "1.13.2" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.13.2.tgz#0aa167216965ac9474ccfa83892cfb6b3e1e52ef" + integrity sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw== axe-core@^4.10.0: version "4.10.0" @@ -13940,10 +13935,10 @@ axe-core@^4.2.0, axe-core@^4.6.2: resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.7.2.tgz#040a7342b20765cb18bb50b628394c21bccc17a0" integrity sha512-zIURGIS1E1Q4pcrMjp+nnEh+16G56eG/MUllJH8yEvw7asDo7Ac9uhC9KIH5jzpITueEZolfYglnCGIuSBz39g== -axios@^1.0.0, axios@^1.3.4, axios@^1.6.0, axios@^1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.4.tgz#4c8ded1b43683c8dd362973c393f3ede24052aa2" - integrity sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw== +axios@^1.0.0, axios@^1.3.4, axios@^1.6.0, axios@^1.7.4, axios@^1.7.9: + version "1.7.9" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.9.tgz#d7d071380c132a24accda1b2cfc1535b79ec650a" + integrity sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw== dependencies: follow-redirects "^1.15.6" form-data "^4.0.0" @@ -14629,15 +14624,15 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.16.6, browserslist@^4.20.3, browserslist@^4.21.10, browserslist@^4.22.2, browserslist@^4.23.0: - version "4.23.0" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.0.tgz#8f3acc2bbe73af7213399430890f86c63a5674ab" - integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== +browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.16.6, browserslist@^4.20.3, browserslist@^4.22.2, browserslist@^4.23.0, browserslist@^4.24.0: + version "4.24.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.2.tgz#f5845bc91069dbd55ee89faf9822e1d885d16580" + integrity sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg== dependencies: - caniuse-lite "^1.0.30001587" - electron-to-chromium "^1.4.668" - node-releases "^2.0.14" - update-browserslist-db "^1.0.13" + caniuse-lite "^1.0.30001669" + electron-to-chromium "^1.5.41" + node-releases "^2.0.18" + update-browserslist-db "^1.1.1" bser@^2.0.0: version "2.0.0" @@ -14951,10 +14946,10 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001335, caniuse-lite@^1.0.30001587: - version "1.0.30001655" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001655.tgz#0ce881f5a19a2dcfda2ecd927df4d5c1684b982f" - integrity sha512-jRGVy3iSGO5Uutn2owlb5gR6qsGngTw9ZTb4ali9f3glshcNmJ2noam4Mo9zia5P9Dk3jNNydy7vQjuE5dQmfg== +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001335, caniuse-lite@^1.0.30001669: + version "1.0.30001685" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001685.tgz#2d10d36c540a9a5d47ad6ab9e1ed5f61fdeadd8c" + integrity sha512-e/kJN1EMyHQzgcMEEgoo+YTCO1NGCmIYHk5Qk8jT6AazWemS5QFKJ5ShCJlH3GZrNIdZofcNCEwZqbMjjKzmnA== canvg@^3.0.9: version "3.0.9" @@ -15108,15 +15103,6 @@ cheerio@^1.0.0-rc.12, cheerio@^1.0.0-rc.3: parse5 "^7.0.0" parse5-htmlparser2-tree-adapter "^7.0.0" -child-process-promise@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/child-process-promise/-/child-process-promise-2.2.1.tgz#4730a11ef610fad450b8f223c79d31d7bdad8074" - integrity sha512-Fi4aNdqBsr0mv+jgWxcZ/7rAIC2mgihrptyVI4foh/rrjY/3BNjfP9+oaiFx/fzim+1ZyCNBae0DlyfQhSugog== - dependencies: - cross-spawn "^4.0.2" - node-version "^1.0.0" - promise-polyfill "^6.0.1" - chokidar@3.5.3, chokidar@^2.1.2, chokidar@^2.1.8, chokidar@^3.4.0, chokidar@^3.4.1, chokidar@^3.4.2, chokidar@^3.5.1, chokidar@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" @@ -15159,7 +15145,7 @@ chrome-trace-event@^1.0.2: dependencies: tslib "^1.9.0" -chromedriver@^131.0.0: +chromedriver@^131.0.1: version "131.0.1" resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-131.0.1.tgz#bfbf47f6c2ad7a65c154ff47d321bd8c33b52a77" integrity sha512-LHRh+oaNU1WowJjAkWsviN8pTzQYJDbv/FvJyrQ7XhjKdIzVh/s3GV1iU7IjMTsxIQnBsTjx+9jWjzCWIXC7ug== @@ -15272,6 +15258,17 @@ cli-boxes@^2.2.1: resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.1.tgz#ddd5035d25094fce220e9cab40a45840a440318f" integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== +cli-color@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-2.0.4.tgz#d658080290968816b322248b7306fad2346fb2c8" + integrity sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA== + dependencies: + d "^1.0.1" + es5-ext "^0.10.64" + es6-iterator "^2.0.3" + memoizee "^0.4.15" + timers-ext "^0.1.7" + cli-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" @@ -15987,14 +15984,6 @@ cronstrue@^1.51.0: resolved "https://registry.yarnpkg.com/cronstrue/-/cronstrue-1.51.0.tgz#7a63153d61d940344049037628da38a60784c8e2" integrity sha512-fSRAz/MV0TRjeNZKAsovmH/MSsly7+8np4XsfsrjOOz7sjxLrE9SmedRYAs3nPAtLLC5UsMpvenjXYRz463bMA== -cross-spawn@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" - integrity sha512-yAXz/pA1tD8Gtg2S98Ekf/sewp3Lcp3YoFKJ4Hkp5h5yLWnKVTDU0kwjKJ8NDCYcfTLfyGkzTikst+jWypT1iA== - dependencies: - lru-cache "^4.0.1" - which "^1.2.9" - cross-spawn@^6.0.0: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -16629,6 +16618,14 @@ d3@3.5.17, d3@^3.5.6: resolved "https://registry.yarnpkg.com/d3/-/d3-3.5.17.tgz#bc46748004378b21a360c9fc7cf5231790762fb8" integrity sha1-vEZ0gAQ3iyGjYMn8fPUjF5B2L7g= +d@1, d@^1.0.1, d@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.2.tgz#2aefd554b81981e7dccf72d6842ae725cb17e5de" + integrity sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw== + dependencies: + es5-ext "^0.10.64" + type "^2.7.2" + dagre@^0.8.2: version "0.8.5" resolved "https://registry.yarnpkg.com/dagre/-/dagre-0.8.5.tgz#ba30b0055dac12b6c1fcc247817442777d06afee" @@ -17660,10 +17657,10 @@ elasticsearch@^16.4.0: chalk "^1.0.0" lodash "^4.17.10" -electron-to-chromium@^1.4.668: - version "1.4.701" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.701.tgz#7335e5761331774b4dea54cd24a1b84861d45cdf" - integrity sha512-K3WPQ36bUOtXg/1+69bFlFOvdSm0/0bGqmsfPDLRXLanoKXdA+pIWuf/VbA9b+2CwBFuONgl4NEz4OEm+OJOKA== +electron-to-chromium@^1.5.41: + version "1.5.67" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.67.tgz#66ebd2be4a77469ac2760ef5e9e460ba9a43a845" + integrity sha512-nz88NNBsD7kQSAGGJyp8hS6xSPtWwqNogA0mjtc2nUYeEf3nURK9qpV18TuBdDmEDgVWotS8Wkzf+V52dSQ/LQ== element-resize-detector@^1.2.2: version "1.2.3" @@ -17765,7 +17762,7 @@ enhanced-resolve@^4.5.0: memory-fs "^0.5.0" tapable "^1.0.0" -enhanced-resolve@^5.14.1, enhanced-resolve@^5.16.0, enhanced-resolve@^5.17.1, enhanced-resolve@^5.7.0: +enhanced-resolve@^5.14.1, enhanced-resolve@^5.17.1, enhanced-resolve@^5.7.0: version "5.17.1" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== @@ -18009,6 +18006,16 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" +es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.62, es5-ext@^0.10.64, es5-ext@~0.10.14, es5-ext@~0.10.2: + version "0.10.64" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714" + integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg== + dependencies: + es6-iterator "^2.0.3" + es6-symbol "^3.1.3" + esniff "^2.0.1" + next-tick "^1.1.0" + es5-shim@^4.5.13: version "4.5.14" resolved "https://registry.yarnpkg.com/es5-shim/-/es5-shim-4.5.14.tgz#90009e1019d0ea327447cb523deaff8fe45697ef" @@ -18019,6 +18026,15 @@ 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.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + es6-promise@^3.2.1: version "3.3.1" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" @@ -18034,6 +18050,24 @@ es6-shim@^0.35.5: resolved "https://registry.yarnpkg.com/es6-shim/-/es6-shim-0.35.5.tgz#46f59dc0a84a1c5029e8ff1166ca0a902077a9ab" integrity sha512-E9kK/bjtCQRpN1K28Xh4BlmP8egvZBGJJ+9GtnzOwt7mdqtrjHFuVGr7QJfdjBIKqrlU5duPf3pCBoDrkjVYFg== +es6-symbol@^3.1.1, es6-symbol@^3.1.3: + version "3.1.4" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.4.tgz#f4e7d28013770b4208ecbf3e0bf14d3bcb557b8c" + integrity sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg== + dependencies: + d "^1.0.2" + ext "^1.7.0" + +es6-weak-map@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53" + integrity sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA== + dependencies: + d "1" + es5-ext "^0.10.46" + es6-iterator "^2.0.3" + es6-symbol "^3.1.1" + esbuild@^0.19.11: version "0.19.12" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.19.12.tgz#dc82ee5dc79e82f5a5c3b4323a2a641827db3e04" @@ -18063,10 +18097,10 @@ esbuild@^0.19.11: "@esbuild/win32-ia32" "0.19.12" "@esbuild/win32-x64" "0.19.12" -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== +escalade@^3.1.1, escalade@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== escape-html@^1.0.3, escape-html@~1.0.3: version "1.0.3" @@ -18425,6 +18459,16 @@ eslint@^8.57.0: strip-ansi "^6.0.1" text-table "^0.2.0" +esniff@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308" + integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg== + dependencies: + d "^1.0.1" + es5-ext "^0.10.62" + event-emitter "^0.3.5" + type "^2.7.2" + espree@^9.6.0, espree@^9.6.1: version "9.6.1" resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" @@ -18473,6 +18517,14 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= +event-emitter@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + integrity sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk= + dependencies: + d "1" + es5-ext "~0.10.14" + event-target-shim@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" @@ -18513,10 +18565,10 @@ eventsource-parser@1.0.0: resolved "https://registry.yarnpkg.com/eventsource-parser/-/eventsource-parser-1.0.0.tgz#6332e37fd5512e3c8d9df05773b2bf9e152ccc04" integrity sha512-9jgfSCa3dmEme2ES3mPByGXfgZ87VbP97tng1G2nWwWx6bV2nYxm2AWCrbQjXToSe+yYlqaZNtxffR9IeQr95g== -eventsource-parser@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/eventsource-parser/-/eventsource-parser-1.1.1.tgz#576f8bcf391c5e5ccdea817abd9ead36d1754247" - integrity sha512-3Ej2iLj6ZnX+5CMxqyUb8syl9yVZwcwm8IIMrOJlF7I51zxOOrRlU3zxSb/6hFbl03ts1ZxHAGJdWLZOLyKG7w== +eventsource-parser@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eventsource-parser/-/eventsource-parser-3.0.0.tgz#9303e303ef807d279ee210a17ce80f16300d9f57" + integrity sha512-T1C0XCUimhxVQzW4zFipdx0SficT651NnkR0ZSH3yQwh+mFMdLfgjABVi4YtMTtaL4s168593DaoaRLMqryavA== evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: version "1.0.3" @@ -18701,6 +18753,13 @@ express@^4.17.1, express@^4.17.3, express@^4.18.2, express@^4.21.1: utils-merge "1.0.1" vary "~1.1.2" +ext@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" + integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== + dependencies: + type "^2.7.2" + extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" @@ -18760,11 +18819,6 @@ extsprintf@1.3.0, extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= -faker@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/faker/-/faker-5.1.0.tgz#e10fa1dec4502551aee0eb771617a7e7b94692e8" - integrity sha512-RrWKFSSA/aNLP0g3o2WW1Zez7/MnMr7xkiZmoCfAGZmdkDQZ6l2KtuXHN5XjdvpRjDl8+3vf+Rrtl06Z352+Mw== - fancy-log@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.3.tgz#dbc19154f558690150a23953a0adbd035be45fc7" @@ -19241,7 +19295,7 @@ foreground-child@^2.0.0: cross-spawn "^7.0.0" signal-exit "^3.0.2" -foreground-child@^3.1.0: +foreground-child@^3.1.0, foreground-child@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.3.0.tgz#0ac8644c06e431439f8561db8ecf29a7b5519c77" integrity sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg== @@ -19329,13 +19383,13 @@ formdata-polyfill@^4.0.10: dependencies: fetch-blob "^3.1.2" -formidable@^3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/formidable/-/formidable-3.5.1.tgz#9360a23a656f261207868b1484624c4c8d06ee1a" - integrity sha512-WJWKelbRHN41m5dumb0/k8TeAx7Id/y3a+Z7QfhxP/htI9Js5zYaEDtG8uMgG0vM0lOlqnmjE99/kfpOYi/0Og== +formidable@^3.5.1, formidable@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/formidable/-/formidable-3.5.2.tgz#207c33fecdecb22044c82ba59d0c63a12fb81d77" + integrity sha512-Jqc1btCy3QzRbJaICGwKcBfGWuLADRerLzDqi2NwSt/UkXLsHJw2TVResiaoBufHVHy9aSgClOHCeJsSsFLTbg== dependencies: dezalgo "^1.0.4" - hexoid "^1.0.0" + hexoid "^2.0.0" once "^1.4.0" formik@^2.4.6: @@ -19855,7 +19909,7 @@ glob@8.1.0: minimatch "^5.0.1" once "^1.3.0" -glob@^10.0.0, glob@^10.3.7: +glob@^10.0.0, glob@^10.3.12, glob@^10.3.7: version "10.4.5" resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== @@ -20076,12 +20130,10 @@ got@^11.8.2: p-cancelable "^2.0.0" responselike "^2.0.0" -gpt-tokenizer@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/gpt-tokenizer/-/gpt-tokenizer-2.1.2.tgz#14f7ce424cf2309fb5be66e112d1836080c2791a" - integrity sha512-HSuI5d6uey+c7x/VzQlPfCoGrfLyAc28vxWofKbjR9PJHm0AjQGSWkKw/OJnb+8S1g7nzgRsf0WH3dK+NNWYbg== - dependencies: - rfc4648 "^1.5.2" +gpt-tokenizer@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/gpt-tokenizer/-/gpt-tokenizer-2.6.2.tgz#90e6932c7b5f73df7c13d360802edb43a2776586" + integrity sha512-OznIET3z069FiwbLtLFXJ9pVESYAa8EnX0BMogs6YJ4Fn2FIcyeZYEbxsp2grPiK0DVaqP1f+0JR/8t9R7/jlg== 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.4, graceful-fs@^4.2.6, graceful-fs@^4.2.8, graceful-fs@^4.2.9: version "4.2.11" @@ -20480,10 +20532,10 @@ heap@^0.2.6: resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.6.tgz#087e1f10b046932fc8594dd9e6d378afc9d1e5ac" integrity sha1-CH4fELBGky/IWU3Z5tN4r8nR5aw= -hexoid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/hexoid/-/hexoid-1.0.0.tgz#ad10c6573fb907de23d9ec63a711267d9dc9bc18" - integrity sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g== +hexoid@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/hexoid/-/hexoid-2.0.0.tgz#fb36c740ebbf364403fa1ec0c7efd268460ec5b9" + integrity sha512-qlspKUK7IlSQv2o+5I7yhUd7TxlOG2Vr5LTa3ve2XSNVKAL/n/u/7KLvKmFNimomDIKvZFXWHv0T12mv7rT8Aw== highlight.js@^10.1.1, highlight.js@~10.4.0: version "10.4.1" @@ -21584,10 +21636,10 @@ 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.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" - integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= +is-promise@^2.1.0, is-promise@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" + integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== is-regex@^1.0.4, is-regex@^1.0.5, is-regex@^1.1.2, is-regex@^1.1.4: version "1.1.4" @@ -21849,16 +21901,6 @@ istanbul-lib-hook@^3.0.0: dependencies: append-transform "^2.0.0" -istanbul-lib-instrument@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz#873c6fff897450118222774696a3f28902d77c1d" - integrity sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ== - dependencies: - "@babel/core" "^7.7.5" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.0.0" - semver "^6.3.0" - istanbul-lib-instrument@^5.0.4: version "5.1.0" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.1.0.tgz#7b49198b657b27a730b8e9cb601f1e1bff24c59a" @@ -21870,7 +21912,7 @@ istanbul-lib-instrument@^5.0.4: istanbul-lib-coverage "^3.2.0" semver "^6.3.0" -istanbul-lib-instrument@^6.0.0: +istanbul-lib-instrument@^6.0.0, istanbul-lib-instrument@^6.0.2: version "6.0.3" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz#fa15401df6c15874bcb2105f773325d78c666765" integrity sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q== @@ -22555,10 +22597,10 @@ js-string-escape@^1.0.1: resolved "https://registry.yarnpkg.com/js-string-escape/-/js-string-escape-1.0.1.tgz#e2625badbc0d67c7533e9edc1068c587ae4137ef" integrity sha1-4mJbrbwNZ8dTPp7cEGjFh65BN+8= -js-tiktoken@^1.0.12: - version "1.0.12" - resolved "https://registry.yarnpkg.com/js-tiktoken/-/js-tiktoken-1.0.12.tgz#af0f5cf58e5e7318240d050c8413234019424211" - integrity sha512-L7wURW1fH9Qaext0VzaUDpFGVQgjkdE3Dgsy9/+yXyGEpBKnylTd0mU0bfbNkKDlXRb6TEsZkwuflu1B8uQbJQ== +js-tiktoken@^1.0.12, js-tiktoken@^1.0.14: + version "1.0.15" + resolved "https://registry.yarnpkg.com/js-tiktoken/-/js-tiktoken-1.0.15.tgz#92a7d829f6950c2cfb35cc52555502e3d6e2ebac" + integrity sha512-65ruOWWXDEZHHbAo7EjOcNxOGasQKbL4Fq3jEr2xsCqSsoOo6VVSqzWQb6PRIqypFSDcma4jO90YP0w5X8qVXQ== dependencies: base64-js "^1.5.1" @@ -22672,6 +22714,24 @@ json-schema-to-ts@^2.9.1: "@types/json-schema" "^7.0.9" ts-algebra "^1.2.0" +json-schema-to-typescript@^14.1.0: + version "14.1.0" + resolved "https://registry.yarnpkg.com/json-schema-to-typescript/-/json-schema-to-typescript-14.1.0.tgz#31160d9cf13bf8f948a7ccefdf97e995bc183591" + integrity sha512-VIeAFQkn88gFh26MSHWG4uX7TjK/arTw0NVLMZn6vX1WrSF+P6xu5MyEdovu+9PJ0uiS5gm0wzwQvYW9eSq1uw== + dependencies: + "@apidevtools/json-schema-ref-parser" "^11.5.5" + "@types/json-schema" "^7.0.15" + "@types/lodash" "^4.17.0" + cli-color "^2.0.4" + glob "^10.3.12" + is-glob "^4.0.3" + js-yaml "^4.1.0" + lodash "^4.17.21" + minimist "^1.2.8" + mkdirp "^3.0.1" + node-fetch "^3.3.2" + prettier "^3.2.5" + json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -22980,10 +23040,10 @@ kuler@^2.0.0: zod "^3.22.4" zod-to-json-schema "^3.22.3" -langsmith@^0.2.0, langsmith@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/langsmith/-/langsmith-0.2.3.tgz#91c5b4e3d5b030d8a995e9acaac43dba4b9b225c" - integrity sha512-SPMYPVqR9kwXZVmJ2PXC61HeBnXIFHrjfjDxQ14H0+n5p4gqjLzgSHIQyxBlFeWQUQzArJxe65Ap+s+Xo1cZog== +langsmith@^0.2.0, langsmith@^0.2.5: + version "0.2.5" + resolved "https://registry.yarnpkg.com/langsmith/-/langsmith-0.2.5.tgz#0e58900bcdfb47409222dd6c8c122c50f5015337" + integrity sha512-dA+l7ZEh1Q9Q9FcE39PUSSEMfsFo73R2V81fRo5KSlGNcypOEhoQvv6lbjyZP7MHmt3/9pPcfpuRd5Y4RbFYqQ== dependencies: "@types/uuid" "^10.0.0" commander "^10.0.1" @@ -23504,7 +23564,7 @@ lru-cache@^10.2.0: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ== -lru-cache@^4.0.0, lru-cache@^4.0.1, lru-cache@^4.1.5: +lru-cache@^4.0.0, lru-cache@^4.1.5: version "4.1.5" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== @@ -23531,6 +23591,13 @@ 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.0: + 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" @@ -23910,6 +23977,20 @@ memoize@^10.0.0: dependencies: mimic-function "^5.0.0" +memoizee@^0.4.15: + version "0.4.17" + resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.17.tgz#942a5f8acee281fa6fb9c620bddc57e3b7382949" + integrity sha512-DGqD7Hjpi/1or4F/aYAspXKNm5Yili0QDAFAY4QYvpqpgiY6+1jOfqpmByzjxbWd/T9mChbCArXAbDAsTm5oXA== + dependencies: + d "^1.0.2" + es5-ext "^0.10.64" + es6-weak-map "^2.0.3" + event-emitter "^0.3.5" + is-promise "^2.2.2" + lru-queue "^0.1.0" + next-tick "^1.1.0" + timers-ext "^0.1.7" + memoizerific@^1.11.3: version "1.11.3" resolved "https://registry.yarnpkg.com/memoizerific/-/memoizerific-1.11.3.tgz#7c87a4646444c32d75438570905f2dbd1b1a805a" @@ -24814,6 +24895,11 @@ 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.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" + integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== + nice-napi@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/nice-napi/-/nice-napi-1.0.2.tgz#dc0ab5a1eac20ce548802fc5686eaa6bc654927b" @@ -25005,10 +25091,10 @@ node-readfiles@^0.2.0: dependencies: es6-promise "^3.2.1" -node-releases@^2.0.14: - version "2.0.14" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" - integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== +node-releases@^2.0.18: + version "2.0.18" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" + integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g== node-source-walk@^6.0.0, node-source-walk@^6.0.1, node-source-walk@^6.0.2: version "6.0.2" @@ -25017,11 +25103,6 @@ node-source-walk@^6.0.0, node-source-walk@^6.0.1, node-source-walk@^6.0.2: dependencies: "@babel/parser" "^7.21.8" -node-version@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/node-version/-/node-version-1.2.0.tgz#34fde3ffa8e1149bd323983479dda620e1b5060d" - integrity sha512-ma6oU4Sk0qOoKEAymVoTvk8EdXEobdS7m/mAGhDJ8Rouugho48crHBORAmy5BoOcv8wraPM6xumapQp5hl4iIQ== - nodemailer@^6.9.15: version "6.9.15" resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-6.9.15.tgz#57b79dc522be27e0e47ac16cc860aa0673e62e04" @@ -25157,10 +25238,10 @@ nwsapi@^2.2.2: resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.2.tgz#e5418863e7905df67d51ec95938d67bf801f0bb0" integrity sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw== -nyc@^15.1.0: - version "15.1.0" - resolved "https://registry.yarnpkg.com/nyc/-/nyc-15.1.0.tgz#1335dae12ddc87b6e249d5a1994ca4bdaea75f02" - integrity sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A== +nyc@^17.1.0: + version "17.1.0" + resolved "https://registry.yarnpkg.com/nyc/-/nyc-17.1.0.tgz#b6349a401a62ffeb912bd38ea9a018839fdb6eb1" + integrity sha512-U42vQ4czpKa0QdI1hu950XuNhYqgoM+ZF1HT+VuUHL9hPfDPVvNQyltmMqdE9bUHMVa+8yNbc3QKTj8zQhlVxQ== dependencies: "@istanbuljs/load-nyc-config" "^1.0.0" "@istanbuljs/schema" "^0.1.2" @@ -25169,12 +25250,12 @@ nyc@^15.1.0: decamelize "^1.2.0" find-cache-dir "^3.2.0" find-up "^4.1.0" - foreground-child "^2.0.0" + foreground-child "^3.3.0" get-package-type "^0.1.0" glob "^7.1.6" istanbul-lib-coverage "^3.0.0" istanbul-lib-hook "^3.0.0" - istanbul-lib-instrument "^4.0.0" + istanbul-lib-instrument "^6.0.2" istanbul-lib-processinfo "^2.0.2" istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" @@ -25379,10 +25460,10 @@ objectorarray@^1.0.4: resolved "https://registry.yarnpkg.com/objectorarray/-/objectorarray-1.0.4.tgz#d69b2f0ff7dc2701903d308bb85882f4ddb49483" integrity sha512-91k8bjcldstRz1bG6zJo8lWD7c6QXcB4nTDUqiEvIL1xAsLoZlOOZZG+nd6YPz+V7zY1580J4Xxh1vZtyv4i/w== -oboe@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.4.tgz#20c88cdb0c15371bb04119257d4fdd34b0aa49f6" - integrity sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY= +oboe@^2.1.7: + version "2.1.7" + resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.7.tgz#14cb69c750757a964c760383e094887822a32947" + integrity sha512-Y2oCMU2xgITORaNvIDCvUyn2ZG/5NI19lLjMFThgYzCH+GA/fgYvVcwxAqnZPiMiUrPq64jLzCkBXqKSu/R6MA== dependencies: http-https "^1.0.0" @@ -25453,10 +25534,10 @@ open@^8.0.9, open@^8.4.0, open@~8.4.0: is-docker "^2.1.1" is-wsl "^2.2.0" -openai@^4.68.0: - version "4.69.0" - resolved "https://registry.yarnpkg.com/openai/-/openai-4.69.0.tgz#ac2463719280987e506e4bd62dd477337e2406a1" - integrity sha512-S3hOHSkk609KqwgH+7dwFrSvO3Gm3Nk0YWGyPHNscoMH/Y2tH1qunMi7gtZnLbUv4/N1elqCp6bDior2401kCQ== +openai@^4.68.0, openai@^4.72.0: + version "4.72.0" + resolved "https://registry.yarnpkg.com/openai/-/openai-4.72.0.tgz#61630553157a0c9bb1c304b1dd4d2f90e9ec4cf7" + integrity sha512-hFqG9BWCs7L7ifrhJXw7mJXmUBr7d9N6If3J9563o0jfwVA4wFANFDDaOIWFdgDdwgCXg5emf0Q+LoLCGszQYA== dependencies: "@types/node" "^18.11.18" "@types/node-fetch" "^2.6.4" @@ -26218,6 +26299,13 @@ platform@^1.3.0: resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.5.tgz#fb6958c696e07e2918d2eeda0f0bc9448d733444" integrity sha512-TuvHS8AOIZNAlE77WUDiR4rySV/VMptyMfcfeoMgs4P8apaZM3JrnbzBiixKUv+XR6i+BXrQh8WAnjaSPFO65Q== +playwright-chromium@1.49.0: + version "1.49.0" + resolved "https://registry.yarnpkg.com/playwright-chromium/-/playwright-chromium-1.49.0.tgz#0661428204396dbf5445eb04536d43a5f91bca59" + integrity sha512-xU+nOHawNFKfJsHTTGyWqSJ5nRGGHQq1wTsc49H9rM+hDNnoKZi+3m12mGoLpqvJP7vRjZQ3uvU9/UJZbrJ1AA== + dependencies: + playwright-core "1.49.0" + playwright-chromium@=1.45.1: version "1.45.1" resolved "https://registry.yarnpkg.com/playwright-chromium/-/playwright-chromium-1.45.1.tgz#a20b513edbc0435b2e06a303aac61001f44bf094" @@ -26225,29 +26313,22 @@ playwright-chromium@=1.45.1: dependencies: playwright-core "1.45.1" -playwright-chromium@=1.46.0: - version "1.46.0" - resolved "https://registry.yarnpkg.com/playwright-chromium/-/playwright-chromium-1.46.0.tgz#f24228fec92b380ccc8f5f365b897e9d88b612f6" - integrity sha512-UTHYZsr49XFYRQkpCfaHxL63vfu6uThxR1DrNwnU6qik/OworFcugTOJMWFMoop3QP+ThU8laAMumauLdLZXCQ== - dependencies: - playwright-core "1.46.0" - playwright-core@1.45.1, playwright-core@=1.45.1: version "1.45.1" resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.45.1.tgz#549a2701556b58245cc75263f9fc2795c1158dc1" integrity sha512-LF4CUUtrUu2TCpDw4mcrAIuYrEjVDfT1cHbJMfwnE2+1b8PZcFzPNgvZCvq2JfQ4aTjRCCHw5EJ2tmr2NSzdPg== -playwright-core@1.46.0: - version "1.46.0" - resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.46.0.tgz#2336ac453a943abf0dc95a76c117f9d3ebd390eb" - integrity sha512-9Y/d5UIwuJk8t3+lhmMSAJyNP1BUC/DqP3cQJDQQL/oWqAiuPTLgy7Q5dzglmTLwcBRdetzgNM/gni7ckfTr6A== +playwright-core@1.49.0: + version "1.49.0" + resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.49.0.tgz#8e69ffed3f41855b854982f3632f2922c890afcb" + integrity sha512-R+3KKTQF3npy5GTiKH/T+kdhoJfJojjHESR1YEWhYuEKRVfVaxH3+4+GvXE5xyCngCxhxnykk0Vlah9v8fs3jA== -playwright@1.46.0, playwright@=1.46.0: - version "1.46.0" - resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.46.0.tgz#c7ff490deae41fc1e814bf2cb62109dd9351164d" - integrity sha512-XYJ5WvfefWONh1uPAUAi0H2xXV5S3vrtcnXe6uAOgdGi3aSpqOSXX08IAjXW34xitfuOJsvXU5anXZxPSEQiJw== +playwright@1.49.0: + version "1.49.0" + resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.49.0.tgz#df6b9e05423377a99658202844a294a8afb95d0a" + integrity sha512-eKpmys0UFDnfNb3vfsf8Vx2LEOtflgRebl0Im2eQQnYMA4Aqd+Zw8bEOB+7ZKvN76901mRnqdsiOGKxzVTbi7A== dependencies: - playwright-core "1.46.0" + playwright-core "1.49.0" optionalDependencies: fsevents "2.3.2" @@ -26287,16 +26368,11 @@ png-js@^1.0.0: resolved "https://registry.yarnpkg.com/png-js/-/png-js-1.0.0.tgz#e5484f1e8156996e383aceebb3789fd75df1874d" integrity sha512-k+YsbhpA9e+EFfKjTCH3VW6aoKlyNYI6NYdTfDL4CIvFnvsuO84ttonmZE7rc+v23SLTH8XX+5w/Ak9v0xGY4g== -pngjs@7.0.0: +pngjs@7.0.0, pngjs@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-7.0.0.tgz#a8b7446020ebbc6ac739db6c5415a65d17090e26" integrity sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow== -pngjs@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.4.0.tgz#99ca7d725965fb655814eaf65f38f12bbdbf555f" - integrity sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w== - pngjs@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-6.0.0.tgz#ca9e5d2aa48db0228a52c419c3308e87720da821" @@ -26728,6 +26804,11 @@ prettier@^2.0.0, prettier@^2.8.8: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== +prettier@^3.2.5: + version "3.3.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105" + integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew== + pretty-bytes@^5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" @@ -26851,11 +26932,6 @@ promise-inflight@^1.0.1: resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= -promise-polyfill@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-6.1.0.tgz#dfa96943ea9c121fca4de9b5868cb39d3472e057" - integrity sha512-g0LWaH0gFsxovsU7R5LrrhHhWAWiHRnh1GPrhXnPgYsDkIqjRYUYSZEsej/wtleDrz5xVSIDbeKfidztp2XHFQ== - promise-polyfill@^8.1.3: version "8.1.3" resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-8.1.3.tgz#8c99b3cf53f3a91c68226ffde7bde81d7f904116" @@ -28655,11 +28731,6 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rfc4648@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/rfc4648/-/rfc4648-1.5.2.tgz#cf5dac417dd83e7f4debf52e3797a723c1373383" - integrity sha512-tLOizhR6YGovrEBLatX1sdcuhoSCXddw3mqNVAcKxGJ+J0hFeJ+SjeWCv5UPA/WU3YzWPPuCVYgXBKZUPGpKtg== - rfdc@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.4.1.tgz#778f76c4fb731d93414e8f925fbecf64cce7f6ca" @@ -29126,10 +29197,10 @@ select-hose@^2.0.0: resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo= -selenium-webdriver@^4.26.0: - version "4.26.0" - resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-4.26.0.tgz#23163cdad20388214a4ad17c1f38262a0857c902" - integrity sha512-nA7jMRIPV17mJmAiTDBWN96Sy0Uxrz5CCLb7bLVV6PpL417SyBMPc2Zo/uoREc2EOHlzHwHwAlFtgmSngSY4WQ== +selenium-webdriver@^4.27.0: + version "4.27.0" + resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-4.27.0.tgz#f0f26ce453805e7dc77151040442c67e441dbe7a" + integrity sha512-LkTJrNz5socxpPnWPODQ2bQ65eYx9JK+DQMYNihpTjMCqHwgWGYQnQTCAAche2W3ZP87alA+1zYPvgS8tHNzMQ== dependencies: "@bazel/runfiles" "^6.3.1" jszip "^3.10.1" @@ -30567,7 +30638,22 @@ stylus-lookup@^5.0.1: dependencies: commander "^10.0.1" -superagent@^9.0.1, superagent@^9.0.2: +superagent@^10.1.1: + version "10.1.1" + resolved "https://registry.yarnpkg.com/superagent/-/superagent-10.1.1.tgz#2f112591a5701a1d4467048580bcfda104e5a94d" + integrity sha512-9pIwrHrOj3uAnqg9gDlW7EA2xv+N5au/dSM0kM22HTqmUu8jBxNT+8uA7tA3UoCnmiqzpSbu8rasIUZvbyamMQ== + dependencies: + component-emitter "^1.3.0" + cookiejar "^2.1.4" + debug "^4.3.4" + fast-safe-stringify "^2.1.1" + form-data "^4.0.0" + formidable "^3.5.2" + methods "^1.1.2" + mime "2.6.0" + qs "^6.11.0" + +superagent@^9.0.1: version "9.0.2" resolved "https://registry.yarnpkg.com/superagent/-/superagent-9.0.2.tgz#a18799473fc57557289d6b63960610e358bdebc1" integrity sha512-xuW7dzkUpcJq7QnhOsnNUgtYp3xRwpt2F7abdRYIpCsAt0hhUqia0EdxyXZQQpNmGtsCzYHryaKSV3q3GJnq7w== @@ -30785,10 +30871,10 @@ tabbable@^5.3.3: resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-5.3.3.tgz#aac0ff88c73b22d6c3c5a50b1586310006b47fbf" integrity sha512-QD9qKY3StfbZqWOPLp0++pOrAVb/HbUi5xCc8cUo4XjP19808oaMiDzn0leBY5mCespIBM0CIZePzZjgzR83kA== -table@^6.8.0, table@^6.8.1: - version "6.8.1" - resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" - integrity sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA== +table@^6.8.0, table@^6.8.2: + version "6.8.2" + resolved "https://registry.yarnpkg.com/table/-/table-6.8.2.tgz#c5504ccf201213fa227248bdc8c5569716ac6c58" + integrity sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA== dependencies: ajv "^8.0.1" lodash.truncate "^4.4.2" @@ -31119,6 +31205,14 @@ timers-browserify@^2.0.4: dependencies: setimmediate "^1.0.4" +timers-ext@^0.1.7: + version "0.1.8" + resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.8.tgz#b4e442f10b7624a29dd2aa42c295e257150cf16c" + integrity sha512-wFH7+SEAcKfJpfLPkrgMPvvwnEtj8W4IurvEyrKsDleXnKLCDw71w8jltvfLa8Rm4qQxxT4jmDBYbJG/z7qoww== + dependencies: + es5-ext "^0.10.64" + next-tick "^1.1.0" + 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" @@ -31568,6 +31662,11 @@ type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" +type@^2.7.2: + version "2.7.3" + resolved "https://registry.yarnpkg.com/type/-/type-2.7.3.tgz#436981652129285cc3ba94f392886c2637ea0486" + integrity sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ== + typed-array-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz#1867c5d83b20fcb5ccf32649e5e2fc7424474ff3" @@ -31658,7 +31757,7 @@ typescript-tuple@^2.2.1: dependencies: typescript-compare "^0.0.2" -typescript@5, typescript@5.1.6, typescript@^3.3.3333, typescript@^5.0.4: +typescript@5, typescript@5.1.6, typescript@^3.3.3333, typescript@^5.0.4, typescript@^5.5.3: version "5.1.6" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274" integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA== @@ -31981,13 +32080,13 @@ untildify@^4.0.0: resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== -update-browserslist-db@^1.0.13: - version "1.0.13" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" - integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== +update-browserslist-db@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz#80846fba1d79e82547fb661f8d141e0945755fe5" + integrity sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A== dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" + escalade "^3.2.0" + picocolors "^1.1.0" uri-js-replace@^1.0.1: version "1.0.1" @@ -33037,20 +33136,19 @@ webpack@4, webpack@^4.41.5: webpack-sources "^1.4.1" "webpack@>=4.43.0 <6.0.0", webpack@^5: - version "5.91.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.91.0.tgz#ffa92c1c618d18c878f06892bbdc3373c71a01d9" - integrity sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw== + version "5.96.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.96.1.tgz#3676d1626d8312b6b10d0c18cc049fba7ac01f0c" + integrity sha512-l2LlBSvVZGhL4ZrPwyr8+37AunkcYj5qh8o6u2/2rzoPc8gxFJkLj1WxNgooi9pnoc06jh0BjuXnamM4qlujZA== dependencies: - "@types/eslint-scope" "^3.7.3" - "@types/estree" "^1.0.5" + "@types/eslint-scope" "^3.7.7" + "@types/estree" "^1.0.6" "@webassemblyjs/ast" "^1.12.1" "@webassemblyjs/wasm-edit" "^1.12.1" "@webassemblyjs/wasm-parser" "^1.12.1" - acorn "^8.7.1" - acorn-import-assertions "^1.9.0" - browserslist "^4.21.10" + acorn "^8.14.0" + browserslist "^4.24.0" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.16.0" + enhanced-resolve "^5.17.1" es-module-lexer "^1.2.1" eslint-scope "5.1.1" events "^3.2.0" @@ -33399,10 +33497,10 @@ xml@^1.0.0: resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" integrity sha1-eLpyAgApxbyHuKgaPPzXS0ovweU= -xmlbuilder@13.0.2: - version "13.0.2" - resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-13.0.2.tgz#02ae33614b6a047d1c32b5389c1fdacb2bce47a7" - integrity sha512-Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ== +xmlbuilder@15.1.1: + version "15.1.1" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-15.1.1.tgz#9dcdce49eea66d8d10b42cae94a79c3c8d0c2ec5" + integrity sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg== xmlbuilder@~11.0.0: version "11.0.1"